@egjs/conveyer
Advanced tools
Comparing version 0.1.0 to 1.0.0
@@ -7,3 +7,3 @@ /* | ||
repository: https://github.com/naver/egjs-conveyer | ||
version: 0.1.0 | ||
version: 1.0.0 | ||
*/ | ||
@@ -85,3 +85,5 @@ 'use strict'; | ||
var Observer = function () { | ||
var Observer = | ||
/*#__PURE__*/ | ||
function () { | ||
function Observer(value) { | ||
@@ -264,3 +266,5 @@ this._emitter = new Component(); | ||
var Conveyer = function (_super) { | ||
var Conveyer = | ||
/*#__PURE__*/ | ||
function (_super) { | ||
__extends(Conveyer, _super); | ||
@@ -467,6 +471,6 @@ /** | ||
size: 0 | ||
}], this.items), [{ | ||
}], this.items, true), [{ | ||
pos: scrollSize, | ||
size: 0 | ||
}]); | ||
}], false); | ||
@@ -482,3 +486,3 @@ var endPos = pos + size; | ||
selectedItem = __spreadArray([], items).reverse().filter(function (item) { | ||
selectedItem = __spreadArray([], items, true).reverse().filter(function (item) { | ||
var itemSize = item.size; | ||
@@ -485,0 +489,0 @@ var dist = item.pos - pos; |
@@ -7,3 +7,3 @@ /* | ||
repository: https://github.com/naver/egjs-conveyer | ||
version: 0.1.0 | ||
version: 1.0.0 | ||
*/ | ||
@@ -83,3 +83,5 @@ import Axes, { PanInput } from '@egjs/axes'; | ||
var Observer = function () { | ||
var Observer = | ||
/*#__PURE__*/ | ||
function () { | ||
function Observer(value) { | ||
@@ -262,3 +264,5 @@ this._emitter = new Component(); | ||
var Conveyer = function (_super) { | ||
var Conveyer = | ||
/*#__PURE__*/ | ||
function (_super) { | ||
__extends(Conveyer, _super); | ||
@@ -465,6 +469,6 @@ /** | ||
size: 0 | ||
}], this.items), [{ | ||
}], this.items, true), [{ | ||
pos: scrollSize, | ||
size: 0 | ||
}]); | ||
}], false); | ||
@@ -480,3 +484,3 @@ var endPos = pos + size; | ||
selectedItem = __spreadArray([], items).reverse().filter(function (item) { | ||
selectedItem = __spreadArray([], items, true).reverse().filter(function (item) { | ||
var itemSize = item.size; | ||
@@ -483,0 +487,0 @@ var dist = item.pos - pos; |
@@ -7,5 +7,5 @@ /* | ||
repository: https://github.com/naver/egjs-conveyer | ||
version: 0.1.0 | ||
version: 1.0.0 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Conveyer=e()}(this,function(){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var s=function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function r(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,n,s):r(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s}function c(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||((i=i||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,i=arguments[e];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function a(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var h="function"!=typeof Object.assign?function(t){if(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(null!=i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign,l=["","webkit","Moz","MS","ms","o"],t="undefined"==typeof document?{style:{}}:document.createElement("div"),f=Math.round,m=Math.abs,g=Date.now;function p(t,e){for(var n,i=e[0].toUpperCase()+e.slice(1),r=0;r<l.length;){if((n=(n=l[r])?n+i:e)in t)return n;r++}}var d="undefined"==typeof window?{}:window,n=p(t.style,"touchAction"),v=void 0!==n;var y="compute",b="manipulation",w="none",_="pan-x",E="pan-y",x=function(){if(!v)return!1;var e={},n=d.CSS&&d.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!n||d.CSS.supports("touch-action",t)}),e}(),T="ontouchstart"in d,P=void 0!==p(d,"PointerEvent"),O=T&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),S="touch",I="mouse",A=1,R=4,D=8,C=24,z=["x","y"],M=["clientX","clientY"];function j(t,e,n){if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(var i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function k(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function H(t,e){return-1<t.indexOf(e)}var Y=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===y&&(t=this.compute()),v&&this.manager.element.style&&x[t]&&(this.manager.element.style[n]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var e=[];return j(this.manager.recognizers,function(t){k(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(t){if(H(t,w))return w;var e=H(t,_),n=H(t,E);return e&&n?w:e||n?e?_:E:H(t,b)?b:"auto"}(e.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=H(i,w)&&!x[w],o=H(i,E)&&!x[E],s=H(i,_)&&!x[_];if(r){var a=1===t.pointers.length,i=t.distance<2,t=t.deltaTime<250;if(a&&i&&t)return}if(!s||!o)return r||o&&6&n||s&&n&C?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function X(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function F(t){var e=t.length;if(1===e)return{x:f(t[0].clientX),y:f(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:f(n/e),y:f(i/e)}}function V(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:f(t.pointers[n].clientX),clientY:f(t.pointers[n].clientY)},n++;return{timeStamp:g(),pointers:e,center:F(e),deltaX:t.deltaX,deltaY:t.deltaY}}function N(t,e,n){var i=e[(n=n||z)[0]]-t[n[0]],n=e[n[1]]-t[n[1]];return Math.sqrt(i*i+n*n)}function L(t,e,n){var i=e[(n=n||z)[0]]-t[n[0]],n=e[n[1]]-t[n[1]];return 180*Math.atan2(n,i)/Math.PI}function q(t,e){return t===e?1:m(t)>=m(e)?t<0?2:4:e<0?8:16}function W(t,e,n){return{x:e/t||0,y:n/t||0}}function U(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=V(e)),1<r&&!n.firstMultiple?n.firstMultiple=V(e):1===r&&(n.firstMultiple=!1);var o,s,a=n.firstInput,u=n.firstMultiple,c=(u||a).center,h=e.center=F(i);e.timeStamp=g(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=L(c,h),e.distance=N(c,h),o=n,r=(s=e).center,a=o.offsetDelta||{},c=o.prevDelta||{},h=o.prevInput||{},s.eventType!==A&&h.eventType!==R||(c=o.prevDelta={x:h.deltaX||0,y:h.deltaY||0},a=o.offsetDelta={x:r.x,y:r.y}),s.deltaX=c.x+(r.x-a.x),s.deltaY=c.y+(r.y-a.y),e.offsetDirection=q(e.deltaX,e.deltaY);var l,f,p,d,a=W(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=a.x,e.overallVelocityY=a.y,e.overallVelocity=m(a.x)>m(a.y)?a.x:a.y,e.scale=u?(a=u.pointers,N(i[0],i[1],M)/N(a[0],a[1],M)):1,e.rotation=u?(d=u.pointers,L(i[1],i[0],M)+L(d[1],d[0],M)):0,e.maxPointers=!n.prevInput||e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers,u=e,d=(i=n).lastInterval||u,n=u.timeStamp-d.timeStamp,u.eventType!==D&&(25<n||void 0===d.velocity)?(l=(p=W(n,n=u.deltaX-d.deltaX,v=u.deltaY-d.deltaY)).x,f=p.y,p=m(p.x)>m(p.y)?p.x:p.y,v=q(n,v),i.lastInterval=u):(p=d.velocity,l=d.velocityX,f=d.velocityY,v=d.direction),u.velocity=p,u.velocityX=l,u.velocityY=f,u.direction=v;var v=t.element,t=e.srcEvent,t=t.composedPath?t.composedPath()[0]:t.path?t.path[0]:t.target;X(t,v)&&(v=t),e.target=v}function B(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&A&&i-r==0,r=e&(R|D)&&i-r==0;n.isFirst=!!o,n.isFinal=!!r,o&&(t.session={}),n.eventType=e,U(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function G(t){return t.trim().split(/\s+/g)}function Q(e,t,n){j(G(t),function(t){e.addEventListener(t,n,!1)})}function Z(e,t,n){j(G(t),function(t){e.removeEventListener(t,n,!1)})}function J(t){t=t.ownerDocument||t;return t.defaultView||t.parentWindow||window}var e=function(){function t(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){k(e.options.enable,[e])&&n.handler(t)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Q(this.element,this.evEl,this.domHandler),this.evTarget&&Q(this.target,this.evTarget,this.domHandler),this.evWin&&Q(J(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Z(this.element,this.evEl,this.domHandler),this.evTarget&&Z(this.target,this.evTarget,this.domHandler),this.evWin&&Z(J(this.element),this.evWin,this.domHandler)},t}();function K(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}var $={pointerdown:A,pointermove:2,pointerup:R,pointercancel:D,pointerout:D},tt={2:S,3:"pen",4:I,5:"kinect"},et="pointerdown",nt="pointermove pointerup pointercancel";d.MSPointerEvent&&!d.PointerEvent&&(et="MSPointerDown",nt="MSPointerMove MSPointerUp MSPointerCancel");var it=function(e){function n(){var t=n.prototype;return t.evEl=et,t.evWin=nt,(t=e.apply(this,arguments)||this).store=t.manager.session.pointerEvents=[],t}return a(n,e),n.prototype.handler=function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=$[i],o=tt[t.pointerType]||t.pointerType,s=o===S,i=K(e,t.pointerId,"pointerId");r&A&&(0===t.button||s)?i<0&&(e.push(t),i=e.length-1):r&(R|D)&&(n=!0),i<0||(e[i]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(i,1))},n}(e);function rt(t){return Array.prototype.slice.call(t,0)}var ot={touchstart:A,touchmove:2,touchend:R,touchcancel:D},st=function(e){function n(){var t;return n.prototype.evTarget="touchstart touchmove touchend touchcancel",(t=e.apply(this,arguments)||this).targetIds={},t}return a(n,e),n.prototype.handler=function(t){var e=ot[t.type],n=function(t,e){var n,i,r=rt(t.touches),o=this.targetIds;if(e&(2|A)&&1===r.length)return o[r[0].identifier]=!0,[r,r];var s=rt(t.changedTouches),a=[],u=this.target;if(i=r.filter(function(t){return X(t.target,u)}),e===A)for(n=0;n<i.length;)o[i[n].identifier]=!0,n++;n=0;for(;n<s.length;)o[s[n].identifier]&&a.push(s[n]),e&(R|D)&&delete o[s[n].identifier],n++;if(a.length)return[function(t,n,e){for(var i=[],r=[],o=0;o<t.length;){var s=n?t[o][n]:t[o];K(r,s)<0&&i.push(t[o]),r[o]=s,o++}return i=e?n?i.sort(function(t,e){return t[n]>e[n]}):i.sort():i}(i.concat(a),"identifier",!0),a]}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:S,srcEvent:t})},n}(e);var at={mousedown:A,mousemove:2,mouseup:R},ut=function(e){function n(){var t=n.prototype;return t.evEl="mousedown",t.evWin="mousemove mouseup",(t=e.apply(this,arguments)||this).pressed=!1,t}return a(n,e),n.prototype.handler=function(t){var e=at[t.type];e&A&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=R),this.pressed&&(e&R&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:I,srcEvent:t}))},n}(e),ct=2500,ht=25;function lt(t){var e,n,t=t.changedPointers[0];t.identifier===this.primaryTouch&&(e={x:t.clientX,y:t.clientY},n=this.lastTouches,this.lastTouches.push(e),setTimeout(function(){var t=n.indexOf(e);-1<t&&n.splice(t,1)},ct))}var ft=function(){return function(n){function t(t,e){var o=n.call(this,t,e)||this;return o.handler=function(t,e,n){var i=n.pointerType===S,r=n.pointerType===I;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)!function(t,e){t&A?(this.primaryTouch=e.changedPointers[0].identifier,lt.call(this,e)):t&(R|D)&<.call(this,e)}.call(u(u(o)),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),r=Math.abs(n-r.y);if(o<=ht&&r<=ht)return!0}return!1}.call(u(u(o)),n))return;o.callback(t,e,n)}},o.touch=new st(o.manager,o.handler),o.mouse=new ut(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return a(t,n),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(e)}();function pt(t,e,n){return Array.isArray(t)&&(j(t,n[e],n),1)}var dt=1;function vt(t,e){e=e.manager;return e?e.get(t):t}function mt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var gt=function(){function t(t){this.options=o({enable:!0},t=void 0===t?{}:t),this.id=dt++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return h(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(pt(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=vt(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},e.dropRecognizeWith=function(t){return pt(t,"dropRecognizeWith",this)||(t=vt(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(pt(t,"requireFailure",this))return this;var e=this.requireFail;return-1===K(e,t=vt(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(pt(t,"dropRequireFailure",this))return this;t=vt(t,this);t=K(this.requireFail,t);return-1<t&&this.requireFail.splice(t,1),this},e.hasRequireFailures=function(){return 0<this.requireFail.length},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(e){var n=this,t=this.state;function i(t){n.manager.emit(t,e)}t<8&&i(n.options.event+mt(t)),i(n.options.event),e.additionalEvent&&i(e.additionalEvent),8<=t&&i(n.options.event+mt(t))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){t=h({},t);if(!k(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),yt=function(e){function t(t){return e.call(this,o({pointers:1},t=void 0===t?{}:t))||this}a(t,e);var n=t.prototype;return n.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},n.process=function(t){var e=this.state,n=t.eventType,i=6&e,t=this.attrTest(t);return i&&(n&D||!t)?16|e:i||t?n&R?8|e:2&e?4|e:2:32},t}(gt);var bt=function(n){function t(t){return(t=n.call(this,o({event:"pan",threshold:10,pointers:1,direction:30},t=void 0===t?{}:t))||this).pX=null,t.pY=null,t}a(t,n);var e=t.prototype;return e.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(E),t&C&&e.push(_),e},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||(i=6&e.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,Math.abs(t.deltaX)):(r=0===s?1:s<0?8:16,n=s!==this.pY,Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},e.attrTest=function(t){return yt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},e.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e,e=16===(e=t.direction)?"down":8===e?"up":2===e?"left":4===e?"right":"";e&&(t.additionalEvent=this.options.event+e),n.prototype.emit.call(this,t)},t}(yt),wt={domEvents:!1,touchAction:y,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function _t(n,i){var r,o=n.element;o.style&&(j(n.options.cssProps,function(t,e){r=p(o.style,e),i?(n.oldCssProps[r]=o.style[r],o.style[r]=t):o.style[r]=n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}var Et=function(){function t(t,e){var n=this;this.options=h({},wt,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((t=this).options.inputClass||(P?it:O?st:T?ft:ut))(t,B),this.touchAction=new Y(this,this.options.touchAction),_t(this,!0),j(this.options.recognizers,function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;return e.set=function(t){return h(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e,n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var i=this.recognizers,r=n.curRecognizer;(!r||8&r.state)&&(r=n.curRecognizer=null);for(var o=0;o<i.length;)e=i[o],2===n.stopped||r&&e!==r&&!e.canRecognizeWith(r)?e.reset():e.recognize(t),!r&&14&e.state&&(r=n.curRecognizer=e),o++}},e.get=function(t){if(t instanceof gt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event===t)return e[n];return null},e.add=function(t){if(pt(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),(t.manager=this).touchAction.update(),t},e.remove=function(t){if(pt(t,"remove",this))return this;var e=this.get(t);return!t||-1!==(e=K(t=this.recognizers,e))&&(t.splice(e,1),this.touchAction.update()),this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return j(G(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this},e.off=function(t,e){if(void 0===t)return this;var n=this.handlers;return j(G(t),function(t){e?n[t]&&n[t].splice(K(n[t],e),1):delete n[t]}),this},e.emit=function(t,e){var n,i,r;this.options.domEvents&&(n=t,i=e,(r=document.createEvent("Event")).initEvent(n,!0,!0),(r.gesture=i).target.dispatchEvent(r));var o=this.handlers[t]&&this.handlers[t].slice();if(o&&o.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var s=0;s<o.length;)o[s](e),s++}},e.destroy=function(){this.element&&_t(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}();function xt(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return!0;return!1}function Tt(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return t[i];return null}function Pt(t,e){try{return new RegExp(t,"g").exec(e)}catch(t){return null}}function Ot(t){return t.replace(/_/g,".")}function St(t,n){var i=null,r="-1";return xt(t,function(t){var e=Pt("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);return e&&!t.brand&&(i=t,r=e[3]||"-1",t.versionAlias?r=t.versionAlias:t.versionTest&&(t=t.versionTest.toLowerCase(),r=((t=Pt("("+t+")((?:\\/|\\s|:)([0-9|\\.|_]+))",t=n))?t[3]:"")||r),r=Ot(r),1)}),{preset:i,version:r}}function It(t,n){var i={brand:"",version:"-1"};return xt(t,function(t){var e=At(n,t);return e&&(i.brand=t.id,i.version=t.versionAlias||e.version,"-1"!==i.version)}),i}function At(t,e){return Tt(t,function(t){t=t.brand;return Pt(""+e.test,t.toLowerCase())})}var Rt=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],Dt=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],Ct=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],zt=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Mt=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"mac os x",id:"mac"},{test:"android",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function jt(t){var e=function(t){if(void 0===t){if("undefined"==typeof navigator||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}(t),n=!!/mobi/g.exec(e),i={name:"unknown",version:"-1",majorVersion:-1,webview:!!St(zt,e).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=St(Rt,e),s=o.preset,a=o.version,u=St(Mt,e),t=u.preset,o=u.version,u=St(Dt,e);return i.chromium=!!u.preset,i.chromiumVersion=u.version,i.chromium||(e=St(Ct,e),i.webkit=!!e.preset,i.webkitVersion=e.version),t&&(r.name=t.id,r.version=o,r.majorVersion=parseInt(o,10)),s&&(i.name=s.id,i.version=a,i.webview&&"ios"===r.name&&"safari"!==i.name&&(i.webview=!1)),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:n,isHints:!1}}function kt(t){return void 0===t}var Ht=function(){function t(){this.options={},this._eventHandler={}}var e=t.prototype;return e.trigger=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!(0<(s=this._eventHandler[t]||[]).length))return!0;var r=n[0]||{},o=n.slice(1),s=s.concat(),a=!1;r.eventType=t,r.stop=function(){a=!0},r.currentTarget=this;var u=[r];return 1<=o.length&&(u=u.concat(o)),s.forEach(function(t){t.apply(e,u)}),!a},e.once=function(n,i){var r,o=this;if("object"==typeof n&&kt(i)){var t,e=n;for(t in e)this.once(t,e[t]);return this}return"string"==typeof n&&"function"==typeof i&&this.on(n,r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(o,t),o.off(n,r)}),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&kt(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(kt(r=this._eventHandler[t])&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),this},e.off=function(t,e){var n,i;if(kt(t))return this._eventHandler={},this;if(kt(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[t];if(s){var a=0;try{for(var u=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1);break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="2.2.2",t}(),Yt=function(t,e){return(Yt=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])})(t,e)};var Xt=function(){return(Xt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function Ft(t,e,n,i){var e=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],r=Math.max(e[0],t);return Math.min(e[1],r)}function Vt(t,e){return t<e[0]||t>e[1]}function Nt(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function Lt(t,e,n){var i=t,r=e[0],o=e[1],e=o-r;return n[1]&&o<t&&(i=(i-o)%e+r),i=n[0]&&t<r?(i-r)%e+o:i}function qt(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var Wt,Ut,Bt,Gt=(Wt="undefined"==typeof window?{navigator:{userAgent:""}}:window).requestAnimationFrame||Wt.webkitRequestAnimationFrame,Qt=Wt.cancelAnimationFrame||Wt.webkitCancelAnimationFrame;function Zt(t,e){var n,i={};for(n in t)n&&(i[n]=e(t[n],n));return i}function Jt(t,e){var n,i={};for(n in t)n&&e(t[n],n)&&(i[n]=t[n]);return i}function Kt(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function $t(t,n){return Kt(t,function(t,e){return t===n[e]})}Gt&&!Qt?(Ut={},Bt=Gt,Gt=function(e){var n=Bt(function(t){Ut[n]&&e(t)});return Ut[n]=!0,n},Qt=function(t){delete Ut[t]}):Gt&&Qt||(Gt=function(t){return Wt.setTimeout(function(){t(Wt.performance&&Wt.performance.now&&Wt.performance.now()||(new Date).getTime())},16)},Qt=Wt.clearTimeout);var te={};function ee(t,e){var n,i;return te[e]||(te[e]=(i=(n=e)<1?Math.pow(10,ie(n)):1,function(t){return 0===n?0:Math.round(Math.round(t/n)*n*i)/i})),te[e](t)}function ne(t,n){if(!t||!n)return t;var i="number"==typeof n;return Zt(t,function(t,e){return ee(t,i?n:n[e])})}function ie(t){if(!isFinite(t))return 0;var e=t+"";if(0<=e.indexOf("e")){for(var n=0,i=1;Math.round(t*i)/i!==t;)i*=10,n++;return n}return 0<=e.indexOf(".")?e.length-e.indexOf(".")-1:0}function re(t,e,n){return Math.max(Math.min(t,n),e)}var oe,se=function(){function t(t){var e=t.options,n=t.itm,i=t.em,t=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=t,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(n,t,e){var i,r=this;return re(void 0!==e?e:(i=Zt(t,function(t,e){return t=Math.abs(t-n[e]),e=r.options.deceleration,(e=Math.sqrt(t/e*2))<100?0:e}),Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)),this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,t=n&&n.event||null;return{depaPos:i,destPos:r,duration:re(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:t,input:n&&n.input||null,isTrusted:!!t,done:this.animationEnd}},e.grab=function(t,e){var n;this._animateParam&&t.length&&(n=this.axm.get(t),Kt(t=this.axm.map(n,function(t,e){return Lt(t,e.range,e.circular)}),function(t,e){return n[e]===t})||this.em.triggerChange(t,!1,n,e,!!e),this._animateParam=null,this._raf&&(t=this._raf,Qt(t)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event)))},e.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},e.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e){return Math.min(e.range[1],Math.max(e.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e){return Nt(t,e.range,e.circular)});0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e){return Lt(t,e.range,e.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.finish(!!t)},e.finish=function(t){this._animateParam=null,this.itm.setInterrupt(!1),this.em.triggerFinish(t)},e.animateLoop=function(s,a){var u,c,h,l,f,p,d,v;s.duration?(this._animateParam=Xt({},s),u=this._animateParam,c=this,h=u.destPos,l=u.depaPos,f=0,p=Zt(l,function(t,e){return t<=h[e]?1:-1}),d=Zt(h,function(t){return t}),v=(new Date).getTime(),u.startTime=v,function t(){c._raf=null;var e=(new Date).getTime(),r=(e-u.startTime)/s.duration,o=c.easing(r),n=c.axm.map(l,function(t,e,n){var i=1<=r?h[n]:t+u.delta[n]*(o-f),t=Lt(i,e.range,e.circular);return i!==t&&(e=p[n]*(e.range[1]-e.range[0]),h[n]-=e,l[n]-=e),t}),i=!c.em.triggerChange(n,!1,l);l=n,v=e,1<=(f=o)?($t(h=c.getFinalPos(h,d),c.axm.get(Object.keys(h)))||c.em.triggerChange(h,!0,l),a()):i?c.finish(!1):c._raf=Gt(t)}()):(this.em.triggerChange(s.destPos,!0),a())},e.getFinalPos=function(t,n){var i=this;return Zt(t,function(t,e){return t>=n[e]-1e-6&&t<=n[e]+1e-6?n[e]:ee(t,i.getRoundUnit(t,e))})},e.getRoundUnit=function(t,e){var n=this.options.round,i=null;return n||(e=this.axm.getAxisOptions(e),t=Math.max(ie(e.range[0]),ie(e.range[1]),ie(t)),i=1/Math.pow(10,t)),i||n},e.getUserControll=function(t){t=t.setTo();return t.destPos=this.axm.get(t.destPos),t.duration=re(t.duration,this.options.minimumDuration,this.options.maximumDuration),t},e.animateTo=function(t,e,n){var i=this,r=this.createAnimationParam(t,e,n),t=Xt({},r.depaPos),e=this.em.triggerAnimationStart(r),r=this.getUserControll(r);!e&&this.axm.every(r.destPos,function(t,e){return Nt(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),e&&!$t(r.destPos,t)&&(e=n&&n.event||null,this.animateLoop({depaPos:t,destPos:r.destPos,duration:r.duration,delta:this.axm.getDelta(t,r.destPos),isTrusted:!!e,inputEvent:e,input:n&&n.input||null},function(){return i.animationEnd()}))},e.easing=function(t){return 1<t?1:this.options.easing(t)},e.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if($t(t,i))return this;this.itm.setInterrupt(!0);t=Jt(t,function(t,e){return i[e]!==t});return Object.keys(t).length&&($t(t=this.axm.map(t,function(t,e){var n=e.range,e=e.circular;return e&&(e[0]||e[1])?t:Ft(t,n,e)}),i)||(0<e?this.animateTo(t,e):(this.em.triggerChange(t),this.finish(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(Zt(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),ae=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){t=this.getRoundPos(t).roundPos;this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){var e=this.getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;t.destPos=n,t.depaPos=e,t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n,i,r){void 0===r&&(r=!1);var o=this.am,s=o.axm,o=o.getEventInfo(),t=this.getRoundPos(t,n),n=t.roundPos,t=t.roundDepa,n=s.moveTo(n,t),t=i&&i.event||o&&o.event||null,o={pos:n.pos,delta:n.delta,holding:r,inputEvent:t,isTrusted:!!t,input:i&&i.input||o&&o.input||null,set:t?this.createUserControll(n.pos):function(){}},n=this.axes.trigger("change",o);return t&&s.set(o.set().destPos),n},e.triggerAnimationStart=function(t){var e=this.getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;return t.destPos=n,t.depaPos=e,t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){this.axes.trigger("animationEnd",{isTrusted:t=void 0===t?!1:t})},e.triggerFinish=function(t){this.axes.trigger("finish",{isTrusted:t=void 0===t?!1:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:Xt({},t),duration:e};return function(t,e){return t&&(n.destPos=Xt({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},e.getRoundPos=function(t,e){var n=this.axes.options.round;return{roundPos:ne(t,n),roundDepa:ne(e,n)}},t}(),ue=function(){function t(t){this.options=t,this._prevented=!1}var e=t.prototype;return e.isInterrupting=function(){return this.options.interruptable||this._prevented},e.isInterrupted=function(){return!this.options.interruptable&&this._prevented},e.setInterrupt=function(t){this.options.interruptable||(this._prevented=t)},t}(),ce=function(){function t(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},{})}var e=t.prototype;return e._complementOptions=function(){var r=this;Object.keys(this.axis).forEach(function(i){r.axis[i]=Xt({range:[0,100],bounce:[0,0],circular:[!1,!1]},r.axis[i]),["bounce","circular"].forEach(function(t){var e=r.axis,n=e[i][t];/string|number|boolean/.test(typeof n)&&(e[i][t]=[n,n])})})},e.getDelta=function(t,e){var n=this.get(t);return Zt(this.get(e),function(t,e){return t-n[e]})},e.get=function(t){var n=this;return t&&Array.isArray(t)?t.reduce(function(t,e){return e&&e in n._pos&&(t[e]=n._pos[e]),t},{}):Xt(Xt({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=Zt(this._pos,function(t,e){return e in n&&e in i?n[e]-i[e]:0});return this.set(this.map(n,function(t,e){return e?Lt(t,e.range,e.circular):0})),{pos:Xt({},this._pos),delta:t}},e.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},e.every=function(t,n){var i=this.axis;return Kt(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this.axis;return Jt(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this.axis;return Zt(t,function(t,e){return n(t,i[e],e)})},e.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e){return!Vt(t,e.range)})},e.getAxisOptions=function(t){return this.axis[t]},t}(),he=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,t=t.am;this.isOutside=!1,this.moveDistance=null,this.isStopped=!1,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=t}var e=t.prototype;return e.atOutside=function(t){var o=this;if(this.isOutside)return this.axm.map(t,function(t,e){var n=e.range[0]-e.bounce[0],e=e.range[1]+e.bounce[1];return e<t?e:t<n?n:t});var s=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,e){var n=e.range[0],i=e.range[1],r=e.bounce,e=e.circular;return e&&(e[0]||e[1])?t:t<n?n-o.am.easing((n-t)/(r[0]*s))*r[0]:i<t?i+o.am.easing((t-i)/(r[1]*s))*r[1]:t})},e.get=function(t){return this.axm.get(t.axes)},e.hold=function(t,e){!this.itm.isInterrupted()&&t.axes.length&&(this.isStopped=!(e={input:t,event:e}),this.itm.setInterrupt(!0),this.am.grab(t.axes,e),this.moveDistance||this.em.triggerHold(this.axm.get(),e),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes))},e.change=function(t,e,n){var i,r;this.isStopped||!this.itm.isInterrupting()||this.axm.every(n,function(t){return 0===t})||(r=Zt(i=this.moveDistance||this.axm.get(t.axes),function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=r),this.isOutside&&this.axm.every(i,function(t,e){return!Vt(t,e.range)})&&(this.isOutside=!1),i=this.atOutside(i),r=this.atOutside(r),this.em.triggerChange(r,!1,i,{input:t,event:e},!0)||(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1)))},e.release=function(t,e,n,i){var r,o;!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance&&(r=this.axm.get(t.axes),o=this.axm.get(),n=this.axm.get(this.axm.map(n,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?r[n]+t:Ft(r[n]+t,e.range,e.circular,e.bounce)})),n={depaPos:o,destPos:n=0===(i=this.am.getDuration(n,r,i))?Xt({},o):n,duration:i,delta:this.axm.getDelta(o,n),inputEvent:e,input:t,isTrusted:!0},this.em.triggerRelease(n),this.moveDistance=null,t={input:t,event:e},(n=$t((e=this.am.getUserControll(n)).destPos,o))||0===e.duration?(n||this.em.triggerChange(e.destPos,!1,o,t,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(t):this.em.triggerFinish(!0)):this.am.animateTo(e.destPos,e.duration,t))},t}(),le="ontouchstart"in Wt&&"safari"===(void 0===oe&&function(){if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData){var t=navigator.userAgentData,t=t.brands||t.uaList;return t&&t.length}}()?function(t){var e=((r=navigator.userAgentData).uaList||r.brands).slice(),n=r.mobile||!1,i={name:(s=e[0]).brand,version:s.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!It(zt,e).brand},r={name:"unknown",version:"-1",majorVersion:-1};i.webkit=!i.chromium&&xt(Ct,function(t){return At(e,t)});var o,s=It(Dt,e);i.chromium=!!s.brand,i.chromiumVersion=s.version,i.chromium||(s=It(Ct,e),i.webkit=!!s.brand,i.webkitVersion=s.version),t&&(o=t.platform.toLowerCase(),a=Tt(Mt,function(t){return new RegExp(""+t.test,"g").exec(o)}),r.name=a?a.id:o,r.version=t.platformVersion);var a=It(Rt,e);return a.brand&&(i.name=a.brand,i.version=t?t.uaFullVersion:a.version),"Linux armv8l"===navigator.platform?r.name="android":i.webkit&&(r.name=n?"ios":"mac"),"ios"===r.name&&i.webview&&(i.version="-1"),r.version=Ot(r.version),i.version=Ot(i.version),r.majorVersion=parseInt(r.version,10),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:n,isHints:!0}}():jt(oe)).browser.name,fe=function(){if("undefined"==typeof document)return"";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""}(),pe=function(r){function t(){this.constructor=e}var e;function n(t,e,n){void 0===t&&(t={}),void 0===e&&(e={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=Xt({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null},e),i.itm=new ue(i.options),i.axm=new ce(i.axis,i.options),i.em=new ae(i),i.am=new se(i),i.io=new he(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}Yt(e=n,i=r),e.prototype=null===i?Object.create(i):(t.prototype=i.prototype,new t);var i=n.prototype;return i.connect=function(t,e){var n="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e&&((t=this._inputs.filter(function(t){return t.hammer&&t.element===e.element})).length&&(e.hammer=t[0].hammer)),e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},i.disconnect=function(t){return t?0<=(t=this._inputs.indexOf(t))&&(this._inputs[t].disconnect(),this._inputs.splice(t,1)):(this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[]),this},i.get=function(t){return this.axm.get(t)},i.setTo=function(t,e){return this.am.setTo(t,e=void 0===e?0:e),this},i.setBy=function(t,e){return this.am.setBy(t,e=void 0===e?0:e),this},i.isBounceArea=function(t){return this.axm.isOutside(t)},i.destroy=function(){this.disconnect(),this.em.destroy()},n.VERSION="2.8.0",n.TRANSFORM=fe,n.DIRECTION_NONE=1,n.DIRECTION_LEFT=2,n.DIRECTION_RIGHT=4,n.DIRECTION_UP=8,n.DIRECTION_DOWN=16,n.DIRECTION_HORIZONTAL=6,n.DIRECTION_VERTICAL=C,n.DIRECTION_ALL=30,n}(Ht),de="PointerEvent"in Wt||"MSPointerEvent"in Wt,ve="ontouchstart"in Wt,me="_EGJS_AXES_INPUTTYPE_";function ge(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function ye(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}var be=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,this.isRightEdge=!1,this.rightEdgeTimer=0,this.panFlag=!1,void 0===Et)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=function e(t,n){var i;return void 0===n&&(n=!1),"string"==typeof t?(i=t.match(/^<([a-z]+)\s*([^>]*)>/)?((i=document.createElement("div")).innerHTML=t,qt(i.childNodes)):qt(document.querySelectorAll(t)),n||(i=1<=i.length?i[0]:void 0)):t===Wt||t.nodeName&&(1===t.nodeType||9===t.nodeType)?i=t:"jQuery"in Wt&&t instanceof jQuery||t.constructor.prototype.jquery?i=n?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return e(t)}),n||(i=1<=i.length?i[0]:void 0)),i}(t),this.options=Xt({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,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)}var e=t.prototype;return e.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?30:e?6:n?C:1,this.axes=t},e.connect=function(t){var e,n,i,r={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var o=(o=this.element[me])||String(Math.round(Math.random()*(new Date).getTime())),s=(s=this.options.inputType,i=n=e=!1,(s=void 0===s?[]:s).forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=ve;break;case"pointer":i=de}}),i?it:e&&n?ft:e?st:n?ut:null);if(!s)throw new Error("Wrong inputType parameter!");this.hammer=function(t,e){try{return new Et(t,Xt({},e))}catch(t){return null}}(this.element,Xt({inputClass:s},this.options.hammerManagerOptions)),this.element[me]=o}return this.panRecognizer=new bt(r),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=1,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[me],this.element=null,this.hammer=null},e.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},e.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},e.onHammerInput=function(t){var e;this.isEnable()&&(t.isFirst?(this.panFlag=!1)!==t.srcEvent.cancelable&&(e=this.options.iOSEdgeSwipeThreshold,this.observer.hold(this,t),this.isRightEdge=le&&t.center.x>window.innerWidth-e,this.panFlag=!0):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=this;if(this.panFlag){var n,i=this.options,r=i.iOSEdgeSwipeThreshold,o=i.releaseOnScroll,i=(n=t.angle,(i=this.options.thresholdAngle)<0||90<i?1:(n=Math.abs(n),i<n&&n<180-i?C:6)),s=this.hammer.session.prevInput;if(!o||t.srcEvent.cancelable){if(s&&le){if(t.center.x<0)return void this.onPanend(Xt(Xt({},s),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}));this.isRightEdge&&(clearTimeout(this.rightEdgeTimer),t.deltaX<-r?this.isRightEdge=!1:this.rightEdgeTimer=window.setTimeout(function(){e.onPanend(Xt(Xt({},s),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))},100))}s?(t.offsetX=t.deltaX-s.deltaX,t.offsetY=t.deltaY-s.deltaY):(t.offsetX=0,t.offsetY=0);o=this.getOffset([t.offsetX,t.offsetY],[ye(6,this._direction,i),ye(C,this._direction,i)]),r=o.some(function(t){return 0!==t});r&&(!1!==(i=t.srcEvent).cancelable&&i.preventDefault(),i.stopPropagation()),(t.preventSystemEvent=r)&&this.observer.change(this,t,ge(this.axes,o))}else this.onPanend(Xt(Xt({},t),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}},e.onPanend=function(t){var e,n,i,r;this.panFlag&&(clearTimeout(this.rightEdgeTimer),this.panFlag=!1,e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[ye(6,this._direction),ye(C,this._direction)]),n=e,i=this.observer.options.deceleration,r=Math.sqrt(n[0]*n[0]+n[1]*n[1]),i=Math.abs(r/-i),e=[n[0]/2*i,n[1]/2*i],this.observer.release(this,t,ge(this.axes,e)))},e.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},e.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},e.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},t}();function we(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _e(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[e]));return t}function Ee(t){return void 0===t}var xe=function(){function t(t,e){var n,i;if(this.eventType=t,this._canceled=!1,e)try{for(var r=we(Object.keys(e)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=e[s]}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}}var e=t.prototype;return e.stop=function(){this._canceled=!0},e.isCanceled=function(){return this._canceled},t}(),Te=function(){function t(){this._eventHandler={}}var e=t.prototype;return e.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof xe?e.eventType:e,i=_e(this._eventHandler[i]||[]);return i.length<=0||(e instanceof xe?(e.currentTarget=this,i.forEach(function(t){t(e)})):i.forEach(function(t){t.apply(void 0,_e(n))})),this},e.once=function(n,i){var r,o=this;if("object"==typeof n&&Ee(i)){var t,e=n;for(t in e)this.once(t,e[t]);return this}return"string"==typeof n&&"function"==typeof i&&this.on(n,r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(void 0,_e(t)),o.off(n,r)}),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&Ee(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],Ee(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),this},e.off=function(t,e){var n,i;if(Ee(t))return this._eventHandler={},this;if(Ee(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[t];if(s){var a=0;try{for(var u=we(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1),s.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="3.0.1",t}(),Pe="__observers__",Oe=(He=Se.prototype,Object.defineProperty(He,"current",{get:function(){return this._current},set:function(t){var e=t!==this._current;this._current=t,e&&this._emitter.trigger("update",t)},enumerable:!1,configurable:!0}),He.subscribe=function(t){this._emitter.on("update",t)},He.unsubscribe=function(t){this._emitter.off("update",t)},Se);function Se(t){this._emitter=new Te,this._current=t}function Ie(t){return Object.keys(t)}function Ae(t){return t[Pe]||(t[Pe]={}),t[Pe]}function Re(t,e,n){t=Ae(t);return t[e]||(t[e]=new Oe(n)),t[e]}function De(i){return function(t,e){var n=i||e;Object.defineProperty(t,e,{get:function(){return Re(this,n).current},set:function(t){Re(this,n,t).current=t}}),n!==e&&Object.defineProperty(t,n,{get:function(){return Re(this,n).current}})}}function Ce(t){t=t.prototype;t.subscribe=function(t,e){t in this&&Re(this,t).subscribe(e)},t.unsubscribe=function(t,e){var n=this;t?t in this&&Re(this,t).unsubscribe(e):Ie(Ae(this)).forEach(function(t){n.unsubscribe(t)})}}function ze(t){return"string"==typeof t}var Me,je=function(n){function t(t,e){void 0===e&&(e={});var i=n.call(this)||this;return i.items=[],i.pos=0,i.size=0,i.scrollSize=0,i._scrollTimer=0,i._isDragScroll=!1,i._isAnimation=!1,i._isReachStart=!1,i._isReachEnd=!1,i.update=function(){i.updateItems(),i.updateContainer()},i._onScroll=function(t){t&&i._debounceScroll(),i._refreshScroll();var e=i.size,n=i.scrollSize,t=i.pos;t<=0&&!0!==i.isReachStart?(i._isReachStart=!0,i.trigger("reachStart")):0<t&&!1!==i.isReachStart&&(i._isReachStart=!1,i.trigger("leaveStart")),n-e<=t&&!0!==i.isReachEnd?(i._isReachEnd=!0,i.trigger("reachEnd")):t<n-e&&!1!==i.isReachEnd&&(i._isReachEnd=!1,i.trigger("leaveEnd"))},i._onPreventClick=function(t){t.stopPropagation(),t.preventDefault(),i._enableClick()},i.options=s({horizontal:!0,useDrag:!0,autoInit:!0,scrollDebounce:100},e),i._scrollArea=t,i.options.autoInit&&i.init(),i}!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(t,n);var e=t.prototype;return e.findElement=function(t,e){return(null===(e=this.findItem(t,e=void 0===e?{}:e))||void 0===e?void 0:e.element)||null},e.findItem=function(t,e){var n,i=this.pos,r=this.scrollSize,o=this.size,s=null!==(a=null==(e=void 0===e?{}:e)?void 0:e.hitTest)&&void 0!==a?a:1,a=c(c([{pos:0,size:0}],this.items),[{pos:r,size:0}]),u=i+o,e=e.sibling;if("start"===t){if(i<=0)return null;n=c([],a).reverse().filter(function(t){var e=t.size,n=t.pos-i,t=n+e;return 0<=n||0<=t&&(!e||Math.abs(t)/e>=s)}).reverse()[0]}else if("end"===t){if(r-o<=i)return null;n=a.filter(function(t){var e=t.size,n=t.pos+e-u,t=n-e;return n<=0||t<=0&&(!e||Math.abs(t)/e>=s)}).reverse()[0]}else if("next"===t)n=a.reverse().filter(function(t){var e=t.size,n=t.pos-i;return 0<t.pos+e-u&&0<n&&(!e||Math.abs(n)/e>=1-s)}).reverse()[0];else{if("prev"!==t)return this._getItem(t);n=a.filter(function(t){var e=t.size,n=t.pos-i,t=t.pos+e-u;return n<0&&t<0&&(!e||Math.abs(n)/e>=1-s)}).reverse()[0]}if(e&&n){t=a.indexOf(n);return a[t+e]||null}return n||null},e.scrollIntoView=function(t,e){if(r=this.findItem(t,e=void 0===e?{}:e)){var n=e.duration||0,i=this._getNextScrollPos(r,e);if(ze(t)&&e.excludeStand&&i===this.pos){var r,o=this.items.indexOf(r);if(-1===o)return;if(!(r=this.items[o+("start"===t||"prev"===t?-1:1)]))return;i=this._getNextScrollPos(r,e)}this.scrollBy(i-this.pos,n)}},e.scrollBy=function(t,e){this.axes.setBy({scroll:-t},e=void 0===e?0:e)},e.scrollTo=function(t,e){this.axes.setBy({scroll:this.pos-t},e=void 0===e?0:e)},e.setItems=function(t){this.items=t},e.updateItems=function(){var e=this,t=this.scrollAreaElement,n=this.options.itemSelector,t=[].slice.call(n?t.querySelectorAll(n):t.children);this.setItems(t.map(function(t){return e._getItem(t)}))},e.updateContainer=function(){var t=this.scrollAreaElement,e=this.options.horizontal;this.size=e?t.clientWidth:t.clientHeight,this.scrollSize=e?t.scrollWidth:t.scrollHeight,this._refreshScroll(),this._onScroll()},e.init=function(){var t,n,e,i,r,o=this;this.axes||(ze(t=this._scrollArea)?i=document.querySelector(t):t instanceof Element?i=t:("value"in t||"current"in t)&&(i=t.value||t.current),this.scrollAreaElement=i,n=!1,e=this.scrollAreaElement,i=new pe({scroll:{circular:!0,range:[-1e3,1e3]}},{deceleration:.005,round:1}),r=!1,i.on({hold:function(t){n=!(r=!0);var e=t.inputEvent.srcEvent;e&&((t=o.options).preventDefault&&e.preventDefault(),t.preventClickOnDrag&&o._disableClick())},change:function(t){t.inputEvent&&!r||(o._isDragScroll=!!t.inputEvent,o._isAnimation=!!r,n=!0,t=t.delta.scroll,o.options.horizontal?e.scrollLeft-=t:e.scrollTop-=t)},release:function(t){n||(t.setTo(s({},t.depaPos),0),o._enableClick()),n=!1}}),this.axes=i,this.options.useDrag&&i.connect(this.options.horizontal?"scroll":["","scroll"],new be(e,{inputType:["mouse"]})),e.addEventListener("scroll",this._onScroll),window.addEventListener("resize",this.update),this.update())},e.destroy=function(){var t;null!==(t=this.axes)&&void 0!==t&&t.destroy(),this.unsubscribe(),null!==(t=this.scrollAreaElement)&&void 0!==t&&t.removeEventListener("scroll",this._onScroll),window.removeEventListener("resize",this.update),this.off()},e._refreshScroll=function(){var t=this.options.horizontal,e=this.scrollAreaElement;this.pos=t?e.scrollLeft:e.scrollTop},e._getItem=function(t){var e=this.options.horizontal;return{element:t,pos:e?t.offsetLeft:t.offsetTop,size:e?t.offsetWidth:t.offsetHeight}},e._getNextScrollPos=function(t,e){var n=this.size,i=e.align||"start",r=e.offset||0,o=t.pos,e=t.size,t=0;return"start"===i?t=o-r:"end"===i?t=o+e-n+r:"center"===i&&(t=o+e/2-n/2+r),t},e._enableClick=function(){window.removeEventListener("click",this._onPreventClick,!0)},e._disableClick=function(){window.addEventListener("click",this._onPreventClick,!0)},e._debounceScroll=function(){var t=this;this._scrollTimer||this.trigger("beginScroll"),window.clearTimeout(this._scrollTimer),this._scrollTimer=window.setTimeout(function(){t._scrollTimer=0,t.trigger("finishScroll",{isDragScroll:t._isDragScroll,isTrusted:t._isDragScroll||!t._isAnimation}),t._isDragScroll=!1,t._isAnimation=!1},this.options.scrollDebounce)},r([De("isReachStart")],t.prototype,"_isReachStart",void 0),r([De("isReachEnd")],t.prototype,"_isReachEnd",void 0),r([Ce],t)}(Te),ke=["update","scrollBy","scrollTo","scrollIntoView","setItems","updateContainer","updateItems","init"],t=["reachStart","reachEnd","leaveStart","leaveEnd","beginScroll","finishScroll"],Ht={isReachStart:!1,isReachEnd:!1},He={state:Ht,methods:ke,events:t,instance:function(t){return new je(t.container,s(s({},t.props),{autoInit:!1}))},init:function(t,e){!1!==e.props.autoInit&&t.init()},on:function(t,e,n){t.on(e,n)},off:function(t,e,n){t.off(e,n)},destroy:function(t){t.destroy()}},Ye={__proto__:null,default:je,CONVEYER_METHODS:ke,CONVEYER_EVENTS:t,CONVEYER_REACTIVE_STATE:Ht,REACTIVE_CONVEYER:He,withReactiveMethods:function(r,t){var e={};return t.forEach(function(i){e[i]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.current||r.value;return n[i].apply(n,t)}}),e},getObservers:Ae,getObserver:Re,Reactive:De,ReactiveSubscribe:Ce,Observer:Oe,withClassMethods:function(e){return function(t,r){e.forEach(function(i){i in t||(t[i]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(n=this[r])[i].apply(n,t);return n===this[r]?this:n})})}},keys:Ie,camelize:function(t){return t.replace(/[\s-_]([a-z])/g,function(t,e){return e.toUpperCase()})}};for(Me in Ye)je[Me]=Ye[Me];return je}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Conveyer=e()}(this,function(){"use strict";var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var u=function(){return(u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function c(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,n,s):r(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s}function h(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||((i=i||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,i=arguments[e];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function l(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var p="function"!=typeof Object.assign?function(t){if(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(null!=i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign,d=["","webkit","Moz","MS","ms","o"],b="undefined"==typeof document?{style:{}}:document.createElement("div"),w=Math.round,_=Math.abs,E=Date.now;function x(t,e){for(var n,i=e[0].toUpperCase()+e.slice(1),r=0;r<d.length;){if((n=(n=d[r])?n+i:e)in t)return n;r++}}var T="undefined"==typeof window?{}:window,P=x(b.style,"touchAction"),O=void 0!==P;var S="compute",I="manipulation",A="none",R="pan-x",D="pan-y",C=function(){if(!O)return!1;var e={},n=T.CSS&&T.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!n||T.CSS.supports("touch-action",t)}),e}(),z="ontouchstart"in T,M=void 0!==x(T,"PointerEvent"),j=z&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),k="touch",H="mouse",v=1,m=4,g=8,Y=24,X=["x","y"],F=["clientX","clientY"];function s(t,e,n){if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(var i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function V(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function N(t,e){return-1<t.indexOf(e)}var L=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===S&&(t=this.compute()),O&&this.manager.element.style&&C[t]&&(this.manager.element.style[P]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var e=[],t=(s(this.manager.recognizers,function(t){V(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),e.join(" "));if(N(t,A))return A;var n=N(t,R),i=N(t,D);return n&&i?A:n||i?n?R:D:N(t,I)?I:"auto"},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=N(i,A)&&!C[A],o=N(i,D)&&!C[D],i=N(i,R)&&!C[R];if(r){var s=1===t.pointers.length,a=t.distance<2,t=t.deltaTime<250;if(s&&a&&t)return}if(!i||!o)return r||o&&6&n||i&&n&Y?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function q(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function W(t){var e=t.length;if(1===e)return{x:w(t[0].clientX),y:w(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:w(n/e),y:w(i/e)}}function U(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:w(t.pointers[n].clientX),clientY:w(t.pointers[n].clientY)},n++;return{timeStamp:E(),pointers:e,center:W(e),deltaX:t.deltaX,deltaY:t.deltaY}}function B(t,e,n){var i=e[(n=n||X)[0]]-t[n[0]],e=e[n[1]]-t[n[1]];return Math.sqrt(i*i+e*e)}function G(t,e,n){var i=e[(n=n||X)[0]]-t[n[0]],e=e[n[1]]-t[n[1]];return 180*Math.atan2(e,i)/Math.PI}function Q(t,e){return t===e?1:_(t)>=_(e)?t<0?2:4:e<0?8:16}function Z(t,e,n){return{x:e/t||0,y:n/t||0}}function J(h,t){var e,l,f,n,p,i,r=h.session,d=t.pointers,o=d.length,o=(r.firstInput||(r.firstInput=U(t)),1<o&&!r.firstMultiple?r.firstMultiple=U(t):1===o&&(r.firstMultiple=!1),r.firstInput),s=r.firstMultiple,a=(s||o).center,u=t.center=W(d),c=(t.timeStamp=E(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=G(a,u),t.distance=B(a,u),o=r,u=(a=t).center,i=o.offsetDelta||{},e=o.prevDelta||{},c=o.prevInput||{},a.eventType!==v&&c.eventType!==m||(e=o.prevDelta={x:c.deltaX||0,y:c.deltaY||0},i=o.offsetDelta={x:u.x,y:u.y}),a.deltaX=e.x+(u.x-i.x),a.deltaY=e.y+(u.y-i.y),t.offsetDirection=Q(t.deltaX,t.deltaY),Z(t.deltaTime,t.deltaX,t.deltaY)),o=(t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=_(c.x)>_(c.y)?c.x:c.y,t.scale=s?(o=s.pointers,B(d[0],d[1],F)/B(o[0],o[1],F)):1,t.rotation=s?(a=s.pointers,G(d[1],d[0],F)+G(a[1],a[0],F)):0,t.maxPointers=!r.prevInput||t.pointers.length>r.prevInput.maxPointers?t.pointers.length:r.prevInput.maxPointers,e=t,i=(u=r).lastInterval||e,c=e.timeStamp-i.timeStamp,e.eventType!==g&&(25<c||void 0===i.velocity)?(l=(n=Z(c,c=e.deltaX-i.deltaX,p=e.deltaY-i.deltaY)).x,f=n.y,n=_(n.x)>_(n.y)?n.x:n.y,p=Q(c,p),u.lastInterval=e):(n=i.velocity,l=i.velocityX,f=i.velocityY,p=i.direction),e.velocity=n,e.velocityX=l,e.velocityY=f,e.direction=p,h.element),s=t.srcEvent,d=s.composedPath?s.composedPath()[0]:s.path?s.path[0]:s.target;q(d,o)&&(o=d),t.target=o}function K(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&v&&i-r==0,i=e&(m|g)&&i-r==0;n.isFirst=!!o,n.isFinal=!!i,o&&(t.session={}),n.eventType=e,J(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function $(t){return t.trim().split(/\s+/g)}function tt(e,t,n){s($(t),function(t){e.addEventListener(t,n,!1)})}function et(e,t,n){s($(t),function(t){e.removeEventListener(t,n,!1)})}function nt(t){t=t.ownerDocument||t;return t.defaultView||t.parentWindow||window}var it=function(){function t(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){V(e.options.enable,[e])&&n.handler(t)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&tt(this.element,this.evEl,this.domHandler),this.evTarget&&tt(this.target,this.evTarget,this.domHandler),this.evWin&&tt(nt(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&et(this.element,this.evEl,this.domHandler),this.evTarget&&et(this.target,this.evTarget,this.domHandler),this.evWin&&et(nt(this.element),this.evWin,this.domHandler)},t}();function rt(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}var ot={pointerdown:v,pointermove:2,pointerup:m,pointercancel:g,pointerout:g},st={2:k,3:"pen",4:H,5:"kinect"},at="pointerdown",ut="pointermove pointerup pointercancel",ct=(T.MSPointerEvent&&!T.PointerEvent&&(at="MSPointerDown",ut="MSPointerMove MSPointerUp MSPointerCancel"),function(e){function n(){var t=n.prototype;return t.evEl=at,t.evWin=ut,(t=e.apply(this,arguments)||this).store=t.manager.session.pointerEvents=[],t}return l(n,e),n.prototype.handler=function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),i=ot[i],r=st[t.pointerType]||t.pointerType,o=r===k,s=rt(e,t.pointerId,"pointerId");i&v&&(0===t.button||o)?s<0&&(e.push(t),s=e.length-1):i&(m|g)&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(s,1))},n}(it));function ht(t){return Array.prototype.slice.call(t,0)}var lt={touchstart:v,touchmove:2,touchend:m,touchcancel:g},ft=function(e){function n(){var t;return n.prototype.evTarget="touchstart touchmove touchend touchcancel",(t=e.apply(this,arguments)||this).targetIds={},t}return l(n,e),n.prototype.handler=function(t){var e=lt[t.type],n=function(t,e){var n,i,r=ht(t.touches),o=this.targetIds;if(e&(2|v)&&1===r.length)return o[r[0].identifier]=!0,[r,r];var s=ht(t.changedTouches),a=[],u=this.target;if(i=r.filter(function(t){return q(t.target,u)}),e===v)for(n=0;n<i.length;)o[i[n].identifier]=!0,n++;n=0;for(;n<s.length;)o[s[n].identifier]&&a.push(s[n]),e&(m|g)&&delete o[s[n].identifier],n++;if(a.length)return[function(t,n,e){for(var i=[],r=[],o=0;o<t.length;){var s=n?t[o][n]:t[o];rt(r,s)<0&&i.push(t[o]),r[o]=s,o++}return i=e?n?i.sort(function(t,e){return t[n]>e[n]}):i.sort():i}(i.concat(a),"identifier",!0),a]}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:k,srcEvent:t})},n}(it);var pt={mousedown:v,mousemove:2,mouseup:m},dt=function(e){function n(){var t=n.prototype;return t.evEl="mousedown",t.evWin="mousemove mouseup",(t=e.apply(this,arguments)||this).pressed=!1,t}return l(n,e),n.prototype.handler=function(t){var e=pt[t.type];e&v&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=m),this.pressed&&(e&m&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:H,srcEvent:t}))},n}(it),vt=2500,mt=25;function gt(t){var e,n,t=t.changedPointers[0];t.identifier===this.primaryTouch&&(e={x:t.clientX,y:t.clientY},n=this.lastTouches,this.lastTouches.push(e),setTimeout(function(){var t=n.indexOf(e);-1<t&&n.splice(t,1)},vt))}var yt=function(){return function(n){function t(t,e){var o=n.call(this,t,e)||this;return o.handler=function(t,e,n){var i=n.pointerType===k,r=n.pointerType===H;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)!function(t,e){t&v?(this.primaryTouch=e.changedPointers[0].identifier,gt.call(this,e)):t&(m|g)&>.call(this,e)}.call(f(f(o)),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),r=Math.abs(n-r.y);if(o<=mt&&r<=mt)return!0}return!1}.call(f(f(o)),n))return;o.callback(t,e,n)}},o.touch=new ft(o.manager,o.handler),o.mouse=new dt(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return l(t,n),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(it)}();function bt(t,e,n){return Array.isArray(t)&&(s(t,n[e],n),1)}var wt=1;function _t(t,e){e=e.manager;return e?e.get(t):t}function Et(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var xt=function(){function t(t){this.options=i({enable:!0},t=void 0===t?{}:t),this.id=wt++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return p(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(bt(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=_t(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},e.dropRecognizeWith=function(t){return bt(t,"dropRecognizeWith",this)||(t=_t(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(bt(t,"requireFailure",this))return this;var e=this.requireFail;return-1===rt(e,t=_t(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(bt(t,"dropRequireFailure",this))return this;t=_t(t,this);t=rt(this.requireFail,t);return-1<t&&this.requireFail.splice(t,1),this},e.hasRequireFailures=function(){return 0<this.requireFail.length},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(e){var n=this,t=this.state;function i(t){n.manager.emit(t,e)}t<8&&i(n.options.event+Et(t)),i(n.options.event),e.additionalEvent&&i(e.additionalEvent),8<=t&&i(n.options.event+Et(t))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){t=p({},t);if(!V(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Tt=function(e){function t(t){return e.call(this,i({pointers:1},t=void 0===t?{}:t))||this}l(t,e);var n=t.prototype;return n.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},n.process=function(t){var e=this.state,n=t.eventType,i=6&e,t=this.attrTest(t);return i&&(n&g||!t)?16|e:i||t?n&m?8|e:2&e?4|e:2:32},t}(xt);var Pt=function(n){function t(t){return(t=n.call(this,i({event:"pan",threshold:10,pointers:1,direction:30},t=void 0===t?{}:t))||this).pX=null,t.pY=null,t}l(t,n);var e=t.prototype;return e.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(D),t&Y&&e.push(R),e},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||(i=6&e.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,Math.abs(t.deltaX)):(r=0===s?1:s<0?8:16,n=s!==this.pY,Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},e.attrTest=function(t){return Tt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},e.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=16===(e=t.direction)?"down":8===e?"up":2===e?"left":4===e?"right":"";e&&(t.additionalEvent=this.options.event+e),n.prototype.emit.call(this,t)},t}(Tt),Ot={domEvents:!1,touchAction:S,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function St(n,i){var r,o=n.element;o.style&&(s(n.options.cssProps,function(t,e){r=x(o.style,e),i?(n.oldCssProps[r]=o.style[r],o.style[r]=t):o.style[r]=n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}var It=function(){function t(t,e){var n=this;this.options=p({},Ot,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((e=this).options.inputClass||(M?ct:j?ft:z?yt:dt))(e,K),this.touchAction=new L(this,this.options.touchAction),St(this,!0),s(this.options.recognizers,function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;return e.set=function(t){return p(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);for(var n,i=this.recognizers,r=e.curRecognizer,o=((!r||8&r.state)&&(r=e.curRecognizer=null),0);o<i.length;)n=i[o],2===e.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),o++}},e.get=function(t){if(t instanceof xt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event===t)return e[n];return null},e.add=function(t){if(bt(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),(t.manager=this).touchAction.update(),t},e.remove=function(t){if(bt(t,"remove",this))return this;var e=this.get(t);return!t||-1!==(e=rt(t=this.recognizers,e))&&(t.splice(e,1),this.touchAction.update()),this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return s($(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this},e.off=function(t,e){if(void 0===t)return this;var n=this.handlers;return s($(t),function(t){e?n[t]&&n[t].splice(rt(n[t],e),1):delete n[t]}),this},e.emit=function(t,e){this.options.domEvents&&(n=t,i=e,(r=document.createEvent("Event")).initEvent(n,!0,!0),(r.gesture=i).target.dispatchEvent(r));var n,i,r,o=this.handlers[t]&&this.handlers[t].slice();if(o&&o.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var s=0;s<o.length;)o[s](e),s++}},e.destroy=function(){this.element&&St(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}();function At(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return!0;return!1}function Rt(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return t[i];return null}function Dt(t,e){try{return new RegExp(t,"g").exec(e)}catch(t){return null}}function Ct(t){return t.replace(/_/g,".")}function zt(t,n){var i=null,r="-1";return At(t,function(t){var e=Dt("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);return e&&!t.brand&&(i=t,r=e[3]||"-1",t.versionAlias?r=t.versionAlias:t.versionTest&&(e=t.versionTest.toLowerCase(),r=((e=Dt("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",n))?e[3]:"")||r),r=Ct(r),1)}),{preset:i,version:r}}function Mt(t,n){var i={brand:"",version:"-1"};return At(t,function(t){var e=jt(n,t);return e&&(i.brand=t.id,i.version=t.versionAlias||e.version,"-1"!==i.version)}),i}function jt(t,e){return Rt(t,function(t){t=t.brand;return Dt(""+e.test,t.toLowerCase())})}var kt=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],Ht=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],Yt=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Xt=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Ft=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"mac os x",id:"mac"},{test:"android",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function Vt(t){var t=function(t){if(void 0===t){if("undefined"==typeof navigator||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}(t),e=!!/mobi/g.exec(t),n={name:"unknown",version:"-1",majorVersion:-1,webview:!!zt(Xt,t).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},i={name:"unknown",version:"-1",majorVersion:-1},r=zt(kt,t),o=r.preset,r=r.version,s=zt(Ft,t),a=s.preset,s=s.version,u=zt(Ht,t);return n.chromium=!!u.preset,n.chromiumVersion=u.version,n.chromium||(u=zt(Yt,t),n.webkit=!!u.preset,n.webkitVersion=u.version),a&&(i.name=a.id,i.version=s,i.majorVersion=parseInt(s,10)),o&&(n.name=o.id,n.version=r,n.webview&&"ios"===i.name&&"safari"!==n.name&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:i,isMobile:e,isHints:!1}}function Nt(t){return void 0===t}var b=function(){function t(){this.options={},this._eventHandler={}}var e=t.prototype;return e.trigger=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!(0<(s=this._eventHandler[t]||[]).length))return!0;var r=n[0]||{},o=n.slice(1),s=s.concat(),a=!1,u=(r.eventType=t,r.stop=function(){a=!0},r.currentTarget=this,[r]);return 1<=o.length&&(u=u.concat(o)),s.forEach(function(t){t.apply(e,u)}),!a},e.once=function(n,i){var r,o=this;if("object"==typeof n&&Nt(i)){var t,e=n;for(t in e)this.once(t,e[t]);return this}return"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(o,t),o.off(n,r)},this.on(n,r)),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&Nt(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(Nt(r=this._eventHandler[t])&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),this},e.off=function(t,e){var n,i;if(Nt(t))return this._eventHandler={},this;if(Nt(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[t];if(s){var a=0;try{for(var u=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1);break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="2.2.2",t}(),Lt=function(t,e){return(Lt=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])})(t,e)};var y=function(){return(y=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function qt(t,e,n,i){n=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],i=Math.max(n[0],t);return Math.min(n[1],i)}function Wt(t,e){return t<e[0]||t>e[1]}function Ut(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function Bt(t,e,n){var i=t,r=e[0],e=e[1],o=e-r;return n[1]&&e<t&&(i=(i-e)%o+r),i=n[0]&&t<r?(i-r)%o+e:i}function Gt(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var r,Qt,Zt,Jt=(r="undefined"==typeof window?{navigator:{userAgent:""}}:window).requestAnimationFrame||r.webkitRequestAnimationFrame,Kt=r.cancelAnimationFrame||r.webkitCancelAnimationFrame;function o(t,e){var n,i={};for(n in t)n&&(i[n]=e(t[n],n));return i}function $t(t,e){var n,i={};for(n in t)n&&e(t[n],n)&&(i[n]=t[n]);return i}function te(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function ee(t,n){return te(t,function(t,e){return t===n[e]})}Jt&&!Kt?(Qt={},Zt=Jt,Jt=function(e){var n=Zt(function(t){Qt[n]&&e(t)});return Qt[n]=!0,n},Kt=function(t){delete Qt[t]}):Jt&&Kt||(Jt=function(t){return r.setTimeout(function(){t(r.performance&&r.performance.now&&r.performance.now()||(new Date).getTime())},16)},Kt=r.clearTimeout);var ne={};function ie(t,e){var n,i;return ne[e]||(ne[e]=(i=(n=e)<1?Math.pow(10,oe(n)):1,function(t){return 0===n?0:Math.round(Math.round(t/n)*n*i)/i})),ne[e](t)}function re(t,n){if(!t||!n)return t;var i="number"==typeof n;return o(t,function(t,e){return ie(t,i?n:n[e])})}function oe(t){if(!isFinite(t))return 0;var e=t+"";if(0<=e.indexOf("e")){for(var n=0,i=1;Math.round(t*i)/i!==t;)i*=10,n++;return n}return 0<=e.indexOf(".")?e.length-e.indexOf(".")-1:0}function se(t,e,n){return Math.max(Math.min(t,n),e)}var ae,ue,ce,he,t,le=function(){function t(t){var e=t.options,n=t.itm,i=t.em,t=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=t,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(n,t,e){var i,r=this;return se(void 0!==e?e:(i=o(t,function(t,e){return t=Math.abs(t-n[e]),e=r.options.deceleration,(t=Math.sqrt(t/e*2))<100?0:t}),Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)),this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=n&&n.event||null;return{depaPos:i,destPos:t,duration:se(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,t),inputEvent:r,input:n&&n.input||null,isTrusted:!!r,done:this.animationEnd}},e.grab=function(t,e){var n;this._animateParam&&t.length&&(n=this.axm.get(t),te(t=this.axm.map(n,function(t,e){return Bt(t,e.range,e.circular)}),function(t,e){return n[e]===t})||this.em.triggerChange(t,!1,n,e,!!e),this._animateParam=null,this._raf&&(t=this._raf,Kt(t)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event)))},e.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},e.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e){return Math.min(e.range[1],Math.max(e.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo(),e=(this._animateParam=null,this.axm.filter(this.axm.get(),function(t,e){return Ut(t,e.range,e.circular)}));0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e){return Bt(t,e.range,e.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.finish(!!t)},e.finish=function(t){this._animateParam=null,this.itm.setInterrupt(!1),this.em.triggerFinish(t)},e.animateLoop=function(s,a){var u,c,h,l,f,p,d,v;s.duration?(this._animateParam=y({},s),u=this._animateParam,c=this,h=u.destPos,l=u.depaPos,f=0,p=o(l,function(t,e){return t<=h[e]?1:-1}),d=o(h,function(t){return t}),v=(new Date).getTime(),u.startTime=v,function t(){c._raf=null;var e=(new Date).getTime(),r=(e-u.startTime)/s.duration,o=c.easing(r),n=c.axm.map(l,function(t,e,n){var t=1<=r?h[n]:t+u.delta[n]*(o-f),i=Bt(t,e.range,e.circular);return t!==i&&(t=p[n]*(e.range[1]-e.range[0]),h[n]-=t,l[n]-=t),i}),i=!c.em.triggerChange(n,!1,l);l=n,v=e,1<=(f=o)?(ee(h=c.getFinalPos(h,d),c.axm.get(Object.keys(h)))||c.em.triggerChange(h,!0,l),a()):i?c.finish(!1):c._raf=Jt(t)}()):(this.em.triggerChange(s.destPos,!0),a())},e.getFinalPos=function(t,n){var i=this;return o(t,function(t,e){return t>=n[e]-1e-6&&t<=n[e]+1e-6?n[e]:ie(t,i.getRoundUnit(t,e))})},e.getRoundUnit=function(t,e){var n=this.options.round,i=null;return n||(e=this.axm.getAxisOptions(e),e=Math.max(oe(e.range[0]),oe(e.range[1]),oe(t)),i=1/Math.pow(10,e)),i||n},e.getUserControll=function(t){t=t.setTo();return t.destPos=this.axm.get(t.destPos),t.duration=se(t.duration,this.options.minimumDuration,this.options.maximumDuration),t},e.animateTo=function(t,e,n){var i=this,t=this.createAnimationParam(t,e,n),e=y({},t.depaPos),r=this.em.triggerAnimationStart(t),t=this.getUserControll(t);!r&&this.axm.every(t.destPos,function(t,e){return Ut(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),r&&!ee(t.destPos,e)&&(r=n&&n.event||null,this.animateLoop({depaPos:e,destPos:t.destPos,duration:t.duration,delta:this.axm.getDelta(e,t.destPos),isTrusted:!!r,inputEvent:r,input:n&&n.input||null},function(){return i.animationEnd()}))},e.easing=function(t){return 1<t?1:this.options.easing(t)},e.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t),i=(this.grab(n),this.axm.get(n));if(ee(t,i))return this;this.itm.setInterrupt(!0);n=$t(t,function(t,e){return i[e]!==t});return Object.keys(n).length&&(ee(n=this.axm.map(n,function(t,e){var n=e.range,e=e.circular;return e&&(e[0]||e[1])?t:qt(t,n,e)}),i)||(0<e?this.animateTo(n,e):(this.em.triggerChange(n),this.finish(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(o(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),fe=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){t=this.getRoundPos(t).roundPos;this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){var e=this.getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;t.destPos=n,t.depaPos=e,t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n,i,r){void 0===r&&(r=!1);var o=this.am,s=o.axm,o=o.getEventInfo(),t=this.getRoundPos(t,n),n=t.roundPos,t=t.roundDepa,n=s.moveTo(n,t),t=i&&i.event||o&&o.event||null,r={pos:n.pos,delta:n.delta,holding:r,inputEvent:t,isTrusted:!!t,input:i&&i.input||o&&o.input||null,set:t?this.createUserControll(n.pos):function(){}},i=this.axes.trigger("change",r);return t&&s.set(r.set().destPos),i},e.triggerAnimationStart=function(t){var e=this.getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;return t.destPos=n,t.depaPos=e,t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){this.axes.trigger("animationEnd",{isTrusted:t=void 0===t?!1:t})},e.triggerFinish=function(t){this.axes.trigger("finish",{isTrusted:t=void 0===t?!1:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:y({},t),duration:e};return function(t,e){return t&&(n.destPos=y({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},e.getRoundPos=function(t,e){var n=this.axes.options.round;return{roundPos:re(t,n),roundDepa:re(e,n)}},t}(),pe=function(){function t(t){this.options=t,this._prevented=!1}var e=t.prototype;return e.isInterrupting=function(){return this.options.interruptable||this._prevented},e.isInterrupted=function(){return!this.options.interruptable&&this._prevented},e.setInterrupt=function(t){this.options.interruptable||(this._prevented=t)},t}(),de=function(){function t(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},{})}var e=t.prototype;return e._complementOptions=function(){var r=this;Object.keys(this.axis).forEach(function(i){r.axis[i]=y({range:[0,100],bounce:[0,0],circular:[!1,!1]},r.axis[i]),["bounce","circular"].forEach(function(t){var e=r.axis,n=e[i][t];/string|number|boolean/.test(typeof n)&&(e[i][t]=[n,n])})})},e.getDelta=function(t,e){var n=this.get(t);return o(this.get(e),function(t,e){return t-n[e]})},e.get=function(t){var n=this;return t&&Array.isArray(t)?t.reduce(function(t,e){return e&&e in n._pos&&(t[e]=n._pos[e]),t},{}):y(y({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=o(this._pos,function(t,e){return e in n&&e in i?n[e]-i[e]:0});return this.set(this.map(n,function(t,e){return e?Bt(t,e.range,e.circular):0})),{pos:y({},this._pos),delta:t}},e.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},e.every=function(t,n){var i=this.axis;return te(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this.axis;return $t(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this.axis;return o(t,function(t,e){return n(t,i[e],e)})},e.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e){return!Wt(t,e.range)})},e.getAxisOptions=function(t){return this.axis[t]},t}(),ve=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,t=t.am;this.isOutside=!1,this.moveDistance=null,this.isStopped=!1,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=t}var e=t.prototype;return e.atOutside=function(t){var o,s=this;return this.isOutside?this.axm.map(t,function(t,e){var n=e.range[0]-e.bounce[0],e=e.range[1]+e.bounce[1];return e<t?e:t<n?n:t}):(o=this.am.easing(1e-5)/1e-5,this.axm.map(t,function(t,e){var n=e.range[0],i=e.range[1],r=e.bounce,e=e.circular;return e&&(e[0]||e[1])?t:t<n?n-s.am.easing((n-t)/(r[0]*o))*r[0]:i<t?i+s.am.easing((t-i)/(r[1]*o))*r[1]:t}))},e.get=function(t){return this.axm.get(t.axes)},e.hold=function(t,e){!this.itm.isInterrupted()&&t.axes.length&&(this.isStopped=!(e={input:t,event:e}),this.itm.setInterrupt(!0),this.am.grab(t.axes,e),this.moveDistance||this.em.triggerHold(this.axm.get(),e),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes))},e.change=function(t,e,n){var i,r;this.isStopped||!this.itm.isInterrupting()||this.axm.every(n,function(t){return 0===t})||(r=o(i=this.moveDistance||this.axm.get(t.axes),function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=r),this.isOutside&&this.axm.every(i,function(t,e){return!Wt(t,e.range)})&&(this.isOutside=!1),i=this.atOutside(i),r=this.atOutside(r),this.em.triggerChange(r,!1,i,{input:t,event:e},!0)||(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1)))},e.release=function(t,e,n,i){var r,o;!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance&&(r=this.axm.get(t.axes),o=this.axm.get(),n=this.axm.get(this.axm.map(n,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?r[n]+t:qt(r[n]+t,e.range,e.circular,e.bounce)})),i={depaPos:o,destPos:n=0===(i=this.am.getDuration(n,r,i))?y({},o):n,duration:i,delta:this.axm.getDelta(o,n),inputEvent:e,input:t,isTrusted:!0},this.em.triggerRelease(i),this.moveDistance=null,n={input:t,event:e},(e=ee((t=this.am.getUserControll(i)).destPos,o))||0===t.duration?(e||this.em.triggerChange(t.destPos,!1,o,n,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(n):this.em.triggerFinish(!0)):this.am.animateTo(t.destPos,t.duration,n))},t}(),me="ontouchstart"in r&&"safari"===(void 0===ae&&function(){var t;if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData)return(t=(t=navigator.userAgentData).brands||t.uaList)&&t.length}()?(ce=((he=navigator.userAgentData).uaList||he.brands).slice(),he=he.mobile||!1,n={name:(n=ce[0]).brand,version:n.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!Mt(Xt,ce).brand},t={name:"unknown",version:"-1",majorVersion:-1},n.webkit=!n.chromium&&At(Yt,function(t){return jt(ce,t)}),e=Mt(Ht,ce),n.chromium=!!e.brand,n.chromiumVersion=e.version,n.chromium||(e=Mt(Yt,ce),n.webkit=!!e.brand,n.webkitVersion=e.version),Fe&&(ue=Fe.platform.toLowerCase(),e=Rt(Ft,function(t){return new RegExp(""+t.test,"g").exec(ue)}),t.name=e?e.id:ue,t.version=Fe.platformVersion),(e=Mt(kt,ce)).brand&&(n.name=e.brand,n.version=Fe?Fe.uaFullVersion:e.version),"Linux armv8l"===navigator.platform?t.name="android":n.webkit&&(t.name=he?"ios":"mac"),"ios"===t.name&&n.webview&&(n.version="-1"),t.version=Ct(t.version),n.version=Ct(n.version),t.majorVersion=parseInt(t.version,10),n.majorVersion=parseInt(n.version,10),{browser:n,os:t,isMobile:he,isHints:!0}):Vt(ae)).browser.name,ge=function(){if("undefined"==typeof document)return"";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""}(),ye=function(r){function t(){this.constructor=e}var e;function n(t,e,n){void 0===t&&(t={}),void 0===e&&(e={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=y({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null},e),i.itm=new pe(i.options),i.axm=new de(i.axis,i.options),i.em=new fe(i),i.am=new le(i),i.io=new ve(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}Lt(e=n,i=r),e.prototype=null===i?Object.create(i):(t.prototype=i.prototype,new t);var i=n.prototype;return i.connect=function(t,e){var n,t="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e&&((n=this._inputs.filter(function(t){return t.hammer&&t.element===e.element})).length&&(e.hammer=n[0].hammer)),e.mapAxes(t),e.connect(this.io),this._inputs.push(e),this},i.disconnect=function(t){return t?0<=(t=this._inputs.indexOf(t))&&(this._inputs[t].disconnect(),this._inputs.splice(t,1)):(this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[]),this},i.get=function(t){return this.axm.get(t)},i.setTo=function(t,e){return this.am.setTo(t,e=void 0===e?0:e),this},i.setBy=function(t,e){return this.am.setBy(t,e=void 0===e?0:e),this},i.isBounceArea=function(t){return this.axm.isOutside(t)},i.destroy=function(){this.disconnect(),this.em.destroy()},n.VERSION="2.8.0",n.TRANSFORM=ge,n.DIRECTION_NONE=1,n.DIRECTION_LEFT=2,n.DIRECTION_RIGHT=4,n.DIRECTION_UP=8,n.DIRECTION_DOWN=16,n.DIRECTION_HORIZONTAL=6,n.DIRECTION_VERTICAL=Y,n.DIRECTION_ALL=30,n}(b),be="PointerEvent"in r||"MSPointerEvent"in r,we="ontouchstart"in r,_e="_EGJS_AXES_INPUTTYPE_";function Ee(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function xe(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}var Te=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,this.isRightEdge=!1,this.rightEdgeTimer=0,this.panFlag=!1,void 0===It)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=function e(t,n){var i;return void 0===n&&(n=!1),"string"==typeof t?(i=t.match(/^<([a-z]+)\s*([^>]*)>/)?((i=document.createElement("div")).innerHTML=t,Gt(i.childNodes)):Gt(document.querySelectorAll(t)),n||(i=1<=i.length?i[0]:void 0)):t===r||t.nodeName&&(1===t.nodeType||9===t.nodeType)?i=t:"jQuery"in r&&t instanceof jQuery||t.constructor.prototype.jquery?i=n?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return e(t)}),n||(i=1<=i.length?i[0]:void 0)),i}(t),this.options=y({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,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)}var e=t.prototype;return e.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?30:e?6:n?Y:1,this.axes=t},e.connect=function(t){var e,n,i,r={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var o=(o=this.element[_e])||String(Math.round(Math.random()*(new Date).getTime())),s=(s=this.options.inputType,i=n=e=!1,(s=void 0===s?[]:s).forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=we;break;case"pointer":i=be}}),i?ct:e&&n?yt:e?ft:n?dt:null);if(!s)throw new Error("Wrong inputType parameter!");this.hammer=function(t,e){try{return new It(t,y({},e))}catch(t){return null}}(this.element,y({inputClass:s},this.options.hammerManagerOptions)),this.element[_e]=o}return this.panRecognizer=new Pt(r),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=1,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[_e],this.element=null,this.hammer=null},e.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},e.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},e.onHammerInput=function(t){var e;this.isEnable()&&(t.isFirst?(this.panFlag=!1)!==t.srcEvent.cancelable&&(e=this.options.iOSEdgeSwipeThreshold,this.observer.hold(this,t),this.isRightEdge=me&&t.center.x>window.innerWidth-e,this.panFlag=!0):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=this;if(this.panFlag){var n=this.options,i=n.iOSEdgeSwipeThreshold,n=n.releaseOnScroll,r=(r=t.angle,(s=this.options.thresholdAngle)<0||90<s?1:(r=Math.abs(r),s<r&&r<180-s?Y:6)),o=this.hammer.session.prevInput;if(!n||t.srcEvent.cancelable){if(o&&me){if(t.center.x<0)return void this.onPanend(y(y({},o),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}));this.isRightEdge&&(clearTimeout(this.rightEdgeTimer),t.deltaX<-i?this.isRightEdge=!1:this.rightEdgeTimer=window.setTimeout(function(){e.onPanend(y(y({},o),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))},100))}o?(t.offsetX=t.deltaX-o.deltaX,t.offsetY=t.deltaY-o.deltaY):(t.offsetX=0,t.offsetY=0);var s=this.getOffset([t.offsetX,t.offsetY],[xe(6,this._direction,r),xe(Y,this._direction,r)]),n=s.some(function(t){return 0!==t});n&&(!1!==(i=t.srcEvent).cancelable&&i.preventDefault(),i.stopPropagation()),(t.preventSystemEvent=n)&&this.observer.change(this,t,Ee(this.axes,s))}else this.onPanend(y(y({},t),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}},e.onPanend=function(t){var e,n,i,r;this.panFlag&&(clearTimeout(this.rightEdgeTimer),this.panFlag=!1,e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[xe(6,this._direction),xe(Y,this._direction)]),n=e,i=this.observer.options.deceleration,r=Math.sqrt(n[0]*n[0]+n[1]*n[1]),r=Math.abs(r/-i),e=[n[0]/2*r,n[1]/2*r],this.observer.release(this,t,Ee(this.axes,e)))},e.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},e.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},e.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},t}();function Pe(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Oe(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[e]));return t}function Se(t){return void 0===t}var Ie=function(){function t(t,e){var n,i;if(this._canceled=!1,e)try{for(var r=Pe(Object.keys(e)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=e[s]}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=t}var e=t.prototype;return e.stop=function(){this._canceled=!0},e.isCanceled=function(){return this._canceled},t}(),Ae=function(){function t(){this._eventHandler={}}var e=t.prototype;return e.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof Ie?e.eventType:e,i=Oe(this._eventHandler[i]||[]);return i.length<=0||(e instanceof Ie?(e.currentTarget=this,i.forEach(function(t){t(e)})):i.forEach(function(t){t.apply(void 0,Oe(n))})),this},e.once=function(n,i){var r,o=this;if("object"==typeof n&&Se(i)){var t,e=n;for(t in e)this.once(t,e[t]);return this}return"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(void 0,Oe(t)),o.off(n,r)},this.on(n,r)),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&Se(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],Se(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),this},e.off=function(t,e){var n,i;if(Se(t))return this._eventHandler={},this;if(Se(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[t];if(s){var a=0;try{for(var u=Pe(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1),s.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="3.0.2",t}(),Re="__observers__",De=function(){function t(t){this._emitter=new Ae,this._current=t}var e=t.prototype;return Object.defineProperty(e,"current",{get:function(){return this._current},set:function(t){var e=t!==this._current;this._current=t,e&&this._emitter.trigger("update",t)},enumerable:!1,configurable:!0}),e.subscribe=function(t){this._emitter.on("update",t)},e.unsubscribe=function(t){this._emitter.off("update",t)},t}();function Ce(t){return Object.keys(t)}function ze(t){return t[Re]||(t[Re]={}),t[Re]}function Me(t,e,n){t=ze(t);return t[e]||(t[e]=new De(n)),t[e]}function je(i){return function(t,e){var n=i||e;Object.defineProperty(t,e,{get:function(){return Me(this,n).current},set:function(t){Me(this,n,t).current=t}}),n!==e&&Object.defineProperty(t,n,{get:function(){return Me(this,n).current}})}}function ke(t){t=t.prototype;t.subscribe=function(t,e){t in this&&Me(this,t).subscribe(e)},t.unsubscribe=function(t,e){var n=this;t?t in this&&Me(this,t).unsubscribe(e):Ce(ze(this)).forEach(function(t){n.unsubscribe(t)})}}function He(t){return"string"==typeof t}var Ye,Xe=function(n){var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}function r(t,e){void 0===e&&(e={});var i=n.call(this)||this;return i.items=[],i.pos=0,i.size=0,i.scrollSize=0,i._scrollTimer=0,i._isDragScroll=!1,i._isAnimation=!1,i._isReachStart=!1,i._isReachEnd=!1,i.update=function(){i.updateItems(),i.updateContainer()},i._onScroll=function(t){t&&i._debounceScroll(),i._refreshScroll();var t=i.size,e=i.scrollSize,n=i.pos;n<=0&&!0!==i.isReachStart?(i._isReachStart=!0,i.trigger("reachStart")):0<n&&!1!==i.isReachStart&&(i._isReachStart=!1,i.trigger("leaveStart")),e-t<=n&&!0!==i.isReachEnd?(i._isReachEnd=!0,i.trigger("reachEnd")):n<e-t&&!1!==i.isReachEnd&&(i._isReachEnd=!1,i.trigger("leaveEnd"))},i._onPreventClick=function(t){t.stopPropagation(),t.preventDefault(),i._enableClick()},i.options=u({horizontal:!0,useDrag:!0,autoInit:!0,scrollDebounce:100},e),i._scrollArea=t,i.options.autoInit&&i.init(),i}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i);e=r.prototype;return e.findElement=function(t,e){return(null===(t=this.findItem(t,e=void 0===e?{}:e))||void 0===t?void 0:t.element)||null},e.findItem=function(t,e){var n,i=this.pos,r=this.scrollSize,o=this.size,s=null!==(a=null==(e=void 0===e?{}:e)?void 0:e.hitTest)&&void 0!==a?a:1,a=h(h([{pos:0,size:0}],this.items,!0),[{pos:r,size:0}],!1),u=i+o,e=e.sibling;if("start"===t){if(i<=0)return null;n=h([],a,!0).reverse().filter(function(t){var e=t.size,t=t.pos-i,n=t+e;return 0<=t||0<=n&&(!e||Math.abs(n)/e>=s)}).reverse()[0]}else if("end"===t){if(r-o<=i)return null;n=a.filter(function(t){var e=t.size,t=t.pos+e-u,n=t-e;return t<=0||n<=0&&(!e||Math.abs(n)/e>=s)}).reverse()[0]}else if("next"===t)n=a.reverse().filter(function(t){var e=t.size,n=t.pos-i;return 0<t.pos+e-u&&0<n&&(!e||Math.abs(n)/e>=1-s)}).reverse()[0];else{if("prev"!==t)return this._getItem(t);n=a.filter(function(t){var e=t.size,n=t.pos-i,t=t.pos+e-u;return n<0&&t<0&&(!e||Math.abs(n)/e>=1-s)}).reverse()[0]}return e&&n?(r=a.indexOf(n),a[r+e]||null):n||null},e.scrollIntoView=function(t,e){if(r=this.findItem(t,e=void 0===e?{}:e)){var n=e.duration||0,i=this._getNextScrollPos(r,e);if(He(t)&&e.excludeStand&&i===this.pos){var r,o=this.items.indexOf(r);if(-1===o)return;if(!(r=this.items[o+("start"===t||"prev"===t?-1:1)]))return;i=this._getNextScrollPos(r,e)}this.scrollBy(i-this.pos,n)}},e.scrollBy=function(t,e){this.axes.setBy({scroll:-t},e=void 0===e?0:e)},e.scrollTo=function(t,e){this.axes.setBy({scroll:this.pos-t},e=void 0===e?0:e)},e.setItems=function(t){this.items=t},e.updateItems=function(){var e=this,t=this.scrollAreaElement,n=this.options.itemSelector,n=[].slice.call(n?t.querySelectorAll(n):t.children);this.setItems(n.map(function(t){return e._getItem(t)}))},e.updateContainer=function(){var t=this.scrollAreaElement,e=this.options.horizontal;this.size=e?t.clientWidth:t.clientHeight,this.scrollSize=e?t.scrollWidth:t.scrollHeight,this._refreshScroll(),this._onScroll()},e.init=function(){var t,n,e,i,r,o=this;this.axes||(He(i=this._scrollArea)?t=document.querySelector(i):i instanceof Element?t=i:("value"in i||"current"in i)&&(t=i.value||i.current),this.scrollAreaElement=t,n=!1,e=this.scrollAreaElement,i=new ye({scroll:{circular:!0,range:[-1e3,1e3]}},{deceleration:.005,round:1}),r=!1,i.on({hold:function(t){n=!(r=!0);var e,t=t.inputEvent.srcEvent;t&&((e=o.options).preventDefault&&t.preventDefault(),e.preventClickOnDrag&&o._disableClick())},change:function(t){t.inputEvent&&!r||(o._isDragScroll=!!t.inputEvent,o._isAnimation=!!r,n=!0,t=t.delta.scroll,o.options.horizontal?e.scrollLeft-=t:e.scrollTop-=t)},release:function(t){n||(t.setTo(u({},t.depaPos),0),o._enableClick()),n=!1}}),this.axes=i,this.options.useDrag&&i.connect(this.options.horizontal?"scroll":["","scroll"],new Te(e,{inputType:["mouse"]})),e.addEventListener("scroll",this._onScroll),window.addEventListener("resize",this.update),this.update())},e.destroy=function(){var t;null!==(t=this.axes)&&void 0!==t&&t.destroy(),this.unsubscribe(),null!==(t=this.scrollAreaElement)&&void 0!==t&&t.removeEventListener("scroll",this._onScroll),window.removeEventListener("resize",this.update),this.off()},e._refreshScroll=function(){var t=this.options.horizontal,e=this.scrollAreaElement;this.pos=t?e.scrollLeft:e.scrollTop},e._getItem=function(t){var e=this.options.horizontal;return{element:t,pos:e?t.offsetLeft:t.offsetTop,size:e?t.offsetWidth:t.offsetHeight}},e._getNextScrollPos=function(t,e){var n=this.size,i=e.align||"start",e=e.offset||0,r=t.pos,t=t.size,o=0;return"start"===i?o=r-e:"end"===i?o=r+t-n+e:"center"===i&&(o=r+t/2-n/2+e),o},e._enableClick=function(){window.removeEventListener("click",this._onPreventClick,!0)},e._disableClick=function(){window.addEventListener("click",this._onPreventClick,!0)},e._debounceScroll=function(){var t=this;this._scrollTimer||this.trigger("beginScroll"),window.clearTimeout(this._scrollTimer),this._scrollTimer=window.setTimeout(function(){t._scrollTimer=0,t.trigger("finishScroll",{isDragScroll:t._isDragScroll,isTrusted:t._isDragScroll||!t._isAnimation}),t._isDragScroll=!1,t._isAnimation=!1},this.options.scrollDebounce)},c([je("isReachStart")],r.prototype,"_isReachStart",void 0),c([je("isReachEnd")],r.prototype,"_isReachEnd",void 0),c([ke],r)}(Ae),Fe=["update","scrollBy","scrollTo","scrollIntoView","setItems","updateContainer","updateItems","init"],e=["reachStart","reachEnd","leaveStart","leaveEnd","beginScroll","finishScroll"],n={isReachStart:!1,isReachEnd:!1},Ve={__proto__:null,default:Xe,CONVEYER_METHODS:Fe,CONVEYER_EVENTS:e,CONVEYER_REACTIVE_STATE:n,REACTIVE_CONVEYER:{state:n,methods:Fe,events:e,instance:function(t){return new Xe(t.container,u(u({},t.props),{autoInit:!1}))},init:function(t,e){!1!==e.props.autoInit&&t.init()},on:function(t,e,n){t.on(e,n)},off:function(t,e,n){t.off(e,n)},destroy:function(t){t.destroy()}},withReactiveMethods:function(r,t){var e={};return t.forEach(function(i){e[i]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.current||r.value;return n[i].apply(n,t)}}),e},getObservers:ze,getObserver:Me,Reactive:je,ReactiveSubscribe:ke,Observer:De,withClassMethods:function(e){return function(t,r){e.forEach(function(i){i in t||(t[i]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(n=this[r])[i].apply(n,t);return n===this[r]?this:n})})}},keys:Ce,camelize:function(t){return t.replace(/[\s-_]([a-z])/g,function(t,e){return e.toUpperCase()})}};for(Ye in Ve)Xe[Ye]=Ve[Ye];return Xe}); | ||
//# sourceMappingURL=conveyer.min.js.map |
145
package.json
{ | ||
"name": "@egjs/conveyer", | ||
"version": "0.1.0", | ||
"description": "", | ||
"main": "./dist/conveyer.cjs.js", | ||
"module": "./dist/conveyer.esm.js", | ||
"types": "declaration/index.d.ts", | ||
"scripts": { | ||
"start": "rollup -c -w", | ||
"build": "rm -rf ./dist ./declaration && rollup -c && npm run declaration", | ||
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json", | ||
"jsdoc": "rm -rf ./doc && jsdoc -c jsdoc.json", | ||
"docs:build": "jsdoc-to-mdx -c ./jsdoc-to-mdx.json", | ||
"docs:version": "node ./config/docs-version-up", | ||
"docs:release": "npm run docs:build && npm run docs:version && cd demo && npm run build && cd ..", | ||
"packages:update-dist": "npm run build && pvu --distUpdate=react-conveyer,vue-conveyer,vue2-conveyer,svelte-conveyer,ngx-conveyer/projects/ngx-conveyer --distPaths=declaration,dist", | ||
"packages": "npm run packages:update && npm run packages:build && npm run packages:publish", | ||
"packages:update": "pvu --update=react-conveyer,vue-conveyer,vue2-conveyer,svelte-conveyer,ngx-conveyer/projects/ngx-conveyer", | ||
"packages:build": "pvu --build=react-conveyer,vue-conveyer,vue2-conveyer,svelte-conveyer,ngx-conveyer", | ||
"packages:publish": "pvu --publish=react-conveyer,vue-conveyer,vue2-conveyer,svelte-conveyer,ngx-conveyer/dist/ngx-conveyer", | ||
"test": "karma start", | ||
"coverage": "karma start --coverage && print-coveralls --sort=desc", | ||
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/naver/egjs-conveyer" | ||
}, | ||
"author": "NAVER Crop.", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@egjs/axes": "^2.8.0", | ||
"@egjs/component": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.12", | ||
"@babel/template": "^7.16.7", | ||
"@daybrush/jsdoc": "^0.3.12", | ||
"@egjs/build-helper": "^0.1.2", | ||
"@types/babel__core": "^7.1.18", | ||
"@types/babel__template": "^7.4.1", | ||
"@types/chai": "^4.1.7", | ||
"@types/karma-chai": "^0.1.1", | ||
"@types/mocha": "^5.2.6", | ||
"chai": "^4.2.0", | ||
"egjs-jsdoc-template": "^1.4.4", | ||
"jsdoc-to-mdx": "^1.1.0", | ||
"karma": "^4.0.1", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-typescript": "^5.5.3", | ||
"karma-viewport": "^1.0.4", | ||
"mocha": "^6.0.2", | ||
"print-coveralls": "^1.2.2", | ||
"pvu": "^0.6.1", | ||
"sinon": "^7.5.0", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.3.5" | ||
} | ||
"name": "@egjs/conveyer", | ||
"version": "1.0.0", | ||
"description": "Conveyer adds Drag gestures to your Native Scroll.", | ||
"main": "./dist/conveyer.cjs.js", | ||
"module": "./dist/conveyer.esm.js", | ||
"types": "declaration/index.d.ts", | ||
"scripts": { | ||
"start": "rollup -c -w", | ||
"build": "rm -rf ./dist ./declaration && rollup -c && npm run declaration", | ||
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json", | ||
"lint": "eslint ./src/ --ext .ts", | ||
"jsdoc": "rm -rf ./doc && jsdoc -c jsdoc.json", | ||
"docs:build": "jsdoc-to-mdx -c ./jsdoc-to-mdx.json", | ||
"docs:version": "node ./config/docs-version-up", | ||
"docs:release": "npm run docs:build && npm run docs:version && cd demo && npm run build && cd ..", | ||
"packages:update-dist": "npm run build && pvu --distUpdate=react-conveyer,vue-conveyer,vue2-conveyer,svelte-conveyer,ngx-conveyer/projects/ngx-conveyer --distPaths=declaration,dist", | ||
"packages": "npm run packages:update && npm run packages:build && npm run packages:publish", | ||
"packages:update": "pvu --update=react-conveyer,vue-conveyer,vue2-conveyer,svelte-conveyer,ngx-conveyer/projects/ngx-conveyer", | ||
"packages:build": "pvu --build=react-conveyer,vue-conveyer,vue2-conveyer,svelte-conveyer,ngx-conveyer", | ||
"packages:publish": "pvu --publish=react-conveyer,vue-conveyer,vue2-conveyer,svelte-conveyer,ngx-conveyer/dist/ngx-conveyer", | ||
"test": "karma start", | ||
"coverage": "karma start --coverage && print-coveralls --sort=desc", | ||
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", | ||
"release": "release-helper upstream", | ||
"demo:prebuild-version": "cpx 'dist/**/*' demo/build/release/$npm_package_version/dist --clean", | ||
"demo:prebuild-latest": "cpx 'dist/**/*' demo/build/release/latest/dist --clean", | ||
"demo:build": "npm run docs:release && npm run build && npm run demo:prebuild-version && npm run demo:prebuild-latest", | ||
"demo:deploy": "npm run demo:build && npm run demo:deploy-add", | ||
"demo:deploy-add": "gh-pages -d demo/build/ --add --remote upstream", | ||
"demo:deploy-init": "gh-pages -d demo/build/ --remote upstream" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/naver/egjs-conveyer" | ||
}, | ||
"author": "NAVER Crop.", | ||
"license": "MIT", | ||
"keywords": [ | ||
"scroll", | ||
"reactive", | ||
"hooks", | ||
"conveyer", | ||
"image", | ||
"video", | ||
"list", | ||
"drag" | ||
], | ||
"dependencies": { | ||
"@egjs/axes": "^2.8.0", | ||
"@egjs/component": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.12", | ||
"@babel/template": "^7.16.7", | ||
"@daybrush/jsdoc": "^0.3.12", | ||
"@egjs/build-helper": "^0.1.2", | ||
"@egjs/release-helper": "0.0.3", | ||
"@types/babel__core": "^7.1.18", | ||
"@types/babel__template": "^7.4.1", | ||
"@types/chai": "^4.1.7", | ||
"@types/karma-chai": "^0.1.1", | ||
"@types/mocha": "^5.2.6", | ||
"@typescript-eslint/eslint-plugin": "^3.9.1", | ||
"@typescript-eslint/parser": "^3.9.1", | ||
"chai": "^4.2.0", | ||
"egjs-jsdoc-template": "^1.4.4", | ||
"eslint": "^7.7.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-react": "^7.22.0", | ||
"gh-pages": "^3.2.3", | ||
"jsdoc-to-mdx": "^1.1.0", | ||
"karma": "^4.0.1", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-typescript": "^5.5.3", | ||
"karma-viewport": "^1.0.4", | ||
"mocha": "^6.0.2", | ||
"print-coveralls": "^1.2.2", | ||
"pvu": "^0.6.1", | ||
"sinon": "^7.5.0", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.3.5" | ||
} | ||
} |
<h1 align="center" style="max-width: 100%;"> | ||
<img width="256" alt="Conveyer Logo" src="./demo/static/img/logo.png" style="max-width: 100%;" /><br/> | ||
<img width="256" alt="Conveyer Logo" src="https://naver.github.io/egjs-conveyer/img/logo.png" style="max-width: 100%;" /><br/> | ||
<a href="https://naver.github.io/egjs-conveyer/">Conveyer</a> | ||
@@ -10,13 +10,13 @@ </h1> | ||
<a href="https://www.npmjs.com/package/@egjs/conveyer" target="_blank"><img alt="npm bundle size (scoped)" src="https://img.shields.io/bundlephobia/minzip/@egjs/conveyer.svg?style=flat-square&label=%F0%9F%92%BE%20gzipped&color=007acc" /></a> | ||
<a href="https://travis-ci.org/naver/egjs-conveyer" target="_blank"><img alt="Travis (.org)" src="https://img.shields.io/travis/naver/egjs-conveyer.svg?style=flat-square&label=build&logo=travis%20ci" /></a> | ||
<a href="https://github.com/naver/egjs-grid/actions" target="_blank"><img alt="Github actions" src="https://img.shields.io/github/workflow/status/naver/egjs-grid/Run%20tests?style=flat-square" /></a> | ||
<a href="https://coveralls.io/github/naver/egjs-conveyer?branch=master&style=flat-square" target="_blank"><img alt="Coveralls github" src="https://img.shields.io/coveralls/github/naver/egjs-conveyer.svg?style=flat-square&label=%E2%9C%85%20coverage" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/master/LICENSE" target="_blank"><img alt="GitHub" src="https://img.shields.io/github/license/naver/egjs-conveyer.svg?style=flat-square&label=%F0%9F%93%9C%20license&color=08CE5D" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/main/LICENSE" target="_blank"><img alt="GitHub" src="https://img.shields.io/github/license/naver/egjs-conveyer.svg?style=flat-square&label=%F0%9F%93%9C%20license&color=08CE5D" /></a> | ||
<img src="https://img.shields.io/static/v1.svg?label=&message=TypeScript&color=294E80&style=flat-square&logo=typescript" /> | ||
</p> | ||
<p align="center" style="line-height: 2;"> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/master/packages/ngx-conveyer/README.md" target="_blank"><img alt="Angular" src="https://img.shields.io/static/v1.svg?label=&message=Angular&style=flat-square&logo=Angular&color=dd0031" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/master/packages/react-conveyer/README.md" target="_blank"><img alt="React" src="https://img.shields.io/static/v1.svg?label=&message=React&style=flat-square&logo=React&logoColor=white&color=61dafb" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/master/packages/vue-conveyer/README.md" target="_blank"><img alt="Vue" src="https://img.shields.io/static/v1.svg?label=&message=Vue3&style=flat-square&logo=Vue.js&logoColor=white&color=42b883" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/master/packages/vue2-conveyer/README.md" target="_blank"><img alt="Vue" src="https://img.shields.io/static/v1.svg?label=&message=Vue2&style=flat-square&logo=Vue.js&logoColor=white&color=42b883" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/master/packages/svelte-conveyer/README.md" target="_blank"><img alt="Svelte" src="https://img.shields.io/static/v1.svg?label=&message=Svelte&style=flat-square&logo=svelte&logoColor=white&color=FF3E00" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/main/packages/ngx-conveyer/README.md" target="_blank"><img alt="Angular" src="https://img.shields.io/static/v1.svg?label=&message=Angular&style=flat-square&logo=Angular&color=dd0031" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/main/packages/react-conveyer/README.md" target="_blank"><img alt="React" src="https://img.shields.io/static/v1.svg?label=&message=React&style=flat-square&logo=React&logoColor=white&color=61dafb" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/main/packages/vue-conveyer/README.md" target="_blank"><img alt="Vue" src="https://img.shields.io/static/v1.svg?label=&message=Vue3&style=flat-square&logo=Vue.js&logoColor=white&color=42b883" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/main/packages/vue2-conveyer/README.md" target="_blank"><img alt="Vue" src="https://img.shields.io/static/v1.svg?label=&message=Vue2&style=flat-square&logo=Vue.js&logoColor=white&color=42b883" /></a> | ||
<a href="https://github.com/naver/egjs-conveyer/blob/main/packages/svelte-conveyer/README.md" target="_blank"><img alt="Svelte" src="https://img.shields.io/static/v1.svg?label=&message=Svelte&style=flat-square&logo=svelte&logoColor=white&color=FF3E00" /></a> | ||
@@ -85,7 +85,7 @@ </p> | ||
|:-----:|:-----:|:-----:| | ||
|[**@egjs/ngx-conveyer**](https://github.com/naver/egjs-conveyer/blob/master/packages/ngx-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/ngx-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/ngx-conveyer.svg?style=flat-square&color=dd0031&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/angular.svg" valign="middle" alt="Angular" /> [Angular](https://angular.io/) port of @egjs/conveyer| | ||
|[**@egjs/react-conveyer**](https://github.com/naver/egjs-conveyer/blob/master/packages/react-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/react-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/react-conveyer.svg?style=flat-square&color=00d8ff&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/react.svg" valign="middle" alt="React" /> [React](https://reactjs.org/) port of @egjs/conveyer| | ||
|[**@egjs/vue-conveyer**](https://github.com/naver/egjs-conveyer/blob/master/packages/vue-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/vue-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/vue-conveyer.svg?style=flat-square&color=42b883&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/vue.svg" valign="middle" alt="Vue.js" /> [Vue.js@3](https://vuejs.org/v2/guide/index.html) port of @egjs/conveyer| | ||
|[**@egjs/vue2-conveyer**](https://github.com/naver/egjs-conveyer/blob/master/packages/vue2-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/vue2-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/vue2-conveyer.svg?style=flat-square&color=42b883&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/vue.svg" valign="middle" alt="Vue.js" /> [Vue.js@2](https://v3.vuejs.org/) port of @egjs/conveyer| | ||
|[**@egjs/svelte-conveyer**](https://github.com/naver/egjs-conveyer/blob/master/packages/svelte-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/svelte-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/svelte-conveyer.svg?style=flat-square&color=FF3E00&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/svelte.svg" valign="middle" alt="Svelte" /> [Svelte](https://svelte.dev/) port of @egjs/conveyer| | ||
|[**@egjs/ngx-conveyer**](https://github.com/naver/egjs-conveyer/blob/main/packages/ngx-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/ngx-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/ngx-conveyer.svg?style=flat-square&color=dd0031&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/angular.svg" valign="middle" alt="Angular" /> [Angular](https://angular.io/) port of @egjs/conveyer| | ||
|[**@egjs/react-conveyer**](https://github.com/naver/egjs-conveyer/blob/main/packages/react-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/react-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/react-conveyer.svg?style=flat-square&color=00d8ff&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/react.svg" valign="middle" alt="React" /> [React](https://reactjs.org/) port of @egjs/conveyer| | ||
|[**@egjs/vue-conveyer**](https://github.com/naver/egjs-conveyer/blob/main/packages/vue-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/vue-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/vue-conveyer.svg?style=flat-square&color=42b883&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/vue.svg" valign="middle" alt="Vue.js" /> [Vue.js@3](https://vuejs.org/v2/guide/index.html) port of @egjs/conveyer| | ||
|[**@egjs/vue2-conveyer**](https://github.com/naver/egjs-conveyer/blob/main/packages/vue2-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/vue2-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/vue2-conveyer.svg?style=flat-square&color=42b883&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/vue.svg" valign="middle" alt="Vue.js" /> [Vue.js@2](https://v3.vuejs.org/) port of @egjs/conveyer| | ||
|[**@egjs/svelte-conveyer**](https://github.com/naver/egjs-conveyer/blob/main/packages/svelte-conveyer/README.md)|<a href="https://www.npmjs.com/package/@egjs/svelte-conveyer" target="_blank"><img src="https://img.shields.io/npm/v/@egjs/svelte-conveyer.svg?style=flat-square&color=FF3E00&label=%F0%9F%94%96" alt="version" /></a>|<img width="15" src="https://naver.github.io/egjs-conveyer/img/icons/svelte.svg" valign="middle" alt="Svelte" /> [Svelte](https://svelte.dev/) port of @egjs/conveyer| | ||
@@ -104,3 +104,3 @@ ## 🌐 Supported Browsers | ||
## 🙌 Contributing | ||
See [CONTRIBUTING.md](https://github.com/naver/egjs-conveyer/blob/master/CONTRIBUTING.md). | ||
See [CONTRIBUTING.md](https://github.com/naver/egjs-conveyer/blob/main/CONTRIBUTING.md). | ||
@@ -107,0 +107,0 @@ ## 📝 Feedback |
@@ -24,4 +24,6 @@ import { EventCallback, EventKey } from "@egjs/component/declaration/types"; | ||
destroy: (instance: Instance, data: Data) => void; | ||
on?: <EventName extends EventKey<Events>>(instance: Instance, eventName: EventName, listener: EventCallback<Events, EventName, Instance>) => void; | ||
off?: <EventName extends EventKey<Events>>(instance: Instance, eventName: EventName, listener: EventCallback<Events, EventName, Instance>) => void; | ||
on?: <EventName extends EventKey<Events>>( | ||
instance: Instance, eventName: EventName, listener: EventCallback<Events, EventName, Instance>) => void; | ||
off?: <EventName extends EventKey<Events>>( | ||
instance: Instance, eventName: EventName, listener: EventCallback<Events, EventName, Instance>) => void; | ||
}; |
@@ -6,3 +6,7 @@ import { OBSERVERS_PATH } from "./const"; | ||
export function withReactiveMethods<Instance, Names extends keyof Partial<Instance>, Return extends ReactiveMethods<Instance, Names>>(ref: Ref<Instance>, methods: readonly Names[]): Return { | ||
export function withReactiveMethods< | ||
Instance, | ||
Names extends keyof Partial<Instance>, | ||
Return extends ReactiveMethods<Instance, Names> | ||
>(ref: Ref<Instance>, methods: readonly Names[]): Return { | ||
const obj: Record<any, any> = {}; | ||
@@ -83,4 +87,6 @@ | ||
export interface ReactiveSubscribe<Properties extends Record<string, any>> { | ||
subscribe<Name extends keyof Properties = keyof Properties>(name: Name, callback: (value: Properties[Name]) => void): void; | ||
unsubscribe<Name extends keyof Properties = keyof Properties>(name?: Name, callback?: (value: Properties[Name]) => void): void; | ||
subscribe<Name extends keyof Properties = keyof Properties>( | ||
name: Name, callback: (value: Properties[Name]) => void): void; | ||
unsubscribe<Name extends keyof Properties = keyof Properties>( | ||
name?: Name, callback?: (value: Properties[Name]) => void): void; | ||
} |
@@ -9,3 +9,3 @@ export const CONVEYER_METHODS = [ | ||
"updateItems", | ||
"init" | ||
"init", | ||
] as const; | ||
@@ -25,2 +25,2 @@ | ||
"isReachEnd": false, | ||
} as const; | ||
} as const; |
@@ -131,3 +131,6 @@ import Axes, { PanInput } from "@egjs/axes"; | ||
*/ | ||
public findItem(target: HTMLElement | "start" | "end" | "prev" | "next", options: FindItemOptions = {}): ConveyerItem | null { | ||
public findItem( | ||
target: HTMLElement | "start" | "end" | "prev" | "next", | ||
options: FindItemOptions = {}, | ||
): ConveyerItem | null { | ||
const pos = this.pos; | ||
@@ -137,5 +140,5 @@ const scrollSize = this.scrollSize; | ||
const hitTest = options?.hitTest ?? 1; | ||
const items = [{ pos: 0, size: 0, }, ...this.items, { pos: scrollSize, size: 0 }]; | ||
const items = [{ pos: 0, size: 0 }, ...this.items, { pos: scrollSize, size: 0 }]; | ||
const endPos = pos + size; | ||
let sibling = options.sibling; | ||
const sibling = options.sibling; | ||
let selectedItem: ConveyerItem | undefined; | ||
@@ -142,0 +145,0 @@ |
import Conveyer from "./Conveyer"; | ||
import { CONVEYER_EVENTS, CONVEYER_METHODS, CONVEYER_REACTIVE_STATE } from "./consts"; | ||
import { ReactiveAdapter, ReactiveSubscribe, Ref } from "./cfcs"; | ||
import { ReactiveAdapter, Ref } from "./cfcs"; | ||
import { ConveyerEvents, ConveyerMethods, ConveyerOptions, ConveyerReactiveState } from "./types"; | ||
@@ -5,0 +5,0 @@ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1489945
72
22998
1
32