System.register([],function(t){"use strict";return{execute:function(){var e=function(){function t(){this.gestureId=0;this.requestedStart=new Map;this.disabledGestures=new Map;this.disabledScroll=new Set}t.prototype.createGesture=function(t){return new r(this,this.newID(),t.name,t.priority||0,!!t.disableScroll)};t.prototype.createBlocker=function(t){if(t===void 0){t={}}return new i(this,this.newID(),t.disable,!!t.disableScroll)};t.prototype.start=function(t,e,r){if(!this.canStart(t)){this.requestedStart.delete(e);return false}this.requestedStart.set(e,r);return true};t.prototype.capture=function(t,e,r){if(!this.start(t,e,r)){return false}var i=this.requestedStart;var n=-1e4;i.forEach(function(t){n=Math.max(n,t)});if(n===r){this.capturedId=e;i.clear();var a=new CustomEvent("ionGestureCaptured",{detail:{gestureName:t}});document.dispatchEvent(a);return true}i.delete(e);return false};t.prototype.release=function(t){this.requestedStart.delete(t);if(this.capturedId===t){this.capturedId=undefined}};t.prototype.disableGesture=function(t,e){var r=this.disabledGestures.get(t);if(r===undefined){r=new Set;this.disabledGestures.set(t,r)}r.add(e)};t.prototype.enableGesture=function(t,e){var r=this.disabledGestures.get(t);if(r!==undefined){r.delete(e)}};t.prototype.disableScroll=function(t){this.disabledScroll.add(t);if(this.disabledScroll.size===1){document.body.classList.add(n)}};t.prototype.enableScroll=function(t){this.disabledScroll.delete(t);if(this.disabledScroll.size===0){document.body.classList.remove(n)}};t.prototype.canStart=function(t){if(this.capturedId!==undefined){return false}if(this.isDisabled(t)){return false}return true};t.prototype.isCaptured=function(){return this.capturedId!==undefined};t.prototype.isScrollDisabled=function(){return this.disabledScroll.size>0};t.prototype.isDisabled=function(t){var e=this.disabledGestures.get(t);if(e&&e.size>0){return true}return false};t.prototype.newID=function(){this.gestureId++;return this.gestureId};return t}();var r=function(){function t(t,e,r,i,n){this.id=e;this.name=r;this.disableScroll=n;this.priority=i*1e6+e;this.ctrl=t}t.prototype.canStart=function(){if(!this.ctrl){return false}return this.ctrl.canStart(this.name)};t.prototype.start=function(){if(!this.ctrl){return false}return this.ctrl.start(this.name,this.id,this.priority)};t.prototype.capture=function(){if(!this.ctrl){return false}var t=this.ctrl.capture(this.name,this.id,this.priority);if(t&&this.disableScroll){this.ctrl.disableScroll(this.id)}return t};t.prototype.release=function(){if(this.ctrl){this.ctrl.release(this.id);if(this.disableScroll){this.ctrl.enableScroll(this.id)}}};t.prototype.destroy=function(){this.release();this.ctrl=undefined};return t}();var i=function(){function t(t,e,r,i){this.id=e;this.disable=r;this.disableScroll=i;this.ctrl=t}t.prototype.block=function(){if(!this.ctrl){return}if(this.disable){for(var t=0,e=this.disable;t<e.length;t++){var r=e[t];this.ctrl.disableGesture(r,this.id)}}if(this.disableScroll){this.ctrl.disableScroll(this.id)}};t.prototype.unblock=function(){if(!this.ctrl){return}if(this.disable){for(var t=0,e=this.disable;t<e.length;t++){var r=e[t];this.ctrl.enableGesture(r,this.id)}}if(this.disableScroll){this.ctrl.enableScroll(this.id)}};t.prototype.destroy=function(){this.unblock();this.ctrl=undefined};return t}();var n="backdrop-no-scroll";var a=t("GESTURE_CONTROLLER",new e);var s=function(t,e,r,i){var n=u(t)?{capture:!!i.capture,passive:!!i.passive}:!!i.capture;var a;var s;if(t["__zone_symbol__addEventListener"]){a="__zone_symbol__addEventListener";s="__zone_symbol__removeEventListener"}else{a="addEventListener";s="removeEventListener"}t[a](e,r,n);return function(){t[s](e,r,n)}};var u=function(t){if(o===undefined){try{var e=Object.defineProperty({},"passive",{get:function(){o=true}});t.addEventListener("optsTest",function(){return},e)}catch(t){o=false}}return!!o};var o;var l=2e3;var c=function(t,e,r,i,n){var a;var u;var o;var c;var d;var v;var h;var p=0;var b=function(i){p=Date.now()+l;if(!e(i)){return}if(!u&&r){u=s(t,"touchmove",r,n)}if(!o){o=s(t,"touchend",m,n)}if(!c){c=s(t,"touchcancel",m,n)}};var y=function(i){if(p>Date.now()){return}if(!e(i)){return}if(!v&&r){v=s(f(t),"mousemove",r,n)}if(!h){h=s(f(t),"mouseup",S,n)}};var m=function(t){g();if(i){i(t)}};var S=function(t){X();if(i){i(t)}};var g=function(){if(u){u()}if(o){o()}if(c){c()}u=o=c=undefined};var X=function(){if(v){v()}if(h){h()}v=h=undefined};var Y=function(){g();X()};var w=function(e){if(e){if(a){a()}if(d){d()}a=d=undefined;Y()}else{if(!a){a=s(t,"touchstart",b,n)}if(!d){d=s(t,"mousedown",y,n)}}};var G=function(){w(true);i=r=e=undefined};return{setDisabled:w,stop:Y,destroy:G}};var f=function(t){return t instanceof Document?t:t.ownerDocument};var d=function(t,e,r){var i=r*(Math.PI/180);var n=t==="x";var a=Math.cos(i);var s=e*e;var u=0;var o=0;var l=false;var c=0;return{start:function(t,e){u=t;o=e;c=0;l=true},detect:function(t,e){if(!l){return false}var r=t-u;var i=e-o;var f=r*r+i*i;if(f<s){return false}var d=Math.sqrt(f);var v=(n?r:i)/d;if(v>a){c=1}else if(v<-a){c=-1}else{c=0}l=false;return true},isGesture:function(){return c!==0},getDirection:function(){return c}}};var v=t("createGesture",function(t){var e=false;var r=false;var i=true;var n=false;var s=Object.assign({disableScroll:false,direction:"x",gesturePriority:0,passive:true,maxAngle:40,threshold:10},t);var u=s.canStart;var o=s.onWillStart;var l=s.onStart;var f=s.onEnd;var v=s.notCaptured;var y=s.onMove;var m=s.threshold;var S={type:"pan",startX:0,startY:0,startTimeStamp:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,timeStamp:0,event:undefined,data:undefined};var g=d(s.direction,s.threshold,s.maxAngle);var X=a.createGesture({name:t.gestureName,priority:t.gesturePriority,disableScroll:t.disableScroll});var Y=function(t){var e=b(t);if(r||!i){return false}p(t,S);S.startX=S.currentX;S.startY=S.currentY;S.startTimeStamp=S.timeStamp=e;S.velocityX=S.velocityY=S.deltaX=S.deltaY=0;S.event=t;if(u&&u(S)===false){return false}X.release();if(!X.start()){return false}r=true;if(m===0){return _()}g.start(S.startX,S.startY);return true};var w=function(t){if(e){if(!n&&i){n=true;h(S,t);requestAnimationFrame(G)}return}h(S,t);if(g.detect(S.currentX,S.currentY)){if(!g.isGesture()||!_()){q()}}};var G=function(){if(!e){return}n=false;if(y){y(S)}};var _=function(){if(X&&!X.capture()){return false}e=true;i=false;S.startX=S.currentX;S.startY=S.currentY;S.startTimeStamp=S.timeStamp;if(o){o(S).then(D)}else{D()}return true};var D=function(){if(l){l(S)}i=true};var E=function(){e=false;r=false;n=false;i=true;X.release()};var I=function(t){var r=e;var n=i;E();if(!n){return}h(S,t);if(r){if(f){f(S)}return}if(v){v(S)}};var L=c(s.el,Y,w,I,{capture:false});var q=function(){E();L.stop();if(v){v(S)}};return{setDisabled:function(t){if(t&&e){I(undefined)}L.setDisabled(t)},destroy:function(){X.destroy();L.destroy()}}});var h=function(t,e){if(!e){return}var r=t.currentX;var i=t.currentY;var n=t.timeStamp;p(e,t);var a=t.currentX;var s=t.currentY;var u=t.timeStamp=b(e);var o=u-n;if(o>0&&o<100){var l=(a-r)/o;var c=(s-i)/o;t.velocityX=l*.7+t.velocityX*.3;t.velocityY=c*.7+t.velocityY*.3}t.deltaX=a-t.startX;t.deltaY=s-t.startY;t.event=e};var p=function(t,e){var r=0;var i=0;if(t){var n=t.changedTouches;if(n&&n.length>0){var a=n[0];r=a.clientX;i=a.clientY}else if(t.pageX!==undefined){r=t.pageX;i=t.pageY}}e.currentX=r;e.currentY=i};var b=function(t){return t.timeStamp||Date.now()}}}});