This repository has been archived by the owner on Feb 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
layer.js
13 lines (13 loc) · 40.9 KB
/
layer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
require.config({"config":{"requirejs-dplugins/css":{"layersMap":{"dtreemap/themes/TreeMap.css":"dtreemap/layer.css","dtreemap/themes/GroupLabel.css":"dtreemap/layer.css","dtreemap/themes/DrillDownUp.css":"dtreemap/layer.css"}}}});
define("dtreemap/_utils",[],function(){var a={group:function(b,c,d){var e={children:[]},f=function(a,b){return a.__treeValue||(a.__treeValue=0),a.__treeValue+=d(b),a};return b.forEach(function(b){var d=e;c.forEach(function(e,g){var h=e(b),i=a.find(d.children,function(a){return a.__treeName===h});i||d.children.push(i={__treeName:h,__treeID:h+Math.random(),children:[]}),i=f(i,b),g!==c.length-1?d=i:i.children.push(b)}),d=f(d,b)}),e},find:function(a,b){for(var c=a.length,d=0;c>d;++d)if(b.call(null,a[d]))return a[d];return null},solve:function(b,c,d,e,f){var g=a.initElements(b,e),h=g.total,i=g.elements,j=h;if(0===h){if(0===i.length)return{items:b,rects:[],total:0};i.forEach(function(a){a.size=a.sizeTmp=100}),h=100*i.length}i.sort(function(a,b){return b.size-a.size}),a._compute(c,d,i,h),i.sort(function(a,b){return a.index-b.index});var k={};return k.elements=i,k.size=j,k.rectangles=i.map(function(a){return{x:f?c-a.x-a.width:a.x,y:a.y,w:a.width,h:a.height}}),k},initElements:function(a,b){var c=0,d=a.map(function(a,d){var e=null!=b?b(a):0;if(0>e)throw new Error("item size dimension must be positive");return c+=e,{index:d,size:e,sizeTmp:e}});return{elements:d,total:c}},_compute:function(b,c,d,e){var f=b*c/e/100;d.forEach(function(a){a.sizeTmp*=f});for(var g,h,i=0,j=0,k=-1>>>1,l=0,m=0,n=b,o=c,p=n>o;j!==d.length;)if(g=a._trySolution(d,i,j,p,n,o),g>k||1>g){var q=0,r=0;for(h=i;j>h;h++)d[h].x=l+q,d[h].y=m+r,p?r+=d[h].height:q+=d[h].width;p?l+=d[i].width:m+=d[i].height,n=b-l,o=c-m,p=n>o,i=j,j=i,k=-1>>>1}else{for(h=i;j>=h;h++)d[h].width=d[h].widthTmp,d[h].height=d[h].heightTmp;k=g,j++}var s=0,t=0;for(h=i;j>h;h++)d[h].x=l+s,d[h].y=m+t,p?t+=d[h].height:s+=d[h].width},_trySolution:function(a,b,c,d,e,f){var g,h,i=0,j=0,k=0;for(h=b;c>=h;h++)i+=a[h].sizeTmp;for(d?0===f?j=k=0:(j=i/f*100,k=f):0===e?j=k=0:(k=i/e*100,j=e),h=b;c>=h;h++)d?(a[h].widthTmp=j,0===i?a[h].heightTmp=0:a[h].heightTmp=k*a[h].sizeTmp/i):(0===i?a[h].widthTmp=0:a[h].widthTmp=j*a[h].sizeTmp/i,a[h].heightTmp=k);return g=Math.max(a[c].heightTmp/a[c].widthTmp,a[c].widthTmp/a[c].heightTmp),void 0===g?1:g}};return a}),define("dtreemap/TreeMap",["dcl/dcl","delite/register","dcolor/Color","dojo/dom-geometry","dojo/dom-class","./_utils","dpointer/events","delite/Widget","delite/Selection","delite/StoreMap","requirejs-dplugins/css!./themes/TreeMap.css"],function(a,b,c,d,e,f,g,h,i,j){return b("d-treemap",[HTMLElement,h,i,j],{baseClass:"d-treemap",itemToRenderer:null,rootItem:null,tooltipAttr:"",tooltipFunc:null,areaAttr:"",areaFunc:null,labelAttr:"label",labelFunc:null,labelThreshold:NaN,colorAttr:"",colorFunc:null,colorModel:null,groupAttrs:[],groupFuncs:null,_groupFuncs:null,mapAtInit:!1,copyAllItemProps:!0,preRender:function(){this.allowRemap=!0,this.itemToRenderer={}},getIdentity:function(a){return a.__treeID?a.__treeID:this.store.getIdentity(a)},update:function(){this.notifyCurrentValue("areaAttr")},postRender:function(){this.on("pointerover",this._pointerOverHandler.bind(this)),this.on("pointerout",this._pointerOutHandler.bind(this)),this.on("pointerup",this._pointerUpHandler.bind(this)),this.setAttribute("role","presentation"),this.setAttribute("aria-label","treemap")},computeProperties:function(a){this.renderItems&&this._mappedKeys.some(function(b){return a.hasOwnProperty(b+"Attr")||a.hasOwnProperty(b+"Func")})&&this.remap(),("renderItems"in a||"groupAttrs"in a||"groupFuncs"in a)&&(this._set("rootItem",null),this.notifyCurrentValue("rootItem")),"renderItems"in a&&(this.notifyCurrentValue("groupAttrs"),this.notifyCurrentValue("colorAttr"))},refreshRendering:function(b){var c=!1;("groupAttrs"in b||"groupFuncs"in b)&&(this._updateTreeMapHierarchy(),c=!0),("colorAttr"in b||"colorFunc"in b||"colorModel"in b)&&(c=!0,null!=this.colorModel&&null!=this.renderItems&&this.colorModel.initialize&&this.colorModel.initialize(this.renderItems,this._colorFunc.bind(this))),("areaAttr"in b||"areaFunc"in b)&&(this._removeAreaForGroup(),c=!0),("rootItem"in b||c)&&this._groupeditems&&(null==this.containerNode&&(this.containerNode=this.ownerDocument.createElement("div"),a.mix(this.containerNode.style,{position:"relative",width:"100%",height:"100%"}),this.appendChild(this.containerNode)),"rootItem"in b?(this.containerNode.innerHTML="",this._render(!0)):this._render(!1))},_render:function(a){var b,c=this.rootItem;if(null!=c){var e=this._getRenderer(c);e&&(this._isLeaf(c)&&(c=e.parentItem),b=e.parentItem)}var f=d.getMarginBox(this);null==c||this._isRoot(c)?this._buildChildrenRenderers(this.containerNode,c?c:{__treeRoot:!0,children:this._groupeditems},0,a,null):this._buildRenderer(this.containerNode,b,c,{x:0,y:0,w:f.w,h:f.h},0,a)},_setGroupAttrsAttr:function(a){null==this.groupFuncs&&(null!=a?this._groupFuncs=a.map(function(a){return function(b){return b[a]}}):this._groupFuncs=null),this._set("groupAttrs",a)},_setGroupFuncsAttr:function(a){this._set("groupFuncs",this._groupFuncs=a),null==a&&null!=this.groupAttrs&&(this._groupFuncs=this.groupAttrs.map(function(a){return function(b){return b[a]}}))},_colorFunc:function(a){if(this.colorFunc)return this.colorFunc(a);var b=a.color;return b||(b=0),parseFloat(b)},createRenderer:function(b,c,d){var e=this.ownerDocument.createElement("div");return"header"!==d&&a.mix(e.style,{overflow:"hidden",position:"absolute"}),e},styleRenderer:function(a,b,c,d){switch(d){case"leaf":a.style.background=this.getColorForItem(b).toHex();case"header":var e=this.getLabelForItem(b);e&&(isNaN(this.labelThreshold)||c<this.labelThreshold)?a.innerHTML=e:a.innerHTML=""}},_updateTreeMapHierarchy:function(){var a=this.renderItems;null!=a&&(null!=this._groupFuncs&&this._groupFuncs.length>0?this._groupeditems=f.group(a,this._groupFuncs,this._getAreaForItem.bind(this)).children:this._groupeditems=a)},_removeAreaForGroup:function(a){var b;if(null!=a){if(!a.__treeValue)return;delete a.__treeValue,b=a.children}else b=this._groupeditems;if(b)for(var c=0;c<b.length;++c)this._removeAreaForGroup(b[c])},_getAreaForItem:function(a){var b=parseFloat(a.area);return isNaN(b)?0:b},_computeAreaForItem:function(a){var b;if(a.__treeID){if(b=a.__treeValue,!b){b=0;for(var c=a.children,d=0;d<c.length;++d)b+=this._computeAreaForItem(c[d]);a.__treeValue=b}}else b=this._getAreaForItem(a);return b},getColorForItem:function(a){var b=this._colorFunc(a);return null!=this.colorModel?this.colorModel.getColor(b):new c(b)},getLabelForItem:function(a){return a.__treeName?a.__treeName:a.label.toString()},_buildChildrenRenderers:function(a,b,c,e,g,h){var i=b.children,j=d.getMarginBox(a),k=f.solve(i,j.w,j.h,this._computeAreaForItem.bind(this),"rtl"===this.effectiveDir),l=k.rectangles;g&&(l=l.map(function(a){return a.x+=g.l,a.y+=g.t,a}));for(var m,n=0;n<i.length;++n)m=l[n],this._buildRenderer(a,b,i[n],m,c,e,h)},_isLeaf:function(a){return!a.children},_isRoot:function(a){return a.__treeRoot},_getRenderer:function(a,b,c){if(b)for(var d=0;d<c.children.length;++d)if(c.children[d].item===a)return c.children[d];return this.itemToRenderer[this.getIdentity(a)]},_buildRenderer:function(a,b,c,e,f,g,h){var i=this._isLeaf(c),j=g?null:this._getRenderer(c,h,a);j=i?this._updateLeafRenderer(j,c,f):this._updateGroupRenderer(j,c,f),g&&(j.level=f,j.item=c,j.parentItem=b,this.itemToRenderer[this.getIdentity(c)]=j,this.updateRenderers(c));var k=Math.floor(e.x),l=Math.floor(e.y),m=Math.floor(e.x+e.w+1e-11)-k,n=Math.floor(e.y+e.h+1e-11)-l;if(g&&a.appendChild(j),d.setMarginBox(j,{l:k,t:l,w:m,h:n}),!i){var o=d.getContentBox(j);this._layoutGroupContent(j,o.w,o.h,f+1,g,h)}this.emit("treemap-renderer-updated",{renderer:j,item:c,kind:i?"leaf":"group",level:f})},_layoutGroupContent:function(a,b,c,e,f,g){var h=a.querySelector(".d-treemap-header"),i=a.querySelector(".d-treemap-groupcontent");if(null!=h&&null!=i){var j=d.getMarginBox(h);j.h>c?(j.h=c,i.style.display="none"):(i.style.dispaly="block",d.setMarginBox(i,{l:0,t:j.h,w:b,h:c-j.h}),this._buildChildrenRenderers(i,a.item,e,f,null,g)),d.setMarginBox(h,{l:0,t:0,w:b,h:j.h})}},_updateGroupRenderer:function(a,b,c){var d=null==a;null==a&&(a=this.createRenderer("div",c,"group"),e.add(a,"d-treemap-group")),this.styleRenderer(a,b,c,"group");var f=a.querySelector(".d-treemap-header");f=this._updateHeaderRenderer(f,b,c),d&&a.appendChild(f);var g=a.querySelector(".d-treemap-groupcontent");return g=this._updateGroupContentRenderer(g,b,c),d&&a.appendChild(g),a},_updateHeaderRenderer:function(a,b,c){return null==a&&(a=this.createRenderer(b,c,"header"),e.add(a,"d-treemap-header"),e.add(a,"d-treemap-header_"+c)),this.styleRenderer(a,b,c,"header"),a},_updateLeafRenderer:function(a,b,c){return null==a&&(a=this.createRenderer(b,c,"leaf"),e.add(a,"d-treemap-leaf"),e.add(a,"d-treemap-leaf_"+c)),this.styleRenderer(a,b,c,"leaf"),b.tooltip&&(a.title=b.tooltip),a},_updateGroupContentRenderer:function(a,b,c){return null==a&&(a=this.createRenderer(b,c,"content"),e.add(a,"d-treemap-groupcontent"),e.add(a,"d-treemap-groupcontent_"+c)),this.styleRenderer(a,b,c,"content"),a},_getRendererFromTarget:function(a){for(var b=a;b!==this&&!b.item;)b=b.parentNode;return b},_pointerOverHandler:function(a){var b=this._getRendererFromTarget(a.target);if(b.item){var c=b.item;this.updateRenderers(c),this.emit("treemap-item-over",{renderer:b,item:c,triggerEvent:a})}},_pointerOutHandler:function(a){var b=this._getRendererFromTarget(a.target);if(b.item){var c=b.item;this.updateRenderers(c),this.emit("treemap-item-out",{renderer:b,item:c,triggerEvent:a})}},_pointerUpHandler:function(a){var b=this._getRendererFromTarget(a.target);b.item&&this.selectFromEvent(a,b.item,b,!0)},updateRenderers:function(a){if(a){Array.isArray(a)||(a=[a]);for(var b=0;b<a.length;b++){var c=a[b],d=this._getRenderer(c);if(d){var f=this.isSelected(c);f?e.add(d,"d-selected"):e.remove(d,"d-selected")}}}}})}),define("dojo/dom-class",["./_base/lang","./_base/array","./dom"],function(a,b,c){function d(a){if("string"==typeof a||a instanceof String){if(a&&!g.test(a))return h[0]=a,h;var c=a.split(g);return c.length&&!c[0]&&c.shift(),c.length&&!c[c.length-1]&&c.pop(),c}return a?b.filter(a,function(a){return a}):[]}var e,f="className",g=/\s+/,h=[""],i={};return e={contains:function(a,b){return(" "+c.byId(a)[f]+" ").indexOf(" "+b+" ")>=0},add:function(a,b){a=c.byId(a),b=d(b);var e,g=a[f];g=g?" "+g+" ":" ",e=g.length;for(var h,i=0,j=b.length;j>i;++i)h=b[i],h&&g.indexOf(" "+h+" ")<0&&(g+=h+" ");e<g.length&&(a[f]=g.substr(1,g.length-2))},remove:function(b,e){b=c.byId(b);var g;if(void 0!==e){e=d(e),g=" "+b[f]+" ";for(var h=0,i=e.length;i>h;++h)g=g.replace(" "+e[h]+" "," ");g=a.trim(g)}else g="";b[f]!=g&&(b[f]=g)},replace:function(a,b,d){a=c.byId(a),i[f]=a[f],e.remove(i,d),e.add(i,b),a[f]!==i[f]&&(a[f]=i[f])},toggle:function(a,b,f){if(a=c.byId(a),void 0===f){b=d(b);for(var g,h=0,i=b.length;i>h;++h)g=b[h],e[e.contains(a,g)?"remove":"add"](a,g)}else e[f?"add":"remove"](a,b);return f}}}),define("dojo/dom",["./sniff","./_base/window"],function(a,b){if(a("ie")<=7)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(c){}var d={};a("ie")?d.byId=function(a,c){if("string"!=typeof a)return a;var d=c||b.doc,e=a&&d.getElementById(a);if(e&&(e.attributes.id.value==a||e.id==a))return e;var f=d.all[a];(!f||f.nodeName)&&(f=[f]);for(var g=0;e=f[g++];)if(e.attributes&&e.attributes.id&&e.attributes.id.value==a||e.id==a)return e}:d.byId=function(a,c){return("string"==typeof a?(c||b.doc).getElementById(a):a)||null},d.isDescendant=function(a,b){try{for(a=d.byId(a),b=d.byId(b);a;){if(a==b)return!0;a=a.parentNode}}catch(c){}return!1},a.add("css-user-select",function(a,b,c){if(!c)return!1;var d=c.style,e=["Khtml","O","Moz","Webkit"],f=e.length,g="userSelect";do if("undefined"!=typeof d[g])return g;while(f--&&(g=e[f]+"UserSelect"));return!1});var e=a("css-user-select");return d.setSelectable=e?function(a,b){d.byId(a).style[e]=b?"":"none"}:function(a,b){a=d.byId(a);var c=a.getElementsByTagName("*"),e=c.length;if(b)for(a.removeAttribute("unselectable");e--;)c[e].removeAttribute("unselectable");else for(a.setAttribute("unselectable","on");e--;)c[e].setAttribute("unselectable","on")},d}),define("dojo/_base/window",["./kernel","./lang","../sniff"],function(a,b,c){var d={global:a.global,doc:a.global.document||null,body:function(b){return b=b||a.doc,b.body||b.getElementsByTagName("body")[0]},setContext:function(b,c){a.global=d.global=b,a.doc=d.doc=c},withGlobal:function(b,c,e,f){var g=a.global;try{return a.global=d.global=b,d.withDoc.call(null,b.document,c,e,f)}finally{a.global=d.global=g}},withDoc:function(b,e,f,g){var h,i,j,k=d.doc,l=c("quirks"),m=c("ie");try{return a.doc=d.doc=b,a.isQuirks=c.add("quirks","BackCompat"==a.doc.compatMode,!0,!0),c("ie")&&(j=b.parentWindow)&&j.navigator&&(h=parseFloat(j.navigator.appVersion.split("MSIE ")[1])||void 0,i=b.documentMode,i&&5!=i&&Math.floor(h)!=i&&(h=i),a.isIE=c.add("ie",h,!0,!0)),f&&"string"==typeof e&&(e=f[e]),e.apply(f,g||[])}finally{a.doc=d.doc=k,a.isQuirks=c.add("quirks",l,!0,!0),a.isIE=c.add("ie",m,!0,!0)}}};return c("extend-dojo")&&b.mixin(a,d),d}),define("dojo/_base/kernel",["../has","./config","require","module"],function(a,b,c,d){var e,f,g,h=function(){return this}(),i={},j={},k={config:b,global:h,dijit:i,dojox:j},l={dojo:["dojo",k],dijit:["dijit",i],dojox:["dojox",j]},m=c.map&&c.map[d.id.match(/[^\/]+/)[0]];for(f in m)l[f]?l[f][0]=m[f]:l[f]=[m[f],{}];for(f in l)g=l[f],g[1]._scopeName=g[0],b.noGlobals||(h[g[0]]=g[1]);k.scopeMap=l,k.baseUrl=k.config.baseUrl=c.baseUrl,k.isAsync=!a("dojo-loader")||c.async,k.locale=b.locale;var n="$Rev: f4fef70 $".match(/[0-9a-f]{7,}/);if(k.version={major:1,minor:10,patch:4,flag:"",revision:n?n[0]:NaN,toString:function(){var a=k.version;return a.major+"."+a.minor+"."+a.patch+a.flag+" ("+a.revision+")"}},a.add("extend-dojo",1),Function("d","d.eval = function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(k),a("host-rhino")?k.exit=function(a){quit(a)}:k.exit=function(){},a.add("dojo-guarantee-console",1),a("dojo-guarantee-console")){"undefined"!=typeof console||(console={});var o,p=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];for(e=0;o=p[e++];)console[o]||!function(){var a=o+"";console[a]="log"in console?function(){var b=Array.prototype.slice.call(arguments);b.unshift(a+":"),console.log(b.join(" "))}:function(){},console[a]._fake=!0}()}if(a.add("dojo-debug-messages",!!b.isDebug),k.deprecated=k.experimental=function(){},a("dojo-debug-messages")&&(k.deprecated=function(a,b,c){var d="DEPRECATED: "+a;b&&(d+=" "+b),c&&(d+=" -- will be removed in version: "+c),console.warn(d)},k.experimental=function(a,b){var c="EXPERIMENTAL: "+a+" -- APIs subject to change without notice.";b&&(c+=" "+b),console.warn(c)}),a.add("dojo-modulePaths",1),a("dojo-modulePaths")&&b.modulePaths){k.deprecated("dojo.modulePaths","use paths configuration");var q={};for(f in b.modulePaths)q[f.replace(/\./g,"/")]=b.modulePaths[f];c({paths:q})}return a.add("dojo-moduleUrl",1),a("dojo-moduleUrl")&&(k.moduleUrl=function(a,b){k.deprecated("dojo.moduleUrl()","use require.toUrl","2.0");var d=null;return a&&(d=c.toUrl(a.replace(/\./g,"/")+(b?"/"+b:"")+"/*.*").replace(/\/\*\.\*/,"")+(b?"":"/")),d}),k._hasResource={},k}),define("dojo/_base/config",["../has","require"],function(a,b){var c={};if(a("dojo-config-api")){var d,e=b.rawConfig;for(d in e)c[d]=e[d]}else{var f=function(b,c,e){for(d in b)"has"!=d&&a.add(c+d,b[d],0,e)},g=function(){return this}();c=a("dojo-loader")?b.rawConfig:g.dojoConfig||g.djConfig||{},f(c,"config",1),f(c.has,"",1)}if(!c.locale&&"undefined"!=typeof navigator){var h=navigator.language||navigator.userLanguage;h&&(c.locale=h.toLowerCase())}return c}),define("dojo/has",["require","module"],function(a,b){var c=a.has||function(){};if(!c("dojo-has-api")){var d="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location==location&&window.document==document,e=function(){return this}(),f=d&&document,g=f&&f.createElement("DiV"),h=b.config&&b.config()||{};c=function(a){return"function"==typeof h[a]?h[a]=h[a](e,f,g):h[a]},c.cache=h,c.add=function(a,b,d,e){return("undefined"==typeof h[a]||e)&&(h[a]=b),d&&c(a)},c.add("host-browser",d),c.add("host-node","object"==typeof process&&process.versions&&process.versions.node&&process.versions.v8),c.add("host-rhino","function"==typeof load&&("function"==typeof Packages||"object"==typeof Packages)),c.add("dom",d),c.add("dojo-dom-ready-api",1),c.add("dojo-sniff",1)}if(c("host-browser")){c.add("dom-addeventlistener",!!document.addEventListener),c.add("touch","ontouchstart"in document||"onpointerdown"in document&&navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints),c.add("touch-events","ontouchstart"in document),c.add("pointer-events","onpointerdown"in document),c.add("MSPointer","msMaxTouchPoints"in navigator),c.add("device-width",screen.availWidth||innerWidth);var i=document.createElement("form");c.add("dom-attributes-explicit",0==i.attributes.length),c.add("dom-attributes-specified-flag",i.attributes.length>0&&i.attributes.length<40)}return c.clearElement=function(a){return a.innerHTML="",a},c.normalize=function(a,b){var d=a.match(/[\?:]|[^:\?]*/g),e=0,f=function(a){var b=d[e++];return":"==b?0:"?"==d[e++]?!a&&c(b)?f():(f(!0),f(a)):b||0};return a=f(),a&&b(a)},c.load=function(a,b,c){a?b([a],c):c()},c}),define("dojo/sniff",["./has"],function(a){if(a("host-browser")){var b=navigator,c=b.userAgent,d=b.appVersion,e=parseFloat(d);if(a.add("air",c.indexOf("AdobeAIR")>=0),a.add("msapp",parseFloat(c.split("MSAppHost/")[1])||void 0),a.add("khtml",d.indexOf("Konqueror")>=0?e:void 0),a.add("webkit",parseFloat(c.split("WebKit/")[1])||void 0),a.add("chrome",parseFloat(c.split("Chrome/")[1])||void 0),a.add("safari",d.indexOf("Safari")>=0&&!a("chrome")?parseFloat(d.split("Version/")[1]):void 0),a.add("mac",d.indexOf("Macintosh")>=0),a.add("quirks","BackCompat"==document.compatMode),c.match(/(iPhone|iPod|iPad)/)){var f=RegExp.$1.replace(/P/,"p"),g=c.match(/OS ([\d_]+)/)?RegExp.$1:"1",h=parseFloat(g.replace(/_/,".").replace(/_/g,""));a.add(f,h),a.add("ios",h)}if(a.add("android",parseFloat(c.split("Android ")[1])||void 0),a.add("bb",(c.indexOf("BlackBerry")>=0||c.indexOf("BB10")>=0)&&parseFloat(c.split("Version/")[1])||void 0),a.add("trident",parseFloat(d.split("Trident/")[1])||void 0),a.add("svg","undefined"!=typeof SVGAngle),!a("webkit")){if(c.indexOf("Opera")>=0&&a.add("opera",e>=9.8?parseFloat(c.split("Version/")[1])||e:e),c.indexOf("Gecko")>=0&&!a("khtml")&&!a("webkit")&&!a("trident")&&a.add("mozilla",e),a("mozilla")&&a.add("ff",parseFloat(c.split("Firefox/")[1]||c.split("Minefield/")[1])||void 0),document.all&&!a("opera")){var i=parseFloat(d.split("MSIE ")[1])||void 0,j=document.documentMode;j&&5!=j&&Math.floor(i)!=j&&(i=j),a.add("ie",i)}a.add("wii","undefined"!=typeof opera&&opera.wiiremote)}}return a}),define("dojo/dom-geometry",["./sniff","./_base/window","./dom","./dom-style"],function(a,b,c,d){function e(a,b,c,d,e,f){f=f||"px";var g=a.style;isNaN(b)||(g.left=b+f),isNaN(c)||(g.top=c+f),d>=0&&(g.width=d+f),e>=0&&(g.height=e+f)}function f(a){return"button"==a.tagName.toLowerCase()||"input"==a.tagName.toLowerCase()&&"button"==(a.getAttribute("type")||"").toLowerCase()}function g(a){return"border-box"==h.boxModel||"table"==a.tagName.toLowerCase()||f(a)}var h={};h.boxModel="content-box",a("ie")&&(h.boxModel="BackCompat"==document.compatMode?"border-box":"content-box"),h.getPadExtents=function(a,b){a=c.byId(a);var e=b||d.getComputedStyle(a),f=d.toPixelValue,g=f(a,e.paddingLeft),h=f(a,e.paddingTop),i=f(a,e.paddingRight),j=f(a,e.paddingBottom);return{l:g,t:h,r:i,b:j,w:g+i,h:h+j}};var i="none";h.getBorderExtents=function(a,b){a=c.byId(a);var e=d.toPixelValue,f=b||d.getComputedStyle(a),g=f.borderLeftStyle!=i?e(a,f.borderLeftWidth):0,h=f.borderTopStyle!=i?e(a,f.borderTopWidth):0,j=f.borderRightStyle!=i?e(a,f.borderRightWidth):0,k=f.borderBottomStyle!=i?e(a,f.borderBottomWidth):0;return{l:g,t:h,r:j,b:k,w:g+j,h:h+k}},h.getPadBorderExtents=function(a,b){a=c.byId(a);var e=b||d.getComputedStyle(a),f=h.getPadExtents(a,e),g=h.getBorderExtents(a,e);return{l:f.l+g.l,t:f.t+g.t,r:f.r+g.r,b:f.b+g.b,w:f.w+g.w,h:f.h+g.h}},h.getMarginExtents=function(a,b){a=c.byId(a);var e=b||d.getComputedStyle(a),f=d.toPixelValue,g=f(a,e.marginLeft),h=f(a,e.marginTop),i=f(a,e.marginRight),j=f(a,e.marginBottom);return{l:g,t:h,r:i,b:j,w:g+i,h:h+j}},h.getMarginBox=function(b,e){b=c.byId(b);var f,g=e||d.getComputedStyle(b),j=h.getMarginExtents(b,g),k=b.offsetLeft-j.l,l=b.offsetTop-j.t,m=b.parentNode,n=d.toPixelValue;if(a("mozilla")){var o=parseFloat(g.left),p=parseFloat(g.top);isNaN(o)||isNaN(p)?m&&m.style&&(f=d.getComputedStyle(m),"visible"!=f.overflow&&(k+=f.borderLeftStyle!=i?n(b,f.borderLeftWidth):0,l+=f.borderTopStyle!=i?n(b,f.borderTopWidth):0)):(k=o,l=p)}else(a("opera")||8==a("ie")&&!a("quirks"))&&m&&(f=d.getComputedStyle(m),k-=f.borderLeftStyle!=i?n(b,f.borderLeftWidth):0,l-=f.borderTopStyle!=i?n(b,f.borderTopWidth):0);return{l:k,t:l,w:b.offsetWidth+j.w,h:b.offsetHeight+j.h}},h.getContentBox=function(b,e){b=c.byId(b);var f,g=e||d.getComputedStyle(b),i=b.clientWidth,j=h.getPadExtents(b,g),k=h.getBorderExtents(b,g);return i?(f=b.clientHeight,k.w=k.h=0):(i=b.offsetWidth,f=b.offsetHeight),a("opera")&&(j.l+=k.l,j.t+=k.t),{l:j.l,t:j.t,w:i-j.w-k.w,h:f-j.h-k.h}},h.setContentSize=function(a,b,d){a=c.byId(a);var f=b.w,i=b.h;if(g(a)){var j=h.getPadBorderExtents(a,d);f>=0&&(f+=j.w),i>=0&&(i+=j.h)}e(a,NaN,NaN,f,i)};var j={l:0,t:0,w:0,h:0};return h.setMarginBox=function(b,i,k){b=c.byId(b);var l=k||d.getComputedStyle(b),m=i.w,n=i.h,o=g(b)?j:h.getPadBorderExtents(b,l),p=h.getMarginExtents(b,l);if(a("webkit")&&f(b)){var q=b.style;m>=0&&!q.width&&(q.width="4px"),n>=0&&!q.height&&(q.height="4px")}m>=0&&(m=Math.max(m-o.w-p.w,0)),n>=0&&(n=Math.max(n-o.h-p.h,0)),e(b,i.l,i.t,m,n)},h.isBodyLtr=function(a){return a=a||b.doc,"ltr"==(b.body(a).dir||a.documentElement.dir||"ltr").toLowerCase()},h.docScroll=function(c){c=c||b.doc;var d=b.doc.parentWindow||b.doc.defaultView;return"pageXOffset"in d?{x:d.pageXOffset,y:d.pageYOffset}:(d=a("quirks")?b.body(c):c.documentElement)&&{x:h.fixIeBiDiScrollLeft(d.scrollLeft||0,c),y:d.scrollTop||0}},a("ie")&&(h.getIeDocumentElementOffset=function(c){c=c||b.doc;var d=c.documentElement;if(a("ie")<8){var e=d.getBoundingClientRect(),f=e.left,g=e.top;return a("ie")<7&&(f+=d.clientLeft,g+=d.clientTop),{x:0>f?0:f,y:0>g?0:g}}return{x:0,y:0}}),h.fixIeBiDiScrollLeft=function(c,d){d=d||b.doc;var e=a("ie");if(e&&!h.isBodyLtr(d)){var f=a("quirks"),g=f?b.body(d):d.documentElement,i=b.global;return 6==e&&!f&&i.frameElement&&g.scrollHeight>g.clientHeight&&(c+=g.clientLeft),8>e||f?c+g.clientWidth-g.scrollWidth:-c}return c},h.position=function(d,e){d=c.byId(d);var f=b.body(d.ownerDocument),g=d.getBoundingClientRect();if(g={x:g.left,y:g.top,w:g.right-g.left,h:g.bottom-g.top},a("ie")<9){var i=h.getIeDocumentElementOffset(d.ownerDocument);g.x-=i.x+(a("quirks")?f.clientLeft+f.offsetLeft:0),g.y-=i.y+(a("quirks")?f.clientTop+f.offsetTop:0)}if(e){var j=h.docScroll(d.ownerDocument);g.x+=j.x,g.y+=j.y}return g},h.getMarginSize=function(a,b){a=c.byId(a);var e=h.getMarginExtents(a,b||d.getComputedStyle(a)),f=a.getBoundingClientRect();return{w:f.right-f.left+e.w,h:f.bottom-f.top+e.h}},h.normalizeEvent=function(b){if("layerX"in b||(b.layerX=b.offsetX,b.layerY=b.offsetY),!a("dom-addeventlistener")){var c=b.target,d=c&&c.ownerDocument||document,e=a("quirks")?d.body:d.documentElement,f=h.getIeDocumentElementOffset(d);b.pageX=b.clientX+h.fixIeBiDiScrollLeft(e.scrollLeft||0,d)-f.x,b.pageY=b.clientY+(e.scrollTop||0)-f.y}},h}),define("dojo/dom-style",["./sniff","./dom"],function(a,b){function c(b,c,d){if(c=c.toLowerCase(),a("ie")||a("trident")){if("auto"==d){if("height"==c)return b.offsetHeight;if("width"==c)return b.offsetWidth}if("fontweight"==c)switch(d){case 700:return"bold";case 400:default:return"normal"}}return c in k||(k[c]=l.test(c)),k[c]?f(b,d):d}var d,e={};d=a("webkit")?function(a){var b;if(1==a.nodeType){var c=a.ownerDocument.defaultView;b=c.getComputedStyle(a,null),!b&&a.style&&(a.style.display="",b=c.getComputedStyle(a,null))}return b||{}}:a("ie")&&(a("ie")<9||a("quirks"))?function(a){return 1==a.nodeType&&a.currentStyle?a.currentStyle:{}}:function(a){return 1==a.nodeType?a.ownerDocument.defaultView.getComputedStyle(a,null):{}},e.getComputedStyle=d;var f;f=a("ie")?function(a,b){if(!b)return 0;if("medium"==b)return 4;if(b.slice&&"px"==b.slice(-2))return parseFloat(b);var c=a.style,d=a.runtimeStyle,e=a.currentStyle,f=c.left,g=d.left;d.left=e.left;try{c.left=b,b=c.pixelLeft}catch(h){b=0}return c.left=f,d.left=g,b}:function(a,b){return parseFloat(b)||0},e.toPixelValue=f;var g="DXImageTransform.Microsoft.Alpha",h=function(a,b){try{return a.filters.item(g)}catch(c){return b?{}:null}},i=a("ie")<9||a("ie")<10&&a("quirks")?function(a){try{return h(a).Opacity/100}catch(b){return 1}}:function(a){return d(a).opacity},j=a("ie")<9||a("ie")<10&&a("quirks")?function(a,b){""===b&&(b=1);var c=100*b,d=1===b;if(d?(a.style.zoom="",h(a)&&(a.style.filter=a.style.filter.replace(new RegExp("\\s*progid:"+g+"\\([^\\)]+?\\)","i"),""))):(a.style.zoom=1,h(a)?h(a,1).Opacity=c:a.style.filter+=" progid:"+g+"(Opacity="+c+")",h(a,1).Enabled=!0),"tr"==a.tagName.toLowerCase())for(var e=a.firstChild;e;e=e.nextSibling)"td"==e.tagName.toLowerCase()&&j(e,b);return b}:function(a,b){return a.style.opacity=b},k={left:!0,top:!0},l=/margin|padding|width|height|max|min|offset/,m={cssFloat:1,styleFloat:1,"float":1};return e.get=function(a,d){var f=b.byId(a),g=arguments.length,h="opacity"==d;if(2==g&&h)return i(f);d=m[d]?"cssFloat"in f.style?"cssFloat":"styleFloat":d;var j=e.getComputedStyle(f);return 1==g?j:c(f,d,j[d]||f.style[d])},e.set=function(a,c,d){var f=b.byId(a),g=arguments.length,h="opacity"==c;if(c=m[c]?"cssFloat"in f.style?"cssFloat":"styleFloat":c,3==g)return h?j(f,d):f.style[c]=d;for(var i in c)e.set(a,i,c[i]);return e.getComputedStyle(f)},e}),define("dcolor/Color",["dcl/dcl"],function(a){function b(a,b,c){return a=Number(a),isNaN(a)?c:b>a?b:a>c?c:a}function c(a,b,c){0>c&&++c,c>1&&--c;var d=6*c;return 1>d?a+(b-a)*d:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a}function d(a,b,d,e){a=(a%360+360)%360/360,b/=100,d/=100;var f=.5>=d?d*(b+1):d+b-d*b,g=2*d-f;return[256*c(g,f,a+1/3),256*c(g,f,a),256*c(g,f,a-1/3),e]}function e(a,b,c,d){a/=255,b/=255,c/=255;var e=Math.min(a,c,b),f=Math.max(a,b,c),g=f-e,h=0,i=0,j=(e+f)/2;return j>0&&1>j&&(i=g/(.5>j?2*j:2-2*j)),g>0&&(f===a&&f!==b&&(h+=(b-c)/g),f===b&&f!==c&&(h+=2+(c-a)/g),f===c&&f!==a&&(h+=4+(a-b)/g),h*=60),[h,Math.round(100*i),Math.round(100*j),d]}var f=function(a){a&&("string"==typeof a?f.fromString(a,this):Array.isArray(a)?f.fromRgbaArray(a,this):(this._set(a.r,a.g,a.b,a.a),a instanceof f||this.sanitize()))};return f.named={black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",transparent:"rgba(0,0,0,0)"},a.mix(f.prototype,{r:255,g:255,b:255,a:1,_set:function(a,b,c,d){var e=this;e.r=a,e.g=b,e.b=c,e.a=isNaN(d)?1:d},sanitize:function(){var a=this;return a.r=Math.round(b(a.r,0,255)),a.g=Math.round(b(a.g,0,255)),a.b=Math.round(b(a.b,0,255)),a.a=b(a.a,0,1),this},toRgbaArray:function(){var a=this;return[a.r,a.g,a.b,a.a]},toHslaArray:function(){var a=this;return e(a.r,a.g,a.b,a.a)},toHex:function(){var a=["r","g","b"].map(function(a){var b=this[a].toString(16);return b.length<2?"0"+b:b},this);return"#"+a.join("")},toRgbaString:function(a){var b=this,c=b.r+", "+b.g+", "+b.b;return(a?"rgba("+c+", "+b.a:"rgb("+c)+")"},toHslaString:function(a){var b=this.toHslaArray(),c=this,d=b[0]+", "+b[1]+", "+b[2];return(a?"hsla("+d+", "+c.a:"hsl("+b)+")"}}),f.fromRgbaString=function(a,b){var c=a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);if(c){var d=c[1].split(/\s*,\s*/),e=d[0];if("%"===e.charAt(e.length-1)){var g=d.map(function(a){return 2.56*parseFloat(a)});return 4===d.length&&(g[3]=d[3]),f.fromRgbaArray(g,b)}return f.fromRgbaArray(d,b)}return null},f.fromHslaString=function(a,b){var c=a.toLowerCase().match(/^hsla?\(([\s\.,0-9]+)\)/);if(c){var e=c[1].split(/\s*,\s*/);return f.fromRgbaArray(d(parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2]),4===e.length?e[3]:1),b)}return null},f.fromHex=function(a,b){var c=b||new f,d=4===a.length?4:8,e=(1<<d)-1;return a=Number("0x"+a.substr(1)),isNaN(a)?null:(["b","g","r"].forEach(function(b){var f=a&e;a>>=d,c[b]=4===d?17*f:f}),c.a=1,c)},f.fromRgbaArray=function(a,b){var c=b||new f;return c._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3])),isNaN(c.a)&&(c.a=1),c.sanitize()},f.fromHslaArray=function(a,b){var c=b||new f,e=d(Number(a[0]),Number(a[1]),Number(a[2]),isNaN(Number(a[3]))?1:Number(a[3]));return c._set(e[0],e[1],e[2],e[3]),c.sanitize()},f.fromString=function(a,b){var c=f.named[a];return c&&("string"==typeof c&&f.fromHex(c,b)||f.fromRgbaArray(c,b))||f.fromRgbaString(a,b)||f.fromHslaString(a,b)||f.fromHex(a,b)},f}),define("dtreemap/ScaledLabel",["dcl/dcl","dojo/dom-geometry"],function(a,b){var c=function(a){if("leaf"===a.kind){var c=a.renderer,d=c.ownerDocument.defaultView.getComputedStyle(c,null).fontSize;c.firstChild.style.fontSize=d,d=parseInt(d,10);for(var e=.75*b.getContentBox(c).w/b.getMarginBox(c.firstChild).w,f=b.getContentBox(c).h/b.getMarginBox(c.firstChild).h,g=b.getContentBox(c).w-b.getMarginBox(c.firstChild).w,h=b.getContentBox(c).h-b.getMarginBox(c.firstChild).h,i=Math.floor(d*Math.min(e,f));h>0&&g>0;)c.firstChild.style.fontSize=i+"px",g=b.getContentBox(c).w-b.getMarginBox(c.firstChild).w,h=b.getContentBox(c).h-b.getMarginBox(c.firstChild).h,d=i,i+=1;(0>h||0>g)&&(c.firstChild.style.fontSize=d+"px")}};return a(null,{preRender:function(){this.on("treemap-renderer-updated",c)},createRenderer:a.superCall(function(b){return function(c,d,e){var f=b.call(this,c,d,e);if("leaf"===e){var g=this.ownerDocument.createElement("div");a.mix(g.style,{position:"absolute",width:"auto"}),f.appendChild(g)}return f}}),styleRenderer:a.superCall(function(a){return function(b,c,d,e){"leaf"!==e?a.call(this,b,c,d,e):(b.style.background=this.getColorForItem(c).toHex(),b.firstChild.innerHTML=this.getLabelForItem(c))}})})}),define("dtreemap/Keyboard",["dcl/dcl","delite/keys","./_utils","dpointer/events"],function(a,b,c){return a(null,{constructor:function(){},postRender:function(){this.on("keydown",this._keyDownHandler.bind(this)),this.on("pointerdown",this._pointerDownHandler.bind(this)),this.hasAttribute("tabindex")||(this.tabIndex="0"),this.on("focusin",this._focusInHandler.bind(this))},createRenderer:a.superCall(function(a){return function(b,c,d){var e=a.call(this,b,c,d);return e.setAttribute("tabindex","-1"),e}}),_focusInHandler:function(){this.selectedItem||(this.selectedItem=this.firstChild.firstChild.item)},_pointerDownHandler:function(){this.focus()},_keyDownHandler:function(a){var d=this.selectedItem;if(d){var e,f,g,h=this.itemToRenderer[this.getIdentity(d)],i=h.parentItem;if(a.keyCode!==b.UP_ARROW&&a.keyCode!==b.NUMPAD_MINUS&&a.keyCode!==b.NUMPAD_PLUS){if(e=a.keyCode===b.DOWN_ARROW?d.children:i.children,!e)return;f=c.initElements(e,this._computeAreaForItem.bind(this)).elements,g=f[e.indexOf(d)],f.sort(function(a,b){return b.size-a.size})}this._navigate(a,h,d,i,e,f,g)}},_navigate:function(a,c,d,e,f,g,h){var i;switch(a.keyCode){case b.LEFT_ARROW:i=f[g[Math.max(0,g.indexOf(h)-1)].index];break;case b.RIGHT_ARROW:i=f[g[Math.min(g.length-1,g.indexOf(h)+1)].index];break;case b.DOWN_ARROW:i=f[g[0].index];break;case b.UP_ARROW:i=e;break;case b.NUMPAD_PLUS:!this._isLeaf(d)&&this.drillDown&&(this.drillDown(c),a.preventDefault(),a.stopPropagation());break;case b.NUMPAD_MINUS:!this._isLeaf(d)&&this.drillUp&&(this.drillUp(c),a.preventDefault(),a.stopPropagation())}i&&this._selectItem(a,i)},_selectItem:function(a,b){this._isRoot(b)||(this.selectedItem=b,a.preventDefault(),a.stopPropagation())}})}),define("dtreemap/GroupLabel",["dcl/dcl","requirejs-dplugins/css!./themes/GroupLabel.css"],function(a){
return a(null,{createRenderer:a.superCall(function(b){return function(c,d,e){var f=b.call(this,c,d,e);if("content"===e||"leaf"===e){var g=this.ownerDocument.createElement("div");a.mix(g.style,{zIndex:30,position:"relative",height:"100%",textAlign:"center",top:"50%",marginTop:"-.5em"}),f.appendChild(g)}return f}}),styleRenderer:function(a,b,c,d){switch(d){case"leaf":a.style.background=this.getColorForItem(b).toHex();case"content":0===c?a.firstChild.innerHTML=this.getLabelForItem(b):a.firstChild.innerHTML=null;break;case"header":a.style.display="none"}}})}),define("dtreemap/DrillDownUp",["dcl/dcl","dojo/dom-geometry","dojo/_base/fx","requirejs-dplugins/css!./themes/DrillDownUp.css","dpointer/events"],function(a,b,c){return a(null,{postRender:function(){this.on("dblclick",this._dblClickHandler.bind(this))},_dblClickHandler:function(a){var b=this._getRendererFromTarget(a.target);if(b.item){var c=b.item;if(this._isLeaf(c)&&(c=b.parentItem,b=this.itemToRenderer[this.getIdentity(c)],null==b))return;this.rootItem===c?this.drillUp(b):this.drillDown(b),a.preventDefault(),a.stopPropagation()}},drillUp:function(a){var d=a.item,e=this,f=a.parentNode;f.removeChild(a),this.rootItem=this._getRenderer(d).parentItem,this.deliver(),this.containerNode.appendChild(a),a.style.zIndex=40;var g=b.position(this._getRenderer(d),!0),h=b.getMarginBox(this);c.animateProperty({node:a,duration:500,properties:{left:{end:g.x-h.l},top:{end:g.y-h.t},height:{end:g.h},width:{end:g.w}},onAnimate:function(){var c=b.getContentBox(a);e._layoutGroupContent(a,c.w,c.h,a.level+1,!1,!0)},onEnd:function(){f.removeChild(a)}}).play()},drillDown:function(a){var d=b.getMarginBox(this),e=a.item,f=this,g=a.parentNode;g.removeChild(a),this.containerNode.appendChild(a);var h=a.style.zIndex;a.style.zIndex=40,c.animateProperty({node:a,duration:500,properties:{left:{end:0},top:{end:0},height:{end:d.h},width:{end:d.w}},onAnimate:function(){var c=b.getContentBox(a);f._layoutGroupContent(a,c.w,c.h,a.level+1,!1)},onEnd:function(){a.style.zIndex=h,f.rootItem=e}}).play()}})}),define("dojo/_base/fx",["./kernel","./config","./lang","../Evented","./Color","../aspect","../sniff","../dom","../dom-style"],function(a,b,c,d,e,f,g,h,i){var j=c.mixin,k={},l=k._Line=function(a,b){this.start=a,this.end=b};l.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};var m=k.Animation=function(a){j(this,a),c.isArray(this.curve)&&(this.curve=new l(this.curve[0],this.curve[1]))};m.prototype=new d,c.extend(m,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var a=this._percent,b=this.easing;return b?b(a):a},_fire:function(a,c){var d=c||[];if(this[a])if(b.debugAtAllCosts)this[a].apply(this,d);else try{this[a].apply(this,d)}catch(e){console.error("exception in animation handler for:",a),console.error(e)}return this},play:function(a,b){var d=this;if(d._delayTimer&&d._clearTimer(),b)d._stopTimer(),d._active=d._paused=!1,d._percent=0;else if(d._active&&!d._paused)return d;d._fire("beforeBegin",[d.node]);var e=a||d.delay,f=c.hitch(d,"_play",b);return e>0?(d._delayTimer=setTimeout(f,e),d):(f(),d)},_play:function(a){var b=this;b._delayTimer&&b._clearTimer(),b._startTime=(new Date).valueOf(),b._paused&&(b._startTime-=b.duration*b._percent),b._active=!0,b._paused=!1;var c=b.curve.getValue(b._getStep());return b._percent||(b._startRepeatCount||(b._startRepeatCount=b.repeat),b._fire("onBegin",[c])),b._fire("onPlay",[c]),b._cycle(),b},pause:function(){var a=this;return a._delayTimer&&a._clearTimer(),a._stopTimer(),a._active?(a._paused=!0,a._fire("onPause",[a.curve.getValue(a._getStep())]),a):a},gotoPercent:function(a,b){var c=this;return c._stopTimer(),c._active=c._paused=!0,c._percent=a,b&&c.play(),c},stop:function(a){var b=this;return b._delayTimer&&b._clearTimer(),b._timer?(b._stopTimer(),a&&(b._percent=1),b._fire("onStop",[b.curve.getValue(b._getStep())]),b._active=b._paused=!1,b):b},destroy:function(){this.stop()},status:function(){return this._active?this._paused?"paused":"playing":"stopped"},_cycle:function(){var a=this;if(a._active){var b=(new Date).valueOf(),c=0===a.duration?1:(b-a._startTime)/a.duration;c>=1&&(c=1),a._percent=c,a.easing&&(c=a.easing(c)),a._fire("onAnimate",[a.curve.getValue(c)]),a._percent<1?a._startTimer():(a._active=!1,a.repeat>0?(a.repeat--,a.play(null,!0)):-1==a.repeat?a.play(null,!0):a._startRepeatCount&&(a.repeat=a._startRepeatCount,a._startRepeatCount=0),a._percent=0,a._fire("onEnd",[a.node]),!a.repeat&&a._stopTimer())}return a},_clearTimer:function(){clearTimeout(this._delayTimer),delete this._delayTimer}});var n=0,o=null,p={run:function(){}};c.extend(m,{_startTimer:function(){this._timer||(this._timer=f.after(p,"run",c.hitch(this,"_cycle"),!0),n++),o||(o=setInterval(c.hitch(p,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,n--),0>=n&&(clearInterval(o),o=null,n=0)}});var q=g("ie")?function(a){var b=a.style;b.width.length||"auto"!=i.get(a,"width")||(b.width="auto")}:function(){};k._fade=function(a){a.node=h.byId(a.node);var b=j({properties:{}},a),d=b.properties.opacity={};d.start="start"in b?b.start:function(){return+i.get(b.node,"opacity")||0},d.end=b.end;var e=k.animateProperty(b);return f.after(e,"beforeBegin",c.partial(q,b.node),!0),e},k.fadeIn=function(a){return k._fade(j({end:1},a))},k.fadeOut=function(a){return k._fade(j({end:0},a))},k._defaultEasing=function(a){return.5+Math.sin((a+1.5)*Math.PI)/2};var r=function(a){this._properties=a;for(var b in a){var c=a[b];c.start instanceof e&&(c.tempColor=new e)}};return r.prototype.getValue=function(a){var b={};for(var d in this._properties){var f=this._properties[d],g=f.start;g instanceof e?b[d]=e.blendColors(g,f.end,a,f.tempColor).toCss():c.isArray(g)||(b[d]=(f.end-g)*a+g+("opacity"!=d?f.units||"px":0))}return b},k.animateProperty=function(b){var d=b.node=h.byId(b.node);b.easing||(b.easing=a._defaultEasing);var g=new m(b);return f.after(g,"beforeBegin",c.hitch(g,function(){function a(a,b){var c={height:a.offsetHeight,width:a.offsetWidth}[b];return void 0!==c?c:(c=i.get(a,b),"opacity"==b?+c:h?c:parseFloat(c))}var b={};for(var f in this.properties){("width"==f||"height"==f)&&(this.node.display="block");var g=this.properties[f];c.isFunction(g)&&(g=g(d)),g=b[f]=j({},c.isObject(g)?g:{end:g}),c.isFunction(g.start)&&(g.start=g.start(d)),c.isFunction(g.end)&&(g.end=g.end(d));var h=f.toLowerCase().indexOf("color")>=0;"end"in g?"start"in g||(g.start=a(d,f)):g.end=a(d,f),h?(g.start=new e(g.start),g.end=new e(g.end)):g.start="opacity"==f?+g.start:parseFloat(g.start)}this.curve=new r(b)}),!0),f.after(g,"onAnimate",c.hitch(i,"set",g.node),!0),g},k.anim=function(a,b,c,d,e,f){return k.animateProperty({node:a,duration:c||m.prototype.duration,properties:b,easing:d,onEnd:e}).play(f||0)},g("extend-dojo")&&(j(a,k),a._Animation=m),k}),define("dojo/_base/Color",["./kernel","./lang","./array","./config"],function(a,b,c,d){var e=a.Color=function(a){a&&this.setColor(a)};return e.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:d.transparentColor||[0,0,0,0]},b.extend(e,{r:255,g:255,b:255,a:1,_set:function(a,b,c,d){var e=this;e.r=a,e.g=b,e.b=c,e.a=d},setColor:function(a){return b.isString(a)?e.fromString(a,this):b.isArray(a)?e.fromArray(a,this):(this._set(a.r,a.g,a.b,a.a),a instanceof e||this.sanitize()),this},sanitize:function(){return this},toRgb:function(){var a=this;return[a.r,a.g,a.b]},toRgba:function(){var a=this;return[a.r,a.g,a.b,a.a]},toHex:function(){var a=c.map(["r","g","b"],function(a){var b=this[a].toString(16);return b.length<2?"0"+b:b},this);return"#"+a.join("")},toCss:function(a){var b=this,c=b.r+", "+b.g+", "+b.b;return(a?"rgba("+c+", "+b.a:"rgb("+c)+")"},toString:function(){return this.toCss(!0)}}),e.blendColors=a.blendColors=function(a,b,d,f){var g=f||new e;return c.forEach(["r","g","b","a"],function(c){g[c]=a[c]+(b[c]-a[c])*d,"a"!=c&&(g[c]=Math.round(g[c]))}),g.sanitize()},e.fromRgb=a.colorFromRgb=function(a,b){var c=a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return c&&e.fromArray(c[1].split(/\s*,\s*/),b)},e.fromHex=a.colorFromHex=function(a,b){var d=b||new e,f=4==a.length?4:8,g=(1<<f)-1;return a=Number("0x"+a.substr(1)),isNaN(a)?null:(c.forEach(["b","g","r"],function(b){var c=a&g;a>>=f,d[b]=4==f?17*c:c}),d.a=1,d)},e.fromArray=a.colorFromArray=function(a,b){var c=b||new e;return c._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3])),isNaN(c.a)&&(c.a=1),c.sanitize()},e.fromString=a.colorFromString=function(a,b){var c=e.named[a];return c&&e.fromArray(c,b)||e.fromRgb(a,b)||e.fromHex(a,b)},e}),define("dojo/Evented",["./aspect","./on"],function(a,b){"use strict";function c(){}var d=a.after;return c.prototype={on:function(a,c){return b.parse(this,a,c,function(a,b){return d(a,"on"+b,c,!0)})},emit:function(a,c){var d=[this];return d.push.apply(d,arguments),b.emit.apply(b,d)}},c});
//# sourceMappingURL=layer.map
var paths = {};
!require.s.contexts._.config.paths["dtreemap"] && (paths["dtreemap"] = "dtreemap-build");
!require.s.contexts._.config.paths["dcolor"] && (paths["dcolor"] = "dcolor-build");
!require.s.contexts._.config.paths["dpointer"] && (paths["dpointer"] = "dpointer-build");
!require.s.contexts._.config.paths["delite"] && (paths["delite"] = "delite-build");
require.config({
paths: paths
});
define("dtreemap-build/layer", ["dcolor-build/layer","dpointer-build/layer","delite-build/layer"], function(){});