@egjs/axes
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -7,6 +7,2 @@ import * as Component from "@egjs/component"; | ||
import { InputObserver } from "./InputObserver"; | ||
import { PanInput } from "./inputType/PanInput"; | ||
import { PinchInput } from "./inputType/PinchInput"; | ||
import { WheelInput } from "./inputType/WheelInput"; | ||
import { MoveKeyInput } from "./inputType/MoveKeyInput"; | ||
import { DIRECTION } from "./const"; | ||
@@ -26,6 +22,6 @@ import { IInputType } from "./inputType/InputType"; | ||
static VERSION: string; | ||
static PanInput: typeof PanInput; | ||
static PinchInput: typeof PinchInput; | ||
static WheelInput: typeof WheelInput; | ||
static MoveKeyInput: typeof MoveKeyInput; | ||
static PanInput: any; | ||
static PinchInput: any; | ||
static WheelInput: any; | ||
static MoveKeyInput: any; | ||
static TRANSFORM: string; | ||
@@ -32,0 +28,0 @@ static DIRECTION_NONE: DIRECTION; |
@@ -25,3 +25,3 @@ import { Axis } from "../AxisManager"; | ||
export declare function toAxis(source: string[], offset: number[]): Axis; | ||
export declare function createHammer(element: HTMLElement, recognizers: any, inputClass?: any): any; | ||
export declare function createHammer(element: HTMLElement, options: any): any; | ||
export declare function convertInputType(inputType?: string[]): any; |
@@ -8,2 +8,3 @@ import { DIRECTION } from "../const"; | ||
threshold?: number; | ||
hammerManagerOptions?: Object; | ||
} | ||
@@ -10,0 +11,0 @@ export declare class PanInput implements IInputType { |
@@ -5,2 +5,3 @@ import { IInputType, IInputTypeObserver } from "./InputType"; | ||
threshold?: number; | ||
hammerManagerOptions?: Object; | ||
} | ||
@@ -7,0 +8,0 @@ export declare class PinchInput implements IInputType { |
@@ -8,5 +8,5 @@ /*! | ||
* | ||
* @version 2.3.2 | ||
* @version 2.3.3 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("hammerjs"),require("@egjs/component")):"function"==typeof define&&define.amd?define(["hammerjs","@egjs/component"],e):"object"==typeof exports?exports.Axes=e(require("hammerjs"),require("@egjs/component")):(t.eg=t.eg||{},t.eg.Axes=e(t.Hammer,t.eg.Component))}(this,function(t,e){return function(t){function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}([function(t,e,n){"use strict";function toArray(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function $(t,e){void 0===e&&(e=!1);var n;if("string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=toArray(i.childNodes)}else n=toArray(document.querySelectorAll(t));e||(n=n.length>=1?n[0]:undefined)}else t===window?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in window&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return $(t)}),e||(n=n.length>=1?n[0]:undefined)):n=t;return n}function requestAnimationFrame(t){return i(t)}function cancelAnimationFrame(t){r(t)}e.__esModule=!0,e.toArray=toArray,e.$=$;var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var s={},o=i;i=function(t){function wrapCallback(n){s[e]&&t(n)}var e=o(wrapCallback);return s[e]=!0,e},r=function(t){delete s[t]}}else i&&r||(i=function(t){return window.setTimeout(function(){t(window.performance&&window.performance.now&&window.performance.now()||(new Date).getTime())},16)},r=window.clearTimeout);e.requestAnimationFrame=requestAnimationFrame,e.cancelAnimationFrame=cancelAnimationFrame},function(t,e,n){"use strict";function toAxis(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})}function createHammer(t,e,n){try{var r={recognizers:[e],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}};return n&&(r.inputClass=n),new i.Manager(t,r)}catch(s){return null}}function convertInputType(t){void 0===t&&(t=[]);var n=!1,r=!1;return t.forEach(function(t){switch(t){case"mouse":r=!0;break;case"touch":n=e.SUPPORT_TOUCH}}),n&&i.TouchInput||r&&i.MouseInput||null}e.__esModule=!0;var i=n(4);e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=toAxis,e.createHammer=createHammer,e.convertInputType=convertInputType},function(t,e,n){"use strict";e.__esModule=!0;var i={getInsidePosition:function(t,e,n,i){var r=t,s=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(s[0],r),r=Math.min(s[1],r),+r.toFixed(5)},isOutside:function(t,e){return t<e[0]||t>e[1]},getDuration:function(t,e){var n=Math.sqrt(t/e*2);return n<100?0:n},isCircularable:function(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]},getCirculatedPos:function(t,e,n){var i=t,r=e[0],s=e[1],o=s-r;return n[1]&&t>s&&(i=(i-s)%o+r),n[0]&&t<r&&(i=(i-r)%o+s),+i.toFixed(5)}};e["default"]=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),s=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}return AxisManager.equal=function(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0},AxisManager.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=i({range:[0,100],bounce:[0,0],circular:[!1,!1]},t.axis[e]),["bounce","circular"].forEach(function(n){var i=t.axis,r=i[e][n];/string|number|boolean/.test(typeof r)&&(i[e][n]=[r,r])})})},AxisManager.prototype.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},AxisManager.prototype.get=function(t){var e=this;return t&&Array.isArray(t)?t.reduce(function(t,n){return n&&n in e._pos&&(t[n]=e._pos[n]),t},{}):i({},this._pos,t||{})},AxisManager.prototype.moveTo=function(t){var e=this,n=this.map(this._pos,function(n,i){return t[i]?t[i]-e._pos[i]:0});return this.set(t),{pos:i({},this._pos),delta:n}},AxisManager.prototype.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},AxisManager.prototype.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},AxisManager.prototype.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},AxisManager.prototype.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},AxisManager.prototype.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!r["default"].isOutside(t,n.range)})},AxisManager}();e.AxisManager=s},function(e,n){e.exports=t},function(t,e,n){"use strict";e.__esModule=!0;!function(t){t[t.DIRECTION_NONE=1]="DIRECTION_NONE",t[t.DIRECTION_LEFT=2]="DIRECTION_LEFT",t[t.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",t[t.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",t[t.DIRECTION_UP=8]="DIRECTION_UP",t[t.DIRECTION_DOWN=16]="DIRECTION_DOWN",t[t.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",t[t.DIRECTION_ALL=30]="DIRECTION_ALL"}(e.DIRECTION||(e.DIRECTION={})),e.TRANSFORM=function(){for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}()},function(t,e,n){"use strict";var i=n(7);t.exports=i["default"]},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function __(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var s=n(8),o=n(9),a=n(10),u=n(11),h=n(3),c=n(12),p=n(13),m=n(14),l=n(15),f=n(16),d=n(5),g=function(t){function Axes(e,n,i){void 0===e&&(e={});var s=t.call(this)||this;return s.axis=e,s._inputs=[],s.options=r({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),s.itm=new u.InterruptManager(s.options),s.axm=new h.AxisManager(s.axis,s.options),s.em=new a.EventManager(s),s.am=new o.AnimationManager(s),s.io=new c.InputObserver(s),s.em.setAnimationManager(s.am),i&&s.em.triggerChange(i),s}return i(Axes,t),Axes.prototype.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},Axes.prototype.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);e>=0&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},Axes.prototype.get=function(t){return this.axm.get(t)},Axes.prototype.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},Axes.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},Axes.prototype.isBounceArea=function(t){return this.axm.isOutside(t)},Axes.prototype.destroy=function(){this.disconnect(),this.em.destroy()},Axes.VERSION="#__VERSION__#",Axes.PanInput=p.PanInput,Axes.PinchInput=m.PinchInput,Axes.WheelInput=l.WheelInput,Axes.MoveKeyInput=f.MoveKeyInput,Axes.TRANSFORM=d.TRANSFORM,Axes.DIRECTION_NONE=d.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=d.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=d.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=d.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=d.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=d.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=d.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=d.DIRECTION.DIRECTION_ALL,Axes}(s);e["default"]=g},function(t,n){t.exports=e},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),s=n(3),o=n(0),a=function(){function AnimationManager(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}return AnimationManager.getDuration=function(t,e,n){return Math.max(Math.min(t,n),e)},AnimationManager.prototype.getDuration=function(t,e,n){var i,s=this;if(void 0!==n)i=n;else{var o=this.axm.map(e,function(e,n){return r["default"].getDuration(Math.abs(Math.abs(e)-Math.abs(t[n])),s.options.deceleration)});i=Object.keys(o).reduce(function(t,e){return Math.max(t,o[e])},-Infinity)}return AnimationManager.getDuration(i,this.options.minimumDuration,this.options.maximumDuration)},AnimationManager.prototype.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,s=n&&n.event||null;return{depaPos:i,destPos:r,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:s,input:n&&n.input||null,isTrusted:!!s,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&o.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}},AnimationManager.prototype.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},AnimationManager.prototype.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},AnimationManager.prototype.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)});Object.keys(e).length>0&&this.setTo(this.axm.map(e,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},AnimationManager.prototype.animateLoop=function(t,e){if(this._animateParam=i({},t),this._animateParam.startTime=(new Date).getTime(),t.duration){var n=this._animateParam,r=this;!function loop(){if(r._raf=null,r.frame(n)>=1)return s.AxisManager.equal(t.destPos,r.axm.get(Object.keys(t.destPos)))||r.em.triggerChange(t.destPos),void e();r._raf=o.requestAnimationFrame(loop)}()}else this.em.triggerChange(t.destPos),e()},AnimationManager.prototype.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=AnimationManager.getDuration(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},AnimationManager.prototype.animateTo=function(t,e,n){var o=this,a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);if(!h&&this.axm.every(c.destPos,function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),h&&!s.AxisManager.equal(c.destPos,u)){var p=n&&n.event||null;this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos),isTrusted:!!p,inputEvent:p,input:n&&n.input||null},function(){return o.animationEnd()})}},AnimationManager.prototype.frame=function(t){var e=(new Date).getTime()-t.startTime,n=this.easing(e/t.duration),i=t.depaPos;return i=this.axm.map(i,function(e,i,s){return e+=t.delta[i]*n,r["default"].getCirculatedPos(e,s.range,s.circular)}),this.em.triggerChange(i),n},AnimationManager.prototype.easing=function(t){return t>1?1:this.options.easing(t)},AnimationManager.prototype.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(s.AxisManager.equal(t,i))return this;this.itm.setInterrupt(!0);var o=this.axm.filter(t,function(t,e){return i[e]!==t});return Object.keys(o).length?(o=this.axm.map(o,function(t,n,i){return i.circular&&(i.circular[0]||i.circular[1])?e>0?t:r["default"].getCirculatedPos(t,i.range,i.circular):r["default"].getInsidePosition(t,i.range,i.circular)}),s.AxisManager.equal(o,i)?this:(e>0?this.animateTo(o,e):(this.em.triggerChange(o),this.itm.setInterrupt(!1)),this)):this},AnimationManager.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.setTo(this.axm.map(this.axm.get(Object.keys(t)),function(e,n){return e+t[n]}),e)},AnimationManager}();e.AnimationManager=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=function(){function EventManager(t){this.axes=t}return EventManager.prototype.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},EventManager.prototype.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},EventManager.prototype.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),s=e&&e.event||i&&i.event||null,o={pos:r.pos,delta:r.delta,holding:n,inputEvent:s,isTrusted:!!s,input:e&&e.input||i&&i.input||null,set:s?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",o),s&&this.am.axm.set(o.set().destPos)},EventManager.prototype.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},EventManager.prototype.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},EventManager.prototype.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},EventManager.prototype.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:i({},t),duration:e};return function(t,e){return t&&(n.destPos=i({},t)),e!==undefined&&(n.duration=e),n}},EventManager.prototype.setAnimationManager=function(t){this.am=t},EventManager.prototype.destroy=function(){this.axes.off()},EventManager}();e.EventManager=r},function(t,e,n){"use strict";e.__esModule=!0;var i=function(){function InterruptManager(t){this.options=t,this._prevented=!1}return InterruptManager.prototype.isInterrupting=function(){return this.options.interruptable||this._prevented},InterruptManager.prototype.isInterrupted=function(){return!this.options.interruptable&&this._prevented},InterruptManager.prototype.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},InterruptManager}();e.InterruptManager=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(3),s=n(2),o=function(){function InputObserver(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,s=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=s}return InputObserver.prototype.atOutside=function(t){var e=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return t>r?r:t<i?i:t});var n=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,i,r){var s=r.range[0],o=r.range[1],a=r.bounce;return t<s?s-e.am.easing((s-t)/(a[0]*n))*a[0]:t>o?o+e.am.easing((t-o)/(a[1]*n))*a[1]:t})},InputObserver.prototype.get=function(t){return this.axm.get(t.axes)},InputObserver.prototype.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},InputObserver.prototype.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return s["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!s["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},InputObserver.prototype.release=function(t,e,n,o){if(this.itm.isInterrupting()&&this.moveDistance){var a=this.axm.get(t.axes),u=this.axm.get(),h=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?a[e]+t:s["default"].getInsidePosition(a[e]+t,n.range,n.circular,n.bounce)})),c=this.am.getDuration(h,a,o);0===c&&(h=i({},u));var p={depaPos:u,destPos:h,duration:c,delta:this.axm.getDelta(u,h),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(p),this.moveDistance=null;var m=this.am.getUserControll(p),l=r.AxisManager.equal(m.destPos,u),f={input:t,event:e};l||0===m.duration?(!l&&this.em.triggerChange(m.destPos,f,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(f):this.em.triggerFinish(!0)):this.am.animateTo(m.destPos,m.duration,f)}},InputObserver}();e.InputObserver=o},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),s=n(5),o=n(0),a=n(1),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=o.$(t),this.options=i({inputType:["touch","mouse"],scale:[1,1],thresholdAngle:45,threshold:0},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}return PanInput.getDirectionByAngle=function(t,e){if(e<0||e>90)return s.DIRECTION.DIRECTION_NONE;var n=Math.abs(t);return n>e&&n<180-e?s.DIRECTION.DIRECTION_VERTICAL:s.DIRECTION.DIRECTION_HORIZONTAL},PanInput.getNextOffset=function(t,e){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.abs(n/-e);return[t[0]/2*i,t[1]/2*i]},PanInput.useDirection=function(t,e,n){return n?!!(e===s.DIRECTION.DIRECTION_ALL||e&t&&n&t):!!(e&t)},PanInput.prototype.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?s.DIRECTION.DIRECTION_ALL:e?s.DIRECTION.DIRECTION_HORIZONTAL:n?s.DIRECTION.DIRECTION_VERTICAL:s.DIRECTION.DIRECTION_NONE,this.axes=t},PanInput.prototype.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.dettachEvent(),this.hammer.add(new r.Pan(e));else{var n=this.element[a.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime()));var i=a.convertInputType(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,[r.Pan,e],i),this.element[a.UNIQUEKEY]=n}return this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this._direction=s.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[a.UNIQUEKEY],this.element=null,this.hammer=null},PanInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},PanInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},PanInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},PanInput.prototype.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},PanInput.prototype.onPanmove=function(t){var e=PanInput.getDirectionByAngle(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;n?(t.offsetX=t.deltaX-n.deltaX,t.offsetY=t.deltaY-n.deltaY):(t.offsetX=0,t.offsetY=0);var i=this.getOffset([t.offsetX,t.offsetY],[PanInput.useDirection(s.DIRECTION.DIRECTION_HORIZONTAL,this._direction,e),PanInput.useDirection(s.DIRECTION.DIRECTION_VERTICAL,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),t.preventSystemEvent=r,r&&this.observer.change(this,t,a.toAxis(this.axes,i))},PanInput.prototype.onPanend=function(t){var e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[PanInput.useDirection(s.DIRECTION.DIRECTION_HORIZONTAL,this._direction),PanInput.useDirection(s.DIRECTION.DIRECTION_VERTICAL,this._direction)]);e=PanInput.getNextOffset(e,this.observer.options.deceleration),this.observer.release(this,t,a.toAxis(this.axes,e))},PanInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},PanInput.prototype.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},PanInput.prototype.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},PanInput}();e.PanInput=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),s=n(0),o=n(1),a=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=s.$(t),this.options=i({scale:1,threshold:0},e),this.onPinchStart=this.onPinchStart.bind(this),this.onPinchMove=this.onPinchMove.bind(this),this.onPinchEnd=this.onPinchEnd.bind(this)}return PinchInput.prototype.mapAxes=function(t){this.axes=t},PinchInput.prototype.connect=function(t){var e={threshold:this.options.threshold};if(this.hammer)this.dettachEvent(),this.hammer.add(new r.Pinch(e));else{var n=this.element[o.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime())),this.hammer=o.createHammer(this.element,[r.Pinch,e],r.TouchInput),this.element[o.UNIQUEKEY]=n}return this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[o.UNIQUEKEY],this.element=null,this.hammer=null},PinchInput.prototype.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,o.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,o.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,o.toAxis(this.axes,[e])),this.observer.release(this,t,o.toAxis(this.axes,[0]),0),this._base=null,this._prev=null},PinchInput.prototype.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},PinchInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},PinchInput.prototype.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},PinchInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},PinchInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},PinchInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},PinchInput}();e.PinchInput=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),s=n(1),o=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1},e),this.onWheel=this.onWheel.bind(this)}return WheelInput.prototype.mapAxes=function(t){this.axes=t},WheelInput.prototype.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},WheelInput.prototype.disconnect=function(){return this.dettachEvent(),this},WheelInput.prototype.destroy=function(){this.disconnect(),this.element=null},WheelInput.prototype.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(t.deltaY>0?-1:1)*this.options.scale;this.observer.change(this,t,s.toAxis(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e.observer.release(e,t,s.toAxis(e.axes,[0])),e._isHolded=!1)},50)}},WheelInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},WheelInput.prototype.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null},WheelInput.prototype.enable=function(){return this._isEnabled=!0,this},WheelInput.prototype.disable=function(){return this._isEnabled=!1,this},WheelInput.prototype.isEnable=function(){return this._isEnabled},WheelInput}();e.WheelInput=o},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),s=n(1);e.KEYMAP={LEFT_ARROW:37,A:65,UP_ARROW:38,W:87,RIGHT_ARROW:39,D:68,DOWN_ARROW:40,S:83};var o=function(){function MoveKeyInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.bind(this)}return MoveKeyInput.prototype.mapAxes=function(t){this.axes=t},MoveKeyInput.prototype.connect=function(t){return this.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},MoveKeyInput.prototype.disconnect=function(){return this.dettachEvent(),this},MoveKeyInput.prototype.destroy=function(){this.disconnect(),this.element=null},MoveKeyInput.prototype.onKeydown=function(t){if(this._isEnabled){t.preventDefault();var n,i=!0,r=t;switch(r.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:n=[-this.options.scale[0],0];break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:n=[this.options.scale[0],0];break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:n=[0,this.options.scale[1]];break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:n=[0,-this.options.scale[1]];break;default:i=!1}i&&(this.observer.change(this,t,s.toAxis(this.axes,n)),r.preventDefault())}},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this._isEnabled=!1,this.observer=null},MoveKeyInput.prototype.enable=function(){return this._isEnabled=!0,this},MoveKeyInput.prototype.disable=function(){return this._isEnabled=!1,this},MoveKeyInput.prototype.isEnable=function(){return this._isEnabled},MoveKeyInput}();e.MoveKeyInput=o}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("hammerjs"),require("@egjs/component")):"function"==typeof define&&define.amd?define(["hammerjs","@egjs/component"],e):"object"==typeof exports?exports.Axes=e(require("hammerjs"),require("@egjs/component")):(t.eg=t.eg||{},t.eg.Axes=e(t.Hammer,t.eg.Component))}("undefined"!=typeof self?self:this,function(t,e){return function(t){function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}([function(t,e,n){"use strict";function toArray(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function $(t,e){void 0===e&&(e=!1);var n;if("string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=toArray(i.childNodes)}else n=toArray(document.querySelectorAll(t));e||(n=n.length>=1?n[0]:undefined)}else t===window?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in window&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return $(t)}),e||(n=n.length>=1?n[0]:undefined)):n=t;return n}e.__esModule=!0,e.toArray=toArray,e.$=$;var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var s={},o=i;i=function(t){var e=o(function(n){s[e]&&t(n)});return s[e]=!0,e},r=function(t){delete s[t]}}else i&&r||(i=function(t){return window.setTimeout(function(){t(window.performance&&window.performance.now&&window.performance.now()||(new Date).getTime())},16)},r=window.clearTimeout);e.requestAnimationFrame=function(t){return i(t)},e.cancelAnimationFrame=function(t){r(t)}},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4);e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=function(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})},e.createHammer=function(t,e){try{return new r.Manager(t,i({},e))}catch(n){return null}},e.convertInputType=function(t){void 0===t&&(t=[]);var n=!1,i=!1;return t.forEach(function(t){switch(t){case"mouse":i=!0;break;case"touch":n=e.SUPPORT_TOUCH}}),n&&r.TouchInput||i&&r.MouseInput||null}},function(t,e,n){"use strict";e.__esModule=!0;var i={getInsidePosition:function(t,e,n,i){var r=t,s=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(s[0],r),+(r=Math.min(s[1],r)).toFixed(5)},isOutside:function(t,e){return t<e[0]||t>e[1]},getDuration:function(t,e){var n=Math.sqrt(t/e*2);return n<100?0:n},isCircularable:function(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]},getCirculatedPos:function(t,e,n){var i=t,r=e[0],s=e[1],o=s-r;return n[1]&&t>s&&(i=(i-s)%o+r),n[0]&&t<r&&(i=(i-r)%o+s),+i.toFixed(5)}};e["default"]=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),s=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}return AxisManager.equal=function(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0},AxisManager.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=i({range:[0,100],bounce:[0,0],circular:[!1,!1]},t.axis[e]),["bounce","circular"].forEach(function(n){var i=t.axis,r=i[e][n];/string|number|boolean/.test(typeof r)&&(i[e][n]=[r,r])})})},AxisManager.prototype.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},AxisManager.prototype.get=function(t){var e=this;return t&&Array.isArray(t)?t.reduce(function(t,n){return n&&n in e._pos&&(t[n]=e._pos[n]),t},{}):i({},this._pos,t||{})},AxisManager.prototype.moveTo=function(t){var e=this,n=this.map(this._pos,function(n,i){return t[i]?t[i]-e._pos[i]:0});return this.set(t),{pos:i({},this._pos),delta:n}},AxisManager.prototype.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},AxisManager.prototype.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},AxisManager.prototype.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},AxisManager.prototype.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},AxisManager.prototype.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!r["default"].isOutside(t,n.range)})},AxisManager}();e.AxisManager=s},function(e,n){e.exports=t},function(t,e,n){"use strict";e.__esModule=!0;!function(t){t[t.DIRECTION_NONE=1]="DIRECTION_NONE",t[t.DIRECTION_LEFT=2]="DIRECTION_LEFT",t[t.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",t[t.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",t[t.DIRECTION_UP=8]="DIRECTION_UP",t[t.DIRECTION_DOWN=16]="DIRECTION_DOWN",t[t.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",t[t.DIRECTION_ALL=30]="DIRECTION_ALL"}(e.DIRECTION||(e.DIRECTION={})),e.TRANSFORM=function(){for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}()},function(t,e,n){"use strict";var i=n(7),r=n(13),s=n(14),o=n(15),a=n(16);i["default"].PanInput=r.PanInput,i["default"].PinchInput=s.PinchInput,i["default"].WheelInput=o.WheelInput,i["default"].MoveKeyInput=a.MoveKeyInput,t.exports=i["default"]},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function __(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var s=n(8),o=n(9),a=n(10),u=n(11),h=n(3),c=n(12),p=n(5),m=function(t){function Axes(e,n,i){void 0===e&&(e={});var s=t.call(this)||this;return s.axis=e,s._inputs=[],s.options=r({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),s.itm=new u.InterruptManager(s.options),s.axm=new h.AxisManager(s.axis,s.options),s.em=new a.EventManager(s),s.am=new o.AnimationManager(s),s.io=new c.InputObserver(s),s.em.setAnimationManager(s.am),i&&s.em.triggerChange(i),s}return i(Axes,t),Axes.prototype.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},Axes.prototype.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);e>=0&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},Axes.prototype.get=function(t){return this.axm.get(t)},Axes.prototype.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},Axes.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},Axes.prototype.isBounceArea=function(t){return this.axm.isOutside(t)},Axes.prototype.destroy=function(){this.disconnect(),this.em.destroy()},Axes.VERSION="#__VERSION__#",Axes.TRANSFORM=p.TRANSFORM,Axes.DIRECTION_NONE=p.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=p.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=p.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=p.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=p.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=p.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=p.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=p.DIRECTION.DIRECTION_ALL,Axes}(s);e["default"]=m},function(t,n){t.exports=e},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),s=n(3),o=n(0),a=function(){function AnimationManager(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}return AnimationManager.getDuration=function(t,e,n){return Math.max(Math.min(t,n),e)},AnimationManager.prototype.getDuration=function(t,e,n){var i,s=this;if(void 0!==n)i=n;else{var o=this.axm.map(e,function(e,n){return r["default"].getDuration(Math.abs(Math.abs(e)-Math.abs(t[n])),s.options.deceleration)});i=Object.keys(o).reduce(function(t,e){return Math.max(t,o[e])},-Infinity)}return AnimationManager.getDuration(i,this.options.minimumDuration,this.options.maximumDuration)},AnimationManager.prototype.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,s=n&&n.event||null;return{depaPos:i,destPos:r,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:s,input:n&&n.input||null,isTrusted:!!s,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&o.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}},AnimationManager.prototype.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},AnimationManager.prototype.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},AnimationManager.prototype.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)});Object.keys(e).length>0&&this.setTo(this.axm.map(e,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},AnimationManager.prototype.animateLoop=function(t,e){if(this._animateParam=i({},t),this._animateParam.startTime=(new Date).getTime(),t.duration){var n=this._animateParam,r=this;!function loop(){if(r._raf=null,r.frame(n)>=1)return s.AxisManager.equal(t.destPos,r.axm.get(Object.keys(t.destPos)))||r.em.triggerChange(t.destPos),void e();r._raf=o.requestAnimationFrame(loop)}()}else this.em.triggerChange(t.destPos),e()},AnimationManager.prototype.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=AnimationManager.getDuration(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},AnimationManager.prototype.animateTo=function(t,e,n){var o=this,a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);if(!h&&this.axm.every(c.destPos,function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),h&&!s.AxisManager.equal(c.destPos,u)){var p=n&&n.event||null;this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos),isTrusted:!!p,inputEvent:p,input:n&&n.input||null},function(){return o.animationEnd()})}},AnimationManager.prototype.frame=function(t){var e=(new Date).getTime()-t.startTime,n=this.easing(e/t.duration),i=t.depaPos;return i=this.axm.map(i,function(e,i,s){return e+=t.delta[i]*n,r["default"].getCirculatedPos(e,s.range,s.circular)}),this.em.triggerChange(i),n},AnimationManager.prototype.easing=function(t){return t>1?1:this.options.easing(t)},AnimationManager.prototype.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(s.AxisManager.equal(t,i))return this;this.itm.setInterrupt(!0);var o=this.axm.filter(t,function(t,e){return i[e]!==t});return Object.keys(o).length?(o=this.axm.map(o,function(t,n,i){return i.circular&&(i.circular[0]||i.circular[1])?e>0?t:r["default"].getCirculatedPos(t,i.range,i.circular):r["default"].getInsidePosition(t,i.range,i.circular)}),s.AxisManager.equal(o,i)?this:(e>0?this.animateTo(o,e):(this.em.triggerChange(o),this.itm.setInterrupt(!1)),this)):this},AnimationManager.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.setTo(this.axm.map(this.axm.get(Object.keys(t)),function(e,n){return e+t[n]}),e)},AnimationManager}();e.AnimationManager=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=function(){function EventManager(t){this.axes=t}return EventManager.prototype.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},EventManager.prototype.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},EventManager.prototype.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),s=e&&e.event||i&&i.event||null,o={pos:r.pos,delta:r.delta,holding:n,inputEvent:s,isTrusted:!!s,input:e&&e.input||i&&i.input||null,set:s?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",o),s&&this.am.axm.set(o.set().destPos)},EventManager.prototype.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},EventManager.prototype.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},EventManager.prototype.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},EventManager.prototype.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:i({},t),duration:e};return function(t,e){return t&&(n.destPos=i({},t)),e!==undefined&&(n.duration=e),n}},EventManager.prototype.setAnimationManager=function(t){this.am=t},EventManager.prototype.destroy=function(){this.axes.off()},EventManager}();e.EventManager=r},function(t,e,n){"use strict";e.__esModule=!0;var i=function(){function InterruptManager(t){this.options=t,this._prevented=!1}return InterruptManager.prototype.isInterrupting=function(){return this.options.interruptable||this._prevented},InterruptManager.prototype.isInterrupted=function(){return!this.options.interruptable&&this._prevented},InterruptManager.prototype.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},InterruptManager}();e.InterruptManager=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(3),s=n(2),o=function(){function InputObserver(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,s=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=s}return InputObserver.prototype.atOutside=function(t){var e=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return t>r?r:t<i?i:t});var n=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,i,r){var s=r.range[0],o=r.range[1],a=r.bounce;return t<s?s-e.am.easing((s-t)/(a[0]*n))*a[0]:t>o?o+e.am.easing((t-o)/(a[1]*n))*a[1]:t})},InputObserver.prototype.get=function(t){return this.axm.get(t.axes)},InputObserver.prototype.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},InputObserver.prototype.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return s["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!s["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},InputObserver.prototype.release=function(t,e,n,o){if(this.itm.isInterrupting()&&this.moveDistance){var a=this.axm.get(t.axes),u=this.axm.get(),h=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?a[e]+t:s["default"].getInsidePosition(a[e]+t,n.range,n.circular,n.bounce)})),c=this.am.getDuration(h,a,o);0===c&&(h=i({},u));var p={depaPos:u,destPos:h,duration:c,delta:this.axm.getDelta(u,h),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(p),this.moveDistance=null;var m=this.am.getUserControll(p),l=r.AxisManager.equal(m.destPos,u),f={input:t,event:e};l||0===m.duration?(!l&&this.em.triggerChange(m.destPos,f,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(f):this.em.triggerFinish(!0)):this.am.animateTo(m.destPos,m.duration,f)}},InputObserver}();e.InputObserver=o},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),s=n(5),o=n(0),a=n(1),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=o.$(t),this.options=i({inputType:["touch","mouse"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}return PanInput.getDirectionByAngle=function(t,e){if(e<0||e>90)return s.DIRECTION.DIRECTION_NONE;var n=Math.abs(t);return n>e&&n<180-e?s.DIRECTION.DIRECTION_VERTICAL:s.DIRECTION.DIRECTION_HORIZONTAL},PanInput.getNextOffset=function(t,e){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.abs(n/-e);return[t[0]/2*i,t[1]/2*i]},PanInput.useDirection=function(t,e,n){return n?!!(e===s.DIRECTION.DIRECTION_ALL||e&t&&n&t):!!(e&t)},PanInput.prototype.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?s.DIRECTION.DIRECTION_ALL:e?s.DIRECTION.DIRECTION_HORIZONTAL:n?s.DIRECTION.DIRECTION_VERTICAL:s.DIRECTION.DIRECTION_NONE,this.axes=t},PanInput.prototype.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.dettachEvent(),this.hammer.add(new r.Pan(e));else{var n=this.element[a.UNIQUEKEY];n?this.hammer&&this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime()));var s=a.convertInputType(this.options.inputType);if(!s)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,i({recognizers:[[r.Pan,e]],inputClass:s},this.options.hammerManagerOptions)),this.element[a.UNIQUEKEY]=n}return this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this._direction=s.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[a.UNIQUEKEY],this.element=null,this.hammer=null},PanInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},PanInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},PanInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},PanInput.prototype.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},PanInput.prototype.onPanmove=function(t){var e=PanInput.getDirectionByAngle(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;n?(t.offsetX=t.deltaX-n.deltaX,t.offsetY=t.deltaY-n.deltaY):(t.offsetX=0,t.offsetY=0);var i=this.getOffset([t.offsetX,t.offsetY],[PanInput.useDirection(s.DIRECTION.DIRECTION_HORIZONTAL,this._direction,e),PanInput.useDirection(s.DIRECTION.DIRECTION_VERTICAL,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),t.preventSystemEvent=r,r&&this.observer.change(this,t,a.toAxis(this.axes,i))},PanInput.prototype.onPanend=function(t){var e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[PanInput.useDirection(s.DIRECTION.DIRECTION_HORIZONTAL,this._direction),PanInput.useDirection(s.DIRECTION.DIRECTION_VERTICAL,this._direction)]);e=PanInput.getNextOffset(e,this.observer.options.deceleration),this.observer.release(this,t,a.toAxis(this.axes,e))},PanInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},PanInput.prototype.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},PanInput.prototype.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},PanInput}();e.PanInput=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),s=n(0),o=n(1),a=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=s.$(t),this.options=i({scale:1,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onPinchStart=this.onPinchStart.bind(this),this.onPinchMove=this.onPinchMove.bind(this),this.onPinchEnd=this.onPinchEnd.bind(this)}return PinchInput.prototype.mapAxes=function(t){this.axes=t},PinchInput.prototype.connect=function(t){var e={threshold:this.options.threshold};if(this.hammer)this.dettachEvent(),this.hammer.add(new r.Pinch(e));else{var n=this.element[o.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime())),this.hammer=o.createHammer(this.element,i({recognizers:[[r.Pinch,e]],inputClass:r.TouchInput},this.options.hammerManagerOptions)),this.element[o.UNIQUEKEY]=n}return this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[o.UNIQUEKEY],this.element=null,this.hammer=null},PinchInput.prototype.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,o.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,o.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,o.toAxis(this.axes,[e])),this.observer.release(this,t,o.toAxis(this.axes,[0]),0),this._base=null,this._prev=null},PinchInput.prototype.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},PinchInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},PinchInput.prototype.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},PinchInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},PinchInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},PinchInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},PinchInput}();e.PinchInput=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),s=n(1),o=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1},e),this.onWheel=this.onWheel.bind(this)}return WheelInput.prototype.mapAxes=function(t){this.axes=t},WheelInput.prototype.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},WheelInput.prototype.disconnect=function(){return this.dettachEvent(),this},WheelInput.prototype.destroy=function(){this.disconnect(),this.element=null},WheelInput.prototype.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(t.deltaY>0?-1:1)*this.options.scale;this.observer.change(this,t,s.toAxis(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e.observer.release(e,t,s.toAxis(e.axes,[0])),e._isHolded=!1)},50)}},WheelInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},WheelInput.prototype.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null},WheelInput.prototype.enable=function(){return this._isEnabled=!0,this},WheelInput.prototype.disable=function(){return this._isEnabled=!1,this},WheelInput.prototype.isEnable=function(){return this._isEnabled},WheelInput}();e.WheelInput=o},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),s=n(1);e.KEYMAP={LEFT_ARROW:37,A:65,UP_ARROW:38,W:87,RIGHT_ARROW:39,D:68,DOWN_ARROW:40,S:83};var o=function(){function MoveKeyInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.bind(this)}return MoveKeyInput.prototype.mapAxes=function(t){this.axes=t},MoveKeyInput.prototype.connect=function(t){return this.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},MoveKeyInput.prototype.disconnect=function(){return this.dettachEvent(),this},MoveKeyInput.prototype.destroy=function(){this.disconnect(),this.element=null},MoveKeyInput.prototype.onKeydown=function(t){if(this._isEnabled){t.preventDefault();var n,i=!0,r=t;switch(r.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:n=[-this.options.scale[0],0];break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:n=[this.options.scale[0],0];break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:n=[0,this.options.scale[1]];break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:n=[0,-this.options.scale[1]];break;default:i=!1}i&&(this.observer.change(this,t,s.toAxis(this.axes,n)),r.preventDefault())}},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this._isEnabled=!1,this.observer=null},MoveKeyInput.prototype.enable=function(){return this._isEnabled=!0,this},MoveKeyInput.prototype.disable=function(){return this._isEnabled=!1,this},MoveKeyInput.prototype.isEnable=function(){return this._isEnabled},MoveKeyInput}();e.MoveKeyInput=o}])}); | ||
//# sourceMappingURL=axes.min.js.map |
@@ -8,3 +8,3 @@ /*! | ||
* | ||
* @version 2.3.2 | ||
* @version 2.3.3 | ||
* | ||
@@ -15,3 +15,3 @@ * All-in-one packaged file for ease use of '@egjs/axes' with below dependencies. | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Axes=e():(t.eg=t.eg||{},t.eg.Axes=e())}(this,function(){return function(t){function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}([function(t,e,n){"use strict";function toArray(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function $(t,e){void 0===e&&(e=!1);var n;if("string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=toArray(i.childNodes)}else n=toArray(document.querySelectorAll(t));e||(n=n.length>=1?n[0]:undefined)}else t===window?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in window&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return $(t)}),e||(n=n.length>=1?n[0]:undefined)):n=t;return n}function requestAnimationFrame(t){return i(t)}function cancelAnimationFrame(t){r(t)}e.__esModule=!0,e.toArray=toArray,e.$=$;var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var o={},s=i;i=function(t){function wrapCallback(n){o[e]&&t(n)}var e=s(wrapCallback);return o[e]=!0,e},r=function(t){delete o[t]}}else i&&r||(i=function(t){return window.setTimeout(function(){t(window.performance&&window.performance.now&&window.performance.now()||(new Date).getTime())},16)},r=window.clearTimeout);e.requestAnimationFrame=requestAnimationFrame,e.cancelAnimationFrame=cancelAnimationFrame},function(t,e,n){"use strict";function toAxis(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})}function createHammer(t,e,n){try{var r={recognizers:[e],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}};return n&&(r.inputClass=n),new i.Manager(t,r)}catch(o){return null}}function convertInputType(t){void 0===t&&(t=[]);var n=!1,r=!1;return t.forEach(function(t){switch(t){case"mouse":r=!0;break;case"touch":n=e.SUPPORT_TOUCH}}),n&&i.TouchInput||r&&i.MouseInput||null}e.__esModule=!0;var i=n(4);e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=toAxis,e.createHammer=createHammer,e.convertInputType=convertInputType},function(t,e,n){"use strict";e.__esModule=!0;var i={getInsidePosition:function(t,e,n,i){var r=t,o=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(o[0],r),r=Math.min(o[1],r),+r.toFixed(5)},isOutside:function(t,e){return t<e[0]||t>e[1]},getDuration:function(t,e){var n=Math.sqrt(t/e*2);return n<100?0:n},isCircularable:function(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]},getCirculatedPos:function(t,e,n){var i=t,r=e[0],o=e[1],s=o-r;return n[1]&&t>o&&(i=(i-o)%s+r),n[0]&&t<r&&(i=(i-r)%s+o),+i.toFixed(5)}};e["default"]=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),o=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}return AxisManager.equal=function(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0},AxisManager.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=i({range:[0,100],bounce:[0,0],circular:[!1,!1]},t.axis[e]),["bounce","circular"].forEach(function(n){var i=t.axis,r=i[e][n];/string|number|boolean/.test(typeof r)&&(i[e][n]=[r,r])})})},AxisManager.prototype.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},AxisManager.prototype.get=function(t){var e=this;return t&&Array.isArray(t)?t.reduce(function(t,n){return n&&n in e._pos&&(t[n]=e._pos[n]),t},{}):i({},this._pos,t||{})},AxisManager.prototype.moveTo=function(t){var e=this,n=this.map(this._pos,function(n,i){return t[i]?t[i]-e._pos[i]:0});return this.set(t),{pos:i({},this._pos),delta:n}},AxisManager.prototype.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},AxisManager.prototype.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},AxisManager.prototype.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},AxisManager.prototype.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},AxisManager.prototype.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!r["default"].isOutside(t,n.range)})},AxisManager}();e.AxisManager=o},function(t,e,n){var i;!function(r,o,s,a){"use strict";function setTimeoutContext(t,e,n){return setTimeout(bindFn(t,n),e)}function invokeArrayArg(t,e,n){return!!Array.isArray(t)&&(each(t,n[e],n),!0)}function each(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function deprecate(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}function inherit(t,e,n){var i,r=e.prototype;i=t.prototype=Object.create(r),i.constructor=t,i._super=r,n&&u(i,n)}function bindFn(t,e){return function(){return t.apply(e,arguments)}}function boolOrFn(t,e){return typeof t==p?t.apply(e?e[0]||a:a,e):t}function ifUndefined(t,e){return t===a?e:t}function addEventListeners(t,e,n){each(splitStr(e),function(e){t.addEventListener(e,n,!1)})}function removeEventListeners(t,e,n){each(splitStr(e),function(e){t.removeEventListener(e,n,!1)})}function hasParent(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function inStr(t,e){return t.indexOf(e)>-1}function splitStr(t){return t.trim().split(/\s+/g)}function inArray(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function toArray(t){return Array.prototype.slice.call(t,0)}function uniqueArray(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];inArray(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function prefixed(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<h.length;){if(n=h[o],(i=n?n+r:e)in t)return i;o++}return a}function uniqueId(){return g++}function getWindowForElement(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}function Input(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){boolOrFn(t.options.enable,[t])&&n.handler(e)},this.init()}function createInputInstance(t){var e=t.options.inputClass;return new(e||(_?PointerEventInput:T?TouchInput:y?TouchMouseInput:MouseInput))(t,inputHandler)}function inputHandler(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&A&&i-r==0,s=e&(x|O)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,computeInputData(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function computeInputData(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=simpleCloneInputData(e)),r>1&&!n.firstMultiple?n.firstMultiple=simpleCloneInputData(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,a=s?s.center:o.center,u=e.center=getCenter(i);e.timeStamp=m(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=getAngle(a,u),e.distance=getDistance(a,u),computeDeltaXY(n,e),e.offsetDirection=getDirection(e.deltaX,e.deltaY);var h=getVelocity(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=f(h.x)>f(h.y)?h.x:h.y,e.scale=s?getScale(s.pointers,i):1,e.rotation=s?getRotation(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,computeIntervalInputData(n,e);var c=t.element;hasParent(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function computeDeltaXY(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==A&&o.eventType!==x||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}function computeIntervalInputData(t,e){var n,i,r,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=O&&(u>E||s.velocity===a)){var h=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,p=getVelocity(u,h,c);i=p.x,r=p.y,n=f(p.x)>f(p.y)?p.x:p.y,o=getDirection(h,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}function simpleCloneInputData(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:m(),pointers:e,center:getCenter(e),deltaX:t.deltaX,deltaY:t.deltaY}}function getCenter(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:l(n/e),y:l(i/e)}}function getVelocity(t,e,n){return{x:e/t||0,y:n/t||0}}function getDirection(t,e){return t===e?P:f(t)>=f(e)?t<0?R:M:e<0?D:C}function getDistance(t,e,n){n||(n=z);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function getAngle(t,e,n){n||(n=z);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function getRotation(t,e){return getAngle(e[1],e[0],k)+getAngle(t[1],t[0],k)}function getScale(t,e){return getDistance(e[0],e[1],k)/getDistance(t[0],t[1],k)}function MouseInput(){this.evEl=L,this.evWin=q,this.pressed=!1,Input.apply(this,arguments)}function PointerEventInput(){this.evEl=Y,this.evWin=j,Input.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function SingleTouchInput(){this.evTarget=K,this.evWin=X,this.started=!1,Input.apply(this,arguments)}function normalizeSingleTouches(t,e){var n=toArray(t.touches),i=toArray(t.changedTouches);return e&(x|O)&&(n=uniqueArray(n.concat(i),"identifier",!0)),[n,i]}function TouchInput(){this.evTarget=B,this.targetIds={},Input.apply(this,arguments)}function getTouches(t,e){var n=toArray(t.touches),i=this.targetIds;if(e&(A|b)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=toArray(t.changedTouches),a=[],u=this.target;if(o=n.filter(function(t){return hasParent(t.target,u)}),e===A)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(x|O)&&delete i[s[r].identifier],r++;return a.length?[uniqueArray(o.concat(a),"identifier",!0),a]:void 0}function TouchMouseInput(){Input.apply(this,arguments);var t=bindFn(this.handler,this);this.touch=new TouchInput(this.manager,t),this.mouse=new MouseInput(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function recordTouches(t,e){t&A?(this.primaryTouch=e.changedPointers[0].identifier,setLastTouch.call(this,e)):t&(x|O)&&setLastTouch.call(this,e)}function setLastTouch(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches,r=function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)};setTimeout(r,G)}}function isSyntheticEvent(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=Z&&s<=Z)return!0}return!1}function TouchAction(t,e){this.manager=t,this.set(e)}function cleanTouchActions(t){if(inStr(t,et))return et;var e=inStr(t,nt),n=inStr(t,it);return e&&n?et:e||n?e?nt:it:inStr(t,tt)?tt:J}function Recognizer(t){this.options=u({},this.defaults,t||{}),this.id=uniqueId(),this.manager=null,this.options.enable=ifUndefined(this.options.enable,!0),this.state=ot,this.simultaneous={},this.requireFail=[]}function stateStr(t){return t&ct?"cancel":t&ut?"end":t&at?"move":t&st?"start":""}function directionStr(t){return t==C?"down":t==D?"up":t==R?"left":t==M?"right":""}function getRecognizerByNameIfManager(t,e){var n=e.manager;return n?n.get(t):t}function AttrRecognizer(){Recognizer.apply(this,arguments)}function PanRecognizer(){AttrRecognizer.apply(this,arguments),this.pX=null,this.pY=null}function PinchRecognizer(){AttrRecognizer.apply(this,arguments)}function PressRecognizer(){Recognizer.apply(this,arguments),this._timer=null,this._input=null}function RotateRecognizer(){AttrRecognizer.apply(this,arguments)}function SwipeRecognizer(){AttrRecognizer.apply(this,arguments)}function TapRecognizer(){Recognizer.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Hammer(t,e){return e=e||{},e.recognizers=ifUndefined(e.recognizers,Hammer.defaults.preset),new Manager(t,e)}function Manager(t,e){this.options=u({},Hammer.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=createInputInstance(this),this.touchAction=new TouchAction(this,this.options.touchAction),toggleCssProps(this,!0),each(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function toggleCssProps(t,e){var n=t.element;if(n.style){var i;each(t.options.cssProps,function(r,o){i=prefixed(n.style,o),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={})}}function triggerDomEvent(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}var u,h=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),p="function",l=Math.round,f=Math.abs,m=Date.now;u="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var d=deprecate(function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t},"extend","Use `assign`."),v=deprecate(function(t,e){return d(t,e,!0)},"merge","Use `assign`."),g=1,I=/mobile|tablet|ip(ad|hone|od)|android/i,y="ontouchstart"in r,_=prefixed(r,"PointerEvent")!==a,T=y&&I.test(navigator.userAgent),E=25,A=1,b=2,x=4,O=8,P=1,R=2,M=4,D=8,C=16,N=R|M,w=D|C,S=N|w,z=["x","y"],k=["clientX","clientY"];Input.prototype={handler:function(){},init:function(){this.evEl&&addEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&addEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&addEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&removeEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&removeEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&removeEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)}};var H={mousedown:A,mousemove:b,mouseup:x},L="mousedown",q="mousemove mouseup";inherit(MouseInput,Input,{handler:function(t){var e=H[t.type];e&A&&0===t.button&&(this.pressed=!0),e&b&&1!==t.which&&(e=x),this.pressed&&(e&x&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var F={pointerdown:A,pointermove:b,pointerup:x,pointercancel:O,pointerout:O},W={2:"touch",3:"pen",4:"mouse",5:"kinect"},Y="pointerdown",j="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(Y="MSPointerDown",j="MSPointerMove MSPointerUp MSPointerCancel"),inherit(PointerEventInput,Input,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=F[i],o=W[t.pointerType]||t.pointerType,s="touch"==o,a=inArray(e,t.pointerId,"pointerId");r&A&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(x|O)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var U={touchstart:A,touchmove:b,touchend:x,touchcancel:O},K="touchstart",X="touchstart touchmove touchend touchcancel";inherit(SingleTouchInput,Input,{handler:function(t){var e=U[t.type];if(e===A&&(this.started=!0),this.started){var n=normalizeSingleTouches.call(this,t,e);e&(x|O)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var V={touchstart:A,touchmove:b,touchend:x,touchcancel:O},B="touchstart touchmove touchend touchcancel";inherit(TouchInput,Input,{handler:function(t){var e=V[t.type],n=getTouches.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});var G=2500,Z=25;inherit(TouchMouseInput,Input,{handler:function(t,e,n){var i="touch"==n.pointerType,r="mouse"==n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)recordTouches.call(this,e,n);else if(r&&isSyntheticEvent.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Q=prefixed(c.style,"touchAction"),$=Q!==a,J="auto",tt="manipulation",et="none",nt="pan-x",it="pan-y",rt=function(){if(!$)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||r.CSS.supports("touch-action",n)}),t}();TouchAction.prototype={set:function(t){"compute"==t&&(t=this.compute()),$&&this.manager.element.style&&rt[t]&&(this.manager.element.style[Q]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return each(this.manager.recognizers,function(e){boolOrFn(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),cleanTouchActions(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var i=this.actions,r=inStr(i,et)&&!rt[et],o=inStr(i,it)&&!rt[it],s=inStr(i,nt)&&!rt[nt];if(r){var a=1===t.pointers.length,u=t.distance<2,h=t.deltaTime<250;if(a&&u&&h)return}return s&&o?void 0:r||o&&n&N||s&&n&w?this.preventSrc(e):void 0},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ot=1,st=2,at=4,ut=8,ht=ut,ct=16;Recognizer.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(invokeArrayArg(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=getRecognizerByNameIfManager(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return invokeArrayArg(t,"dropRecognizeWith",this)?this:(t=getRecognizerByNameIfManager(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(invokeArrayArg(t,"requireFailure",this))return this;var e=this.requireFail;return t=getRecognizerByNameIfManager(t,this),-1===inArray(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(invokeArrayArg(t,"dropRequireFailure",this))return this;t=getRecognizerByNameIfManager(t,this);var e=inArray(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function emit(n){e.manager.emit(n,t)}var e=this,n=this.state;n<ut&&emit(e.options.event+stateStr(n)),emit(e.options.event),t.additionalEvent&&emit(t.additionalEvent),n>=ut&&emit(e.options.event+stateStr(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|ot)))return!1;t++}return!0},recognize:function(t){var e=u({},t);if(!boolOrFn(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(ht|ct|32)&&(this.state=ot),this.state=this.process(e),this.state&(st|at|ut|ct)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},inherit(AttrRecognizer,Recognizer,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=e&(st|at),r=this.attrTest(t);return i&&(n&O||!r)?e|ct:i||r?n&x?e|ut:e&st?e|at:st:32}}),inherit(PanRecognizer,AttrRecognizer,{defaults:{event:"pan",threshold:10,pointers:1,direction:S},getTouchAction:function(){var t=this.options.direction,e=[];return t&N&&e.push(it),t&w&&e.push(nt),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(e.direction&N?(r=0===o?P:o<0?R:M,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?P:s<0?D:C,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return AttrRecognizer.prototype.attrTest.call(this,t)&&(this.state&st||!(this.state&st)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=directionStr(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),inherit(PinchRecognizer,AttrRecognizer,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&st)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),inherit(PressRecognizer,Recognizer,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[J]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(x|O)&&!r)this.reset();else if(t.eventType&A)this.reset(),this._timer=setTimeoutContext(function(){this.state=ht,this.tryEmit()},e.time,this);else if(t.eventType&x)return ht;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ht&&(t&&t.eventType&x?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=m(),this.manager.emit(this.options.event,this._input)))}}),inherit(RotateRecognizer,AttrRecognizer,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&st)}}),inherit(SwipeRecognizer,AttrRecognizer,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:N|w,pointers:1},getTouchAction:function(){return PanRecognizer.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(N|w)?e=t.overallVelocity:n&N?e=t.overallVelocityX:n&w&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&t.eventType&x},emit:function(t){var e=directionStr(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),inherit(TapRecognizer,Recognizer,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[tt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&A&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=x)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||getDistance(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t;if(0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=setTimeoutContext(function(){this.state=ht,this.tryEmit()},e.interval,this),st):ht}return 32},failTimeout:function(){return this._timer=setTimeoutContext(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ht&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Hammer.VERSION="2.0.7",Hammer.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[RotateRecognizer,{enable:!1}],[PinchRecognizer,{enable:!1},["rotate"]],[SwipeRecognizer,{direction:N}],[PanRecognizer,{direction:N},["swipe"]],[TapRecognizer],[TapRecognizer,{event:"doubletap",taps:2},["tap"]],[PressRecognizer]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};Manager.prototype={set:function(t){return u(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&ht)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&n.state&(st|at|ut)&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Recognizer)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(invokeArrayArg(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(invokeArrayArg(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=inArray(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return each(splitStr(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return each(splitStr(t),function(t){e?n[t]&&n[t].splice(inArray(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&triggerDomEvent(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&toggleCssProps(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(Hammer,{INPUT_START:A,INPUT_MOVE:b,INPUT_END:x,INPUT_CANCEL:O,STATE_POSSIBLE:ot,STATE_BEGAN:st,STATE_CHANGED:at,STATE_ENDED:ut,STATE_RECOGNIZED:ht,STATE_CANCELLED:ct,STATE_FAILED:32,DIRECTION_NONE:P,DIRECTION_LEFT:R,DIRECTION_RIGHT:M,DIRECTION_UP:D,DIRECTION_DOWN:C,DIRECTION_HORIZONTAL:N,DIRECTION_VERTICAL:w,DIRECTION_ALL:S,Manager:Manager,Input:Input,TouchAction:TouchAction,TouchInput:TouchInput,MouseInput:MouseInput,PointerEventInput:PointerEventInput,TouchMouseInput:TouchMouseInput,SingleTouchInput:SingleTouchInput,Recognizer:Recognizer,AttrRecognizer:AttrRecognizer,Tap:TapRecognizer,Pan:PanRecognizer,Swipe:SwipeRecognizer,Pinch:PinchRecognizer,Rotate:RotateRecognizer,Press:PressRecognizer,on:addEventListeners,off:removeEventListeners,each:each,merge:v,extend:d,assign:u,inherit:inherit,bindFn:bindFn,prefixed:prefixed}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Hammer,(i=function(){return Hammer}.call(e,n,e,t))!==a&&(t.exports=i)}(window,document)},function(t,e,n){"use strict";e.__esModule=!0;!function(t){t[t.DIRECTION_NONE=1]="DIRECTION_NONE",t[t.DIRECTION_LEFT=2]="DIRECTION_LEFT",t[t.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",t[t.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",t[t.DIRECTION_UP=8]="DIRECTION_UP",t[t.DIRECTION_DOWN=16]="DIRECTION_DOWN",t[t.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",t[t.DIRECTION_ALL=30]="DIRECTION_ALL"}(e.DIRECTION||(e.DIRECTION={})),e.TRANSFORM=function(){for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}()},function(t,e,n){"use strict";var i=n(7);t.exports=i["default"]},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function __(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var o=n(8),s=n(9),a=n(10),u=n(11),h=n(3),c=n(12),p=n(13),l=n(14),f=n(15),m=n(16),d=n(5),v=function(t){function Axes(e,n,i){void 0===e&&(e={});var o=t.call(this)||this;return o.axis=e,o._inputs=[],o.options=r({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),o.itm=new u.InterruptManager(o.options),o.axm=new h.AxisManager(o.axis,o.options),o.em=new a.EventManager(o),o.am=new s.AnimationManager(o),o.io=new c.InputObserver(o),o.em.setAnimationManager(o.am),i&&o.em.triggerChange(i),o}return i(Axes,t),Axes.prototype.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},Axes.prototype.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);e>=0&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},Axes.prototype.get=function(t){return this.axm.get(t)},Axes.prototype.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},Axes.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},Axes.prototype.isBounceArea=function(t){return this.axm.isOutside(t)},Axes.prototype.destroy=function(){this.disconnect(),this.em.destroy()},Axes.VERSION="#__VERSION__#",Axes.PanInput=p.PanInput,Axes.PinchInput=l.PinchInput,Axes.WheelInput=f.WheelInput,Axes.MoveKeyInput=m.MoveKeyInput,Axes.TRANSFORM=d.TRANSFORM,Axes.DIRECTION_NONE=d.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=d.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=d.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=d.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=d.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=d.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=d.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=d.DIRECTION.DIRECTION_ALL,Axes}(o);e["default"]=v},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){return function(t){function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,e,n){"use strict";var i=n(1),r=function(t){return t&&t.__esModule?t:{"default":t}}(i);r["default"].VERSION="2.1.0",t.exports=r["default"]},function(t,e,n){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function Component(){_classCallCheck(this,Component),this._eventHandler={},this.options={}}return Component.prototype.trigger=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=this._eventHandler[t]||[];if(!(n.length>0))return!0;n=n.concat(),e.eventType=t;var i=!1,r=[e],o=0;e.stop=function(){i=!0},e.currentTarget=this;for(var s=arguments.length,a=Array(s>2?s-2:0),u=2;u<s;u++)a[u-2]=arguments[u];for(a.length>=1&&(r=r.concat(a)),o=0;n[o];o++)n[o].apply(this,r);return!i},Component.prototype.once=function(t,e){if("object"===(void 0===t?"undefined":i(t))&&void 0===e){var n=t,r=void 0;for(r in n)this.once(r,n[r]);return this}if("string"==typeof t&&"function"==typeof e){var o=this;this.on(t,function listener(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];e.apply(o,i),o.off(t,listener)})}return this},Component.prototype.hasOn=function(t){return!!this._eventHandler[t]},Component.prototype.on=function(t,e){if("object"===(void 0===t?"undefined":i(t))&&void 0===e){var n=t,r=void 0;for(r in n)this.on(r,n[r]);return this}if("string"==typeof t&&"function"==typeof e){var o=this._eventHandler[t];void 0===o&&(this._eventHandler[t]=[],o=this._eventHandler[t]),o.push(e)}return this},Component.prototype.off=function(t,e){if(void 0===t)return this._eventHandler={},this;if(void 0===e){if("string"==typeof t)return this._eventHandler[t]=undefined,this;var n=t,i=void 0;for(i in n)this.off(i,n[i]);return this}var r=this._eventHandler[t];if(r){var o=void 0,s=void 0;for(o=0;(s=r[o])!==undefined;o++)if(s===e){r=r.splice(o,1);break}}return this},Component}();e["default"]=r,t.exports=e["default"]}])})},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),o=n(3),s=n(0),a=function(){function AnimationManager(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}return AnimationManager.getDuration=function(t,e,n){return Math.max(Math.min(t,n),e)},AnimationManager.prototype.getDuration=function(t,e,n){var i,o=this;if(void 0!==n)i=n;else{var s=this.axm.map(e,function(e,n){return r["default"].getDuration(Math.abs(Math.abs(e)-Math.abs(t[n])),o.options.deceleration)});i=Object.keys(s).reduce(function(t,e){return Math.max(t,s[e])},-Infinity)}return AnimationManager.getDuration(i,this.options.minimumDuration,this.options.maximumDuration)},AnimationManager.prototype.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,o=n&&n.event||null;return{depaPos:i,destPos:r,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:o,input:n&&n.input||null,isTrusted:!!o,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&s.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}},AnimationManager.prototype.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},AnimationManager.prototype.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},AnimationManager.prototype.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)});Object.keys(e).length>0&&this.setTo(this.axm.map(e,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},AnimationManager.prototype.animateLoop=function(t,e){if(this._animateParam=i({},t),this._animateParam.startTime=(new Date).getTime(),t.duration){var n=this._animateParam,r=this;!function loop(){if(r._raf=null,r.frame(n)>=1)return o.AxisManager.equal(t.destPos,r.axm.get(Object.keys(t.destPos)))||r.em.triggerChange(t.destPos),void e();r._raf=s.requestAnimationFrame(loop)}()}else this.em.triggerChange(t.destPos),e()},AnimationManager.prototype.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=AnimationManager.getDuration(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},AnimationManager.prototype.animateTo=function(t,e,n){var s=this,a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);if(!h&&this.axm.every(c.destPos,function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),h&&!o.AxisManager.equal(c.destPos,u)){var p=n&&n.event||null;this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos),isTrusted:!!p,inputEvent:p,input:n&&n.input||null},function(){return s.animationEnd()})}},AnimationManager.prototype.frame=function(t){var e=(new Date).getTime()-t.startTime,n=this.easing(e/t.duration),i=t.depaPos;return i=this.axm.map(i,function(e,i,o){return e+=t.delta[i]*n,r["default"].getCirculatedPos(e,o.range,o.circular)}),this.em.triggerChange(i),n},AnimationManager.prototype.easing=function(t){return t>1?1:this.options.easing(t)},AnimationManager.prototype.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(o.AxisManager.equal(t,i))return this;this.itm.setInterrupt(!0);var s=this.axm.filter(t,function(t,e){return i[e]!==t});return Object.keys(s).length?(s=this.axm.map(s,function(t,n,i){return i.circular&&(i.circular[0]||i.circular[1])?e>0?t:r["default"].getCirculatedPos(t,i.range,i.circular):r["default"].getInsidePosition(t,i.range,i.circular)}),o.AxisManager.equal(s,i)?this:(e>0?this.animateTo(s,e):(this.em.triggerChange(s),this.itm.setInterrupt(!1)),this)):this},AnimationManager.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.setTo(this.axm.map(this.axm.get(Object.keys(t)),function(e,n){return e+t[n]}),e)},AnimationManager}();e.AnimationManager=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=function(){function EventManager(t){this.axes=t}return EventManager.prototype.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},EventManager.prototype.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},EventManager.prototype.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),o=e&&e.event||i&&i.event||null,s={pos:r.pos,delta:r.delta,holding:n,inputEvent:o,isTrusted:!!o,input:e&&e.input||i&&i.input||null,set:o?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",s),o&&this.am.axm.set(s.set().destPos)},EventManager.prototype.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},EventManager.prototype.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},EventManager.prototype.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},EventManager.prototype.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:i({},t),duration:e};return function(t,e){return t&&(n.destPos=i({},t)),e!==undefined&&(n.duration=e),n}},EventManager.prototype.setAnimationManager=function(t){this.am=t},EventManager.prototype.destroy=function(){this.axes.off()},EventManager}();e.EventManager=r},function(t,e,n){"use strict";e.__esModule=!0;var i=function(){function InterruptManager(t){this.options=t,this._prevented=!1}return InterruptManager.prototype.isInterrupting=function(){return this.options.interruptable||this._prevented},InterruptManager.prototype.isInterrupted=function(){return!this.options.interruptable&&this._prevented},InterruptManager.prototype.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},InterruptManager}();e.InterruptManager=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(3),o=n(2),s=function(){function InputObserver(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,o=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=o}return InputObserver.prototype.atOutside=function(t){var e=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return t>r?r:t<i?i:t});var n=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,i,r){var o=r.range[0],s=r.range[1],a=r.bounce;return t<o?o-e.am.easing((o-t)/(a[0]*n))*a[0]:t>s?s+e.am.easing((t-s)/(a[1]*n))*a[1]:t})},InputObserver.prototype.get=function(t){return this.axm.get(t.axes)},InputObserver.prototype.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},InputObserver.prototype.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return o["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!o["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},InputObserver.prototype.release=function(t,e,n,s){if(this.itm.isInterrupting()&&this.moveDistance){var a=this.axm.get(t.axes),u=this.axm.get(),h=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?a[e]+t:o["default"].getInsidePosition(a[e]+t,n.range,n.circular,n.bounce)})),c=this.am.getDuration(h,a,s);0===c&&(h=i({},u));var p={depaPos:u,destPos:h,duration:c,delta:this.axm.getDelta(u,h),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(p),this.moveDistance=null;var l=this.am.getUserControll(p),f=r.AxisManager.equal(l.destPos,u),m={input:t,event:e};f||0===l.duration?(!f&&this.em.triggerChange(l.destPos,m,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(m):this.em.triggerFinish(!0)):this.am.animateTo(l.destPos,l.duration,m)}},InputObserver}();e.InputObserver=s},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),o=n(5),s=n(0),a=n(1),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=s.$(t),this.options=i({inputType:["touch","mouse"],scale:[1,1],thresholdAngle:45,threshold:0},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}return PanInput.getDirectionByAngle=function(t,e){if(e<0||e>90)return o.DIRECTION.DIRECTION_NONE;var n=Math.abs(t);return n>e&&n<180-e?o.DIRECTION.DIRECTION_VERTICAL:o.DIRECTION.DIRECTION_HORIZONTAL},PanInput.getNextOffset=function(t,e){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.abs(n/-e);return[t[0]/2*i,t[1]/2*i]},PanInput.useDirection=function(t,e,n){return n?!!(e===o.DIRECTION.DIRECTION_ALL||e&t&&n&t):!!(e&t)},PanInput.prototype.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?o.DIRECTION.DIRECTION_ALL:e?o.DIRECTION.DIRECTION_HORIZONTAL:n?o.DIRECTION.DIRECTION_VERTICAL:o.DIRECTION.DIRECTION_NONE,this.axes=t},PanInput.prototype.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.dettachEvent(),this.hammer.add(new r.Pan(e));else{var n=this.element[a.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime()));var i=a.convertInputType(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,[r.Pan,e],i),this.element[a.UNIQUEKEY]=n}return this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this._direction=o.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[a.UNIQUEKEY],this.element=null,this.hammer=null},PanInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},PanInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},PanInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},PanInput.prototype.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},PanInput.prototype.onPanmove=function(t){var e=PanInput.getDirectionByAngle(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;n?(t.offsetX=t.deltaX-n.deltaX,t.offsetY=t.deltaY-n.deltaY):(t.offsetX=0,t.offsetY=0);var i=this.getOffset([t.offsetX,t.offsetY],[PanInput.useDirection(o.DIRECTION.DIRECTION_HORIZONTAL,this._direction,e),PanInput.useDirection(o.DIRECTION.DIRECTION_VERTICAL,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),t.preventSystemEvent=r,r&&this.observer.change(this,t,a.toAxis(this.axes,i))},PanInput.prototype.onPanend=function(t){var e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[PanInput.useDirection(o.DIRECTION.DIRECTION_HORIZONTAL,this._direction),PanInput.useDirection(o.DIRECTION.DIRECTION_VERTICAL,this._direction)]);e=PanInput.getNextOffset(e,this.observer.options.deceleration),this.observer.release(this,t,a.toAxis(this.axes,e))},PanInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},PanInput.prototype.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},PanInput.prototype.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},PanInput}();e.PanInput=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),o=n(0),s=n(1),a=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=o.$(t),this.options=i({scale:1,threshold:0},e),this.onPinchStart=this.onPinchStart.bind(this),this.onPinchMove=this.onPinchMove.bind(this),this.onPinchEnd=this.onPinchEnd.bind(this)}return PinchInput.prototype.mapAxes=function(t){this.axes=t},PinchInput.prototype.connect=function(t){var e={threshold:this.options.threshold};if(this.hammer)this.dettachEvent(),this.hammer.add(new r.Pinch(e));else{var n=this.element[s.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime())),this.hammer=s.createHammer(this.element,[r.Pinch,e],r.TouchInput),this.element[s.UNIQUEKEY]=n}return this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[s.UNIQUEKEY],this.element=null,this.hammer=null},PinchInput.prototype.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,s.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,s.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,s.toAxis(this.axes,[e])),this.observer.release(this,t,s.toAxis(this.axes,[0]),0),this._base=null,this._prev=null},PinchInput.prototype.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},PinchInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},PinchInput.prototype.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},PinchInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},PinchInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},PinchInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},PinchInput}();e.PinchInput=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),o=n(1),s=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1},e),this.onWheel=this.onWheel.bind(this)}return WheelInput.prototype.mapAxes=function(t){this.axes=t},WheelInput.prototype.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},WheelInput.prototype.disconnect=function(){return this.dettachEvent(),this},WheelInput.prototype.destroy=function(){this.disconnect(),this.element=null},WheelInput.prototype.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(t.deltaY>0?-1:1)*this.options.scale;this.observer.change(this,t,o.toAxis(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e.observer.release(e,t,o.toAxis(e.axes,[0])),e._isHolded=!1)},50)}},WheelInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},WheelInput.prototype.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null},WheelInput.prototype.enable=function(){return this._isEnabled=!0,this},WheelInput.prototype.disable=function(){return this._isEnabled=!1,this},WheelInput.prototype.isEnable=function(){return this._isEnabled},WheelInput}();e.WheelInput=s},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),o=n(1);e.KEYMAP={LEFT_ARROW:37,A:65,UP_ARROW:38,W:87,RIGHT_ARROW:39,D:68,DOWN_ARROW:40,S:83};var s=function(){function MoveKeyInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.bind(this)}return MoveKeyInput.prototype.mapAxes=function(t){this.axes=t},MoveKeyInput.prototype.connect=function(t){return this.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},MoveKeyInput.prototype.disconnect=function(){return this.dettachEvent(),this},MoveKeyInput.prototype.destroy=function(){this.disconnect(),this.element=null},MoveKeyInput.prototype.onKeydown=function(t){if(this._isEnabled){t.preventDefault();var n,i=!0,r=t;switch(r.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:n=[-this.options.scale[0],0];break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:n=[this.options.scale[0],0];break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:n=[0,this.options.scale[1]];break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:n=[0,-this.options.scale[1]];break;default:i=!1}i&&(this.observer.change(this,t,o.toAxis(this.axes,n)),r.preventDefault())}},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this._isEnabled=!1,this.observer=null},MoveKeyInput.prototype.enable=function(){return this._isEnabled=!0,this},MoveKeyInput.prototype.disable=function(){return this._isEnabled=!1,this},MoveKeyInput.prototype.isEnable=function(){return this._isEnabled},MoveKeyInput}();e.MoveKeyInput=s}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Axes=e():(t.eg=t.eg||{},t.eg.Axes=e())}("undefined"!=typeof self?self:this,function(){return function(t){function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}([function(t,e,n){"use strict";function toArray(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function $(t,e){void 0===e&&(e=!1);var n;if("string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=toArray(i.childNodes)}else n=toArray(document.querySelectorAll(t));e||(n=n.length>=1?n[0]:undefined)}else t===window?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in window&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return $(t)}),e||(n=n.length>=1?n[0]:undefined)):n=t;return n}e.__esModule=!0,e.toArray=toArray,e.$=$;var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var o={},s=i;i=function(t){var e=s(function(n){o[e]&&t(n)});return o[e]=!0,e},r=function(t){delete o[t]}}else i&&r||(i=function(t){return window.setTimeout(function(){t(window.performance&&window.performance.now&&window.performance.now()||(new Date).getTime())},16)},r=window.clearTimeout);e.requestAnimationFrame=function(t){return i(t)},e.cancelAnimationFrame=function(t){r(t)}},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4);e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=function(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})},e.createHammer=function(t,e){try{return new r.Manager(t,i({},e))}catch(n){return null}},e.convertInputType=function(t){void 0===t&&(t=[]);var n=!1,i=!1;return t.forEach(function(t){switch(t){case"mouse":i=!0;break;case"touch":n=e.SUPPORT_TOUCH}}),n&&r.TouchInput||i&&r.MouseInput||null}},function(t,e,n){"use strict";e.__esModule=!0;var i={getInsidePosition:function(t,e,n,i){var r=t,o=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(o[0],r),+(r=Math.min(o[1],r)).toFixed(5)},isOutside:function(t,e){return t<e[0]||t>e[1]},getDuration:function(t,e){var n=Math.sqrt(t/e*2);return n<100?0:n},isCircularable:function(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]},getCirculatedPos:function(t,e,n){var i=t,r=e[0],o=e[1],s=o-r;return n[1]&&t>o&&(i=(i-o)%s+r),n[0]&&t<r&&(i=(i-r)%s+o),+i.toFixed(5)}};e["default"]=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),o=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}return AxisManager.equal=function(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0},AxisManager.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=i({range:[0,100],bounce:[0,0],circular:[!1,!1]},t.axis[e]),["bounce","circular"].forEach(function(n){var i=t.axis,r=i[e][n];/string|number|boolean/.test(typeof r)&&(i[e][n]=[r,r])})})},AxisManager.prototype.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},AxisManager.prototype.get=function(t){var e=this;return t&&Array.isArray(t)?t.reduce(function(t,n){return n&&n in e._pos&&(t[n]=e._pos[n]),t},{}):i({},this._pos,t||{})},AxisManager.prototype.moveTo=function(t){var e=this,n=this.map(this._pos,function(n,i){return t[i]?t[i]-e._pos[i]:0});return this.set(t),{pos:i({},this._pos),delta:n}},AxisManager.prototype.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},AxisManager.prototype.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},AxisManager.prototype.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},AxisManager.prototype.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},AxisManager.prototype.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!r["default"].isOutside(t,n.range)})},AxisManager}();e.AxisManager=o},function(t,e,n){var i;!function(r,o,s,a){"use strict";function setTimeoutContext(t,e,n){return setTimeout(bindFn(t,n),e)}function invokeArrayArg(t,e,n){return!!Array.isArray(t)&&(each(t,n[e],n),!0)}function each(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function deprecate(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}function inherit(t,e,n){var i,r=e.prototype;(i=t.prototype=Object.create(r)).constructor=t,i._super=r,n&&u(i,n)}function bindFn(t,e){return function(){return t.apply(e,arguments)}}function boolOrFn(t,e){return typeof t==p?t.apply(e?e[0]||a:a,e):t}function ifUndefined(t,e){return t===a?e:t}function addEventListeners(t,e,n){each(splitStr(e),function(e){t.addEventListener(e,n,!1)})}function removeEventListeners(t,e,n){each(splitStr(e),function(e){t.removeEventListener(e,n,!1)})}function hasParent(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function inStr(t,e){return t.indexOf(e)>-1}function splitStr(t){return t.trim().split(/\s+/g)}function inArray(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function toArray(t){return Array.prototype.slice.call(t,0)}function uniqueArray(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];inArray(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function prefixed(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<h.length;){if(n=h[o],(i=n?n+r:e)in t)return i;o++}return a}function getWindowForElement(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}function Input(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){boolOrFn(t.options.enable,[t])&&n.handler(e)},this.init()}function inputHandler(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&A&&i-r==0,s=e&(O|x)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=simpleCloneInputData(e));r>1&&!n.firstMultiple?n.firstMultiple=simpleCloneInputData(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,u=s?s.center:o.center,h=e.center=getCenter(i);e.timeStamp=m(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=getAngle(u,h),e.distance=getDistance(u,h),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==A&&o.eventType!==O||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=getDirection(e.deltaX,e.deltaY);var c=getVelocity(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=f(c.x)>f(c.y)?c.x:c.y,e.scale=s?function(t,e){return getDistance(e[0],e[1],L)/getDistance(t[0],t[1],L)}(s.pointers,i):1,e.rotation=s?function(t,e){return getAngle(e[1],e[0],L)+getAngle(t[1],t[0],L)}(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=x&&(u>T||s.velocity===a)){var h=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,p=getVelocity(u,h,c);i=p.x,r=p.y,n=f(p.x)>f(p.y)?p.x:p.y,o=getDirection(h,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var p=t.element;hasParent(e.srcEvent.target,p)&&(p=e.srcEvent.target);e.target=p}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function simpleCloneInputData(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:m(),pointers:e,center:getCenter(e),deltaX:t.deltaX,deltaY:t.deltaY}}function getCenter(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:l(n/e),y:l(i/e)}}function getVelocity(t,e,n){return{x:e/t||0,y:n/t||0}}function getDirection(t,e){return t===e?P:f(t)>=f(e)?t<0?R:M:e<0?D:C}function getDistance(t,e,n){n||(n=z);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function getAngle(t,e,n){n||(n=z);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function MouseInput(){this.evEl=k,this.evWin=q,this.pressed=!1,Input.apply(this,arguments)}function PointerEventInput(){this.evEl=j,this.evWin=Y,Input.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function SingleTouchInput(){this.evTarget=K,this.evWin=X,this.started=!1,Input.apply(this,arguments)}function TouchInput(){this.evTarget=B,this.targetIds={},Input.apply(this,arguments)}function TouchMouseInput(){Input.apply(this,arguments);var t=bindFn(this.handler,this);this.touch=new TouchInput(this.manager,t),this.mouse=new MouseInput(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function setLastTouch(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches,r=function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)};setTimeout(r,G)}}function TouchAction(t,e){this.manager=t,this.set(e)}function Recognizer(t){this.options=u({},this.defaults,t||{}),this.id=g++,this.manager=null,this.options.enable=ifUndefined(this.options.enable,!0),this.state=ot,this.simultaneous={},this.requireFail=[]}function stateStr(t){return t&ct?"cancel":t&ut?"end":t&at?"move":t&st?"start":""}function directionStr(t){return t==C?"down":t==D?"up":t==R?"left":t==M?"right":""}function getRecognizerByNameIfManager(t,e){var n=e.manager;return n?n.get(t):t}function AttrRecognizer(){Recognizer.apply(this,arguments)}function PanRecognizer(){AttrRecognizer.apply(this,arguments),this.pX=null,this.pY=null}function PinchRecognizer(){AttrRecognizer.apply(this,arguments)}function PressRecognizer(){Recognizer.apply(this,arguments),this._timer=null,this._input=null}function RotateRecognizer(){AttrRecognizer.apply(this,arguments)}function SwipeRecognizer(){AttrRecognizer.apply(this,arguments)}function TapRecognizer(){Recognizer.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Hammer(t,e){return e=e||{},e.recognizers=ifUndefined(e.recognizers,Hammer.defaults.preset),new Manager(t,e)}function Manager(t,e){this.options=u({},Hammer.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){var e=t.options.inputClass;return new(e||(_?PointerEventInput:I?TouchInput:y?TouchMouseInput:MouseInput))(t,inputHandler)}(this),this.touchAction=new TouchAction(this,this.options.touchAction),toggleCssProps(this,!0),each(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function toggleCssProps(t,e){var n=t.element;if(n.style){var i;each(t.options.cssProps,function(r,o){i=prefixed(n.style,o),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={})}}var u,h=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),p="function",l=Math.round,f=Math.abs,m=Date.now;u="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var d=deprecate(function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t},"extend","Use `assign`."),v=deprecate(function(t,e){return d(t,e,!0)},"merge","Use `assign`."),g=1,y="ontouchstart"in r,_=prefixed(r,"PointerEvent")!==a,I=y&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),E="touch",T=25,A=1,b=2,O=4,x=8,P=1,R=2,M=4,D=8,C=16,N=R|M,w=D|C,S=N|w,z=["x","y"],L=["clientX","clientY"];Input.prototype={handler:function(){},init:function(){this.evEl&&addEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&addEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&addEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&removeEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&removeEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&removeEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)}};var H={mousedown:A,mousemove:b,mouseup:O},k="mousedown",q="mousemove mouseup";inherit(MouseInput,Input,{handler:function(t){var e=H[t.type];e&A&&0===t.button&&(this.pressed=!0),e&b&&1!==t.which&&(e=O),this.pressed&&(e&O&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var W={pointerdown:A,pointermove:b,pointerup:O,pointercancel:x,pointerout:x},F={2:E,3:"pen",4:"mouse",5:"kinect"},j="pointerdown",Y="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(j="MSPointerDown",Y="MSPointerMove MSPointerUp MSPointerCancel"),inherit(PointerEventInput,Input,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=W[i],o=F[t.pointerType]||t.pointerType,s=o==E,a=inArray(e,t.pointerId,"pointerId");r&A&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(O|x)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var U={touchstart:A,touchmove:b,touchend:O,touchcancel:x},K="touchstart",X="touchstart touchmove touchend touchcancel";inherit(SingleTouchInput,Input,{handler:function(t){var e=U[t.type];if(e===A&&(this.started=!0),this.started){var n=function(t,e){var n=toArray(t.touches),i=toArray(t.changedTouches);return e&(O|x)&&(n=uniqueArray(n.concat(i),"identifier",!0)),[n,i]}.call(this,t,e);e&(O|x)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:E,srcEvent:t})}}});var V={touchstart:A,touchmove:b,touchend:O,touchcancel:x},B="touchstart touchmove touchend touchcancel";inherit(TouchInput,Input,{handler:function(t){var e=V[t.type],n=function(t,e){var n=toArray(t.touches),i=this.targetIds;if(e&(A|b)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=toArray(t.changedTouches),a=[],u=this.target;if(o=n.filter(function(t){return hasParent(t.target,u)}),e===A)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(O|x)&&delete i[s[r].identifier],r++;return a.length?[uniqueArray(o.concat(a),"identifier",!0),a]:void 0}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:E,srcEvent:t})}});var G=2500,Z=25;inherit(TouchMouseInput,Input,{handler:function(t,e,n){var i=n.pointerType==E,r="mouse"==n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(t,e){t&A?(this.primaryTouch=e.changedPointers[0].identifier,setLastTouch.call(this,e)):t&(O|x)&&setLastTouch.call(this,e)}).call(this,e,n);else if(r&&function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=Z&&s<=Z)return!0}return!1}.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Q=prefixed(c.style,"touchAction"),$=Q!==a,J="auto",tt="manipulation",et="none",nt="pan-x",it="pan-y",rt=function(){if(!$)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||r.CSS.supports("touch-action",n)}),t}();TouchAction.prototype={set:function(t){"compute"==t&&(t=this.compute()),$&&this.manager.element.style&&rt[t]&&(this.manager.element.style[Q]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return each(this.manager.recognizers,function(e){boolOrFn(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(inStr(t,et))return et;var e=inStr(t,nt),n=inStr(t,it);return e&&n?et:e||n?e?nt:it:inStr(t,tt)?tt:J}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=inStr(i,et)&&!rt[et],o=inStr(i,it)&&!rt[it],s=inStr(i,nt)&&!rt[nt];if(r){var a=1===t.pointers.length,u=t.distance<2,h=t.deltaTime<250;if(a&&u&&h)return}if(!s||!o)return r||o&&n&N||s&&n&w?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ot=1,st=2,at=4,ut=8,ht=ut,ct=16;Recognizer.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(invokeArrayArg(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=getRecognizerByNameIfManager(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return invokeArrayArg(t,"dropRecognizeWith",this)?this:(t=getRecognizerByNameIfManager(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(invokeArrayArg(t,"requireFailure",this))return this;var e=this.requireFail;return t=getRecognizerByNameIfManager(t,this),-1===inArray(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(invokeArrayArg(t,"dropRequireFailure",this))return this;t=getRecognizerByNameIfManager(t,this);var e=inArray(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function emit(n){e.manager.emit(n,t)}var e=this,n=this.state;n<ut&&emit(e.options.event+stateStr(n)),emit(e.options.event),t.additionalEvent&&emit(t.additionalEvent),n>=ut&&emit(e.options.event+stateStr(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|ot)))return!1;t++}return!0},recognize:function(t){var e=u({},t);if(!boolOrFn(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(ht|ct|32)&&(this.state=ot),this.state=this.process(e),this.state&(st|at|ut|ct)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},inherit(AttrRecognizer,Recognizer,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=e&(st|at),r=this.attrTest(t);return i&&(n&x||!r)?e|ct:i||r?n&O?e|ut:e&st?e|at:st:32}}),inherit(PanRecognizer,AttrRecognizer,{defaults:{event:"pan",threshold:10,pointers:1,direction:S},getTouchAction:function(){var t=this.options.direction,e=[];return t&N&&e.push(it),t&w&&e.push(nt),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(e.direction&N?(r=0===o?P:o<0?R:M,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?P:s<0?D:C,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return AttrRecognizer.prototype.attrTest.call(this,t)&&(this.state&st||!(this.state&st)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=directionStr(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),inherit(PinchRecognizer,AttrRecognizer,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&st)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),inherit(PressRecognizer,Recognizer,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[J]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(O|x)&&!r)this.reset();else if(t.eventType&A)this.reset(),this._timer=setTimeoutContext(function(){this.state=ht,this.tryEmit()},e.time,this);else if(t.eventType&O)return ht;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ht&&(t&&t.eventType&O?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=m(),this.manager.emit(this.options.event,this._input)))}}),inherit(RotateRecognizer,AttrRecognizer,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&st)}}),inherit(SwipeRecognizer,AttrRecognizer,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:N|w,pointers:1},getTouchAction:function(){return PanRecognizer.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(N|w)?e=t.overallVelocity:n&N?e=t.overallVelocityX:n&w&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&t.eventType&O},emit:function(t){var e=directionStr(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),inherit(TapRecognizer,Recognizer,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[tt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&A&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=O)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||getDistance(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t;if(0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=setTimeoutContext(function(){this.state=ht,this.tryEmit()},e.interval,this),st):ht}return 32},failTimeout:function(){return this._timer=setTimeoutContext(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ht&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Hammer.VERSION="2.0.7",Hammer.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[RotateRecognizer,{enable:!1}],[PinchRecognizer,{enable:!1},["rotate"]],[SwipeRecognizer,{direction:N}],[PanRecognizer,{direction:N},["swipe"]],[TapRecognizer],[TapRecognizer,{event:"doubletap",taps:2},["tap"]],[PressRecognizer]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};Manager.prototype={set:function(t){return u(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&ht)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&n.state&(st|at|ut)&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Recognizer)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(invokeArrayArg(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(invokeArrayArg(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=inArray(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return each(splitStr(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return each(splitStr(t),function(t){e?n[t]&&n[t].splice(inArray(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&toggleCssProps(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(Hammer,{INPUT_START:A,INPUT_MOVE:b,INPUT_END:O,INPUT_CANCEL:x,STATE_POSSIBLE:ot,STATE_BEGAN:st,STATE_CHANGED:at,STATE_ENDED:ut,STATE_RECOGNIZED:ht,STATE_CANCELLED:ct,STATE_FAILED:32,DIRECTION_NONE:P,DIRECTION_LEFT:R,DIRECTION_RIGHT:M,DIRECTION_UP:D,DIRECTION_DOWN:C,DIRECTION_HORIZONTAL:N,DIRECTION_VERTICAL:w,DIRECTION_ALL:S,Manager:Manager,Input:Input,TouchAction:TouchAction,TouchInput:TouchInput,MouseInput:MouseInput,PointerEventInput:PointerEventInput,TouchMouseInput:TouchMouseInput,SingleTouchInput:SingleTouchInput,Recognizer:Recognizer,AttrRecognizer:AttrRecognizer,Tap:TapRecognizer,Pan:PanRecognizer,Swipe:SwipeRecognizer,Pinch:PinchRecognizer,Rotate:RotateRecognizer,Press:PressRecognizer,on:addEventListeners,off:removeEventListeners,each:each,merge:v,extend:d,assign:u,inherit:inherit,bindFn:bindFn,prefixed:prefixed});(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Hammer,(i=function(){return Hammer}.call(e,n,e,t))===a||(t.exports=i)}(window,document)},function(t,e,n){"use strict";e.__esModule=!0;!function(t){t[t.DIRECTION_NONE=1]="DIRECTION_NONE",t[t.DIRECTION_LEFT=2]="DIRECTION_LEFT",t[t.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",t[t.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",t[t.DIRECTION_UP=8]="DIRECTION_UP",t[t.DIRECTION_DOWN=16]="DIRECTION_DOWN",t[t.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",t[t.DIRECTION_ALL=30]="DIRECTION_ALL"}(e.DIRECTION||(e.DIRECTION={})),e.TRANSFORM=function(){for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}()},function(t,e,n){"use strict";var i=n(7),r=n(13),o=n(14),s=n(15),a=n(16);i["default"].PanInput=r.PanInput,i["default"].PinchInput=o.PinchInput,i["default"].WheelInput=s.WheelInput,i["default"].MoveKeyInput=a.MoveKeyInput,t.exports=i["default"]},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function __(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var o=n(8),s=n(9),a=n(10),u=n(11),h=n(3),c=n(12),p=n(5),l=function(t){function Axes(e,n,i){void 0===e&&(e={});var o=t.call(this)||this;return o.axis=e,o._inputs=[],o.options=r({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),o.itm=new u.InterruptManager(o.options),o.axm=new h.AxisManager(o.axis,o.options),o.em=new a.EventManager(o),o.am=new s.AnimationManager(o),o.io=new c.InputObserver(o),o.em.setAnimationManager(o.am),i&&o.em.triggerChange(i),o}return i(Axes,t),Axes.prototype.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},Axes.prototype.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);e>=0&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},Axes.prototype.get=function(t){return this.axm.get(t)},Axes.prototype.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},Axes.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},Axes.prototype.isBounceArea=function(t){return this.axm.isOutside(t)},Axes.prototype.destroy=function(){this.disconnect(),this.em.destroy()},Axes.VERSION="#__VERSION__#",Axes.TRANSFORM=p.TRANSFORM,Axes.DIRECTION_NONE=p.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=p.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=p.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=p.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=p.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=p.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=p.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=p.DIRECTION.DIRECTION_ALL,Axes}(o);e["default"]=l},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){return function(t){function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}}(n(1));i["default"].VERSION="2.0.0",t.exports=i["default"]},function(t,e,n){"use strict";e.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function Component(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Component),this._eventHandler={},this.options={}}return Component.prototype.trigger=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=this._eventHandler[t]||[];if(!(n.length>0))return!0;n=n.concat(),e.eventType=t;var i=!1,r=[e],o=0;e.stop=function(){i=!0};for(var s=arguments.length,a=Array(s>2?s-2:0),u=2;u<s;u++)a[u-2]=arguments[u];for(a.length>=1&&(r=r.concat(a)),o=0;n[o];o++)n[o].apply(this,r);return!i},Component.prototype.once=function(t,e){if("object"===(void 0===t?"undefined":i(t))&&void 0===e){var n=t,r=void 0;for(r in n)this.once(r,n[r]);return this}if("string"==typeof t&&"function"==typeof e){var o=this;this.on(t,function listener(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];e.apply(o,i),o.off(t,listener)})}return this},Component.prototype.hasOn=function(t){return!!this._eventHandler[t]},Component.prototype.on=function(t,e){if("object"===(void 0===t?"undefined":i(t))&&void 0===e){var n=t,r=void 0;for(r in n)this.on(r,n[r]);return this}if("string"==typeof t&&"function"==typeof e){var o=this._eventHandler[t];void 0===o&&(this._eventHandler[t]=[],o=this._eventHandler[t]),o.push(e)}return this},Component.prototype.off=function(t,e){if(void 0===t)return this._eventHandler={},this;if(void 0===e){if("string"==typeof t)return this._eventHandler[t]=undefined,this;var n=t,i=void 0;for(i in n)this.off(i,n[i]);return this}var r=this._eventHandler[t];if(r){var o=void 0,s=void 0;for(o=0;(s=r[o])!==undefined;o++)if(s===e){r=r.splice(o,1);break}}return this},Component}();e["default"]=r,t.exports=e["default"]}])})},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),o=n(3),s=n(0),a=function(){function AnimationManager(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}return AnimationManager.getDuration=function(t,e,n){return Math.max(Math.min(t,n),e)},AnimationManager.prototype.getDuration=function(t,e,n){var i,o=this;if(void 0!==n)i=n;else{var s=this.axm.map(e,function(e,n){return r["default"].getDuration(Math.abs(Math.abs(e)-Math.abs(t[n])),o.options.deceleration)});i=Object.keys(s).reduce(function(t,e){return Math.max(t,s[e])},-Infinity)}return AnimationManager.getDuration(i,this.options.minimumDuration,this.options.maximumDuration)},AnimationManager.prototype.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,o=n&&n.event||null;return{depaPos:i,destPos:r,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:o,input:n&&n.input||null,isTrusted:!!o,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&s.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}},AnimationManager.prototype.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},AnimationManager.prototype.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},AnimationManager.prototype.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)});Object.keys(e).length>0&&this.setTo(this.axm.map(e,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},AnimationManager.prototype.animateLoop=function(t,e){if(this._animateParam=i({},t),this._animateParam.startTime=(new Date).getTime(),t.duration){var n=this._animateParam,r=this;!function loop(){if(r._raf=null,r.frame(n)>=1)return o.AxisManager.equal(t.destPos,r.axm.get(Object.keys(t.destPos)))||r.em.triggerChange(t.destPos),void e();r._raf=s.requestAnimationFrame(loop)}()}else this.em.triggerChange(t.destPos),e()},AnimationManager.prototype.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=AnimationManager.getDuration(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},AnimationManager.prototype.animateTo=function(t,e,n){var s=this,a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);if(!h&&this.axm.every(c.destPos,function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),h&&!o.AxisManager.equal(c.destPos,u)){var p=n&&n.event||null;this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos),isTrusted:!!p,inputEvent:p,input:n&&n.input||null},function(){return s.animationEnd()})}},AnimationManager.prototype.frame=function(t){var e=(new Date).getTime()-t.startTime,n=this.easing(e/t.duration),i=t.depaPos;return i=this.axm.map(i,function(e,i,o){return e+=t.delta[i]*n,r["default"].getCirculatedPos(e,o.range,o.circular)}),this.em.triggerChange(i),n},AnimationManager.prototype.easing=function(t){return t>1?1:this.options.easing(t)},AnimationManager.prototype.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(o.AxisManager.equal(t,i))return this;this.itm.setInterrupt(!0);var s=this.axm.filter(t,function(t,e){return i[e]!==t});return Object.keys(s).length?(s=this.axm.map(s,function(t,n,i){return i.circular&&(i.circular[0]||i.circular[1])?e>0?t:r["default"].getCirculatedPos(t,i.range,i.circular):r["default"].getInsidePosition(t,i.range,i.circular)}),o.AxisManager.equal(s,i)?this:(e>0?this.animateTo(s,e):(this.em.triggerChange(s),this.itm.setInterrupt(!1)),this)):this},AnimationManager.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.setTo(this.axm.map(this.axm.get(Object.keys(t)),function(e,n){return e+t[n]}),e)},AnimationManager}();e.AnimationManager=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=function(){function EventManager(t){this.axes=t}return EventManager.prototype.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},EventManager.prototype.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},EventManager.prototype.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),o=e&&e.event||i&&i.event||null,s={pos:r.pos,delta:r.delta,holding:n,inputEvent:o,isTrusted:!!o,input:e&&e.input||i&&i.input||null,set:o?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",s),o&&this.am.axm.set(s.set().destPos)},EventManager.prototype.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},EventManager.prototype.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},EventManager.prototype.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},EventManager.prototype.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:i({},t),duration:e};return function(t,e){return t&&(n.destPos=i({},t)),e!==undefined&&(n.duration=e),n}},EventManager.prototype.setAnimationManager=function(t){this.am=t},EventManager.prototype.destroy=function(){this.axes.off()},EventManager}();e.EventManager=r},function(t,e,n){"use strict";e.__esModule=!0;var i=function(){function InterruptManager(t){this.options=t,this._prevented=!1}return InterruptManager.prototype.isInterrupting=function(){return this.options.interruptable||this._prevented},InterruptManager.prototype.isInterrupted=function(){return!this.options.interruptable&&this._prevented},InterruptManager.prototype.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},InterruptManager}();e.InterruptManager=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(3),o=n(2),s=function(){function InputObserver(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,o=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=o}return InputObserver.prototype.atOutside=function(t){var e=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return t>r?r:t<i?i:t});var n=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,i,r){var o=r.range[0],s=r.range[1],a=r.bounce;return t<o?o-e.am.easing((o-t)/(a[0]*n))*a[0]:t>s?s+e.am.easing((t-s)/(a[1]*n))*a[1]:t})},InputObserver.prototype.get=function(t){return this.axm.get(t.axes)},InputObserver.prototype.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},InputObserver.prototype.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return o["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!o["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},InputObserver.prototype.release=function(t,e,n,s){if(this.itm.isInterrupting()&&this.moveDistance){var a=this.axm.get(t.axes),u=this.axm.get(),h=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?a[e]+t:o["default"].getInsidePosition(a[e]+t,n.range,n.circular,n.bounce)})),c=this.am.getDuration(h,a,s);0===c&&(h=i({},u));var p={depaPos:u,destPos:h,duration:c,delta:this.axm.getDelta(u,h),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(p),this.moveDistance=null;var l=this.am.getUserControll(p),f=r.AxisManager.equal(l.destPos,u),m={input:t,event:e};f||0===l.duration?(!f&&this.em.triggerChange(l.destPos,m,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(m):this.em.triggerFinish(!0)):this.am.animateTo(l.destPos,l.duration,m)}},InputObserver}();e.InputObserver=s},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),o=n(5),s=n(0),a=n(1),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=s.$(t),this.options=i({inputType:["touch","mouse"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}return PanInput.getDirectionByAngle=function(t,e){if(e<0||e>90)return o.DIRECTION.DIRECTION_NONE;var n=Math.abs(t);return n>e&&n<180-e?o.DIRECTION.DIRECTION_VERTICAL:o.DIRECTION.DIRECTION_HORIZONTAL},PanInput.getNextOffset=function(t,e){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.abs(n/-e);return[t[0]/2*i,t[1]/2*i]},PanInput.useDirection=function(t,e,n){return n?!!(e===o.DIRECTION.DIRECTION_ALL||e&t&&n&t):!!(e&t)},PanInput.prototype.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?o.DIRECTION.DIRECTION_ALL:e?o.DIRECTION.DIRECTION_HORIZONTAL:n?o.DIRECTION.DIRECTION_VERTICAL:o.DIRECTION.DIRECTION_NONE,this.axes=t},PanInput.prototype.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.dettachEvent(),this.hammer.add(new r.Pan(e));else{var n=this.element[a.UNIQUEKEY];n?this.hammer&&this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime()));var o=a.convertInputType(this.options.inputType);if(!o)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,i({recognizers:[[r.Pan,e]],inputClass:o},this.options.hammerManagerOptions)),this.element[a.UNIQUEKEY]=n}return this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this._direction=o.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[a.UNIQUEKEY],this.element=null,this.hammer=null},PanInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},PanInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},PanInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},PanInput.prototype.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},PanInput.prototype.onPanmove=function(t){var e=PanInput.getDirectionByAngle(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;n?(t.offsetX=t.deltaX-n.deltaX,t.offsetY=t.deltaY-n.deltaY):(t.offsetX=0,t.offsetY=0);var i=this.getOffset([t.offsetX,t.offsetY],[PanInput.useDirection(o.DIRECTION.DIRECTION_HORIZONTAL,this._direction,e),PanInput.useDirection(o.DIRECTION.DIRECTION_VERTICAL,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),t.preventSystemEvent=r,r&&this.observer.change(this,t,a.toAxis(this.axes,i))},PanInput.prototype.onPanend=function(t){var e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[PanInput.useDirection(o.DIRECTION.DIRECTION_HORIZONTAL,this._direction),PanInput.useDirection(o.DIRECTION.DIRECTION_VERTICAL,this._direction)]);e=PanInput.getNextOffset(e,this.observer.options.deceleration),this.observer.release(this,t,a.toAxis(this.axes,e))},PanInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},PanInput.prototype.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},PanInput.prototype.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},PanInput}();e.PanInput=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),o=n(0),s=n(1),a=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=o.$(t),this.options=i({scale:1,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onPinchStart=this.onPinchStart.bind(this),this.onPinchMove=this.onPinchMove.bind(this),this.onPinchEnd=this.onPinchEnd.bind(this)}return PinchInput.prototype.mapAxes=function(t){this.axes=t},PinchInput.prototype.connect=function(t){var e={threshold:this.options.threshold};if(this.hammer)this.dettachEvent(),this.hammer.add(new r.Pinch(e));else{var n=this.element[s.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime())),this.hammer=s.createHammer(this.element,i({recognizers:[[r.Pinch,e]],inputClass:r.TouchInput},this.options.hammerManagerOptions)),this.element[s.UNIQUEKEY]=n}return this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[s.UNIQUEKEY],this.element=null,this.hammer=null},PinchInput.prototype.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,s.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,s.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,s.toAxis(this.axes,[e])),this.observer.release(this,t,s.toAxis(this.axes,[0]),0),this._base=null,this._prev=null},PinchInput.prototype.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},PinchInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},PinchInput.prototype.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},PinchInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},PinchInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},PinchInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},PinchInput}();e.PinchInput=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),o=n(1),s=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1},e),this.onWheel=this.onWheel.bind(this)}return WheelInput.prototype.mapAxes=function(t){this.axes=t},WheelInput.prototype.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},WheelInput.prototype.disconnect=function(){return this.dettachEvent(),this},WheelInput.prototype.destroy=function(){this.disconnect(),this.element=null},WheelInput.prototype.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(t.deltaY>0?-1:1)*this.options.scale;this.observer.change(this,t,o.toAxis(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e.observer.release(e,t,o.toAxis(e.axes,[0])),e._isHolded=!1)},50)}},WheelInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},WheelInput.prototype.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null},WheelInput.prototype.enable=function(){return this._isEnabled=!0,this},WheelInput.prototype.disable=function(){return this._isEnabled=!1,this},WheelInput.prototype.isEnable=function(){return this._isEnabled},WheelInput}();e.WheelInput=s},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),o=n(1);e.KEYMAP={LEFT_ARROW:37,A:65,UP_ARROW:38,W:87,RIGHT_ARROW:39,D:68,DOWN_ARROW:40,S:83};var s=function(){function MoveKeyInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.bind(this)}return MoveKeyInput.prototype.mapAxes=function(t){this.axes=t},MoveKeyInput.prototype.connect=function(t){return this.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},MoveKeyInput.prototype.disconnect=function(){return this.dettachEvent(),this},MoveKeyInput.prototype.destroy=function(){this.disconnect(),this.element=null},MoveKeyInput.prototype.onKeydown=function(t){if(this._isEnabled){t.preventDefault();var n,i=!0,r=t;switch(r.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:n=[-this.options.scale[0],0];break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:n=[this.options.scale[0],0];break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:n=[0,this.options.scale[1]];break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:n=[0,-this.options.scale[1]];break;default:i=!1}i&&(this.observer.change(this,t,o.toAxis(this.axes,n)),r.preventDefault())}},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this._isEnabled=!1,this.observer=null},MoveKeyInput.prototype.enable=function(){return this._isEnabled=!0,this},MoveKeyInput.prototype.disable=function(){return this._isEnabled=!1,this},MoveKeyInput.prototype.isEnable=function(){return this._isEnabled},MoveKeyInput}();e.MoveKeyInput=s}])}); | ||
//# sourceMappingURL=axes.pkgd.min.js.map |
{ | ||
"name": "@egjs/axes", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions.", | ||
@@ -21,2 +21,3 @@ "main": "dist/axes.js", | ||
"demo:deploy": "npm run build && npm run jsdoc && npm run demo:prebuild-version && npm run demo:prebuild-latest && npm run demo:build && gh-pages -d demo/_site --add --remote upstream", | ||
"demo:origin": "npm run build && npm run jsdoc && npm run demo:prebuild-version && npm run demo:prebuild-latest && npm run demo:build && gh-pages -d demo/_site --add --remote origin", | ||
"demo:updateVersion": "echo $npm_package_version > demo/_data/version.yml", | ||
@@ -45,3 +46,3 @@ "demo:setup": "cpx 'node_modules/@egjs/common-demo/**/*' 'demo/' && rm demo/package.json", | ||
"@egjs/common-demo": "github:naver/egjs#common-demo", | ||
"awesome-typescript-loader": "^3.2.3", | ||
"awesome-typescript-loader": "^3.4.1", | ||
"babel-core": "^6.26.0", | ||
@@ -51,9 +52,9 @@ "babel-loader": "^7.1.2", | ||
"chai": "^4.1.2", | ||
"chalk": "^2.1.0", | ||
"clean-webpack-plugin": "^0.1.16", | ||
"coveralls": "^2.13.1", | ||
"chalk": "^2.3.0", | ||
"clean-webpack-plugin": "^0.1.17", | ||
"coveralls": "^3.0.0", | ||
"cpx": "^1.5.0", | ||
"egjs-jsdoc-template": "^1.4.0", | ||
"fs-extra": "^4.0.2", | ||
"gh-pages": "^1.0.0", | ||
"egjs-jsdoc-template": "^1.4.1", | ||
"fs-extra": "^5.0.0", | ||
"gh-pages": "^1.1.0", | ||
"hammer-simulator": "0.0.1", | ||
@@ -70,22 +71,22 @@ "hammerjs-compatible": "^1.1.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.4", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-sinon": "^1.0.5", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-webpack": "^2.0.4", | ||
"karma-webpack": "^2.0.9", | ||
"lite-fixture": "^1.0.2", | ||
"mocha": "^3.5.3", | ||
"sinon": "^3.3.0", | ||
"mocha": "^4.0.1", | ||
"sinon": "^4.1.3", | ||
"string-replace-webpack-plugin": "0.1.3", | ||
"sync-exec": "^0.6.2", | ||
"tslint": "^5.7.0", | ||
"tslint": "^5.8.0", | ||
"tslint-eslint-rules": "^4.1.1", | ||
"tslint-loader": "^3.5.3", | ||
"typescript": "^2.5.2", | ||
"uglifyjs-webpack-plugin": "^0.4.6", | ||
"webpack": "^3.6.0", | ||
"webpack-dev-server": "^2.8.2", | ||
"webpack-merge": "^4.1.0", | ||
"write-file-webpack-plugin": "^4.1.0", | ||
"typescript": "^2.6.2", | ||
"uglifyjs-webpack-plugin": "^1.1.4", | ||
"webpack": "^3.10.0", | ||
"webpack-dev-server": "^2.9.7", | ||
"webpack-merge": "^4.1.1", | ||
"write-file-webpack-plugin": "^4.2.0", | ||
"xml2js": "^0.4.19" | ||
} | ||
} |
@@ -7,6 +7,2 @@ import * as Component from "@egjs/component"; | ||
import { InputObserver } from "./InputObserver"; | ||
import { PanInput } from "./inputType/PanInput"; | ||
import { PinchInput } from "./inputType/PinchInput"; | ||
import { WheelInput } from "./inputType/WheelInput"; | ||
import { MoveKeyInput } from "./inputType/MoveKeyInput"; | ||
import { TRANSFORM, DIRECTION } from "./const"; | ||
@@ -118,6 +114,7 @@ import { IInputType } from "./inputType/InputType"; | ||
static VERSION = "#__VERSION__#"; | ||
static PanInput = PanInput; | ||
static PinchInput = PinchInput; | ||
static WheelInput = WheelInput; | ||
static MoveKeyInput = MoveKeyInput; | ||
// for tree shaking | ||
static PanInput; | ||
static PinchInput; | ||
static WheelInput; | ||
static MoveKeyInput; | ||
@@ -214,3 +211,2 @@ /** | ||
} | ||
/** | ||
@@ -217,0 +213,0 @@ * Connect the axis of eg.Axes to the inputType. |
@@ -26,3 +26,2 @@ import Coordinate from "./Coordinate"; | ||
this._complementOptions(); | ||
this._pos = Object.keys(this.axis).reduce((acc, v) => { | ||
@@ -33,3 +32,2 @@ acc[v] = this.axis[v].range[0]; | ||
} | ||
/** | ||
@@ -59,3 +57,2 @@ * set up 'css' expression | ||
} | ||
getDelta(depaPos: Axis, destPos: Axis): Axis { | ||
@@ -62,0 +59,0 @@ const fullDepaPos = this.get(depaPos); |
import Axes from "./Axes"; | ||
import { PanInput } from "./inputType/PanInput"; | ||
import { PinchInput } from "./inputType/PinchInput"; | ||
import { WheelInput } from "./inputType/WheelInput"; | ||
import { MoveKeyInput } from "./inputType/MoveKeyInput"; | ||
Axes.PanInput = PanInput; | ||
Axes.PinchInput = PinchInput; | ||
Axes.WheelInput = WheelInput; | ||
Axes.MoveKeyInput = MoveKeyInput; | ||
export = Axes; |
@@ -36,21 +36,6 @@ import * as Hammer from "hammerjs"; | ||
}; | ||
export function createHammer(element: HTMLElement, recognizers, inputClass?) { | ||
export function createHammer(element: HTMLElement, options) { | ||
try { | ||
const options = { | ||
recognizers: [ | ||
recognizers | ||
], | ||
// css properties were removed due to usablility issue | ||
// http://hammerjs.github.io/jsdoc/Hammer.defaults.cssProps.html | ||
cssProps: { | ||
userSelect: "none", | ||
touchSelect: "none", | ||
touchCallout: "none", | ||
userDrag: "none", | ||
} | ||
}; | ||
inputClass && (options["inputClass"] = inputClass); | ||
// create Hammer | ||
return new Hammer.Manager(element, options); | ||
return new Hammer.Manager(element, { ...options }); | ||
} catch (e) { | ||
@@ -57,0 +42,0 @@ return null; |
@@ -13,2 +13,3 @@ import { InputObserver } from "./../InputObserver"; | ||
threshold?: number; | ||
hammerManagerOptions?: Object; | ||
} | ||
@@ -25,2 +26,3 @@ | ||
* @property {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko> | ||
* @property {Object} [hammerManagerOptions={cssProps: {userSelect: "none",touchSelect: "none",touchCallout: "none",userDrag: "none"}] Options of Hammer.Manager <ko>Hammer.Manager의 옵션</ko> | ||
**/ | ||
@@ -112,2 +114,12 @@ /** | ||
threshold: 0, | ||
hammerManagerOptions: { | ||
// css properties were removed due to usablility issue | ||
// http://hammerjs.github.io/jsdoc/Hammer.defaults.cssProps.html | ||
cssProps: { | ||
userSelect: "none", | ||
touchSelect: "none", | ||
touchCallout: "none", | ||
userDrag: "none", | ||
}, | ||
}, | ||
}, ...options | ||
@@ -147,3 +159,3 @@ }; | ||
if (keyValue) { | ||
this.hammer.destroy(); | ||
this.hammer && this.hammer.destroy(); | ||
} else { | ||
@@ -156,5 +168,8 @@ keyValue = String(Math.round(Math.random() * new Date().getTime())); | ||
} | ||
this.hammer = createHammer(this.element, | ||
[Hammer.Pan, hammerOption], | ||
inputClass); | ||
this.hammer = createHammer(this.element, { ...{ | ||
recognizers: [ | ||
[Hammer.Pan, hammerOption], | ||
], | ||
inputClass, | ||
}, ... this.options.hammerManagerOptions }); | ||
this.element[UNIQUEKEY] = keyValue; | ||
@@ -161,0 +176,0 @@ } |
@@ -10,2 +10,3 @@ import { InputObserver } from "./../InputObserver"; | ||
threshold?: number; | ||
hammerManagerOptions?: Object; | ||
} | ||
@@ -19,2 +20,3 @@ | ||
* @property {Number} [threshold=0] Minimal scale before recognizing <ko>사용자의 Pinch 동작을 인식하기 위해산 최소한의 배율</ko> | ||
* @property {Object} [hammerManagerOptions={cssProps: {userSelect: "none",touchSelect: "none",touchCallout: "none",userDrag: "none"}] Options of Hammer.Manager <ko>Hammer.Manager의 옵션</ko> | ||
**/ | ||
@@ -62,2 +64,12 @@ | ||
threshold: 0, | ||
hammerManagerOptions: { | ||
// css properties were removed due to usablility issue | ||
// http://hammerjs.github.io/jsdoc/Hammer.defaults.cssProps.html | ||
cssProps: { | ||
userSelect: "none", | ||
touchSelect: "none", | ||
touchCallout: "none", | ||
userDrag: "none", | ||
}, | ||
}, | ||
}, ...options | ||
@@ -89,5 +101,8 @@ }; | ||
} | ||
this.hammer = createHammer(this.element, | ||
[Hammer.Pinch, hammerOption], | ||
Hammer.TouchInput); | ||
this.hammer = createHammer(this.element, { ...{ | ||
recognizers: [ | ||
[Hammer.Pinch, hammerOption], | ||
], | ||
inputClass: Hammer.TouchInput, | ||
}, ...this.options.hammerManagerOptions}); | ||
this.element[UNIQUEKEY] = keyValue; | ||
@@ -94,0 +109,0 @@ } |
import { InputObserver } from "./../InputObserver"; | ||
import { $ } from "../utils"; | ||
import { UNIQUEKEY, toAxis, convertInputType, createHammer, IInputType, IInputTypeObserver } from "./InputType"; | ||
import { UNIQUEKEY, toAxis, IInputType, IInputTypeObserver } from "./InputType"; | ||
import { Axis } from "../AxisManager"; | ||
@@ -5,0 +5,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
890256
46
10212