import{a as t}from"./p-f44f0a67.js";import{i as o}from"./p-506221fe.js";import{createGesture as r}from"./p-31f845ed.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const s=(s,e,n,a,c)=>{const f=s.ownerDocument.defaultView,i=o(s),p=t=>i?-t.deltaX:t.deltaX;return r({el:s,gestureName:"goback-swipe",gesturePriority:40,threshold:10,canStart:t=>(t=>{const{startX:o}=t;return i?o>=f.innerWidth-50:o<=50})(t)&&e(),onStart:n,onMove:t=>{const o=p(t);a(o/f.innerWidth)},onEnd:o=>{const r=p(o),s=f.innerWidth,e=r/s,n=(t=>i?-t.velocityX:t.velocityX)(o),a=n>=0&&(n>.2||r>s/2),m=(a?1-e:e)*s;let h=0;if(m>5){const t=m/Math.abs(n);h=Math.min(t,540)}c(a,e<=0?.01:t(0,e,.9999),h)}})};export{s as createSwipeBackGesture}