text: define("EventUtils",[smokesignals,document],function(k,d){var g={};k.convert(g);var m=function(){if(d.addEventListener)return function(a,b,c){a.addEventListener(b,c,!1)};if(d.attachEvent)return function(a,b,c){a.attachEvent("on"+b,function(b){c.call(a,b)})}}(),n=function(){if(d.removeEventListener)return function(a,b,c){a.removeEventListener(b,c,!1)};if(d.detachEvent)return function(a,b,c){a.detachEvent("on"+b,c)}}(),p=function(){return d.createEvent?function(a){var b=d.createEvent("HTMLEvents");
  b.initEvent(a,!0,!0);return b}:function(a){var b=d.createEventObject();b.eventType=a;return b}}(),q=function(){return d.createEvent?function(a){d.dispatchEvent(a)}:function(a){d.fireEvent("on"+a.eventType,a)}}();return{attach:function(a){var b=a.element||d,b=a.elements||[b],c=a.event,h=a.callback;a=a.custom;if(c)if(a)g.on(c,h);else{a=0;for(var e=b.length;a<e;a++)m(b[a],c,h)}},waitForAllCustomEvents:function(a){var b=a.events,c=a.callback;a=a.timeout;var d=[],e=!1,l=null;a&&(l=window.setTimeout(function(){if(!e){e=
  !0;for(var a=[],f=0;f<b.length;++f)d[f]||a.push(b[f]);c({pendingEvents:a})}},a));for(a=0;a<b.length;++a){d[a]=!1;var k=function(a){return function(){d[a]=!0;a:if(!e){for(var f=0;f<b.length;++f)if(!d[f])break a;e=!0;l&&window.clearTimeout(l);c()}}}(a);g.on(b[a],k)}},detach:function(a){var b=a.element||d,b=a.elements||[b],c=a.event,h=a.callback;a=a.custom;if(c)if(a)g.off(c);else{a=0;for(var e=b.length;a<e;a++)n(b[a],c,h)}},trigger:function(a,b,c){a&&(b?g.emit(a,c):q(p(a)))},stopPropagation:function(a){a.stopPropagation?
  a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault&&a.preventDefault();a.returnValue=!1},getClickXY:function(a){return"pageX"in a?{pageX:a.pageX,pageY:a.pageY}:{pageX:a.clientX+d.documentElement.scrollLeft,pageY:a.clientY+d.documentElement.scrollTop}}}});