import{a as m}from"./chunk-454IMN7J.js";import{c as p}from"./chunk-AGEZHV7T.js";import{m as f}from"./chunk-SM2GS6OU.js";import"./chunk-OKF5LGRG.js";import"./chunk-FB5LSH2R.js";var W=(o,X,w,g,v)=>{let s=o.ownerDocument.defaultView,n=m(o),l=t=>n?-t.deltaX:t.deltaX;return p({el:o,gestureName:"goback-swipe",gesturePriority:101,threshold:10,canStart:t=>(n=m(o),(e=>{let{startX:r}=e;return n?r>=s.innerWidth-50:r<=50})(t)&&X()),onStart:w,onMove:t=>{let e=l(t);g(e/s.innerWidth)},onEnd:t=>{let e=l(t),r=s.innerWidth,a=e/r,c=(i=>n?-i.velocityX:i.velocityX)(t),d=c>=0&&(c>.2||e>r/2),h=(d?1-a:a)*r,u=0;if(h>5){let i=h/Math.abs(c);u=Math.min(i,540)}v(d,a<=0?.01:f(0,a,.9999),u)}})};export{W as createSwipeBackGesture};
