1"use strict";(self.webpackChunkbabel_seed_project=self.webpackChunkbabel_seed_project||[]).push([[5708],{9881:function(t,e,i){i.r(e);const h={threshold:50,passive:!1};e.default=class{constructor(t,e={}){this.options={...h,...e},this.element=null,this.touchStartX=0,this.touchStartY=0,this.touchEndX=0,this.touchEndY=0,this.onSwipeLeftAgent=null,this.onSwipeRightAgent=null,this.onSwipeUpAgent=null,this.onSwipeDownAgent=null,this.onTapAgent=null,this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onSwipeLeft=this.onSwipeLeft.bind(this),this.onSwipeRight=this.onSwipeRight.bind(this),this.onSwipeUp=this.onSwipeUp.bind(this),this.onSwipeDown=this.onSwipeDown.bind(this),this.onTap=this.onTap.bind(this),this.destroy=this.destroy.bind(this),this.handleGesture=this.handleGesture.bind(this);let i=!!this.options.passive&&{passive:!0};this.element=t instanceof EventTarget?t:document.querySelector(t),this.element.addEventListener("touchstart",this.onTouchStart,i),this.element.addEventListener("touchend",this.onTouchEnd,i)}onTouchStart(t){this.touchStartX=t.changedTouches[0].screenX,this.touchStartY=t.changedTouches[0].screenY}onTouchEnd(t){this.touchEndX=t.changedTouches[0].screenX,this.touchEndY=t.changedTouches[0].screenY,this.handleGesture()}onSwipeLeft(t){this.onSwipeLeftAgent=t}onSwipeRight(t){this.onSwipeRightAgent=t}onSwipeUp(t){this.onSwipeUpAgent=t}onSwipeDown(t){this.onSwipeDownAgent=t}onTap(t){this.onTapAgent=t}destroy(){this.element.removeEventListener("touchstart",this.onTouchStart),this.element.removeEventListener("touchend",this.onTouchEnd)}handleGesture(){return this.touchEndX+this.options.threshold<=this.touchStartX?(this.onSwipeLeftAgent&&this.onSwipeLeftAgent(),"swiped left"):this.touchEndX-this.options.threshold>=this.touchStartX?(this.onSwipeRightAgent&&this.onSwipeRightAgent(),"swiped right"):this.touchEndY+this.options.threshold<=this.touchStartY?(this.onSwipeUpAgent&&this.onSwipeUpAgent(),"swiped up"):this.touchEndY-this.options.threshold>=this.touchStartY?(this.onSwipeDownAgent&&this.onSwipeDownAgent(),"swiped down"):this.touchEndY===this.touchStartY?(this.onTapAgent&&this.onTapAgent(),"tap"):void 0}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.