YUI.add("event-outside",function(o,e){o.Event.defineOutside=function(u,e){e=e||u+"outside";var t={on:function(t,e,n){e.handle=o.one("doc").on(u,function(e){this.isOutside(t,e.target)&&(e.currentTarget=t,n.fire(e))},this)},detach:function(e,t,n){t.handle.detach()},delegate:function(t,e,n,i){e.handle=o.one("doc").delegate(u,function(e){this.isOutside(t,e.target)&&n.fire(e)},i,this)},isOutside:function(t,e){return e!==t&&!e.ancestor(function(e){return e===t})}};t.detachDelegate=t.detach,o.Event.define(e,t)},o.Array.each(["blur","change","click","dblclick","focus","keydown","keypress","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","select","submit"],function(e){o.Event.defineOutside(e)})},"patched-v3.18.4",{requires:["event-synthetic"]});