define(["Ti/_/declare","Ti/_/lang"],function(n,e){var l=null,t=null,u=null,c=100,h=25;return e.setObject("Ti._.Gestures.TwoFingerTap",{processTouchStartEvent:function(n){var e=n.changedTouches[0].clientX,h=n.changedTouches[0].clientY,a=n.touches.length,s=n.changedTouches.length;1==a&&1==s?(l=[{x:e,y:h}],u=setTimeout(function(){l=null,t=null},c)):2==a&&1==s?(clearTimeout(u),l&&l.push({x:e,y:h})):2==a&&2==s?l=[{x:e,y:h},{x:n.changedTouches[1].clientX,y:n.changedTouches[1].clientY}]:(l=null,t=null)},processTouchEndEvent:function(n){var e,a,s,i=n.changedTouches,o=i[0].clientX,r=i[0].clientY,x=n.touches.length,y=i.length,T={};if(1==x&&1==y)t=[{x:o,y:r}],u=setTimeout(function(){l=null,t=null},c);else if(0!==x||1!==y&&2!==y)l=null,t=null;else if(l&&2===l.length){for(t||(t=[]),e=0;y>e;e++)t.push({x:i[e].clientX,y:i[e].clientY});return 2===t.length&&(a=Math.abs(l[0].x-t[0].x)<h&&Math.abs(l[0].y-t[0].y)<h,s=Math.abs(l[1].x-t[1].x)<h&&Math.abs(l[1].y-t[1].y)<h,a&&s||(a=Math.abs(l[0].x-t[1].x)<h&&Math.abs(l[0].y-t[1].y)<h,s=Math.abs(l[1].x-t[0].x)<h&&Math.abs(l[1].y-t[0].y)<h),a&&s&&(T.twofingertap=[{x:(l[0].x+l[1].x)/2,y:(l[0].y+l[1].y)/2}])),l=null,t=null,T}},processTouchCancelEvent:function(){l=null,t=null}})});