@syncfusion/ej2-treemap 32.1.19 → 32.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,11 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-pdf-export")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base","@syncfusion/ej2-data","@syncfusion/ej2-pdf-export"],t):t((e=e||self).ej={},e.ej2Base,e.ej2SvgBase,e.ej2Data,e.ej2PdfExport)}(this,function(e,A,C,F,w){"use strict";var O,M,N="load",_="loaded",E="beforePrint",U="itemRendering",k="drillStart",q="drillEnd",X="itemSelected",J="itemHighlight",Y="tooltipRendering",Z="itemClick",Q="itemMove",$="click",K="doubleClick",ee="rightClick",te="mouseMove",ie="legendItemRendering",le="legendRendering",oe="resize",ne="Roboto, Segoe UI, Noto, Sans-serif",t=(O=function(e,t){return(O=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}O(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),i=function(e,t,i,l){var o,n=arguments.length,r=n<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,l);else for(var a=e.length-1;0<=a;a--)(o=e[a])&&(r=(n<3?o(r):3<n?o(t,i,r):o(t,i))||r);return 3<n&&r&&Object.defineProperty(t,i,r),r},l=(M=A.ChildProperty,t(re,M),i([A.Property("#808080")],re.prototype,"color",void 0),i([A.Property(0)],re.prototype,"width",void 0),re);function re(){return null!==M&&M.apply(this,arguments)||this}ae=A.ChildProperty,t(o,ae),i([A.Property(10)],o.prototype,"left",void 0),i([A.Property(10)],o.prototype,"right",void 0),i([A.Property(10)],o.prototype,"top",void 0),i([A.Property(10)],o.prototype,"bottom",void 0);var ae,se=o;function o(){return null!==ae&&ae.apply(this,arguments)||this}de=A.ChildProperty,t(r,de),i([A.Property(null)],r.prototype,"size",void 0),i([A.Property(null)],r.prototype,"color",void 0),i([A.Property(ne)],r.prototype,"fontFamily",void 0),i([A.Property("")],r.prototype,"fontWeight",void 0),i([A.Property("Normal")],r.prototype,"fontStyle",void 0),i([A.Property(1)],r.prototype,"opacity",void 0);var de,n=r;function r(){return null!==de&&de.apply(this,arguments)||this}he=A.ChildProperty,t(ge,he),i([A.Property("")],ge.prototype,"text",void 0),i([A.Property("")],ge.prototype,"description",void 0);var he,pe=ge;function ge(){return null!==he&&he.apply(this,arguments)||this}t(ue,ce=pe),i([A.Complex({fontFamily:null,fontWeight:null},n)],ue.prototype,"textStyle",void 0),i([A.Property("Center")],ue.prototype,"alignment",void 0);var ce,me=ue;function ue(){return null!==ce&&ce.apply(this,arguments)||this}t(ve,ye=pe),i([A.Complex({fontFamily:null,fontWeight:null},n)],ve.prototype,"textStyle",void 0),i([A.Property("Center")],ve.prototype,"alignment",void 0),i([A.Complex({},me)],ve.prototype,"subtitleSettings",void 0);var ye,fe=ve;function ve(){return null!==ye&&ye.apply(this,arguments)||this}xe=A.ChildProperty,t(a,xe),i([A.Property(null)],a.prototype,"from",void 0),i([A.Property(null)],a.prototype,"to",void 0),i([A.Property(null)],a.prototype,"color",void 0),i([A.Property(null)],a.prototype,"label",void 0),i([A.Property(null)],a.prototype,"value",void 0),i([A.Property(null)],a.prototype,"minOpacity",void 0),i([A.Property(null)],a.prototype,"maxOpacity",void 0),i([A.Property(!0)],a.prototype,"showLegend",void 0);var xe,Se=a;function a(){return null!==xe&&xe.apply(this,arguments)||this}be=A.ChildProperty,t(s,be),i([A.Property(!1)],s.prototype,"visible",void 0),i([A.Property("Default")],s.prototype,"mode",void 0),i([A.Property("transparent")],s.prototype,"background",void 0),i([A.Property("Circle")],s.prototype,"shape",void 0),i([A.Property("")],s.prototype,"width",void 0),i([A.Property("")],s.prototype,"height",void 0),i([A.Complex({size:null,fontFamily:null,fontWeight:null},n)],s.prototype,"textStyle",void 0),i([A.Property(null)],s.prototype,"fill",void 0),i([A.Property(1)],s.prototype,"opacity",void 0),i([A.Property(15)],s.prototype,"shapeWidth",void 0),i([A.Property(15)],s.prototype,"shapeHeight",void 0),i([A.Property(10)],s.prototype,"shapePadding",void 0),i([A.Property(null)],s.prototype,"imageUrl",void 0),i([A.Complex({color:null,width:null},l)],s.prototype,"border",void 0),i([A.Complex({color:"#000000",width:0},l)],s.prototype,"shapeBorder",void 0),i([A.Complex({},pe)],s.prototype,"title",void 0),i([A.Complex({size:null,fontFamily:null,fontWeight:null},n)],s.prototype,"titleStyle",void 0),i([A.Property("Bottom")],s.prototype,"position",void 0),i([A.Property("None")],s.prototype,"orientation",void 0),i([A.Property(!1)],s.prototype,"invertedPointer",void 0),i([A.Property("After")],s.prototype,"labelPosition",void 0),i([A.Property("None")],s.prototype,"labelDisplayMode",void 0),i([A.Property("Center")],s.prototype,"alignment",void 0),i([A.Property({x:0,y:0})],s.prototype,"location",void 0),i([A.Property(null)],s.prototype,"showLegendPath",void 0),i([A.Property(null)],s.prototype,"valuePath",void 0),i([A.Property(!1)],s.prototype,"removeDuplicateLegend",void 0);var be,Ie=s;function s(){return null!==be&&be.apply(this,arguments)||this}Ce=A.ChildProperty,t(we,Ce),i([A.Property(null)],we.prototype,"groupIndex",void 0),i([A.Property(null)],we.prototype,"groupName",void 0);var Ce,Fe=we;function we(){return null!==Ce&&Ce.apply(this,arguments)||this}Oe=A.ChildProperty,t(d,Oe),i([A.Property(null)],d.prototype,"fill",void 0),i([A.Property(!1)],d.prototype,"autoFill",void 0),i([A.Complex({},l)],d.prototype,"border",void 0),i([A.Property(0)],d.prototype,"gap",void 0),i([A.Property(10)],d.prototype,"padding",void 0),i([A.Property(1)],d.prototype,"opacity",void 0),i([A.Property(!0)],d.prototype,"showLabels",void 0),i([A.Property(null)],d.prototype,"labelPath",void 0),i([A.Property(null)],d.prototype,"labelFormat",void 0),i([A.Property("TopLeft")],d.prototype,"labelPosition",void 0),i([A.Complex({color:null,size:null,fontFamily:null},n)],d.prototype,"labelStyle",void 0),i([A.Property(null)],d.prototype,"labelTemplate",void 0),i([A.Property("Center")],d.prototype,"templatePosition",void 0),i([A.Property("Trim")],d.prototype,"interSectAction",void 0),i([A.Collection([],Se)],d.prototype,"colorMapping",void 0);var Oe,Le=d;function d(){return null!==Oe&&Oe.apply(this,arguments)||this}Te=A.ChildProperty,t(h,Te),i([A.Property(!1)],h.prototype,"visible",void 0),i([A.Property("")],h.prototype,"template",void 0),i([A.Property(null)],h.prototype,"format",void 0),i([A.Property(null)],h.prototype,"fill",void 0),i([A.Property(.75)],h.prototype,"opacity",void 0),i([A.Property(["Circle"])],h.prototype,"markerShapes",void 0),i([A.Complex({width:null,color:null},l)],h.prototype,"border",void 0),i([A.Complex({fontFamily:null,size:null,fontWeight:null,opacity:null},n)],h.prototype,"textStyle",void 0);var Te,Me=h;function h(){return null!==Te&&Te.apply(this,arguments)||this}Ne=A.ChildProperty,t(p,Ne),i([A.Property(!1)],p.prototype,"enable",void 0),i([A.Property(null)],p.prototype,"fill",void 0),i([A.Property("0.5")],p.prototype,"opacity",void 0),i([A.Complex({},l)],p.prototype,"border",void 0),i([A.Property("Item")],p.prototype,"mode",void 0);var Ne,_e=p;function p(){return null!==Ne&&Ne.apply(this,arguments)||this}Ee=A.ChildProperty,t(g,Ee),i([A.Property(!1)],g.prototype,"enable",void 0),i([A.Property("#808080")],g.prototype,"fill",void 0),i([A.Property("0.5")],g.prototype,"opacity",void 0),i([A.Complex({},l)],g.prototype,"border",void 0),i([A.Property("Item")],g.prototype,"mode",void 0);var Ee,De=g;function g(){return null!==Ee&&Ee.apply(this,arguments)||this}Pe=A.ChildProperty,t(c,Pe),i([A.Property(null)],c.prototype,"groupPath",void 0),i([A.Property(0)],c.prototype,"groupGap",void 0),i([A.Property(10)],c.prototype,"groupPadding",void 0),i([A.Complex({},l)],c.prototype,"border",void 0),i([A.Property(null)],c.prototype,"fill",void 0),i([A.Property(!1)],c.prototype,"autoFill",void 0),i([A.Property(1)],c.prototype,"opacity",void 0),i([A.Property(!0)],c.prototype,"showHeader",void 0),i([A.Property(20)],c.prototype,"headerHeight",void 0),i([A.Property(null)],c.prototype,"headerTemplate",void 0),i([A.Property(null)],c.prototype,"headerFormat",void 0),i([A.Property("Near")],c.prototype,"headerAlignment",void 0),i([A.Complex({color:null,size:"13px",fontFamily:null},n)],c.prototype,"headerStyle",void 0),i([A.Property("TopLeft")],c.prototype,"templatePosition",void 0),i([A.Collection([],Se)],c.prototype,"colorMapping",void 0);var Pe,t=c;function c(){return null!==Pe&&Pe.apply(this,arguments)||this}var W=function(e,t){this.width=e,this.height=t};function Be(e,t){return null!=e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}var j=function(e,t,i,l){this.x=e,this.y=t,this.width=i,this.height=l},L=function(e,t,i,l,o,n){this.y=o.y,this.x=o.x,this.height=o.height,this.width=o.width,this.id=e,this.fill=t,this.opacity=l,this.stroke=i.color,this["stroke-width"]=i.width,this["stroke-dasharray"]=n},z=function(e,t,i,l,o,n,r){this.id=e,this.opacity=o,this.fill=t,this.stroke=l,this["stroke-width"]=i,this["stroke-dasharray"]=n,this.d=r};function V(e,t){var i=document.getElementById("treeMapMeasureText");return null===i&&(i=A.createElement("text",{id:"treeMapMeasureText"}),document.body.appendChild(i)),i.innerHTML=A.SanitizeHtmlHelper.sanitize(e),i.style.position="absolute",i.style.fontSize=t.size,i.style.fontWeight=t.fontWeight,i.style.fontStyle=t.fontStyle,i.style.fontFamily=t.fontFamily,i.style.visibility="hidden",i.style.top="-100",i.style.left="0",i.style.whiteSpace="nowrap",i.style.lineHeight="normal",new W(i.clientWidth,i.clientHeight)}var T=function(e,t,i,l,o,n,r,a){void 0===n&&(n=""),this.transform="",this.baseLine="auto",this.id=e,this.text=o,this.transform=n,this.anchor=l,this.x=t,this.y=i,this.baseLine=r,this.connectorText=a};function G(e,t,i){var l=t;if(e<V(t,i).width)for(var o=t.length-1;0<=o;--o)if(V(l=t.substring(0,o)+"...",i).width<=e||l.length<4)return l=l.length<4?" ":l;return l}var ze=function(e,t){this.x=e,this.y=t};function He(e,t,i,l){var o;switch(t){case"Near":o=e.x;break;case"Center":o="title"===l?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":o="title"===l?e.width-e.y-i.width:e.x+e.width-i.width}t="title"===l?e.y+i.height/2:e.y+e.height/2+i.height/2;return new ze(o,t)}function Re(e,t,i){e=e.createText(t,i);return e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.style["user-select"]="none",e.style["-moz-user-select"]="none",e.style["-webkit-touch-callout"]="none",e.style["-webkit-user-select"]="none",e.style["-khtml-user-select"]="none",e.style["-ms-user-select"]="none",e.style["-o-user-select"]="none",e}function Ue(e,t,i,l,o){void 0===o&&(o=!1);var n,r,a={"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,id:e.id,x:e.x,y:e.y,fill:i},i="string"==typeof e.text?e.text:o?e.text[e.text.length-1]:e.text[0],s=new C.SvgRenderer("");if(!A.isNullOrUndefined(i)&&!A.isNullOrUndefined(e.connectorText)&&i.includes(e.connectorText[1]))for(var d=i.split("#"),h=0;h<d.length;h++){var p=-1===d[h].search(e.connectorText)||A.isNullOrUndefined(e.connectorText)?d[h]:e.connectorText,p=(a.id=e.id+"_"+h,r=Re(s,a,p),h%2==0&&0!==h&&(p=p.replace(/\s+/g,"&nbsp")),V(p,t));a.x=0!==h?a.x+p.width:a.x+p.width+5,l.appendChild(r)}else r=Re(s,a,i),l.appendChild(r);if("string"!=typeof e.text&&1<e.text.length){for(var g=1,c=e.text.length;g<c;g++)n=V(e.text[g],t).height,n=s.createTSpan({x:e.x,id:e.id,y:e.y+g*n},e.text[g]),r.appendChild(n);l.appendChild(r)}return r}function ke(e,t,i){var l=e.split("_RectPath")[0],e=-1<e.indexOf("_LabelTemplate")?t:document.querySelector("#"+l+"_LabelTemplate");A.isNullOrUndefined(e)||(e.innerHTML=i)}function Ae(e){return document.getElementById(e)}function We(e,t){return e.weight===t.weight?0:e.weight<t.weight?1:-1}function je(e,t,i,l){for(var o=!1,n="",r=l.leafItemSettings,a=0;a<e.length;a++){var s=i[l.levels[a]?l.levels[a].groupPath:r.labelPath||l.weightValuePath]||"undefined";if(e[a]===s&&(n+=s+(a===e.length-1?"":"#"))===t){o=!0;break}}return o}function H(e){if(e)for(var t=Object.keys(e),i={},l=0;l<t.length;l++)if(e[t[l]]instanceof Array){i.values=e[t[l]],i.key=t[l];break}return i}function Ve(e,t,i,l){if("Child"===i){t.push(e.levelOrderName);var o=H(e).values;if(o&&0<o.length){for(var n=0;n<o.length;n++)-1===t.indexOf(o[n].levelOrderName)&&t.push(o[n].levelOrderName);for(var r=0;r<o.length;r++)Ve(o[r],t,i,l)}}else if("Parent"===i)"string"==typeof e.levelOrderName&&-1===t.indexOf(e.levelOrderName)&&(t.push(e.levelOrderName),Ve(e.parent,t,i,l));else if("All"===i)for(var a=e.levelOrderName.split("#")[0],s=void 0,n=0;n<l.layout.renderItems.length;n++)-1<(s=l.layout.renderItems[n]).levelOrderName.indexOf(a)&&-1===t.indexOf(s.levelOrderName)&&t.push(s.levelOrderName);else t.push(e.levelOrderName);return t}function Ge(t){var i=null;try{i="function"!=typeof t&&document.querySelectorAll(t).length?A.compile(document.querySelector(t).innerHTML.trim()):A.compile(t)}catch(e){i=A.compile(t)}return i}function qe(e,t,i){for(var l=A.createElement("div",{id:t}),o=(l.style.cssText="position: absolute;pointer-events: auto;",e.length);0<o;)l.appendChild(e[0]),o--;for(var n=l.innerHTML,r=Object.keys(i),a=0;a<r.length;a++)var s=RegExp,n=n.replace(new s("{{:"+r[a]+"}}","g"),i[r[a].toString()]);return l.innerHTML=n,l}function Xe(e,t,i,l,o){var n=new ze(0,0),r="Template"===l?o.areaRect.x:0,a="Template"===l?o.areaRect.y:0;return n.x=Math.abs(r-(-1<t.indexOf("Left")?e.x+5:-1<t.indexOf("Right")?e.x+e.width-i.width:e.x+(e.width/2-i.width/2)))-2,!o.enableDrillDown||"BottomLeftTopRight"!==o.renderDirection&&"BottomRightTopLeft"!==o.renderDirection?n.y=Math.abs(a-(-1<t.indexOf("Top")?"Template"===l?e.y:e.y+i.height:-1<t.indexOf("Bottom")?e.y+e.height-i.height:"Template"===l?e.y+(e.height/2-i.height/2):e.y+e.height/2+i.height/4)):n.y=Math.abs(e.y+e.height-i.height+5),n}function Je(e,t){var i=new W(0,0),t=(t.appendChild(e),i.height=e.offsetHeight,i.width=e.offsetWidth,document.getElementById(e.id));return t.parentNode.removeChild(t),i}function Ye(e){return(e.width-e.x)*(e.height-e.y)}function Ze(e){var e=Qe(e),t=e.width,e=e.height;return Math.min(t,e)}function Qe(e){var t=e.x,i=e.y;return{x:t,y:i,width:e.width-t,height:e.height-i}}function $e(e){var t=e.x,i=e.y;return{x:t,y:i,width:t+e.width,height:i+e.height}}function Ke(e,t,i){var l=i.getBoundingClientRect(),o=i.ownerDocument.defaultView.pageXOffset,n=i.ownerDocument.defaultView.pageYOffset,r=i.ownerDocument.documentElement.clientTop,i=i.ownerDocument.documentElement.clientLeft,o=l.left+o-i,i=l.top+n-r;return new ze(e-o,t-i)}function et(e,t,i){var l,o,n=[];if(A.isNullOrUndefined(t)&&A.isNullOrUndefined(i)&&isNaN(i))return null;for(var r=0;r<e.length;r++){var a=!1,s=i;A.isNullOrUndefined(e[r].from)||A.isNullOrUndefined(e[r].to)||A.isNullOrUndefined(e[r].value)?(A.isNullOrUndefined(e[r].from)||A.isNullOrUndefined(e[r].to))&&A.isNullOrUndefined(e[r].value)||(i>=e[r].from&&e[r].to>=i||e[r].value===t)&&(e[r].value===t&&(a=!0),l="[object Array]"===Object.prototype.toString.call(e[r].color)?a?e[r].color[0]:it(e[r],s):e[r].color):i>=e[r].from&&e[r].to>=i&&e[r].value===t&&(a=!0,l="[object Array]"===Object.prototype.toString.call(e[r].color)?a?e[r].color[0]:it(e[r],s):e[r].color),(i>=e[r].from&&i<=e[r].to||e[r].value===t)&&!A.isNullOrUndefined(e[r].minOpacity)&&!A.isNullOrUndefined(e[r].maxOpacity)&&l&&(o=tt(e[r],i)),(""===l||A.isNullOrUndefined(l))&&A.isNullOrUndefined(e[r].from)&&A.isNullOrUndefined(e[r].to)&&A.isNullOrUndefined(e[r].minOpacity)&&A.isNullOrUndefined(e[r].maxOpacity)&&A.isNullOrUndefined(e[r].value)&&(l="[object Array]"===Object.prototype.toString.call(e[r].color)?e[r].color[0]:e[r].color),o=A.isNullOrUndefined(o)?"1":o,n.push(l)}for(var d=n.length-1;0<=d;d--)d=(l=n[d])?-1:d;return{fill:l,opacity:o}}function tt(e,t){var i=1;return(i=t>=e.from&&t<=e.to?(t-e.from)/(e.to-e.from)*(e.maxOpacity-e.minOpacity)+e.minOpacity:i).toString()}function it(e,t){return ot(e,t)}function lt(e,t,i){return"#"+m(e)+m(t)+m(i)}function ot(e,t){return Number(t)===e.from?e.color[0]:Number(t)===e.to?e.color[e.color.length-1]:lt((t=nt(Number(t),e)).r,t.g,t.b)}function nt(e,t){var i=t.from,l=t.to,o=0,n=l-i,o=(e-i)/n;if(t.color.length<=2)a="#"===t.color[0].charAt(0)?t.color[0]:u(t.color[0]),s="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:u(t.color[t.color.length-1]);else{for(var r,a="#"===t.color[0].charAt(0)?t.color[0]:u(t.color[0]),s="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:u(t.color[t.color.length-1]),d=n/(t.color.length-1),h=t.color.length-1,p=[],g=1;g<h;g++)r={b:i+g*d,color:t.color[g]},p.push(r);for(var c=0;c<p.length;c++)i<=e&&e<=p[c].b&&0===c?(s="#"===p[c].color.charAt(0)?p[c].color:u(p[c].color),o=e<p[c].b?1-Math.abs((e-p[c].b)/d):(e-p[c].b)/d):p[c].b<=e&&e<=l&&c===p.length-1&&(a="#"===p[c].color.charAt(0)?p[c].color:u(p[c].color),o=e<p[c].b?1-Math.abs((e-p[c].b)/d):(e-p[c].b)/d),c!==p.length-1&&c<p.length&&p[c].b<=e&&e<=p[c+1].b&&(a="#"===p[c].color.charAt(0)?p[c].color:u(p[c].color),s="#"===p[c+1].color.charAt(0)?p[c+1].color:u(p[c+1].color),o=Math.abs(e-p[c+1].b)/d)}return rt(o,a,s)}function rt(e,t,i){var i=i.split("#")[1],t=t.split("#")[1],l=at(e,parseInt(t.substr(0,2),16),parseInt(i.substr(0,2),16)),o=at(e,parseInt(t.substr(2,2),16),parseInt(i.substr(2,2),16)),e=at(e,parseInt(t.substr(4,2),16),parseInt(i.substr(4,2),16));return new yt(l,o,e)}function at(e,t,i){return Math.round(t+(i-t)*e)}function st(e,t,i){for(var l,o=t.split(" "),n="",r=[],a=0,s=o.length;a<s;a++)l=o[a],V(n.concat(l),i).width<e?n=n.concat((""===n?"":" ")+l):""!==n?(r.push(G(e,n,i)),n=l):r.push(G(e,l,i)),n&&a===s-1&&r.push(G(e,n,i));return r}function dt(e,t,i){var l=[],o=0,n=V(t,i).width,r=t.length;if(n<=e)l.push(t);else for(var a=t.length;o<a;a--){var s=t.slice(o,a);if(V(s,i).width<=e){if(l.push(s),r===(o+=s.length))return l;a=r+1}}return l}function ht(e,t,i,l){l=V(i,l);return l.width>e||l.height>t?" ":i}function pt(e,t){return e.itemArea===t.itemArea?0:e.itemArea<t.itemArea?1:-1}function gt(e,t,i){var l=e.levelSelection;if(l)for(var o=0;o<l.length;o++)t.getAttribute("id")===l[o]||t.children[0].id===l[o]?0<t.childElementCount&&-1===t.children[0].id.indexOf("_Group")&&(t.children[0].setAttribute("class",i),P(t.childNodes[0],{border:e.selectionSettings.border,fill:e.selectionSettings.fill,opacity:e.selectionSettings.opacity})):t.setAttribute("class","")}function ct(e,t){var i=e.legendId;if(i)for(var l=0;l<i.length;l++)if("Interactive"===e.legendSettings.mode)for(var o,n=0;n<t.childElementCount;n++)t.childNodes[n].id!==i[l]&&parseFloat(t.childNodes[n].id.split("Index_")[1])!==parseFloat(i[l].split("Index_")[1])||((o=t.childNodes[n]).setAttribute("fill",e.selectionSettings.fill),o.setAttribute("opacity",e.selectionSettings.opacity),-1===o.id.indexOf("Text")?(o.setAttribute("stroke-width",e.selectionSettings.border.width.toString()),o.setAttribute("stroke",e.selectionSettings.border.color)):(o.setAttribute("stroke",null),o.setAttribute("stroke-width",null)));else{var r=document.getElementById(i[l]);A.isNullOrUndefined(r)||(r.setAttribute("fill",e.selectionSettings.fill),r.setAttribute("opacity",e.selectionSettings.opacity),-1===r.id.indexOf("Text")?(r.setAttribute("stroke",e.selectionSettings.border.color),r.setAttribute("stroke-width",e.selectionSettings.border.width.toString())):(r.setAttribute("stroke",null),r.setAttribute("stroke-width",null)))}}function D(e,t,i){for(var l,o,n=0;n<e.length;n++)l=A.isNullOrUndefined(e[n].childNodes[0])?e[n]:e[n].childNodes[0],o=i.layout.renderItems[parseFloat(l.id.split("_Item_Index_")[1])].options,P(l,o),e[n].classList.remove(t),--n}function P(e,t){e.setAttribute("opacity",t.opacity),A.isNullOrUndefined(t.fill)?e.setAttribute("fill","black"):e.setAttribute("fill",t.fill),e.setAttribute("stroke",t.border.color),e.setAttribute("stroke-width",t.border.width)}function mt(e,t,i){if(A.isNullOrUndefined(e))return null;for(var l=0,o=Object.keys(t);l<o.length;l++){var n=o[l];e=e.split("${"+n+"}").join(ut(t[n],i).toString())}return e}function ut(e,t){t=t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e;return t||""}var yt=function(e,t,i){this.r=e,this.g=t,this.b=i};function ft(e){return"#"+m(e.r)+m(e.g)+m(e.b)}function m(e){e=e.toString(16);return 1===e.length?"0"+e:e}function vt(e){e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return e?new yt(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)):new yt(255,255,255)}function u(e){e="transparent"===e?"white":e;var t=document.getElementById("treeMapMeasureText"),t=(t.style.color=e,(e=window.getComputedStyle(t).color).replace(/[()RGBrgba ]/g,"").split(","));return ft(new yt(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)))}function xt(e,t,i,l,o){var n=new C.SvgRenderer(""),e=St(e,i,t,o,l);return n["draw"+e.functionName](e.renderOption)}function St(e,t,i,l,o){var n,r="Path",a=t.width,s=t.height,d=e.x,h=e.y,p=e.x+-a/2,g=e.y+-s/2;switch(i){case"Circle":case"Bubble":r="Ellipse",A.merge(l,{rx:a/2,ry:s/2,cx:d,cy:h});break;case"VerticalLine":A.merge(l,{d:n="M "+d+" "+(h+s/2)+" L "+d+" "+(h+-s/2)});break;case"Diamond":A.merge(l,{d:n="M "+p+" "+h+" L "+d+" "+(h+-s/2)+" L "+(d+a/2)+" "+h+" L "+d+" "+(h+s/2)+" L "+p+" "+h+" z"});break;case"Rectangle":A.merge(l,{d:n="M "+p+" "+(h+-s/2)+" L "+(d+a/2)+" "+(h+-s/2)+" L "+(d+a/2)+" "+(h+s/2)+" L "+p+" "+(h+s/2)+" L "+p+" "+(h+-s/2)+" z"});break;case"Triangle":A.merge(l,{d:n="M "+p+" "+(h+s/2)+" L "+d+" "+(h+-s/2)+" L "+(d+a/2)+" "+(h+s/2)+" L "+p+" "+(h+s/2)+" z"});break;case"InvertedTriangle":A.merge(l,{d:n="M "+(d+a/2)+" "+(h-s/2)+" L "+d+" "+(h+s/2)+" L "+(d-a/2)+" "+(h-s/2)+" L "+(d+a/2)+" "+(h-s/2)+" z"});break;case"Pentagon":for(var c,m,u=0;u<=5;u++)c=a/2*Math.cos(Math.PI/180*(72*u)),m=a/2*Math.sin(Math.PI/180*(72*u)),n=0===u?"M "+(d+c)+" "+(h+m)+" ":n.concat("L "+(d+c)+" "+(h+m)+" ");n=n.concat("Z"),A.merge(l,{d:n});break;case"Star":n="M "+(e.x+t.width/3)+" "+(e.y-t.height/2)+" L "+(e.x-t.width/2)+" "+(e.y+t.height/6)+" L "+(e.x+t.width/2)+" "+(e.y+t.height/6)+" L "+(e.x-t.width/3)+" "+(e.y-t.height/2)+" L "+e.x+" "+(e.y+t.height/2)+" L "+(e.x+t.width/3)+" "+(e.y-t.height/2)+" Z",A.merge(l,{d:n});break;case"Cross":A.merge(l,{d:n="M "+p+" "+h+" L "+(d+a/2)+" "+h+" M "+d+" "+(h+s/2)+" L "+d+" "+(h+-s/2)});break;case"Image":r="Image",A.merge(l,{href:o,height:s,width:a,x:p,y:g})}return{renderOption:l,functionName:r}}function bt(e,t){for(var i=!1,l=0;l<e.length;l++)if(t.levelOrderName===e[l].levelOrderName){i=!0;break}return i}function It(e,t,i,l,o){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=l,this.sendData=o}function Ct(e){if(0<e.length)for(var t=0;t<e.length;t++){var i=e[t];R(i.legendEle,i.oldFill,i.oldOpacity,i.oldBorderColor,i.oldBorderWidth)}}function B(e,t){if(0<e.length)for(var i=0;i<e.length;i++)for(var l=e[i],o=parseFloat(l.legendEle.id.split("_Index_")[1]),n=-1<l.legendEle.id.indexOf("Text")?l.legendEle.id.replace("_Text",""):l.legendEle.id,r="Interactive"===t.legendSettings.mode?document.getElementById(n):document.getElementById(t.element.id+"_Legend_Shape_Index_"+o),n="Interactive"===t.legendSettings.mode?document.getElementById(n+"_Text"):document.getElementById(t.element.id+"_Legend_Text_Index_"+o),a=(A.isNullOrUndefined(r)||R(r,l.oldFill,l.oldOpacity,"none","0px"),A.isNullOrUndefined(n)||R(n,t.legendSettings.textStyle.color||t.themeStyle.legendTextColor,l.oldOpacity,null,null),A.isNullOrUndefined(l.ShapeCollection)?0:l.ShapeCollection.Elements.length),s=0;s<a;s++){var d=document.getElementById(l.ShapeCollection.Elements[s].id);A.isNullOrUndefined(d)||R(d,l.shapeOldFill,l.shapeOldOpacity,l.shapeOldBorderColor,l.shapeOldBorderWidth)}}function R(e,t,i,l,o){e.setAttribute("fill",t),e.setAttribute("opacity",i),A.isNullOrUndefined(l)||e.setAttribute("stroke",l),A.isNullOrUndefined(o)||e.setAttribute("stroke-width",o)}function Ft(e,t,i){B(e,i),D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i)}function wt(e,t,i){for(var l,o=""!==i.rangeColorValuePath?i.rangeColorValuePath:null,n=!1,r=0;r<e&&!n;r++){var a=i.treeMapLegendModule.legendCollections[r].legendData.length;if(0<a){for(var s=0;s<a;s++)if(!A.isNullOrUndefined(o)&&0<i.leafItemSettings.colorMapping.length?i.treeMapLegendModule.legendCollections[r].legendData[s].data[o]===t.data[o]:i.treeMapLegendModule.legendCollections[r].legendData[s].levelOrderName===t.levelOrderName||-1<t.levelOrderName.indexOf(i.treeMapLegendModule.legendCollections[r].legendName)){l=r,n=!0;break}}else if(i.palette&&0<i.palette.length&&(i.treeMapLegendModule.legendCollections[r].levelOrderName===t.levelOrderName||-1<t.levelOrderName.indexOf(i.treeMapLegendModule.legendCollections[r].levelOrderName))&&i.treeMapLegendModule.legendCollections[r].legendName===t.name){l=r;break}}return l}function Ot(e,t,i,l,o,n,r){e.push({legendEle:l,oldFill:r[t].legendFill,oldOpacity:r[t].opacity,oldBorderColor:r[t].borderColor,oldBorderWidth:r[t].borderWidth,shapeElement:o,shapeOldFill:n[i].options.fill,shapeOldOpacity:n[i].options.opacity,shapeOldBorderColor:n[i].options.border.color,shapeOldBorderWidth:n[i].options.border.width})}function Lt(e,t,i,l){A.createElement("a",{attrs:{download:e+"."+t.toLocaleLowerCase(),href:i}}).dispatchEvent(new MouseEvent(l?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function Tt(e){e=document.getElementById(e);return e?A.remove(e):null}y.prototype.processLayoutPanel=function(){var e,t,i,l;this.treemap.treemapLevelData.levelsData&&0<this.treemap.treemapLevelData.levelsData.length&&(i=(A.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)||A.isNullOrUndefined(this.treemap.initialDrillDown.groupName)||(A.isNullOrUndefined(this.treemap.drilledItems)?!A.isNullOrUndefined(this.treemap.drilledItems):0!==this.treemap.drilledItems.length)?this.treemap.treemapLevelData.levelsData:this.getDrilldownData(this.treemap.treemapLevelData.levelsData[0],[]))[0],l=A.extend({},this.treemap.areaRect,l,!1),A.isNullOrUndefined(this.treemap.treeMapLegendModule)||A.isNullOrUndefined(this.treemap.totalRect)||"Float"!==this.treemap.legendSettings.position&&(l=this.treemap.totalRect),A.isNullOrUndefined(this.treemap.currentLevel)||(A.isNullOrUndefined(this.treemap.drilledItems)?A.isNullOrUndefined(this.treemap.drilledItems):0===this.treemap.drilledItems.length)?(!A.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)&&(A.isNullOrUndefined(this.treemap.drilledItems)?A.isNullOrUndefined(this.treemap.drilledItems):0===this.treemap.drilledItems.length)&&(this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex),this.calculateLayoutItems(i||this.treemap.treemapLevelData.levelsData[0],l)):(i=this.treemap.drilledItems.length-1,e=this.treemap.drilledItems[i].data,(t={})[this.treemap.drilledItems[i].data.groupName]=[e],A.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)||this.treemap.enableBreadcrumb||(this.treemap.currentLevel=this.treemap.drilledItems[i].data.groupIndex),this.calculateLayoutItems(t||this.treemap.treemapLevelData.levelsData[0],l)),this.renderLayoutItems())},y.prototype.getDrilldownData=function(e,t){var i=this.treemap,l={},o=H(e).values;if(o&&0<o.length&&0===t.length){for(var n=0;n<o.length;n++)o[n].groupIndex===i.initialDrillDown.groupIndex&&o[n].name===i.initialDrillDown.groupName&&(o[n].isDrilled=!0,l[o[n].groupName]=[o[n]],t.push(l));for(var r=0;r<o.length;r++)this.getDrilldownData(o[r],t)}return t},y.prototype.calculateLayoutItems=function(e,t){this.renderItems=[],this.parentData=[],A.isNullOrUndefined(this.treemap.weightValuePath)||(-1<this.treemap.layoutType.indexOf("SliceAndDice")?this.computeSliceAndDiceDimensional(e,t):(t.height=t.height+t.y,t.width=t.width+t.x,this.computeSquarifyDimensional(e,t)))},y.prototype.computeSliceAndDiceDimensional=function(e,t){var i,l,o,n=this.treemap.leafItemSettings,r=this.treemap.levels,a=H(e).values;if(a&&0<a.length&&(this.sliceAndDiceProcess(a,t),0<this.treemap.levels.length))for(var s=0;s<a.length;s++)o=a[s].groupIndex,l=0===r.length||o===r.length?n.gap:r[o].groupGap,o=0===r.length?0:r[o]?r[o].showHeader?r[o].headerHeight:0:r[o-1].showHeader?r[o-1].headerHeight:0,i=a[s].rect,i=new j(i.x+l/2,i.y+(o+l/2),i.width-l,Math.abs(i.height-(l+o))),this.computeSliceAndDiceDimensional(a[s],i);return e},y.prototype.sliceAndDiceProcess=function(e,t){var i,l=t.height*t.width,o=this.treemap.levels,n=0,r=0,a=(e.forEach(function(e){r+=e.weight}),e.forEach(function(e){e.weightArea=l*e.weight/r}),"SliceAndDiceAuto"===this.treemap.layoutType?t.width>t.height:"SliceAndDiceHorizontal"===this.treemap.layoutType);e.sort(We);for(var s=0;s<e.length;s++){var d=e[s];d.isLeafItem=0===o.length||(this.treemap.isHierarchicalData||A.isNullOrUndefined(this.treemap.leafItemSettings.labelPath)?d.groupIndex===o.length-1:d.groupIndex===this.treemap.levels.length),a?(i=l/r*e[s].weight/t.height,n<=t.width&&(e[s].rect=new j(n+t.x,t.y,i,t.height))):(i=l/r*e[s].weight/t.width,n<=t.height&&(e[s].rect=new j(t.x,n+t.y,t.width,i))),n+=i,this.renderItems.push(e[s])}},y.prototype.computeSquarifyDimensional=function(e,t){var i,l,o,n,r=this.treemap.leafItemSettings,a=this.treemap.levels,s=H(e).values;if(s&&0<s.length&&(0===this.parentData.length&&(this.parentData=[],this.parentData.push(s)),this.calculateChildrenLayout(e,s,t),0<this.treemap.levels.length))for(var d=0;d<s.length;d++)n=(l=s[d]).groupIndex,i=l.rect,o=(l.isLeafItem?r.padding:a[n].groupPadding)/2,n=this.treemap.isHierarchicalData?(0!==n||!l.isLeafItem)&&a[n]&&a[n].showHeader?a[n].headerHeight:0:0!==a.length&&a[n]&&a[n].showHeader?a[n].headerHeight:0,i=new j(i.x+o,i.y+(n+o),i.width-o,i.height-o),!l.isLeafItem&&0<l.weight&&this.computeSquarifyDimensional(s[d],i)},y.prototype.calculateChildrenLayout=function(e,t,i){this.computeTotalArea(t,Ye(i)),t.sort(pt),this.performRowsLayout(t,[],i,[])},y.prototype.performRowsLayout=function(e,t,i,l){var o=e.length;if(0===o)return h=this.getCoordinates(t,i),l.concat(h);var n=Ze(i),r=e[0],o=e.slice(1,o);if(this.aspectRatio(t,r,n))return n=t.concat(r),this.performRowsLayout(o,n,i,l);for(var a=t.length,s=0,d=0;d<a;d+=1)s+=t[d].itemArea;var r=this.cutArea(i,s),h=this.getCoordinates(t,i),o=l.concat(h);return this.performRowsLayout(e,[],r,o)},y.prototype.aspectRatio=function(e,t,i){return 0===e.length||(t=e.concat(t),e=this.findMaxAspectRatio(e,i),this.findMaxAspectRatio(t,i)<=e)},y.prototype.findMaxAspectRatio=function(e,t){for(var i=e.length,l=1/0,o=-1/0,n=0,r=0;r<i;r+=1){var a=e[r].itemArea;a<l&&(l=a),o<a&&(o=a),n+=a}return Math.max(Math.pow(t,2)*o/Math.pow(n,2),Math.pow(n,2)/(Math.pow(t,2)*l))},y.prototype.cutArea=function(e,t){var i,e=Qe(e),l=e.width,o=e.height,n=e.x,e=e.y;return $e(o<=l?{x:n+(i=t/o),y:e,width:l-i,height:o}:{x:n,y:e+(i=t/l),width:l,height:o-i})},y.prototype.getCoordinates=function(e,t){for(var i=Qe(t),l=i.width,o=i.height,n=i.x,i=i.y,r=e.length,a=this.treemap.levels,s=this.treemap.leafItemSettings,d=0,h=0;h<r;h+=1)d+=e[h].itemArea;for(var p,g,c=d/o,m=d/l,u=n,y=i,f=[],h=0;h<r;h+=1){var v,x=e[h],S=x.groupIndex;x.isLeafItem=0===a.length||(this.treemap.isHierarchicalData||!A.isNullOrUndefined(s.labelPath))&&S===a.length,g=(p=bt(this.parentData[0],x))?this.treemap.areaRect:x.parent.rect,S=x.isLeafItem?s.padding:a[S].groupPadding,o<=l?(v=y+x.itemArea/c,x.rect={x:u,y:y,width:u+c,height:v},y=v):(v=u+x.itemArea/m,x.rect={x:u,y:y,width:v,height:y+m},u=v),0<x.weight&&(p||Math.round(t.y+S/2)<=Math.round(g.y+(g.height-g.y))&&Math.round(t.x+S/2)<=Math.round(g.x+(g.width-g.x)))&&(this.renderItems.push(x),f.push(x))}return f},y.prototype.computeTotalArea=function(e,t){for(var i=e.length,l=[],o=0;o<i;o+=1){for(var n=e.length,r=0,a=0;a<n;a+=1)r+=e[a].weight;for(var s=t/r,d=void 0,h=0;h<n;h++)(d=e[h]).itemArea=d.weight*s,l.push(d)}return l},y.prototype.onDemandProcess=function(e){var t,i=e[0].parent;this.treemap.currentLevel=i.isDrilled?i.groupIndex:null;for(var l={},o=(A.isNullOrUndefined(i.groupName)?l=i:l[i.groupName]=[i],t=A.extend({},this.treemap.areaRect,t,!1),A.isNullOrUndefined(this.treemap.treeMapLegendModule)||A.isNullOrUndefined(this.treemap.totalRect)||(t=this.treemap.totalRect),this.treemap.levels.length),n=0;n<o;n++)o===e[0].groupIndex?this.treemap.levels[o]=this.treemap.levels[n]:this.treemap.levels.splice(o-1,1);this.calculateLayoutItems(l,t),this.renderLayoutItems()},y.prototype.renderLayoutItems=function(){for(var a,s,d,h,p,g,c,m,u,y,f,v,x,S,b,I,C,F,w=this,O=this.treemap,L=(this.renderer=O.renderer,O.element.id),e=O.layoutType,T=this.treemap.leafItemSettings.interSectAction,M="",N=document.getElementById(O.element.id+"_Secondary_Element"),_=O.levels,E=(this.layoutGroup=this.renderer.createGroup({id:L+"_TreeMap_"+e+"_Layout"}),A.createElement("div",{id:O.element.id+"_Label_Template_Group",className:"template"})),D=(E.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+O.areaRect.y+"px;left:"+O.areaRect.x+"px;height:"+O.areaRect.height+"px;width:"+O.areaRect.width+"px;",!1),P=O.leafItemSettings,B=this,t=0;t<this.renderItems.length;t++)!function(e){if(m=B.renderItems[e],h=m.groupIndex,B.treemap.drillDownView&&A.isNullOrUndefined(B.treemap.currentLevel)&&0<h||B.treemap.drillDownView&&h>B.treemap.currentLevel+1)return;g=m.rect,D=m.isLeafItem,f=L+"_Level_Index_"+h+"_Item_Index_"+e,S=B.renderer.createGroup({id:f+"_Group"}),C=(D?P.gap:_[h].groupGap)/2;var t,e=B.treemap.totalRect?O.legendSettings.visible?B.treemap.totalRect:Qe(B.treemap.totalRect):B.treemap.areaRect;"Squarified"===O.layoutType&&(g.width=Math.abs(g.x-g.width)-C,g.height=Math.abs(g.y-g.height)-C),"TopRightBottomLeft"===O.renderDirection?g.x=e.x+e.width-g.width-Math.abs(e.x-g.x):"BottomLeftTopRight"===O.renderDirection?g.y=e.y+e.height-g.height-Math.abs(e.y-g.y):"BottomRightTopLeft"===O.renderDirection&&(g.x=e.x+e.width-g.width-Math.abs(e.x-g.x),g.y=e.y+e.height-g.height-Math.abs(e.y-g.y)),C=B.getItemColor(D,m),c=C.fill,y=C.opacity,C=D?P.labelFormat:_[h].headerFormat,s=D?P.showLabels:_[h].showHeader,t=h===B.treemap.currentLevel?B.treemap.enableBreadcrumb?(F="#"+B.treemap.breadcrumbConnector+"#",t=m.levelOrderName.replace(/#/gi,F),0!==h?"#"+t:t):m.name:(B.treemap.enableBreadcrumb&&(m.isDrilled=!1),m.name),u=mt(C,m.data,B.treemap)||t||"undefined",C=H(m).values,u=!D&&C&&0<C.length&&B.treemap.enableDrillDown?m.isDrilled?O.enableRtl?u+" [-]":"[-] "+u:O.enableRtl?u+" [+]":"[+] "+u:u,O.enableHtmlSanitizer&&(u=A.SanitizeHtmlHelper.sanitize(u));var e=(D?P.labelStyle:_[h].headerStyle).fontFamily||B.treemap.themeStyle.labelFontFamily,i=(D?P.labelStyle:_[h].headerStyle).size||B.treemap.themeStyle.labelFontSize,l=(D?P.labelStyle:_[h].headerStyle).fontWeight||B.treemap.themeStyle.fontWeight,o=(D?P.labelStyle:_[h].headerStyle).color,n=(D?P.labelStyle:_[h].headerStyle).fontStyle,r=(D?P.labelStyle:_[h].headerStyle).opacity;x={fontFamily:e,size:i,fontWeight:l,color:o,fontStyle:n,opacity:r},I=(D?P:_[h]).border,a=D?P.labelPosition:"Near"===_[h].headerAlignment?"TopLeft":"Center"===_[h].headerAlignment?"TopCenter":"TopRight",p=(D?P:_[h]).templatePosition,b=D?P.labelTemplate:_[h].headerTemplate,m.options={border:I,opacity:y,fill:c},d={cancel:!1,name:U,treemap:B.treemap,text:u,currentItem:m,RenderItems:B.renderItems,options:m.options,textColor:x.color},B.treemap.trigger(U,d,function(e){e.cancel||(M=" M "+g.x+" "+g.y+" L "+(g.x+g.width)+" "+g.y+" L "+(g.x+g.width)+" "+(g.y+g.height)+" L "+g.x+" "+(g.y+g.height)+"z",v=new z(f+"_RectPath",c,I.width,I.color,y,null,M),e=w.renderer.drawPath(v),S.appendChild(e),s&&(d.text!==u&&(d.text=mt(d.text,m.data,w.treemap)||t),x.color=d.textColor||x.color,w.renderItemText(d.text.toString(),S,x,g,T,f,c,a,F)),b&&(v=w.renderTemplate(N,f,g,p,b,m,D),A.isNullOrUndefined(v)||(E.appendChild(v),w.treemap.renderReactTemplates())),S.setAttribute("aria-label",m.name),w.treemap.enableDrillDown&&!D||w.treemap.selectionSettings.enable||w.treemap.highlightSettings.enable?(S.setAttribute("role","button"),S.setAttribute("tabindex",w.treemap.tabIndex.toString()),S.style.outline="none",S.style.cursor=(!w.treemap.highlightSettings.enable||w.treemap.selectionSettings.enable||!w.treemap.enableDrillDown||m.groupIndex!==w.treemap.levels.length-1)&&(!w.treemap.highlightSettings.enable||w.treemap.selectionSettings.enable||w.treemap.enableDrillDown)?"pointer":"default"):S.setAttribute("role","region"),gt(w.treemap,S,"treeMapSelection"),w.layoutGroup.appendChild(S))})}(t);0<E.childNodes.length&&N.appendChild(E),this.treemap.svgObject.appendChild(this.layoutGroup),gt(this.treemap,this.layoutGroup,"treeMapSelection")},y.prototype.renderItemText=function(e,t,i,l,o,n,r,a,s){var d=[],h=0,p=-1!==e.indexOf("<br>")?e.split("<br>"):null,g=this.labelInterSectAction(l,e,i,o),c=V(p&&p[0]||g[0],i),e=(this.treemap.enableRtl&&(x=V(e,i),v=e.search("[+]")||e.search("[-]"),l.width<x.width)&&0<v&&(x=e.substring(v-1,e.length),v=V("[+]",i),g[0]=G(l.width-v.width-5,g[0],i)+x),Xe(l,a,c,"Text",this.treemap));if(!A.isNullOrUndefined(p)){for(var m,u=[],y=[],f=0;f<p.length;f++)h+=(c=V(m=G(l.width-5,p[f],i),i)).height,y.push(c.width),u.push(m);g=u,c.width=Math.max.apply(null,y),c.height=h}if("WrapByWord"===o||"Wrap"===o||"Trim"===o){for(var v,x,S=0;S<g.length;S++)h+=(c=V(g[S],i)).height,l.height-5>h&&d.push(g[S]);"Wrap"===o&&g.length!==d.length&&d.length&&(x=(x=d[v=d.length-1]).substring(0,x.length-1)+"...",d.splice(v),"..."!==x)&&d.push(x)}else a=g,d.push(a);Ue(new T(n+"_Text",e.x,e.y,"start",d,"","",s),i,i.color||this.getSaturatedColor(r),t)},y.prototype.getItemColor=function(e,t){var i=this.treemap,l=(e?i.leafItemSettings:i.levels[t.groupIndex]).fill,o=(e?i.leafItemSettings:i.levels[t.groupIndex]).opacity,n=(A.isNullOrUndefined(i.treemapLevelData.defaultLevelsData)||0<i.treemapLevelData.defaultLevelsData.length&&(i.treemapLevelData.levelsData=i.treemapLevelData.defaultLevelsData),H(i.treemapLevelData.levelsData[0]).values),e=(e?i.leafItemSettings:i.levels[t.groupIndex]).colorMapping;if(0<e.length){e=et(e,t.data[i.equalColorValuePath],t.data[i.rangeColorValuePath]);A.isNullOrUndefined(e)||(l=(A.isNullOrUndefined(e.fill)?i.leafItemSettings:e).fill,o=e.opacity)}else for(var r=0;r<n.length;r++)n[r].levelOrderName===t.levelOrderName.split("#")[0]&&(l=A.isNullOrUndefined(l)?A.isNullOrUndefined(i.colorValuePath)?A.isNullOrUndefined(t.options)?!A.isNullOrUndefined(i.palette)&&0<i.palette.length?i.palette[r%i.palette.length]:"#808080":t.options.fill:n[r].data[i.colorValuePath]:l);return{fill:l,opacity:o}},y.prototype.getSaturatedColor=function(e){var t=e,e=vt(u("transparent"===e?window.getComputedStyle(document.body,null).backgroundColor:t));return 128<=Math.round((299*e.r+587*e.g+114*e.b)/1e3)?"black":"white"},y.prototype.renderTemplate=function(e,t,i,l,o,n,r){var a,t=r?t+"_LabelTemplate":t+"_HeaderTemplate",r=r?"_LabelTemplate":"_HeaderTemplate";if(A.isNullOrUndefined(o.prototype)&&"string"==typeof o)for(var s=Object.keys(n.data),d=0;d<s.length;d++){var h=RegExp;o=o.replace(new h("{{:"+s[d]+"}}","g"),n.data[s[d].toString()])}return this.treemap.enableHtmlSanitizer&&"string"==typeof o&&(o=A.SanitizeHtmlHelper.sanitize(o)),A.isNullOrUndefined(document.getElementById(this.treemap.element.id+"_Secondary_Element"))||(i=Xe(i,l,Je(a=qe(Ge(o)(n.data,this.treemap,o,this.treemap.element.id+r,!1),t,n.data),e),"Template",this.treemap),a.style.left=i.x+"px",a.style.top=i.y+"px"),a},y.prototype.labelInterSectAction=function(e,t,i,l){var o,n=e.width-10;switch(l){case"Hide":o=[ht(n,e.height,t,i)];break;case"Trim":o=[G(3+n,t,i)];break;case"WrapByWord":o=st(n,t,i);break;case"Wrap":o=dt(n,t,i)}return o},y.prototype.destroy=function(){this.treemap=null,this.currentRect=null,this.layoutGroup=null,this.renderer=null,this.renderItems=[],this.parentData=[]};var Mt=y;function y(e){this.treemap=e}function Nt(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"bootstrapdark":case"fabricdark":case"materialdark":t={backgroundColor:i,titleFontColor:"#FFFFFF",titleFontWeight:"Normal",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#DADADA",legendTextColor:"#DADADA",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",labelFontFamily:ne,legendBorderColor:"#000000",legendBorderWidth:0};break;case"highcontrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontWeight:"Normal",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",labelFontFamily:ne,fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",titleFontColor:"#212529",titleFontWeight:"Normal",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"HelveticaNeue",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind":t={backgroundColor:"transparent",titleFontColor:"#374151",titleFontWeight:"Normal",subTitleFontColor:"#374151",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#374151",legendTextColor:"#374151",fontFamily:"Inter",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwinddark":t={backgroundColor:"transparent",titleFontColor:"#D1D5DB",titleFontWeight:"Normal",subTitleFontColor:"#D1D5DB",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#D1D5DB",legendTextColor:"#D1D5DB",fontFamily:"Inter",fontWeight:"Normal",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind3":t={backgroundColor:"transparent",titleFontColor:"#111827",titleFontWeight:"600",subTitleFontColor:"#111827",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#111827",legendTextColor:"#111827",fontFamily:"Inter",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind3dark":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Inter",fontWeight:"400",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap5":t={backgroundColor:"transparent",titleFontColor:"#212529",titleFontWeight:"400",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"10px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap5dark":t={backgroundColor:"transparent",titleFontColor:"#DEE2E6",titleFontWeight:"400",subTitleFontColor:"#DEE2E6",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#212529",tooltipFontSize:"12px",tooltipFillOpacity:.9,legendTitleColor:"#DEE2E6",legendTextColor:"#DEE2E6",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"10px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",titleFontWeight:"Normal",subTitleFontColor:"#201F1E",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#323130",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#201F1E",legendTextColor:"#201F1E",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",titleFontWeight:"Normal",subTitleFontColor:"#F3F2F1",tooltipFillColor:"#252423",tooltipFontColor:"#F3F2F1",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#F3F2F1",legendTextColor:"#F3F2F1",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"material3":t={backgroundColor:"transparent",titleFontColor:"#1C1B1F",titleFontWeight:"500",subTitleFontColor:"#1C1B1F",tooltipFillColor:"#313033",tooltipFontColor:"#F4EFF4",tooltipFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#1C1B1F",legendTextColor:"#49454E",fontFamily:"Roboto",fontSize:"16px",fontWeight:"400",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"Roboto",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"material3dark":t={backgroundColor:"transparent",titleFontColor:"#E6E1E5",titleFontWeight:"500",subTitleFontColor:"#E6E1E5",tooltipFillColor:"#E6E1E5",tooltipFontColor:"#313033",tooltipFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#E6E1E5",legendTextColor:"#CAC4D0",fontFamily:"Roboto",fontSize:"16px",fontWeight:"400",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"Roboto",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2":t={backgroundColor:"transparent",titleFontColor:"#242424",titleFontWeight:"600",subTitleFontColor:"#242424",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#242424",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#242424",legendTextColor:"#242424",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2dark":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#292929",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2highcontrast":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#FFF",legendBorderWidth:1,tooltipBorderColor:"#FFF",tooltipBorderWidth:1};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontWeight:"Normal",subTitleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#353535",legendTextColor:"#353535",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",labelFontFamily:ne,legendBorderColor:"#000000",legendBorderWidth:0}}return t}(e.Theme||(e.Theme={})).mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"};Et.prototype.print=function(e,t){var i=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),l=(i.moveTo(0,0),i.resizeTo(screen.availWidth,screen.availHeight),{cancel:!1,htmlContent:this.getHTMLContent(e,t),name:E});e.trigger(E,l,function(){l.cancel||A.print(l.htmlContent,i)})},Et.prototype.getHTMLContent=function(e,t){var i,l,o=A.createElement("div");return t?t instanceof Array?t.forEach(function(e){o.appendChild(Ae(e).cloneNode(!0))}):t instanceof Element?o.appendChild(t.cloneNode(!0)):o.appendChild(Ae(t).cloneNode(!0)):(l=(t=e.element.cloneNode(!0)).getElementsByTagName("svg")[0],A.isNullOrUndefined(l)||(l=l.childNodes[0],A.isNullOrUndefined(l))||(i=l.getAttribute("fill"),"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==i&&"transparent"!==i?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==i&&"transparent"!==i||l.setAttribute("fill","rgba(0, 0, 0, 1)"):l.setAttribute("fill","rgba(255,255,255, 1)")),o.appendChild(t)),o},Et.prototype.getModuleName=function(){return"Print"},Et.prototype.destroy=function(){};var _t=Et;function Et(e){}Pt.prototype.export=function(d,h,p,g){return new Promise(function(e,t){var i,l,o=A.createElement("canvas",{id:"ej2-canvas",attrs:{height:d.availableSize.height.toString(),width:d.availableSize.width.toString()}}),n=d.svgObject.cloneNode(!0),r=n.childNodes[0],a=(A.isNullOrUndefined(r)||(r=r.getAttribute("fill"),"Tailwind"!==d.theme&&"Tailwind3"!==d.theme&&"Bootstrap5"!==d.theme&&"Fluent"!==d.theme&&"Material3"!==d.theme&&"Fluent2"!==d.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r?"TailwindDark"!==d.theme&&"Tailwind3Dark"!==d.theme&&"Bootstrap5Dark"!==d.theme&&"FluentDark"!==d.theme&&"Material3Dark"!==d.theme&&"Fluent2Dark"!==d.theme&&"Fluent2HighContrast"!==d.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r||n.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):n.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")),!(-1<A.Browser.userAgent.toString().indexOf("HeadlessChrome"))),r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+n.outerHTML+"</svg>",s=window.URL.createObjectURL(new Blob("SVG"===h?[r]:[(new XMLSerializer).serializeToString(n)],{type:"image/svg+xml"}));"SVG"===h?g?Lt(p,h,s,a):e(null):(i=new Image,l=o.getContext("2d"),i.onload=function(){l.drawImage(i,0,0),window.URL.revokeObjectURL(s),g?Lt(p,h,o.toDataURL("image/png").replace("image/png","image/octet-stream"),a):"JPEG"===h?e(o.toDataURL("image/jpeg")):"PNG"===h&&e(o.toDataURL("image/png"))},i.src=s)})},Pt.prototype.getModuleName=function(){return"ImageExport"},Pt.prototype.destroy=function(){};var Dt=Pt;function Pt(e){}zt.prototype.export=function(s,e,d,h,p){return new Promise(function(i,e){var l=A.createElement("canvas",{id:"ej2-canvas",attrs:{width:s.availableSize.width.toString(),height:s.availableSize.height.toString()}}),t=(h=A.isNullOrUndefined(h)?w.PdfPageOrientation.Landscape:h,s.svgObject.cloneNode(!0)),o=t.childNodes[0],n=(A.isNullOrUndefined(o)||(o=o.getAttribute("fill"),"Tailwind"!==s.theme&&"Tailwind3"!==s.theme&&"Bootstrap5"!==s.theme&&"Fluent"!==s.theme&&"Material3"!==s.theme&&"Fluent2"!==s.theme||"rgba(255,255,255, 0.0)"!==o&&"transparent"!==o?"TailwindDark"!==s.theme&&"Tailwind3Dark"!==s.theme&&"Bootstrap5Dark"!==s.theme&&"FluentDark"!==s.theme&&"Material3Dark"!==s.theme&&"Fluent2Dark"!==s.theme&&"Fluent2HighContrast"!==s.theme||"rgba(255,255,255, 0.0)"!==o&&"transparent"!==o||t.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):t.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")),window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(t)],{type:"image/svg+xml"}))),r=new Image,a=l.getContext("2d");r.onload=function(){a.drawImage(r,0,0),window.URL.revokeObjectURL(n);var e=new w.PdfDocument,t=l.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");e.pageSettings.orientation=h,t=t.slice(t.indexOf(",")+1),e.pages.add().graphics.drawImage(new w.PdfBitmap(t),0,0,s.availableSize.width-60,s.availableSize.height),p?(e.save(d+".pdf"),e.destroy()):i(null)},r.src=n})},zt.prototype.getModuleName=function(){return"PdfExport"},zt.prototype.destroy=function(){};var Bt=zt;function zt(e){}Ht=function(e,t){return(Ht=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var Ht,Rt,i=function(e,t){function i(){this.constructor=e}Ht(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},f=function(e,t,i,l){var o,n=arguments.length,r=n<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,l);else for(var a=e.length-1;0<=a;a--)(o=e[a])&&(r=(n<3?o(r):3<n?o(t,i,r):o(t,i))||r);return 3<n&&r&&Object.defineProperty(t,i,r),r},i=(Rt=A.Component,i(v,Rt),v.prototype.preRender=function(){var e=this;this.trigger(N,{treemap:this},function(){e.initPrivateVariable(),e.unWireEVents(),e.createSvg(),e.wireEVents(),e.setCulture()})},v.prototype.render=function(){this.renderElements()},v.prototype.renderElements=function(){this.treemapLevelData=new Ut,this.treemapLevelData.levelsData=null,this.treemapLevelData.defaultLevelsData=null,this.treemapLevelData.hierarchyData=null,this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=Nt(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),A.isNullOrUndefined(this.treemapLevelData.levelsData)||(this.treemapLevelData.defaultLevelsData=this.treemapLevelData.levelsData),this.processDataManager()},v.prototype.processDataManager=function(){var e,t,l=this;this.dataSource instanceof F.DataManager?(e=this.dataSource,t=this.query instanceof F.Query?this.query:new F.Query,e.executeQuery(t).then(function(e){l.dataSource=e.result,l.renderTreeMapElements()})):this.dataSource instanceof It?(e=this.dataSource,(t=new A.Fetch(e.dataOptions,e.type,e.contentType)).onSuccess=function(e){var t,i;A.isNullOrUndefined(e.type)||"application/octet-stream"!==e.type?(l.dataSource=e,l.renderTreeMapElements()):(t=new FileReader,i=l,t.onload=function(){e=JSON.parse(t.result.toString()),i.dataSource=e,i.renderTreeMapElements()},t.readAsText(e))},t.send(e.sendData)):this.renderTreeMapElements()},v.prototype.renderTreeMapElements=function(){this.processingData(),this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.renderLegend(),this.layout.processLayoutPanel(),this.element.appendChild(this.svgObject),!A.isNullOrUndefined(this.treeMapLegendModule)&&this.legendSettings.visible&&ct(this,this.treeMapLegendModule.legendGroup),this.elementChange(),this.trigger(_,{treemap:this,isResized:this.isResize}),this.isResize=!1,this.renderComplete()},v.prototype.createSvg=function(){if(this.svgObject){for(;0<this.svgObject.childNodes.length;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&A.remove(this.svgObject)}A.isNullOrUndefined(this.renderer)&&(this.renderer=new C.SvgRenderer(this.element.id)),A.isNullOrUndefined(this.layout)&&(this.layout=new Mt(this)),this.clearTemplate();var e=this.element.clientWidth,t=this.element.clientHeight;this.availableSize=new W(Be(this.width,e)||e||600,Be(this.height,t)||t||450),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},v.prototype.initPrivateVariable=function(){var e;""===this.element.id&&(e=document.getElementsByClassName("e-treemap").length,this.element.id="treemap_control_"+e),this.renderer=new C.SvgRenderer(this.element.id),this.layout=new Mt(this)},v.prototype.createSecondaryElement=function(){var e=document.getElementById(this.element.id+"_Secondary_Element");e&&0<e.childElementCount&&e.parentNode.removeChild(e),A.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))&&((e=A.createElement("div",{id:this.element.id+"_Secondary_Element"})).style.cssText="position: absolute;z-index:1;",this.element.appendChild(e))},v.prototype.elementChange=function(){this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.legendGroup&&this.layout.layoutGroup&&!A.isNullOrUndefined(this.svgObject)&&!A.isNullOrUndefined(document.getElementById(this.layout.layoutGroup.id))&&!A.isNullOrUndefined(document.getElementById(this.treeMapLegendModule.legendGroup.id))&&this.svgObject.insertBefore(this.layout.layoutGroup,this.treeMapLegendModule.legendGroup)},v.prototype.renderBorder=function(){var e=this.border.width,t=this.svgObject.querySelector("#"+this.element.id+"_TreeMap_Border");(0<this.border.width||this.background||this.themeStyle.backgroundColor)&&A.isNullOrUndefined(t)?(e=new L(this.element.id+"_TreeMap_Border",this.background||this.themeStyle.backgroundColor,this.border,1,new j(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e)),this.svgObject.appendChild(this.renderer.drawRectangle(e))):t&&t.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},v.prototype.renderTitle=function(e,t,i,l){var o,n,r,a,s={color:e.textStyle.color,size:e.textStyle.size,fontFamily:e.textStyle.fontFamily,fontStyle:e.textStyle.fontStyle,fontWeight:e.textStyle.fontWeight,opacity:e.textStyle.opacity},d=this.availableSize.width-this.margin.right-this.margin.left;s.fontFamily=s.fontFamily||this.themeStyle.fontFamily,s.fontWeight=s.fontWeight||this.themeStyle.titleFontWeight,s.size=s.size||("title"===t?this.themeStyle.fontSize:this.themeStyle.subtitleFontSize),e.text?(A.isNullOrUndefined(l)&&(l=this.renderer.createGroup({id:this.element.id+"_Title_Group"})),a=V(r=G(d,n=this.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(e.text):e.text,s),s),i=He(A.isNullOrUndefined(i)?new j(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):i,e.alignment,a,t),r=new T(this.element.id+"_TreeMap_"+t,i.x,i.y,"start",r),i=new j(i.x,i.y,a.width,a.height),(a=Ue(r,s,s.color||("title"===t?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),l)).setAttribute("aria-label",e.description||n),a.setAttribute("role","region"),a.setAttribute("tabindex",this.tabIndex.toString()),("title"!==t||e.subtitleSettings.text)&&"subtitle"!==t||(o=this.availableSize.height-i.y-10-this.margin.bottom,this.areaRect=new j(this.margin.left,i.y+10,d,o)),"subtitle"!==t&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",i,l):this.svgObject.appendChild(l)):(o=this.availableSize.height-this.margin.top-this.margin.bottom,this.areaRect=new j(this.margin.left,this.margin.top,d,o))},v.prototype.processingData=function(){var t=this;if(this.dataSource=this.dataSource,!A.isNullOrUndefined(this.dataSource)&&0<this.dataSource.length&&this.weightValuePath){if(this.treemapLevelData.levelsData=[],this.dataSource.map(function(e){e[t.weightValuePath]=e[t.weightValuePath]&&e[t.weightValuePath].toString()}),this.leafItemSettings.labelPath=this.leafItemSettings.labelPath||this.weightValuePath,this.checkIsHierarchicalData(),0===this.levels.length){var i={level:0},l=this.leafItemSettings.labelPath;i[l]=[];for(var e=0;e<this.dataSource.length;e++){var o=H(this.dataSource[e]).values;this.isHierarchicalData&&o&&0<o.length?o.forEach(function(e){e[l]&&i[l].push({groupIndex:0,name:e[l],levelOrderName:e[l].toString(),data:e,weight:e[t.weightValuePath]})}):this.dataSource[e][l]&&i[l].push({groupIndex:0,name:this.dataSource[e][l],levelOrderName:this.dataSource[e][l].toString(),data:this.dataSource[e],weight:this.dataSource[e][this.weightValuePath]})}this.treemapLevelData.levelsData.push(i)}else{if(this.isHierarchicalData){this.treemapLevelData.hierarchyData=[],this.treemapLevelData.hierarchyData=A.extend([],this.dataSource,this.treemapLevelData.hierarchyData,!0);for(e=0;e<this.treemapLevelData.hierarchyData.length;e++)this.processHierarchicalData(this.treemapLevelData.hierarchyData[e],e);this.treemapLevelData.levelsData=this.treemapLevelData.hierarchyData}else this.processFlatJsonData(),1<this.treemapLevelData.levelsData.length&&this.reOrderLevelData(this.treemapLevelData.levelsData.length-1);l=this.levels[0].groupPath}this.isHierarchicalData||this.findTotalWeight(this.treemapLevelData.levelsData[0][l],"Parent")}},v.prototype.checkIsHierarchicalData=function(){var e;this.dataSource=this.dataSource;for(var t=0;t<this.dataSource.length;t++){if((e=H(this.dataSource[t]).values)&&e.length){this.isHierarchicalData=!0;break}t===this.dataSource.length-1&&(this.isHierarchicalData=!1)}},v.prototype.processHierarchicalData=function(e,t){var i,l=this,o={},n=this.leafItemSettings.labelPath||this.weightValuePath,r=(o=H(e))?o.values:null;if(r&&0<r.length){for(var a=o.key,s=0;s<this.levels.length;s++)a===this.levels[s].groupPath&&(i=s);for(var d=0;d<r.length;d++){r[d].name=r[d][n],r[d].levelOrderName=(0===i?r[d].name:e.levelOrderName+"#"+r[d].name)+"";var h=r[d].levelOrderName,p=void 0;0<h.search("#")&&(p=h.split("#").length-1),r[d].groupIndex=A.isNullOrUndefined(i)?p===this.levels.length?this.levels.length:p:i,0!==i&&(r[d].parent=e),r[d].groupName=a,r[d].data=r[d],r[d].isDrilled=!1,r[d].weight=r[d][this.weightValuePath]}r.forEach(function(e){l.processHierarchicalData(e,t)})}if(t===this.treemapLevelData.hierarchyData.length-1){var g=this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];if(!A.isNullOrUndefined(g)){for(var c=0;c<this.treemapLevelData.hierarchyData.length;c++)r=H(this.treemapLevelData.hierarchyData[c]).values,0!==c&&r&&(r.forEach(function(e){g.push(e)}),this.treemapLevelData.hierarchyData.splice(c,1),--c);for(var g=this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath],m=0;m<g.length;m++)(o[this.levels[0].groupPath]=g)[m].parent=o}}},v.prototype.print=function(e){this.allowPrint&&this.printModule&&this.printModule.print(this,e)},v.prototype.export=function(i,l,o,n){var r=this;return A.isNullOrUndefined(n)&&(n=!0),"PDF"===i&&this.allowPdfExport&&this.pdfExportModule?new Promise(function(e,t){e(r.pdfExportModule.export(r,i,l,o,n))}):this.allowImageExport&&"PDF"!==i&&this.imageExportModule?new Promise(function(e,t){e(r.imageExportModule.export(r,i,l,n))}):null},v.prototype.processFlatJsonData=function(){this.dataSource=this.dataSource;for(var e=[],t=0;t<this.levels.length+1;t++){var i=this.levels[t]?this.levels[t].groupPath:this.leafItemSettings.labelPath,l={};l.level=t,l[i]=[],this.treemapLevelData.levelsData.push(l);for(var o=0;o<this.dataSource.length;o++){var n={},r="";if(!A.isNullOrUndefined(i)){var a=this.dataSource[o][i];if(0!==t)for(var s=0;s<=t;s++){var d=this.levels[s]?this.levels[s].groupPath:i;r+=this.dataSource[o][d]+(s===t?"":"#")}0<e.length&&-1!==e.indexOf(r||a)||(n.name=a,n.levelOrderName=(r||a)+"",n.groupIndex=t,n.isDrilled=!1,n.groupName=i,n.data=this.dataSource[o],this.treemapLevelData.levelsData[this.treemapLevelData.levelsData.length-1][i].push(n),e.push(r||a))}}}},v.prototype.reOrderLevelData=function(e){for(var t=this.levels[e]?this.levels[e].groupPath:this.leafItemSettings.labelPath,i=this.levels[e-1].groupPath,l=this.treemapLevelData.levelsData[e][t],o=this.treemapLevelData.levelsData[e-1][i],n=0;n<l.length;n++)for(var r=l[n].levelOrderName,a=0;a<o.length;a++)if(o[a][t]=A.isNullOrUndefined(o[a][t])?[]:o[a][t],this.IsChildHierarchy(r.split("#"),o[a].levelOrderName.split("#"))){A.isNullOrUndefined(l[n].parent)&&(l[n].parent=o[a]),o[a][t].push(l[n]);break}this.findTotalWeight(this.treemapLevelData.levelsData[this.treemapLevelData.levelsData.length-1][t],"Child"),this.treemapLevelData.levelsData.splice(e,1),0<e-1&&this.reOrderLevelData(e-1)},v.prototype.IsChildHierarchy=function(e,t){for(var i=!1,l=0;l<t.length;l++){if(e.length<l||t[l]!==e[l])return!1;i=!0}return i},v.prototype.findTotalWeight=function(i,e){for(var l,o,n,r=this,a={},s=this,t=0;t<i.length;t++)!function(t){l=0,n=i[t].groupName,o=i[t].levelOrderName.split("#"),s.dataSource.forEach(function(e){je(o,i[t].levelOrderName,e,r)&&(l+=parseFloat(e[r.weightValuePath]))}),"Parent"===e&&((a[n]=i)[t].parent=a),i[t].weight=l}(t)},v.prototype.unWireEVents=function(){A.EventHandler.remove(this.element,"click",this.clickOnTreeMap),A.EventHandler.remove(this.element,"dblclick",this.doubleClickOnTreeMap),A.EventHandler.remove(this.element,"contextmenu",this.rightClickOnTreeMap),A.EventHandler.remove(this.element,A.Browser.touchStartEvent,this.mouseDownOnTreeMap),A.EventHandler.remove(this.element,A.Browser.touchMoveEvent,this.mouseMoveOnTreeMap),A.EventHandler.remove(this.element,A.Browser.touchEndEvent,this.mouseEndOnTreeMap),A.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap),A.EventHandler.remove(this.element,"keydown",this.keyDownHandler),A.EventHandler.remove(this.element,"keyup",this.keyUpHandler),A.EventHandler.remove(this.element,"focusout",this.focusHandler),window.removeEventListener("resize",this.resizeEvent)},v.prototype.wireEVents=function(){A.EventHandler.add(this.element,"click",this.clickOnTreeMap,this),A.EventHandler.add(this.element,"dblclick",this.doubleClickOnTreeMap,this),A.EventHandler.add(this.element,"contextmenu",this.rightClickOnTreeMap,this),A.EventHandler.add(this.element,A.Browser.touchStartEvent,this.mouseDownOnTreeMap,this),A.EventHandler.add(this.element,A.Browser.touchMoveEvent,this.mouseMoveOnTreeMap,this),A.EventHandler.add(this.element,A.Browser.touchEndEvent,this.mouseEndOnTreeMap,this),A.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap,this),A.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),A.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),A.EventHandler.add(this.element,"focusout",this.focusHandler,this),this.resizeEvent=this.resizeOnTreeMap.bind(this),window.addEventListener("resize",this.resizeEvent),this.setStyle(this.element)},v.prototype.setStyle=function(e){e.style.overflow="hidden"},v.prototype.setCulture=function(){this.intl=new A.Internationalization},v.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"TreeMap Element"),this.element.setAttribute("role","region"),this.element.setAttribute("tabindex",this.tabIndex.toString())},v.prototype.resizeOnTreeMap=function(e){var t,i=this;this.isDestroyed||(this.isResize=!0,t={name:oe,cancel:!1,previousSize:this.availableSize,currentSize:new W(0,0),treemap:this},this.resizeTo&&clearTimeout(this.resizeTo),!A.isNullOrUndefined(this.element)&&this.element.classList.contains("e-treemap")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSvg(),i.refreshing=!0,i.wireEVents(),t.currentSize=i.availableSize,i.trigger(oe,t,function(e){i.render(),i.refreshing=!1})},500)))},v.prototype.clickOnTreeMap=function(e){var t,i=this,l=e.target,o=l.id,n=l.innerHTML,r=(this.trigger($,{cancel:!1,name:$,treemap:this,mouseEvent:e}),-1<o.indexOf("_Item_Index")&&(e.preventDefault(),r=parseFloat(o.split("_Item_Index_")[1]),r={cancel:!1,name:Z,treemap:this,item:this.layout.renderItems[r],mouseEvent:e,groupIndex:this.layout.renderItems[r].groupIndex,groupName:this.layout.renderItems[r].name,text:n,contentItemTemplate:n},this.trigger(Z,r,function(e){e.text===n&&e.contentItemTemplate===n||(A.isNullOrUndefined(i.leafItemSettings.labelTemplate)?(e.text=mt(e.text,e.item.data,e.treemap),l.textContent=e.text):ke(o,l,e.contentItemTemplate))})),(new Date).getMilliseconds());A.isNullOrUndefined(this.doubleClick)||!A.isNullOrUndefined(t)&&r-t<500&&this.doubleClickOnTreeMap(e)},v.prototype.doubleClickOnTreeMap=function(e){this.trigger(K,{cancel:!1,name:K,treemap:this,mouseEvent:e})},v.prototype.rightClickOnTreeMap=function(e){this.trigger(ee,{cancel:!1,name:ee,treemap:this,mouseEvent:e})},v.prototype.mouseDownOnTreeMap=function(e){-1<e.target.id.indexOf("_Item_Index")&&(this.mouseDown=!0),"touchstart"!==e.type&&"mousedown"!==e.type||(this.removeFocus("none"),e.preventDefault()),this.notify(A.Browser.touchStartEvent,e)},v.prototype.mouseMoveOnTreeMap=function(e){var t,i=e.target.id;this.trigger(te,{cancel:!1,name:te,treemap:this,mouseEvent:e}),this.removeFocus("none"),-1<i.indexOf("_Item_Index")?(t=H(i=this.layout.renderItems[parseFloat(i.split("_Item_Index_")[1])]).values,this.element.style.cursor=!i.isLeafItem&&t&&0<t.length&&this.enableDrillDown?"pointer":"auto",this.trigger(Q,{cancel:!1,name:Q,treemap:this,item:i,mouseEvent:e})):this.element.style.cursor="default",this.notify(A.Browser.touchMoveEvent,e)},v.prototype.calculateSelectedTextLevels=function(e,t){for(var i,l,o,n=t.levelOrderName.split("#"),r=0,a=Object.keys(n);r<a.length;r++)n[l=a[r]]===e&&(i=parseInt(l,10),o=e);return{drillLevel:i,currentLevelLabel:o,levelText:n}},v.prototype.calculatePreviousLevelChildItems=function(e,t,i){for(var l,o,n=0,r=this.layout.renderItems[0].levelOrderName.split("#").length,a=0;a<r;a++)o=0===a?e.levelText[a]:o+"#"+e.levelText[a];for(var s,n=1<r?r:n,d=0,h=Object.values(this.layout.renderItems);d<h.length;d++)(s=h[d]).levelOrderName.split("#")[0]===e.levelText[0]&&(l=0===n?A.isNullOrUndefined(o)?o:e.levelText[n]:i?o:o+"#"+e.levelText[n])===s.levelOrderName&&(this.drilledItems.push({name:s.levelOrderName,data:s}),i=!0,++n<=t.groupIndex)&&(o=l+"#"+e.levelText[n]);return i},v.prototype.compareSelectedLabelWithDrillDownItems=function(e,t,i){var l,o={};return e.drillLevel+1===this.drilledItems[i].data.groupIndex?((l=this.drilledItems[i].data.parent).isDrilled=!0,o[l[this.drilledItems[i].data.groupName]]=[l],this.drilledItems.splice(i,this.drilledItems.length)):e.drillLevel!==this.drilledItems.length-1&&e.drillLevel!==t.groupIndex||(o[t.groupName]=[t]),o},v.prototype.mouseEndOnTreeMap=function(e){var i,l,t,o=this,n=e.target,r=n.id,a=!1,s={},d=this.element.id+"_TreeMap_"+this.layoutType+"_Layout",h=this.element.id+"_Label_Template_Group";if(-1<r.indexOf("_Item_Index")&&this.enableDrillDown&&!this.drillMouseMove){e.cancelable&&e.preventDefault(),r=parseFloat(r.split("_Item_Index_")[1]),p=this.layout.renderItems[r];var r=n.textContent;if(this.enableBreadcrumb&&(t=this.calculateSelectedTextLevels(r,p),l=t.drillLevel,this.drillDownView||-1===r.search("[+]")||(a=this.calculatePreviousLevelChildItems(t,p,a))),0!==this.levels.length&&!p.isLeafItem&&H(p).values&&0<H(p).values.length){if(0<this.drilledItems.length)for(var p=a?this.drilledItems[this.drilledItems.length-1].data:p,g=0;g<this.drilledItems.length;g++){if(!A.isNullOrUndefined(l)){var c=this.drilledItems.length,s=this.compareSelectedLabelWithDrillDownItems(t,p,g);if(c!==this.drilledItems.length){--g;break}}if(p.levelOrderName===this.drilledItems[g].name&&!a&&A.isNullOrUndefined(l)){0===p.groupIndex&&p.parent[p.groupName]instanceof Array?(p.isDrilled=!p.isDrilled,p.isDrilled?s[p.groupName]=[p]:s=p.parent):(p.isDrilled=!1,p.parent.isDrilled=!0,p=p.parent,s[p.groupName]=[p]),this.drilledItems.splice(g,1),--g;break}g===this.drilledItems.length-1&&A.isNullOrUndefined(l)&&(p.isDrilled=!0,s[p.groupName]=[p])}else p.isDrilled=!0,s[p.groupName]=[p];r={cancel:!1,name:k,treemap:this,element:n,groupIndex:(this.enableBreadcrumb&&0!==this.drilledItems.length&&!A.isNullOrUndefined(l)?this.drilledItems[this.drilledItems.length-1].data:p).groupIndex,groupName:(this.enableBreadcrumb&&0!==this.drilledItems.length&&!A.isNullOrUndefined(l)?this.drilledItems[this.drilledItems.length-1].data:p).name,rightClick:3===e.which,childItems:null,item:s},this.trigger(k,r,function(e){var t;o.currentLevel=p.isDrilled&&A.isNullOrUndefined(l)?p.groupIndex:!A.isNullOrUndefined(l)&&o.enableBreadcrumb&&p.isDrilled?l:null,e.cancel||(document.getElementById(d)&&(t=document.getElementById(d)).parentNode.removeChild(t),i=A.extend({},o.areaRect,i,!0),o.legendSettings.visible&&!A.isNullOrUndefined(o.treeMapLegendModule)&&(A.isNullOrUndefined(s)||(o.treeMapLegendModule.legendGroup.textContent="",o.treeMapLegendModule.legendGroup=null,o.treeMapLegendModule.widthIncrement=0,o.treeMapLegendModule.heightIncrement=0,o.enableBreadcrumb&&!A.isNullOrUndefined(l)?o.drilledLegendItems={name:o.drilledItems[o.drilledItems.length-1].data.levelOrderName,data:o.drilledItems[o.drilledItems.length-1].data}:o.drilledLegendItems={name:p.levelOrderName,data:p},o.treeMapLegendModule.renderLegend()),i=A.isNullOrUndefined(o.totalRect)?i:o.totalRect),document.getElementById(h)&&(t=document.getElementById(h)).parentNode.removeChild(t),A.isNullOrUndefined(e.childItems)||e.cancel?(o.layout.calculateLayoutItems(s,i),o.layout.renderLayoutItems()):o.layout.onDemandProcess(e.childItems))}),n={cancel:!1,name:q,treemap:this,renderItems:this.layout.renderItems},this.trigger(q,n),!a&&A.isNullOrUndefined(l)&&this.drilledItems.push({name:p.levelOrderName,data:p})}}this.mouseDown=!1,this.notify(A.Browser.touchEndEvent,e)},v.prototype.mouseLeaveOnTreeMap=function(e){this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapLegendModule&&this.treeMapLegendModule.removeInteractivePointer(),D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&(B(this.treeMapHighlightModule.shapeHighlightCollection,this),this.treeMapHighlightModule.highLightId=""),this.removeFocus("")},v.prototype.keyUpHandler=function(e){var t;"Tab"===e.code&&(e=e.target.id,t=document.getElementById(e),-1<e.indexOf("Item_Index")||-1<e.indexOf("Legend")?(this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapHighlightModule&&this.highlightSettings.enable?(t.style.setProperty("outline","none"),t.classList.add("keyboard-focused"),e=-1<e.indexOf("_Legend_")&&"Default"===this.legendSettings.mode?t.children[0]:t,this.treeMapHighlightModule.highlightOnMouseMove(e)):(this.removeFocus(""),t.style.outline="2px solid black",t.classList.add("keyboard-focused"))):(D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&B(this.treeMapHighlightModule.shapeHighlightCollection,this),this.removeFocus("none")))},v.prototype.keyDownHandler=function(e){var t=e.target.id,i=document.getElementById(t);"Enter"===e.code&&(this.selectionSettings.enable&&(-1<t.indexOf("Item_Index")||-1<t.indexOf("Legend"))&&(t=-1<t.indexOf("_Legend_")&&"Default"===this.legendSettings.mode?i.children[0]:i,this.treeMapSelectionModule.selectionOnMouseDown(t)),this.enableDrillDown)&&0<i.childElementCount&&this.mouseEndOnTreeMap(e)},v.prototype.focusHandler=function(e){var t=e.target.id;(!this.element.contains(e.relatedTarget)||-1<t.indexOf("Item_Index")&&-1<e.relatedTarget.id.indexOf("Legend")||-1<t.indexOf("Legend")&&-1<e.relatedTarget.id.indexOf("Item_Index"))&&(this.treeMapHighlightModule&&this.highlightSettings.enable?(D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),B(this.treeMapHighlightModule.legendHighlightCollection,this),this.treeMapHighlightModule.highLightId=""):this.removeFocus("none"))},v.prototype.removeFocus=function(e){var t=document.querySelector(".keyboard-focused");t&&(t.style.outline=e,t.classList.remove("keyboard-focused"))},v.prototype.selectItem=function(e,t){A.isNullOrUndefined(t)&&(t=!0);for(var i="",l=0;l<e.length;l++)l!==e.length-1?i+=e[l]+"#":i+=e[l];this.treeMapSelectionModule&&this.selectionSettings.enable&&this.treeMapSelectionModule.selectTreemapItem(i,t)},v.prototype.requiredModules=function(){var e=[];return this.tooltipSettings.visible&&e.push({member:"treeMapTooltip",args:[this],name:"TreeMapTooltip"}),this.highlightSettings.enable&&e.push({member:"treeMapHighlight",args:[this],name:"TreeMapHighlight"}),this.selectionSettings.enable&&e.push({member:"treeMapSelection",args:[this],name:"TreeMapSelection"}),this.legendSettings.visible&&e.push({member:"treeMapLegend",args:[this],name:"TreeMapLegend"}),this.allowPrint&&e.push({member:"Print",args:[this,_t],name:"Print"}),this.allowImageExport&&e.push({member:"ImageExport",args:[this,Dt],name:"ImageExport"}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this,Bt],name:"PdfExport"}),e},v.prototype.onPropertyChanged=function(e,t){if(!this.isDestroyed){for(var i=!1,l=0,o=Object.keys(e);l<o.length;l++)switch(o[l]){case"background":this.renderBorder();break;case"height":case"width":case"layoutType":case"levels":case"drillDownView":case"renderDirection":case"leafItemSettings":case"legendSettings":case"dataSource":i=!0}i&&(this.createSvg(),this.renderElements())}},v.prototype.getModuleName=function(){return"treemap"},v.prototype.destroy=function(){this.unWireEVents(),Tt("treeMapMeasureText"),this.drilledItems=[],this.levelSelection=[],this.legendId=[],this.removeSvg(),Rt.prototype.destroy.call(this),this.areaRect=null,this.themeStyle=null,this.totalRect=null,this.drilledLegendItems=null,this.doubleTapTimer=null,this.treemapLevelData=null,this.resizeEvent=null,this.availableSize=null,this.intl=null,A.isNullOrUndefined(this.layout)||this.layout.destroy(),this.layout=null,this.renderer=null},v.prototype.removeSvg=function(){if(Tt(this.element.id+"_Secondary_Element"),this.svgObject){for(;0<this.svgObject.childNodes.length;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&A.remove(this.svgObject)}},f([A.Property(!(v.prototype.getPersistData=function(){return""}))],v.prototype,"allowPrint",void 0),f([A.Property(!1)],v.prototype,"allowImageExport",void 0),f([A.Property(!1)],v.prototype,"allowPdfExport",void 0),f([A.Property(null)],v.prototype,"width",void 0),f([A.Property(null)],v.prototype,"height",void 0),f([A.Complex({},l)],v.prototype,"border",void 0),f([A.Complex({},se)],v.prototype,"margin",void 0),f([A.Property(null)],v.prototype,"background",void 0),f([A.Property("Material")],v.prototype,"theme",void 0),f([A.Complex({},fe)],v.prototype,"titleSettings",void 0),f([A.Property("Squarified")],v.prototype,"layoutType",void 0),f([A.Property(null)],v.prototype,"dataSource",void 0),f([A.Property(null)],v.prototype,"query",void 0),f([A.Property(null)],v.prototype,"weightValuePath",void 0),f([A.Property("")],v.prototype,"rangeColorValuePath",void 0),f([A.Property("")],v.prototype,"equalColorValuePath",void 0),f([A.Property(null)],v.prototype,"colorValuePath",void 0),f([A.Property([])],v.prototype,"palette",void 0),f([A.Property("TopLeftBottomRight")],v.prototype,"renderDirection",void 0),f([A.Property(!1)],v.prototype,"enableDrillDown",void 0),f([A.Property(!1)],v.prototype,"enableBreadcrumb",void 0),f([A.Property(" - ")],v.prototype,"breadcrumbConnector",void 0),f([A.Property(!1)],v.prototype,"drillDownView",void 0),f([A.Property(!1)],v.prototype,"enableHtmlSanitizer",void 0),f([A.Complex({},Fe)],v.prototype,"initialDrillDown",void 0),f([A.Complex({},Le)],v.prototype,"leafItemSettings",void 0),f([A.Collection([],t)],v.prototype,"levels",void 0),f([A.Complex({},De)],v.prototype,"highlightSettings",void 0),f([A.Complex({},_e)],v.prototype,"selectionSettings",void 0),f([A.Complex({},Me)],v.prototype,"tooltipSettings",void 0),f([A.Complex({},Ie)],v.prototype,"legendSettings",void 0),f([A.Property(!1)],v.prototype,"useGroupingSeparator",void 0),f([A.Property(null)],v.prototype,"description",void 0),f([A.Property(0)],v.prototype,"tabIndex",void 0),f([A.Property(null)],v.prototype,"format",void 0),f([A.Event()],v.prototype,"load",void 0),f([A.Event()],v.prototype,"beforePrint",void 0),f([A.Event()],v.prototype,"loaded",void 0),f([A.Event()],v.prototype,"itemRendering",void 0),f([A.Event()],v.prototype,"drillStart",void 0),f([A.Event()],v.prototype,"drillEnd",void 0),f([A.Event()],v.prototype,"itemSelected",void 0),f([A.Event()],v.prototype,"itemHighlight",void 0),f([A.Event()],v.prototype,"tooltipRendering",void 0),f([A.Event()],v.prototype,"itemClick",void 0),f([A.Event()],v.prototype,"itemMove",void 0),f([A.Event()],v.prototype,"click",void 0),f([A.Event()],v.prototype,"doubleClick",void 0),f([A.Event()],v.prototype,"rightClick",void 0),f([A.Event()],v.prototype,"mouseMove",void 0),f([A.Event()],v.prototype,"resize",void 0),f([A.Event()],v.prototype,"legendItemRendering",void 0),f([A.Event()],v.prototype,"legendRendering",void 0),f([A.NotifyPropertyChanges],v));function v(e,t){e=Rt.call(this,e,t)||this;return e.isResize=!1,e.orientation="Horizontal",e.drilledItems=[],e.isHierarchicalData=!1,e.levelSelection=[],e.legendId=[],e}var Ut=function(){},f=(x.prototype.renderLegend=function(){var t=this,e=(this.page=0,this.legendRenderingCollections=[],this.legendCollections=[],this.legendNames=[],this.totalPages=[],this.gradientCount=1,this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.treemap.renderer.createDefs(),this.treemap.svgObject.appendChild(this.defsElement),{cancel:!1,name:le,treemap:this.treemap,_changePosition:this.treemap.legendSettings.position,position:this.treemap.legendSettings.position});this.treemap.trigger(le,e,function(e){e.cancel||e._changePosition===t.treemap.legendSettings.position||(t.treemap.legendSettings.position=e._changePosition),t.calculateLegendBounds(),0<t.legendCollections.length&&t.drawLegend()})},x.prototype.calculateLegendBounds=function(){var i=this,e=this.treemap,t=e.legendSettings;if(this.findColorMappingLegendItems(e.treemapLevelData.levelsData[0]),(!A.isNullOrUndefined(this.treemap.palette)&&0<this.treemap.palette.length||!A.isNullOrUndefined(e.colorValuePath))&&0===this.legendCollections.length&&this.findPaletteLegendItems(e.treemapLevelData.levelsData[0]),0<this.legendCollections.length){this.legendCollections.sort(function(e,t){return e.levelIndex>t.levelIndex?1:e.levelIndex<t.levelIndex?-1:0}),this.legendCollections.sort(function(e,t){return e.groupIndex>t.groupIndex?1:e.groupIndex<t.groupIndex?-1:0}),this.legendCollections.sort(function(e,t){return e.leafIndex>t.leafIndex?1:e.leafIndex<t.leafIndex?-1:0});var l=t.position,z=e.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(t.title.text):t.title.text,o=t.titleStyle,H=t.mode,n=0,r=0,a=0,s=0,d=t.shapeHeight,h=t.shapeWidth,p=[],g=[],c="None"===t.orientation?"Top"===l||"Bottom"===l||"Auto"===l&&e.availableSize.width<=e.availableSize.height?"Horizontal":"Vertical":t.orientation,m=1<t.width.length?-1<t.width.indexOf("%")?e.availableSize.width/100*parseFloat(t.width):parseFloat(t.width):null,u=1<t.height.length?-1<t.height.indexOf("%")?e.availableSize.height/100*parseFloat(t.height):parseFloat(t.height):null,R=(o.fontFamily=o.fontFamily||e.themeStyle.fontFamily,o.fontWeight=o.fontWeight||e.themeStyle.titleFontWeight,o.size=o.size||e.themeStyle.subtitleFontSize,V(z,o)),y=0,f=0,v=t.shapePadding,x=t.textStyle;if(x.size=x.size||e.themeStyle.legendFontSize,x.fontFamily=x.fontFamily||e.themeStyle.fontFamily,x.fontWeight=x.fontWeight||e.themeStyle.fontWeight,"Default"===H){for(var m=A.isNullOrUndefined(m)?e.areaRect.width:m,u=A.isNullOrUndefined(u)?e.areaRect.height:u,S=0,b=0;b<this.legendCollections.length;b++){var I,C,F,w=this.legendCollections[b],O=(A.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]}),V(e.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(w.legendName):w.legendName,x));this.textMaxWidth=Math.max(this.textMaxWidth,O.width),0===b?(y=n=10+h/2,f=r=10+R.height+(d>O.height?d/2:O.height/4)):(I=O.height>d?O.height:d,"Horizontal"===c?r=(F=g[S-1].x+g[S-1].width+10+h)+v+O.width>m?u<(C=(g[S-1].y>p[S-1].y+d/2?g[S-1].y:p[S-1].y+d/2)+10)+I?(this.getPageChanged(),S=0,p=[],g=[],n=y,f):(n=p[0].x,C+I/2):(n=F-h/2,p[S-1].y):u<(C=g[S-1].y>p[S-1].y+d/2?g[S-1].y:p[S-1].y+d/2)+10+I?(F=g[S-1].x+this.textMaxWidth+10)+v+O.width>m?(n=y,r=f,g=[],p=[],this.getPageChanged(),S=0):(n=F+h/2,r=p[0].y):(n=p[S-1].x,r=C+10+d/2)),a=n+h/2+v,s=r+O.height/4,p.push({x:n,y:r}),g.push({x:a,y:s,width:O.width,height:O.height/2}),this.totalPages[this.page].Collection.push({DisplayText:w.legendName,element:w.gradientElement,Shape:{x:n,y:r},Text:{x:a,y:s},Fill:w.legendFill,Data:w.legendData,Rect:{x:p[S].x-h/2,y:p[S].y-d/2<s-O.height?p[S].y-d/2:s-O.height,width:Math.abs(p[S].x-h/2-(a+O.width)),height:d>O.height?d:O.height}}),S++}l=this.totalPages[0].Collection;l.forEach(function(e,t){e=new j(e.Rect.x,e.Rect.y,e.Rect.width,e.Rect.height);0===t&&(y=e.x,f=e.y),i.widthIncrement=Math.max(i.widthIncrement,Math.abs(y-(e.x+e.width))),i.heightIncrement=Math.max(i.heightIncrement,Math.abs(f-(e.y+e.height)))}),m=this.widthIncrement<m?this.widthIncrement:m,u=this.heightIncrement<u?this.heightIncrement:u,this.legendItemRect={x:l[0].Rect.x,y:l[0].Rect.y,width:m,height:u}}else{for(var L=this.legendCollections.length,T="Horizontal"===c?A.isNullOrUndefined(m)?e.areaRect.width/L:m/L:A.isNullOrUndefined(m)?25:m,M="Horizontal"===c?A.isNullOrUndefined(u)?25:u:A.isNullOrUndefined(u)?e.areaRect.height/L:u/L,N=(y=0,f=R.height+10,t.labelPosition),_=0,E=0,U=t.labelDisplayMode,D=0,k=0,b=0;b<this.legendCollections.length;b++){var y="Horizontal"===c?y+T:y,f="Horizontal"===c?f:f+M,P=this.legendCollections[b].legendName,B=new W(0,0);"None"===U?B=V(P,x):"Trim"===U?B=V(P=G("Horizontal"===c?T:M,P,x),x):P="",D=Math.max(D,B.height),k=Math.max(k,B.width),0<B.width&&0<B.height&&(s="Horizontal"===c?(a=y+T/2,"After"===N?f+M+B.height/2+10:f-10):(a="After"===N?y-B.width/2-10:y+T+B.width/2+10,f+M/2+B.height/4)),0===b&&(_="Horizontal"!==c&&"After"===N?a-B.width/2:y,E="Horizontal"!==c||"After"===N?f:s-B.height/2),b===L-1&&(m="Horizontal"===c?Math.abs(y+T-_):T+k+10,u="Horizontal"===c?M+D/2+10:Math.abs(f+M-E)),this.legendRenderingCollections.push({fill:this.legendCollections[b].legendFill,x:y,y:f,width:T,height:M,element:this.legendCollections[b].gradientElement,text:P,textX:a,textY:s,textWidth:B.width,textHeight:B.height,data:this.legendCollections[b].legendData})}this.legendItemRect={x:_,y:E,width:m,height:u}}}},x.prototype.getPageChanged=function(){this.page++,A.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},x.prototype.findColorMappingLegendItems=function(e){var t=H(e).values;if(t&&0<t.length&&(this.calculateLegendItems(t),0<this.treemap.levels.length))for(var i=0;i<t.length;i++)this.findColorMappingLegendItems(t[i])},x.prototype.findPaletteLegendItems=function(e){var t,i;if(!A.isNullOrUndefined(this.treemap.drilledItems)&&0===this.treemap.drilledItems.length&&!A.isNullOrUndefined(this.treemap.initialDrillDown.groupName)&&A.isNullOrUndefined(this.treemap.drilledLegendItems))for(var l=H(e).values,o=0;o<l.length;o++)if(l[o].Name===this.treemap.initialDrillDown.groupName){l[o].isDrilled=!l[o].isDrilled,e=l[o],this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex,t=0<this.treemap.palette.length?this.treemap.palette[o%this.treemap.palette.length]:l[o].data[this.treemap.colorValuePath];break}if(this.treemap.enableDrillDown&&!A.isNullOrUndefined(this.treemap.drilledLegendItems)){var n,r=this.treemap.drilledLegendItems;if(A.isNullOrUndefined(r.data.options))for(o=0;o<r.length;o++){t=0<this.treemap.palette.length?this.treemap.palette[o%this.treemap.palette.length]:r[o].data[this.treemap.colorValuePath];break}else t=r.data.options.fill;n=(r.data.isDrilled?H(r.data):H(r.data.parent)).values}else n=H(e).values;if(n&&0<n.length){for(var a=0;a<n.length;a++)!A.isNullOrUndefined(n[a].data[this.treemap.legendSettings.showLegendPath])&&!n[a].data[this.treemap.legendSettings.showLegendPath]||(i=n[a].data[this.treemap.legendSettings.valuePath]||n[a].name,!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,i))||this.legendCollections.push({legendName:i,legendFill:0<this.treemap.palette.length?A.isNullOrUndefined(this.treemap.currentLevel)?this.treemap.palette[a%this.treemap.palette.length]:t:n[a].data[this.treemap.colorValuePath],legendData:[],itemArea:n[a].weight,levelOrderName:n[a].levelOrderName});if(this.legendCollections.sort(pt),0<this.treemap.palette.length)for(var s=0;s<this.legendCollections.length;s++)this.legendCollections[s].legendFill=A.isNullOrUndefined(this.treemap.currentLevel)?this.treemap.palette[s%this.treemap.palette.length]:t}},x.prototype.calculateLegendItems=function(e){var t,i,l,o,n,r,a=!1,s=this.treemap.leafItemSettings,d=this.treemap.levels,h=this.treemap.legendSettings.position,p=!1,g=0;this.outOfRangeLegend=null;for(var c=0;c<e.length;c++){i="",p=r=n=!1;for(var m,u=e[c].data,y=e[c].groupIndex,f=((m=0===this.treemap.levels.length||y===this.treemap.levels.length)?s:d[y]).colorMapping,v=0;v<f.length;v++){var x=f[v];if(w=null,C=Number(u[this.treemap.rangeColorValuePath]),F=u[this.treemap.equalColorValuePath],x.value=A.isNullOrUndefined(x.value)?x.value:x.value.toString(),!A.isNullOrUndefined(x.from)&&!A.isNullOrUndefined(x.to)&&C>=x.from&&C<=x.to&&x.showLegend?(r=a=!0,o=x.from+" - "+x.to,l=A.isNullOrUndefined(x.label)?x.from+" - "+x.to:x.label,i=A.isNullOrUndefined(x.color)?i:x.color,t=this.isAddNewLegendData(o)):!A.isNullOrUndefined(x.value)&&F===x.value&&x.showLegend&&(n=a=!0,o=x.value.toString(),l=A.isNullOrUndefined(x.label)?x.value.toString():x.label,i=A.isNullOrUndefined(x.color)?i:"[object Array]"===Object.prototype.toString.call(x.color)?x.color[0]:x.color,t=this.isAddNewLegendData(o)),a&&A.isNullOrUndefined(x.value)&&x.maxOpacity&&x.minOpacity&&"Interactive"===this.treemap.legendSettings.mode){var S=[],p=!0;if("[object Array]"===Object.prototype.toString.call(x.color))for(var b=0;b<x.color.length;b++){var I={colorStop:(b*(100/(x.color.length-1))+"%").toString(),color:x.color[b]};S.push(I)}else{var I={colorStop:"0%",color:i},C={colorStop:"100%",color:i};S.push(I),S.push(C)}var F={id:"groupIndex_"+y+"_colorIndex_"+this.gradientCount,x1:"0%",y1:"0%",x2:"Top"===h||"Bottom"===h?"100%":"0%",y2:"Top"===h||"Bottom"===h?"0%":"100%"},w=this.treemap.renderer.drawGradient("linearGradient",F,S).childNodes[0];"[object Array]"!==Object.prototype.toString.call(x.color)&&(w.childNodes[0].setAttribute("stop-opacity",x.minOpacity.toString()),w.childNodes[1].setAttribute("stop-opacity",x.maxOpacity.toString())),this.defsElement.appendChild(w),this.gradientCount++}if(C=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,l),t&&t.process&&a&&!C?(a=!1,i="[object Array]"===Object.prototype.toString.call(x.color)&&A.isNullOrUndefined(w)&&A.isNullOrUndefined(x.value)?this.legendGradientColor(x,g):i,this.legendCollections.push({actualValue:o,levelIndex:m?-1:v,leafIndex:m?v:-1,legendName:l,legendFill:i,legendData:[],groupIndex:m?-1:y,gradientElement:A.isNullOrUndefined(w)?A.isNullOrUndefined(x.value)?this.legendLinearGradient:null:w,name:e[c].name,opacity:this.treemap.legendSettings.opacity,borderColor:this.treemap.legendSettings.border.color,borderWidth:this.treemap.legendSettings.border.width}),this.legendCollections[this.legendCollections.length-1].legendData.push(e[c]),g++):a&&(a=!1,this.legendCollections[t.value].legendData.push(e[c])),!r&&!p&&!n&&A.isNullOrUndefined(x.from)&&A.isNullOrUndefined(x.to)&&A.isNullOrUndefined(x.minOpacity)&&A.isNullOrUndefined(x.maxOpacity)&&A.isNullOrUndefined(x.value)&&!A.isNullOrUndefined(x.color)){F="[object Array]"===Object.prototype.toString.call(x.color)?x.color[0]:x.color,w=A.isNullOrUndefined(x.label)?"Others":x.label,C=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,w),A.isNullOrUndefined(this.outOfRangeLegend)&&!C&&(this.legendCollections.push({actualValue:w,legendData:[],legendName:w,legendFill:F,groupIndex:!m||-1<y?y:-1}),C=this.legendCollections.length,this.outOfRangeLegend=this.legendCollections[C-1],g++);for(var O=this.legendCollections.length-1;0<=O;O--)if(this.legendCollections[O].actualValue===(x.label||"Others")){this.legendCollections[O].legendData.push(e[c]);break}}}}},x.prototype.removeDuplicates=function(e,t){for(var i=!1,l=0;l<e.length;l++)if(e[l].legendName===t){i=!0;break}return i},x.prototype.isAddNewLegendData=function(e){var t,i;if(0===this.legendCollections.length)t=!0;else for(var l=0;l<this.legendCollections.length;l++){if(e===this.legendCollections[l].actualValue){t=!1,i=l;break}l===this.legendCollections.length-1&&(t=!0)}return{process:t,value:i}},x.prototype.drawLegend=function(){var e=this.treemap.legendSettings,t=this.treemap.renderer,i=e.textStyle;if(this.legendGroup=t.createGroup({id:this.treemap.element.id+"_Legend_Group"}),this.renderLegendBorder(),this.renderLegendTitle(),"Default"===e.mode)this.drawLegendItem(this.currentPage);else for(var l=0;l<this.legendRenderingCollections.length;l++){var o=this.treemap.element.id+"_Legend_Index_"+l,n=this.treemap.element.id+"_Legend_Index_"+l+"_Text",r=this.legendRenderingCollections[l],a=(a=r.element)?"url(#"+a.id+")":r.fill,s=new j(r.x,r.y,r.width,r.height),d=new ze(r.textX,r.textY),o=new L(o,a,e.shapeBorder,e.opacity,s),a=(this.treemap.enableRtl&&("Left"===this.treemap.legendSettings.position||"Right"===this.treemap.legendSettings.position||"Auto"===this.treemap.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height?(o.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-(this.translate.y+o.height)-Math.abs(this.legendBorderRect.y-o.y),d.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y+r.textHeight/2-Math.abs(this.legendBorderRect.y-d.y)):(o.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+o.width)-Math.abs(this.legendBorderRect.x-o.x),d.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-this.translate.x-Math.abs(this.legendBorderRect.x-d.x))),this.treemap.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(r.text):r.text),s=(Ue(new T(n,d.x,d.y,"middle",a,"",""),i,i.color||this.treemap.themeStyle.legendTextColor,this.legendGroup),t.drawRectangle(o));s.setAttribute("tabindex",this.treemap.tabIndex.toString()),s.style.outline="",this.legendGroup.appendChild(s)}ct(this.treemap,this.legendGroup)},x.prototype.defaultLegendRtlLocation=function(e,t,i,l){var o=e.Shape,n=e.Text,e=V(e.DisplayText,l.textStyle);return o.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+t)-Math.abs(this.legendBorderRect.x-o.x),n.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+e.width+t)-Math.abs(this.legendBorderRect.x-n.x),("Left"===i.legendSettings.position||"Right"===i.legendSettings.position||"Auto"===i.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height)&&(o.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-o.y)-l.shapeHeight/2,n.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-n.y)),{shapeLocation:o,textLocation:n}},x.prototype.drawLegendItem=function(t){var d,h=this,p=this.treemap,g=10,c=p.legendSettings,m=new W(c.shapeWidth,c.shapeHeight),u=p.renderer,e=c.shapeBorder;if(0<=t&&t<this.totalPages.length){document.getElementById(this.legendGroup.id)&&document.getElementById(this.legendGroup.id).remove();for(var y="HorizontalLine"===c.shape||"VerticalLine"===c.shape||"Cross"===c.shape,f=y?A.isNullOrUndefined(c.fill)?"#000000":c.fill:e.color,v=y&&0===e.width?1:e.width,x=this,i=0;i<this.totalPages[t].Collection.length;i++)!function(e){var i=x.totalPages[t].Collection[e],l=x.treemap.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(i.DisplayText):i.DisplayText,o=u.createGroup({id:p.element.id+"_Legend_Index_"+e}),n=(o.setAttribute("aria-label",l+" Legend"),o.setAttribute("role","region"),o.setAttribute("tabindex",x.treemap.tabIndex.toString()),o.style.outline="none",p.element.id+"_Legend_Shape_Index_"+e),r=p.element.id+"_Legend_Text_Index_"+e,a=i.Shape,s=i.Text;p.enableRtl&&(d=x.defaultLegendRtlLocation(i,g,p,c),a=d.shapeLocation,s=d.textLocation),d={cancel:!1,name:ie,treemap:p,fill:i.Fill,shape:c.shape,imageUrl:c.imageUrl},p.trigger(ie,d,function(e){var t=new z(n,e.fill,v,y?i.Fill:f,c.opacity,"");o.appendChild(xt(a,e.shape,m,e.imageUrl,t)),Ue(new T(r,s.x,s.y,"start",l,"",""),c.textStyle,c.textStyle.color||p.themeStyle.legendTextColor,o),h.legendGroup.appendChild(o)})}(i);var l,o,n,r,a,s,S,b,I,C,F,e=void 0,w=g,O=g/2;0!==this.page&&(n=V(l=t+1+"/"+this.totalPages.length,o=c.textStyle),I=this.legendItemRect.x+this.legendItemRect.width-n.width-2*w-g,r=this.legendItemRect.x+this.legendItemRect.width,a=this.legendItemRect.y+this.legendItemRect.height+O/2+g,s=r-w-n.width/2-g/2,e=u.createGroup({id:p.element.id+"_Legend_Paging_Group"}),S=u.createGroup({id:p.element.id+"_Legend_Left_Paging_Group"}),b=u.createGroup({id:p.element.id+"_Legend_Right_Paging_Group"}),F=" M "+r+" "+a+" L "+(r-w)+" "+(a-O)+" L "+(r-w)+" "+(a+O)+" z ",C=new z(p.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",1,""," M "+I+" "+a+" L "+(I+w)+" "+(a-O)+" L "+(I+w)+" "+(a+O)+" z "),S.appendChild(u.drawPath(C)),C=new L(p.element.id+"_Left_Page_Rect","transparent",{},1,new j(I-w/2,a-2*O,2*w,2*g),""),S.appendChild(u.drawRectangle(C)),this.wireEvents(S),I=new z(p.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",1,"",F),b.appendChild(u.drawPath(I)),C=new L(p.element.id+"_Right_Page_Rect","transparent",{},1,new j(r-w,a-O,w,g),""),b.appendChild(u.drawRectangle(C)),this.wireEvents(b),e.appendChild(S),e.appendChild(b),F={id:p.element.id+"_Paging_Text",x:s,y:a+n.height/4,fill:"#a6a6a6","font-size":"14px","font-style":o.fontStyle,"font-family":o.fontFamily,"font-weight":o.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":"",role:"region","aria-label":l},e.appendChild(u.createText(F,l)),this.legendGroup.appendChild(e))}},x.prototype.renderLegendBorder=function(){var e=this.treemap,t=e.legendSettings,i=t.title.text,l=t.titleStyle,i=V(G(this.legendItemRect.width+20,i,l),l),l=(this.legendBorderRect=new j(this.legendItemRect.x-10,this.legendItemRect.y-10-i.height,this.legendItemRect.width+20,this.legendItemRect.height+20+i.height+("Interactive"!==t.mode&&0!==this.page?10:0)),{color:t.border.color||this.treemap.themeStyle.legendBorderColor,width:t.border.width||this.treemap.themeStyle.legendBorderWidth}),i=new L(e.element.id+"_Legend_Border",t.background,l,1,this.legendBorderRect,""),l=e.renderer.drawRectangle(i);l.style.pointerEvents="none",this.legendGroup.appendChild(l),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,t),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),e.svgObject.appendChild(this.legendGroup)},x.prototype.renderLegendTitle=function(){var e=this.treemap.legendSettings,t=e.titleStyle,e=this.treemap.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(e.title.text):e.title.text,i=G(this.legendItemRect.width+20,e,t),l=V(i,t);e&&((l=Ue(new T(this.treemap.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-l.height/2-5,"middle",i,""),t,t.color||this.treemap.themeStyle.legendTitleColor,this.legendGroup)).setAttribute("role","region"),l.setAttribute("aria-label",e))},x.prototype.renderInteractivePointer=function(e){var t=this.treemap,i=e.target,l=t.element.id+"_Interactive_Legend",o=!1,i=-1<e.type.indexOf("touch")?document.elementFromPoint(e.changedTouches[0].clientX,e.changedTouches[0].clientY):i,n=t.legendSettings;if(-1<i.id.indexOf("_Item_Index")&&n.visible&&0<this.legendRenderingCollections.length)for(var r=void 0,a=void 0,s=t.layout.renderItems[parseFloat(i.id.split("_Item_Index_")[1])],d=t.svgObject.getBoundingClientRect(),h=0;h<this.legendCollections.length&&!o;h++){var p=this.legendCollections[h],g=(a=document.getElementById(t.element.id+"_Legend_Index_"+h)).getBoundingClientRect(),c=new j(Math.abs(g.left-d.left),Math.abs(g.top-d.top),g.width,g.height),m=a.getAttribute("fill"),u=n.shapeBorder.color,y=n.shapeBorder.width;if(!A.isNullOrUndefined(p.legendData)&&0<p.legendData.length){var r=p.legendData,f=t.rangeColorValuePath;if(-1<s.levelOrderName.indexOf(this.legendCollections[h].legendName))this.drawInteractivePointer(n,m,u,l,y,c),o=!0;else for(var v=0;v<r.length;v++)if(t.rangeColorValuePath&&0<t.leafItemSettings.colorMapping.length?r[v].data[f]===s.data[f]:r[v].levelOrderName===s.levelOrderName||-1<r[v].levelOrderName.indexOf(s.levelOrderName)){this.drawInteractivePointer(n,m,u,l,y,c),o=!0;break}}else 0===this.treemap.leafItemSettings.colorMapping.length&&this.treemap.palette&&-1<s.levelOrderName.indexOf(p.levelOrderName)&&(this.drawInteractivePointer(n,m,u,l,y,c),o=!0)}else this.removeInteractivePointer()},x.prototype.drawInteractivePointer=function(e,t,i,l,o,n){var r,a,e="Horizontal"===("None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation)?e.invertedPointer?" M "+(r=n.x+n.width/2)+" "+(a=n.y+n.height)+" L "+(r-10)+" "+(a+10)+" L "+(r+10)+" "+(a+10)+" Z ":" M "+(r=n.x+n.width/2)+" "+(a=n.y)+" L "+(r-10)+" "+(a-10)+" L "+(r+10)+" "+(a-10)+" Z ":e.invertedPointer?" M "+(r=n.x)+" "+(a=n.y+n.height/2)+" L "+(r-10)+" "+(a-10)+" L "+(r-10)+" "+(a+10)+" z ":" M "+(r=n.x+n.width)+" "+(a=n.y+n.height/2)+" L "+(r+10)+" "+(a-10)+" L "+(r+10)+" "+(a+10)+" z ",n=new z(l,t,o,i,1,"",e);this.treemap.svgObject.appendChild(this.treemap.renderer.drawPath(n))},x.prototype.getLegendAlignment=function(e,t,i,l){var o,n,r=A.extend({},e.areaRect,void 0,!0),a=r.x,s=r.y,d=r.height,h=r.width,p=e.availableSize.width,g=e.availableSize.height,c="Auto"===l.position?g<p?"Right":"Bottom":l.position;if("Float"===l.position)this.translate=l.location;else{switch(c){case"Top":case"Bottom":r.height=d-i,o=p/2-t/2,n="Top"===c?s:s+r.height+10,r.y="Top"===c?s+i+10:s;break;case"Left":case"Right":r.width=h-t,o="Left"===c?a:a+r.width,n=g/2-i/2,r.x="Left"===c?a+t:a}switch(l.alignment){case"Near":"Top"===c||"Bottom"===c?o=r.x:n=r.y;break;case"Far":"Top"===c||"Bottom"===c?o=p-t:n=g-i}this.treemap.totalRect=r,this.translate=new ze(o,n)}},x.prototype.mouseUpHandler=function(e){this.renderInteractivePointer(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeInteractivePointer.bind(this),3e3)},x.prototype.removeInteractivePointer=function(){var e;document.getElementById(this.treemap.element.id+"_Interactive_Legend")&&(e=document.getElementById(this.treemap.element.id+"_Interactive_Legend")).parentNode.removeChild(e)},x.prototype.changeNextPage=function(e){this.currentPage=-1<e.target.id.indexOf("_Left_Page_")?this.currentPage-1:this.currentPage+1,0<=this.currentPage&&this.currentPage<this.totalPages.length?this.drawLegend():this.currentPage=-1<e.target.id.indexOf("_Left_Page_")?0:this.totalPages.length-1},x.prototype.wireEvents=function(e){A.EventHandler.add(e,A.Browser.touchStartEvent,this.changeNextPage,this)},x.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(A.Browser.touchMoveEvent,this.renderInteractivePointer,this),this.treemap.on(A.Browser.touchEndEvent,this.mouseUpHandler,this))},x.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(A.Browser.touchMoveEvent,this.renderInteractivePointer),this.treemap.off(A.Browser.touchEndEvent,this.mouseUpHandler))},x.prototype.getModuleName=function(){return"treeMapLegend"},x.prototype.destroy=function(){clearTimeout(this.clearTimeout),this.clearTimeout=null,this.legendRenderingCollections=[],this.legendCollections=[],this.outOfRangeLegend=null,this.totalPages=[],this.translate=null,this.legendBorderRect=null,this.legendGroup=null,this.legendNames=[],this.defsElement=null,this.legendLinearGradient=null,this.legendInteractiveGradient=[],this.legendItemRect=null,this.removeEventListener(),this.treemap=null},x.prototype.legendGradientColor=function(e,t){var i="http://www.w3.org/2000/svg";if(!A.isNullOrUndefined(e.color)&&"[object Array]"===Object.prototype.toString.call(e.color)){var l=this.treemap.renderer.createDefs(),o=document.createElementNS(i,"linearGradient"),n=this.treemap.legendSettings.position,r="Top"===n||"Bottom"===n?"100":"0",n="Top"===n||"Bottom"===n?"0":"100";o.setAttribute("id","linear_"+t),o.setAttribute("x1","0%"),o.setAttribute("y1","0%"),o.setAttribute("x2",r+"%"),o.setAttribute("y2",n+"%");for(var a=0;a<e.color.length;a++){var s=100/(e.color.length-1),d=document.createElementNS(i,"stop");d.setAttribute("offset",a*s+"%"),d.setAttribute("stop-color",e.color[a]),d.setAttribute("stop-opacity",1..toString()),o.appendChild(d)}l.appendChild(o),this.legendLinearGradient=o;r="url(#linear_"+t+")";this.defsElement.appendChild(o),n=r}return n},x);function x(e){this.page=0,this.legendBorderRect=new j(0,0,0,0),this.currentPage=0,this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.legendInteractiveGradient=[],this.legendItemRect=new j(0,0,0,0),this.treemap=e,this.addEventListener()}S.prototype.mouseMove=function(e){e=e.target;return this.highlightOnMouseMove(e)},S.prototype.highlightOnMouseMove=function(e){var t,i=this.treemap,l=e.id,o=[],n=this.treemap.highlightSettings,r=[],a=this.treemap.treeMapSelectionModule,s=!1;if(a&&0<a.legendSelectionCollection.length)for(var d=0;d<a.legendSelectionCollection.length;d++)for(var h=0;h<a.legendSelectionCollection[d].ShapeCollection.Elements.length;h++){var p=parseFloat(a.legendSelectionCollection[d].ShapeCollection.Elements[h].id.split("Item_Index_")[1].split("_")[0]),g=-1<l.indexOf("_Item_Index_")?parseFloat(l.split("Item_Index_")[1].split("_")[0]):null;if(a.legendSelectionCollection[d].ShapeCollection.Elements[h].id===l||p===g){s=!0;break}}if(-1<l.indexOf("_Item_Index")&&!s){if(this.highLightId!==l||this.legendHighlightCollection[0]&&1<this.legendHighlightCollection[0].ShapeCollection.Elements.length){var c=document.getElementById(i.element.id+"_TreeMap_"+i.layoutType+"_Layout"),m=document.getElementsByClassName("treeMapSelection"),e=(S=this.treemap.layout.renderItems[parseFloat(l.split("_Item_Index_")[1])],void 0);this.treemap.legendSettings.visible&&(M=this.treemap.treeMapLegendModule.legendCollections,I=this.treemap.treeMapLegendModule.legendCollections.length,e=!i.legendSettings.removeDuplicateLegend&&i.palette&&0<i.palette.length&&0===i.leafItemSettings.colorMapping.length&&0===i.levels.length?parseFloat(l.split("_Item_Index_")[1]):wt(I,S,i),A.isNullOrUndefined(e)&&(B(this.legendHighlightCollection,i),B(this.shapeHighlightCollection,i),this.legendHighlightCollection=[],i.treeMapLegendModule.removeInteractivePointer()),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+e):document.getElementById(this.treemap.element.id+"_Legend_Index_"+e),null!==this.shapeElement)&&(a&&this.shapeElement.id===(a&&a.shapeElement?a.shapeElement.id:null)?0<this.currentElement.length&&this.currentElement[this.currentElement.length-1].currentElement!==this.shapeElement&&(Ft(this.shapeHighlightCollection,this.currentElement,i),this.highLightId=""):(this.currentElement.push({currentElement:this.shapeElement}),B(this.shapeHighlightCollection,i),this.shapeHighlightCollection.push({legendEle:this.shapeElement,oldFill:M[e].legendFill,oldOpacity:M[e].opacity,oldBorderColor:M[e].borderColor,oldBorderWidth:M[e].borderWidth}),R("Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+e):document.getElementById(this.treemap.element.id+"_Legend_Index_"+e+"_Text"),n.fill,n.opacity,null,null),R(this.shapeElement,n.fill,n.opacity,n.border.color,n.border.width.toString()),this.target="highlight"));for(var u=Ve(S,[],n.mode,i),d=0;d<c.childElementCount;d++){for(var y=c.childNodes[d],f=!0,v=""!==i.rangeColorValuePath?i.rangeColorValuePath:null,x=i.layout.renderItems[parseFloat(l.split("_Item_Index_")[1])],S=i.layout.renderItems[parseFloat(y.id.split("_Item_Index_")[1])],h=0;h<m.length;h++)if(y.id===m[h].id||y.id===m[h].parentElement.id){f=!1;break}-1<u.indexOf(S.levelOrderName)&&f&&(A.isNullOrUndefined(v)||S.data[v]===x.data[v]||"Item"!==n.mode&&0<i.levels.length)&&(r.push(y),o.push(S))}D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i);for(var b=0;b<r.length;b++)P((y=r[b]).childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),y.classList.add("treeMapHighLight"),this.highLightId=l;i.trigger(J,{cancel:!1,name:J,treemap:i,items:o,elements:r})}}else if(-1<l.indexOf("_Legend_Shape")||-1<l.indexOf("_Legend_Index")||-1<l.indexOf("_Legend_Text_Index")){A.isNullOrUndefined(a)||(a.legendSelectId=A.isNullOrUndefined(i.legendId[0])?null:i.legendId[0]);var I=a&&a.legendSelectId?parseFloat(a.legendSelectId.split("Index_")[1]):a&&a.shapeSelectId?parseFloat(a.shapeSelectId.split("Index_")[1]):null,C="Default"===this.treemap.legendSettings.mode?-1===l.indexOf("Text")?parseFloat(l.split("_Legend_Shape_Index_")[1]):parseFloat(l.split("_Legend_Text_Index_")[1]):parseFloat(l.split("_Legend_Index_")[1]);if(this.treemap.legendSettings.visible&&C!==I){for(var F,w=void 0,O=void 0,v=""!==i.rangeColorValuePath?i.rangeColorValuePath:null,L=document.getElementById(l),T=("highlight"===this.shapeTarget&&(B(this.legendHighlightCollection,this.treemap),this.legendHighlightCollection=[]),this.shapeTarget="highlight",this.treemap.treeMapLegendModule.legendCollections[C].legendData.length),M=this.treemap.treeMapLegendModule.legendCollections,d=0;d<T;d++)for(var N,h=0;h<this.treemap.layout.renderItems.length;h++)(!A.isNullOrUndefined(v)&&0<i.leafItemSettings.colorMapping.length&&0===i.levels.length?i.treeMapLegendModule.legendCollections[C].legendData[d].data[v]===i.layout.renderItems[h].data[v]:i.treeMapLegendModule.legendCollections[C].legendData[d].levelOrderName===i.layout.renderItems[h].levelOrderName)&&(w=h,O=this.treemap.layout.renderItems[h].groupIndex,_=document.getElementById(this.treemap.element.id+"_Level_Index_"+O+"_Item_Index_"+w+"_RectPath"),N=void(0!==d&&0!==this.legendHighlightCollection.length||(this.legendHighlightCollection=[],Ot(this.legendHighlightCollection,C,h,L,_,this.treemap.layout.renderItems,M),F=this.legendHighlightCollection.length,this.legendHighlightCollection[F-1].ShapeCollection={Elements:[]})),-1<L.id.indexOf("Text")?(N="Interactive"===this.treemap.legendSettings.mode?document.getElementById(L.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+C),R(L,n.fill,n.opacity,null,null),R(N,n.fill,n.opacity,n.border.color,n.border.width.toString())):(R("Interactive"===this.treemap.legendSettings.mode?document.getElementById(L.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+C),n.fill,n.opacity,null,null),R(L,n.fill,n.opacity,n.border.color,n.border.width.toString())),R(_,n.fill,n.opacity,n.border.color,n.border.width.toString()),F=this.legendHighlightCollection.length,this.legendHighlightCollection[F-1].ShapeCollection.Elements.push(_));if(0===T&&this.treemap.palette&&0<this.treemap.palette.length)for(var _,E,h=0;h<this.treemap.layout.renderItems.length;h++)!(this.treemap.treeMapLegendModule.legendCollections[C].levelOrderName===this.treemap.layout.renderItems[h].levelOrderName||-1<this.treemap.layout.renderItems[h].levelOrderName.indexOf(this.treemap.treeMapLegendModule.legendCollections[C].levelOrderName))||!this.treemap.legendSettings.removeDuplicateLegend&&i.palette&&0<i.palette.length&&!this.treemap.layout.renderItems[h].parent.isDrilled&&C!==h||(w=h,O=this.treemap.layout.renderItems[h].groupIndex,_=document.getElementById(this.treemap.element.id+"_Level_Index_"+O+"_Item_Index_"+w+"_RectPath"),Ot(this.legendHighlightCollection,C,h,L,_,this.treemap.layout.renderItems,M),F=this.legendHighlightCollection.length,E=void(this.legendHighlightCollection[F-1].ShapeCollection={Elements:[]}),-1<L.id.indexOf("Text")?(E="Interactive"===this.treemap.legendSettings.mode?document.getElementById(L.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+C),R(L,n.fill,n.opacity,null,null),R(E,n.fill,n.opacity,n.border.color,n.border.width.toString())):(R(E="Interactive"===this.treemap.legendSettings.mode?document.getElementById(L.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+C),n.fill,n.opacity,null,null),R(L,n.fill,n.opacity,n.border.color,n.border.width.toString())),R(_,n.fill,n.opacity,n.border.color,n.border.width.toString()),F=this.legendHighlightCollection.length,this.legendHighlightCollection[F-1].ShapeCollection.Elements.push(_))}else D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i),B(this.legendHighlightCollection,i),this.legendHighlightCollection=[]}else a&&this.shapeElement&&this.shapeElement.getAttribute("id")===a.legendSelectId||(a?this.shapeElement!==a.shapeElement:this.treemap.legendSettings.visible)&&D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i),"highlight"!==this.shapeTarget&&"highlight"!==this.target||!this.treemap.legendSettings.visible||a&&this.shapeElement&&this.shapeElement.getAttribute("id")===a.legendSelectId||a&&this.shapeElement===a.shapeElement||(B(this.shapeHighlightCollection,i),this.shapeHighlightCollection=[]),"highlight"===this.shapeTarget&&this.treemap.legendSettings.visible&&B(this.legendHighlightCollection,this.treemap),this.highLightId="",t=!1;return t},S.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(A.Browser.touchMoveEvent,this.mouseMove,this)},S.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(A.Browser.touchMoveEvent,this.mouseMove)},S.prototype.getModuleName=function(){return"treeMapHighlight"},S.prototype.destroy=function(){this.shapeElement=null,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.removeEventListener(),this.treemap=null};var kt=S;function S(e){this.target="highlight",this.shapeTarget="highlight",this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.treemap=e,this.addEventListener()}b.prototype.mouseDown=function(e){var t=e.target;e.preventDefault(),this.selectionOnMouseDown(t)},b.prototype.selectionOnMouseDown=function(t){var e=this.treemap,i=(t.setAttribute("tabindex","-1"),t.style.outline="none",t.id.includes("Legend_Shape_Index")||t.focus(),[]),l=t.id,o=t.innerHTML,n=[],r=e.selectionSettings,a=this.treemap.treeMapHighlightModule,s=e.element.id+"_TreeMap_"+e.layoutType+"_Layout",d=(y=e.layout.renderItems[parseFloat(l.split("_Item_Index_")[1])])&&!y.isLeafItem&&e.enableDrillDown&&(-1<t.textContent.indexOf("[+]")||-1<t.textContent.indexOf("[-]")||!A.isNullOrUndefined(t.nextElementSibling)&&(-1<t.nextSibling.textContent.indexOf("[+]")||-1<t.nextSibling.textContent.indexOf("[-]")));if(-1<l.indexOf("_Item_Index")&&!d)if(this.treemap.selectionId!==l&&(!e.selectionId||parseFloat(e.selectionId.split("_Item_Index_")[1])!==parseFloat(l.split("_Item_Index_")[1]))||this.legendSelectionCollection[0]&&1<this.legendSelectionCollection[0].ShapeCollection.Elements.length){e.levelSelection=[],e.legendId=[],this.shapeSelectId="",B(this.legendSelectionCollection,e),this.legendSelectionCollection=[];var h=document.getElementById(s),p=void 0;this.treemap.legendSettings.visible&&(this.shapeSelect=!1,s=this.treemap.treeMapLegendModule.legendCollections.length,b=this.treemap.treeMapLegendModule.legendCollections,this.shapeElement=void 0,B(this.shapeSelectionCollection,e),a&&(a.shapeTarget="selection",a.shapeHighlightCollection=[]),p=!e.legendSettings.removeDuplicateLegend&&e.palette&&0<e.palette.length&&0===e.leafItemSettings.colorMapping.length&&0===e.levels.length?parseFloat(l.split("_Item_Index_")[1]):wt(s,y,e),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+p):document.getElementById(this.treemap.element.id+"_Legend_Index_"+p),null!==this.shapeElement)&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:b[p].legendFill,oldOpacity:b[p].opacity,oldBorderColor:b[p].borderColor,oldBorderWidth:b[p].borderWidth}),R(M="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+p):document.getElementById(this.treemap.element.id+"_Legend_Index_"+p+"_Text"),r.fill,r.opacity,null,null),R(this.shapeElement,r.fill,r.opacity,r.border.color,r.border.width.toString()),e.legendId.push(this.shapeElement.id),e.legendId.push(M.id));for(var g=Ve(y,[],r.mode,e),c=0;c<h.childElementCount;c++){var m=h.childNodes[c],u=e.layout.renderItems[parseFloat(l.split("_Item_Index_")[1])],y=e.layout.renderItems[parseFloat(m.id.split("_Item_Index_")[1])],f=""!==e.rangeColorValuePath?e.rangeColorValuePath:null;-1<g.indexOf(y.levelOrderName)&&(A.isNullOrUndefined(f)||y.data[f]===u.data[f]||"Item"!==r.mode&&0<e.levels.length)&&(n.push(m),-1<l.indexOf("_RectPath")&&e.levelSelection.push(m.id),i.push(y))}D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",e),this.treemap.selectionId=l;for(var v=document.getElementsByClassName("treeMapHighLight"),x=0;x<n.length;x++){if(m=n[x],0<v.length)for(var S=0;S<v.length;S++)v[S].id===m.id&&v[S].classList.remove("treeMapHighLight"),P(m.childNodes[0],{border:r.border,fill:r.fill,opacity:r.opacity}),m.classList.add("treeMapSelection");else P(m.childNodes[0],{border:r.border,fill:r.fill,opacity:r.opacity}),m.classList.add("treeMapSelection");e.trigger(X,{cancel:!1,name:X,treemap:e,items:i,elements:n,text:o,contentItemTemplate:o},function(e){e.contentItemTemplate!==o&&ke(l,t,e.contentItemTemplate)})}}else B(this.legendSelectionCollection,e),B(this.shapeSelectionCollection,e),this.treemap.legendId=[],this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeElement=void 0,this.shapeSelect=!0,this.shapeSelectId="",this.treemap.levelSelection=[],this.legendSelectId="",(this.legendSelect||this.shapeSelect)&&(D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",e),this.treemap.selectionId="");else if(-1<l.indexOf("_Legend_Shape")||-1<l.indexOf("_Legend_Index")||-1<l.indexOf("_Legend_Text_")){var b=this.treemap.treeMapLegendModule.legendCollections,s=A.isNullOrUndefined(this.legendSelectId)?null:parseFloat(this.legendSelectId.split("_Index_")[1]);if(this.treemap.legendSettings.visible&&s!==parseFloat(l.split("_Index_")[1])){for(var I,C=void 0,F=void 0,w=(e.legendId=[],e.levelSelection=[],this.legendSelectId=l,this.legendSelect=!1,isNaN(parseInt(l[l.length-1],10))?parseInt(l[l.length-6],10):parseInt(l[l.length-1],10)),O=document.getElementById(l),f=(B(this.legendSelectionCollection,e),D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",e),B(this.shapeSelectionCollection,e),this.legendSelectionCollection=[],a&&(a.shapeTarget="selection",a.legendHighlightCollection=[]),""!==e.rangeColorValuePath?e.rangeColorValuePath:null),p="Default"===this.treemap.legendSettings.mode?-1===l.indexOf("Text")?parseFloat(l.split("_Legend_Shape_Index_")[1]):parseFloat(l.split("_Legend_Text_Index_")[1]):parseFloat(l.split("_Legend_Index_")[1]),L=this.treemap.treeMapLegendModule.legendCollections[p].legendData.length,x=0;x<L;x++)for(var T,M,N=0;N<this.treemap.layout.renderItems.length;N++)(!A.isNullOrUndefined(f)&&0<e.leafItemSettings.colorMapping.length&&0===e.levels.length?e.treeMapLegendModule.legendCollections[p].legendData[x].data[f]===e.layout.renderItems[N].data[f]:this.treemap.treeMapLegendModule.legendCollections[p].legendData[x].levelOrderName===this.treemap.layout.renderItems[N].levelOrderName)&&(C=N,F=this.treemap.layout.renderItems[N].groupIndex,_=document.getElementById(this.treemap.element.id+"_Level_Index_"+F+"_Item_Index_"+C+"_RectPath"),this.treemap.selectionId=_.id,0!==x&&0!==this.legendSelectionCollection.length||(Ot(this.legendSelectionCollection,w,N,O,_,this.treemap.layout.renderItems,b),I=this.legendSelectionCollection.length,this.legendSelectionCollection[I-1].ShapeCollection={Elements:[]}),T=void(this.treemap.selectionId=_.id),M=void 0,-1<O.id.indexOf("Text")?(R(T="Interactive"===this.treemap.legendSettings.mode?document.getElementById(O.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+p),r.fill,r.opacity,r.border.color,r.border.width.toString()),R(O,r.fill,r.opacity,null,null),this.legendSelectId=T.id,this.shapeElement=T,e.legendId.push(O.id),e.legendId.push(T.id)):(R(M="Interactive"===this.treemap.legendSettings.mode?document.getElementById(O.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+p),r.fill,r.opacity,null,null),R(O,r.fill,r.opacity,r.border.color,r.border.width.toString()),this.shapeElement=O,e.legendId.push(O.id),e.legendId.push(M.id)),R(_,r.fill,r.opacity,r.border.color,r.border.width.toString()),I=this.legendSelectionCollection.length,e.levelSelection.push(_.id),this.legendSelectionCollection[I-1].ShapeCollection.Elements.push(_));if(0===L&&this.treemap.palette&&0<this.treemap.palette.length)for(var _,E,S=0;S<this.treemap.layout.renderItems.length;S++)!(this.treemap.treeMapLegendModule.legendCollections[p].levelOrderName===this.treemap.layout.renderItems[S].levelOrderName||-1<this.treemap.layout.renderItems[S].levelOrderName.indexOf(this.treemap.treeMapLegendModule.legendCollections[p].levelOrderName))||!this.treemap.legendSettings.removeDuplicateLegend&&e.palette&&0<e.palette.length&&!this.treemap.layout.renderItems[S].parent.isDrilled&&p!==S||(C=S,F=this.treemap.layout.renderItems[S].groupIndex,_=document.getElementById(this.treemap.element.id+"_Level_Index_"+F+"_Item_Index_"+C+"_RectPath"),Ot(this.legendSelectionCollection,p,S,O,_,this.treemap.layout.renderItems,b),this.treemap.selectionId=_.id,I=this.legendSelectionCollection.length,E=void(this.legendSelectionCollection[I-1].ShapeCollection={Elements:[]}),-1<O.id.indexOf("Text")?(E="Interactive"===this.treemap.legendSettings.mode?document.getElementById(O.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+p),R(O,r.fill,r.opacity,null,null),R(E,r.fill,r.opacity,r.border.color,r.border.width.toString()),this.legendSelectId=E.id,this.shapeElement=E):(R(E="Interactive"===this.treemap.legendSettings.mode?document.getElementById(O.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+p),r.fill,r.opacity,null,null),R(O,r.fill,r.opacity,r.border.color,r.border.width.toString()),this.legendSelectId=l,this.shapeElement=O),R(_,r.fill,r.opacity,r.border.color,r.border.width.toString()),e.levelSelection.push(_.id),-1===e.legendId.indexOf(E.id)&&e.legendId.push(E.id),-1===e.legendId.indexOf(O.id)&&e.legendId.push(O.id),I=this.legendSelectionCollection.length,this.legendSelectionCollection[I-1].ShapeCollection.Elements.push(_))}else B(this.legendSelectionCollection,this.treemap),B(this.shapeSelectionCollection,this.treemap),this.legendSelectionCollection=[],a&&(a.shapeTarget="highlight"),this.legendSelect=!0,this.legendSelectId="",this.treemap.legendId=[],this.treemap.levelSelection=[],this.shapeElement=null,this.shapeSelectId="",(this.legendSelect||this.shapeSelect)&&(D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",e),this.treemap.selectionId="")}else d&&(B(this.legendSelectionCollection,this.treemap),this.legendSelectionCollection=[],this.legendSelect=!0,this.legendSelectId="",this.treemap.legendId=[],this.treemap.levelSelection=[],this.treemap.selectionId="",this.shapeElement=null)},b.prototype.selectTreemapItem=function(e,t){if(t){for(var i=void 0,l=0;l<this.treemap.layout.renderItems.length;l++)if(e===this.treemap.layout.renderItems[l].levelOrderName){i=this.treemap.layout.renderItems[l];break}for(var o=this.treemap.selectionSettings,n=[],r=void 0,a=[],t=(this.treemap.levelSelection=[],this.treemap.element.id+"_TreeMap_"+this.treemap.layoutType+"_Layout"),s=document.getElementById(t),d=Ve(i,[],o.mode,this.treemap),h=0;h<s.childElementCount;h++)r=s.childNodes[h],i=this.treemap.layout.renderItems[parseFloat(r.id.split("_Item_Index_")[1])],-1<d.indexOf(i.levelOrderName)&&(n.push(r),this.treemap.levelSelection.push(r.id),a.push(i));if(this.treemap.legendSettings.visible)for(var p=0;p<a.length;p++){this.shapeSelect=!1;var g=this.treemap.treeMapLegendModule.legendCollections.length,c=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,Ct(this.shapeSelectionCollection),g=wt(g,a[p],this.treemap),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+g):document.getElementById(this.treemap.element.id+"_Legend_Index_"+g),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.treemap.legendId.push(this.shapeSelectId),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:c[g].legendFill,oldOpacity:c[g].opacity,oldBorderColor:c[g].borderColor,oldBorderWidth:c[g].borderWidth}),R(this.shapeElement,o.fill,o.opacity,o.border.color,o.border.width.toString()))}D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap);for(var t=document.getElementById(this.treemap.levelSelection[0]),m=(this.treemap.selectionId=t.childNodes[0].id,document.getElementsByClassName("treeMapHighLight")),u=0;u<n.length;u++)if(r=n[u],0<m.length)for(var y=0;y<m.length;y++)m[y].id===r.id&&m[y].classList.remove("treeMapHighLight"),P(r.childNodes[0],{border:o.border,fill:o.fill,opacity:o.opacity}),r.classList.add("treeMapSelection");else o.fill=("null"===o.fill?this.treemap.layout.renderItems[parseInt(r.id.split("Item_Index_")[1],10)].options:o).fill,P(r.childNodes[0],{border:o.border,fill:o.fill,opacity:o.opacity}),r.classList.add("treeMapSelection")}else Ct(this.shapeSelectionCollection),this.shapeElement=void 0,this.treemap.levelSelection=[],this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap),this.treemap.selectionId=""},b.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(A.Browser.touchStartEvent,this.mouseDown,this)},b.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(A.Browser.touchStartEvent,this.mouseDown)},b.prototype.getModuleName=function(){return"treeMapSelection"},b.prototype.destroy=function(){this.shapeElement=null,this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.removeEventListener(),this.treemap=null};var At=b;function b(e){this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeSelect=!0,this.legendSelect=!0,this.treemap=e,this.addEventListener()}var Wt=function(e,t){var i={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&(i[o[l]]=e[o[l]]);return i},jt=(I.prototype.renderTooltip=function(e){var t,i,l,o,n,r,a=this,s=(t=(-1!==e.type.indexOf("touch")?(this.isTouch=!0,p=e.changedTouches[0].pageX,e.changedTouches[0]):(this.isTouch="touch"===e.pointerType,p=e.pageX,e)).pageY,e.target),d=s.id,h=[];if(-1<d.indexOf("_Item_Index")&&-1===e.type.indexOf("key")){if(d=this.treemap.layout.renderItems[parseFloat(d.split("_Item_Index_")[1])],!A.isNullOrUndefined(d)){o=d.weight,n=d.data,A.isNullOrUndefined(d.options)||(r=d.options.fill),h=this.treemap.enableRtl?[(A.isNullOrUndefined(this.tooltipSettings.format)?null:mt(this.tooltipSettings.format,n,this.treemap))||ut(o,this.treemap)+" : "+this.treemap.weightValuePath.toString()]:[(A.isNullOrUndefined(this.tooltipSettings.format)?null:mt(this.tooltipSettings.format,n,this.treemap))||this.treemap.weightValuePath.toString()+" : "+ut(o,this.treemap)],document.getElementById(this.tooltipId)?l=document.getElementById(this.tooltipId):((l=A.createElement("div",{id:this.treemap.element.id+"_TreeMapTooltip",className:"EJ2-TreeMap-Tooltip"})).style.cssText="position: absolute;pointer-events:none;",document.getElementById(this.treemap.element.id+"_Secondary_Element").appendChild(l)),(o=Ke(p,t,this.treemap.svgObject)).y=this.tooltipSettings.template?o.y+10:o.y,this.tooltipSettings.textStyle.size=this.tooltipSettings.textStyle.size||this.treemap.themeStyle.tooltipFontSize,this.tooltipSettings.textStyle.fontFamily=this.tooltipSettings.textStyle.fontFamily||this.treemap.themeStyle.fontFamily,this.tooltipSettings.textStyle.fontStyle=A.isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle)?"Normal":this.tooltipSettings.textStyle.fontStyle,this.tooltipSettings.textStyle.fontWeight=this.tooltipSettings.textStyle.fontWeight||this.treemap.themeStyle.fontWeight,this.tooltipSettings.textStyle.color=this.tooltipSettings.textStyle.color||this.treemap.themeStyle.tooltipFontColor,this.tooltipSettings.textStyle.opacity=this.tooltipSettings.textStyle.opacity||this.treemap.themeStyle.tooltipTextOpacity;var p={width:this.tooltipSettings.border.width||this.treemap.themeStyle.tooltipBorderWidth||0,color:this.tooltipSettings.border.color||this.treemap.themeStyle.tooltipBorderColor||"transparent"};if(this.treemap.enableHtmlSanitizer)for(var g=0;g<h.length;g++)h[g]=A.SanitizeHtmlHelper.sanitize(h[g]);i={cancel:!1,name:Y,item:d,options:{location:o,text:h,data:n,border:p,textStyle:this.tooltipSettings.textStyle,template:this.tooltipSettings.template},treemap:this.treemap,element:s,eventArgs:e},this.treemap.trigger(Y,i,function(e){a.addTooltip(i,r,l)})}}else this.removeTooltip(),this.treemap.clearTemplate()},I.prototype.addTooltip=function(e,t,i,l){var o;l=A.isNullOrUndefined(e)?(o=l.cancel,l):(o=e.cancel,Wt(e,["cancel"]).options),o?(this.removeTooltip(),this.treemap.clearTemplate()):(this.svgTooltip=new C.Tooltip({theme:this.treemap.theme,enable:!0,header:"",data:l.data,template:l.template,content:l.text,shapes:[],location:l.location,palette:[t],areaBounds:this.treemap.areaRect,textStyle:l.textStyle,fill:this.treemap.tooltipSettings.fill||this.treemap.themeStyle.tooltipFillColor,border:l.border,enableShadow:!0}),(this.treemap.isVue||this.treemap.isVue3)&&(this.svgTooltip.controlInstance=this.treemap),this.svgTooltip.opacity=this.treemap.themeStyle.tooltipFillOpacity||this.svgTooltip.opacity,this.svgTooltip.appendTo(i),this.treemap.renderReactTemplates())},I.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},I.prototype.removeTooltip=function(){var e;0<document.getElementsByClassName("EJ2-TreeMap-Tooltip").length&&(e=document.getElementsByClassName("EJ2-TreeMap-Tooltip")[0]).parentNode.removeChild(e)},I.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(A.Browser.touchMoveEvent,this.renderTooltip,this),this.treemap.on(A.Browser.touchEndEvent,this.mouseUpHandler,this))},I.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(A.Browser.touchMoveEvent,this.renderTooltip),this.treemap.off(A.Browser.touchEndEvent,this.mouseUpHandler))},I.prototype.getModuleName=function(){return"treeMapTooltip"},I.prototype.destroy=function(){A.isNullOrUndefined(this.svgTooltip)||(this.svgTooltip.destroy(),this.svgTooltip.controlInstance=null,Tt(this.treemap.element.id+"_TreeMapTooltip")),this.svgTooltip=null,this.tooltipSettings=null,this.removeEventListener(),this.treemap=null},I);function I(e){this.treemap=e,this.tooltipSettings=this.treemap.tooltipSettings,this.tooltipId=this.treemap.element.id+"_TreeMapTooltip",this.addEventListener()}e.Border=l,e.ColorMapping=Se,e.ColorValue=yt,e.CommonTitleSettings=pe,e.Font=n,e.HighlightSettings=De,e.ImageExport=Dt,e.InitialDrillSettings=Fe,e.LayoutPanel=Mt,e.LeafItemSettings=Le,e.LegendSettings=Ie,e.LevelSettings=t,e.LevelsData=Ut,e.Location=ze,e.Margin=se,e.PathOption=z,e.PdfExport=Bt,e.Print=_t,e.Rect=j,e.RectOption=L,e.SelectionSettings=_e,e.Size=W,e.SubTitleSettings=me,e.TextOption=T,e.TitleSettings=fe,e.TooltipSettings=Me,e.TreeMap=i,e.TreeMapAjax=It,e.TreeMapHighlight=kt,e.TreeMapLegend=f,e.TreeMapSelection=At,e.TreeMapTooltip=jt,e.applyOptions=P,e.beforePrint=E,e.click=$,e.colorCollections=it,e.colorMap=et,e.colorNameToHex=u,e.componentToHex=m,e.convertElement=qe,e.convertHexToColor=vt,e.convertToContainer=Qe,e.convertToHexCode=ft,e.convertToRect=$e,e.createTextStyle=Re,e.deSaturationColor=tt,e.defaultFont=ne,e.doubleClick=K,e.drawSymbol=xt,e.drillEnd=q,e.drillStart=k,e.findChildren=H,e.findHightLightItems=Ve,e.findLabelLocation=Xe,e.findPosition=He,e.formatValue=ut,e.getArea=Ye,e.getColorByValue=ot,e.getElement=Ae,e.getGradientColor=nt,e.getLegendIndex=wt,e.getMousePosition=Ke,e.getPercentage=at,e.getPercentageColor=rt,e.getShortestEdge=Ze,e.getTemplateFunction=Ge,e.getThemeStyle=Nt,e.hide=ht,e.isContainsData=je,e.isParentItem=bt,e.itemClick=Z,e.itemHighlight=J,e.itemMove=Q,e.itemRendering=U,e.itemSelected=X,e.itemsToOrder=We,e.legendItemRendering=ie,e.legendMaintain=ct,e.legendRendering=le,e.load=N,e.loaded=_,e.maintainSelection=gt,e.measureElement=Je,e.measureText=V,e.mouseMove=te,e.orderByArea=pt,e.pushCollection=Ot,e.removeClassNames=D,e.removeElement=Tt,e.removeLegend=B,e.removeSelectionWithHighlight=Ft,e.removeShape=Ct,e.renderLegendShape=St,e.renderTextElement=Ue,e.resize=oe,e.rgbToHex=lt,e.rightClick=ee,e.setColor=R,e.setItemTemplateContent=ke,e.stringToNumber=Be,e.textFormatter=mt,e.textTrim=G,e.textWrap=dt,e.tooltipRendering=Y,e.triggerDownload=Lt,e.wordWrap=st,Object.defineProperty(e,"__esModule",{value:!0})});
1
+ /*!
2
+ * filename: ej2-treemap.umd.min.js
3
+ * version : 32.1.24
4
+ * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
+ * Use of this code is subject to the terms of our license.
6
+ * A copy of the current license can be obtained at any time by e-mailing
7
+ * licensing@syncfusion.com. Any infringement will be prosecuted under
8
+ * applicable laws.
9
+ */
10
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-pdf-export")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base","@syncfusion/ej2-data","@syncfusion/ej2-pdf-export"],t):t((e=e||self).ej={},e.ej2Base,e.ej2SvgBase,e.ej2Data,e.ej2PdfExport)}(this,function(e,A,C,F,w){"use strict";var O,M,N="load",_="loaded",E="beforePrint",U="itemRendering",k="drillStart",q="drillEnd",X="itemSelected",J="itemHighlight",Y="tooltipRendering",Z="itemClick",Q="itemMove",$="click",K="doubleClick",ee="rightClick",te="mouseMove",ie="legendItemRendering",le="legendRendering",oe="resize",ne="Roboto, Segoe UI, Noto, Sans-serif",t=(O=function(e,t){return(O=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)},function(e,t){function i(){this.constructor=e}O(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),i=function(e,t,i,l){var o,n=arguments.length,r=n<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,l);else for(var a=e.length-1;0<=a;a--)(o=e[a])&&(r=(n<3?o(r):3<n?o(t,i,r):o(t,i))||r);return 3<n&&r&&Object.defineProperty(t,i,r),r},l=(M=A.ChildProperty,t(re,M),i([A.Property("#808080")],re.prototype,"color",void 0),i([A.Property(0)],re.prototype,"width",void 0),re);function re(){return null!==M&&M.apply(this,arguments)||this}ae=A.ChildProperty,t(o,ae),i([A.Property(10)],o.prototype,"left",void 0),i([A.Property(10)],o.prototype,"right",void 0),i([A.Property(10)],o.prototype,"top",void 0),i([A.Property(10)],o.prototype,"bottom",void 0);var ae,se=o;function o(){return null!==ae&&ae.apply(this,arguments)||this}de=A.ChildProperty,t(r,de),i([A.Property(null)],r.prototype,"size",void 0),i([A.Property(null)],r.prototype,"color",void 0),i([A.Property(ne)],r.prototype,"fontFamily",void 0),i([A.Property("")],r.prototype,"fontWeight",void 0),i([A.Property("Normal")],r.prototype,"fontStyle",void 0),i([A.Property(1)],r.prototype,"opacity",void 0);var de,n=r;function r(){return null!==de&&de.apply(this,arguments)||this}he=A.ChildProperty,t(ge,he),i([A.Property("")],ge.prototype,"text",void 0),i([A.Property("")],ge.prototype,"description",void 0);var he,pe=ge;function ge(){return null!==he&&he.apply(this,arguments)||this}t(ue,ce=pe),i([A.Complex({fontFamily:null,fontWeight:null},n)],ue.prototype,"textStyle",void 0),i([A.Property("Center")],ue.prototype,"alignment",void 0);var ce,me=ue;function ue(){return null!==ce&&ce.apply(this,arguments)||this}t(ve,ye=pe),i([A.Complex({fontFamily:null,fontWeight:null},n)],ve.prototype,"textStyle",void 0),i([A.Property("Center")],ve.prototype,"alignment",void 0),i([A.Complex({},me)],ve.prototype,"subtitleSettings",void 0);var ye,fe=ve;function ve(){return null!==ye&&ye.apply(this,arguments)||this}Se=A.ChildProperty,t(a,Se),i([A.Property(null)],a.prototype,"from",void 0),i([A.Property(null)],a.prototype,"to",void 0),i([A.Property(null)],a.prototype,"color",void 0),i([A.Property(null)],a.prototype,"label",void 0),i([A.Property(null)],a.prototype,"value",void 0),i([A.Property(null)],a.prototype,"minOpacity",void 0),i([A.Property(null)],a.prototype,"maxOpacity",void 0),i([A.Property(!0)],a.prototype,"showLegend",void 0);var Se,xe=a;function a(){return null!==Se&&Se.apply(this,arguments)||this}be=A.ChildProperty,t(s,be),i([A.Property(!1)],s.prototype,"visible",void 0),i([A.Property("Default")],s.prototype,"mode",void 0),i([A.Property("transparent")],s.prototype,"background",void 0),i([A.Property("Circle")],s.prototype,"shape",void 0),i([A.Property("")],s.prototype,"width",void 0),i([A.Property("")],s.prototype,"height",void 0),i([A.Complex({size:null,fontFamily:null,fontWeight:null},n)],s.prototype,"textStyle",void 0),i([A.Property(null)],s.prototype,"fill",void 0),i([A.Property(1)],s.prototype,"opacity",void 0),i([A.Property(15)],s.prototype,"shapeWidth",void 0),i([A.Property(15)],s.prototype,"shapeHeight",void 0),i([A.Property(10)],s.prototype,"shapePadding",void 0),i([A.Property(null)],s.prototype,"imageUrl",void 0),i([A.Complex({color:null,width:null},l)],s.prototype,"border",void 0),i([A.Complex({color:"#000000",width:0},l)],s.prototype,"shapeBorder",void 0),i([A.Complex({},pe)],s.prototype,"title",void 0),i([A.Complex({size:null,fontFamily:null,fontWeight:null},n)],s.prototype,"titleStyle",void 0),i([A.Property("Bottom")],s.prototype,"position",void 0),i([A.Property("None")],s.prototype,"orientation",void 0),i([A.Property(!1)],s.prototype,"invertedPointer",void 0),i([A.Property("After")],s.prototype,"labelPosition",void 0),i([A.Property("None")],s.prototype,"labelDisplayMode",void 0),i([A.Property("Center")],s.prototype,"alignment",void 0),i([A.Property({x:0,y:0})],s.prototype,"location",void 0),i([A.Property(null)],s.prototype,"showLegendPath",void 0),i([A.Property(null)],s.prototype,"valuePath",void 0),i([A.Property(!1)],s.prototype,"removeDuplicateLegend",void 0);var be,Ie=s;function s(){return null!==be&&be.apply(this,arguments)||this}Ce=A.ChildProperty,t(we,Ce),i([A.Property(null)],we.prototype,"groupIndex",void 0),i([A.Property(null)],we.prototype,"groupName",void 0);var Ce,Fe=we;function we(){return null!==Ce&&Ce.apply(this,arguments)||this}Oe=A.ChildProperty,t(d,Oe),i([A.Property(null)],d.prototype,"fill",void 0),i([A.Property(!1)],d.prototype,"autoFill",void 0),i([A.Complex({},l)],d.prototype,"border",void 0),i([A.Property(0)],d.prototype,"gap",void 0),i([A.Property(10)],d.prototype,"padding",void 0),i([A.Property(1)],d.prototype,"opacity",void 0),i([A.Property(!0)],d.prototype,"showLabels",void 0),i([A.Property(null)],d.prototype,"labelPath",void 0),i([A.Property(null)],d.prototype,"labelFormat",void 0),i([A.Property("TopLeft")],d.prototype,"labelPosition",void 0),i([A.Complex({color:null,size:null,fontFamily:null},n)],d.prototype,"labelStyle",void 0),i([A.Property(null)],d.prototype,"labelTemplate",void 0),i([A.Property("Center")],d.prototype,"templatePosition",void 0),i([A.Property("Trim")],d.prototype,"interSectAction",void 0),i([A.Collection([],xe)],d.prototype,"colorMapping",void 0);var Oe,Le=d;function d(){return null!==Oe&&Oe.apply(this,arguments)||this}Te=A.ChildProperty,t(h,Te),i([A.Property(!1)],h.prototype,"visible",void 0),i([A.Property("")],h.prototype,"template",void 0),i([A.Property(null)],h.prototype,"format",void 0),i([A.Property(null)],h.prototype,"fill",void 0),i([A.Property(.75)],h.prototype,"opacity",void 0),i([A.Property(["Circle"])],h.prototype,"markerShapes",void 0),i([A.Complex({width:null,color:null},l)],h.prototype,"border",void 0),i([A.Complex({fontFamily:null,size:null,fontWeight:null,opacity:null},n)],h.prototype,"textStyle",void 0);var Te,Me=h;function h(){return null!==Te&&Te.apply(this,arguments)||this}Ne=A.ChildProperty,t(p,Ne),i([A.Property(!1)],p.prototype,"enable",void 0),i([A.Property(null)],p.prototype,"fill",void 0),i([A.Property("0.5")],p.prototype,"opacity",void 0),i([A.Complex({},l)],p.prototype,"border",void 0),i([A.Property("Item")],p.prototype,"mode",void 0);var Ne,_e=p;function p(){return null!==Ne&&Ne.apply(this,arguments)||this}Ee=A.ChildProperty,t(g,Ee),i([A.Property(!1)],g.prototype,"enable",void 0),i([A.Property("#808080")],g.prototype,"fill",void 0),i([A.Property("0.5")],g.prototype,"opacity",void 0),i([A.Complex({},l)],g.prototype,"border",void 0),i([A.Property("Item")],g.prototype,"mode",void 0);var Ee,De=g;function g(){return null!==Ee&&Ee.apply(this,arguments)||this}Pe=A.ChildProperty,t(c,Pe),i([A.Property(null)],c.prototype,"groupPath",void 0),i([A.Property(0)],c.prototype,"groupGap",void 0),i([A.Property(10)],c.prototype,"groupPadding",void 0),i([A.Complex({},l)],c.prototype,"border",void 0),i([A.Property(null)],c.prototype,"fill",void 0),i([A.Property(!1)],c.prototype,"autoFill",void 0),i([A.Property(1)],c.prototype,"opacity",void 0),i([A.Property(!0)],c.prototype,"showHeader",void 0),i([A.Property(20)],c.prototype,"headerHeight",void 0),i([A.Property(null)],c.prototype,"headerTemplate",void 0),i([A.Property(null)],c.prototype,"headerFormat",void 0),i([A.Property("Near")],c.prototype,"headerAlignment",void 0),i([A.Complex({color:null,size:"13px",fontFamily:null},n)],c.prototype,"headerStyle",void 0),i([A.Property("TopLeft")],c.prototype,"templatePosition",void 0),i([A.Collection([],xe)],c.prototype,"colorMapping",void 0);var Pe,t=c;function c(){return null!==Pe&&Pe.apply(this,arguments)||this}var W=function(e,t){this.width=e,this.height=t};function Be(e,t){return null!=e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}var j=function(e,t,i,l){this.x=e,this.y=t,this.width=i,this.height=l},L=function(e,t,i,l,o,n){this.y=o.y,this.x=o.x,this.height=o.height,this.width=o.width,this.id=e,this.fill=t,this.opacity=l,this.stroke=i.color,this["stroke-width"]=i.width,this["stroke-dasharray"]=n},z=function(e,t,i,l,o,n,r){this.id=e,this.opacity=o,this.fill=t,this.stroke=l,this["stroke-width"]=i,this["stroke-dasharray"]=n,this.d=r};function V(e,t){var i=document.getElementById("treeMapMeasureText");return null===i&&(i=A.createElement("text",{id:"treeMapMeasureText"}),document.body.appendChild(i)),i.innerHTML=A.SanitizeHtmlHelper.sanitize(e),i.style.position="absolute",i.style.fontSize=t.size,i.style.fontWeight=t.fontWeight,i.style.fontStyle=t.fontStyle,i.style.fontFamily=t.fontFamily,i.style.visibility="hidden",i.style.top="-100",i.style.left="0",i.style.whiteSpace="nowrap",i.style.lineHeight="normal",new W(i.clientWidth,i.clientHeight)}var T=function(e,t,i,l,o,n,r,a){void 0===n&&(n=""),this.transform="",this.baseLine="auto",this.id=e,this.text=o,this.transform=n,this.anchor=l,this.x=t,this.y=i,this.baseLine=r,this.connectorText=a};function G(e,t,i){var l=t;if(e<V(t,i).width)for(var o=t.length-1;0<=o;--o)if(V(l=t.substring(0,o)+"...",i).width<=e||l.length<4)return l=l.length<4?" ":l;return l}var ze=function(e,t){this.x=e,this.y=t};function He(e,t,i,l){var o;switch(t){case"Near":o=e.x;break;case"Center":o="title"===l?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":o="title"===l?e.width-e.y-i.width:e.x+e.width-i.width}t="title"===l?e.y+i.height/2:e.y+e.height/2+i.height/2;return new ze(o,t)}function Re(e,t,i){e=e.createText(t,i);return e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.style["user-select"]="none",e.style["-moz-user-select"]="none",e.style["-webkit-touch-callout"]="none",e.style["-webkit-user-select"]="none",e.style["-khtml-user-select"]="none",e.style["-ms-user-select"]="none",e.style["-o-user-select"]="none",e}function Ue(e,t,i,l,o){void 0===o&&(o=!1);var n,r,a={"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,id:e.id,x:e.x,y:e.y,fill:i},i="string"==typeof e.text?e.text:o?e.text[e.text.length-1]:e.text[0],s=new C.SvgRenderer("");if(!A.isNullOrUndefined(i)&&!A.isNullOrUndefined(e.connectorText)&&i.includes(e.connectorText[1]))for(var d=i.split("#"),h=0;h<d.length;h++){var p=-1===d[h].search(e.connectorText)||A.isNullOrUndefined(e.connectorText)?d[h]:e.connectorText,p=(a.id=e.id+"_"+h,r=Re(s,a,p),h%2==0&&0!==h&&(p=p.replace(/\s+/g,"&nbsp")),V(p,t));a.x=0!==h?a.x+p.width:a.x+p.width+5,l.appendChild(r)}else r=Re(s,a,i),l.appendChild(r);if("string"!=typeof e.text&&1<e.text.length){for(var g=1,c=e.text.length;g<c;g++)n=V(e.text[g],t).height,n=s.createTSpan({x:e.x,id:e.id,y:e.y+g*n},e.text[g]),r.appendChild(n);l.appendChild(r)}return r}function ke(e,t,i){var l=e.split("_RectPath")[0],e=-1<e.indexOf("_LabelTemplate")?t:document.querySelector("#"+l+"_LabelTemplate");A.isNullOrUndefined(e)||(e.innerHTML=i)}function Ae(e){return document.getElementById(e)}function We(e,t){return e.weight===t.weight?0:e.weight<t.weight?1:-1}function je(e,t,i,l){for(var o=!1,n="",r=l.leafItemSettings,a=0;a<e.length;a++){var s=i[l.levels[a]?l.levels[a].groupPath:r.labelPath||l.weightValuePath]||"undefined";if(e[a]===s&&(n+=s+(a===e.length-1?"":"#"))===t){o=!0;break}}return o}function H(e){if(e)for(var t=Object.keys(e),i={},l=0;l<t.length;l++)if(e[t[l]]instanceof Array){i.values=e[t[l]],i.key=t[l];break}return i}function Ve(e,t,i,l){if("Child"===i){t.push(e.levelOrderName);var o=H(e).values;if(o&&0<o.length){for(var n=0;n<o.length;n++)-1===t.indexOf(o[n].levelOrderName)&&t.push(o[n].levelOrderName);for(var r=0;r<o.length;r++)Ve(o[r],t,i,l)}}else if("Parent"===i)"string"==typeof e.levelOrderName&&-1===t.indexOf(e.levelOrderName)&&(t.push(e.levelOrderName),Ve(e.parent,t,i,l));else if("All"===i)for(var a=e.levelOrderName.split("#")[0],s=void 0,n=0;n<l.layout.renderItems.length;n++)-1<(s=l.layout.renderItems[n]).levelOrderName.indexOf(a)&&-1===t.indexOf(s.levelOrderName)&&t.push(s.levelOrderName);else t.push(e.levelOrderName);return t}function Ge(t){var i=null;try{i="function"!=typeof t&&document.querySelectorAll(t).length?A.compile(document.querySelector(t).innerHTML.trim()):A.compile(t)}catch(e){i=A.compile(t)}return i}function qe(e,t,i){for(var l=A.createElement("div",{id:t}),o=(l.style.cssText="position: absolute;pointer-events: auto;",e.length);0<o;)l.appendChild(e[0]),o--;for(var n=l.innerHTML,r=Object.keys(i),a=0;a<r.length;a++)var s=RegExp,n=n.replace(new s("{{:"+r[a]+"}}","g"),i[r[a].toString()]);return l.innerHTML=n,l}function Xe(e,t,i,l,o,n){void 0===n&&(n=0);var r=new ze(0,0),a="Template"===l?o.areaRect.x:0,s="Template"===l?o.areaRect.y:0,d="TopCenter"===o.leafItemSettings.labelPosition||"TopLeft"===o.leafItemSettings.labelPosition||"TopRight"===o.leafItemSettings.labelPosition,d=1<n&&!d&&("BottomLeftTopRight"===o.renderDirection||"BottomRightTopLeft"===o.renderDirection)?i.height*n:i.height;return r.x=Math.abs(a-(-1<t.indexOf("Left")?e.x+5:-1<t.indexOf("Right")?e.x+e.width-i.width:e.x+(e.width/2-i.width/2)))-2,!o.enableDrillDown||"BottomLeftTopRight"!==o.renderDirection&&"BottomRightTopLeft"!==o.renderDirection?r.y=Math.abs(s-(-1<t.indexOf("Top")?"Template"===l?e.y:e.y+d:-1<t.indexOf("Bottom")?e.y+e.height-d:"Template"===l?e.y+(e.height/2-d/2):e.y+e.height/2+d/4)):r.y=Math.abs(e.y+e.height-d+5),r}function Je(e,t){var i=new W(0,0),t=(t.appendChild(e),i.height=e.offsetHeight,i.width=e.offsetWidth,document.getElementById(e.id));return t.parentNode.removeChild(t),i}function Ye(e){return(e.width-e.x)*(e.height-e.y)}function Ze(e){var e=Qe(e),t=e.width,e=e.height;return Math.min(t,e)}function Qe(e){var t=e.x,i=e.y;return{x:t,y:i,width:e.width-t,height:e.height-i}}function $e(e){var t=e.x,i=e.y;return{x:t,y:i,width:t+e.width,height:i+e.height}}function Ke(e,t,i){var l=i.getBoundingClientRect(),o=i.ownerDocument.defaultView.pageXOffset,n=i.ownerDocument.defaultView.pageYOffset,r=i.ownerDocument.documentElement.clientTop,i=i.ownerDocument.documentElement.clientLeft,o=l.left+o-i,i=l.top+n-r;return new ze(e-o,t-i)}function et(e,t,i){var l,o,n=[];if(A.isNullOrUndefined(t)&&A.isNullOrUndefined(i)&&isNaN(i))return null;for(var r=0;r<e.length;r++){var a=!1,s=i;A.isNullOrUndefined(e[r].from)||A.isNullOrUndefined(e[r].to)||A.isNullOrUndefined(e[r].value)?(A.isNullOrUndefined(e[r].from)||A.isNullOrUndefined(e[r].to))&&A.isNullOrUndefined(e[r].value)||(i>=e[r].from&&e[r].to>=i||e[r].value===t)&&(e[r].value===t&&(a=!0),l="[object Array]"===Object.prototype.toString.call(e[r].color)?a?e[r].color[0]:it(e[r],s):e[r].color):i>=e[r].from&&e[r].to>=i&&e[r].value===t&&(a=!0,l="[object Array]"===Object.prototype.toString.call(e[r].color)?a?e[r].color[0]:it(e[r],s):e[r].color),(i>=e[r].from&&i<=e[r].to||e[r].value===t)&&!A.isNullOrUndefined(e[r].minOpacity)&&!A.isNullOrUndefined(e[r].maxOpacity)&&l&&(o=tt(e[r],i)),(""===l||A.isNullOrUndefined(l))&&A.isNullOrUndefined(e[r].from)&&A.isNullOrUndefined(e[r].to)&&A.isNullOrUndefined(e[r].minOpacity)&&A.isNullOrUndefined(e[r].maxOpacity)&&A.isNullOrUndefined(e[r].value)&&(l="[object Array]"===Object.prototype.toString.call(e[r].color)?e[r].color[0]:e[r].color),o=A.isNullOrUndefined(o)?"1":o,n.push(l)}for(var d=n.length-1;0<=d;d--)d=(l=n[d])?-1:d;return{fill:l,opacity:o}}function tt(e,t){var i=1;return(i=t>=e.from&&t<=e.to?(t-e.from)/(e.to-e.from)*(e.maxOpacity-e.minOpacity)+e.minOpacity:i).toString()}function it(e,t){return ot(e,t)}function lt(e,t,i){return"#"+m(e)+m(t)+m(i)}function ot(e,t){return Number(t)===e.from?e.color[0]:Number(t)===e.to?e.color[e.color.length-1]:lt((t=nt(Number(t),e)).r,t.g,t.b)}function nt(e,t){var i=t.from,l=t.to,o=0,n=l-i,o=(e-i)/n;if(t.color.length<=2)a="#"===t.color[0].charAt(0)?t.color[0]:u(t.color[0]),s="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:u(t.color[t.color.length-1]);else{for(var r,a="#"===t.color[0].charAt(0)?t.color[0]:u(t.color[0]),s="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:u(t.color[t.color.length-1]),d=n/(t.color.length-1),h=t.color.length-1,p=[],g=1;g<h;g++)r={b:i+g*d,color:t.color[g]},p.push(r);for(var c=0;c<p.length;c++)i<=e&&e<=p[c].b&&0===c?(s="#"===p[c].color.charAt(0)?p[c].color:u(p[c].color),o=e<p[c].b?1-Math.abs((e-p[c].b)/d):(e-p[c].b)/d):p[c].b<=e&&e<=l&&c===p.length-1&&(a="#"===p[c].color.charAt(0)?p[c].color:u(p[c].color),o=e<p[c].b?1-Math.abs((e-p[c].b)/d):(e-p[c].b)/d),c!==p.length-1&&c<p.length&&p[c].b<=e&&e<=p[c+1].b&&(a="#"===p[c].color.charAt(0)?p[c].color:u(p[c].color),s="#"===p[c+1].color.charAt(0)?p[c+1].color:u(p[c+1].color),o=Math.abs(e-p[c+1].b)/d)}return rt(o,a,s)}function rt(e,t,i){var i=i.split("#")[1],t=t.split("#")[1],l=at(e,parseInt(t.substr(0,2),16),parseInt(i.substr(0,2),16)),o=at(e,parseInt(t.substr(2,2),16),parseInt(i.substr(2,2),16)),e=at(e,parseInt(t.substr(4,2),16),parseInt(i.substr(4,2),16));return new yt(l,o,e)}function at(e,t,i){return Math.round(t+(i-t)*e)}function st(e,t,i){for(var l,o=t.split(" "),n="",r=[],a=0,s=o.length;a<s;a++)l=o[a],V(n.concat(l),i).width<e?n=n.concat((""===n?"":" ")+l):""!==n?(r.push(G(e,n,i)),n=l):r.push(G(e,l,i)),n&&a===s-1&&r.push(G(e,n,i));return r}function dt(e,t,i){var l=[],o=0,n=V(t,i).width,r=t.length;if(n<=e)l.push(t);else for(var a=t.length;o<a;a--){var s=t.slice(o,a);if(V(s,i).width<=e){if(l.push(s),r===(o+=s.length))return l;a=r+1}}return l}function ht(e,t,i,l){l=V(i,l);return l.width>e||l.height>t?" ":i}function pt(e,t){return e.itemArea===t.itemArea?0:e.itemArea<t.itemArea?1:-1}function gt(e,t,i){var l=e.levelSelection;if(l)for(var o=0;o<l.length;o++)t.getAttribute("id")===l[o]||t.children[0].id===l[o]?0<t.childElementCount&&-1===t.children[0].id.indexOf("_Group")&&(t.children[0].setAttribute("class",i),P(t.childNodes[0],{border:e.selectionSettings.border,fill:e.selectionSettings.fill,opacity:e.selectionSettings.opacity})):t.setAttribute("class","")}function ct(e,t){var i=e.legendId;if(i)for(var l=0;l<i.length;l++)if("Interactive"===e.legendSettings.mode)for(var o,n=0;n<t.childElementCount;n++)t.childNodes[n].id!==i[l]&&parseFloat(t.childNodes[n].id.split("Index_")[1])!==parseFloat(i[l].split("Index_")[1])||((o=t.childNodes[n]).setAttribute("fill",e.selectionSettings.fill),o.setAttribute("opacity",e.selectionSettings.opacity),-1===o.id.indexOf("Text")?(o.setAttribute("stroke-width",e.selectionSettings.border.width.toString()),o.setAttribute("stroke",e.selectionSettings.border.color)):(o.setAttribute("stroke",null),o.setAttribute("stroke-width",null)));else{var r=document.getElementById(i[l]);A.isNullOrUndefined(r)||(r.setAttribute("fill",e.selectionSettings.fill),r.setAttribute("opacity",e.selectionSettings.opacity),-1===r.id.indexOf("Text")?(r.setAttribute("stroke",e.selectionSettings.border.color),r.setAttribute("stroke-width",e.selectionSettings.border.width.toString())):(r.setAttribute("stroke",null),r.setAttribute("stroke-width",null)))}}function D(e,t,i){for(var l,o,n=0;n<e.length;n++)l=A.isNullOrUndefined(e[n].childNodes[0])?e[n]:e[n].childNodes[0],o=i.layout.renderItems[parseFloat(l.id.split("_Item_Index_")[1])].options,P(l,o),e[n].classList.remove(t),--n}function P(e,t){e.setAttribute("opacity",t.opacity),A.isNullOrUndefined(t.fill)?e.setAttribute("fill","black"):e.setAttribute("fill",t.fill),e.setAttribute("stroke",t.border.color),e.setAttribute("stroke-width",t.border.width)}function mt(e,t,i){if(A.isNullOrUndefined(e))return null;for(var l=0,o=Object.keys(t);l<o.length;l++){var n=o[l];e=e.split("${"+n+"}").join(ut(t[n],i).toString())}return e}function ut(e,t){t=t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e;return t||""}var yt=function(e,t,i){this.r=e,this.g=t,this.b=i};function ft(e){return"#"+m(e.r)+m(e.g)+m(e.b)}function m(e){e=e.toString(16);return 1===e.length?"0"+e:e}function vt(e){e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return e?new yt(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)):new yt(255,255,255)}function u(e){e="transparent"===e?"white":e;var t=document.getElementById("treeMapMeasureText"),t=(t.style.color=e,(e=window.getComputedStyle(t).color).replace(/[()RGBrgba ]/g,"").split(","));return ft(new yt(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)))}function St(e,t,i,l,o){var n=new C.SvgRenderer(""),e=xt(e,i,t,o,l);return n["draw"+e.functionName](e.renderOption)}function xt(e,t,i,l,o){var n,r="Path",a=t.width,s=t.height,d=e.x,h=e.y,p=e.x+-a/2,g=e.y+-s/2;switch(i){case"Circle":case"Bubble":r="Ellipse",A.merge(l,{rx:a/2,ry:s/2,cx:d,cy:h});break;case"VerticalLine":A.merge(l,{d:n="M "+d+" "+(h+s/2)+" L "+d+" "+(h+-s/2)});break;case"Diamond":A.merge(l,{d:n="M "+p+" "+h+" L "+d+" "+(h+-s/2)+" L "+(d+a/2)+" "+h+" L "+d+" "+(h+s/2)+" L "+p+" "+h+" z"});break;case"Rectangle":A.merge(l,{d:n="M "+p+" "+(h+-s/2)+" L "+(d+a/2)+" "+(h+-s/2)+" L "+(d+a/2)+" "+(h+s/2)+" L "+p+" "+(h+s/2)+" L "+p+" "+(h+-s/2)+" z"});break;case"Triangle":A.merge(l,{d:n="M "+p+" "+(h+s/2)+" L "+d+" "+(h+-s/2)+" L "+(d+a/2)+" "+(h+s/2)+" L "+p+" "+(h+s/2)+" z"});break;case"InvertedTriangle":A.merge(l,{d:n="M "+(d+a/2)+" "+(h-s/2)+" L "+d+" "+(h+s/2)+" L "+(d-a/2)+" "+(h-s/2)+" L "+(d+a/2)+" "+(h-s/2)+" z"});break;case"Pentagon":for(var c,m,u=0;u<=5;u++)c=a/2*Math.cos(Math.PI/180*(72*u)),m=a/2*Math.sin(Math.PI/180*(72*u)),n=0===u?"M "+(d+c)+" "+(h+m)+" ":n.concat("L "+(d+c)+" "+(h+m)+" ");n=n.concat("Z"),A.merge(l,{d:n});break;case"Star":n="M "+(e.x+t.width/3)+" "+(e.y-t.height/2)+" L "+(e.x-t.width/2)+" "+(e.y+t.height/6)+" L "+(e.x+t.width/2)+" "+(e.y+t.height/6)+" L "+(e.x-t.width/3)+" "+(e.y-t.height/2)+" L "+e.x+" "+(e.y+t.height/2)+" L "+(e.x+t.width/3)+" "+(e.y-t.height/2)+" Z",A.merge(l,{d:n});break;case"Cross":A.merge(l,{d:n="M "+p+" "+h+" L "+(d+a/2)+" "+h+" M "+d+" "+(h+s/2)+" L "+d+" "+(h+-s/2)});break;case"Image":r="Image",A.merge(l,{href:o,height:s,width:a,x:p,y:g})}return{renderOption:l,functionName:r}}function bt(e,t){for(var i=!1,l=0;l<e.length;l++)if(t.levelOrderName===e[l].levelOrderName){i=!0;break}return i}function It(e,t,i,l,o){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=l,this.sendData=o}function Ct(e){if(0<e.length)for(var t=0;t<e.length;t++){var i=e[t];R(i.legendEle,i.oldFill,i.oldOpacity,i.oldBorderColor,i.oldBorderWidth)}}function B(e,t){if(0<e.length)for(var i=0;i<e.length;i++)for(var l=e[i],o=parseFloat(l.legendEle.id.split("_Index_")[1]),n=-1<l.legendEle.id.indexOf("Text")?l.legendEle.id.replace("_Text",""):l.legendEle.id,r="Interactive"===t.legendSettings.mode?document.getElementById(n):document.getElementById(t.element.id+"_Legend_Shape_Index_"+o),n="Interactive"===t.legendSettings.mode?document.getElementById(n+"_Text"):document.getElementById(t.element.id+"_Legend_Text_Index_"+o),a=(A.isNullOrUndefined(r)||R(r,l.oldFill,l.oldOpacity,"none","0px"),A.isNullOrUndefined(n)||R(n,t.legendSettings.textStyle.color||t.themeStyle.legendTextColor,l.oldOpacity,null,null),A.isNullOrUndefined(l.ShapeCollection)?0:l.ShapeCollection.Elements.length),s=0;s<a;s++){var d=document.getElementById(l.ShapeCollection.Elements[s].id);A.isNullOrUndefined(d)||R(d,l.shapeOldFill,l.shapeOldOpacity,l.shapeOldBorderColor,l.shapeOldBorderWidth)}}function R(e,t,i,l,o){e.setAttribute("fill",t),e.setAttribute("opacity",i),A.isNullOrUndefined(l)||e.setAttribute("stroke",l),A.isNullOrUndefined(o)||e.setAttribute("stroke-width",o)}function Ft(e,t,i){B(e,i),D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i)}function wt(e,t,i){for(var l,o=""!==i.rangeColorValuePath?i.rangeColorValuePath:null,n=!1,r=0;r<e&&!n;r++){var a=i.treeMapLegendModule.legendCollections[r].legendData.length;if(0<a){for(var s=0;s<a;s++)if(!A.isNullOrUndefined(o)&&0<i.leafItemSettings.colorMapping.length?i.treeMapLegendModule.legendCollections[r].legendData[s].data[o]===t.data[o]:i.treeMapLegendModule.legendCollections[r].legendData[s].levelOrderName===t.levelOrderName||-1<t.levelOrderName.indexOf(i.treeMapLegendModule.legendCollections[r].legendName)){l=r,n=!0;break}}else if(i.palette&&0<i.palette.length&&(i.treeMapLegendModule.legendCollections[r].levelOrderName===t.levelOrderName||-1<t.levelOrderName.indexOf(i.treeMapLegendModule.legendCollections[r].levelOrderName))&&i.treeMapLegendModule.legendCollections[r].legendName===t.name){l=r;break}}return l}function Ot(e,t,i,l,o,n,r){e.push({legendEle:l,oldFill:r[t].legendFill,oldOpacity:r[t].opacity,oldBorderColor:r[t].borderColor,oldBorderWidth:r[t].borderWidth,shapeElement:o,shapeOldFill:n[i].options.fill,shapeOldOpacity:n[i].options.opacity,shapeOldBorderColor:n[i].options.border.color,shapeOldBorderWidth:n[i].options.border.width})}function Lt(e,t,i,l){A.createElement("a",{attrs:{download:e+"."+t.toLocaleLowerCase(),href:i}}).dispatchEvent(new MouseEvent(l?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function Tt(e){e=document.getElementById(e);return e?A.remove(e):null}y.prototype.processLayoutPanel=function(){var e,t,i,l;this.treemap.treemapLevelData.levelsData&&0<this.treemap.treemapLevelData.levelsData.length&&(i=(A.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)||A.isNullOrUndefined(this.treemap.initialDrillDown.groupName)||(A.isNullOrUndefined(this.treemap.drilledItems)?!A.isNullOrUndefined(this.treemap.drilledItems):0!==this.treemap.drilledItems.length)?this.treemap.treemapLevelData.levelsData:this.getDrilldownData(this.treemap.treemapLevelData.levelsData[0],[]))[0],l=A.extend({},this.treemap.areaRect,l,!1),A.isNullOrUndefined(this.treemap.treeMapLegendModule)||A.isNullOrUndefined(this.treemap.totalRect)||"Float"!==this.treemap.legendSettings.position&&(l=this.treemap.totalRect),A.isNullOrUndefined(this.treemap.currentLevel)||(A.isNullOrUndefined(this.treemap.drilledItems)?A.isNullOrUndefined(this.treemap.drilledItems):0===this.treemap.drilledItems.length)?(!A.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)&&(A.isNullOrUndefined(this.treemap.drilledItems)?A.isNullOrUndefined(this.treemap.drilledItems):0===this.treemap.drilledItems.length)&&(this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex),this.calculateLayoutItems(i||this.treemap.treemapLevelData.levelsData[0],l)):(i=this.treemap.drilledItems.length-1,e=this.treemap.drilledItems[i].data,(t={})[this.treemap.drilledItems[i].data.groupName]=[e],A.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)||this.treemap.enableBreadcrumb||(this.treemap.currentLevel=this.treemap.drilledItems[i].data.groupIndex),this.calculateLayoutItems(t||this.treemap.treemapLevelData.levelsData[0],l)),this.renderLayoutItems())},y.prototype.getDrilldownData=function(e,t){var i=this.treemap,l={},o=H(e).values;if(o&&0<o.length&&0===t.length){for(var n=0;n<o.length;n++)o[n].groupIndex===i.initialDrillDown.groupIndex&&o[n].name===i.initialDrillDown.groupName&&(o[n].isDrilled=!0,l[o[n].groupName]=[o[n]],t.push(l));for(var r=0;r<o.length;r++)this.getDrilldownData(o[r],t)}return t},y.prototype.calculateLayoutItems=function(e,t){this.renderItems=[],this.parentData=[],A.isNullOrUndefined(this.treemap.weightValuePath)||(-1<this.treemap.layoutType.indexOf("SliceAndDice")?this.computeSliceAndDiceDimensional(e,t):(t.height=t.height+t.y,t.width=t.width+t.x,this.computeSquarifyDimensional(e,t)))},y.prototype.computeSliceAndDiceDimensional=function(e,t){var i,l,o,n=this.treemap.leafItemSettings,r=this.treemap.levels,a=H(e).values;if(a&&0<a.length&&(this.sliceAndDiceProcess(a,t),0<this.treemap.levels.length))for(var s=0;s<a.length;s++)o=a[s].groupIndex,l=0===r.length||o===r.length?n.gap:r[o].groupGap,o=0===r.length?0:r[o]?r[o].showHeader?r[o].headerHeight:0:r[o-1].showHeader?r[o-1].headerHeight:0,i=a[s].rect,i=new j(i.x+l/2,i.y+(o+l/2),i.width-l,Math.abs(i.height-(l+o))),this.computeSliceAndDiceDimensional(a[s],i);return e},y.prototype.sliceAndDiceProcess=function(e,t){var i,l=t.height*t.width,o=this.treemap.levels,n=0,r=0,a=(e.forEach(function(e){r+=e.weight}),e.forEach(function(e){e.weightArea=l*e.weight/r}),"SliceAndDiceAuto"===this.treemap.layoutType?t.width>t.height:"SliceAndDiceHorizontal"===this.treemap.layoutType);e.sort(We);for(var s=0;s<e.length;s++){var d=e[s];d.isLeafItem=0===o.length||(this.treemap.isHierarchicalData||A.isNullOrUndefined(this.treemap.leafItemSettings.labelPath)?d.groupIndex===o.length-1:d.groupIndex===this.treemap.levels.length),a?(i=l/r*e[s].weight/t.height,n<=t.width&&(e[s].rect=new j(n+t.x,t.y,i,t.height))):(i=l/r*e[s].weight/t.width,n<=t.height&&(e[s].rect=new j(t.x,n+t.y,t.width,i))),n+=i,this.renderItems.push(e[s])}},y.prototype.computeSquarifyDimensional=function(e,t){var i,l,o,n,r=this.treemap.leafItemSettings,a=this.treemap.levels,s=H(e).values;if(s&&0<s.length&&(0===this.parentData.length&&(this.parentData=[],this.parentData.push(s)),this.calculateChildrenLayout(e,s,t),0<this.treemap.levels.length))for(var d=0;d<s.length;d++)n=(l=s[d]).groupIndex,i=l.rect,o=(l.isLeafItem?r.padding:a[n].groupPadding)/2,n=this.treemap.isHierarchicalData?(0!==n||!l.isLeafItem)&&a[n]&&a[n].showHeader?a[n].headerHeight:0:0!==a.length&&a[n]&&a[n].showHeader?a[n].headerHeight:0,i=new j(i.x+o,i.y+(n+o),i.width-o,i.height-o),!l.isLeafItem&&0<l.weight&&this.computeSquarifyDimensional(s[d],i)},y.prototype.calculateChildrenLayout=function(e,t,i){this.computeTotalArea(t,Ye(i)),t.sort(pt),this.performRowsLayout(t,[],i,[])},y.prototype.performRowsLayout=function(e,t,i,l){var o=e.length;if(0===o)return h=this.getCoordinates(t,i),l.concat(h);var n=Ze(i),r=e[0],o=e.slice(1,o);if(this.aspectRatio(t,r,n))return n=t.concat(r),this.performRowsLayout(o,n,i,l);for(var a=t.length,s=0,d=0;d<a;d+=1)s+=t[d].itemArea;var r=this.cutArea(i,s),h=this.getCoordinates(t,i),o=l.concat(h);return this.performRowsLayout(e,[],r,o)},y.prototype.aspectRatio=function(e,t,i){return 0===e.length||(t=e.concat(t),e=this.findMaxAspectRatio(e,i),this.findMaxAspectRatio(t,i)<=e)},y.prototype.findMaxAspectRatio=function(e,t){for(var i=e.length,l=1/0,o=-1/0,n=0,r=0;r<i;r+=1){var a=e[r].itemArea;a<l&&(l=a),o<a&&(o=a),n+=a}return Math.max(Math.pow(t,2)*o/Math.pow(n,2),Math.pow(n,2)/(Math.pow(t,2)*l))},y.prototype.cutArea=function(e,t){var i,e=Qe(e),l=e.width,o=e.height,n=e.x,e=e.y;return $e(o<=l?{x:n+(i=t/o),y:e,width:l-i,height:o}:{x:n,y:e+(i=t/l),width:l,height:o-i})},y.prototype.getCoordinates=function(e,t){for(var i=Qe(t),l=i.width,o=i.height,n=i.x,i=i.y,r=e.length,a=this.treemap.levels,s=this.treemap.leafItemSettings,d=0,h=0;h<r;h+=1)d+=e[h].itemArea;for(var p,g,c=d/o,m=d/l,u=n,y=i,f=[],h=0;h<r;h+=1){var v,S=e[h],x=S.groupIndex;S.isLeafItem=0===a.length||(this.treemap.isHierarchicalData||!A.isNullOrUndefined(s.labelPath))&&x===a.length,g=(p=bt(this.parentData[0],S))?this.treemap.areaRect:S.parent.rect,x=S.isLeafItem?s.padding:a[x].groupPadding,o<=l?(v=y+S.itemArea/c,S.rect={x:u,y:y,width:u+c,height:v},y=v):(v=u+S.itemArea/m,S.rect={x:u,y:y,width:v,height:y+m},u=v),0<S.weight&&(p||Math.round(t.y+x/2)<=Math.round(g.y+(g.height-g.y))&&Math.round(t.x+x/2)<=Math.round(g.x+(g.width-g.x)))&&(this.renderItems.push(S),f.push(S))}return f},y.prototype.computeTotalArea=function(e,t){for(var i=e.length,l=[],o=0;o<i;o+=1){for(var n=e.length,r=0,a=0;a<n;a+=1)r+=e[a].weight;for(var s=t/r,d=void 0,h=0;h<n;h++)(d=e[h]).itemArea=d.weight*s,l.push(d)}return l},y.prototype.onDemandProcess=function(e){var t,i=e[0].parent;this.treemap.currentLevel=i.isDrilled?i.groupIndex:null;for(var l={},o=(A.isNullOrUndefined(i.groupName)?l=i:l[i.groupName]=[i],t=A.extend({},this.treemap.areaRect,t,!1),A.isNullOrUndefined(this.treemap.treeMapLegendModule)||A.isNullOrUndefined(this.treemap.totalRect)||(t=this.treemap.totalRect),this.treemap.levels.length),n=0;n<o;n++)o===e[0].groupIndex?this.treemap.levels[o]=this.treemap.levels[n]:this.treemap.levels.splice(o-1,1);this.calculateLayoutItems(l,t),this.renderLayoutItems()},y.prototype.renderLayoutItems=function(){for(var a,s,d,h,p,g,c,m,u,y,f,v,S,x,b,I,C,F,w=this,O=this.treemap,L=(this.renderer=O.renderer,O.element.id),e=O.layoutType,T=this.treemap.leafItemSettings.interSectAction,M="",N=document.getElementById(O.element.id+"_Secondary_Element"),_=O.levels,E=(this.layoutGroup=this.renderer.createGroup({id:L+"_TreeMap_"+e+"_Layout"}),A.createElement("div",{id:O.element.id+"_Label_Template_Group",className:"template"})),D=(E.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+O.areaRect.y+"px;left:"+O.areaRect.x+"px;height:"+O.areaRect.height+"px;width:"+O.areaRect.width+"px;",!1),P=O.leafItemSettings,B=this,t=0;t<this.renderItems.length;t++)!function(e){if(m=B.renderItems[e],h=m.groupIndex,B.treemap.drillDownView&&A.isNullOrUndefined(B.treemap.currentLevel)&&0<h||B.treemap.drillDownView&&h>B.treemap.currentLevel+1)return;g=m.rect,D=m.isLeafItem,f=L+"_Level_Index_"+h+"_Item_Index_"+e,x=B.renderer.createGroup({id:f+"_Group"}),C=(D?P.gap:_[h].groupGap)/2;var t,e=B.treemap.totalRect?O.legendSettings.visible?B.treemap.totalRect:Qe(B.treemap.totalRect):B.treemap.areaRect;"Squarified"===O.layoutType&&(g.width=Math.abs(g.x-g.width)-C,g.height=Math.abs(g.y-g.height)-C),"TopRightBottomLeft"===O.renderDirection?g.x=e.x+e.width-g.width-Math.abs(e.x-g.x):"BottomLeftTopRight"===O.renderDirection?g.y=e.y+e.height-g.height-Math.abs(e.y-g.y):"BottomRightTopLeft"===O.renderDirection&&(g.x=e.x+e.width-g.width-Math.abs(e.x-g.x),g.y=e.y+e.height-g.height-Math.abs(e.y-g.y)),C=B.getItemColor(D,m),c=C.fill,y=C.opacity,C=D?P.labelFormat:_[h].headerFormat,s=D?P.showLabels:_[h].showHeader,t=h===B.treemap.currentLevel?B.treemap.enableBreadcrumb?(F="#"+B.treemap.breadcrumbConnector+"#",t=m.levelOrderName.replace(/#/gi,F),0!==h?"#"+t:t):m.name:(B.treemap.enableBreadcrumb&&(m.isDrilled=!1),m.name),u=mt(C,m.data,B.treemap)||t||"undefined",C=H(m).values,u=!D&&C&&0<C.length&&B.treemap.enableDrillDown?m.isDrilled?O.enableRtl?u+" [-]":"[-] "+u:O.enableRtl?u+" [+]":"[+] "+u:u,O.enableHtmlSanitizer&&(u=A.SanitizeHtmlHelper.sanitize(u));var e=(D?P.labelStyle:_[h].headerStyle).fontFamily||B.treemap.themeStyle.labelFontFamily,i=(D?P.labelStyle:_[h].headerStyle).size||B.treemap.themeStyle.labelFontSize,l=(D?P.labelStyle:_[h].headerStyle).fontWeight||B.treemap.themeStyle.fontWeight,o=(D?P.labelStyle:_[h].headerStyle).color,n=(D?P.labelStyle:_[h].headerStyle).fontStyle,r=(D?P.labelStyle:_[h].headerStyle).opacity;S={fontFamily:e,size:i,fontWeight:l,color:o,fontStyle:n,opacity:r},I=(D?P:_[h]).border,a=D?P.labelPosition:"Near"===_[h].headerAlignment?"TopLeft":"Center"===_[h].headerAlignment?"TopCenter":"TopRight",p=(D?P:_[h]).templatePosition,b=D?P.labelTemplate:_[h].headerTemplate,m.options={border:I,opacity:y,fill:c},d={cancel:!1,name:U,treemap:B.treemap,text:u,currentItem:m,RenderItems:B.renderItems,options:m.options,textColor:S.color},B.treemap.trigger(U,d,function(e){e.cancel||(M=" M "+g.x+" "+g.y+" L "+(g.x+g.width)+" "+g.y+" L "+(g.x+g.width)+" "+(g.y+g.height)+" L "+g.x+" "+(g.y+g.height)+"z",v=new z(f+"_RectPath",c,I.width,I.color,y,null,M),e=w.renderer.drawPath(v),x.appendChild(e),s&&(d.text!==u&&(d.text=mt(d.text,m.data,w.treemap)||t),S.color=d.textColor||S.color,w.renderItemText(d.text.toString(),x,S,g,T,f,c,a,F)),b&&(v=w.renderTemplate(N,f,g,p,b,m,D),A.isNullOrUndefined(v)||(E.appendChild(v),w.treemap.renderReactTemplates())),x.setAttribute("aria-label",m.name),w.treemap.enableDrillDown&&!D||w.treemap.selectionSettings.enable||w.treemap.highlightSettings.enable?(x.setAttribute("role","button"),x.setAttribute("tabindex",w.treemap.tabIndex.toString()),x.style.outline="none",x.style.cursor=(!w.treemap.highlightSettings.enable||w.treemap.selectionSettings.enable||!w.treemap.enableDrillDown||m.groupIndex!==w.treemap.levels.length-1)&&(!w.treemap.highlightSettings.enable||w.treemap.selectionSettings.enable||w.treemap.enableDrillDown)?"pointer":"default"):x.setAttribute("role","region"),gt(w.treemap,x,"treeMapSelection"),w.layoutGroup.appendChild(x))})}(t);0<E.childNodes.length&&N.appendChild(E),this.treemap.svgObject.appendChild(this.layoutGroup),gt(this.treemap,this.layoutGroup,"treeMapSelection")},y.prototype.renderItemText=function(e,t,i,l,o,n,r,a,s){var d,h=[],p=0,g=-1!==e.indexOf("<br>")?e.split("<br>"):null,c=this.labelInterSectAction(l,e,i,o),m="",u=0;if(!A.isNullOrUndefined(g)&&0<g.length)for(var y=0;y<g.length;y++){var f=V(g[y],i).width;u<f&&(u=f,m=g[y])}d=V(g&&m||c[0],i),this.treemap.enableRtl&&(I=V(e,i),v=e.search("[+]")||e.search("[-]"),l.width<I.width)&&0<v&&(I=e.substring(v-1,e.length),v=V("[+]",i),c[0]=G(l.width-v.width-5,c[0],i)+I);var e=!A.isNullOrUndefined(g)&&1<g.length?g.length:0,v=Xe(l,a,d,"Text",this.treemap,e);if(!A.isNullOrUndefined(g)){for(var S,x=[],b=[],y=0;y<g.length;y++)p+=(d=V(S=G(l.width-5,g[y],i),i)).height,b.push(d.width),x.push(S);c=x,d.width=Math.max.apply(null,b),d.height=p}if("WrapByWord"===o||"Wrap"===o||"Trim"===o){for(var I,C=0;C<c.length;C++)p+=(d=V(c[C],i)).height,l.height-5>p&&h.push(c[C]);"Wrap"===o&&c.length!==h.length&&h.length&&(a=(a=h[I=h.length-1]).substring(0,a.length-1)+"...",h.splice(I),"..."!==a)&&h.push(a)}else e=c,h.push(e);Ue(new T(n+"_Text",v.x,v.y,"start",h,"","",s),i,i.color||this.getSaturatedColor(r),t)},y.prototype.getItemColor=function(e,t){var i=this.treemap,l=(e?i.leafItemSettings:i.levels[t.groupIndex]).fill,o=(e?i.leafItemSettings:i.levels[t.groupIndex]).opacity,n=(A.isNullOrUndefined(i.treemapLevelData.defaultLevelsData)||0<i.treemapLevelData.defaultLevelsData.length&&(i.treemapLevelData.levelsData=i.treemapLevelData.defaultLevelsData),H(i.treemapLevelData.levelsData[0]).values),e=(e?i.leafItemSettings:i.levels[t.groupIndex]).colorMapping;if(0<e.length){e=et(e,t.data[i.equalColorValuePath],t.data[i.rangeColorValuePath]);A.isNullOrUndefined(e)||(l=(A.isNullOrUndefined(e.fill)?i.leafItemSettings:e).fill,o=e.opacity)}else for(var r=0;r<n.length;r++)n[r].levelOrderName===t.levelOrderName.split("#")[0]&&(l=A.isNullOrUndefined(l)?A.isNullOrUndefined(i.colorValuePath)?A.isNullOrUndefined(t.options)?!A.isNullOrUndefined(i.palette)&&0<i.palette.length?i.palette[r%i.palette.length]:"#808080":t.options.fill:n[r].data[i.colorValuePath]:l);return{fill:l,opacity:o}},y.prototype.getSaturatedColor=function(e){var t=e,e=vt(u("transparent"===e?window.getComputedStyle(document.body,null).backgroundColor:t));return 128<=Math.round((299*e.r+587*e.g+114*e.b)/1e3)?"black":"white"},y.prototype.renderTemplate=function(e,t,i,l,o,n,r){var a,t=r?t+"_LabelTemplate":t+"_HeaderTemplate",r=r?"_LabelTemplate":"_HeaderTemplate";if(A.isNullOrUndefined(o.prototype)&&"string"==typeof o)for(var s=Object.keys(n.data),d=0;d<s.length;d++){var h=RegExp;o=o.replace(new h("{{:"+s[d]+"}}","g"),n.data[s[d].toString()])}return this.treemap.enableHtmlSanitizer&&"string"==typeof o&&(o=A.SanitizeHtmlHelper.sanitize(o)),A.isNullOrUndefined(document.getElementById(this.treemap.element.id+"_Secondary_Element"))||(i=Xe(i,l,Je(a=qe(Ge(o)(n.data,this.treemap,o,this.treemap.element.id+r,!1),t,n.data),e),"Template",this.treemap),a.style.left=i.x+"px",a.style.top=i.y+"px"),a},y.prototype.labelInterSectAction=function(e,t,i,l){var o,n=e.width-10;switch(l){case"Hide":o=[ht(n,e.height,t,i)];break;case"Trim":o=[G(3+n,t,i)];break;case"WrapByWord":o=st(n,t,i);break;case"Wrap":o=dt(n,t,i)}return o},y.prototype.destroy=function(){this.treemap=null,this.currentRect=null,this.layoutGroup=null,this.renderer=null,this.renderItems=[],this.parentData=[]};var Mt=y;function y(e){this.treemap=e}function Nt(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"bootstrapdark":case"fabricdark":case"materialdark":t={backgroundColor:i,titleFontColor:"#FFFFFF",titleFontWeight:"Normal",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#DADADA",legendTextColor:"#DADADA",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",labelFontFamily:ne,legendBorderColor:"#000000",legendBorderWidth:0};break;case"highcontrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontWeight:"Normal",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",labelFontFamily:ne,fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",titleFontColor:"#212529",titleFontWeight:"Normal",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"HelveticaNeue",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind":t={backgroundColor:"transparent",titleFontColor:"#374151",titleFontWeight:"Normal",subTitleFontColor:"#374151",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#374151",legendTextColor:"#374151",fontFamily:"Inter",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwinddark":t={backgroundColor:"transparent",titleFontColor:"#D1D5DB",titleFontWeight:"Normal",subTitleFontColor:"#D1D5DB",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#D1D5DB",legendTextColor:"#D1D5DB",fontFamily:"Inter",fontWeight:"Normal",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind3":t={backgroundColor:"transparent",titleFontColor:"#111827",titleFontWeight:"600",subTitleFontColor:"#111827",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#111827",legendTextColor:"#111827",fontFamily:"Inter",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind3dark":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Inter",fontWeight:"400",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap5":t={backgroundColor:"transparent",titleFontColor:"#212529",titleFontWeight:"400",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"10px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap5dark":t={backgroundColor:"transparent",titleFontColor:"#DEE2E6",titleFontWeight:"400",subTitleFontColor:"#DEE2E6",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#212529",tooltipFontSize:"12px",tooltipFillOpacity:.9,legendTitleColor:"#DEE2E6",legendTextColor:"#DEE2E6",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"10px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",titleFontWeight:"Normal",subTitleFontColor:"#201F1E",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#323130",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#201F1E",legendTextColor:"#201F1E",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",titleFontWeight:"Normal",subTitleFontColor:"#F3F2F1",tooltipFillColor:"#252423",tooltipFontColor:"#F3F2F1",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#F3F2F1",legendTextColor:"#F3F2F1",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"material3":t={backgroundColor:"transparent",titleFontColor:"#1C1B1F",titleFontWeight:"500",subTitleFontColor:"#1C1B1F",tooltipFillColor:"#313033",tooltipFontColor:"#F4EFF4",tooltipFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#1C1B1F",legendTextColor:"#49454E",fontFamily:"Roboto",fontSize:"16px",fontWeight:"400",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"Roboto",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"material3dark":t={backgroundColor:"transparent",titleFontColor:"#E6E1E5",titleFontWeight:"500",subTitleFontColor:"#E6E1E5",tooltipFillColor:"#E6E1E5",tooltipFontColor:"#313033",tooltipFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#E6E1E5",legendTextColor:"#CAC4D0",fontFamily:"Roboto",fontSize:"16px",fontWeight:"400",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"Roboto",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2":t={backgroundColor:"transparent",titleFontColor:"#242424",titleFontWeight:"600",subTitleFontColor:"#242424",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#242424",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#242424",legendTextColor:"#242424",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2dark":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#292929",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2highcontrast":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#FFF",legendBorderWidth:1,tooltipBorderColor:"#FFF",tooltipBorderWidth:1};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontWeight:"Normal",subTitleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#353535",legendTextColor:"#353535",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",labelFontFamily:ne,legendBorderColor:"#000000",legendBorderWidth:0}}return t}(e.Theme||(e.Theme={})).mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"};Et.prototype.print=function(e,t){var i=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),l=(i.moveTo(0,0),i.resizeTo(screen.availWidth,screen.availHeight),{cancel:!1,htmlContent:this.getHTMLContent(e,t),name:E});e.trigger(E,l,function(){l.cancel||A.print(l.htmlContent,i)})},Et.prototype.getHTMLContent=function(e,t){var i,l,o=A.createElement("div");return t?t instanceof Array?t.forEach(function(e){o.appendChild(Ae(e).cloneNode(!0))}):t instanceof Element?o.appendChild(t.cloneNode(!0)):o.appendChild(Ae(t).cloneNode(!0)):(l=(t=e.element.cloneNode(!0)).getElementsByTagName("svg")[0],A.isNullOrUndefined(l)||(l=l.childNodes[0],A.isNullOrUndefined(l))||(i=l.getAttribute("fill"),"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==i&&"transparent"!==i?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==i&&"transparent"!==i||l.setAttribute("fill","rgba(0, 0, 0, 1)"):l.setAttribute("fill","rgba(255,255,255, 1)")),o.appendChild(t)),o},Et.prototype.getModuleName=function(){return"Print"},Et.prototype.destroy=function(){};var _t=Et;function Et(e){}Pt.prototype.export=function(d,h,p,g){return new Promise(function(e,t){var i,l,o=A.createElement("canvas",{id:"ej2-canvas",attrs:{height:d.availableSize.height.toString(),width:d.availableSize.width.toString()}}),n=d.svgObject.cloneNode(!0),r=n.childNodes[0],a=(A.isNullOrUndefined(r)||(r=r.getAttribute("fill"),"Tailwind"!==d.theme&&"Tailwind3"!==d.theme&&"Bootstrap5"!==d.theme&&"Fluent"!==d.theme&&"Material3"!==d.theme&&"Fluent2"!==d.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r?"TailwindDark"!==d.theme&&"Tailwind3Dark"!==d.theme&&"Bootstrap5Dark"!==d.theme&&"FluentDark"!==d.theme&&"Material3Dark"!==d.theme&&"Fluent2Dark"!==d.theme&&"Fluent2HighContrast"!==d.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r||n.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):n.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")),!(-1<A.Browser.userAgent.toString().indexOf("HeadlessChrome"))),r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+n.outerHTML+"</svg>",s=window.URL.createObjectURL(new Blob("SVG"===h?[r]:[(new XMLSerializer).serializeToString(n)],{type:"image/svg+xml"}));"SVG"===h?g?Lt(p,h,s,a):e(null):(i=new Image,l=o.getContext("2d"),i.onload=function(){l.drawImage(i,0,0),window.URL.revokeObjectURL(s),g?Lt(p,h,o.toDataURL("image/png").replace("image/png","image/octet-stream"),a):"JPEG"===h?e(o.toDataURL("image/jpeg")):"PNG"===h&&e(o.toDataURL("image/png"))},i.src=s)})},Pt.prototype.getModuleName=function(){return"ImageExport"},Pt.prototype.destroy=function(){};var Dt=Pt;function Pt(e){}zt.prototype.export=function(s,e,d,h,p){return new Promise(function(i,e){var l=A.createElement("canvas",{id:"ej2-canvas",attrs:{width:s.availableSize.width.toString(),height:s.availableSize.height.toString()}}),t=(h=A.isNullOrUndefined(h)?w.PdfPageOrientation.Landscape:h,s.svgObject.cloneNode(!0)),o=t.childNodes[0],n=(A.isNullOrUndefined(o)||(o=o.getAttribute("fill"),"Tailwind"!==s.theme&&"Tailwind3"!==s.theme&&"Bootstrap5"!==s.theme&&"Fluent"!==s.theme&&"Material3"!==s.theme&&"Fluent2"!==s.theme||"rgba(255,255,255, 0.0)"!==o&&"transparent"!==o?"TailwindDark"!==s.theme&&"Tailwind3Dark"!==s.theme&&"Bootstrap5Dark"!==s.theme&&"FluentDark"!==s.theme&&"Material3Dark"!==s.theme&&"Fluent2Dark"!==s.theme&&"Fluent2HighContrast"!==s.theme||"rgba(255,255,255, 0.0)"!==o&&"transparent"!==o||t.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):t.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")),window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(t)],{type:"image/svg+xml"}))),r=new Image,a=l.getContext("2d");r.onload=function(){a.drawImage(r,0,0),window.URL.revokeObjectURL(n);var e=new w.PdfDocument,t=l.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");e.pageSettings.orientation=h,t=t.slice(t.indexOf(",")+1),e.pages.add().graphics.drawImage(new w.PdfBitmap(t),0,0,s.availableSize.width-60,s.availableSize.height),p?(e.save(d+".pdf"),e.destroy()):i(null)},r.src=n})},zt.prototype.getModuleName=function(){return"PdfExport"},zt.prototype.destroy=function(){};var Bt=zt;function zt(e){}Ht=function(e,t){return(Ht=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var Ht,Rt,i=function(e,t){function i(){this.constructor=e}Ht(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},f=function(e,t,i,l){var o,n=arguments.length,r=n<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,l);else for(var a=e.length-1;0<=a;a--)(o=e[a])&&(r=(n<3?o(r):3<n?o(t,i,r):o(t,i))||r);return 3<n&&r&&Object.defineProperty(t,i,r),r},i=(Rt=A.Component,i(v,Rt),v.prototype.preRender=function(){var e=this;this.trigger(N,{treemap:this},function(){e.initPrivateVariable(),e.unWireEVents(),e.createSvg(),e.wireEVents(),e.setCulture()})},v.prototype.render=function(){this.renderElements()},v.prototype.renderElements=function(){this.treemapLevelData=new Ut,this.treemapLevelData.levelsData=null,this.treemapLevelData.defaultLevelsData=null,this.treemapLevelData.hierarchyData=null,this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=Nt(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),A.isNullOrUndefined(this.treemapLevelData.levelsData)||(this.treemapLevelData.defaultLevelsData=this.treemapLevelData.levelsData),this.processDataManager()},v.prototype.processDataManager=function(){var e,t,l=this;this.dataSource instanceof F.DataManager?(e=this.dataSource,t=this.query instanceof F.Query?this.query:new F.Query,e.executeQuery(t).then(function(e){l.dataSource=e.result,l.renderTreeMapElements()})):this.dataSource instanceof It?(e=this.dataSource,(t=new A.Fetch(e.dataOptions,e.type,e.contentType)).onSuccess=function(e){var t,i;A.isNullOrUndefined(e.type)||"application/octet-stream"!==e.type?(l.dataSource=e,l.renderTreeMapElements()):(t=new FileReader,i=l,t.onload=function(){e=JSON.parse(t.result.toString()),i.dataSource=e,i.renderTreeMapElements()},t.readAsText(e))},t.send(e.sendData)):this.renderTreeMapElements()},v.prototype.renderTreeMapElements=function(){this.processingData(),this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.renderLegend(),this.layout.processLayoutPanel(),this.element.appendChild(this.svgObject),!A.isNullOrUndefined(this.treeMapLegendModule)&&this.legendSettings.visible&&ct(this,this.treeMapLegendModule.legendGroup),this.elementChange(),this.trigger(_,{treemap:this,isResized:this.isResize}),this.isResize=!1,this.renderComplete()},v.prototype.createSvg=function(){if(this.svgObject){for(;0<this.svgObject.childNodes.length;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&A.remove(this.svgObject)}A.isNullOrUndefined(this.renderer)&&(this.renderer=new C.SvgRenderer(this.element.id)),A.isNullOrUndefined(this.layout)&&(this.layout=new Mt(this)),this.clearTemplate();var e=this.element.clientWidth,t=this.element.clientHeight;this.availableSize=new W(Be(this.width,e)||e||600,Be(this.height,t)||t||450),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},v.prototype.initPrivateVariable=function(){var e;""===this.element.id&&(e=document.getElementsByClassName("e-treemap").length,this.element.id="treemap_control_"+e),this.renderer=new C.SvgRenderer(this.element.id),this.layout=new Mt(this)},v.prototype.createSecondaryElement=function(){var e=document.getElementById(this.element.id+"_Secondary_Element");e&&0<e.childElementCount&&e.parentNode.removeChild(e),A.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))&&((e=A.createElement("div",{id:this.element.id+"_Secondary_Element"})).style.cssText="position: absolute;z-index:1;",this.element.appendChild(e))},v.prototype.elementChange=function(){this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.legendGroup&&this.layout.layoutGroup&&!A.isNullOrUndefined(this.svgObject)&&!A.isNullOrUndefined(document.getElementById(this.layout.layoutGroup.id))&&!A.isNullOrUndefined(document.getElementById(this.treeMapLegendModule.legendGroup.id))&&this.svgObject.insertBefore(this.layout.layoutGroup,this.treeMapLegendModule.legendGroup)},v.prototype.renderBorder=function(){var e=this.border.width,t=this.svgObject.querySelector("#"+this.element.id+"_TreeMap_Border");(0<this.border.width||this.background||this.themeStyle.backgroundColor)&&A.isNullOrUndefined(t)?(e=new L(this.element.id+"_TreeMap_Border",this.background||this.themeStyle.backgroundColor,this.border,1,new j(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e)),this.svgObject.appendChild(this.renderer.drawRectangle(e))):t&&t.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},v.prototype.renderTitle=function(e,t,i,l){var o,n,r,a,s={color:e.textStyle.color,size:e.textStyle.size,fontFamily:e.textStyle.fontFamily,fontStyle:e.textStyle.fontStyle,fontWeight:e.textStyle.fontWeight,opacity:e.textStyle.opacity},d=this.availableSize.width-this.margin.right-this.margin.left;s.fontFamily=s.fontFamily||this.themeStyle.fontFamily,s.fontWeight=s.fontWeight||this.themeStyle.titleFontWeight,s.size=s.size||("title"===t?this.themeStyle.fontSize:this.themeStyle.subtitleFontSize),e.text?(A.isNullOrUndefined(l)&&(l=this.renderer.createGroup({id:this.element.id+"_Title_Group"})),a=V(r=G(d,n=this.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(e.text):e.text,s),s),i=He(A.isNullOrUndefined(i)?new j(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):i,e.alignment,a,t),r=new T(this.element.id+"_TreeMap_"+t,i.x,i.y,"start",r),i=new j(i.x,i.y,a.width,a.height),(a=Ue(r,s,s.color||("title"===t?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),l)).setAttribute("aria-label",e.description||n),a.setAttribute("role","region"),a.setAttribute("tabindex",this.tabIndex.toString()),("title"!==t||e.subtitleSettings.text)&&"subtitle"!==t||(o=this.availableSize.height-i.y-10-this.margin.bottom,this.areaRect=new j(this.margin.left,i.y+10,d,o)),"subtitle"!==t&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",i,l):this.svgObject.appendChild(l)):(o=this.availableSize.height-this.margin.top-this.margin.bottom,this.areaRect=new j(this.margin.left,this.margin.top,d,o))},v.prototype.processingData=function(){var t=this;if(this.dataSource=this.dataSource,!A.isNullOrUndefined(this.dataSource)&&0<this.dataSource.length&&this.weightValuePath){if(this.treemapLevelData.levelsData=[],this.dataSource.map(function(e){e[t.weightValuePath]=e[t.weightValuePath]&&e[t.weightValuePath].toString()}),this.leafItemSettings.labelPath=this.leafItemSettings.labelPath||this.weightValuePath,this.checkIsHierarchicalData(),0===this.levels.length){var i={level:0},l=this.leafItemSettings.labelPath;i[l]=[];for(var e=0;e<this.dataSource.length;e++){var o=H(this.dataSource[e]).values;this.isHierarchicalData&&o&&0<o.length?o.forEach(function(e){e[l]&&i[l].push({groupIndex:0,name:e[l],levelOrderName:e[l].toString(),data:e,weight:e[t.weightValuePath]})}):this.dataSource[e][l]&&i[l].push({groupIndex:0,name:this.dataSource[e][l],levelOrderName:this.dataSource[e][l].toString(),data:this.dataSource[e],weight:this.dataSource[e][this.weightValuePath]})}this.treemapLevelData.levelsData.push(i)}else{if(this.isHierarchicalData){this.treemapLevelData.hierarchyData=[],this.treemapLevelData.hierarchyData=A.extend([],this.dataSource,this.treemapLevelData.hierarchyData,!0);for(e=0;e<this.treemapLevelData.hierarchyData.length;e++)this.processHierarchicalData(this.treemapLevelData.hierarchyData[e],e);this.treemapLevelData.levelsData=this.treemapLevelData.hierarchyData}else this.processFlatJsonData(),1<this.treemapLevelData.levelsData.length&&this.reOrderLevelData(this.treemapLevelData.levelsData.length-1);l=this.levels[0].groupPath}this.isHierarchicalData||this.findTotalWeight(this.treemapLevelData.levelsData[0][l],"Parent")}},v.prototype.checkIsHierarchicalData=function(){var e;this.dataSource=this.dataSource;for(var t=0;t<this.dataSource.length;t++){if((e=H(this.dataSource[t]).values)&&e.length){this.isHierarchicalData=!0;break}t===this.dataSource.length-1&&(this.isHierarchicalData=!1)}},v.prototype.processHierarchicalData=function(e,t){var i,l=this,o={},n=this.leafItemSettings.labelPath||this.weightValuePath,r=(o=H(e))?o.values:null;if(r&&0<r.length){for(var a=o.key,s=0;s<this.levels.length;s++)a===this.levels[s].groupPath&&(i=s);for(var d=0;d<r.length;d++){r[d].name=r[d][n],r[d].levelOrderName=(0===i?r[d].name:e.levelOrderName+"#"+r[d].name)+"";var h=r[d].levelOrderName,p=void 0;0<h.search("#")&&(p=h.split("#").length-1),r[d].groupIndex=A.isNullOrUndefined(i)?p===this.levels.length?this.levels.length:p:i,0!==i&&(r[d].parent=e),r[d].groupName=a,r[d].data=r[d],r[d].isDrilled=!1,r[d].weight=r[d][this.weightValuePath]}r.forEach(function(e){l.processHierarchicalData(e,t)})}if(t===this.treemapLevelData.hierarchyData.length-1){var g=this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];if(!A.isNullOrUndefined(g)){for(var c=0;c<this.treemapLevelData.hierarchyData.length;c++)r=H(this.treemapLevelData.hierarchyData[c]).values,0!==c&&r&&(r.forEach(function(e){g.push(e)}),this.treemapLevelData.hierarchyData.splice(c,1),--c);for(var g=this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath],m=0;m<g.length;m++)(o[this.levels[0].groupPath]=g)[m].parent=o}}},v.prototype.print=function(e){this.allowPrint&&this.printModule&&this.printModule.print(this,e)},v.prototype.export=function(i,l,o,n){var r=this;return A.isNullOrUndefined(n)&&(n=!0),"PDF"===i&&this.allowPdfExport&&this.pdfExportModule?new Promise(function(e,t){e(r.pdfExportModule.export(r,i,l,o,n))}):this.allowImageExport&&"PDF"!==i&&this.imageExportModule?new Promise(function(e,t){e(r.imageExportModule.export(r,i,l,n))}):null},v.prototype.processFlatJsonData=function(){this.dataSource=this.dataSource;for(var e=[],t=0;t<this.levels.length+1;t++){var i=this.levels[t]?this.levels[t].groupPath:this.leafItemSettings.labelPath,l={};l.level=t,l[i]=[],this.treemapLevelData.levelsData.push(l);for(var o=0;o<this.dataSource.length;o++){var n={},r="";if(!A.isNullOrUndefined(i)){var a=this.dataSource[o][i];if(0!==t)for(var s=0;s<=t;s++){var d=this.levels[s]?this.levels[s].groupPath:i;r+=this.dataSource[o][d]+(s===t?"":"#")}0<e.length&&-1!==e.indexOf(r||a)||(n.name=a,n.levelOrderName=(r||a)+"",n.groupIndex=t,n.isDrilled=!1,n.groupName=i,n.data=this.dataSource[o],this.treemapLevelData.levelsData[this.treemapLevelData.levelsData.length-1][i].push(n),e.push(r||a))}}}},v.prototype.reOrderLevelData=function(e){for(var t=this.levels[e]?this.levels[e].groupPath:this.leafItemSettings.labelPath,i=this.levels[e-1].groupPath,l=this.treemapLevelData.levelsData[e][t],o=this.treemapLevelData.levelsData[e-1][i],n=0;n<l.length;n++)for(var r=l[n].levelOrderName,a=0;a<o.length;a++)if(o[a][t]=A.isNullOrUndefined(o[a][t])?[]:o[a][t],this.IsChildHierarchy(r.split("#"),o[a].levelOrderName.split("#"))){A.isNullOrUndefined(l[n].parent)&&(l[n].parent=o[a]),o[a][t].push(l[n]);break}this.findTotalWeight(this.treemapLevelData.levelsData[this.treemapLevelData.levelsData.length-1][t],"Child"),this.treemapLevelData.levelsData.splice(e,1),0<e-1&&this.reOrderLevelData(e-1)},v.prototype.IsChildHierarchy=function(e,t){for(var i=!1,l=0;l<t.length;l++){if(e.length<l||t[l]!==e[l])return!1;i=!0}return i},v.prototype.findTotalWeight=function(i,e){for(var l,o,n,r=this,a={},s=this,t=0;t<i.length;t++)!function(t){l=0,n=i[t].groupName,o=i[t].levelOrderName.split("#"),s.dataSource.forEach(function(e){je(o,i[t].levelOrderName,e,r)&&(l+=parseFloat(e[r.weightValuePath]))}),"Parent"===e&&((a[n]=i)[t].parent=a),i[t].weight=l}(t)},v.prototype.unWireEVents=function(){A.EventHandler.remove(this.element,"click",this.clickOnTreeMap),A.EventHandler.remove(this.element,"dblclick",this.doubleClickOnTreeMap),A.EventHandler.remove(this.element,"contextmenu",this.rightClickOnTreeMap),A.EventHandler.remove(this.element,A.Browser.touchStartEvent,this.mouseDownOnTreeMap),A.EventHandler.remove(this.element,A.Browser.touchMoveEvent,this.mouseMoveOnTreeMap),A.EventHandler.remove(this.element,A.Browser.touchEndEvent,this.mouseEndOnTreeMap),A.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap),A.EventHandler.remove(this.element,"keydown",this.keyDownHandler),A.EventHandler.remove(this.element,"keyup",this.keyUpHandler),A.EventHandler.remove(this.element,"focusout",this.focusHandler),window.removeEventListener("resize",this.resizeEvent)},v.prototype.wireEVents=function(){A.EventHandler.add(this.element,"click",this.clickOnTreeMap,this),A.EventHandler.add(this.element,"dblclick",this.doubleClickOnTreeMap,this),A.EventHandler.add(this.element,"contextmenu",this.rightClickOnTreeMap,this),A.EventHandler.add(this.element,A.Browser.touchStartEvent,this.mouseDownOnTreeMap,this),A.EventHandler.add(this.element,A.Browser.touchMoveEvent,this.mouseMoveOnTreeMap,this),A.EventHandler.add(this.element,A.Browser.touchEndEvent,this.mouseEndOnTreeMap,this),A.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap,this),A.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),A.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),A.EventHandler.add(this.element,"focusout",this.focusHandler,this),this.resizeEvent=this.resizeOnTreeMap.bind(this),window.addEventListener("resize",this.resizeEvent),this.setStyle(this.element)},v.prototype.setStyle=function(e){e.style.overflow="hidden"},v.prototype.setCulture=function(){this.intl=new A.Internationalization},v.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"TreeMap Element"),this.element.setAttribute("role","region"),this.element.setAttribute("tabindex",this.tabIndex.toString())},v.prototype.resizeOnTreeMap=function(e){var t,i=this;this.isDestroyed||(this.isResize=!0,t={name:oe,cancel:!1,previousSize:this.availableSize,currentSize:new W(0,0),treemap:this},this.resizeTo&&clearTimeout(this.resizeTo),!A.isNullOrUndefined(this.element)&&this.element.classList.contains("e-treemap")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSvg(),i.refreshing=!0,i.wireEVents(),t.currentSize=i.availableSize,i.trigger(oe,t,function(e){i.render(),i.refreshing=!1})},500)))},v.prototype.clickOnTreeMap=function(e){var t,i=this,l=e.target,o=l.id,n=l.innerHTML,r=(this.trigger($,{cancel:!1,name:$,treemap:this,mouseEvent:e}),-1<o.indexOf("_Item_Index")&&(e.preventDefault(),r=parseFloat(o.split("_Item_Index_")[1]),r={cancel:!1,name:Z,treemap:this,item:this.layout.renderItems[r],mouseEvent:e,groupIndex:this.layout.renderItems[r].groupIndex,groupName:this.layout.renderItems[r].name,text:n,contentItemTemplate:n},this.trigger(Z,r,function(e){e.text===n&&e.contentItemTemplate===n||(A.isNullOrUndefined(i.leafItemSettings.labelTemplate)?(e.text=mt(e.text,e.item.data,e.treemap),l.textContent=e.text):ke(o,l,e.contentItemTemplate))})),(new Date).getMilliseconds());A.isNullOrUndefined(this.doubleClick)||!A.isNullOrUndefined(t)&&r-t<500&&this.doubleClickOnTreeMap(e)},v.prototype.doubleClickOnTreeMap=function(e){this.trigger(K,{cancel:!1,name:K,treemap:this,mouseEvent:e})},v.prototype.rightClickOnTreeMap=function(e){this.trigger(ee,{cancel:!1,name:ee,treemap:this,mouseEvent:e})},v.prototype.mouseDownOnTreeMap=function(e){-1<e.target.id.indexOf("_Item_Index")&&(this.mouseDown=!0),"touchstart"!==e.type&&"mousedown"!==e.type||(this.removeFocus("none"),e.preventDefault()),this.notify(A.Browser.touchStartEvent,e)},v.prototype.mouseMoveOnTreeMap=function(e){var t,i=e.target.id;this.trigger(te,{cancel:!1,name:te,treemap:this,mouseEvent:e}),this.removeFocus("none"),-1<i.indexOf("_Item_Index")?(t=H(i=this.layout.renderItems[parseFloat(i.split("_Item_Index_")[1])]).values,this.element.style.cursor=!i.isLeafItem&&t&&0<t.length&&this.enableDrillDown?"pointer":"auto",this.trigger(Q,{cancel:!1,name:Q,treemap:this,item:i,mouseEvent:e})):this.element.style.cursor="default",this.notify(A.Browser.touchMoveEvent,e)},v.prototype.calculateSelectedTextLevels=function(e,t){for(var i,l,o,n=t.levelOrderName.split("#"),r=0,a=Object.keys(n);r<a.length;r++)n[l=a[r]]===e&&(i=parseInt(l,10),o=e);return{drillLevel:i,currentLevelLabel:o,levelText:n}},v.prototype.calculatePreviousLevelChildItems=function(e,t,i){for(var l,o,n=0,r=this.layout.renderItems[0].levelOrderName.split("#").length,a=0;a<r;a++)o=0===a?e.levelText[a]:o+"#"+e.levelText[a];for(var s,n=1<r?r:n,d=0,h=Object.values(this.layout.renderItems);d<h.length;d++)(s=h[d]).levelOrderName.split("#")[0]===e.levelText[0]&&(l=0===n?A.isNullOrUndefined(o)?o:e.levelText[n]:i?o:o+"#"+e.levelText[n])===s.levelOrderName&&(this.drilledItems.push({name:s.levelOrderName,data:s}),i=!0,++n<=t.groupIndex)&&(o=l+"#"+e.levelText[n]);return i},v.prototype.compareSelectedLabelWithDrillDownItems=function(e,t,i){var l,o={};return e.drillLevel+1===this.drilledItems[i].data.groupIndex?((l=this.drilledItems[i].data.parent).isDrilled=!0,o[l[this.drilledItems[i].data.groupName]]=[l],this.drilledItems.splice(i,this.drilledItems.length)):e.drillLevel!==this.drilledItems.length-1&&e.drillLevel!==t.groupIndex||(o[t.groupName]=[t]),o},v.prototype.mouseEndOnTreeMap=function(e){var i,l,t,o=this,n=e.target,r=n.id,a=!1,s={},d=this.element.id+"_TreeMap_"+this.layoutType+"_Layout",h=this.element.id+"_Label_Template_Group";if(-1<r.indexOf("_Item_Index")&&this.enableDrillDown&&!this.drillMouseMove){e.cancelable&&e.preventDefault(),r=parseFloat(r.split("_Item_Index_")[1]),p=this.layout.renderItems[r];var r=n.textContent;if(this.enableBreadcrumb&&(t=this.calculateSelectedTextLevels(r,p),l=t.drillLevel,this.drillDownView||-1===r.search("[+]")||(a=this.calculatePreviousLevelChildItems(t,p,a))),0!==this.levels.length&&!p.isLeafItem&&H(p).values&&0<H(p).values.length){if(0<this.drilledItems.length)for(var p=a?this.drilledItems[this.drilledItems.length-1].data:p,g=0;g<this.drilledItems.length;g++){if(!A.isNullOrUndefined(l)){var c=this.drilledItems.length,s=this.compareSelectedLabelWithDrillDownItems(t,p,g);if(c!==this.drilledItems.length){--g;break}}if(p.levelOrderName===this.drilledItems[g].name&&!a&&A.isNullOrUndefined(l)){0===p.groupIndex&&p.parent[p.groupName]instanceof Array?(p.isDrilled=!p.isDrilled,p.isDrilled?s[p.groupName]=[p]:s=p.parent):(p.isDrilled=!1,p.parent.isDrilled=!0,p=p.parent,s[p.groupName]=[p]),this.drilledItems.splice(g,1),--g;break}g===this.drilledItems.length-1&&A.isNullOrUndefined(l)&&(p.isDrilled=!0,s[p.groupName]=[p])}else p.isDrilled=!0,s[p.groupName]=[p];r={cancel:!1,name:k,treemap:this,element:n,groupIndex:(this.enableBreadcrumb&&0!==this.drilledItems.length&&!A.isNullOrUndefined(l)?this.drilledItems[this.drilledItems.length-1].data:p).groupIndex,groupName:(this.enableBreadcrumb&&0!==this.drilledItems.length&&!A.isNullOrUndefined(l)?this.drilledItems[this.drilledItems.length-1].data:p).name,rightClick:3===e.which,childItems:null,item:s},this.trigger(k,r,function(e){var t;o.currentLevel=p.isDrilled&&A.isNullOrUndefined(l)?p.groupIndex:!A.isNullOrUndefined(l)&&o.enableBreadcrumb&&p.isDrilled?l:null,e.cancel||(document.getElementById(d)&&(t=document.getElementById(d)).parentNode.removeChild(t),i=A.extend({},o.areaRect,i,!0),o.legendSettings.visible&&!A.isNullOrUndefined(o.treeMapLegendModule)&&(A.isNullOrUndefined(s)||(o.treeMapLegendModule.legendGroup.textContent="",o.treeMapLegendModule.legendGroup=null,o.treeMapLegendModule.widthIncrement=0,o.treeMapLegendModule.heightIncrement=0,o.enableBreadcrumb&&!A.isNullOrUndefined(l)?o.drilledLegendItems={name:o.drilledItems[o.drilledItems.length-1].data.levelOrderName,data:o.drilledItems[o.drilledItems.length-1].data}:o.drilledLegendItems={name:p.levelOrderName,data:p},o.treeMapLegendModule.renderLegend()),i=A.isNullOrUndefined(o.totalRect)?i:o.totalRect),document.getElementById(h)&&(t=document.getElementById(h)).parentNode.removeChild(t),A.isNullOrUndefined(e.childItems)||e.cancel?(o.layout.calculateLayoutItems(s,i),o.layout.renderLayoutItems()):o.layout.onDemandProcess(e.childItems))}),n={cancel:!1,name:q,treemap:this,renderItems:this.layout.renderItems},this.trigger(q,n),!a&&A.isNullOrUndefined(l)&&this.drilledItems.push({name:p.levelOrderName,data:p})}}this.mouseDown=!1,this.notify(A.Browser.touchEndEvent,e)},v.prototype.mouseLeaveOnTreeMap=function(e){this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapLegendModule&&this.treeMapLegendModule.removeInteractivePointer(),D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&(B(this.treeMapHighlightModule.shapeHighlightCollection,this),this.treeMapHighlightModule.highLightId=""),this.removeFocus("")},v.prototype.keyUpHandler=function(e){var t;"Tab"===e.code&&(e=e.target.id,t=document.getElementById(e),-1<e.indexOf("Item_Index")||-1<e.indexOf("Legend")?(this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapHighlightModule&&this.highlightSettings.enable?(t.style.setProperty("outline","none"),t.classList.add("keyboard-focused"),e=-1<e.indexOf("_Legend_")&&"Default"===this.legendSettings.mode?t.children[0]:t,this.treeMapHighlightModule.highlightOnMouseMove(e)):(this.removeFocus(""),t.style.outline="2px solid black",t.classList.add("keyboard-focused"))):(D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&B(this.treeMapHighlightModule.shapeHighlightCollection,this),this.removeFocus("none")))},v.prototype.keyDownHandler=function(e){var t=e.target.id,i=document.getElementById(t);"Enter"===e.code&&(this.selectionSettings.enable&&(-1<t.indexOf("Item_Index")||-1<t.indexOf("Legend"))&&(t=-1<t.indexOf("_Legend_")&&"Default"===this.legendSettings.mode?i.children[0]:i,this.treeMapSelectionModule.selectionOnMouseDown(t)),this.enableDrillDown)&&0<i.childElementCount&&this.mouseEndOnTreeMap(e)},v.prototype.focusHandler=function(e){var t=e.target.id;(!this.element.contains(e.relatedTarget)||-1<t.indexOf("Item_Index")&&-1<e.relatedTarget.id.indexOf("Legend")||-1<t.indexOf("Legend")&&-1<e.relatedTarget.id.indexOf("Item_Index"))&&(this.treeMapHighlightModule&&this.highlightSettings.enable?(D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),B(this.treeMapHighlightModule.legendHighlightCollection,this),this.treeMapHighlightModule.highLightId=""):this.removeFocus("none"))},v.prototype.removeFocus=function(e){var t=document.querySelector(".keyboard-focused");t&&(t.style.outline=e,t.classList.remove("keyboard-focused"))},v.prototype.selectItem=function(e,t){A.isNullOrUndefined(t)&&(t=!0);for(var i="",l=0;l<e.length;l++)l!==e.length-1?i+=e[l]+"#":i+=e[l];this.treeMapSelectionModule&&this.selectionSettings.enable&&this.treeMapSelectionModule.selectTreemapItem(i,t)},v.prototype.requiredModules=function(){var e=[];return this.tooltipSettings.visible&&e.push({member:"treeMapTooltip",args:[this],name:"TreeMapTooltip"}),this.highlightSettings.enable&&e.push({member:"treeMapHighlight",args:[this],name:"TreeMapHighlight"}),this.selectionSettings.enable&&e.push({member:"treeMapSelection",args:[this],name:"TreeMapSelection"}),this.legendSettings.visible&&e.push({member:"treeMapLegend",args:[this],name:"TreeMapLegend"}),this.allowPrint&&e.push({member:"Print",args:[this,_t],name:"Print"}),this.allowImageExport&&e.push({member:"ImageExport",args:[this,Dt],name:"ImageExport"}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this,Bt],name:"PdfExport"}),e},v.prototype.onPropertyChanged=function(e,t){if(!this.isDestroyed){for(var i=!1,l=0,o=Object.keys(e);l<o.length;l++)switch(o[l]){case"background":this.renderBorder();break;case"height":case"width":case"layoutType":case"levels":case"drillDownView":case"renderDirection":case"leafItemSettings":case"legendSettings":case"dataSource":i=!0}i&&(this.createSvg(),this.renderElements())}},v.prototype.getModuleName=function(){return"treemap"},v.prototype.destroy=function(){this.unWireEVents(),Tt("treeMapMeasureText"),this.drilledItems=[],this.levelSelection=[],this.legendId=[],this.removeSvg(),Rt.prototype.destroy.call(this),this.areaRect=null,this.themeStyle=null,this.totalRect=null,this.drilledLegendItems=null,this.doubleTapTimer=null,this.treemapLevelData=null,this.resizeEvent=null,this.availableSize=null,this.intl=null,A.isNullOrUndefined(this.layout)||this.layout.destroy(),this.layout=null,this.renderer=null},v.prototype.removeSvg=function(){if(Tt(this.element.id+"_Secondary_Element"),this.svgObject){for(;0<this.svgObject.childNodes.length;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&A.remove(this.svgObject)}},f([A.Property(!(v.prototype.getPersistData=function(){return""}))],v.prototype,"allowPrint",void 0),f([A.Property(!1)],v.prototype,"allowImageExport",void 0),f([A.Property(!1)],v.prototype,"allowPdfExport",void 0),f([A.Property(null)],v.prototype,"width",void 0),f([A.Property(null)],v.prototype,"height",void 0),f([A.Complex({},l)],v.prototype,"border",void 0),f([A.Complex({},se)],v.prototype,"margin",void 0),f([A.Property(null)],v.prototype,"background",void 0),f([A.Property("Material")],v.prototype,"theme",void 0),f([A.Complex({},fe)],v.prototype,"titleSettings",void 0),f([A.Property("Squarified")],v.prototype,"layoutType",void 0),f([A.Property(null)],v.prototype,"dataSource",void 0),f([A.Property(null)],v.prototype,"query",void 0),f([A.Property(null)],v.prototype,"weightValuePath",void 0),f([A.Property("")],v.prototype,"rangeColorValuePath",void 0),f([A.Property("")],v.prototype,"equalColorValuePath",void 0),f([A.Property(null)],v.prototype,"colorValuePath",void 0),f([A.Property([])],v.prototype,"palette",void 0),f([A.Property("TopLeftBottomRight")],v.prototype,"renderDirection",void 0),f([A.Property(!1)],v.prototype,"enableDrillDown",void 0),f([A.Property(!1)],v.prototype,"enableBreadcrumb",void 0),f([A.Property(" - ")],v.prototype,"breadcrumbConnector",void 0),f([A.Property(!1)],v.prototype,"drillDownView",void 0),f([A.Property(!1)],v.prototype,"enableHtmlSanitizer",void 0),f([A.Complex({},Fe)],v.prototype,"initialDrillDown",void 0),f([A.Complex({},Le)],v.prototype,"leafItemSettings",void 0),f([A.Collection([],t)],v.prototype,"levels",void 0),f([A.Complex({},De)],v.prototype,"highlightSettings",void 0),f([A.Complex({},_e)],v.prototype,"selectionSettings",void 0),f([A.Complex({},Me)],v.prototype,"tooltipSettings",void 0),f([A.Complex({},Ie)],v.prototype,"legendSettings",void 0),f([A.Property(!1)],v.prototype,"useGroupingSeparator",void 0),f([A.Property(null)],v.prototype,"description",void 0),f([A.Property(0)],v.prototype,"tabIndex",void 0),f([A.Property(null)],v.prototype,"format",void 0),f([A.Event()],v.prototype,"load",void 0),f([A.Event()],v.prototype,"beforePrint",void 0),f([A.Event()],v.prototype,"loaded",void 0),f([A.Event()],v.prototype,"itemRendering",void 0),f([A.Event()],v.prototype,"drillStart",void 0),f([A.Event()],v.prototype,"drillEnd",void 0),f([A.Event()],v.prototype,"itemSelected",void 0),f([A.Event()],v.prototype,"itemHighlight",void 0),f([A.Event()],v.prototype,"tooltipRendering",void 0),f([A.Event()],v.prototype,"itemClick",void 0),f([A.Event()],v.prototype,"itemMove",void 0),f([A.Event()],v.prototype,"click",void 0),f([A.Event()],v.prototype,"doubleClick",void 0),f([A.Event()],v.prototype,"rightClick",void 0),f([A.Event()],v.prototype,"mouseMove",void 0),f([A.Event()],v.prototype,"resize",void 0),f([A.Event()],v.prototype,"legendItemRendering",void 0),f([A.Event()],v.prototype,"legendRendering",void 0),f([A.NotifyPropertyChanges],v));function v(e,t){e=Rt.call(this,e,t)||this;return e.isResize=!1,e.orientation="Horizontal",e.drilledItems=[],e.isHierarchicalData=!1,e.levelSelection=[],e.legendId=[],e}var Ut=function(){},f=(S.prototype.renderLegend=function(){var t=this,e=(this.page=0,this.legendRenderingCollections=[],this.legendCollections=[],this.legendNames=[],this.totalPages=[],this.gradientCount=1,this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.treemap.renderer.createDefs(),this.treemap.svgObject.appendChild(this.defsElement),{cancel:!1,name:le,treemap:this.treemap,_changePosition:this.treemap.legendSettings.position,position:this.treemap.legendSettings.position});this.treemap.trigger(le,e,function(e){e.cancel||e._changePosition===t.treemap.legendSettings.position||(t.treemap.legendSettings.position=e._changePosition),t.calculateLegendBounds(),0<t.legendCollections.length&&t.drawLegend()})},S.prototype.calculateLegendBounds=function(){var i=this,e=this.treemap,t=e.legendSettings;if(this.findColorMappingLegendItems(e.treemapLevelData.levelsData[0]),(!A.isNullOrUndefined(this.treemap.palette)&&0<this.treemap.palette.length||!A.isNullOrUndefined(e.colorValuePath))&&0===this.legendCollections.length&&this.findPaletteLegendItems(e.treemapLevelData.levelsData[0]),0<this.legendCollections.length){this.legendCollections.sort(function(e,t){return e.levelIndex>t.levelIndex?1:e.levelIndex<t.levelIndex?-1:0}),this.legendCollections.sort(function(e,t){return e.groupIndex>t.groupIndex?1:e.groupIndex<t.groupIndex?-1:0}),this.legendCollections.sort(function(e,t){return e.leafIndex>t.leafIndex?1:e.leafIndex<t.leafIndex?-1:0});var l=t.position,z=e.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(t.title.text):t.title.text,o=t.titleStyle,H=t.mode,n=0,r=0,a=0,s=0,d=t.shapeHeight,h=t.shapeWidth,p=[],g=[],c="None"===t.orientation?"Top"===l||"Bottom"===l||"Auto"===l&&e.availableSize.width<=e.availableSize.height?"Horizontal":"Vertical":t.orientation,m=1<t.width.length?-1<t.width.indexOf("%")?e.availableSize.width/100*parseFloat(t.width):parseFloat(t.width):null,u=1<t.height.length?-1<t.height.indexOf("%")?e.availableSize.height/100*parseFloat(t.height):parseFloat(t.height):null,R=(o.fontFamily=o.fontFamily||e.themeStyle.fontFamily,o.fontWeight=o.fontWeight||e.themeStyle.titleFontWeight,o.size=o.size||e.themeStyle.subtitleFontSize,V(z,o)),y=0,f=0,v=t.shapePadding,S=t.textStyle;if(S.size=S.size||e.themeStyle.legendFontSize,S.fontFamily=S.fontFamily||e.themeStyle.fontFamily,S.fontWeight=S.fontWeight||e.themeStyle.fontWeight,"Default"===H){for(var m=A.isNullOrUndefined(m)?e.areaRect.width:m,u=A.isNullOrUndefined(u)?e.areaRect.height:u,x=0,b=0;b<this.legendCollections.length;b++){var I,C,F,w=this.legendCollections[b],O=(A.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]}),V(e.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(w.legendName):w.legendName,S));this.textMaxWidth=Math.max(this.textMaxWidth,O.width),0===b?(y=n=10+h/2,f=r=10+R.height+(d>O.height?d/2:O.height/4)):(I=O.height>d?O.height:d,"Horizontal"===c?r=(F=g[x-1].x+g[x-1].width+10+h)+v+O.width>m?u<(C=(g[x-1].y>p[x-1].y+d/2?g[x-1].y:p[x-1].y+d/2)+10)+I?(this.getPageChanged(),x=0,p=[],g=[],n=y,f):(n=p[0].x,C+I/2):(n=F-h/2,p[x-1].y):u<(C=g[x-1].y>p[x-1].y+d/2?g[x-1].y:p[x-1].y+d/2)+10+I?(F=g[x-1].x+this.textMaxWidth+10)+v+O.width>m?(n=y,r=f,g=[],p=[],this.getPageChanged(),x=0):(n=F+h/2,r=p[0].y):(n=p[x-1].x,r=C+10+d/2)),a=n+h/2+v,s=r+O.height/4,p.push({x:n,y:r}),g.push({x:a,y:s,width:O.width,height:O.height/2}),this.totalPages[this.page].Collection.push({DisplayText:w.legendName,element:w.gradientElement,Shape:{x:n,y:r},Text:{x:a,y:s},Fill:w.legendFill,Data:w.legendData,Rect:{x:p[x].x-h/2,y:p[x].y-d/2<s-O.height?p[x].y-d/2:s-O.height,width:Math.abs(p[x].x-h/2-(a+O.width)),height:d>O.height?d:O.height}}),x++}l=this.totalPages[0].Collection;l.forEach(function(e,t){e=new j(e.Rect.x,e.Rect.y,e.Rect.width,e.Rect.height);0===t&&(y=e.x,f=e.y),i.widthIncrement=Math.max(i.widthIncrement,Math.abs(y-(e.x+e.width))),i.heightIncrement=Math.max(i.heightIncrement,Math.abs(f-(e.y+e.height)))}),m=this.widthIncrement<m?this.widthIncrement:m,u=this.heightIncrement<u?this.heightIncrement:u,this.legendItemRect={x:l[0].Rect.x,y:l[0].Rect.y,width:m,height:u}}else{for(var L=this.legendCollections.length,T="Horizontal"===c?A.isNullOrUndefined(m)?e.areaRect.width/L:m/L:A.isNullOrUndefined(m)?25:m,M="Horizontal"===c?A.isNullOrUndefined(u)?25:u:A.isNullOrUndefined(u)?e.areaRect.height/L:u/L,N=(y=0,f=R.height+10,t.labelPosition),_=0,E=0,U=t.labelDisplayMode,D=0,k=0,b=0;b<this.legendCollections.length;b++){var y="Horizontal"===c?y+T:y,f="Horizontal"===c?f:f+M,P=this.legendCollections[b].legendName,B=new W(0,0);"None"===U?B=V(P,S):"Trim"===U?B=V(P=G("Horizontal"===c?T:M,P,S),S):P="",D=Math.max(D,B.height),k=Math.max(k,B.width),0<B.width&&0<B.height&&(s="Horizontal"===c?(a=y+T/2,"After"===N?f+M+B.height/2+10:f-10):(a="After"===N?y-B.width/2-10:y+T+B.width/2+10,f+M/2+B.height/4)),0===b&&(_="Horizontal"!==c&&"After"===N?a-B.width/2:y,E="Horizontal"!==c||"After"===N?f:s-B.height/2),b===L-1&&(m="Horizontal"===c?Math.abs(y+T-_):T+k+10,u="Horizontal"===c?M+D/2+10:Math.abs(f+M-E)),this.legendRenderingCollections.push({fill:this.legendCollections[b].legendFill,x:y,y:f,width:T,height:M,element:this.legendCollections[b].gradientElement,text:P,textX:a,textY:s,textWidth:B.width,textHeight:B.height,data:this.legendCollections[b].legendData})}this.legendItemRect={x:_,y:E,width:m,height:u}}}},S.prototype.getPageChanged=function(){this.page++,A.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},S.prototype.findColorMappingLegendItems=function(e){var t=H(e).values;if(t&&0<t.length&&(this.calculateLegendItems(t),0<this.treemap.levels.length))for(var i=0;i<t.length;i++)this.findColorMappingLegendItems(t[i])},S.prototype.findPaletteLegendItems=function(e){var t,i;if(!A.isNullOrUndefined(this.treemap.drilledItems)&&0===this.treemap.drilledItems.length&&!A.isNullOrUndefined(this.treemap.initialDrillDown.groupName)&&A.isNullOrUndefined(this.treemap.drilledLegendItems))for(var l=H(e).values,o=0;o<l.length;o++)if(l[o].Name===this.treemap.initialDrillDown.groupName){l[o].isDrilled=!l[o].isDrilled,e=l[o],this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex,t=0<this.treemap.palette.length?this.treemap.palette[o%this.treemap.palette.length]:l[o].data[this.treemap.colorValuePath];break}if(this.treemap.enableDrillDown&&!A.isNullOrUndefined(this.treemap.drilledLegendItems)){var n,r=this.treemap.drilledLegendItems;if(A.isNullOrUndefined(r.data.options))for(o=0;o<r.length;o++){t=0<this.treemap.palette.length?this.treemap.palette[o%this.treemap.palette.length]:r[o].data[this.treemap.colorValuePath];break}else t=r.data.options.fill;n=(r.data.isDrilled?H(r.data):H(r.data.parent)).values}else n=H(e).values;if(n&&0<n.length){for(var a=0;a<n.length;a++)!A.isNullOrUndefined(n[a].data[this.treemap.legendSettings.showLegendPath])&&!n[a].data[this.treemap.legendSettings.showLegendPath]||(i=n[a].data[this.treemap.legendSettings.valuePath]||n[a].name,!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,i))||this.legendCollections.push({legendName:i,legendFill:0<this.treemap.palette.length?A.isNullOrUndefined(this.treemap.currentLevel)?this.treemap.palette[a%this.treemap.palette.length]:t:n[a].data[this.treemap.colorValuePath],legendData:[],itemArea:n[a].weight,levelOrderName:n[a].levelOrderName});if(this.legendCollections.sort(pt),0<this.treemap.palette.length)for(var s=0;s<this.legendCollections.length;s++)this.legendCollections[s].legendFill=A.isNullOrUndefined(this.treemap.currentLevel)?this.treemap.palette[s%this.treemap.palette.length]:t}},S.prototype.calculateLegendItems=function(e){var t,i,l,o,n,r,a=!1,s=this.treemap.leafItemSettings,d=this.treemap.levels,h=this.treemap.legendSettings.position,p=!1,g=0;this.outOfRangeLegend=null;for(var c=0;c<e.length;c++){i="",p=r=n=!1;for(var m,u=e[c].data,y=e[c].groupIndex,f=((m=0===this.treemap.levels.length||y===this.treemap.levels.length)?s:d[y]).colorMapping,v=0;v<f.length;v++){var S=f[v];if(w=null,C=Number(u[this.treemap.rangeColorValuePath]),F=u[this.treemap.equalColorValuePath],S.value=A.isNullOrUndefined(S.value)?S.value:S.value.toString(),!A.isNullOrUndefined(S.from)&&!A.isNullOrUndefined(S.to)&&C>=S.from&&C<=S.to&&S.showLegend?(r=a=!0,o=S.from+" - "+S.to,l=A.isNullOrUndefined(S.label)?S.from+" - "+S.to:S.label,i=A.isNullOrUndefined(S.color)?i:S.color,t=this.isAddNewLegendData(o)):!A.isNullOrUndefined(S.value)&&F===S.value&&S.showLegend&&(n=a=!0,o=S.value.toString(),l=A.isNullOrUndefined(S.label)?S.value.toString():S.label,i=A.isNullOrUndefined(S.color)?i:"[object Array]"===Object.prototype.toString.call(S.color)?S.color[0]:S.color,t=this.isAddNewLegendData(o)),a&&A.isNullOrUndefined(S.value)&&S.maxOpacity&&S.minOpacity&&"Interactive"===this.treemap.legendSettings.mode){var x=[],p=!0;if("[object Array]"===Object.prototype.toString.call(S.color))for(var b=0;b<S.color.length;b++){var I={colorStop:(b*(100/(S.color.length-1))+"%").toString(),color:S.color[b]};x.push(I)}else{var I={colorStop:"0%",color:i},C={colorStop:"100%",color:i};x.push(I),x.push(C)}var F={id:"groupIndex_"+y+"_colorIndex_"+this.gradientCount,x1:"0%",y1:"0%",x2:"Top"===h||"Bottom"===h?"100%":"0%",y2:"Top"===h||"Bottom"===h?"0%":"100%"},w=this.treemap.renderer.drawGradient("linearGradient",F,x).childNodes[0];"[object Array]"!==Object.prototype.toString.call(S.color)&&(w.childNodes[0].setAttribute("stop-opacity",S.minOpacity.toString()),w.childNodes[1].setAttribute("stop-opacity",S.maxOpacity.toString())),this.defsElement.appendChild(w),this.gradientCount++}if(C=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,l),t&&t.process&&a&&!C?(a=!1,i="[object Array]"===Object.prototype.toString.call(S.color)&&A.isNullOrUndefined(w)&&A.isNullOrUndefined(S.value)?this.legendGradientColor(S,g):i,this.legendCollections.push({actualValue:o,levelIndex:m?-1:v,leafIndex:m?v:-1,legendName:l,legendFill:i,legendData:[],groupIndex:m?-1:y,gradientElement:A.isNullOrUndefined(w)?A.isNullOrUndefined(S.value)?this.legendLinearGradient:null:w,name:e[c].name,opacity:this.treemap.legendSettings.opacity,borderColor:this.treemap.legendSettings.border.color,borderWidth:this.treemap.legendSettings.border.width}),this.legendCollections[this.legendCollections.length-1].legendData.push(e[c]),g++):a&&(a=!1,this.legendCollections[t.value].legendData.push(e[c])),!r&&!p&&!n&&A.isNullOrUndefined(S.from)&&A.isNullOrUndefined(S.to)&&A.isNullOrUndefined(S.minOpacity)&&A.isNullOrUndefined(S.maxOpacity)&&A.isNullOrUndefined(S.value)&&!A.isNullOrUndefined(S.color)){F="[object Array]"===Object.prototype.toString.call(S.color)?S.color[0]:S.color,w=A.isNullOrUndefined(S.label)?"Others":S.label,C=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,w),A.isNullOrUndefined(this.outOfRangeLegend)&&!C&&(this.legendCollections.push({actualValue:w,legendData:[],legendName:w,legendFill:F,groupIndex:!m||-1<y?y:-1}),C=this.legendCollections.length,this.outOfRangeLegend=this.legendCollections[C-1],g++);for(var O=this.legendCollections.length-1;0<=O;O--)if(this.legendCollections[O].actualValue===(S.label||"Others")){this.legendCollections[O].legendData.push(e[c]);break}}}}},S.prototype.removeDuplicates=function(e,t){for(var i=!1,l=0;l<e.length;l++)if(e[l].legendName===t){i=!0;break}return i},S.prototype.isAddNewLegendData=function(e){var t,i;if(0===this.legendCollections.length)t=!0;else for(var l=0;l<this.legendCollections.length;l++){if(e===this.legendCollections[l].actualValue){t=!1,i=l;break}l===this.legendCollections.length-1&&(t=!0)}return{process:t,value:i}},S.prototype.drawLegend=function(){var e=this.treemap.legendSettings,t=this.treemap.renderer,i=e.textStyle;if(this.legendGroup=t.createGroup({id:this.treemap.element.id+"_Legend_Group"}),this.renderLegendBorder(),this.renderLegendTitle(),"Default"===e.mode)this.drawLegendItem(this.currentPage);else for(var l=0;l<this.legendRenderingCollections.length;l++){var o=this.treemap.element.id+"_Legend_Index_"+l,n=this.treemap.element.id+"_Legend_Index_"+l+"_Text",r=this.legendRenderingCollections[l],a=(a=r.element)?"url(#"+a.id+")":r.fill,s=new j(r.x,r.y,r.width,r.height),d=new ze(r.textX,r.textY),o=new L(o,a,e.shapeBorder,e.opacity,s),a=(this.treemap.enableRtl&&("Left"===this.treemap.legendSettings.position||"Right"===this.treemap.legendSettings.position||"Auto"===this.treemap.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height?(o.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-(this.translate.y+o.height)-Math.abs(this.legendBorderRect.y-o.y),d.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y+r.textHeight/2-Math.abs(this.legendBorderRect.y-d.y)):(o.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+o.width)-Math.abs(this.legendBorderRect.x-o.x),d.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-this.translate.x-Math.abs(this.legendBorderRect.x-d.x))),this.treemap.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(r.text):r.text),s=(Ue(new T(n,d.x,d.y,"middle",a,"",""),i,i.color||this.treemap.themeStyle.legendTextColor,this.legendGroup),t.drawRectangle(o));s.setAttribute("tabindex",this.treemap.tabIndex.toString()),s.style.outline="",this.legendGroup.appendChild(s)}ct(this.treemap,this.legendGroup)},S.prototype.defaultLegendRtlLocation=function(e,t,i,l){var o=e.Shape,n=e.Text,e=V(e.DisplayText,l.textStyle);return o.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+t)-Math.abs(this.legendBorderRect.x-o.x),n.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+e.width+t)-Math.abs(this.legendBorderRect.x-n.x),("Left"===i.legendSettings.position||"Right"===i.legendSettings.position||"Auto"===i.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height)&&(o.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-o.y)-l.shapeHeight/2,n.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-n.y)),{shapeLocation:o,textLocation:n}},S.prototype.drawLegendItem=function(t){var d,h=this,p=this.treemap,g=10,c=p.legendSettings,m=new W(c.shapeWidth,c.shapeHeight),u=p.renderer,e=c.shapeBorder;if(0<=t&&t<this.totalPages.length){document.getElementById(this.legendGroup.id)&&document.getElementById(this.legendGroup.id).remove();for(var y="HorizontalLine"===c.shape||"VerticalLine"===c.shape||"Cross"===c.shape,f=y?A.isNullOrUndefined(c.fill)?"#000000":c.fill:e.color,v=y&&0===e.width?1:e.width,S=this,i=0;i<this.totalPages[t].Collection.length;i++)!function(e){var i=S.totalPages[t].Collection[e],l=S.treemap.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(i.DisplayText):i.DisplayText,o=u.createGroup({id:p.element.id+"_Legend_Index_"+e}),n=(o.setAttribute("aria-label",l+" Legend"),o.setAttribute("role","region"),o.setAttribute("tabindex",S.treemap.tabIndex.toString()),o.style.outline="none",p.element.id+"_Legend_Shape_Index_"+e),r=p.element.id+"_Legend_Text_Index_"+e,a=i.Shape,s=i.Text;p.enableRtl&&(d=S.defaultLegendRtlLocation(i,g,p,c),a=d.shapeLocation,s=d.textLocation),d={cancel:!1,name:ie,treemap:p,fill:i.Fill,shape:c.shape,imageUrl:c.imageUrl},p.trigger(ie,d,function(e){var t=new z(n,e.fill,v,y?i.Fill:f,c.opacity,"");o.appendChild(St(a,e.shape,m,e.imageUrl,t)),Ue(new T(r,s.x,s.y,"start",l,"",""),c.textStyle,c.textStyle.color||p.themeStyle.legendTextColor,o),h.legendGroup.appendChild(o)})}(i);var l,o,n,r,a,s,x,b,I,C,F,e=void 0,w=g,O=g/2;0!==this.page&&(n=V(l=t+1+"/"+this.totalPages.length,o=c.textStyle),I=this.legendItemRect.x+this.legendItemRect.width-n.width-2*w-g,r=this.legendItemRect.x+this.legendItemRect.width,a=this.legendItemRect.y+this.legendItemRect.height+O/2+g,s=r-w-n.width/2-g/2,e=u.createGroup({id:p.element.id+"_Legend_Paging_Group"}),x=u.createGroup({id:p.element.id+"_Legend_Left_Paging_Group"}),b=u.createGroup({id:p.element.id+"_Legend_Right_Paging_Group"}),F=" M "+r+" "+a+" L "+(r-w)+" "+(a-O)+" L "+(r-w)+" "+(a+O)+" z ",C=new z(p.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",1,""," M "+I+" "+a+" L "+(I+w)+" "+(a-O)+" L "+(I+w)+" "+(a+O)+" z "),x.appendChild(u.drawPath(C)),C=new L(p.element.id+"_Left_Page_Rect","transparent",{},1,new j(I-w/2,a-2*O,2*w,2*g),""),x.appendChild(u.drawRectangle(C)),this.wireEvents(x),I=new z(p.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",1,"",F),b.appendChild(u.drawPath(I)),C=new L(p.element.id+"_Right_Page_Rect","transparent",{},1,new j(r-w,a-O,w,g),""),b.appendChild(u.drawRectangle(C)),this.wireEvents(b),e.appendChild(x),e.appendChild(b),F={id:p.element.id+"_Paging_Text",x:s,y:a+n.height/4,fill:"#a6a6a6","font-size":"14px","font-style":o.fontStyle,"font-family":o.fontFamily,"font-weight":o.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":"",role:"region","aria-label":l},e.appendChild(u.createText(F,l)),this.legendGroup.appendChild(e))}},S.prototype.renderLegendBorder=function(){var e=this.treemap,t=e.legendSettings,i=t.title.text,l=t.titleStyle,i=V(G(this.legendItemRect.width+20,i,l),l),l=(this.legendBorderRect=new j(this.legendItemRect.x-10,this.legendItemRect.y-10-i.height,this.legendItemRect.width+20,this.legendItemRect.height+20+i.height+("Interactive"!==t.mode&&0!==this.page?10:0)),{color:t.border.color||this.treemap.themeStyle.legendBorderColor,width:t.border.width||this.treemap.themeStyle.legendBorderWidth}),i=new L(e.element.id+"_Legend_Border",t.background,l,1,this.legendBorderRect,""),l=e.renderer.drawRectangle(i);l.style.pointerEvents="none",this.legendGroup.appendChild(l),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,t),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),e.svgObject.appendChild(this.legendGroup)},S.prototype.renderLegendTitle=function(){var e=this.treemap.legendSettings,t=e.titleStyle,e=this.treemap.enableHtmlSanitizer?A.SanitizeHtmlHelper.sanitize(e.title.text):e.title.text,i=G(this.legendItemRect.width+20,e,t),l=V(i,t);e&&((l=Ue(new T(this.treemap.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-l.height/2-5,"middle",i,""),t,t.color||this.treemap.themeStyle.legendTitleColor,this.legendGroup)).setAttribute("role","region"),l.setAttribute("aria-label",e))},S.prototype.renderInteractivePointer=function(e){var t=this.treemap,i=e.target,l=t.element.id+"_Interactive_Legend",o=!1,i=-1<e.type.indexOf("touch")?document.elementFromPoint(e.changedTouches[0].clientX,e.changedTouches[0].clientY):i,n=t.legendSettings;if(-1<i.id.indexOf("_Item_Index")&&n.visible&&0<this.legendRenderingCollections.length)for(var r=void 0,a=void 0,s=t.layout.renderItems[parseFloat(i.id.split("_Item_Index_")[1])],d=t.svgObject.getBoundingClientRect(),h=0;h<this.legendCollections.length&&!o;h++){var p=this.legendCollections[h],g=(a=document.getElementById(t.element.id+"_Legend_Index_"+h)).getBoundingClientRect(),c=new j(Math.abs(g.left-d.left),Math.abs(g.top-d.top),g.width,g.height),m=a.getAttribute("fill"),u=n.shapeBorder.color,y=n.shapeBorder.width;if(!A.isNullOrUndefined(p.legendData)&&0<p.legendData.length){var r=p.legendData,f=t.rangeColorValuePath;if(-1<s.levelOrderName.indexOf(this.legendCollections[h].legendName))this.drawInteractivePointer(n,m,u,l,y,c),o=!0;else for(var v=0;v<r.length;v++)if(t.rangeColorValuePath&&0<t.leafItemSettings.colorMapping.length?r[v].data[f]===s.data[f]:r[v].levelOrderName===s.levelOrderName||-1<r[v].levelOrderName.indexOf(s.levelOrderName)){this.drawInteractivePointer(n,m,u,l,y,c),o=!0;break}}else 0===this.treemap.leafItemSettings.colorMapping.length&&this.treemap.palette&&-1<s.levelOrderName.indexOf(p.levelOrderName)&&(this.drawInteractivePointer(n,m,u,l,y,c),o=!0)}else this.removeInteractivePointer()},S.prototype.drawInteractivePointer=function(e,t,i,l,o,n){var r,a,e="Horizontal"===("None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation)?e.invertedPointer?" M "+(r=n.x+n.width/2)+" "+(a=n.y+n.height)+" L "+(r-10)+" "+(a+10)+" L "+(r+10)+" "+(a+10)+" Z ":" M "+(r=n.x+n.width/2)+" "+(a=n.y)+" L "+(r-10)+" "+(a-10)+" L "+(r+10)+" "+(a-10)+" Z ":e.invertedPointer?" M "+(r=n.x)+" "+(a=n.y+n.height/2)+" L "+(r-10)+" "+(a-10)+" L "+(r-10)+" "+(a+10)+" z ":" M "+(r=n.x+n.width)+" "+(a=n.y+n.height/2)+" L "+(r+10)+" "+(a-10)+" L "+(r+10)+" "+(a+10)+" z ",n=new z(l,t,o,i,1,"",e);this.treemap.svgObject.appendChild(this.treemap.renderer.drawPath(n))},S.prototype.getLegendAlignment=function(e,t,i,l){var o,n,r=A.extend({},e.areaRect,void 0,!0),a=r.x,s=r.y,d=r.height,h=r.width,p=e.availableSize.width,g=e.availableSize.height,c="Auto"===l.position?g<p?"Right":"Bottom":l.position;if("Float"===l.position)this.translate=l.location;else{switch(c){case"Top":case"Bottom":r.height=d-i,o=p/2-t/2,n="Top"===c?s:s+r.height+10,r.y="Top"===c?s+i+10:s;break;case"Left":case"Right":r.width=h-t,o="Left"===c?a:a+r.width,n=g/2-i/2,r.x="Left"===c?a+t:a}switch(l.alignment){case"Near":"Top"===c||"Bottom"===c?o=r.x:n=r.y;break;case"Far":"Top"===c||"Bottom"===c?o=p-t:n=g-i}this.treemap.totalRect=r,this.translate=new ze(o,n)}},S.prototype.mouseUpHandler=function(e){this.renderInteractivePointer(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeInteractivePointer.bind(this),3e3)},S.prototype.removeInteractivePointer=function(){var e;document.getElementById(this.treemap.element.id+"_Interactive_Legend")&&(e=document.getElementById(this.treemap.element.id+"_Interactive_Legend")).parentNode.removeChild(e)},S.prototype.changeNextPage=function(e){this.currentPage=-1<e.target.id.indexOf("_Left_Page_")?this.currentPage-1:this.currentPage+1,0<=this.currentPage&&this.currentPage<this.totalPages.length?this.drawLegend():this.currentPage=-1<e.target.id.indexOf("_Left_Page_")?0:this.totalPages.length-1},S.prototype.wireEvents=function(e){A.EventHandler.add(e,A.Browser.touchStartEvent,this.changeNextPage,this)},S.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(A.Browser.touchMoveEvent,this.renderInteractivePointer,this),this.treemap.on(A.Browser.touchEndEvent,this.mouseUpHandler,this))},S.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(A.Browser.touchMoveEvent,this.renderInteractivePointer),this.treemap.off(A.Browser.touchEndEvent,this.mouseUpHandler))},S.prototype.getModuleName=function(){return"treeMapLegend"},S.prototype.destroy=function(){clearTimeout(this.clearTimeout),this.clearTimeout=null,this.legendRenderingCollections=[],this.legendCollections=[],this.outOfRangeLegend=null,this.totalPages=[],this.translate=null,this.legendBorderRect=null,this.legendGroup=null,this.legendNames=[],this.defsElement=null,this.legendLinearGradient=null,this.legendInteractiveGradient=[],this.legendItemRect=null,this.removeEventListener(),this.treemap=null},S.prototype.legendGradientColor=function(e,t){var i="http://www.w3.org/2000/svg";if(!A.isNullOrUndefined(e.color)&&"[object Array]"===Object.prototype.toString.call(e.color)){var l=this.treemap.renderer.createDefs(),o=document.createElementNS(i,"linearGradient"),n=this.treemap.legendSettings.position,r="Top"===n||"Bottom"===n?"100":"0",n="Top"===n||"Bottom"===n?"0":"100";o.setAttribute("id","linear_"+t),o.setAttribute("x1","0%"),o.setAttribute("y1","0%"),o.setAttribute("x2",r+"%"),o.setAttribute("y2",n+"%");for(var a=0;a<e.color.length;a++){var s=100/(e.color.length-1),d=document.createElementNS(i,"stop");d.setAttribute("offset",a*s+"%"),d.setAttribute("stop-color",e.color[a]),d.setAttribute("stop-opacity",1..toString()),o.appendChild(d)}l.appendChild(o),this.legendLinearGradient=o;r="url(#linear_"+t+")";this.defsElement.appendChild(o),n=r}return n},S);function S(e){this.page=0,this.legendBorderRect=new j(0,0,0,0),this.currentPage=0,this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.legendInteractiveGradient=[],this.legendItemRect=new j(0,0,0,0),this.treemap=e,this.addEventListener()}x.prototype.mouseMove=function(e){e=e.target;return this.highlightOnMouseMove(e)},x.prototype.highlightOnMouseMove=function(e){var t,i=this.treemap,l=e.id,o=[],n=this.treemap.highlightSettings,r=[],a=this.treemap.treeMapSelectionModule,s=!1;if(a&&0<a.legendSelectionCollection.length)for(var d=0;d<a.legendSelectionCollection.length;d++)for(var h=0;h<a.legendSelectionCollection[d].ShapeCollection.Elements.length;h++){var p=parseFloat(a.legendSelectionCollection[d].ShapeCollection.Elements[h].id.split("Item_Index_")[1].split("_")[0]),g=-1<l.indexOf("_Item_Index_")?parseFloat(l.split("Item_Index_")[1].split("_")[0]):null;if(a.legendSelectionCollection[d].ShapeCollection.Elements[h].id===l||p===g){s=!0;break}}if(-1<l.indexOf("_Item_Index")&&!s){if(this.highLightId!==l||this.legendHighlightCollection[0]&&1<this.legendHighlightCollection[0].ShapeCollection.Elements.length){var c=document.getElementById(i.element.id+"_TreeMap_"+i.layoutType+"_Layout"),m=document.getElementsByClassName("treeMapSelection"),e=(x=this.treemap.layout.renderItems[parseFloat(l.split("_Item_Index_")[1])],void 0);this.treemap.legendSettings.visible&&(M=this.treemap.treeMapLegendModule.legendCollections,I=this.treemap.treeMapLegendModule.legendCollections.length,e=!i.legendSettings.removeDuplicateLegend&&i.palette&&0<i.palette.length&&0===i.leafItemSettings.colorMapping.length&&0===i.levels.length?parseFloat(l.split("_Item_Index_")[1]):wt(I,x,i),A.isNullOrUndefined(e)&&(B(this.legendHighlightCollection,i),B(this.shapeHighlightCollection,i),this.legendHighlightCollection=[],i.treeMapLegendModule.removeInteractivePointer()),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+e):document.getElementById(this.treemap.element.id+"_Legend_Index_"+e),null!==this.shapeElement)&&(a&&this.shapeElement.id===(a&&a.shapeElement?a.shapeElement.id:null)?0<this.currentElement.length&&this.currentElement[this.currentElement.length-1].currentElement!==this.shapeElement&&(Ft(this.shapeHighlightCollection,this.currentElement,i),this.highLightId=""):(this.currentElement.push({currentElement:this.shapeElement}),B(this.shapeHighlightCollection,i),this.shapeHighlightCollection.push({legendEle:this.shapeElement,oldFill:M[e].legendFill,oldOpacity:M[e].opacity,oldBorderColor:M[e].borderColor,oldBorderWidth:M[e].borderWidth}),R("Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+e):document.getElementById(this.treemap.element.id+"_Legend_Index_"+e+"_Text"),n.fill,n.opacity,null,null),R(this.shapeElement,n.fill,n.opacity,n.border.color,n.border.width.toString()),this.target="highlight"));for(var u=Ve(x,[],n.mode,i),d=0;d<c.childElementCount;d++){for(var y=c.childNodes[d],f=!0,v=""!==i.rangeColorValuePath?i.rangeColorValuePath:null,S=i.layout.renderItems[parseFloat(l.split("_Item_Index_")[1])],x=i.layout.renderItems[parseFloat(y.id.split("_Item_Index_")[1])],h=0;h<m.length;h++)if(y.id===m[h].id||y.id===m[h].parentElement.id){f=!1;break}-1<u.indexOf(x.levelOrderName)&&f&&(A.isNullOrUndefined(v)||x.data[v]===S.data[v]||"Item"!==n.mode&&0<i.levels.length)&&(r.push(y),o.push(x))}D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i);for(var b=0;b<r.length;b++)P((y=r[b]).childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),y.classList.add("treeMapHighLight"),this.highLightId=l;i.trigger(J,{cancel:!1,name:J,treemap:i,items:o,elements:r})}}else if(-1<l.indexOf("_Legend_Shape")||-1<l.indexOf("_Legend_Index")||-1<l.indexOf("_Legend_Text_Index")){A.isNullOrUndefined(a)||(a.legendSelectId=A.isNullOrUndefined(i.legendId[0])?null:i.legendId[0]);var I=a&&a.legendSelectId?parseFloat(a.legendSelectId.split("Index_")[1]):a&&a.shapeSelectId?parseFloat(a.shapeSelectId.split("Index_")[1]):null,C="Default"===this.treemap.legendSettings.mode?-1===l.indexOf("Text")?parseFloat(l.split("_Legend_Shape_Index_")[1]):parseFloat(l.split("_Legend_Text_Index_")[1]):parseFloat(l.split("_Legend_Index_")[1]);if(this.treemap.legendSettings.visible&&C!==I){for(var F,w=void 0,O=void 0,v=""!==i.rangeColorValuePath?i.rangeColorValuePath:null,L=document.getElementById(l),T=("highlight"===this.shapeTarget&&(B(this.legendHighlightCollection,this.treemap),this.legendHighlightCollection=[]),this.shapeTarget="highlight",this.treemap.treeMapLegendModule.legendCollections[C].legendData.length),M=this.treemap.treeMapLegendModule.legendCollections,d=0;d<T;d++)for(var N,h=0;h<this.treemap.layout.renderItems.length;h++)(!A.isNullOrUndefined(v)&&0<i.leafItemSettings.colorMapping.length&&0===i.levels.length?i.treeMapLegendModule.legendCollections[C].legendData[d].data[v]===i.layout.renderItems[h].data[v]:i.treeMapLegendModule.legendCollections[C].legendData[d].levelOrderName===i.layout.renderItems[h].levelOrderName)&&(w=h,O=this.treemap.layout.renderItems[h].groupIndex,_=document.getElementById(this.treemap.element.id+"_Level_Index_"+O+"_Item_Index_"+w+"_RectPath"),N=void(0!==d&&0!==this.legendHighlightCollection.length||(this.legendHighlightCollection=[],Ot(this.legendHighlightCollection,C,h,L,_,this.treemap.layout.renderItems,M),F=this.legendHighlightCollection.length,this.legendHighlightCollection[F-1].ShapeCollection={Elements:[]})),-1<L.id.indexOf("Text")?(N="Interactive"===this.treemap.legendSettings.mode?document.getElementById(L.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+C),R(L,n.fill,n.opacity,null,null),R(N,n.fill,n.opacity,n.border.color,n.border.width.toString())):(R("Interactive"===this.treemap.legendSettings.mode?document.getElementById(L.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+C),n.fill,n.opacity,null,null),R(L,n.fill,n.opacity,n.border.color,n.border.width.toString())),R(_,n.fill,n.opacity,n.border.color,n.border.width.toString()),F=this.legendHighlightCollection.length,this.legendHighlightCollection[F-1].ShapeCollection.Elements.push(_));if(0===T&&this.treemap.palette&&0<this.treemap.palette.length)for(var _,E,h=0;h<this.treemap.layout.renderItems.length;h++)!(this.treemap.treeMapLegendModule.legendCollections[C].levelOrderName===this.treemap.layout.renderItems[h].levelOrderName||-1<this.treemap.layout.renderItems[h].levelOrderName.indexOf(this.treemap.treeMapLegendModule.legendCollections[C].levelOrderName))||!this.treemap.legendSettings.removeDuplicateLegend&&i.palette&&0<i.palette.length&&!this.treemap.layout.renderItems[h].parent.isDrilled&&C!==h||(w=h,O=this.treemap.layout.renderItems[h].groupIndex,_=document.getElementById(this.treemap.element.id+"_Level_Index_"+O+"_Item_Index_"+w+"_RectPath"),Ot(this.legendHighlightCollection,C,h,L,_,this.treemap.layout.renderItems,M),F=this.legendHighlightCollection.length,E=void(this.legendHighlightCollection[F-1].ShapeCollection={Elements:[]}),-1<L.id.indexOf("Text")?(E="Interactive"===this.treemap.legendSettings.mode?document.getElementById(L.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+C),R(L,n.fill,n.opacity,null,null),R(E,n.fill,n.opacity,n.border.color,n.border.width.toString())):(R(E="Interactive"===this.treemap.legendSettings.mode?document.getElementById(L.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+C),n.fill,n.opacity,null,null),R(L,n.fill,n.opacity,n.border.color,n.border.width.toString())),R(_,n.fill,n.opacity,n.border.color,n.border.width.toString()),F=this.legendHighlightCollection.length,this.legendHighlightCollection[F-1].ShapeCollection.Elements.push(_))}else D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i),B(this.legendHighlightCollection,i),this.legendHighlightCollection=[]}else a&&this.shapeElement&&this.shapeElement.getAttribute("id")===a.legendSelectId||(a?this.shapeElement!==a.shapeElement:this.treemap.legendSettings.visible)&&D(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i),"highlight"!==this.shapeTarget&&"highlight"!==this.target||!this.treemap.legendSettings.visible||a&&this.shapeElement&&this.shapeElement.getAttribute("id")===a.legendSelectId||a&&this.shapeElement===a.shapeElement||(B(this.shapeHighlightCollection,i),this.shapeHighlightCollection=[]),"highlight"===this.shapeTarget&&this.treemap.legendSettings.visible&&B(this.legendHighlightCollection,this.treemap),this.highLightId="",t=!1;return t},x.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(A.Browser.touchMoveEvent,this.mouseMove,this)},x.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(A.Browser.touchMoveEvent,this.mouseMove)},x.prototype.getModuleName=function(){return"treeMapHighlight"},x.prototype.destroy=function(){this.shapeElement=null,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.removeEventListener(),this.treemap=null};var kt=x;function x(e){this.target="highlight",this.shapeTarget="highlight",this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.treemap=e,this.addEventListener()}b.prototype.mouseDown=function(e){var t=e.target;e.preventDefault(),this.selectionOnMouseDown(t)},b.prototype.selectionOnMouseDown=function(t){var e=this.treemap,i=(t.setAttribute("tabindex","-1"),t.style.outline="none",t.id.includes("Legend_Shape_Index")||t.focus(),[]),l=t.id,o=t.innerHTML,n=[],r=e.selectionSettings,a=this.treemap.treeMapHighlightModule,s=e.element.id+"_TreeMap_"+e.layoutType+"_Layout",d=(y=e.layout.renderItems[parseFloat(l.split("_Item_Index_")[1])])&&!y.isLeafItem&&e.enableDrillDown&&(-1<t.textContent.indexOf("[+]")||-1<t.textContent.indexOf("[-]")||!A.isNullOrUndefined(t.nextElementSibling)&&(-1<t.nextSibling.textContent.indexOf("[+]")||-1<t.nextSibling.textContent.indexOf("[-]")));if(-1<l.indexOf("_Item_Index")&&!d)if(this.treemap.selectionId!==l&&(!e.selectionId||parseFloat(e.selectionId.split("_Item_Index_")[1])!==parseFloat(l.split("_Item_Index_")[1]))||this.legendSelectionCollection[0]&&1<this.legendSelectionCollection[0].ShapeCollection.Elements.length){e.levelSelection=[],e.legendId=[],this.shapeSelectId="",B(this.legendSelectionCollection,e),this.legendSelectionCollection=[];var h=document.getElementById(s),p=void 0;this.treemap.legendSettings.visible&&(this.shapeSelect=!1,s=this.treemap.treeMapLegendModule.legendCollections.length,b=this.treemap.treeMapLegendModule.legendCollections,this.shapeElement=void 0,B(this.shapeSelectionCollection,e),a&&(a.shapeTarget="selection",a.shapeHighlightCollection=[]),p=!e.legendSettings.removeDuplicateLegend&&e.palette&&0<e.palette.length&&0===e.leafItemSettings.colorMapping.length&&0===e.levels.length?parseFloat(l.split("_Item_Index_")[1]):wt(s,y,e),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+p):document.getElementById(this.treemap.element.id+"_Legend_Index_"+p),null!==this.shapeElement)&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:b[p].legendFill,oldOpacity:b[p].opacity,oldBorderColor:b[p].borderColor,oldBorderWidth:b[p].borderWidth}),R(M="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+p):document.getElementById(this.treemap.element.id+"_Legend_Index_"+p+"_Text"),r.fill,r.opacity,null,null),R(this.shapeElement,r.fill,r.opacity,r.border.color,r.border.width.toString()),e.legendId.push(this.shapeElement.id),e.legendId.push(M.id));for(var g=Ve(y,[],r.mode,e),c=0;c<h.childElementCount;c++){var m=h.childNodes[c],u=e.layout.renderItems[parseFloat(l.split("_Item_Index_")[1])],y=e.layout.renderItems[parseFloat(m.id.split("_Item_Index_")[1])],f=""!==e.rangeColorValuePath?e.rangeColorValuePath:null;-1<g.indexOf(y.levelOrderName)&&(A.isNullOrUndefined(f)||y.data[f]===u.data[f]||"Item"!==r.mode&&0<e.levels.length)&&(n.push(m),-1<l.indexOf("_RectPath")&&e.levelSelection.push(m.id),i.push(y))}D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",e),this.treemap.selectionId=l;for(var v=document.getElementsByClassName("treeMapHighLight"),S=0;S<n.length;S++){if(m=n[S],0<v.length)for(var x=0;x<v.length;x++)v[x].id===m.id&&v[x].classList.remove("treeMapHighLight"),P(m.childNodes[0],{border:r.border,fill:r.fill,opacity:r.opacity}),m.classList.add("treeMapSelection");else P(m.childNodes[0],{border:r.border,fill:r.fill,opacity:r.opacity}),m.classList.add("treeMapSelection");e.trigger(X,{cancel:!1,name:X,treemap:e,items:i,elements:n,text:o,contentItemTemplate:o},function(e){e.contentItemTemplate!==o&&ke(l,t,e.contentItemTemplate)})}}else B(this.legendSelectionCollection,e),B(this.shapeSelectionCollection,e),this.treemap.legendId=[],this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeElement=void 0,this.shapeSelect=!0,this.shapeSelectId="",this.treemap.levelSelection=[],this.legendSelectId="",(this.legendSelect||this.shapeSelect)&&(D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",e),this.treemap.selectionId="");else if(-1<l.indexOf("_Legend_Shape")||-1<l.indexOf("_Legend_Index")||-1<l.indexOf("_Legend_Text_")){var b=this.treemap.treeMapLegendModule.legendCollections,s=A.isNullOrUndefined(this.legendSelectId)?null:parseFloat(this.legendSelectId.split("_Index_")[1]);if(this.treemap.legendSettings.visible&&s!==parseFloat(l.split("_Index_")[1])){for(var I,C=void 0,F=void 0,w=(e.legendId=[],e.levelSelection=[],this.legendSelectId=l,this.legendSelect=!1,isNaN(parseInt(l[l.length-1],10))?parseInt(l[l.length-6],10):parseInt(l[l.length-1],10)),O=document.getElementById(l),f=(B(this.legendSelectionCollection,e),D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",e),B(this.shapeSelectionCollection,e),this.legendSelectionCollection=[],a&&(a.shapeTarget="selection",a.legendHighlightCollection=[]),""!==e.rangeColorValuePath?e.rangeColorValuePath:null),p="Default"===this.treemap.legendSettings.mode?-1===l.indexOf("Text")?parseFloat(l.split("_Legend_Shape_Index_")[1]):parseFloat(l.split("_Legend_Text_Index_")[1]):parseFloat(l.split("_Legend_Index_")[1]),L=this.treemap.treeMapLegendModule.legendCollections[p].legendData.length,S=0;S<L;S++)for(var T,M,N=0;N<this.treemap.layout.renderItems.length;N++)(!A.isNullOrUndefined(f)&&0<e.leafItemSettings.colorMapping.length&&0===e.levels.length?e.treeMapLegendModule.legendCollections[p].legendData[S].data[f]===e.layout.renderItems[N].data[f]:this.treemap.treeMapLegendModule.legendCollections[p].legendData[S].levelOrderName===this.treemap.layout.renderItems[N].levelOrderName)&&(C=N,F=this.treemap.layout.renderItems[N].groupIndex,_=document.getElementById(this.treemap.element.id+"_Level_Index_"+F+"_Item_Index_"+C+"_RectPath"),this.treemap.selectionId=_.id,0!==S&&0!==this.legendSelectionCollection.length||(Ot(this.legendSelectionCollection,w,N,O,_,this.treemap.layout.renderItems,b),I=this.legendSelectionCollection.length,this.legendSelectionCollection[I-1].ShapeCollection={Elements:[]}),T=void(this.treemap.selectionId=_.id),M=void 0,-1<O.id.indexOf("Text")?(R(T="Interactive"===this.treemap.legendSettings.mode?document.getElementById(O.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+p),r.fill,r.opacity,r.border.color,r.border.width.toString()),R(O,r.fill,r.opacity,null,null),this.legendSelectId=T.id,this.shapeElement=T,e.legendId.push(O.id),e.legendId.push(T.id)):(R(M="Interactive"===this.treemap.legendSettings.mode?document.getElementById(O.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+p),r.fill,r.opacity,null,null),R(O,r.fill,r.opacity,r.border.color,r.border.width.toString()),this.shapeElement=O,e.legendId.push(O.id),e.legendId.push(M.id)),R(_,r.fill,r.opacity,r.border.color,r.border.width.toString()),I=this.legendSelectionCollection.length,e.levelSelection.push(_.id),this.legendSelectionCollection[I-1].ShapeCollection.Elements.push(_));if(0===L&&this.treemap.palette&&0<this.treemap.palette.length)for(var _,E,x=0;x<this.treemap.layout.renderItems.length;x++)!(this.treemap.treeMapLegendModule.legendCollections[p].levelOrderName===this.treemap.layout.renderItems[x].levelOrderName||-1<this.treemap.layout.renderItems[x].levelOrderName.indexOf(this.treemap.treeMapLegendModule.legendCollections[p].levelOrderName))||!this.treemap.legendSettings.removeDuplicateLegend&&e.palette&&0<e.palette.length&&!this.treemap.layout.renderItems[x].parent.isDrilled&&p!==x||(C=x,F=this.treemap.layout.renderItems[x].groupIndex,_=document.getElementById(this.treemap.element.id+"_Level_Index_"+F+"_Item_Index_"+C+"_RectPath"),Ot(this.legendSelectionCollection,p,x,O,_,this.treemap.layout.renderItems,b),this.treemap.selectionId=_.id,I=this.legendSelectionCollection.length,E=void(this.legendSelectionCollection[I-1].ShapeCollection={Elements:[]}),-1<O.id.indexOf("Text")?(E="Interactive"===this.treemap.legendSettings.mode?document.getElementById(O.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+p),R(O,r.fill,r.opacity,null,null),R(E,r.fill,r.opacity,r.border.color,r.border.width.toString()),this.legendSelectId=E.id,this.shapeElement=E):(R(E="Interactive"===this.treemap.legendSettings.mode?document.getElementById(O.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+p),r.fill,r.opacity,null,null),R(O,r.fill,r.opacity,r.border.color,r.border.width.toString()),this.legendSelectId=l,this.shapeElement=O),R(_,r.fill,r.opacity,r.border.color,r.border.width.toString()),e.levelSelection.push(_.id),-1===e.legendId.indexOf(E.id)&&e.legendId.push(E.id),-1===e.legendId.indexOf(O.id)&&e.legendId.push(O.id),I=this.legendSelectionCollection.length,this.legendSelectionCollection[I-1].ShapeCollection.Elements.push(_))}else B(this.legendSelectionCollection,this.treemap),B(this.shapeSelectionCollection,this.treemap),this.legendSelectionCollection=[],a&&(a.shapeTarget="highlight"),this.legendSelect=!0,this.legendSelectId="",this.treemap.legendId=[],this.treemap.levelSelection=[],this.shapeElement=null,this.shapeSelectId="",(this.legendSelect||this.shapeSelect)&&(D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",e),this.treemap.selectionId="")}else d&&(B(this.legendSelectionCollection,this.treemap),this.legendSelectionCollection=[],this.legendSelect=!0,this.legendSelectId="",this.treemap.legendId=[],this.treemap.levelSelection=[],this.treemap.selectionId="",this.shapeElement=null)},b.prototype.selectTreemapItem=function(e,t){if(t){for(var i=void 0,l=0;l<this.treemap.layout.renderItems.length;l++)if(e===this.treemap.layout.renderItems[l].levelOrderName){i=this.treemap.layout.renderItems[l];break}for(var o=this.treemap.selectionSettings,n=[],r=void 0,a=[],t=(this.treemap.levelSelection=[],this.treemap.element.id+"_TreeMap_"+this.treemap.layoutType+"_Layout"),s=document.getElementById(t),d=Ve(i,[],o.mode,this.treemap),h=0;h<s.childElementCount;h++)r=s.childNodes[h],i=this.treemap.layout.renderItems[parseFloat(r.id.split("_Item_Index_")[1])],-1<d.indexOf(i.levelOrderName)&&(n.push(r),this.treemap.levelSelection.push(r.id),a.push(i));if(this.treemap.legendSettings.visible)for(var p=0;p<a.length;p++){this.shapeSelect=!1;var g=this.treemap.treeMapLegendModule.legendCollections.length,c=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,Ct(this.shapeSelectionCollection),g=wt(g,a[p],this.treemap),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+g):document.getElementById(this.treemap.element.id+"_Legend_Index_"+g),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.treemap.legendId.push(this.shapeSelectId),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:c[g].legendFill,oldOpacity:c[g].opacity,oldBorderColor:c[g].borderColor,oldBorderWidth:c[g].borderWidth}),R(this.shapeElement,o.fill,o.opacity,o.border.color,o.border.width.toString()))}D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap);for(var t=document.getElementById(this.treemap.levelSelection[0]),m=(this.treemap.selectionId=t.childNodes[0].id,document.getElementsByClassName("treeMapHighLight")),u=0;u<n.length;u++)if(r=n[u],0<m.length)for(var y=0;y<m.length;y++)m[y].id===r.id&&m[y].classList.remove("treeMapHighLight"),P(r.childNodes[0],{border:o.border,fill:o.fill,opacity:o.opacity}),r.classList.add("treeMapSelection");else o.fill=("null"===o.fill?this.treemap.layout.renderItems[parseInt(r.id.split("Item_Index_")[1],10)].options:o).fill,P(r.childNodes[0],{border:o.border,fill:o.fill,opacity:o.opacity}),r.classList.add("treeMapSelection")}else Ct(this.shapeSelectionCollection),this.shapeElement=void 0,this.treemap.levelSelection=[],this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],D(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap),this.treemap.selectionId=""},b.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(A.Browser.touchStartEvent,this.mouseDown,this)},b.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(A.Browser.touchStartEvent,this.mouseDown)},b.prototype.getModuleName=function(){return"treeMapSelection"},b.prototype.destroy=function(){this.shapeElement=null,this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.removeEventListener(),this.treemap=null};var At=b;function b(e){this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeSelect=!0,this.legendSelect=!0,this.treemap=e,this.addEventListener()}var Wt=function(e,t){var i={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&(i[o[l]]=e[o[l]]);return i},jt=(I.prototype.renderTooltip=function(e){var t,i,l,o,n,r,a=this,s=(t=(-1!==e.type.indexOf("touch")?(this.isTouch=!0,p=e.changedTouches[0].pageX,e.changedTouches[0]):(this.isTouch="touch"===e.pointerType,p=e.pageX,e)).pageY,e.target),d=s.id,h=[];if(-1<d.indexOf("_Item_Index")&&-1===e.type.indexOf("key")){if(d=this.treemap.layout.renderItems[parseFloat(d.split("_Item_Index_")[1])],!A.isNullOrUndefined(d)){o=d.weight,n=d.data,A.isNullOrUndefined(d.options)||(r=d.options.fill),h=this.treemap.enableRtl?[(A.isNullOrUndefined(this.tooltipSettings.format)?null:mt(this.tooltipSettings.format,n,this.treemap))||ut(o,this.treemap)+" : "+this.treemap.weightValuePath.toString()]:[(A.isNullOrUndefined(this.tooltipSettings.format)?null:mt(this.tooltipSettings.format,n,this.treemap))||this.treemap.weightValuePath.toString()+" : "+ut(o,this.treemap)],document.getElementById(this.tooltipId)?l=document.getElementById(this.tooltipId):((l=A.createElement("div",{id:this.treemap.element.id+"_TreeMapTooltip",className:"EJ2-TreeMap-Tooltip"})).style.cssText="position: absolute;pointer-events:none;",document.getElementById(this.treemap.element.id+"_Secondary_Element").appendChild(l)),(o=Ke(p,t,this.treemap.svgObject)).y=this.tooltipSettings.template?o.y+10:o.y,this.tooltipSettings.textStyle.size=this.tooltipSettings.textStyle.size||this.treemap.themeStyle.tooltipFontSize,this.tooltipSettings.textStyle.fontFamily=this.tooltipSettings.textStyle.fontFamily||this.treemap.themeStyle.fontFamily,this.tooltipSettings.textStyle.fontStyle=A.isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle)?"Normal":this.tooltipSettings.textStyle.fontStyle,this.tooltipSettings.textStyle.fontWeight=this.tooltipSettings.textStyle.fontWeight||this.treemap.themeStyle.fontWeight,this.tooltipSettings.textStyle.color=this.tooltipSettings.textStyle.color||this.treemap.themeStyle.tooltipFontColor,this.tooltipSettings.textStyle.opacity=this.tooltipSettings.textStyle.opacity||this.treemap.themeStyle.tooltipTextOpacity;var p={width:this.tooltipSettings.border.width||this.treemap.themeStyle.tooltipBorderWidth||0,color:this.tooltipSettings.border.color||this.treemap.themeStyle.tooltipBorderColor||"transparent"};if(this.treemap.enableHtmlSanitizer)for(var g=0;g<h.length;g++)h[g]=A.SanitizeHtmlHelper.sanitize(h[g]);i={cancel:!1,name:Y,item:d,options:{location:o,text:h,data:n,border:p,textStyle:this.tooltipSettings.textStyle,template:this.tooltipSettings.template},treemap:this.treemap,element:s,eventArgs:e},this.treemap.trigger(Y,i,function(e){a.addTooltip(i,r,l)})}}else this.removeTooltip(),this.treemap.clearTemplate()},I.prototype.addTooltip=function(e,t,i,l){var o;l=A.isNullOrUndefined(e)?(o=l.cancel,l):(o=e.cancel,Wt(e,["cancel"]).options),o?(this.removeTooltip(),this.treemap.clearTemplate()):(this.svgTooltip=new C.Tooltip({theme:this.treemap.theme,enable:!0,header:"",data:l.data,template:l.template,content:l.text,shapes:[],location:l.location,palette:[t],areaBounds:this.treemap.areaRect,textStyle:l.textStyle,fill:this.treemap.tooltipSettings.fill||this.treemap.themeStyle.tooltipFillColor,border:l.border,enableShadow:!0}),(this.treemap.isVue||this.treemap.isVue3)&&(this.svgTooltip.controlInstance=this.treemap),this.svgTooltip.opacity=this.treemap.themeStyle.tooltipFillOpacity||this.svgTooltip.opacity,this.svgTooltip.appendTo(i),this.treemap.renderReactTemplates())},I.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},I.prototype.removeTooltip=function(){var e;0<document.getElementsByClassName("EJ2-TreeMap-Tooltip").length&&(e=document.getElementsByClassName("EJ2-TreeMap-Tooltip")[0]).parentNode.removeChild(e)},I.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(A.Browser.touchMoveEvent,this.renderTooltip,this),this.treemap.on(A.Browser.touchEndEvent,this.mouseUpHandler,this))},I.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(A.Browser.touchMoveEvent,this.renderTooltip),this.treemap.off(A.Browser.touchEndEvent,this.mouseUpHandler))},I.prototype.getModuleName=function(){return"treeMapTooltip"},I.prototype.destroy=function(){A.isNullOrUndefined(this.svgTooltip)||(this.svgTooltip.destroy(),this.svgTooltip.controlInstance=null,Tt(this.treemap.element.id+"_TreeMapTooltip")),this.svgTooltip=null,this.tooltipSettings=null,this.removeEventListener(),this.treemap=null},I);function I(e){this.treemap=e,this.tooltipSettings=this.treemap.tooltipSettings,this.tooltipId=this.treemap.element.id+"_TreeMapTooltip",this.addEventListener()}e.Border=l,e.ColorMapping=xe,e.ColorValue=yt,e.CommonTitleSettings=pe,e.Font=n,e.HighlightSettings=De,e.ImageExport=Dt,e.InitialDrillSettings=Fe,e.LayoutPanel=Mt,e.LeafItemSettings=Le,e.LegendSettings=Ie,e.LevelSettings=t,e.LevelsData=Ut,e.Location=ze,e.Margin=se,e.PathOption=z,e.PdfExport=Bt,e.Print=_t,e.Rect=j,e.RectOption=L,e.SelectionSettings=_e,e.Size=W,e.SubTitleSettings=me,e.TextOption=T,e.TitleSettings=fe,e.TooltipSettings=Me,e.TreeMap=i,e.TreeMapAjax=It,e.TreeMapHighlight=kt,e.TreeMapLegend=f,e.TreeMapSelection=At,e.TreeMapTooltip=jt,e.applyOptions=P,e.beforePrint=E,e.click=$,e.colorCollections=it,e.colorMap=et,e.colorNameToHex=u,e.componentToHex=m,e.convertElement=qe,e.convertHexToColor=vt,e.convertToContainer=Qe,e.convertToHexCode=ft,e.convertToRect=$e,e.createTextStyle=Re,e.deSaturationColor=tt,e.defaultFont=ne,e.doubleClick=K,e.drawSymbol=St,e.drillEnd=q,e.drillStart=k,e.findChildren=H,e.findHightLightItems=Ve,e.findLabelLocation=Xe,e.findPosition=He,e.formatValue=ut,e.getArea=Ye,e.getColorByValue=ot,e.getElement=Ae,e.getGradientColor=nt,e.getLegendIndex=wt,e.getMousePosition=Ke,e.getPercentage=at,e.getPercentageColor=rt,e.getShortestEdge=Ze,e.getTemplateFunction=Ge,e.getThemeStyle=Nt,e.hide=ht,e.isContainsData=je,e.isParentItem=bt,e.itemClick=Z,e.itemHighlight=J,e.itemMove=Q,e.itemRendering=U,e.itemSelected=X,e.itemsToOrder=We,e.legendItemRendering=ie,e.legendMaintain=ct,e.legendRendering=le,e.load=N,e.loaded=_,e.maintainSelection=gt,e.measureElement=Je,e.measureText=V,e.mouseMove=te,e.orderByArea=pt,e.pushCollection=Ot,e.removeClassNames=D,e.removeElement=Tt,e.removeLegend=B,e.removeSelectionWithHighlight=Ft,e.removeShape=Ct,e.renderLegendShape=xt,e.renderTextElement=Ue,e.resize=oe,e.rgbToHex=lt,e.rightClick=ee,e.setColor=R,e.setItemTemplateContent=ke,e.stringToNumber=Be,e.textFormatter=mt,e.textTrim=G,e.textWrap=dt,e.tooltipRendering=Y,e.triggerDownload=Lt,e.wordWrap=st,Object.defineProperty(e,"__esModule",{value:!0})});
2
11
  //# sourceMappingURL=ej2-treemap.umd.min.js.map