YUI.add("event-tap",function(a,e){a.config.doc;var o=a.Event._GESTURE_MAP,s=o.start,h=/pointer/i,r={START:"Y_TAP_ON_START_HANDLE",END:"Y_TAP_ON_END_HANDLE",CANCEL:"Y_TAP_ON_CANCEL_HANDLE"};function d(n,e){e=e||a.Object.values(r),a.Array.each(e,function(e){var t=n[e];t&&(t.detach(),n[e]=null)})}a.Event.define("tap",{publishConfig:{preventedFn:function(e){var t=e.target.once("click",function(e){e.preventDefault()});setTimeout(function(){t.detach()},100)}},processArgs:function(e,t){if(!t)return t=e[3],e.splice(3,1),t},on:function(e,t,n){t[r.START]=e.on(s,this._start,this,e,t,n)},detach:function(e,t,n){d(t)},delegate:function(t,n,c,e){n[r.START]=a.delegate(s,function(e){this._start(e,t,n,c,!0)},t,e,this)},detachDelegate:function(e,t,n){d(t)},_start:function(e,t,n,c,a){var s={canceled:!1,eventType:e.type},i=n.preventMouse||!1;e.button&&3===e.button||e.touches&&1!==e.touches.length||(s.node=a?e.currentTarget:t,e.touches?s.startXY=[e.touches[0].pageX,e.touches[0].pageY]:s.startXY=[e.pageX,e.pageY],e.touches?(n[r.END]=t.once("touchend",this._end,this,t,n,c,a,s),n[r.CANCEL]=t.once("touchcancel",this.detach,this,t,n,c,a,s),n.preventMouse=!0):-1===s.eventType.indexOf("mouse")||i?-1!==s.eventType.indexOf("mouse")&&i?n.preventMouse=!1:h.test(s.eventType)&&(n[r.END]=t.once(o.end,this._end,this,t,n,c,a,s),n[r.CANCEL]=t.once(o.cancel,this.detach,this,t,n,c,a,s)):(n[r.END]=t.once("mouseup",this._end,this,t,n,c,a,s),n[r.CANCEL]=t.once("mousecancel",this.detach,this,t,n,c,a,s)))},_end:function(e,t,n,c,a,s){var i,o,h=s.startXY,u=15;n._extra&&0<=n._extra.sensitivity&&(u=n._extra.sensitivity),o=e.changedTouches?(i=[e.changedTouches[0].pageX,e.changedTouches[0].pageY],[e.changedTouches[0].clientX,e.changedTouches[0].clientY]):(i=[e.pageX,e.pageY],[e.clientX,e.clientY]),Math.abs(i[0]-h[0])<=u&&Math.abs(i[1]-h[1])<=u&&(e.type="tap",e.pageX=i[0],e.pageY=i[1],e.clientX=o[0],e.clientY=o[1],e.currentTarget=s.node,c.fire(e)),d(n,[r.END,r.CANCEL])}})},"patched-v3.18.7",{requires:["node-base","event-base","event-touch","event-synthetic"]});