/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{k as clamp}from"./helpers-cdb61eae.js";import{createGesture}from"./index-41bf41f2.js";import"./gesture-controller-68c023a4.js";var createSwipeBackGesture=function(r,e,a,t,n){var o=r.ownerDocument.defaultView;var i=function(r){return r.startX<=50&&e()};var c=function(r){var e=r.deltaX;var a=e/o.innerWidth;t(a)};var v=function(r){var e=r.deltaX;var a=o.innerWidth;var t=e/a;var i=r.velocityX;var c=a/2;var v=i>=0&&(i>.2||r.deltaX>c);var s=v?1-t:t;var u=s*a;var l=0;if(u>5){var d=u/Math.abs(i);l=Math.min(d,540)}n(v,t<=0?.01:clamp(0,t,.9999),l)};return createGesture({el:r,gestureName:"goback-swipe",gesturePriority:40,threshold:10,canStart:i,onStart:a,onMove:c,onEnd:v})};export{createSwipeBackGesture};