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