//>>built
define("dojox/form/Rating","dojo/_base/declare dojo/_base/lang dojo/dom-attr dojo/dom-class dojo/mouse dojo/on dojo/string dojo/query dijit/form/_FormWidget".split(" "),function(n,e,h,f,p,c,k,m,q){return n("dojox.form.Rating",q,{templateString:null,numStars:3,value:0,buildRendering:function(a){this.name=this.name||"rating-"+Math.random().toString(36).substring(2);for(var b='\x3clabel class\x3d"dojoxRatingStar dijitInline ${hidden}"\x3e\x3cspan class\x3d"dojoxRatingLabel"\x3e${value} stars\x3c/span\x3e\x3cinput type\x3d"radio" name\x3d"'+
this.name+'" value\x3d"${value}" dojoAttachPoint\x3d"focusNode" class\x3d"dojoxRatingInput"\x3e\x3c/label\x3e',d='\x3cdiv dojoAttachPoint\x3d"domNode" class\x3d"dojoxRating dijitInline"\x3e\x3cdiv data-dojo-attach-point\x3d"list"\x3e'+k.substitute(b,{value:0,hidden:"dojoxRatingHidden"})+"${stars}\x3c/div\x3e\x3c/div\x3e",g="",l=0;l<this.numStars;l++)g+=k.substitute(b,{value:l+1,hidden:""});this.templateString=k.substitute(d,{stars:g});this.inherited(arguments)},postCreate:function(){this.inherited(arguments);
this._renderStars(this.value);this.own(c(this.list,c.selector(".dojoxRatingStar","mouseover"),e.hitch(this,"_onMouse")),c(this.list,c.selector(".dojoxRatingStar","click"),e.hitch(this,"_onClick")),c(this.list,c.selector(".dojoxRatingInput","change"),e.hitch(this,"onStarChange")),c(this.list,p.leave,e.hitch(this,function(){this._renderStars(this.value)})))},_onMouse:function(a){var b=+h.get(a.target.querySelector("input"),"value");this._renderStars(b,!0);this.onMouseOver(a,b)},_onClick:function(a){if("LABEL"===
a.target.tagName){var b=+h.get(a.target.querySelector("input"),"value");a.target.value=b;this.onStarClick(a,b);b==this.value&&(a.preventDefault(),this.onStarChange(a))}},_renderStars:function(a,b){m(".dojoxRatingStar",this.domNode).forEach(function(d,g){g>a?(f.remove(d,"dojoxRatingStarHover"),f.remove(d,"dojoxRatingStarChecked")):(f.remove(d,"dojoxRatingStar"+(b?"Checked":"Hover")),f.add(d,"dojoxRatingStar"+(b?"Hover":"Checked")))})},onStarChange:function(a){a=+h.get(a.target,"value");this.setAttribute("value",
a==this.value?0:a);this._renderStars(this.value);this.onChange(this.value)},onStarClick:function(a,b){},onMouseOver:function(){},setAttribute:function(a,b){this.set(a,b)},_setValueAttr:function(a){this._set("value",a);this._renderStars(a);var b=m("input[type\x3dradio]",this.domNode)[a];b&&(b.checked=!0);this.onChange(a)}})});