YUI.add("widget-uievents",function(s,t){var r=s.Widget,i=s.Lang,a=s.Widget._uievts=s.Widget._uievts||{};s.mix(r.prototype,{_destroyUIEvents:function(){var n=s.stamp(this,!0);s.each(a,function(t,e){t.instances[n]&&(delete t.instances[n],s.Object.isEmpty(t.instances)&&(t.handle.detach(),a[e]&&delete a[e]))})},UI_EVENTS:s.Node.DOM_EVENTS,_getUIEventNode:function(){return this.get("boundingBox")},_createUIEvent:function(t){var e=this._getUIEventNode(),n=s.stamp(e)+t,i=a[n];i||(t=e.delegate(t,function(t){var e=r.getByNode(this);e&&e._filterUIEvent(t)&&e.fire(t.type,{domEvent:t})},"."+s.Widget.getClassName()),a[n]=i={instances:{},handle:t}),i.instances[s.stamp(this)]=1},_filterUIEvent:function(t){return t.currentTarget.compareTo(t.container)||t.container.compareTo(this._getUIEventNode())},_getUIEvent:function(t){var e,n;if(i.isString(t))return(t=this.parseType(t)[1])&&(-1<(e=t.indexOf(":"))&&(t=t.substring(e+":".length)),this.UI_EVENTS[t]&&(n=t)),n},_initUIEvent:function(t){var e=this._getUIEvent(t),t=this._uiEvtsInitQueue||{};e&&!t[e]&&(this._uiEvtsInitQueue=t[e]=1,this.after("render",function(){this._createUIEvent(e),delete this._uiEvtsInitQueue[e]}))},on:function(t){return this._initUIEvent(t),r.superclass.on.apply(this,arguments)},publish:function(t,e){var n=this._getUIEvent(t);return n&&e&&e.defaultFn&&this._initUIEvent(n),r.superclass.publish.apply(this,arguments)}},!0)},"patched-v3.18.3",{requires:["node-event-delegate","widget-base"]});