text: /** @license React vundefined
   * react-events-swipe.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  'use strict';var g=require("react"),h=["pointerdown"],k=["pointerup","pointercancel","pointermove_active"];"undefined"!==typeof window&&void 0===window.PointerEvent&&(h.push("touchstart","mousedown"),k.push("mouseup","mousemove","touchend","touchcancel","touchmove_active"));function m(a){return"function"===typeof a}function n(a,f,d,b,c,e){d=a.objectAssign({target:b.swipeTarget,type:d,timeStamp:a.getTimeStamp()},e);a.dispatchEvent(d,f,c)}
  var p=g.unstable_createResponder("Swipe",{targetEventTypes:h,getInitialState:function(){return{direction:0,isSwiping:!1,lastDirection:0,startX:0,startY:0,touchId:null,swipeTarget:null,x:0,y:0}},onEvent:function(a,f,d,b){d=a.target;var c=a.type,e=a.nativeEvent;switch(c){case "touchstart":case "mousedown":case "pointerdown":b.isSwiping||(a=e,"touchstart"===c&&(a=e.targetTouches[0],b.touchId=a.identifier),c=a.screenX,a=a.screenY,b.isSwiping=!0,b.startX=c,b.startY=a,b.x=c,b.y=a,b.swipeTarget=d,f.addRootEventTypes(k))}},
  onRootEvent:function(a,f,d,b){var c=a.type,e=a.nativeEvent;switch(c){case "touchmove":case "mousemove":case "pointermove":if(a.passive)break;if(b.isSwiping){a=null;if("touchmove"===c){c=e.targetTouches;for(var l=0;l<c.length;l++)if(b.touchId===c[l].identifier){a=c[l];break}}else a=e;null===a?(b.isSwiping=!1,b.swipeTarget=null,b.touchId=null,f.removeRootEventTypes(k)):(c=a.screenX,a=a.screenY,c<b.x?b.direction=3:c>b.x&&(b.direction=1),b.x=c,b.y=a,a={diffX:c-b.startX,diffY:a-b.startY},d=d.onSwipeMove,
  m(d)&&n(f,d,"swipemove",b,1,a),e.preventDefault())}break;case "pointercancel":case "touchcancel":case "touchend":case "mouseup":case "pointerup":!b.isSwiping||b.x===b.startX&&b.y===b.startY||(e=b.direction,e!==b.lastDirection&&(3===e?(a=d.onSwipeLeft,m(a)&&n(f,a,"swipeleft",b,0)):1===e&&(a=d.onSwipeRight,m(a)&&n(f,a,"swiperight",b,0))),d=d.onSwipeEnd,m(d)&&n(f,d,"swipeend",b,0),b.lastDirection=e,b.isSwiping=!1,b.swipeTarget=null,b.touchId=null,f.removeRootEventTypes(k))}}});
  module.exports={SwipeResponder:p,useSwipe:function(a){return g.unstable_useResponder(p,a)}};
  