//>>built
define("dojox/treemap/Keyboard","dojo/_base/array dojo/_base/lang dojo/_base/event dojo/_base/declare dojo/on dojo/keys dojo/dom-attr ./_utils dijit/_FocusMixin".split(" "),function(k,l,m,q,n,a,r,t,u){return q("dojox.treemap.Keyboard",u,{tabIndex:"0",_setTabIndexAttr:"domNode",constructor:function(){},postCreate:function(){this.inherited(arguments);this.own(n(this.domNode,"keydown",l.hitch(this,this._onKeyDown)));this.own(n(this.domNode,"mousedown",l.hitch(this,this._onMouseDown)))},createRenderer:function(b,
d,h){var g=this.inherited(arguments);r.set(g,"tabindex","-1");return g},_onMouseDown:function(b){this.domNode.focus()},_onKeyDown:function(b){var d=this.get("selectedItem");if(d){var h=this.itemToRenderer[this.getIdentity(d)],g=h.parentItem,e;if(b.keyCode!=a.UP_ARROW&&b.keyCode!=a.NUMPAD_MINUS&&b.keyCode!=a.NUMPAD_PLUS)if(e=b.keyCode==a.DOWN_ARROW?d.children:g.children){var c=t.initElements(e,l.hitch(this,this._computeAreaForItem)).elements;var p=c[k.indexOf(e,d)];c.sort(function(v,w){return w.size-
v.size})}else return;switch(b.keyCode){case a.LEFT_ARROW:var f=e[c[Math.max(0,k.indexOf(c,p)-1)].index];break;case a.RIGHT_ARROW:f=e[c[Math.min(c.length-1,k.indexOf(c,p)+1)].index];break;case a.DOWN_ARROW:f=e[c[0].index];break;case a.UP_ARROW:f=g;break;case a.NUMPAD_PLUS:!this._isLeaf(d)&&this.drillDown&&(this.drillDown(h),m.stop(b));break;case a.NUMPAD_MINUS:!this._isLeaf(d)&&this.drillUp&&(this.drillUp(h),m.stop(b))}f&&!this._isRoot(f)&&(this.set("selectedItem",f),m.stop(b))}}})});