aiber-test/www/swipe-back-2154c9a7-js-es5.js.map
2020-12-18 09:30:04 +00:00

1 line
3.8 KiB
Plaintext

{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/swipe-back-2154c9a7.js"],"names":["createSwipeBackGesture","el","canStartHandler","onStartHandler","onMoveHandler","onEndHandler","win","ownerDocument","defaultView","canStart","detail","startX","onMove","delta","deltaX","stepValue","innerWidth","onEnd","width","velocity","velocityX","z","shouldComplete","missing","missingDistance","realDur","dur","Math","abs","min","gestureName","gesturePriority","threshold","onStart"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAIA,UAAMA,sBAAsB,GAAG,SAAzBA,sBAAyB,CAACC,EAAD,EAAKC,eAAL,EAAsBC,cAAtB,EAAsCC,aAAtC,EAAqDC,YAArD,EAAsE;AACnG,YAAMC,GAAG,GAAGL,EAAE,CAACM,aAAH,CAAiBC,WAA7B;;AACA,YAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,MAAD,EAAY;AAC3B,iBAAOA,MAAM,CAACC,MAAP,IAAiB,EAAjB,IAAuBT,eAAe,EAA7C;AACD,SAFD;;AAGA,YAAMU,MAAM,GAAG,SAATA,MAAS,CAACF,MAAD,EAAY;AACzB;AACA,cAAMG,KAAK,GAAGH,MAAM,CAACI,MAArB;AACA,cAAMC,SAAS,GAAGF,KAAK,GAAGP,GAAG,CAACU,UAA9B;AACAZ,uBAAa,CAACW,SAAD,CAAb;AACD,SALD;;AAMA,YAAME,KAAK,GAAG,SAARA,KAAQ,CAACP,MAAD,EAAY;AACxB;AACA,cAAMG,KAAK,GAAGH,MAAM,CAACI,MAArB;AACA,cAAMI,KAAK,GAAGZ,GAAG,CAACU,UAAlB;AACA,cAAMD,SAAS,GAAGF,KAAK,GAAGK,KAA1B;AACA,cAAMC,QAAQ,GAAGT,MAAM,CAACU,SAAxB;AACA,cAAMC,CAAC,GAAGH,KAAK,GAAG,GAAlB;AACA,cAAMI,cAAc,GAAGH,QAAQ,IAAI,CAAZ,KAAkBA,QAAQ,GAAG,GAAX,IAAkBT,MAAM,CAACI,MAAP,GAAgBO,CAApD,CAAvB;AACA,cAAME,OAAO,GAAGD,cAAc,GAAG,IAAIP,SAAP,GAAmBA,SAAjD;AACA,cAAMS,eAAe,GAAGD,OAAO,GAAGL,KAAlC;AACA,cAAIO,OAAO,GAAG,CAAd;;AACA,cAAID,eAAe,GAAG,CAAtB,EAAyB;AACvB,gBAAME,GAAG,GAAGF,eAAe,GAAGG,IAAI,CAACC,GAAL,CAAST,QAAT,CAA9B;AACAM,mBAAO,GAAGE,IAAI,CAACE,GAAL,CAASH,GAAT,EAAc,GAAd,CAAV;AACD;AACD;;;;;;;AAKArB,sBAAY,CAACiB,cAAD,EAAkBP,SAAS,IAAI,CAAd,GAAmB,IAAnB,GAA0B,+DAAM,CAAN,EAASA,SAAT,EAAoB,MAApB,CAA3C,EAAwEU,OAAxE,CAAZ;AACD,SArBD;;AAsBA,eAAO,yEAAc;AACnBxB,YAAE,EAAFA,EADmB;AAEnB6B,qBAAW,EAAE,cAFM;AAGnBC,yBAAe,EAAE,EAHE;AAInBC,mBAAS,EAAE,EAJQ;AAKnBvB,kBAAQ,EAARA,QALmB;AAMnBwB,iBAAO,EAAE9B,cANU;AAOnBS,gBAAM,EAANA,MAPmB;AAQnBK,eAAK,EAALA;AARmB,SAAd,CAAP;AAUD,OA3CD","file":"swipe-back-2154c9a7-js-es5.js","sourcesContent":["import { h as clamp } from './helpers-90f46169.js';\nimport './gesture-controller-31cb6bb9.js';\nimport { createGesture } from './index-f49d994d.js';\n\nconst createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandler, onEndHandler) => {\n const win = el.ownerDocument.defaultView;\n const canStart = (detail) => {\n return detail.startX <= 50 && canStartHandler();\n };\n const onMove = (detail) => {\n // set the transition animation's progress\n const delta = detail.deltaX;\n const stepValue = delta / win.innerWidth;\n onMoveHandler(stepValue);\n };\n const onEnd = (detail) => {\n // the swipe back gesture has ended\n const delta = detail.deltaX;\n const width = win.innerWidth;\n const stepValue = delta / width;\n const velocity = detail.velocityX;\n const z = width / 2.0;\n const shouldComplete = velocity >= 0 && (velocity > 0.2 || detail.deltaX > z);\n const missing = shouldComplete ? 1 - stepValue : stepValue;\n const missingDistance = missing * width;\n let realDur = 0;\n if (missingDistance > 5) {\n const dur = missingDistance / Math.abs(velocity);\n realDur = Math.min(dur, 540);\n }\n /**\n * TODO: stepValue can sometimes return negative values\n * or values greater than 1 which should not be possible.\n * Need to investigate more to find where the issue is.\n */\n onEndHandler(shouldComplete, (stepValue <= 0) ? 0.01 : clamp(0, stepValue, 0.9999), realDur);\n };\n return createGesture({\n el,\n gestureName: 'goback-swipe',\n gesturePriority: 40,\n threshold: 10,\n canStart,\n onStart: onStartHandler,\n onMove,\n onEnd\n });\n};\n\nexport { createSwipeBackGesture };\n"]}