//>>built
define("dijit/_CssStateMixin","dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-class dojo/has dojo/_base/lang dojo/on dojo/domReady dojo/touch dojo/_base/window ./a11yclick ./registry".split(" "),function(h,m,r,k,x,t,l,u,n,v,p,q){m=m("dijit._CssStateMixin",[],{hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);h.forEach("disabled readOnly checked selected focused state hovering active _opened".split(" "),function(c){this.watch(c,t.hitch(this,"_setStateClass"))},this);
for(var a in this.cssStateNodes||{})this._trackMouseState(this[a],this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":case "MSPointerOver":case "pointerover":this._set("hovering",!0);this._set("active",this._mouseDown);break;case "mouseout":case "MSPointerOut":case "pointerout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":this._set("active",
!0);break;case "mouseup":case "dojotouchend":case "MSPointerUp":case "pointerup":case "keyup":this._set("active",!1)}},_setStateClass:function(){function a(e){c=c.concat(h.map(c,function(w){return w+e}),"dijit"+e)}var c=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");var f="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(f);this.state&&a(this.state);this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?
a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");f=this.stateNode||this.domNode;var b={};h.forEach(f.className.split(" "),function(e){b[e]=!0});"_stateClasses"in this&&h.forEach(this._stateClasses,function(e){delete b[e]});h.forEach(c,function(e){b[e]=!0});var d=[],g;for(g in b)d.push(g);f.className=d.join(" ");this._stateClasses=c},_subnodeCssMouseEvent:function(a,c,f){function b(d){k.toggle(a,c+"Active",d)}if(!this.disabled&&!this.readOnly)switch(f.type){case "mouseover":case "MSPointerOver":case "pointerover":k.toggle(a,
c+"Hover",!0);break;case "mouseout":case "MSPointerOut":case "pointerout":k.toggle(a,c+"Hover",!1);b(!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":b(!0);break;case "mouseup":case "MSPointerUp":case "pointerup":case "dojotouchend":case "keyup":b(!1);break;case "focus":case "focusin":k.toggle(a,c+"Focused",!0);break;case "blur":case "focusout":k.toggle(a,c+"Focused",!1)}},_trackMouseState:function(a,c){a._cssState=c}});u(function(){function a(b,
d,g){if(!g||!r.isDescendant(g,d))for(;d&&d!=g;d=d.parentNode)if(d._cssState){var e=q.getEnclosingWidget(d);e&&(d==e.domNode?e._cssMouseEvent(b):e._subnodeCssMouseEvent(d,d._cssState,b))}}var c=v.body(),f;l(c,n.over,function(b){a(b,b.target,b.relatedTarget)});l(c,n.out,function(b){a(b,b.target,b.relatedTarget)});l(c,p.press,function(b){f=b.target;a(b,f)});l(c,p.release,function(b){a(b,f);f=null});l(c,"focusin, focusout",function(b){var d=b.target;if(d._cssState&&!d.getAttribute("widgetId")){var g=
q.getEnclosingWidget(d);g&&g._subnodeCssMouseEvent(d,d._cssState,b)}})});return m});