@egjs/flicking 4.3.1 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/declaration/Flicking.d.ts +30 -12
- package/declaration/camera/Camera.d.ts +29 -26
- package/declaration/camera/index.d.ts +2 -4
- package/declaration/camera/mode/BoundCameraMode.d.ts +13 -0
- package/declaration/camera/mode/CameraMode.d.ts +19 -0
- package/declaration/camera/mode/CircularCameraMode.d.ts +18 -0
- package/declaration/camera/mode/LinearCameraMode.d.ts +9 -0
- package/declaration/camera/mode/index.d.ts +6 -0
- package/declaration/const/error.d.ts +3 -1
- package/declaration/const/external.d.ts +9 -0
- package/declaration/core/AutoResizer.d.ts +13 -0
- package/declaration/core/VirtualManager.d.ts +37 -0
- package/declaration/core/index.d.ts +2 -1
- package/declaration/core/panel/Panel.d.ts +13 -7
- package/declaration/core/panel/VirtualPanel.d.ts +19 -0
- package/declaration/core/panel/index.d.ts +4 -4
- package/declaration/core/panel/provider/ElementProvider.d.ts +8 -0
- package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -0
- package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -0
- package/declaration/core/panel/provider/index.d.ts +5 -0
- package/declaration/index.d.ts +11 -1
- package/declaration/renderer/ExternalRenderer.d.ts +1 -1
- package/declaration/renderer/Renderer.d.ts +17 -12
- package/declaration/renderer/VanillaRenderer.d.ts +2 -7
- package/declaration/renderer/index.d.ts +1 -0
- package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -0
- package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -0
- package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -0
- package/declaration/renderer/strategy/index.d.ts +5 -0
- package/declaration/type/external.d.ts +1 -3
- package/declaration/utils.d.ts +7 -1
- package/dist/flicking.esm.js +2526 -1475
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +2561 -1485
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +9006 -8312
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +2 -2
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/package.json +12 -24
- package/src/Flicking.ts +172 -45
- package/src/camera/Camera.ts +201 -93
- package/src/camera/index.ts +3 -7
- package/src/camera/{BoundCamera.ts → mode/BoundCameraMode.ts} +46 -43
- package/src/camera/mode/CameraMode.ts +77 -0
- package/src/camera/mode/CircularCameraMode.ts +171 -0
- package/src/camera/mode/LinearCameraMode.ts +23 -0
- package/src/camera/mode/index.ts +14 -0
- package/src/cfc/sync.ts +10 -5
- package/src/const/error.ts +6 -3
- package/src/const/external.ts +18 -0
- package/src/control/AxesController.ts +11 -6
- package/src/control/Control.ts +6 -6
- package/src/control/FreeControl.ts +2 -2
- package/src/control/SnapControl.ts +3 -3
- package/src/control/StrictControl.ts +2 -2
- package/src/core/AutoResizer.ts +81 -0
- package/src/core/Viewport.ts +4 -4
- package/src/core/VirtualManager.ts +188 -0
- package/src/core/index.ts +3 -1
- package/src/core/panel/Panel.ts +54 -34
- package/src/core/panel/VirtualPanel.ts +110 -0
- package/src/core/panel/index.ts +5 -7
- package/src/core/panel/provider/ElementProvider.ts +14 -0
- package/src/core/panel/provider/VanillaElementProvider.ts +45 -0
- package/src/core/panel/provider/VirtualElementProvider.ts +48 -0
- package/src/core/panel/provider/index.ts +16 -0
- package/src/index.ts +12 -1
- package/src/index.umd.ts +2 -0
- package/src/renderer/ExternalRenderer.ts +7 -7
- package/src/renderer/Renderer.ts +106 -65
- package/src/renderer/VanillaRenderer.ts +28 -86
- package/src/renderer/index.ts +2 -0
- package/src/renderer/strategy/NormalRenderingStrategy.ts +106 -0
- package/src/renderer/strategy/RenderingStrategy.ts +21 -0
- package/src/renderer/strategy/VirtualRenderingStrategy.ts +110 -0
- package/src/renderer/strategy/index.ts +17 -0
- package/src/utils.ts +36 -2
- package/declaration/camera/BoundCamera.d.ts +0 -9
- package/declaration/camera/CircularCamera.d.ts +0 -36
- package/declaration/camera/LinearCamera.d.ts +0 -5
- package/declaration/core/panel/ElementPanel.d.ts +0 -14
- package/declaration/core/panel/ExternalPanel.d.ts +0 -9
- package/declaration/exports.d.ts +0 -10
- package/src/camera/CircularCamera.ts +0 -269
- package/src/camera/LinearCamera.ts +0 -35
- package/src/core/panel/ElementPanel.ts +0 -52
- package/src/core/panel/ExternalPanel.ts +0 -32
- package/src/exports.ts +0 -16
|
@@ -4,7 +4,7 @@ name: @egjs/flicking
|
|
|
4
4
|
license: MIT
|
|
5
5
|
author: NAVER Corp.
|
|
6
6
|
repository: https://github.com/naver/egjs-flicking
|
|
7
|
-
version: 4.
|
|
7
|
+
version: 4.5.0
|
|
8
8
|
*/
|
|
9
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=t()}(this,function(){"use strict";var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function h(e,a,s,u){return new(s=s||Promise)(function(n,t){function i(e){try{o(u.next(e))}catch(e){t(e)}}function r(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(i,r)}o((u=u.apply(e,a||[])).next())})}function m(n,i){var r,o,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,o&&(a=2&t[0]?o.return:t[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,t[1])).done)return a;switch(o=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,o=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=i.call(n,s)}catch(e){t=[6,e],o=0}finally{r=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function l(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function d(e,t){for(var n=0,i=t.length,r=e.length;n<i;n++,r++)e[r]=t[n];return e}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}(arguments[t]));return e}function g(e){return void 0===e}function e(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e]})}),n}function _(e,t){if(!e)throw new H(C.NOT_ATTACHED_TO_FLICKING(t),I.NOT_ATTACHED_TO_FLICKING);return e}function s(e){return[].slice.call(e)}function u(e,t){var n;if(z(e))switch(e){case S.PREV:n=0;break;case S.CENTER:n=.5*t;break;case S.NEXT:n=t;break;default:if(null==(n=c(e,t)))throw new H(C.WRONG_OPTION("align",e),I.WRONG_OPTION)}else n=e;return n}function c(e,t){return null==(e=j(e))?null:e.percentage*t+e.absolute}function v(e,t){return e===t?D.NONE:e<t?D.NEXT:D.PREV}function y(e){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){if(z(e)){var t=document.createElement("div");for(t.innerHTML=e,n.push.apply(n,d([],f(s(t.children))));t.firstChild;)t.removeChild(t.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new H(C.WRONG_TYPE(e,["HTMLElement","string"]),I.WRONG_TYPE);n.push(e)}}),n}function b(e,t){return L(e<0?e+t:e,0,t)}function E(e,t){var n,i;try{for(var r=l(e),o=r.next();!o.done;o=r.next())if(o.value===t)return 1}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}}function P(e,t,n){var i=n-t;return e<t?e=n-(t-e)%i:n<e&&(e=t+(e-n)%i),e}function T(e,t,n){return(e-t)/(n-t)}function O(e){return window.getComputedStyle(e)||e.currentStyle}function x(e,t,n){return t<=e&&e<=n}var n,R=function(){function e(e,t){var n,i;if(this.eventType=e,this._canceled=!1,t)try{for(var r=p(Object.keys(t)),o=r.next();!o.done;o=r.next()){var a=o.value;this[a]=t[a]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}}var t=e.prototype;return t.stop=function(){this._canceled=!0},t.isCanceled=function(){return this._canceled},e}(),t=function(){function e(){this._eventHandler={}}var t=e.prototype;return t.trigger=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var i=t instanceof R?t.eventType:t,i=a(this._eventHandler[i]||[]);return i.length<=0||(t instanceof R?(t.currentTarget=this,i.forEach(function(e){e(t)})):i.forEach(function(e){e.apply(void 0,a(n))})),this},t.once=function(n,i){var r,o=this;if("object"==typeof n&&g(i)){var e,t=n;for(e in t)this.once(e,t[e]);return this}return"string"==typeof n&&"function"==typeof i&&this.on(n,r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.apply(void 0,a(e)),o.off(n,r)}),this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&g(t)){var n,i=e;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof e&&"function"==typeof t&&(r=this._eventHandler[e],g(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)),this},t.off=function(e,t){var n,i;if(g(e))return this._eventHandler={},this;if(g(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r,o=e;for(r in o)this.off(r,o[r]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var u=p(a),c=u.next();!c.done;c=u.next()){if(c.value===t){a.splice(s,1),a.length<=0&&delete this._eventHandler[e];break}s++}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},e.VERSION="3.0.1",e}(),w=R,I={WRONG_TYPE:0,ELEMENT_NOT_FOUND:1,VAL_MUST_NOT_NULL:2,NOT_ATTACHED_TO_FLICKING:3,WRONG_OPTION:4,INDEX_OUT_OF_RANGE:5,POSITION_NOT_REACHABLE:6,TRANSFORM_NOT_SUPPORTED:7,STOP_CALLED_BY_USER:8,ANIMATION_INTERRUPTED:9,ANIMATION_ALREADY_PLAYING:10,NOT_ALLOWED_IN_FRAMEWORK:11,NOT_INITIALIZED:12,NO_ACTIVE:13},C={WRONG_TYPE:function(e,t){return e+"("+typeof e+") is not a "+t.map(function(e){return'"'+e+'"'}).join(" or ")+"."},ELEMENT_NOT_FOUND:function(e){return'Element with selector "'+e+'" not found.'},VAL_MUST_NOT_NULL:function(e,t){return t+" should be provided. Given: "+e},NOT_ATTACHED_TO_FLICKING:function(e){return e+' is not attached to the Flicking instance. "init()" should be called first.'},WRONG_OPTION:function(e,t){return'Option "'+e+'" is not in correct format, given: '+t},INDEX_OUT_OF_RANGE:function(e,t,n){return'Index "'+e+'" is out of range: should be between '+t+" and "+n+"."},POSITION_NOT_REACHABLE:function(e){return'Position "'+e+'" is not reachable.'},TRANSFORM_NOT_SUPPORTED:"Browser does not support CSS transform.",STOP_CALLED_BY_USER:"Event stop() is called by user.",ANIMATION_INTERRUPTED:"Animation is interrupted by user input.",ANIMATION_ALREADY_PLAYING:"Animation is already playing.",NOT_ALLOWED_IN_FRAMEWORK:"This behavior is not allowed in the frameworks like React, Vue, or Angular.",NOT_INITIALIZED:"Flicking is not initialized yet, call init() first.",NO_ACTIVE:"There's no active panel that Flicking has selected. This may be due to the absence of any panels."},N={READY:"ready",BEFORE_RESIZE:"beforeResize",AFTER_RESIZE:"afterResize",HOLD_START:"holdStart",HOLD_END:"holdEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",WILL_CHANGE:"willChange",CHANGED:"changed",WILL_RESTORE:"willRestore",RESTORED:"restored",SELECT:"select",NEED_PANEL:"needPanel",VISIBLE_CHANGE:"visibleChange",REACH_EDGE:"reachEdge",PANEL_CHANGE:"panelChange"},S={PREV:"prev",CENTER:"center",NEXT:"next"},D={PREV:"PREV",NEXT:"NEXT",NONE:null},k={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},A={__proto__:null,EVENTS:N,ALIGN:S,DIRECTION:D,MOVE_TYPE:k,ERROR_CODE:I},L=function(e,t,n){return Math.max(Math.min(e,n),t)},j=function(e){var t=/(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;if("number"==typeof e)return{percentage:0,absolute:e};for(var n={percentage:0,absolute:0},i=0,r=t.exec(e);null!=r;){var o=r[1],a=r[2],s=r[3],a=parseFloat(a);if(!(o=i<=0?o||"+":o))return null;o="+"===o?1:-1;"%"===s?n.percentage+=a/100*o:n.absolute+=o*a,++i,r=t.exec(e)}return 0===i?null:n},z=function(e){return"string"==typeof e},M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},H=(o(F,n=Error),F);function F(e,t){e=n.call(this,e)||this;return M(e,F.prototype),e.name="FlickingError",e.code=t,e}var V=(On=G.prototype,Object.defineProperty(On,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(On,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(On,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(On,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),On.setSize=function(e){var t=e.width,n=e.height,i=this._el,r=this._padding,e=this._isBorderBoxSizing;null!=t&&(z(t)?i.style.width=t:(t=e?t+r.left+r.right:t,i.style.width=t+"px")),null!=n&&(z(n)?i.style.height=n:(n=e?n+r.top+r.bottom:n,i.style.height=n+"px")),this.resize()},On.resize=function(){var e=this._el,t=O(e);this._width=e.clientWidth,this._height=e.clientHeight,this._padding={left:parseFloat(t.paddingLeft),right:parseFloat(t.paddingRight),top:parseFloat(t.paddingTop),bottom:parseFloat(t.paddingBottom)},this._isBorderBoxSizing="border-box"===t.boxSizing},G);function G(e){this._el=e,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}function X(){return(X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function Y(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function W(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var B="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign,U=["","webkit","Moz","MS","ms","o"],q="undefined"==typeof document?{style:{}}:document.createElement("div"),K=Math.round,Z=Math.abs,J=Date.now;function Q(e,t){for(var n,i=t[0].toUpperCase()+t.slice(1),r=0;r<U.length;){if((n=(n=U[r])?n+i:t)in e)return n;r++}}var $="undefined"==typeof window?{}:window,ee=Q(q.style,"touchAction"),te=void 0!==ee;var ne="compute",ie="manipulation",re="none",oe="pan-x",ae="pan-y",se=function(){if(!te)return!1;var t={},n=$.CSS&&$.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=!n||$.CSS.supports("touch-action",e)}),t}(),ue="ontouchstart"in $,ce=void 0!==Q($,"PointerEvent"),le=ue&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),he="touch",fe="mouse",de=1,pe=4,ge=8,ve=["x","y"],me=["clientX","clientY"];function _e(e,t,n){if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function ye(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function be(e,t){return-1<e.indexOf(t)}var Ee=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===ne&&(e=this.compute()),te&&this.manager.element.style&&se[e]&&(this.manager.element.style[ee]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var t=[];return _e(this.manager.recognizers,function(e){ye(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(e){if(be(e,re))return re;var t=be(e,oe),n=be(e,ae);return t&&n?re:t||n?t?oe:ae:be(e,ie)?ie:"auto"}(t.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=be(i,re)&&!se[re],o=be(i,ae)&&!se[ae],a=be(i,oe)&&!se[oe];if(r){var s=1===e.pointers.length,i=e.distance<2,e=e.deltaTime<250;if(s&&i&&e)return}if(!a||!o)return r||o&&6&n||a&&24&n?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Pe(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Te(e){var t=e.length;if(1===t)return{x:K(e[0].clientX),y:K(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:K(n/t),y:K(i/t)}}function Oe(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:K(e.pointers[n].clientX),clientY:K(e.pointers[n].clientY)},n++;return{timeStamp:J(),pointers:t,center:Te(t),deltaX:e.deltaX,deltaY:e.deltaY}}function xe(e,t,n){var i=t[(n=n||ve)[0]]-e[n[0]],n=t[n[1]]-e[n[1]];return Math.sqrt(i*i+n*n)}function Re(e,t,n){var i=t[(n=n||ve)[0]]-e[n[0]],n=t[n[1]]-e[n[1]];return 180*Math.atan2(n,i)/Math.PI}function we(e,t){return e===t?1:Z(e)>=Z(t)?e<0?2:4:t<0?8:16}function Ae(e,t,n){return{x:t/e||0,y:n/e||0}}function Ie(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=Oe(t)),1<r&&!n.firstMultiple?n.firstMultiple=Oe(t):1===r&&(n.firstMultiple=!1);var o,a,s=n.firstInput,u=n.firstMultiple,c=(u||s).center,l=t.center=Te(i);t.timeStamp=J(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=Re(c,l),t.distance=xe(c,l),o=n,r=(a=t).center,s=o.offsetDelta||{},c=o.prevDelta||{},l=o.prevInput||{},a.eventType!==de&&l.eventType!==pe||(c=o.prevDelta={x:l.deltaX||0,y:l.deltaY||0},s=o.offsetDelta={x:r.x,y:r.y}),a.deltaX=c.x+(r.x-s.x),a.deltaY=c.y+(r.y-s.y),t.offsetDirection=we(t.deltaX,t.deltaY);var h,f,d,p,s=Ae(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=s.x,t.overallVelocityY=s.y,t.overallVelocity=Z(s.x)>Z(s.y)?s.x:s.y,t.scale=u?(s=u.pointers,xe(i[0],i[1],me)/xe(s[0],s[1],me)):1,t.rotation=u?(p=u.pointers,Re(i[1],i[0],me)+Re(p[1],p[0],me)):0,t.maxPointers=!n.prevInput||t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers,u=t,p=(i=n).lastInterval||u,n=u.timeStamp-p.timeStamp,u.eventType!==ge&&(25<n||void 0===p.velocity)?(h=(d=Ae(n,n=u.deltaX-p.deltaX,g=u.deltaY-p.deltaY)).x,f=d.y,d=Z(d.x)>Z(d.y)?d.x:d.y,g=we(n,g),i.lastInterval=u):(d=p.velocity,h=p.velocityX,f=p.velocityY,g=p.direction),u.velocity=d,u.velocityX=h,u.velocityY=f,u.direction=g;var g=e.element,e=t.srcEvent,e=e.composedPath?e.composedPath()[0]:e.path?e.path[0]:e.target;Pe(e,g)&&(g=e),t.target=g}function Ce(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=t&de&&i-r==0,r=t&(pe|ge)&&i-r==0;n.isFirst=!!o,n.isFinal=!!r,o&&(e.session={}),n.eventType=t,Ie(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function Ne(e){return e.trim().split(/\s+/g)}function Se(t,e,n){_e(Ne(e),function(e){t.addEventListener(e,n,!1)})}function De(t,e,n){_e(Ne(e),function(e){t.removeEventListener(e,n,!1)})}function ke(e){e=e.ownerDocument||e;return e.defaultView||e.parentWindow||window}var Le=function(){function e(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){ye(t.options.enable,[t])&&n.handler(e)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Se(this.element,this.evEl,this.domHandler),this.evTarget&&Se(this.target,this.evTarget,this.domHandler),this.evWin&&Se(ke(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&De(this.element,this.evEl,this.domHandler),this.evTarget&&De(this.target,this.evTarget,this.domHandler),this.evWin&&De(ke(this.element),this.evWin,this.domHandler)},e}();function je(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}var ze={pointerdown:de,pointermove:2,pointerup:pe,pointercancel:ge,pointerout:ge},Me={2:he,3:"pen",4:fe,5:"kinect"},He="pointerdown",Fe="pointermove pointerup pointercancel";$.MSPointerEvent&&!$.PointerEvent&&(He="MSPointerDown",Fe="MSPointerMove MSPointerUp MSPointerCancel");var Ve=function(t){function n(){var e=n.prototype;return e.evEl=He,e.evWin=Fe,(e=t.apply(this,arguments)||this).store=e.manager.session.pointerEvents=[],e}return Y(n,t),n.prototype.handler=function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=ze[i],o=Me[e.pointerType]||e.pointerType,a=o===he,i=je(t,e.pointerId,"pointerId");r&de&&(0===e.button||a)?i<0&&(t.push(e),i=t.length-1):r&(pe|ge)&&(n=!0),i<0||(t[i]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(i,1))},n}(Le);function Ge(e){return Array.prototype.slice.call(e,0)}function Xe(e,n,t){for(var i=[],r=[],o=0;o<e.length;){var a=n?e[o][n]:e[o];je(r,a)<0&&i.push(e[o]),r[o]=a,o++}return i=t?n?i.sort(function(e,t){return e[n]>t[n]}):i.sort():i}var Ye={touchstart:de,touchmove:2,touchend:pe,touchcancel:ge},We=function(t){function n(){var e;return n.prototype.evTarget="touchstart touchmove touchend touchcancel",(e=t.apply(this,arguments)||this).targetIds={},e}return Y(n,t),n.prototype.handler=function(e){var t=Ye[e.type],n=function(e,t){var n,i,r=Ge(e.touches),o=this.targetIds;if(t&(2|de)&&1===r.length)return o[r[0].identifier]=!0,[r,r];var a=Ge(e.changedTouches),s=[],u=this.target;if(i=r.filter(function(e){return Pe(e.target,u)}),t===de)for(n=0;n<i.length;)o[i[n].identifier]=!0,n++;n=0;for(;n<a.length;)o[a[n].identifier]&&s.push(a[n]),t&(pe|ge)&&delete o[a[n].identifier],n++;if(s.length)return[Xe(i.concat(s),"identifier",!0),s]}.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:he,srcEvent:e})},n}(Le);var Be={mousedown:de,mousemove:2,mouseup:pe},Ue=function(t){function n(){var e=n.prototype;return e.evEl="mousedown",e.evWin="mousemove mouseup",(e=t.apply(this,arguments)||this).pressed=!1,e}return Y(n,t),n.prototype.handler=function(e){var t=Be[e.type];t&de&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=pe),this.pressed&&(t&pe&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:fe,srcEvent:e}))},n}(Le),qe=2500,Ke=25;function Ze(e){var t,n,e=e.changedPointers[0];e.identifier===this.primaryTouch&&(t={x:e.clientX,y:e.clientY},n=this.lastTouches,this.lastTouches.push(t),setTimeout(function(){var e=n.indexOf(t);-1<e&&n.splice(e,1)},qe))}var Je=function(){return function(n){function e(e,t){var o=n.call(this,e,t)||this;return o.handler=function(e,t,n){var i=n.pointerType===he,r=n.pointerType===fe;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)!function(e,t){e&de?(this.primaryTouch=t.changedPointers[0].identifier,Ze.call(this,t)):e&(pe|ge)&&Ze.call(this,t)}.call(W(W(o)),t,n);else if(r&&function(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),r=Math.abs(n-r.y);if(o<=Ke&&r<=Ke)return!0}return!1}.call(W(W(o)),n))return;o.callback(e,t,n)}},o.touch=new We(o.manager,o.handler),o.mouse=new Ue(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return Y(e,n),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(Le)}();function Qe(e,t,n){return Array.isArray(e)&&(_e(e,n[t],n),1)}var $e=1;function et(e,t){t=t.manager;return t?t.get(e):e}function tt(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var nt=function(){function e(e){this.options=X({enable:!0},e=void 0===e?{}:e),this.id=$e++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return B(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Qe(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=et(e,this)).id]||(t[e.id]=e).recognizeWith(this),this},t.dropRecognizeWith=function(e){return Qe(e,"dropRecognizeWith",this)||(e=et(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(Qe(e,"requireFailure",this))return this;var t=this.requireFail;return-1===je(t,e=et(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Qe(e,"dropRequireFailure",this))return this;e=et(e,this);e=je(this.requireFail,e);return-1<e&&this.requireFail.splice(e,1),this},t.hasRequireFailures=function(){return 0<this.requireFail.length},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(t){var n=this,e=this.state;function i(e){n.manager.emit(e,t)}e<8&&i(n.options.event+tt(e)),i(n.options.event),t.additionalEvent&&i(t.additionalEvent),8<=e&&i(n.options.event+tt(e))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=32},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){e=B({},e);if(!ye(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),it=function(t){function e(e){return(e=t.call(this,X({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e=void 0===e?{}:e))||this).pTime=!1,e.pCenter=!1,e._timer=null,e._input=null,e.count=0,e}Y(e,t);var n=e.prototype;return n.getTouchAction=function(){return[ie]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),e.eventType&de&&0===this.count)return this.failTimeout();if(r&&o&&i){if(e.eventType!==pe)return this.failTimeout();o=!this.pTime||e.timeStamp-this.pTime<n.interval,i=!this.pCenter||xe(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,i&&o?this.count+=1:this.count=1,this._input=e,0==this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=8,t.tryEmit()},n.interval),2):8}return 32},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=32},this.options.interval),32},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(nt),rt=function(t){function e(e){return t.call(this,X({pointers:1},e=void 0===e?{}:e))||this}Y(e,t);var n=e.prototype;return n.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,i=6&t,e=this.attrTest(e);return i&&(n&ge||!e)?16|t:i||e?n&pe?8|t:2&t?4|t:2:32},e}(nt);function ot(e){return 16===e?"down":8===e?"up":2===e?"left":4===e?"right":""}var at=function(n){function e(e){return(e=n.call(this,X({event:"pan",threshold:10,pointers:1,direction:30},e=void 0===e?{}:e))||this).pX=null,e.pY=null,e}Y(e,n);var t=e.prototype;return t.getTouchAction=function(){var e=this.options.direction,t=[];return 6&e&&t.push(ae),24&e&&t.push(oe),t},t.directionTest=function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(i=6&t.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,Math.abs(e.deltaX)):(r=0===a?1:a<0?8:16,n=a!==this.pY,Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},t.attrTest=function(e){return rt.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},t.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ot(e.direction);t&&(e.additionalEvent=this.options.event+t),n.prototype.emit.call(this,e)},e}(rt),st=function(i){function e(e){return i.call(this,X({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e=void 0===e?{}:e))||this}Y(e,i);var t=e.prototype;return t.getTouchAction=function(){return at.prototype.getTouchAction.call(this)},t.attrTest=function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),i.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&Z(t)>this.options.velocity&&e.eventType&pe},t.emit=function(e){var t=ot(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},e}(rt),ut=function(n){function e(e){return n.call(this,X({event:"pinch",threshold:0,pointers:2},e=void 0===e?{}:e))||this}Y(e,n);var t=e.prototype;return t.getTouchAction=function(){return[re]},t.attrTest=function(e){return n.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},t.emit=function(e){var t;1!==e.scale&&(t=e.scale<1?"in":"out",e.additionalEvent=this.options.event+t),n.prototype.emit.call(this,e)},e}(rt),ct=function(t){function e(e){return t.call(this,X({event:"rotate",threshold:0,pointers:2},e=void 0===e?{}:e))||this}Y(e,t);var n=e.prototype;return n.getTouchAction=function(){return[re]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(rt),lt=function(t){function e(e){return(e=t.call(this,X({event:"press",pointers:1,time:251,threshold:9},e=void 0===e?{}:e))||this)._timer=null,e._input=null,e}Y(e,t);var n=e.prototype;return n.getTouchAction=function(){return["auto"]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!r||!i||e.eventType&(pe|ge)&&!o)this.reset();else if(e.eventType&de)this.reset(),this._timer=setTimeout(function(){t.state=8,t.tryEmit()},n.time);else if(e.eventType&pe)return 8;return 32},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&e.eventType&pe?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=J(),this.manager.emit(this.options.event,this._input)))},e}(nt),ht={domEvents:!1,touchAction:ne,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},ft=[[ct,{enable:!1}],[ut,{enable:!1},["rotate"]],[st,{direction:6}],[at,{direction:6},["swipe"]],[it],[it,{event:"doubletap",taps:2},["tap"]],[lt]];function dt(n,i){var r,o=n.element;o.style&&(_e(n.options.cssProps,function(e,t){r=Q(o.style,t),i?(n.oldCssProps[r]=o.style[r],o.style[r]=e):o.style[r]=n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}var pt=function(){function e(e,t){var n=this;this.options=B({},ht,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((e=this).options.inputClass||(ce?Ve:le?We:ue?Je:Ue))(e,Ce),this.touchAction=new Ee(this,this.options.touchAction),dt(this,!0),_e(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return B(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t,n=this.session;if(!n.stopped){this.touchAction.preventDefaults(e);var i=this.recognizers,r=n.curRecognizer;(!r||8&r.state)&&(r=n.curRecognizer=null);for(var o=0;o<i.length;)t=i[o],2===n.stopped||r&&t!==r&&!t.canRecognizeWith(r)?t.reset():t.recognize(e),!r&&14&t.state&&(r=n.curRecognizer=t),o++}},t.get=function(e){if(e instanceof nt)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(Qe(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),(e.manager=this).touchAction.update(),e},t.remove=function(e){if(Qe(e,"remove",this))return this;var t=this.get(e);return!e||-1!==(t=je(e=this.recognizers,t))&&(e.splice(t,1),this.touchAction.update()),this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var n=this.handlers;return _e(Ne(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(void 0===e)return this;var n=this.handlers;return _e(Ne(e),function(e){t?n[e]&&n[e].splice(je(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){var n,i,r;this.options.domEvents&&(n=e,i=t,(r=document.createEvent("Event")).initEvent(n,!0,!0),(r.gesture=i).target.dispatchEvent(r));var o=this.handlers[e]&&this.handlers[e].slice();if(o&&o.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var a=0;a<o.length;)o[a](t),a++}},t.destroy=function(){this.element&&dt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),gt={touchstart:de,touchmove:2,touchend:pe,touchcancel:ge},vt=function(t){function n(){var e=n.prototype;return e.evTarget="touchstart",e.evWin="touchstart touchmove touchend touchcancel",(e=t.apply(this,arguments)||this).started=!1,e}return Y(n,t),n.prototype.handler=function(e){var t,n=gt[e.type];n===de&&(this.started=!0),this.started&&(t=function(e,t){var n=Ge(e.touches),e=Ge(e.changedTouches);t&(pe|ge)&&(n=Xe(n.concat(e),"identifier",!0));return[n,e]}.call(this,e,n),n&(pe|ge)&&t[0].length-t[1].length==0&&(this.started=!1),this.callback(this.manager,n,{pointers:t[0],changedPointers:t[1],pointerType:he,srcEvent:e}))},n}(Le);function mt(n,e,t){var i="DEPRECATED METHOD: "+e+"\n"+t+" AT \n";return function(){var e=new Error("get-stack-trace"),t=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",e=window.console&&(window.console.warn||window.console.log);return e&&e.call(window.console,i,t),n.apply(this,arguments)}}var _t=mt(function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)n&&void 0!==e[i[r]]||(e[i[r]]=t[i[r]]),r++;return e},"extend","Use `assign`."),yt=mt(function(e,t){return _t(e,t,!0)},"merge","Use `assign`.");function bt(e,t,n){var i=t.prototype,t=e.prototype=Object.create(i);t.constructor=e,t._super=i,n&&B(t,n)}function Et(e,t){return function(){return e.apply(t,arguments)}}function Pt(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return!0;return!1}function Tt(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return e[i];return null}function Ot(e,t){try{return new RegExp(e,"g").exec(t)}catch(e){return null}}function xt(e){return e.replace(/_/g,".")}function Rt(e,n){var i=null,r="-1";return Pt(e,function(e){var t=Ot("("+e.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);return t&&!e.brand&&(i=e,r=t[3]||"-1",e.versionAlias?r=e.versionAlias:e.versionTest&&(e=e.versionTest.toLowerCase(),r=((e=Ot("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",e=n))?e[3]:"")||r),r=xt(r),1)}),{preset:i,version:r}}function wt(e,n){var i={brand:"",version:"-1"};return Pt(e,function(e){var t=At(n,e);return t&&(i.brand=e.id,i.version=e.versionAlias||t.version,"-1"!==i.version)}),i}function At(e,t){return Tt(e,function(e){e=e.brand;return Ot(""+t.test,e.toLowerCase())})}(function(){function e(e,t){return void 0===t&&(t={}),new pt(e,X({recognizers:ft.concat()},t))}return e.VERSION="2.0.17-rc",e.DIRECTION_ALL=30,e.DIRECTION_DOWN=16,e.DIRECTION_LEFT=2,e.DIRECTION_RIGHT=4,e.DIRECTION_UP=8,e.DIRECTION_HORIZONTAL=6,e.DIRECTION_VERTICAL=24,e.DIRECTION_NONE=1,e.DIRECTION_DOWN=16,e.INPUT_START=de,e.INPUT_MOVE=2,e.INPUT_END=pe,e.INPUT_CANCEL=ge,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=32,e.Manager=pt,e.Input=Le,e.TouchAction=Ee,e.TouchInput=We,e.MouseInput=Ue,e.PointerEventInput=Ve,e.TouchMouseInput=Je,e.SingleTouchInput=vt,e.Recognizer=nt,e.AttrRecognizer=rt,e.Tap=it,e.Pan=at,e.Swipe=st,e.Pinch=ut,e.Rotate=ct,e.Press=lt,e.on=Se,e.off=De,e.each=_e,e.merge=yt,e.extend=_t,e.bindFn=Et,e.assign=B,e.inherit=bt,e.bindFn=Et,e.prefixed=Q,e.toArray=Ge,e.inArray=je,e.uniqueArray=Xe,e.splitStr=Ne,e.boolOrFn=ye,e.hasParent=Pe,e.addEventListeners=Se,e.removeEventListeners=De,e.defaults=B({},ht,{preset:ft}),e})().defaults;var It=[{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"}],Ct=[{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}],Nt=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],St=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Dt=[{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 kt(e){var t=function(e){if(void 0===e){if("undefined"==typeof navigator||!navigator)return"";e=navigator.userAgent||""}return e.toLowerCase()}(e),n=!!/mobi/g.exec(t),i={name:"unknown",version:"-1",majorVersion:-1,webview:!!Rt(St,t).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=Rt(It,t),a=o.preset,s=o.version,u=Rt(Dt,t),e=u.preset,o=u.version,u=Rt(Ct,t);return i.chromium=!!u.preset,i.chromiumVersion=u.version,i.chromium||(t=Rt(Nt,t),i.webkit=!!t.preset,i.webkitVersion=t.version),e&&(r.name=e.id,r.version=o,r.majorVersion=parseInt(o,10)),a&&(i.name=a.id,i.version=s,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 Lt(e){return void 0===e}var jt=function(){function e(){this.options={},this._eventHandler={}}var t=e.prototype;return t.trigger=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!(0<(a=this._eventHandler[e]||[]).length))return!0;var r=n[0]||{},o=n.slice(1),a=a.concat(),s=!1;r.eventType=e,r.stop=function(){s=!0},r.currentTarget=this;var u=[r];return 1<=o.length&&(u=u.concat(o)),a.forEach(function(e){e.apply(t,u)}),!s},t.once=function(n,i){var r,o=this;if("object"==typeof n&&Lt(i)){var e,t=n;for(e in t)this.once(e,t[e]);return this}return"string"==typeof n&&"function"==typeof i&&this.on(n,r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.apply(o,e),o.off(n,r)}),this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&Lt(t)){var n,i=e;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof e&&"function"==typeof t&&(Lt(r=this._eventHandler[e])&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)),this},t.off=function(e,t){var n,i;if(Lt(e))return this._eventHandler={},this;if(Lt(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r,o=e;for(r in o)this.off(r,o[r]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),c=u.next();!c.done;c=u.next()){if(c.value===t){a.splice(s,1);break}s++}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},e.VERSION="2.2.2",e}(),zt=function(e,t){return(zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var Mt=function(){return(Mt=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function Ht(e,t,n,i){var t=[!n[0]&&i?t[0]-i[0]:t[0],!n[1]&&i?t[1]+i[1]:t[1]],r=Math.max(t[0],e);return Math.min(t[1],r)}function Ft(e,t){return e<t[0]||e>t[1]}function Vt(e,t,n){return n[1]&&e>t[1]||n[0]&&e<t[0]}function Gt(e,t,n){var i=e,r=t[0],o=t[1],t=o-r;return n[1]&&o<e&&(i=(i-o)%t+r),i=n[0]&&e<r?(i-r)%t+o:i}function Xt(e){for(var t=[],n=0,i=e.length;n<i;n++)t.push(e[n]);return t}var Yt,Wt,Bt,Ut=(Yt="undefined"==typeof window?{navigator:{userAgent:""}}:window).requestAnimationFrame||Yt.webkitRequestAnimationFrame,qt=Yt.cancelAnimationFrame||Yt.webkitCancelAnimationFrame;function Kt(e,t){var n,i={};for(n in e)n&&(i[n]=t(e[n],n));return i}function Zt(e,t){var n,i={};for(n in e)n&&t(e[n],n)&&(i[n]=e[n]);return i}function Jt(e,t){for(var n in e)if(n&&!t(e[n],n))return!1;return!0}function Qt(e,n){return Jt(e,function(e,t){return e===n[t]})}Ut&&!qt?(Wt={},Bt=Ut,Ut=function(t){var n=Bt(function(e){Wt[n]&&t(e)});return Wt[n]=!0,n},qt=function(e){delete Wt[e]}):Ut&&qt||(Ut=function(e){return Yt.setTimeout(function(){e(Yt.performance&&Yt.performance.now&&Yt.performance.now()||(new Date).getTime())},16)},qt=Yt.clearTimeout);var $t={};function en(e,t){var n,i;return $t[t]||($t[t]=(i=(n=t)<1?Math.pow(10,nn(n)):1,function(e){return 0===n?0:Math.round(Math.round(e/n)*n*i)/i})),$t[t](e)}function tn(e,n){if(!e||!n)return e;var i="number"==typeof n;return Kt(e,function(e,t){return en(e,i?n:n[t])})}function nn(e){if(!isFinite(e))return 0;var t=e+"";if(0<=t.indexOf("e")){for(var n=0,i=1;Math.round(e*i)/i!==e;)i*=10,n++;return n}return 0<=t.indexOf(".")?t.length-t.indexOf(".")-1:0}function rn(e,t,n){return Math.max(Math.min(e,n),t)}var on,an=function(){function e(e){var t=e.options,n=e.itm,i=e.em,e=e.axm;this.options=t,this.itm=n,this.em=i,this.axm=e,this.animationEnd=this.animationEnd.bind(this)}var t=e.prototype;return t.getDuration=function(n,e,t){var i,r=this;return rn(void 0!==t?t:(i=Kt(e,function(e,t){return e=Math.abs(e-n[t]),t=r.options.deceleration,(t=Math.sqrt(e/t*2))<100?0:t}),Object.keys(i).reduce(function(e,t){return Math.max(e,i[t])},-1/0)),this.options.minimumDuration,this.options.maximumDuration)},t.createAnimationParam=function(e,t,n){var i=this.axm.get(),r=e,e=n&&n.event||null;return{depaPos:i,destPos:r,duration:rn(t,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:e,input:n&&n.input||null,isTrusted:!!e,done:this.animationEnd}},t.grab=function(e,t){var n;this._animateParam&&e.length&&(n=this.axm.get(e),Jt(e=this.axm.map(n,function(e,t){return Gt(e,t.range,t.circular)}),function(e,t){return n[t]===e})||this.em.triggerChange(e,!1,n,t,!!t),this._animateParam=null,this._raf&&(e=this._raf,qt(e)),this._raf=null,this.em.triggerAnimationEnd(!(!t||!t.event)))},t.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},t.restore=function(e){var t=this.axm.get(),n=this.axm.map(t,function(e,t){return Math.min(t.range[1],Math.max(t.range[0],e))});this.animateTo(n,this.getDuration(t,n),e)},t.animationEnd=function(){var e=this.getEventInfo();this._animateParam=null;var t=this.axm.filter(this.axm.get(),function(e,t){return Vt(e,t.range,t.circular)});0<Object.keys(t).length&&this.setTo(this.axm.map(t,function(e,t){return Gt(e,t.range,t.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!e),this.axm.isOutside()?this.restore(e):this.finish(!!e)},t.finish=function(e){this._animateParam=null,this.itm.setInterrupt(!1),this.em.triggerFinish(e)},t.animateLoop=function(a,s){var u,c,l,h,f,d,p,g;a.duration?(this._animateParam=Mt({},a),u=this._animateParam,c=this,l=u.destPos,h=u.depaPos,f=0,d=Kt(h,function(e,t){return e<=l[t]?1:-1}),p=Kt(l,function(e){return e}),g=(new Date).getTime(),u.startTime=g,function e(){c._raf=null;var t=(new Date).getTime(),r=(t-u.startTime)/a.duration,o=c.easing(r),n=c.axm.map(h,function(e,t,n){var i=1<=r?l[n]:e+u.delta[n]*(o-f),e=Gt(i,t.range,t.circular);return i!==e&&(t=d[n]*(t.range[1]-t.range[0]),l[n]-=t,h[n]-=t),e}),i=!c.em.triggerChange(n,!1,h);h=n,g=t,1<=(f=o)?(Qt(l=c.getFinalPos(l,p),c.axm.get(Object.keys(l)))||c.em.triggerChange(l,!0,h),s()):i?c.finish(!1):c._raf=Ut(e)}()):(this.em.triggerChange(a.destPos,!0),s())},t.getFinalPos=function(e,n){var i=this;return Kt(e,function(e,t){return e>=n[t]-1e-6&&e<=n[t]+1e-6?n[t]:en(e,i.getRoundUnit(e,t))})},t.getRoundUnit=function(e,t){var n=this.options.round,i=null;return n||(t=this.axm.getAxisOptions(t),e=Math.max(nn(t.range[0]),nn(t.range[1]),nn(e)),i=1/Math.pow(10,e)),i||n},t.getUserControll=function(e){e=e.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=rn(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},t.animateTo=function(e,t,n){var i=this,r=this.createAnimationParam(e,t,n),e=Mt({},r.depaPos),t=this.em.triggerAnimationStart(r),r=this.getUserControll(r);!t&&this.axm.every(r.destPos,function(e,t){return Vt(e,t.range,t.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),t&&!Qt(r.destPos,e)&&(t=n&&n.event||null,this.animateLoop({depaPos:e,destPos:r.destPos,duration:r.duration,delta:this.axm.getDelta(e,r.destPos),isTrusted:!!t,inputEvent:t,input:n&&n.input||null},function(){return i.animationEnd()}))},t.easing=function(e){return 1<e?1:this.options.easing(e)},t.setTo=function(e,t){void 0===t&&(t=0);var n=Object.keys(e);this.grab(n);var i=this.axm.get(n);if(Qt(e,i))return this;this.itm.setInterrupt(!0);e=Zt(e,function(e,t){return i[t]!==e});return Object.keys(e).length&&(Qt(e=this.axm.map(e,function(e,t){var n=t.range,t=t.circular;return t&&(t[0]||t[1])?e:Ht(e,n,t)}),i)||(0<t?this.animateTo(e,t):(this.em.triggerChange(e),this.finish(!1)))),this},t.setBy=function(n,e){return void 0===e&&(e=0),this.setTo(Kt(this.axm.get(Object.keys(n)),function(e,t){return e+n[t]}),e)},e}(),sn=function(){function e(e){this.axes=e}var t=e.prototype;return t.triggerHold=function(e,t){e=this.getRoundPos(e).roundPos;this.axes.trigger("hold",{pos:e,input:t.input||null,inputEvent:t.event||null,isTrusted:!0})},t.triggerRelease=function(e){var t=this.getRoundPos(e.destPos,e.depaPos),n=t.roundPos,t=t.roundDepa;e.destPos=n,e.depaPos=t,e.setTo=this.createUserControll(e.destPos,e.duration),this.axes.trigger("release",e)},t.triggerChange=function(e,t,n,i,r){void 0===r&&(r=!1);var o=this.am,a=o.axm,o=o.getEventInfo(),e=this.getRoundPos(e,n),n=e.roundPos,e=e.roundDepa,n=a.moveTo(n,e),e=i&&i.event||o&&o.event||null,o={pos:n.pos,delta:n.delta,holding:r,inputEvent:e,isTrusted:!!e,input:i&&i.input||o&&o.input||null,set:e?this.createUserControll(n.pos):function(){}},n=this.axes.trigger("change",o);return e&&a.set(o.set().destPos),n},t.triggerAnimationStart=function(e){var t=this.getRoundPos(e.destPos,e.depaPos),n=t.roundPos,t=t.roundDepa;return e.destPos=n,e.depaPos=t,e.setTo=this.createUserControll(e.destPos,e.duration),this.axes.trigger("animationStart",e)},t.triggerAnimationEnd=function(e){this.axes.trigger("animationEnd",{isTrusted:e=void 0===e?!1:e})},t.triggerFinish=function(e){this.axes.trigger("finish",{isTrusted:e=void 0===e?!1:e})},t.createUserControll=function(e,t){void 0===t&&(t=0);var n={destPos:Mt({},e),duration:t};return function(e,t){return e&&(n.destPos=Mt({},e)),void 0!==t&&(n.duration=t),n}},t.setAnimationManager=function(e){this.am=e},t.destroy=function(){this.axes.off()},t.getRoundPos=function(e,t){var n=this.axes.options.round;return{roundPos:tn(e,n),roundDepa:tn(t,n)}},e}(),un=function(){function e(e){this.options=e,this._prevented=!1}var t=e.prototype;return t.isInterrupting=function(){return this.options.interruptable||this._prevented},t.isInterrupted=function(){return!this.options.interruptable&&this._prevented},t.setInterrupt=function(e){this.options.interruptable||(this._prevented=e)},e}(),cn=function(){function e(e,t){var n=this;this.axis=e,this.options=t,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(e,t){return e[t]=n.axis[t].range[0],e},{})}var t=e.prototype;return t._complementOptions=function(){var r=this;Object.keys(this.axis).forEach(function(i){r.axis[i]=Mt({range:[0,100],bounce:[0,0],circular:[!1,!1]},r.axis[i]),["bounce","circular"].forEach(function(e){var t=r.axis,n=t[i][e];/string|number|boolean/.test(typeof n)&&(t[i][e]=[n,n])})})},t.getDelta=function(e,t){var n=this.get(e);return Kt(this.get(t),function(e,t){return e-n[t]})},t.get=function(e){var n=this;return e&&Array.isArray(e)?e.reduce(function(e,t){return t&&t in n._pos&&(e[t]=n._pos[t]),e},{}):Mt(Mt({},this._pos),e||{})},t.moveTo=function(n,i){void 0===i&&(i=this._pos);var e=Kt(this._pos,function(e,t){return t in n&&t in i?n[t]-i[t]:0});return this.set(this.map(n,function(e,t){return t?Gt(e,t.range,t.circular):0})),{pos:Mt({},this._pos),delta:e}},t.set=function(e){for(var t in e)t&&t in this._pos&&(this._pos[t]=e[t])},t.every=function(e,n){var i=this.axis;return Jt(e,function(e,t){return n(e,i[t],t)})},t.filter=function(e,n){var i=this.axis;return Zt(e,function(e,t){return n(e,i[t],t)})},t.map=function(e,n){var i=this.axis;return Kt(e,function(e,t){return n(e,i[t],t)})},t.isOutside=function(e){return!this.every(e?this.get(e):this._pos,function(e,t){return!Ft(e,t.range)})},t.getAxisOptions=function(e){return this.axis[e]},e}(),ln=function(){function e(e){var t=e.options,n=e.itm,i=e.em,r=e.axm,e=e.am;this.isOutside=!1,this.moveDistance=null,this.isStopped=!1,this.options=t,this.itm=n,this.em=i,this.axm=r,this.am=e}var t=e.prototype;return t.atOutside=function(e){var o=this;if(this.isOutside)return this.axm.map(e,function(e,t){var n=t.range[0]-t.bounce[0],t=t.range[1]+t.bounce[1];return t<e?t:e<n?n:e});var a=this.am.easing(1e-5)/1e-5;return this.axm.map(e,function(e,t){var n=t.range[0],i=t.range[1],r=t.bounce,t=t.circular;return t&&(t[0]||t[1])?e:e<n?n-o.am.easing((n-e)/(r[0]*a))*r[0]:i<e?i+o.am.easing((e-i)/(r[1]*a))*r[1]:e})},t.get=function(e){return this.axm.get(e.axes)},t.hold=function(e,t){!this.itm.isInterrupted()&&e.axes.length&&(this.isStopped=!(t={input:e,event:t}),this.itm.setInterrupt(!0),this.am.grab(e.axes,t),this.moveDistance||this.em.triggerHold(this.axm.get(),t),this.isOutside=this.axm.isOutside(e.axes),this.moveDistance=this.axm.get(e.axes))},t.change=function(e,t,n){var i,r;this.isStopped||!this.itm.isInterrupting()||this.axm.every(n,function(e){return 0===e})||(r=Kt(i=this.moveDistance||this.axm.get(e.axes),function(e,t){return e+(n[t]||0)}),this.moveDistance&&(this.moveDistance=r),this.isOutside&&this.axm.every(i,function(e,t){return!Ft(e,t.range)})&&(this.isOutside=!1),i=this.atOutside(i),r=this.atOutside(r),this.em.triggerChange(r,!1,i,{input:e,event:t},!0)||(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1)))},t.release=function(e,t,n,i){var r,o;!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance&&(r=this.axm.get(e.axes),o=this.axm.get(),n=this.axm.get(this.axm.map(n,function(e,t,n){return t.circular&&(t.circular[0]||t.circular[1])?r[n]+e:Ht(r[n]+e,t.range,t.circular,t.bounce)})),n={depaPos:o,destPos:n=0===(i=this.am.getDuration(n,r,i))?Mt({},o):n,duration:i,delta:this.axm.getDelta(o,n),inputEvent:t,input:e,isTrusted:!0},this.em.triggerRelease(n),this.moveDistance=null,e={input:e,event:t},(n=Qt((t=this.am.getUserControll(n)).destPos,o))||0===t.duration?(n||this.em.triggerChange(t.destPos,!1,o,e,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(e):this.em.triggerFinish(!0)):this.am.animateTo(t.destPos,t.duration,e))},e}(),hn="ontouchstart"in Yt&&"safari"===(void 0===on&&function(){if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData){var e=navigator.userAgentData,e=e.brands||e.uaList;return e&&e.length}}()?function(e){var t=((r=navigator.userAgentData).uaList||r.brands).slice(),n=r.mobile||!1,i={name:(a=t[0]).brand,version:a.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!wt(St,t).brand},r={name:"unknown",version:"-1",majorVersion:-1};i.webkit=!i.chromium&&Pt(Nt,function(e){return At(t,e)});var o,a=wt(Ct,t);i.chromium=!!a.brand,i.chromiumVersion=a.version,i.chromium||(a=wt(Nt,t),i.webkit=!!a.brand,i.webkitVersion=a.version),e&&(o=e.platform.toLowerCase(),s=Tt(Dt,function(e){return new RegExp(""+e.test,"g").exec(o)}),r.name=s?s.id:o,r.version=e.platformVersion);var s=wt(It,t);return s.brand&&(i.name=s.brand,i.version=e?e.uaFullVersion:s.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=xt(r.version),i.version=xt(i.version),r.majorVersion=parseInt(r.version,10),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:n,isHints:!0}}():kt(on)).browser.name,fn=function(){if("undefined"==typeof document)return"";for(var e=(document.head||document.getElementsByTagName("head")[0]).style,t=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n];return""}(),dn=function(r){function e(){this.constructor=t}var t;function n(e,t,n){void 0===e&&(e={}),void 0===t&&(t={});var i=r.call(this)||this;return i.axis=e,i._inputs=[],i.options=Mt({easing:function(e){return 1-Math.pow(1-e,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null},t),i.itm=new un(i.options),i.axm=new cn(i.axis,i.options),i.em=new sn(i),i.am=new an(i),i.io=new ln(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}zt(t=n,i=r),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e);var i=n.prototype;return i.connect=function(e,t){var n="string"==typeof e?e.split(" "):e.concat();return~this._inputs.indexOf(t)&&this.disconnect(t),"hammer"in t&&((e=this._inputs.filter(function(e){return e.hammer&&e.element===t.element})).length&&(t.hammer=e[0].hammer)),t.mapAxes(n),t.connect(this.io),this._inputs.push(t),this},i.disconnect=function(e){return e?0<=(e=this._inputs.indexOf(e))&&(this._inputs[e].disconnect(),this._inputs.splice(e,1)):(this._inputs.forEach(function(e){return e.disconnect()}),this._inputs=[]),this},i.get=function(e){return this.axm.get(e)},i.setTo=function(e,t){return this.am.setTo(e,t=void 0===t?0:t),this},i.setBy=function(e,t){return this.am.setBy(e,t=void 0===t?0:t),this},i.isBounceArea=function(e){return this.axm.isOutside(e)},i.destroy=function(){this.disconnect(),this.em.destroy()},n.VERSION="2.8.0",n.TRANSFORM=fn,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=24,n.DIRECTION_ALL=30,n}(jt),pn="PointerEvent"in Yt||"MSPointerEvent"in Yt,gn="ontouchstart"in Yt,vn="_EGJS_AXES_INPUTTYPE_";function mn(i,e){return e.reduce(function(e,t,n){return i[n]&&(e[i[n]]=t),e},{})}function _n(e,t,n){return n?!!(30===t||t&e&&n&e):!!(t&e)}var yn,bn=function(){function e(e,t){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,this.isRightEdge=!1,this.rightEdgeTimer=0,this.panFlag=!1,void 0===pt)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=function t(e,n){var i;return void 0===n&&(n=!1),"string"==typeof e?(i=e.match(/^<([a-z]+)\s*([^>]*)>/)?((i=document.createElement("div")).innerHTML=e,Xt(i.childNodes)):Xt(document.querySelectorAll(e)),n||(i=1<=i.length?i[0]:void 0)):e===Yt||e.nodeName&&(1===e.nodeType||9===e.nodeType)?i=e:"jQuery"in Yt&&e instanceof jQuery||e.constructor.prototype.jquery?i=n?e.toArray():e.get(0):Array.isArray(e)&&(i=e.map(function(e){return t(e)}),n||(i=1<=i.length?i[0]:void 0)),i}(e),this.options=Mt({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"}}},t),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var t=e.prototype;return t.mapAxes=function(e){var t=!!e[0],n=!!e[1];this._direction=t&&n?30:t?6:n?24:1,this.axes=e},t.connect=function(e){var t,n,i,r={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var o=(o=this.element[vn])||String(Math.round(Math.random()*(new Date).getTime())),a=(a=this.options.inputType,i=n=t=!1,(a=void 0===a?[]:a).forEach(function(e){switch(e){case"mouse":n=!0;break;case"touch":t=gn;break;case"pointer":i=pn}}),i?Ve:t&&n?Je:t?We:n?Ue:null);if(!a)throw new Error("Wrong inputType parameter!");this.hammer=function(e,t){try{return new pt(e,Mt({},t))}catch(e){return null}}(this.element,Mt({inputClass:a},this.options.hammerManagerOptions)),this.element[vn]=o}return this.panRecognizer=new at(r),this.hammer.add(this.panRecognizer),this.attachEvent(e),this},t.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=1,this},t.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[vn],this.element=null,this.hammer=null},t.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},t.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},t.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},t.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},t.onHammerInput=function(e){var t;this.isEnable()&&(e.isFirst?(this.panFlag=!1)!==e.srcEvent.cancelable&&(t=this.options.iOSEdgeSwipeThreshold,this.observer.hold(this,e),this.isRightEdge=hn&&e.center.x>window.innerWidth-t,this.panFlag=!0):e.isFinal&&this.onPanend(e))},t.onPanmove=function(e){var t=this;if(this.panFlag){var n,i=this.options,r=i.iOSEdgeSwipeThreshold,o=i.releaseOnScroll,i=(n=e.angle,(i=this.options.thresholdAngle)<0||90<i?1:(n=Math.abs(n),i<n&&n<180-i?24:6)),a=this.hammer.session.prevInput;if(!o||e.srcEvent.cancelable){if(a&&hn){if(e.center.x<0)return void this.onPanend(Mt(Mt({},a),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}));this.isRightEdge&&(clearTimeout(this.rightEdgeTimer),e.deltaX<-r?this.isRightEdge=!1:this.rightEdgeTimer=window.setTimeout(function(){t.onPanend(Mt(Mt({},a),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))},100))}a?(e.offsetX=e.deltaX-a.deltaX,e.offsetY=e.deltaY-a.deltaY):(e.offsetX=0,e.offsetY=0);o=this.getOffset([e.offsetX,e.offsetY],[_n(6,this._direction,i),_n(24,this._direction,i)]),r=o.some(function(e){return 0!==e});r&&(!1!==(i=e.srcEvent).cancelable&&i.preventDefault(),i.stopPropagation()),(e.preventSystemEvent=r)&&this.observer.change(this,e,mn(this.axes,o))}else this.onPanend(Mt(Mt({},e),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}},t.onPanend=function(e){var t,n,i,r;this.panFlag&&(clearTimeout(this.rightEdgeTimer),this.panFlag=!1,t=this.getOffset([Math.abs(e.velocityX)*(e.deltaX<0?-1:1),Math.abs(e.velocityY)*(e.deltaY<0?-1:1)],[_n(6,this._direction),_n(24,this._direction)]),n=t,i=this.observer.options.deceleration,r=Math.sqrt(n[0]*n[0]+n[1]*n[1]),i=Math.abs(r/-i),t=[n[0]/2*i,n[1]/2*i],this.observer.release(this,e,mn(this.axes,t)))},t.attachEvent=function(e){this.observer=e,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},t.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},t.getOffset=function(e,t){var n=[0,0],i=this.options.scale;return t[0]&&(n[0]=e[0]*i[0]),t[1]&&(n[1]=e[1]*i[1]),n},e}(),En=dn,Pn={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},Tn="flick";(Ln=yn=yn||{})[Ln.IDLE=0]="IDLE",Ln[Ln.HOLDING=1]="HOLDING",Ln[Ln.DRAGGING=2]="DRAGGING",Ln[Ln.ANIMATING=3]="ANIMATING",Ln[Ln.DISABLED=4]="DISABLED";var On=(qn=xn.prototype,Object.defineProperty(qn,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(qn,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),qn.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},qn.onHold=function(e){},qn.onChange=function(e){},qn.onRelease=function(e){},qn.onAnimationEnd=function(e){},qn.onFinish=function(e){},qn._moveToChangedPosition=function(e){var t,n=e.flicking,i=e.axesEvent,r=e.transitTo,o=i.delta[Tn];o&&(this._delta+=o,e=(t=n.camera).position,o=i.pos[Tn],o=n.circularEnabled?P(o,t.range.min,t.range.max):o,t.lookAt(o),i=new w(N.MOVE,{isTrusted:i.isTrusted,holding:this.holding,direction:v(0,i.delta[Tn]),axesEvent:i}),n.trigger(i),i.isCanceled()&&(t.lookAt(e),r(yn.DISABLED)))},xn);function xn(){this._delta=0,this._targetPanel=null}var Rn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.holding=!1,e.animating=!1,e}o(e,t);var n=e.prototype;return n.onEnter=function(){this._delta=0,this._targetPanel=null},n.onHold=function(e){var t=e.flicking,n=e.axesEvent,e=e.transitTo;t.renderer.panelCount<=0?e(yn.DISABLED):(n=new w(N.HOLD_START,{axesEvent:n}),t.trigger(n),n.isCanceled()?e(yn.DISABLED):e(yn.HOLDING))},n.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control.controller.animatingContext,n=new w(N.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:v(r.start,r.end),axesEvent:n});t.trigger(n),n.isCanceled()?i(yn.DISABLED):i(yn.ANIMATING).onChange(e)},e}(On),wn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.holding=!0,e.animating=!1,e._releaseEvent=null,e}o(e,t);var n=e.prototype;return n.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=n.inputEvent,r=t.horizontal?r.offsetX:r.offsetY,n=new w(N.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:v(0,-r),axesEvent:n});t.trigger(n),n.isCanceled()?i(yn.DISABLED):i(yn.DRAGGING).onChange(e)},n.onRelease=function(e){var t=e.flicking,n=e.axesEvent,e=e.transitTo;if(t.trigger(new w(N.HOLD_END,{axesEvent:n})),0!==n.delta.flick)return n.setTo({flick:t.camera.position},0),void e(yn.IDLE);this._releaseEvent=n},n.onFinish=function(e){var t=e.flicking;if((0,e.transitTo)(yn.IDLE),this._releaseEvent){var n,i=this._releaseEvent.inputEvent.srcEvent;n="touchend"===i.type?(e=i.changedTouches[0],document.elementFromPoint(e.clientX,e.clientY)):i.target;var r,o,i=t.renderer.panels,a=null;try{for(var s=l(i),u=s.next();!u.done;u=s.next()){var c=u.value;if(c.contains(n)){a=c;break}}}catch(e){o={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}a&&(r=t.camera.position,o=a.position,t.trigger(new w(N.SELECT,{index:a.index,panel:a,direction:v(r,o)})))}},e}(On),An=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.holding=!0,e.animating=!0,e}o(e,t);var n=e.prototype;return n.onChange=function(e){this._moveToChangedPosition(e)},n.onRelease=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;t.trigger(new w(N.HOLD_END,{axesEvent:n})),t.renderer.panelCount<=0?i(yn.IDLE):(i(yn.ANIMATING),e=t.control,i=n.destPos[Tn],t=Math.max(n.duration,t.duration),e.moveToPosition(i,t,n))},e}(On),In=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.holding=!1,e.animating=!0,e}o(e,t);var n=e.prototype;return n.onHold=function(e){var t=e.flicking,n=e.axesEvent,e=e.transitTo;this._delta=0,t.control.updateInput();n=new w(N.HOLD_START,{axesEvent:n});t.trigger(n),n.isCanceled()?e(yn.DISABLED):e(yn.DRAGGING)},n.onChange=function(e){this._moveToChangedPosition(e)},n.onFinish=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control,e=r.controller.animatingContext;i(yn.IDLE),t.trigger(new w(N.MOVE_END,{isTrusted:n.isTrusted,direction:v(e.start,e.end),axesEvent:n})),r.setActive(this._targetPanel,r.activePanel,n.isTrusted)},e}(On),Cn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.holding=!1,e.animating=!0,e}o(e,t);var n=e.prototype;return n.onAnimationEnd=function(e){(0,e.transitTo)(yn.IDLE)},n.onChange=function(e){var t=e.axesEvent,e=e.transitTo;t.stop(),e(yn.IDLE)},n.onRelease=function(e){var t=e.axesEvent,e=e.transitTo;0===t.delta.flick&&e(yn.IDLE)},e}(On),Nn=(q=Sn.prototype,Object.defineProperty(q,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.fire=function(e,t){var n=this._state,i=r(r({},t),{transitTo:this.transitTo});switch(e){case Pn.HOLD:n.onHold(i);break;case Pn.CHANGE:n.onChange(i);break;case Pn.RELEASE:n.onRelease(i);break;case Pn.ANIMATION_END:n.onAnimationEnd(i);break;case Pn.FINISH:n.onFinish(i)}},Sn);function Sn(){var n=this;this.transitTo=function(e){var t;switch(e){case yn.IDLE:t=new Rn;break;case yn.HOLDING:t=new wn;break;case yn.DRAGGING:t=new An;break;case yn.ANIMATING:t=new In;break;case yn.DISABLED:t=new Cn}return t.onEnter(n._state),n._state=t,n._state},this._state=new Rn}var Dn=(jt=kn.prototype,Object.defineProperty(jt,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};e=e.axis[Tn];return{range:{min:e.range[0],max:e.range[1]},circular:e.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"enabled",{get:function(){var e;return null!==(e=null===(e=this._panInput)||void 0===e?void 0:e.isEnable())&&void 0!==e&&e},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"position",{get:function(){var e;return null!==(e=null===(e=this._axes)||void 0===e?void 0:e.get([Tn])[Tn])&&void 0!==e?e:0},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"range",{get:function(){var e;return null!==(e=null===(e=this._axes)||void 0===e?void 0:e.axis[Tn].range)&&void 0!==e?e:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis[Tn].bounce},enumerable:!1,configurable:!0}),jt.init=function(n){var e,i=this;this._flicking=n,this._axes=new En(((e={})[Tn]={range:[0,0],circular:!1,bounce:[0,0]},e),{deceleration:n.deceleration,interruptable:n.interruptable,easing:n.easing}),this._panInput=new bn(n.viewport.element,{inputType:n.inputType,iOSEdgeSwipeThreshold:n.iOSEdgeSwipeThreshold,scale:n.horizontal?[-1,0]:[0,-1],releaseOnScroll:!0});var r=this._axes;r.connect(n.horizontal?[Tn,""]:["",Tn],this._panInput);for(var t in Pn)!function(e){var t=Pn[e];r.on(t,function(e){i._stateMachine.fire(t,{flicking:n,axesEvent:e})})}(t);return this},jt.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null!==(e=this._panInput)&&void 0!==e&&e.destroy(),this._resetInternalValues()},jt.enable=function(){var e;return null!==(e=this._panInput)&&void 0!==e&&e.enable(),this},jt.disable=function(){var e;return null!==(e=this._panInput)&&void 0!==e&&e.disable(),this},jt.update=function(e){var t,n,i=_(this._flicking,"Control"),r=i.camera,o=this._axes,a=o.axis[Tn];return a.circular=[e.circular,e.circular],a.range=[e.range.min,e.range.max],a.bounce=(t=i.bounce,n=r.size,(Array.isArray(t)?t.map(function(e){return c(e,n)}):[r=c(t,n),r]).map(function(e){if(null==e)throw new H(C.WRONG_OPTION("bounce",t),I.WRONG_OPTION);return e})),o.axm.set(((o={})[Tn]=e.position,o)),this},jt.addPreventClickHandler=function(){var e=_(this._flicking,"Control"),t=this._axes,e=e.camera.element;return t.on(Pn.HOLD,this._onAxesHold),t.on(Pn.CHANGE,this._onAxesChange),e.addEventListener("click",this._preventClickWhenDragged,!0),this},jt.removePreventClickHandler=function(){var e=_(this._flicking,"Control"),t=this._axes,e=e.camera.element;return t.off(Pn.HOLD,this._onAxesHold),t.off(Pn.CHANGE,this._onAxesChange),e.removeEventListener("click",this._preventClickWhenDragged,!0),this},jt.animateTo=function(t,n,i){var r=this,o=this._axes;if(!o)return Promise.reject(new H(C.NOT_ATTACHED_TO_FLICKING("Control"),I.NOT_ATTACHED_TO_FLICKING));var e=o.get([Tn])[Tn];if(e===t)return(s=_(this._flicking,"Control")).camera.lookAt(t),Promise.resolve();this._animatingContext={start:e,end:t,offset:0};function a(){var e;o.once(Pn.FINISH,function(){r._animatingContext={start:0,end:0,offset:0}}),i?i.setTo(((e={})[Tn]=t,e),n):o.setTo(((e={})[Tn]=t,e),n)}if(0!==n)return new Promise(function(e,t){function n(){o.off(Pn.FINISH,i),t(new H(C.ANIMATION_INTERRUPTED,I.ANIMATION_INTERRUPTED))}var i=function(){o.off(Pn.HOLD,n),e()};o.once(Pn.FINISH,i),o.once(Pn.HOLD,n),a()});var e=(s=_(this._flicking,"Control")).camera;a();var s=s.circularEnabled?P(t,e.range.min,e.range.max):t;return o.axm.set(((e={})[Tn]=s,e)),Promise.resolve()},jt._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},kn);function kn(){var t=this;this._onAxesHold=function(){t._dragged=!1},this._onAxesChange=function(){t._dragged=!0},this._preventClickWhenDragged=function(e){t._dragged&&(e.preventDefault(),e.stopPropagation()),t._dragged=!1},this._resetInternalValues(),this._stateMachine=new Nn}var Ln=(dn=jn.prototype,Object.defineProperty(dn,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"activeIndex",{get:function(){var e;return null!==(e=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==e?e:-1},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),dn.init=function(e){return this._flicking=e,this._controller.init(e),this},dn.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},dn.enable=function(){return this._controller.enable(),this},dn.disable=function(){return this._controller.disable(),this},dn.updatePosition=function(e){var t=_(this._flicking,"Control").camera,n=this._activePanel;n&&t.lookAt(t.clampToReachablePosition(n.position))},dn.updateInput=function(){var e=_(this._flicking,"Control").camera;return this._controller.update(e.controlParams),this},dn.resetActive=function(){return this._activePanel=null,this},dn.moveToPanel=function(a,e){var s=e.duration,t=e.direction,u=void 0===t?D.NONE:t,c=e.axesEvent;return h(this,void 0,void 0,function(){var t,n,i,r,o;return m(this,function(e){return t=_(this._flicking,"Control"),o=t.camera,n=a.position,i=o.findNearestAnchor(n),a.removed||!i?[2,Promise.reject(new H(C.POSITION_NOT_REACHABLE(a.position),I.POSITION_NOT_REACHABLE))]:(o.canReach(a)?t.circularEnabled&&(r=this._controller.position,o=o.rangeDiff,n=[n,n+o,n-o].filter(function(e){return u===D.NONE||(u===D.PREV?e<=r:r<=e)}).reduce(function(e,t){return Math.abs(r-t)<Math.abs(r-e)?t:e},1/0)):(n=i.position,a=i.panel),this._triggerIndexChangeEvent(a,a.position,c),[2,this._animateToPosition({position:n,duration:s,newActivePanel:a,axesEvent:c})])})})},dn.setActive=function(e,t,n){var i,r=_(this._flicking,"Control");this._activePanel=e,r.camera.updateAdaptiveHeight(),e!==t?r.trigger(new w(N.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==t?void 0:t.index)&&void 0!==i?i:-1,prevPanel:t,isTrusted:n,direction:t?v(t.position,e.position):D.NONE})):r.trigger(new w(N.RESTORED,{isTrusted:n}))},dn._triggerIndexChangeEvent=function(e,t,n){var i=_(this._flicking,"Control"),r=e!==this._activePanel?N.WILL_CHANGE:N.WILL_RESTORE,o=i.camera,a=this._activePanel,t=new w(r,{index:e.index,panel:e,isTrusted:(null==n?void 0:n.isTrusted)||!1,direction:v(null!==(a=null==a?void 0:a.position)&&void 0!==a?a:o.position,t)});if(i.trigger(t),t.isCanceled())throw new H(C.STOP_CALLED_BY_USER,I.STOP_CALLED_BY_USER)},dn._animateToPosition=function(e){var r=e.position,o=e.duration,a=e.newActivePanel,s=e.axesEvent;return h(this,void 0,void 0,function(){var t,n,i=this;return m(this,function(e){return t=_(this._flicking,"Control"),n=function(){return i._controller.animateTo(r,o,s)},this._controller.state.targetPanel=a,o<=0?[2,n()]:[2,n().then(function(){return h(i,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,t.renderer.render()];case 1:return e.sent(),[2]}})})}).catch(function(e){if(!(s&&e instanceof H&&e.code===I.ANIMATION_INTERRUPTED))throw e})]})})},jn);function jn(){this._flicking=null,this._controller=new Dn,this._activePanel=null}var zn=(qn=Mn.prototype,Object.defineProperty(qn,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(qn,"position",{get:function(){return this._pos},enumerable:!1,configurable:!0}),Object.defineProperty(qn,"panel",{get:function(){return this._panel},enumerable:!1,configurable:!0}),Mn);function Mn(e){var t=e.index,n=e.position,e=e.panel;this._index=t,this._pos=n,this._panel=e}var Hn=function(n){function e(e){var t=(void 0===e?{}:e).count,e=void 0===t?1/0:t,t=n.call(this)||this;return t._count=e,t}o(e,n);var t=e.prototype;return Object.defineProperty(t,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),t.moveToPosition=function(u,c,l){return h(this,void 0,void 0,function(){var t,n,i,r,o,a,s;return m(this,function(e){return t=_(this._flicking,"Control"),n=t.camera,o=n.findActiveAnchor(),s=n.findNearestAnchor(n.position),a=t.control.controller.state,o&&s?(i=this._calcSnapThreshold(u,o),r=t.animating?a.delta:u-n.position,o=Math.abs(r),a=l&&0!==l.delta[Tn]?Math.abs(l.delta[Tn]):o,s=i<=a&&0<a?this._findSnappedAnchor(u,s):o>=t.threshold&&0<o?this._findAdjacentAnchor(r,s):s,this._triggerIndexChangeEvent(s.panel,u,l),[2,this._animateToPosition({position:n.clampToReachablePosition(s.position),duration:c,newActivePanel:s.panel,axesEvent:l})]):[2,Promise.reject(new H(C.POSITION_NOT_REACHABLE(u),I.POSITION_NOT_REACHABLE))]})})},t._findSnappedAnchor=function(e,t){var n=_(this._flicking,"Control"),i=n.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!t||!s)throw new H(C.POSITION_NOT_REACHABLE(e),I.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var u=n.panelCount,c=i.anchorPoints,l=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);o<e&&s.index<t.index||s.position>t.position&&s.index===t.index?l+=1:(e<o&&s.index>t.index||s.position<t.position&&s.index===t.index)&&--l;a=s.index+l*u;if(Math.abs(a-t.index)<=r){var h=c[s.index];return new zn({index:h.index,position:h.position+l*i.rangeDiff,panel:h.panel})}if(n.circularEnabled){h=c[h=t.index+Math.sign(e-o)*r,(n=u)<=h?h%n:h<0?b((h+1)%n-1,n):h],u=Math.floor(r/u);return o<e&&h.index<t.index?u+=1:e<o&&h.index>t.index&&--u,new zn({index:h.index,position:h.position+u*i.rangeDiff,panel:h.panel})}return c[L(t.index+Math.sign(e-o)*r,0,c.length-1)]},t._findAdjacentAnchor=function(e,t){var n=_(this._flicking,"Control").camera;return null!==(n=0<e?n.getNextAnchor(t):n.getPrevAnchor(t))&&void 0!==n?n:t},t._calcSnapThreshold=function(e,t){var n=e>t.position,i=t.panel,e=i.size,t=i.alignPosition;return n?e-t+i.margin.next:t+i.margin.prev},e}(Ln),Fn=function(n){function e(e){var t=(void 0===e?{}:e).stopAtEdge,e=void 0===t||t,t=n.call(this)||this;return t._stopAtEdge=e,t}o(e,n);var t=e.prototype;return Object.defineProperty(t,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),t.updatePosition=function(e){var t=_(this._flicking,"Control").camera,n=this._activePanel;n&&(e=(n=n.range).min+(n.max-n.min)*e,t.lookAt(t.clampToReachablePosition(e)))},t.moveToPosition=function(i,r,o){return h(this,void 0,void 0,function(){var t,n;return m(this,function(e){return t=_(this._flicking,"Control"),n=t.camera,t=n.clampToReachablePosition(i),(n=n.findAnchorIncludePosition(t))?((n=n.panel)!==this._activePanel&&this._triggerIndexChangeEvent(n,i,o),[2,this._animateToPosition({position:this._stopAtEdge?t:i,duration:r,newActivePanel:n,axesEvent:o})]):[2,Promise.reject(new H(C.POSITION_NOT_REACHABLE(i),I.POSITION_NOT_REACHABLE))]})})},e}(Ln),Vn=function(r){function e(e){var e=(void 0===e?{}:e).count,e=void 0===e?1:e,i=r.call(this)||this;return i.setActive=function(e,t,n){r.prototype.setActive.call(i,e,t,n),i.updateInput()},i._count=e,i._resetIndexRange(),i}o(e,r);var t=e.prototype;return Object.defineProperty(t,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),t.destroy=function(){r.prototype.destroy.call(this),this._resetIndexRange()},t.updateInput=function(){var e=_(this._flicking,"Control"),t=e.camera,n=e.renderer,i=this._controller,r=t.controlParams,o=this._count,a=i.state.animating?null===(l=t.findNearestAnchor(t.position))||void 0===l?void 0:l.panel:this._activePanel;if(!a)return i.update(r),this._resetIndexRange(),this;var s=r.range,u=a.position,c=a.index,l=n.panelCount,a=c-o,o=c+o;a<0&&(a=e.circularEnabled?b((a+1)%l-1,l):L(a,0,l-1)),l<=o&&(o=e.circularEnabled?o%l:L(o,0,l-1));a=n.panels[a],n=n.panels[o],o=Math.max(a.position,s.min),s=Math.min(n.position,s.max);return u<o&&(o-=t.rangeDiff),s<u&&(s+=t.rangeDiff),r.range={min:o,max:s},r.circular&&(r.position<o&&(r.position+=t.rangeDiff),r.position>s&&(r.position-=t.rangeDiff)),r.circular=!1,i.update(r),this._indexRange={min:a.index,max:n.index},this},t.moveToPosition=function(p,g,v){return h(this,void 0,void 0,function(){var t,n,i,r,o,a,s,u,c,l,h,f,d;return m(this,function(e){return l=_(this._flicking,"Control"),t=l.camera,n=this._activePanel,f=this._controller.range,i=this._indexRange,r=t.range,c=L(t.clampToReachablePosition(p),f[0],f[1]),(o=t.findAnchorIncludePosition(c))&&n?(h=n.position,a=Math.abs(p-h)>=l.threshold,s=h<p?t.getNextAnchor(o):t.getPrevAnchor(o),f=t.anchorPoints,c=f[0],l=f[f.length-1],h=p<=r.min&&x(c.panel.index,i.min,i.max),f=p>=r.max&&x(l.panel.index,i.min,i.max),h||f?(d=p<r.min?c:l,u=d.panel,d=d.position):a&&o.position!==n.position?(u=o.panel,d=o.position):a&&s&&x(s.index,i.min,i.max)?(u=s.panel,d=s.position):(d=t.clampToReachablePosition(n.position),u=n),this._triggerIndexChangeEvent(u,p,v),[2,this._animateToPosition({position:d,duration:g,newActivePanel:u,axesEvent:v})]):[2,Promise.reject(new H(C.POSITION_NOT_REACHABLE(p),I.POSITION_NOT_REACHABLE))]})})},t._resetIndexRange=function(){this._indexRange={min:0,max:0}},e}(Ln),q={__proto__:null,Control:Ln,SnapControl:Hn,FreeControl:Fn,StrictControl:Vn,AxesController:Dn,State:On,IdleState:Rn,HoldingState:wn,DraggingState:An,AnimatingState:In,DisabledState:Cn,StateMachine:Nn},dn=(jt=Gn.prototype,Object.defineProperty(jt,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"offset",{get:function(){return this._offset},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:!1}},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"progress",{get:function(){var e=this._flicking,t=this._position+this._offset,n=this.findNearestAnchor(this._position);if(!e||!n)return NaN;var i=n.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,n=a.min,e=a.max,a=this.rangeDiff;if(t===r)return i.index;if(t<r){var s=i.prev(),s=s?s.position+s.offset:n-o[0];return r<s&&(s-=a),i.index-1+T(t,s,r)}s=i.next(),o=s?s.position+s.offset:e+o[1];return o<r&&(o+=a),i.index+T(t,r,o)},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),jt.init=function(e){e=(this._flicking=e).viewport.element;return function(e,t){if(null==e)throw new H(C.VAL_MUST_NOT_NULL(e,t),I.VAL_MUST_NOT_NULL)}(e.firstElementChild,"First element child of the viewport element"),this._el=e.firstElementChild,this._checkTranslateSupport(),this},jt.destroy=function(){return this._flicking=null,this._resetInternalValues(),this},jt.lookAt=function(e){var t=this._position;this._position=e,this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(t,e),this._applyTransform()},jt.getPrevAnchor=function(e){return this._anchors[e.index-1]||null},jt.getNextAnchor=function(e){return this._anchors[e.index+1]||null},jt.getProgressInPanel=function(e){e=e.range;return(this._position-e.min)/(e.max-e.min)},jt.findAnchorIncludePosition=function(n){return this._anchors.filter(function(e){return e.panel.includePosition(n,!0)}).reduce(function(e,t){return e&&Math.abs(e.position-n)<Math.abs(t.position-n)?e:t},null)},jt.findNearestAnchor=function(e){var t=this._anchors;if(t.length<=0)return null;for(var n=1/0,i=0;i<t.length;i++){var r=t[i],r=Math.abs(r.position-e);if(n<r)return t[i-1];n=r}return t[t.length-1]},jt.findActiveAnchor=function(){var t=_(this._flicking,"Camera").control.activeIndex;return function(e,t){var n,i;try{for(var r=l(e),o=r.next();!o.done;o=r.next()){var a=o.value;if(t(a))return a}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return null}(this._anchors,function(e){return e.panel.index===t})},jt.clampToReachablePosition=function(e){var t=this._range;return L(e,t.min,t.max)},jt.canReach=function(e){var t=this._range;if(e.removed)return!1;e=e.position;return e>=t.min&&e<=t.max},jt.canSee=function(e){var t=this.visibleRange;return e.includeRange(t.min,t.max,!1)},jt.updateAlignPos=function(){var e=this._align,e="object"==typeof e?e.camera:e;return this._alignPos=u(e,this.size),this},jt.updateAnchors=function(){var e=_(this._flicking,"Camera").renderer.panels;return this._anchors=e.map(function(e,t){return new zn({index:t,position:e.position,panel:e})}),this},jt.updateAdaptiveHeight=function(){var e=_(this._flicking,"Camera"),t=e.control.activePanel;e.horizontal&&e.adaptive&&t&&e.viewport.setSize({height:t.height})},jt.updateOffset=function(){var e=_(this._flicking,"Camera").panels.filter(function(e){return!e.rendered}),t=this._position;this._offset=e.filter(function(e){return e.position+e.offset<t}).reduce(function(e,t){return e+t.sizeIncludingMargin},0),this._applyTransform()},jt.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},jt._resetInternalValues=function(){this._position=0,this._alignPos=0,this._offset=0,this._range={min:0,max:0},this._visiblePanels=[],this._anchors=[],this._needPanelTriggered={prev:!1,next:!1}},jt._refreshVisiblePanels=function(){var t=this,e=_(this._flicking,"Camera"),n=e.renderer.panels.filter(function(e){return t.canSee(e)}),i=this._visiblePanels,r=(this._visiblePanels=n).filter(function(e){return!E(i,e)}),o=i.filter(function(e){return!E(n,e)});(0<r.length||0<o.length)&&e.renderer.render().then(function(){e.trigger(new w(N.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:n}))})},jt._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var t=_(this._flicking,"Camera"),n=t.renderer.panels;if(n.length<=0)return e.prev||(t.trigger(new w(N.NEED_PANEL,{direction:D.PREV})),e.prev=!0),void(e.next||(t.trigger(new w(N.NEED_PANEL,{direction:D.NEXT})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=t.needPanelThreshold,s=i-this._alignPos,u=s+r,r=n[0],n=n[n.length-1];e.prev||(s<=r.range.min+a||i<=o.min+a)&&(t.trigger(new w(N.NEED_PANEL,{direction:D.PREV})),e.prev=!0),e.next||(n.range.max-a<=u||i>=o.max-a)&&(t.trigger(new w(N.NEED_PANEL,{direction:D.NEXT})),e.next=!0)}},jt._checkReachEnd=function(e,t){var n=_(this._flicking,"Camera"),i=this._range,r=e>i.min&&e<i.max,e=t>i.min&&t<i.max;r&&!e&&(i=t<=i.min?D.PREV:D.NEXT,n.trigger(new w(N.REACH_EDGE,{direction:i})))},jt._applyTransform=function(){var e=this._el,t=_(this._flicking,"Camera"),n=this._position-this._alignPos-this._offset;e.style[this._transform]=t.horizontal?"translate("+-n+"px)":"translate(0, "+-n+"px)"},Gn);function Gn(e){var s=this,e=(void 0===e?{}:e).align,e=void 0===e?S.CENTER:e;this._checkTranslateSupport=function(){var t,e,n=document.documentElement.style,i="";try{for(var r=l(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),o=r.next();!o.done;o=r.next()){var a=o.value;a in n&&(i=a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}if(!i)throw new H(C.TRANSFORM_NOT_SUPPORTED,I.TRANSFORM_NOT_SUPPORTED);s._transform=i},this._flicking=null,this._resetInternalValues(),this._align=e}var Xn,Yn=(o(Wn,Xn=dn),Wn.prototype.updateRange=function(){var e=_(this._flicking,"Camera").renderer,t=e.getPanel(0),e=e.getPanel(e.panelCount-1);return this._range={min:null!==(t=null==t?void 0:t.position)&&void 0!==t?t:0,max:null!==(e=null==e?void 0:e.position)&&void 0!==e?e:0},this},Wn);function Wn(){return null!==Xn&&Xn.apply(this,arguments)||this}var Bn=function(s){function e(){var e=null!==s&&s.apply(this,arguments)||this;return e._circularOffset=0,e._circularEnabled=!1,e}o(e,s);var t=e.prototype;return Object.defineProperty(t,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),t.getPrevAnchor=function(e){if(!this._circularEnabled||0!==e.index)return s.prototype.getPrevAnchor.call(this,e);var t=this._anchors,e=this.rangeDiff,t=t[t.length-1];return new zn({index:t.index,position:t.position-e,panel:t.panel})},t.getNextAnchor=function(e){var t=this._anchors;if(!this._circularEnabled||e.index!==t.length-1)return s.prototype.getNextAnchor.call(this,e);e=this.rangeDiff,t=t[0];return new zn({index:t.index,position:t.position+e,panel:t.panel})},t.findAnchorIncludePosition=function(n){if(!this._circularEnabled)return s.prototype.findAnchorIncludePosition.call(this,n);var e=this._range,t=this._anchors,i=this.rangeDiff,r=t.length,o=P(n,e.min,e.max),o=s.prototype.findAnchorIncludePosition.call(this,o);if(!(o=0<r&&(n===e.min||n===e.max)?[o,new zn({index:0,position:t[0].position+i,panel:t[0].panel}),new zn({index:r-1,position:t[r-1].position-i,panel:t[r-1].panel})].filter(function(e){return!!e}).reduce(function(e,t){return e&&Math.abs(e.position-n)<Math.abs(t.position-n)?e:t},null):o))return null;if(n<e.min){var a=-Math.floor((e.min-n)/i)-1;return new zn({index:o.index,position:o.position+i*a,panel:o.panel})}if(n>e.max){a=Math.floor((n-e.max)/i)+1;return new zn({index:o.index,position:o.position+i*a,panel:o.panel})}return o},t.clampToReachablePosition=function(e){return this._circularEnabled?e:s.prototype.clampToReachablePosition.call(this,e)},t.canReach=function(e){return!e.removed&&(!!this._circularEnabled||s.prototype.canReach.call(this,e))},t.canSee=function(e){var t=this._range,n=this.rangeDiff,i=this.visibleRange,r=s.prototype.canSee.call(this,e);return this._circularEnabled?i.min<t.min?r||e.includeRange(i.min+n,i.max+n,!1):i.max>t.max?r||e.includeRange(i.min-n,i.max-n,!1):r:r},t.updateRange=function(){var e=_(this._flicking,"Camera").renderer.panels;if(e.length<=0)return this._resetInternalValues(),this;var t=e[0],n=e[e.length-1],i=t.range.min-t.margin.prev,r=n.range.max+n.margin.next,o=this.size,a=r-i,s=e.every(function(e){return a-e.size>=o});return(this._circularEnabled=s)?(this._range={min:i,max:r},e.forEach(function(e){return e.updateCircularToggleDirection()})):this._range={min:t.position,max:n.position},this._updateCircularOffset(),this},t.lookAt=function(t){var e=_(this._flicking,"Camera"),n=this._position;if(t===n)return s.prototype.lookAt.call(this,t);var i=e.renderer.panels.map(function(e){return e.toggle(n,t)});return this._position=t,i.some(function(e){return e})&&(this._updateCircularOffset(),e.renderer.render()),s.prototype.lookAt.call(this,t)},t._applyTransform=function(){var e=this._el,t=_(this._flicking,"Camera"),n=this._position-this._alignPos-this._offset+this._circularOffset;e.style[this._transform]=t.horizontal?"translate("+-n+"px)":"translate(0, "+-n+"px)"},t._resetInternalValues=function(){s.prototype._resetInternalValues.call(this),this._circularOffset=0,this._circularEnabled=!1},t._calcPanelAreaSum=function(e){return e.reduce(function(e,t){return e+t.sizeIncludingMargin},0)},t._updateCircularOffset=function(){var e,t,n;this._circularEnabled?(e=_(this._flicking,"Camera"),t=[],n=[],e.panels.filter(function(e){return e.toggled}).forEach(function(e){(e.toggleDirection===D.PREV?t:n).push(e)}),this._circularOffset=this._calcPanelAreaSum(t)-this._calcPanelAreaSum(n)):this._circularOffset=0},e}(dn),Un=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}o(e,i);var t=e.prototype;return t.updateRange=function(){var e=_(this._flicking,"Camera").renderer,t=this._alignPos,n=e.getPanel(0),i=e.getPanel(e.panelCount-1);if(!n||!i)return this._range={min:0,max:0},this;var r=this.size,e=n.range.min,n=i.range.max,i=e+t,t=n-r+t;return r<n-e?this._range={min:i,max:t}:(e="object"==typeof(e=this._align)?e.camera:e,i=i+u(e,t-i),this._range={min:i,max:i}),this},t.updateAnchors=function(){var t=this,e=_(this._flicking,"Camera").renderer.panels;if(e.length<=0)return this._anchors=[],this;var n,i,r,o,a=this._range,s=e.filter(function(e){return t.canReach(e)});return 0<s.length?(n=s[0].position!==a.min,i=s[s.length-1].position!==a.max,r=n?1:0,o=s.map(function(e,t){return new zn({index:t+r,position:e.position,panel:e})}),n&&o.splice(0,0,new zn({index:0,position:a.min,panel:e[s[0].index-1]})),i&&o.push(new zn({index:o.length,position:a.max,panel:e[s[s.length-1].index+1]})),this._anchors=o):a.min!==a.max?(s=(o=(s=this._findNearestPanel(a.min,e)).index===e.length-1?s.prev():s).next(),this._anchors=[new zn({index:0,position:a.min,panel:o}),new zn({index:1,position:a.max,panel:s})]):this._anchors=[new zn({index:0,position:a.min,panel:this._findNearestPanel(a.min,e)})],this},t.findAnchorIncludePosition=function(e){var t=this._range,n=this._anchors;return n.length<=0?null:e<=t.min?n[0]:e>=t.max?n[n.length-1]:i.prototype.findAnchorIncludePosition.call(this,e)},t._findNearestPanel=function(e,t){for(var n=1/0,i=0;i<t.length;i++){var r=t[i],r=Math.abs(r.position-e);if(n<r)return t[i-1];n=r}return t[t.length-1]},e}(dn),qn={__proto__:null,Camera:dn,LinearCamera:Yn,CircularCamera:Bn,BoundCamera:Un};function Kn(e){return void 0===e}var Ln=function(){function e(){this.options={},this._eventHandler={}}var t=e.prototype;return t.trigger=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!(0<(a=this._eventHandler[e]||[]).length))return!0;var r=n[0]||{},o=n.slice(1),a=a.concat(),s=!1;r.eventType=e,r.stop=function(){s=!0},r.currentTarget=this;var u=[r];return 1<=o.length&&(u=u.concat(o)),a.forEach(function(e){e.apply(t,u)}),!s},t.once=function(n,i){var r,o=this;if("object"==typeof n&&Kn(i)){var e,t=n;for(e in t)this.once(e,t[e]);return this}return"string"==typeof n&&"function"==typeof i&&this.on(n,r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.apply(o,e),o.off(n,r)}),this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&Kn(t)){var n,i=e;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof e&&"function"==typeof t&&(Kn(r=this._eventHandler[e])&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)),this},t.off=function(e,t){var n,i;if(Kn(e))return this._eventHandler={},this;if(Kn(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r,o=e;for(r in o)this.off(r,o[r]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),c=u.next();!c.done;c=u.next()){if(c.value===t){a.splice(s,1);break}s++}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},e.VERSION="2.2.2",e}(),Zn=function(e,t){return(Zn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Jn(e,t){function n(){this.constructor=e}Zn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Qn=function(){return(Qn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};var On="undefined"!=typeof window,jt=On?window.navigator.userAgent:"",$n=On&&!!("getComputedStyle"in window),ei=/MSIE|Trident|Windows Phone|Edge/.test(jt),ti=On&&!!("addEventListener"in document),ni="width",ii="height";function ri(e,t){return e.getAttribute(t)||""}function oi(e){return[].slice.call(e)}function ai(e){return"loading"in e&&"lazy"===e.getAttribute("loading")}function si(e,t,n){ti?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function ui(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function ci(e,t){var n=e["client"+t]||e["offset"+t];return parseFloat(n||(e=e,(($n?window.getComputedStyle(e):e.currentStyle)||{})[t.toLowerCase()]))||0}function li(e,t,n){var i=oi(e.querySelectorAll(function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),r=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(["["+n+"skip] ["+n+"width]"],t.map(function(e){return["["+n+"skip] "+e,e+"["+n+"skip]","["+n+"width] "+e].join(", ")})).join(", ")));return oi(e.querySelectorAll("["+n+"width], "+t.join(", "))).filter(function(e){return-1===i.indexOf(e)})}var hi=[];function fi(e,t){hi.length||si(window,"resize",pi),e.__PREFIX__=t,hi.push(e),di(e)}function di(e,t){void 0===t&&(t="data-");var n,i=e.__PREFIX__||t,r=parseInt(ri(e,""+i+ni),10)||0,t=parseInt(ri(e,""+i+ii),10)||0;ri(e,i+"fixed")===ii?(n=ci(e,"Height")||t,e.style[ni]=r/t*n+"px"):(n=ci(e,"Width")||r,e.style[ii]=t/r*n+"px")}function pi(){hi.forEach(function(e){di(e)})}var dn=function(r){function e(e,t){void 0===t&&(t={});var n,i=r.call(this)||this;return i.isReady=!1,i.isPreReady=!1,i.hasDataSize=!1,i.hasLoading=!1,i.isSkip=!1,i.onCheck=function(e){i.clear(),e&&"error"===e.type&&i.onError(i.element);e=!i.hasDataSize&&!i.hasLoading;i.onReady(e)},i.options=Qn({prefix:"data-"},t),i.element=e,i.hasDataSize=(t=i.options.prefix,!!e.getAttribute((t=void 0===t?"data-":t)+"width")),i.hasLoading=ai(e),i.isSkip=!!i.element.getAttribute((n=void 0===n?"data-":n)+"skip"),i}Jn(e,r);var t=e.prototype;return t.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(!0),!1):(this.hasDataSize&&fi(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},t.addEvents=function(){var t=this,n=this.element;this.constructor.EVENTS.forEach(function(e){si(n,e,t.onCheck)})},t.clear=function(){var t=this,n=this.element;this.constructor.EVENTS.forEach(function(e){ui(n,e,t.onCheck)}),this.removeAutoSizer()},t.destroy=function(){this.clear(),this.off()},t.removeAutoSizer=function(){var e,t,n;this.hasDataSize&&(n=this.options.prefix,e=this.element,t=n,(n=hi.indexOf(e))<0||(t=ri(e,t+"fixed"),delete e.__PREFIX__,e.style[t===ii?ni:ii]="",hi.splice(n,1),hi.length||ui(window,"resize",pi)))},t.onError=function(e){this.trigger("error",{element:this.element,target:e})},t.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onReady=function(e){this.isReady||((e=!this.isPreReady&&e)&&(this.isPreReady=!0),this.removeAutoSizer(),this.isReady=!0,this.trigger("ready",{element:this.element,withPreReady:e,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onAlreadyError=function(e){var t=this;setTimeout(function(){t.onError(e)})},t.onAlreadyPreReady=function(){var e=this;setTimeout(function(){e.onPreReady()})},t.onAlreadyReady=function(e){var t=this;setTimeout(function(){t.onReady(e)})},e.EVENTS=[],e}(Ln),gi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Jn(t,e);var n=t.prototype;return n.setHasLoading=function(e){this.hasLoading=e},n.check=function(){return this.isSkip?(this.onAlreadyReady(!0),!1):(this.hasDataSize?(fi(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},n.checkElement=function(){return!0},n.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},n.onAlreadyPreReady=function(){e.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},t.EVENTS=[],t}(dn),jt=function(n){function e(e){void 0===e&&(e={});var t=n.call(this)||this;return t.readyCount=0,t.preReadyCount=0,t.totalCount=0,t.totalErrorCount=0,t.isPreReadyOver=!0,t.elementInfos=[],t.options=Qn({loaders:{},prefix:"data-"},e),t}Jn(e,n);var t=e.prototype;return t.check=function(e){var o=this,n=this.options.prefix;this.clear(),this.elementInfos=oi(e).map(function(e,r){var t=o.getLoader(e,{prefix:n});return t.check(),t.on("error",function(e){o.onError(r,e.target)}).on("preReady",function(e){var t=o.elementInfos[r];t.hasLoading=e.hasLoading,t.isSkip=e.isSkip;e=o.checkPreReady(r);o.onPreReadyElement(r),e&&o.onPreReady()}).on("ready",function(e){var t=e.withPreReady,n=e.hasLoading,i=e.isSkip,e=o.elementInfos[r];e.hasLoading=n,e.isSkip=i;e=t&&o.checkPreReady(r),i=o.checkReady(r);t&&o.onPreReadyElement(r),o.onReadyElement(r),e&&o.onPreReady(),i&&o.onReady()}),{loader:t,element:e,hasLoading:!1,hasError:!1,isPreReady:!1,isReady:!1,isSkip:!1}});e=this.elementInfos.length;return(this.totalCount=e)||setTimeout(function(){o.onPreReady(),o.onReady()}),this},t.getTotalCount=function(){return this.totalCount},t.isPreReady=function(){return this.elementInfos.every(function(e){return e.isPreReady})},t.isReady=function(){return this.elementInfos.every(function(e){return e.isReady})},t.hasError=function(){return 0<this.totalErrorCount},t.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach(function(e){!e.isReady&&e.loader&&e.loader.destroy()}),this.elementInfos=[]},t.destroy=function(){this.clear(),this.off()},t.getLoader=function(t,e){var n=this,i=t.tagName.toLowerCase(),r=this.options.loaders,o=Object.keys(r);if(r[i])return new r[i](t,e);var a=new gi(t,e),s=oi(t.querySelectorAll(o.join(", ")));a.setHasLoading(s.some(ai));var u=!1,c=this.clone().on("error",function(e){a.onError(e.target)}).on("ready",function(){a.onReady(u)});return a.on("requestChildren",function(){var e=li(t,o,n.options.prefix);c.check(e).on("preReady",function(e){(u=e.isReady)||a.onPreReady()})}).on("reqeustReadyChildren",function(){c.check(s)}).on("requestDestroy",function(){c.destroy()}),a},t.clone=function(){return new e(Qn({},this.options))},t.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},t.checkReady=function(e){return this.elementInfos[e].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},t.onError=function(e,t){var n=this.elementInfos[e];n.hasError=!0,this.trigger("error",{element:n.element,index:e,target:t,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount})},t.onPreReadyElement=function(e){var t=this.elementInfos[e];this.trigger("preReadyElement",{element:t.element,index:e,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isSkip:t.isSkip})},t.onPreReady=function(){this.isPreReadyOver=!0,this.trigger("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()})},t.onReadyElement=function(e){var t=this.elementInfos[e];this.trigger("readyElement",{index:e,element:t.element,hasError:t.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:t.isSkip})},t.onReady=function(){this.trigger("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount})},t.getErrorCount=function(){return this.elementInfos.filter(function(e){return e.hasError}).length},t.hasLoading=function(){return this.elementInfos.some(function(e){return e.hasLoading})},e}(Ln),vi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Jn(t,e),t.prototype.checkElement=function(){var e=this.element,t=e.getAttribute("src");if(e.complete){if(t)return e.naturalWidth||this.onAlreadyError(e),!1;this.onAlreadyPreReady()}return this.addEvents(),ei&&e.setAttribute("src",t),!0},t.EVENTS=["load","error"],t}(dn),mi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Jn(t,e),t.prototype.checkElement=function(){var e=this.element;return!(1<=e.readyState)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},t.EVENTS=["loadedmetadata","error"],t}(dn),_i=function(t){function e(e){return t.call(this,Qn({loaders:{img:vi,video:mi}},e=void 0===e?{}:e))||this}return Jn(e,t),e}(jt),Ln=(On=yi.prototype,Object.defineProperty(On,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty(On,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty(On,"align",{get:function(){return this._align},set:function(e){this._align=e;var t=this._getPanelAlign();this._panels.forEach(function(e){e.align=t})},enumerable:!1,configurable:!0}),On.init=function(e){return this._flicking=e,this._collectPanels(),this},On.destroy=function(){this._flicking=null,this._panels=[]},On.getPanel=function(e){return this._panels[e]||null},On.updatePanelSize=function(){var e=_(this._flicking,"Renderer");return 0<e.panelsPerView?this._updatePanelSizeByGrid(e):e.panels.forEach(function(e){return e.resize()}),this},On.batchInsert=function(){for(var o=this,e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var a=this._panels,s=_(this._flicking,"Renderer"),n=s.control,u=this._getPanelAlign(),i=e.reduce(function(e,t){var n=b(t.index,a.length),i=a.slice(n),r=t.elements.map(function(e,t){return o._createPanel(e,{index:n+t,align:u,flicking:s})});return a.splice.apply(a,d([n,0],f(r))),o._insertPanelElements(r,null!==(t=i[0])&&void 0!==t?t:null),r.forEach(function(e){return e.resize()}),i.forEach(function(e){e.increaseIndex(r.length),e.updatePosition()}),d(d([],f(e)),f(r))},[]);return i.length<=0?[]:(this._updateCameraAndControl(),this.render(),0<i.length&&!n.animating&&n.moveToPanel(n.activePanel||i[0],{duration:0}).catch(function(){}),s.camera.updateOffset(),s.trigger(new w(N.PANEL_CHANGE,{added:i,removed:[]})),this.checkPanelContentsReady(i),i)},On.batchRemove=function(){for(var o=this,e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var a=this._panels,n=_(this._flicking,"Renderer"),i=n.camera,s=n.control,u=s.activePanel,r=s.activeIndex,c=e.reduce(function(e,t){var n=t.index,i=t.deleteCount,t=b(n,a.length),n=a.slice(t+i),r=a.splice(t,i);return r.length<=0?[]:(n.forEach(function(e){e.decreaseIndex(r.length),e.updatePosition()}),o._removePanelElements(r),r.forEach(function(e){return e.destroy()}),o._updateCameraAndControl(),E(r,u)&&s.resetActive(),d(d([],f(e)),f(r)))},[]);return this.render(),0<c.length&&!s.animating&&((r=E(c,u)?a[r]||a[a.length-1]:u)?s.moveToPanel(r,{duration:0}).catch(function(){}):i.lookAt(0)),n.camera.updateOffset(),n.trigger(new w(N.PANEL_CHANGE,{added:[],removed:c})),c},On.checkPanelContentsReady=function(o){var a,s=this,e=_(this._flicking,"Renderer").resizeOnContentsReady,u=this._panels;e&&((o=o.filter(function(e){return!!e.element.querySelector("img, video")})).length<=0||(a=new _i,o.forEach(function(e){e.loading=!0}),a.on("readyElement",function(e){var t,n,i,r=s._flicking;r?(t=o[e.index],n=r.camera,e=(i=r.control).activePanel?n.getProgressInPanel(i.activePanel):0,t.loading=!1,t.resize(),u.slice(t.index+1).forEach(function(e){return e.updatePosition()}),r.initialized&&(n.updateRange(),n.updateAnchors(),i.animating||(i.updatePosition(e),i.updateInput()))):a.destroy()}),a.on("preReady",function(e){s._flicking&&s.render(),e.readyCount===e.totalCount&&a.destroy()}),a.on("ready",function(){s._flicking&&s.render(),a.destroy()}),a.check(o.map(function(e){return e.element}))))},On._getPanelAlign=function(){var e=this._align;return"object"==typeof e?e.panel:e},On._updateCameraAndControl=function(){var e=_(this._flicking,"Renderer"),t=e.camera,e=e.control;t.updateRange(),t.updateAnchors(),t.resetNeedPanelHistory(),e.updateInput()},On._updateRenderingPanels=function(){var e=_(this._flicking,"Renderer");e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach(function(e){return e.markForShow()})},On._showOnlyVisiblePanels=function(t){var e=t.renderer.panels,n=t.camera,i=n.visiblePanels.reduce(function(e,t){return e[t.index]=!0,e},{});e.forEach(function(e){e.index in i||e.loading?e.markForShow():t.holding||e.markForHide()}),n.updateOffset()},On._updatePanelSizeByGrid=function(e){var t,n,i=e.panels,r=e.panelsPerView;if(r<=0)throw new H(C.WRONG_OPTION("panelsPerView",r),I.WRONG_OPTION);i.length<=0||((i=i[0]).resize(),r=(e.camera.size-(i.margin.prev+i.margin.next)*(r-1))/r,t=e.horizontal?{width:r}:{height:r},n={size:r,height:i.height,margin:i.margin},e.noPanelStyleOverride||e.panels.forEach(function(e){return e.setSize(t)}),e.panels.forEach(function(e){return e.resize(n)}))},yi);function yi(e){e=(void 0===e?{}:e).align,e=void 0===e?S.CENTER:e;this._flicking=null,this._panels=[],this._align=e}dn=bi.prototype,Object.defineProperty(dn,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"offset",{get:function(){var e=this._toggleDirection,t=this._flicking.camera.rangeDiff;return e!==D.NONE&&this._toggled?e===D.PREV?-t:t:0},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"outsetProgress",{get:function(){var e=this.position+this.offset,t=this._alignPos,n=this._flicking.camera,i=n.position;if(i===e)return 0;if(i<e){var r=e+(n.size-n.alignPosition)+t;return-T(i,e,r)}t=e-(n.alignPosition+this._size-t);return 1-T(i,t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"visibleRatio",{get:function(){var e=this.range,t=this._size,n=this.offset,i=this._flicking.camera.visibleRange,r=e.min+n,e=e.max+n;if(e<=i.min||r>=i.max)return 0;n=t;return i.min>r&&(n-=i.min-r),i.max<e&&(n-=e-i.max),n/t},enumerable:!1,configurable:!0}),Object.defineProperty(dn,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),dn.resize=function(e){var t=this.element,n=O(t),i=this._flicking.horizontal;return e?(this._size=e.size,this._margin=r({},e.margin),this._height=e.height):(this._size=i?t.offsetWidth:t.offsetHeight,this._margin=i?{prev:parseFloat(n.marginLeft||"0"),next:parseFloat(n.marginRight||"0")}:{prev:parseFloat(n.marginTop||"0"),next:parseFloat(n.marginBottom||"0")},this._height=i?t.offsetHeight:this._size),this.updatePosition(),this._updateAlignPos(),this},dn.setSize=function(e){var t=e.width,n=e.height,e=this.element;return null!=t&&(z(t)?e.style.width=t:e.style.width=t+"px"),null!=n&&(z(n)?e.style.height=n:e.style.height=n+"px"),this},dn.contains=function(e){var t;return!(null===(t=this.element)||void 0===t||!t.contains(e))},dn.destroy=function(){this._resetInternalStates(),this._removed=!0},dn.includePosition=function(e,t){return this.includeRange(e,e,t=void 0===t?!1:t)},dn.includeRange=function(e,t,n){var i=this._margin,r=this.range;return(n=void 0===n?!1:n)&&(r.min-=i.prev,r.max+=i.next),t>=r.min&&e<=r.max},dn.focus=function(e){return this._flicking.moveTo(this._index,e)},dn.prev=function(){var e=this._index,t=this._flicking,n=t.renderer,i=n.panelCount;return 1===i?null:t.circularEnabled?n.getPanel(0===e?i-1:e-1):n.getPanel(e-1)},dn.next=function(){var e=this._index,t=this._flicking,n=t.renderer,i=n.panelCount;return 1===i?null:t.circularEnabled?n.getPanel(e===i-1?0:e+1):n.getPanel(e+1)},dn.increaseIndex=function(e){return this._index+=Math.max(e,0),this},dn.decreaseIndex=function(e){return this._index-=Math.max(e,0),this},dn.updatePosition=function(){var e=this._flicking.renderer.panels[this._index-1];return this._pos=e?e.range.max+e.margin.next+this._margin.prev:this._margin.prev,this},dn.toggle=function(e,t){var n=this._toggleDirection,i=this._togglePosition;if(n===D.NONE||t===e)return!1;var r=this._toggled;return e<t?e<=i&&i<=t&&(this._toggled=n===D.NEXT):i<=e&&t<=i&&(this._toggled=n!==D.NEXT),r!==this._toggled},dn.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=D.NONE,this._toggled=!1,this;var t=e.camera,n=t.range,i=t.alignPosition,r=t.visibleRange,o=r.max-r.min,e=n.min-i,r=n.max-i+o,r=this.includeRange(r-o,r,!1),e=this.includeRange(e,e+o,!1);return this._toggled=!1,r?(this._toggleDirection=D.PREV,this._togglePosition=this.range.max+n.min-n.max+i,this.toggle(1/0,t.position)):e?(this._toggleDirection=D.NEXT,this._togglePosition=this.range.min+n.max-o+i,this.toggle(-1/0,t.position)):(this._toggleDirection=D.NONE,this._togglePosition=0),this},dn._updateAlignPos=function(){this._alignPos=u(this._align,this._size)},dn._resetInternalStates=function(){this._size=0,this._pos=0,this._margin={prev:0,next:0},this._height=0,this._alignPos=0,this._toggled=!1,this._togglePosition=0,this._toggleDirection=D.NONE},jt=bi;function bi(e){var t=e.index,n=e.align,e=e.flicking;this._index=t,this._flicking=e,this._align=n,this._removed=!1,this._loading=!1,this._resetInternalStates()}var Ei,Pi=function(n){function e(e){var t=n.call(this,e)||this;return t._el=e.el,t._rendered=!0,t}o(e,n);var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),t.markForShow=function(){this._rendered=!0},t.markForHide=function(){this._rendered=!1},e}(jt),Ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n.render=function(){return h(this,void 0,void 0,function(){var t,n,i;return m(this,function(e){return i=_(this._flicking,"Renderer"),t=i.camera.element,n=this._panels.filter(function(e){return e.element.parentElement===t}),this._updateRenderingPanels(),i=this._getRenderingPanelsByOrder(),this._removePanelElements(n.filter(function(e){return!e.rendered})),this._insertPanelElements(i.filter(function(e){return e.element.parentElement!==t}),null),this._resetPanelElementOrder(i),[2]})})},n.forceRenderAllPanels=function(){return h(this,void 0,void 0,function(){var t,n;return m(this,function(e){return t=_(this._flicking,"Renderer"),t=t.camera,t=t.element,n=document.createDocumentFragment(),this._panels.forEach(function(e){return n.appendChild(e.element)}),this._removeAllChildsFromCamera(),t.appendChild(n),[2]})})},n._collectPanels=function(){var n=_(this._flicking,"Renderer"),t=n.camera.element;s(t.childNodes).forEach(function(e){e.nodeType===Node.TEXT_NODE&&t.removeChild(e)});var i=this._getPanelAlign(),e=s(t.children);this._panels=e.map(function(e,t){return new Pi({flicking:n,el:e,index:t,align:i})})},n._createPanel=function(e,t){return new Pi(r({el:e},t))},n._insertPanelElements=function(e,t){var n=_(this._flicking,"Renderer").camera.element,t=(null==t?void 0:t.element)||null,i=document.createDocumentFragment();return e.forEach(function(e){return i.appendChild(e.element)}),n.insertBefore(i,t),this},n._removePanelElements=function(e){var t=_(this._flicking,"Renderer").camera.element;return e.forEach(function(e){t.removeChild(e.element)}),this},n._resetPanelElementOrder=function(e){var n=_(this._flicking,"Renderer").camera.element,i=d([],f(e)).reverse();i.forEach(function(e,t){t=i[t-1],t=t?t.element:null;e.element.nextElementSibling!==t&&n.insertBefore(e.element,t)})},n._removeAllChildsFromCamera=function(){for(var e=_(this._flicking,"Renderer").camera.element;e.firstChild;)e.removeChild(e.firstChild)},n._getRenderingPanelsByOrder=function(){return _(this._flicking,"Renderer").renderer.panels.filter(function(e){return e.rendered}).sort(function(e,t){return e.position+e.offset-(t.position+t.offset)})},t}(Ln),On=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n._insertPanelElements=function(e,t){},n._removePanelElements=function(e){},t}(Ln),dn={__proto__:null,Renderer:Ln,VanillaRenderer:Ti,ExternalRenderer:On},Oi=function(A){function e(e,t){var n=void 0===t?{}:t,i=n.align,r=void 0===i?S.CENTER:i,o=n.defaultIndex,a=void 0===o?0:o,s=n.horizontal,u=void 0===s||s,c=n.circular,l=void 0!==c&&c,h=n.bound,f=void 0!==h&&h,d=n.adaptive,p=void 0!==d&&d,g=n.panelsPerView,v=void 0===g?-1:g,m=n.noPanelStyleOverride,_=void 0!==m&&m,y=n.resizeOnContentsReady,b=void 0!==y&&y,E=n.needPanelThreshold,P=void 0===E?0:E,T=n.preventEventsBeforeInit,O=void 0===T||T,x=n.deceleration,R=void 0===x?.0075:x,w=n.duration,t=void 0===w?500:w,i=n.easing,o=void 0===i?function(e){return 1-Math.pow(1-e,3)}:i,s=n.inputType,c=void 0===s?["mouse","touch"]:s,h=n.moveType,d=void 0===h?"snap":h,g=n.threshold,m=void 0===g?40:g,y=n.interruptable,E=void 0===y||y,T=n.bounce,x=void 0===T?"20%":T,w=n.iOSEdgeSwipeThreshold,i=void 0===w?30:w,s=n.preventClickOnDrag,h=void 0===s||s,g=n.disableOnInit,y=void 0!==g&&g,T=n.renderOnlyVisible,w=void 0!==T&&T,s=n.autoInit,g=void 0===s||s,T=n.autoResize,s=void 0===T||T,T=n.renderExternal,n=void 0===T?null:T,T=A.call(this)||this;return T._initialized=!1,T._plugins=[],T._align=r,T._defaultIndex=a,T._horizontal=u,T._circular=l,T._bound=f,T._adaptive=p,T._panelsPerView=v,T._noPanelStyleOverride=_,T._resizeOnContentsReady=b,T._needPanelThreshold=P,T._preventEventsBeforeInit=O,T._deceleration=R,T._duration=t,T._easing=o,T._inputType=c,T._moveType=d,T._threshold=m,T._interruptable=E,T._bounce=x,T._iOSEdgeSwipeThreshold=i,T._preventClickOnDrag=h,T._disableOnInit=y,T._renderOnlyVisible=w,T._autoResize=s,T._autoInit=g,T._renderExternal=n,T._viewport=new V(function(e,t){var n=null;if(z(e)){t=(t||document).querySelector(e);if(!t)throw new H(C.ELEMENT_NOT_FOUND(e),I.ELEMENT_NOT_FOUND);n=t}else e&&e.nodeType===Node.ELEMENT_NODE&&(n=e);if(!n)throw new H(C.WRONG_TYPE(e,["HTMLElement","string"]),I.WRONG_TYPE);return n}(e)),T._renderer=T._createRenderer(),T._camera=T._createCamera(),T._control=T._createControl(),T.resize=T.resize.bind(T),T._autoInit&&T.init(),T}o(e,A);var t=e.prototype;return Object.defineProperty(t,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(t,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(t,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(t,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(t,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(t,"circularEnabled",{get:function(){return this._camera.controlParams.circular},enumerable:!1,configurable:!0}),Object.defineProperty(t,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(t,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e,this._renderer.align=e,this._camera.align=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"circular",{get:function(){return this._circular},set:function(e){this._circular=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"bound",{get:function(){return this._bound},set:function(e){this._bound=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"easing",{get:function(){return this._easing},set:function(e){this._easing=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){var t;e!==this._preventClickOnDrag&&(t=this._control.controller,e?t.addPreventClickHandler():t.removePreventClickHandler(),this._preventClickOnDrag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(t,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),t.init=function(){return h(this,void 0,void 0,function(){var t,n,i,r,o,a=this;return m(this,function(e){switch(e.label){case 0:return this._initialized?[2]:(t=this._camera,n=this._renderer,i=this._control,r=this.trigger,o=this._preventEventsBeforeInit,t.init(this),n.init(this),i.init(this),o&&(this.trigger=function(){return a}),[4,this.resize()]);case 1:return e.sent(),[4,this._moveToInitialPanel()];case 2:return e.sent(),this._autoResize&&window.addEventListener("resize",this.resize),this._preventClickOnDrag&&i.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),n.checkPanelContentsReady(n.panels),this._plugins.forEach(function(e){return e.init(a)}),this._initialized=!0,o&&(this.trigger=r),this.trigger(new w(N.READY)),[2]}})})},t.destroy=function(){this.off(),window.removeEventListener("resize",this.resize),this._control.destroy(),this._camera.destroy(),this._renderer.destroy(),this._plugins.forEach(function(e){return e.destroy()}),this._initialized=!1},t.prev=function(e){var t;return void 0===e&&(e=this._duration),this.moveTo(null!==(t=null===(t=null===(t=this._control.activePanel)||void 0===t?void 0:t.prev())||void 0===t?void 0:t.index)&&void 0!==t?t:-1,e,D.PREV)},t.next=function(e){var t;return void 0===e&&(e=this._duration),this.moveTo(null!==(t=null===(t=null===(t=this._control.activePanel)||void 0===t?void 0:t.next())||void 0===t?void 0:t.index)&&void 0!==t?t:this._renderer.panelCount,e,D.NEXT)},t.moveTo=function(e,t,n){void 0===t&&(t=this._duration),void 0===n&&(n=D.NONE);var i=this._renderer,r=i.panelCount,i=i.getPanel(e);return i?this._control.animating?Promise.reject(new H(C.ANIMATION_ALREADY_PLAYING,I.ANIMATION_ALREADY_PLAYING)):this._control.moveToPanel(i,{duration:t,direction:n}):Promise.reject(new H(C.INDEX_OUT_OF_RANGE(e,0,r-1),I.INDEX_OUT_OF_RANGE))},t.getPanel=function(e){return this._renderer.getPanel(e)},t.enableInput=function(){return this._control.enable(),this},t.disableInput=function(){return this._control.disable(),this},t.getStatus=function(e){var t=void 0===e?{}:e,n=t.index,i=void 0===n||n,r=t.position,e=void 0===r||r,n=t.includePanelHTML,o=void 0!==n&&n,r=t.visiblePanelsOnly,n=void 0!==r&&r,t=this._camera,r={panels:(n?this.visiblePanels:this.panels).map(function(e){var t={index:e.index};return o&&(t.html=e.element.outerHTML),t})};return i&&(r.index=this.index),!e||(e=t.findNearestAnchor(t.position))&&(r.position={panel:e.panel.index,progressInPanel:t.getProgressInPanel(e.panel)}),n&&(n=this.visiblePanels,r.visibleOffset=null!==(n=null===(n=n[0])||void 0===n?void 0:n.index)&&void 0!==n?n:0),r},t.setStatus=function(e){if(!this._initialized)throw new H(C.NOT_INITIALIZED,I.NOT_INITIALIZED);var t=e.index,n=e.position,i=e.visibleOffset,r=e.panels,o=this._renderer,a=this._control;null!==(e=r[0])&&void 0!==e&&e.html&&!this._renderExternal&&(o.batchRemove({index:0,deleteCount:this.panels.length}),o.batchInsert({index:0,elements:y(r.map(function(e){return e.html}))})),t&&this.moveTo(i?t-i:t,0).catch(function(){}),n&&this._moveType===k.FREE_SCROLL&&(t=n.panel,n=n.progressInPanel,n=(t=o.panels[i?t-i:t].range).min+(t.max-t.min)*n,a.moveToPosition(n,0).catch(function(){}))},t.addPlugins=function(){for(var e,t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this._initialized&&n.forEach(function(e){return e.init(t)}),(e=this._plugins).push.apply(e,d([],f(n))),this},t.removePlugins=function(){for(var n=this,e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.forEach(function(t){var e=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(n._plugins,function(e){return e===t});0<=e&&(t.destroy(),n._plugins.splice(e,1))}),this},t.resize=function(){return h(this,void 0,void 0,function(){var t,n,i,r,o,a,s,u,c;return m(this,function(e){switch(e.label){case 0:return t=this._viewport,n=this._renderer,i=this._camera,r=this._control,c=r.activePanel,o=t.width,a=t.height,s=c?i.getProgressInPanel(c):0,this.trigger(new w(N.BEFORE_RESIZE,{width:o,height:a,element:t.element})),t.resize(),[4,n.forceRenderAllPanels()];case 1:return e.sent(),n.updatePanelSize(),i.updateAlignPos(),i.updateRange(),i.updateAnchors(),[4,n.render()];case 2:return e.sent(),r.animating||(r.updatePosition(s),r.updateInput()),u=t.width,c=t.height,c=u!==o||c!==a,this.trigger(new w(N.AFTER_RESIZE,{width:t.width,height:t.height,prev:{width:o,height:a},sizeChanged:c,element:t.element})),[2]}})})},t.append=function(e){return this.insert(this._renderer.panelCount,e)},t.prepend=function(e){return this.insert(0,e)},t.insert=function(e,t){if(this._renderExternal)throw new H(C.NOT_ALLOWED_IN_FRAMEWORK,I.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:y(t)})},t.remove=function(e,t){if(void 0===t&&(t=1),this._renderExternal)throw new H(C.NOT_ALLOWED_IN_FRAMEWORK,I.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:t})},t._createControl=function(){var e,t=this._moveType,n=Object.keys(k).map(function(e){return k[e]}),i=Array.isArray(t)?t[0]:t,r=Array.isArray(t)&&null!==(e=t[1])&&void 0!==e?e:{};if(!E(n,i))throw new H(C.WRONG_OPTION("moveType",JSON.stringify(t)),I.WRONG_OPTION);switch(i){case k.SNAP:return new Hn(r);case k.FREE_SCROLL:return new Fn(r);case k.STRICT:return new Vn(r)}},t._createCamera=function(){var e={align:this._align};return this._circular?(this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new Bn(e)):new(this._bound?Un:Yn)(e)},t._createRenderer=function(){var e={align:this._align},t=this._renderExternal;return t?new t.renderer(r(r({},e),t.rendererOptions)):new Ti(e)},t._moveToInitialPanel=function(){return h(this,void 0,void 0,function(){var t,n;return m(this,function(e){return n=this._renderer,t=this._control,(n=n.getPanel(this._defaultIndex)||n.getPanel(0))?(t.setActive(n,null,!1),[2,t.moveToPanel(n,{duration:0})]):[2]})})},e.VERSION="4.3.1",e}(t),Ln=(o(xi,Ei=jt),xi);function xi(e){var t=Ei.call(this,e)||this;return t._externalComponent=e.externalComponent,t}function Ri(e,n,i,t,r){e.batchInsert.apply(e,d([],f(n.added.slice(t,r).map(function(e,t){return{index:e,elements:[i[t+n.prevList.length]]}}))))}function wi(e,t,n){n=e.panels.slice(t,n),e.batchRemove({index:t,deleteCount:n.length})}var Ai=function(e){if("number"==typeof e)return e+"px";switch(e){case S.CENTER:return"50%";case S.NEXT:return"100%";case S.PREV:return"0%";default:return e}},On={__proto__:null,withFlickingMethods:function(r,o){[t.prototype,Oi.prototype].forEach(function(n){Object.getOwnPropertyNames(n).filter(function(e){return!r[e]&&!e.startsWith("_")&&"constructor"!==e}).forEach(function(e){var t,i=Object.getOwnPropertyDescriptor(n,e);i.value?Object.defineProperty(r,e,{value:function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=i.value).call.apply(e,d([this[o]],f(t)))}}):(t={},i.get&&(t.get=function(){var e;return null===(e=i.get)||void 0===e?void 0:e.call(this[o])}),i.set&&(t.set=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return null===(e=i.set)||void 0===e?void 0:e.call.apply(e,d([this[o]],f(t)))}),Object.defineProperty(r,e,t))})})},sync:function(e,n,i){var t,r,o,a,s=e.renderer,u=s.panels;0<n.removed.length&&(r=t=-1,n.removed.forEach(function(e){t<0&&(t=e),r=0<=r&&e!==r-1?(wi(s,r,t+1),t=e):e}),wi(s,r,t+1)),n.ordered.forEach(function(e){var t,n=f(e,2),i=n[0],r=n[1],e=u[i],n=r-i;0<n?(t=u.slice(i+1,r+1),e.increaseIndex(n),t.forEach(function(e){return e.decreaseIndex(1)})):(t=u.slice(r,i),e.decreaseIndex(-n),t.forEach(function(e){return e.increaseIndex(1)})),e.resize()}),0<n.ordered.length&&u.sort(function(e,t){return e.index-t.index}),0<n.added.length&&(a=o=-1,n.added.forEach(function(e,t){o<0&&(o=t),a=0<=a&&e!==a+1?(Ri(s,n,i,o,t+1),o=-1):e}),0<=o&&Ri(s,n,i,o))},getRenderingPanels:function(e,t){var n=t.removed.reduce(function(e,t){return e[t]=!0,e},{}),i=t.maintained.reduce(function(e,t){var n=f(t,2),t=n[0],n=n[1];return e[t]=n,e},{});return d(d([],f(e.panels.filter(function(e){return!n[e.index]}).sort(function(e,t){return e.position+e.offset-(t.position+t.offset)}).map(function(e){return t.list[i[e.index]]}))),f(t.added.map(function(e){return t.list[e]})))},getDefaultCameraTransform:function(e,t,n){void 0===t&&(t=!0);var i,i=(i="object"==typeof(i=e=void 0===e?S.CENTER:e)?i.camera:i,Ai(i)),e=(e="object"==typeof(e=e)?e.panel:e,j(Ai(e)));if(null==e)return"";e="calc("+i+" - ("+(n||"0px")+" * "+e.percentage+") - "+e.absolute+"px)";return t?"translate("+e+")":"translate(0, "+e+")"}};return e(Oi,{__proto__:null,Viewport:V,FlickingError:H,AnchorPoint:zn,Panel:jt,ElementPanel:Pi,ExternalPanel:Ln}),e(Oi,qn),e(Oi,q),e(Oi,dn),e(Oi,A),e(Oi,On),Oi});
|
|
9
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=t()}(this,(function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};function i(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))}function r(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function o(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}function u(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}var h,f=function(e){return void 0===e},d=function(){function e(e,t){var n,i;if(this._canceled=!1,t)try{for(var r=u(Object.keys(t)),o=r.next();!o.done;o=r.next()){var a=o.value;this[a]=t[a]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=e}var t=e.prototype;return t.stop=function(){this._canceled=!0},t.isCanceled=function(){return this._canceled},e}(),p=function(){function e(){this._eventHandler={}}var t=e.prototype;return t.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=e instanceof d?e.eventType:e,r=c(this._eventHandler[i]||[]);return r.length<=0||(e instanceof d?(e.currentTarget=this,r.forEach((function(t){t(e)}))):r.forEach((function(e){e.apply(void 0,c(t))}))),this},t.once=function(e,t){var n=this;if("object"==typeof e&&f(t)){var i=e;for(var r in i)this.once(r,i[r]);return this}if("string"==typeof e&&"function"==typeof t){var o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];t.apply(void 0,c(i)),n.off(e,o)};this.on(e,o)}return this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&f(t)){var n=e;for(var i in n)this.on(i,n[i]);return this}if("string"==typeof e&&"function"==typeof t){var r=this._eventHandler[e];f(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)}return this},t.off=function(e,t){var n,i;if(f(e))return this._eventHandler={},this;if(f(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r=e;for(var o in r)this.off(o,r[o]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var l=u(a),c=l.next();!c.done;c=l.next()){if(c.value===t){a.splice(s,1),a.length<=0&&delete this._eventHandler[e];break}s++}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}}return this},e.VERSION="3.0.2",e}(),g=d,v={WRONG_TYPE:0,ELEMENT_NOT_FOUND:1,VAL_MUST_NOT_NULL:2,NOT_ATTACHED_TO_FLICKING:3,WRONG_OPTION:4,INDEX_OUT_OF_RANGE:5,POSITION_NOT_REACHABLE:6,TRANSFORM_NOT_SUPPORTED:7,STOP_CALLED_BY_USER:8,ANIMATION_INTERRUPTED:9,ANIMATION_ALREADY_PLAYING:10,NOT_ALLOWED_IN_FRAMEWORK:11,NOT_INITIALIZED:12,NO_ACTIVE:13,NOT_ALLOWED_IN_VIRTUAL:14},m=function(e,t){return e+"("+typeof e+") is not a "+t.map((function(e){return'"'+e+'"'})).join(" or ")+"."},_=function(e){return'Element with selector "'+e+'" not found.'},b=function(e,t){return t+" should be provided. Given: "+e},y='This module is not attached to the Flicking instance. "init()" should be called first.',E=function(e,t){return'Option "'+e+'" is not in correct format, given: '+t},P=function(e,t,n){return'Index "'+e+'" is out of range: should be between '+t+" and "+n+"."},x=function(e){return'Position "'+e+'" is not reachable.'},O="Browser does not support CSS transform.",T="Event stop() is called by user.",w="Animation is interrupted by user input.",R="Animation is already playing.",I="This behavior is not allowed in the frameworks like React, Vue, or Angular.",A="Flicking is not initialized yet, call init() first.",C={READY:"ready",BEFORE_RESIZE:"beforeResize",AFTER_RESIZE:"afterResize",HOLD_START:"holdStart",HOLD_END:"holdEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",WILL_CHANGE:"willChange",CHANGED:"changed",WILL_RESTORE:"willRestore",RESTORED:"restored",SELECT:"select",NEED_PANEL:"needPanel",VISIBLE_CHANGE:"visibleChange",REACH_EDGE:"reachEdge",PANEL_CHANGE:"panelChange"},k={PREV:"prev",CENTER:"center",NEXT:"next"},N={PREV:"PREV",NEXT:"NEXT",NONE:null},S={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},D={VERTICAL:"vertical",HIDDEN:"flicking-hidden",DEFAULT_VIRTUAL:"flicking-panel"},j={LINEAR:"linear",BOUND:"bound"},L={__proto__:null,EVENTS:C,ALIGN:k,DIRECTION:N,MOVE_TYPE:S,CLASS:D,CIRCULAR_FALLBACK:j,ERROR_CODE:v},z=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t){Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e},M=function(e,t){var n=null;if(Q(e)){var i=(t||document).querySelector(e);if(!i)throw new ce(_(e),v.ELEMENT_NOT_FOUND);n=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(n=e);if(!n)throw new ce(m(e,["HTMLElement","string"]),v.WRONG_TYPE);return n},H=function(e,t){if(null==e)throw new ce(b(e,t),v.VAL_MUST_NOT_NULL)},V=function(e,t,n){return Math.max(Math.min(e,n),t)},F=function(e){if(!e)throw new ce(y,v.NOT_ATTACHED_TO_FLICKING);return e},G=function(e){return[].slice.call(e)},X=function(e,t){var n;if(Q(e))switch(e){case k.PREV:n=0;break;case k.CENTER:n=.5*t;break;case k.NEXT:n=t;break;default:if(null==(n=Y(e,t)))throw new ce(E("align",e),v.WRONG_OPTION)}else n=e;return n},B=function(e,t){var n;if(Array.isArray(e))n=e.map((function(e){return Y(e,t)}));else{var i=Y(e,t);n=[i,i]}return n.map((function(t){if(null==t)throw new ce(E("bounce",e),v.WRONG_OPTION);return t}))},Y=function(e,t){var n=W(e);return null==n?null:n.percentage*t+n.absolute},W=function(e){var t=/(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;if("number"==typeof e)return{percentage:0,absolute:e};for(var n={percentage:0,absolute:0},i=0,r=t.exec(e);null!=r;){var o=r[1],a=r[2],s=r[3],u=parseFloat(a);if(i<=0&&(o=o||"+"),!o)return null;var l="+"===o?1:-1;"%"===s?n.percentage+=l*(u/100):n.absolute+=l*u,++i,r=t.exec(e)}return 0===i?null:n},U=function(e){return"object"==typeof e?e.panel:e},q=function(e,t){return e===t?N.NONE:e<t?N.NEXT:N.PREV},Z=function(e){Array.isArray(e)||(e=[e]);var t=[];return e.forEach((function(e){if(Q(e)){var n=document.createElement("div");for(n.innerHTML=e,t.push.apply(t,s(G(n.children)));n.firstChild;)n.removeChild(n.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new ce(m(e,["HTMLElement","string"]),v.WRONG_TYPE);t.push(e)}})),t},K=function(e,t){return V(e<0?e+t:e,0,t)},J=function(e,t){var n,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){if(a.value===t)return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return!1},Q=function(e){return"string"==typeof e},$=function(e,t,n){var i=n-t;if(e<t)e=n-(t-e)%i;else if(e>n){e=t+(e-n)%i}return e},ee=function(e,t){var n,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){var s=a.value;if(t(s))return s}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return null},te=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},ne=function(e,t,n){return(e-t)/(n-t)},ie=function(e){return window.getComputedStyle(e)||e.currentStyle},re=function(e,t){var n=t.width,i=t.height;null!=n&&(Q(n)?e.style.width=n:e.style.width=n+"px"),null!=i&&(Q(i)?e.style.height=i:e.style.height=i+"px")},oe=function(e,t,n){return e>=t&&e<=n},ae=function(e,t){return e>=t?e%t:e<0?K((e+1)%t-1,t):e},se=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=n;return t},ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},le={__proto__:null,merge:z,getElement:M,checkExistence:H,clamp:V,getFlickingAttached:F,toArray:G,parseAlign:X,parseBounce:B,parseArithmeticSize:Y,parseArithmeticExpression:W,parseCSSSizeValue:function(e){return Q(e)?e:e+"px"},parsePanelAlign:U,getDirection:q,parseElement:Z,getMinusCompensatedIndex:K,includes:J,isString:Q,circulatePosition:$,find:ee,findRight:function(e,t){for(var n=e.length-1;n>=0;n--){var i=e[n];if(t(i))return i}return null},findIndex:te,getProgress:ne,getStyle:ie,setSize:re,isBetween:oe,circulateIndex:ae,range:se,setPrototypeOf:ue},ce=function(e){function n(t,i){var r=e.call(this,t)||this;return ue(r,n.prototype),r.name="FlickingError",r.code=i,r}return t(n,e),n}(Error),he=function(){function e(e){this._el=e,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(t,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(t,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),t.setSize=function(e){var t=e.width,n=e.height,i=this._el,r=this._padding,o=this._isBorderBoxSizing;if(null!=t)if(Q(t))i.style.width=t;else{var a=o?t+r.left+r.right:t;i.style.width=a+"px"}if(null!=n)if(Q(n))i.style.height=n;else{var s=o?n+r.top+r.bottom:n;i.style.height=s+"px"}this.resize()},t.resize=function(){var e=this._el,t=ie(e);this._width=e.clientWidth,this._height=e.clientHeight,this._padding={left:t.paddingLeft?parseFloat(t.paddingLeft):0,right:t.paddingRight?parseFloat(t.paddingRight):0,top:t.paddingTop?parseFloat(t.paddingTop):0,bottom:t.paddingBottom?parseFloat(t.paddingBottom):0},this._isBorderBoxSizing="border-box"===t.boxSizing},e}(),fe=function(){function e(e){var t,n=this;this._onResize=function(){n._flicking.resize()},this._skipFirstResize=(t=!0,function(){t?t=!1:n._onResize()}),this._flicking=e,this._enabled=!1,this._resizeObserver=null}var t=e.prototype;return Object.defineProperty(t,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),t.enable=function(){var e=this._flicking,t=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var n=0!==t.width||0!==t.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);n.observe(e.viewport.element),this._resizeObserver=n}else window.addEventListener("resize",this._onResize);return this._enabled=!0,this},t.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._enabled=!1,this},e}(),de=function(){function e(e){this._element=e,this._rendered=!0}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),t.show=function(e){var t=this.element,n=e.camera.element;t.parentElement!==n&&(n.appendChild(t),this._rendered=!0)},t.hide=function(e){var t=this.element,n=e.camera.element;t.parentElement===n&&(n.removeChild(t),this._rendered=!1)},e}(),pe=function(){function e(e){this._flicking=e}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(t,"_virtualElement",{get:function(){var e=this._flicking,t=this._panel.elementIndex;return e.virtual.elements[t]},enumerable:!1,configurable:!0}),t.init=function(e){this._panel=e},t.show=function(){},t.hide=function(){},e}(),ge=function(){function e(e,t){var n,i,r,o;this._flicking=e,this._renderPanel=null!==(n=null==t?void 0:t.renderPanel)&&void 0!==n?n:function(){return""},this._initialPanelCount=null!==(i=null==t?void 0:t.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==t?void 0:t.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==t?void 0:t.panelClass)&&void 0!==o?o:D.DEFAULT_VIRTUAL,this._elements=[]}var t=e.prototype;return Object.defineProperty(t,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(t,"renderPanel",{get:function(){return this._renderPanel},set:function(e){this._renderPanel=e,this._flicking.renderer.panels.forEach((function(e){return e.uncacheRenderResult()}))},enumerable:!1,configurable:!0}),Object.defineProperty(t,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),t.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var t=e.camera.children;this._elements=t.map((function(e){return{nativeElement:e,visible:!0}}))}},t.show=function(e){var t=this._elements[e],n=t.nativeElement;t.visible=!0,n.style.display&&(n.style.display="")},t.hide=function(e){var t=this._elements[e],n=t.nativeElement;t.visible=!1,n.style.display="none"},t.append=function(e){void 0===e&&(e=1);var t=this._flicking;return this.insert(t.panels.length,e)},t.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},t.insert=function(e,t){return void 0===t&&(t=1),t<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:se(t),hasDOMInElements:!1})},t.remove=function(e,t){return t<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:t,hasDOMInElements:!1})},t._initVirtualElements=function(){var e=this,t=this._flicking,n=t.camera.element,i=t.panelsPerView,r=document.createDocumentFragment();se(i+1).map((function(t){var n=document.createElement("div");return n.className=e._panelClass,n.dataset.elementIndex=t.toString(),n})).forEach((function(e){r.appendChild(e)})),n.appendChild(r)},e}();function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ve.apply(this,arguments)}function me(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}h="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var be,ye=h,Ee=["","webkit","Moz","MS","ms","o"],Pe="undefined"==typeof document?{style:{}}:document.createElement("div"),xe=Math.round,Oe=Math.abs,Te=Date.now;function we(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o<Ee.length;){if((i=(n=Ee[o])?n+r:t)in e)return i;o++}}be="undefined"==typeof window?{}:window;var Re=we(Pe.style,"touchAction"),Ie=void 0!==Re;var Ae="compute",Ce="auto",ke="manipulation",Ne="none",Se="pan-x",De="pan-y",je=function(){if(!Ie)return!1;var e={},t=be.CSS&&be.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return e[n]=!t||be.CSS.supports("touch-action",n)})),e}(),Le="ontouchstart"in be,ze=void 0!==we(be,"PointerEvent"),Me=Le&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),He="touch",Ve="mouse",Fe=16,Ge=24,Xe=["x","y"],Be=["clientX","clientY"];function Ye(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function We(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function Ue(e,t){return e.indexOf(t)>-1}var qe=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Ae&&(e=this.compute()),Ie&&this.manager.element.style&&je[e]&&(this.manager.element.style[Re]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return Ye(this.manager.recognizers,(function(t){We(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(Ue(e,Ne))return Ne;var t=Ue(e,Se),n=Ue(e,De);return t&&n?Ne:t||n?t?Se:De:Ue(e,ke)?ke:Ce}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=Ue(i,Ne)&&!je.none,o=Ue(i,De)&&!je["pan-y"],a=Ue(i,Se)&&!je["pan-x"];if(r){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return r||o&&6&n||a&&n&Ge?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Ze(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Ke(e){var t=e.length;if(1===t)return{x:xe(e[0].clientX),y:xe(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:xe(n/t),y:xe(i/t)}}function Je(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:xe(e.pointers[n].clientX),clientY:xe(e.pointers[n].clientY)},n++;return{timeStamp:Te(),pointers:t,center:Ke(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Qe(e,t,n){n||(n=Xe);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function $e(e,t,n){n||(n=Xe);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}function et(e,t){return e===t?1:Oe(e)>=Oe(t)?e<0?2:4:t<0?8:Fe}function tt(e,t,n){return{x:t/e||0,y:n/e||0}}function nt(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=Je(t)),r>1&&!n.firstMultiple?n.firstMultiple=Je(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=t.center=Ke(i);t.timeStamp=Te(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=$e(s,u),t.distance=Qe(s,u),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=et(t.deltaX,t.deltaY);var l,c,h=tt(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=Oe(h.x)>Oe(h.y)?h.x:h.y,t.scale=a?(l=a.pointers,Qe((c=i)[0],c[1],Be)/Qe(l[0],l[1],Be)):1,t.rotation=a?function(e,t){return $e(t[1],t[0],Be)+$e(e[1],e[0],Be)}(a.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,r,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;if(8!==t.eventType&&(s>25||void 0===a.velocity)){var u=t.deltaX-a.deltaX,l=t.deltaY-a.deltaY,c=tt(s,u,l);i=c.x,r=c.y,n=Oe(c.x)>Oe(c.y)?c.x:c.y,o=et(u,l),e.lastInterval=t}else n=a.velocity,i=a.velocityX,r=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}(n,t);var f,d=e.element,p=t.srcEvent;Ze(f=p.composedPath?p.composedPath()[0]:p.path?p.path[0]:p.target,d)&&(d=f),t.target=d}function it(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&t&&i-r==0,a=12&t&&i-r==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,nt(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function rt(e){return e.trim().split(/\s+/g)}function ot(e,t,n){Ye(rt(t),(function(t){e.addEventListener(t,n,!1)}))}function at(e,t,n){Ye(rt(t),(function(t){e.removeEventListener(t,n,!1)}))}function st(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var ut=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){We(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&ot(this.element,this.evEl,this.domHandler),this.evTarget&&ot(this.target,this.evTarget,this.domHandler),this.evWin&&ot(st(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&at(this.element,this.evEl,this.domHandler),this.evTarget&&at(this.target,this.evTarget,this.domHandler),this.evWin&&at(st(this.element),this.evWin,this.domHandler)},e}();function lt(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}var ct={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ht={2:He,3:"pen",4:Ve,5:"kinect"},ft="pointerdown",dt="pointermove pointerup pointercancel";be.MSPointerEvent&&!be.PointerEvent&&(ft="MSPointerDown",dt="MSPointerMove MSPointerUp MSPointerCancel");var pt=function(e){function t(){var n,i=t.prototype;return i.evEl=ft,i.evWin=dt,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return me(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=ct[i],o=ht[e.pointerType]||e.pointerType,a=o===He,s=lt(t,e.pointerId,"pointerId");1&r&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&r&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))},t}(ut);function gt(e){return Array.prototype.slice.call(e,0)}function vt(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];lt(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}var mt={touchstart:1,touchmove:2,touchend:4,touchcancel:8},_t="touchstart touchmove touchend touchcancel",bt=function(e){function t(){var n;return t.prototype.evTarget=_t,(n=e.apply(this,arguments)||this).targetIds={},n}return me(t,e),t.prototype.handler=function(e){var t=mt[e.type],n=yt.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:He,srcEvent:e})},t}(ut);function yt(e,t){var n,i,r=gt(e.touches),o=this.targetIds;if(3&t&&1===r.length)return o[r[0].identifier]=!0,[r,r];var a=gt(e.changedTouches),s=[],u=this.target;if(i=r.filter((function(e){return Ze(e.target,u)})),1===t)for(n=0;n<i.length;)o[i[n].identifier]=!0,n++;for(n=0;n<a.length;)o[a[n].identifier]&&s.push(a[n]),12&t&&delete o[a[n].identifier],n++;return s.length?[vt(i.concat(s),"identifier",!0),s]:void 0}var Et={mousedown:1,mousemove:2,mouseup:4},Pt="mousedown",xt="mousemove mouseup",Ot=function(e){function t(){var n,i=t.prototype;return i.evEl=Pt,i.evWin=xt,(n=e.apply(this,arguments)||this).pressed=!1,n}return me(t,e),t.prototype.handler=function(e){var t=Et[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Ve,srcEvent:e}))},t}(ut);function Tt(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(n);setTimeout((function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)}),2500)}}function wt(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,Tt.call(this,t)):12&e&&Tt.call(this,t)}function Rt(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),a=Math.abs(n-r.y);if(o<=25&&a<=25)return!0}return!1}var It=function(){return function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handler=function(e,t,n){var r=n.pointerType===He,o=n.pointerType===Ve;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)wt.call(_e(_e(i)),t,n);else if(o&&Rt.call(_e(_e(i)),n))return;i.callback(e,t,n)}},i.touch=new bt(i.manager,i.handler),i.mouse=new Ot(i.manager,i.handler),i.primaryTouch=null,i.lastTouches=[],i}return me(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(ut)}();function At(e,t,n){return!!Array.isArray(e)&&(Ye(e,n[t],n),!0)}var Ct=32,kt=1;function Nt(e,t){var n=t.manager;return n?n.get(e):e}function St(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var Dt=function(){function e(e){void 0===e&&(e={}),this.options=ve({enable:!0},e),this.id=kt++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return ye(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(At(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Nt(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return At(e,"dropRecognizeWith",this)||(e=Nt(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(At(e,"requireFailure",this))return this;var t=this.requireFail;return-1===lt(t,e=Nt(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(At(e,"dropRequireFailure",this))return this;e=Nt(e,this);var t=lt(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+St(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+St(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Ct},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=ye({},e);if(!We(this.options.enable,[this,t]))return this.reset(),void(this.state=Ct);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),jt=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ve({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[ke]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&o&&i){if(4!==e.eventType)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||Qe(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&a?this.count+=1:this.count=1,this._input=e,0===this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return Ct},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=Ct}),this.options.interval),Ct},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(Dt),Lt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({pointers:1},t))||this}me(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,i=6&t,r=this.attrTest(e);return i&&(8&n||!r)?16|t:i||r?4&n?8|t:2&t?4|t:2:Ct},t}(Dt);function zt(e){return e===Fe?"down":8===e?"up":2===e?"left":4===e?"right":""}var Mt=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ve({event:"pan",threshold:10,pointers:1,direction:30},t))||this).pX=null,n.pY=null,n}me(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return 6&e&&t.push(De),e&Ge&&t.push(Se),t},n.directionTest=function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(6&t.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,i=Math.abs(e.deltaX)):(r=0===a?1:a<0?8:Fe,n=a!==this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},n.attrTest=function(e){return Lt.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=zt(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(Lt),Ht=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},t))||this}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return Mt.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,i=this.options.direction;return 30&i?n=t.overallVelocity:6&i?n=t.overallVelocityX:i&Ge&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Oe(n)>this.options.velocity&&4&t.eventType},n.emit=function(e){var t=zt(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(Lt),Vt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({event:"pinch",threshold:0,pointers:2},t))||this}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Ne]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(1!==t.scale){var n=t.scale<1?"in":"out";t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(Lt),Ft=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ve({event:"rotate",threshold:0,pointers:2},t))||this}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Ne]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(Lt),Gt=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ve({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}me(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Ce]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!r||!i||12&e.eventType&&!o)this.reset();else if(1&e.eventType)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(4&e.eventType)return 8;return Ct},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Te(),this.manager.emit(this.options.event,this._input)))},t}(Dt),Xt={domEvents:!1,touchAction:Ae,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Bt=[[Ft,{enable:!1}],[Vt,{enable:!1},["rotate"]],[Ht,{direction:6}],[Mt,{direction:6},["swipe"]],[jt],[jt,{event:"doubletap",taps:2},["tap"]],[Gt]];function Yt(e,t){var n,i=e.element;i.style&&(Ye(e.options.cssProps,(function(r,o){n=we(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}var Wt=function(){function e(e,t){var n,i=this;this.options=ye({},Xt,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(ze?pt:Me?bt:Le?It:Ot))(n,it),this.touchAction=new qe(this,this.options.touchAction),Yt(this,!0),Ye(this.options.recognizers,(function(e){var t=i.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return ye(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(t.curRecognizer=null,r=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(t.curRecognizer=n,r=n),o++}},t.get=function(e){if(e instanceof Dt)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(At(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(At(e,"remove",this))return this;var t=this.get(e);if(e){var n=this.recognizers,i=lt(n,t);-1!==i&&(n.splice(i,1),this.touchAction.update())}return this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var n=this.handlers;return Ye(rt(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(void 0===e)return this;var n=this.handlers;return Ye(rt(e),(function(e){t?n[e]&&n[e].splice(lt(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},t.destroy=function(){this.element&&Yt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),Ut={touchstart:1,touchmove:2,touchend:4,touchcancel:8},qt="touchstart",Zt="touchstart touchmove touchend touchcancel",Kt=function(e){function t(){var n,i=t.prototype;return i.evTarget=qt,i.evWin=Zt,(n=e.apply(this,arguments)||this).started=!1,n}return me(t,e),t.prototype.handler=function(e){var t=Ut[e.type];if(1===t&&(this.started=!0),this.started){var n=Jt.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:He,srcEvent:e})}},t}(ut);function Jt(e,t){var n=gt(e.touches),i=gt(e.changedTouches);return 12&t&&(n=vt(n.concat(i),"identifier",!0)),[n,i]}function Qt(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=window.console&&(window.console.warn||window.console.log);return r&&r.call(window.console,i,n),e.apply(this,arguments)}}var $t=Qt((function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)(!n||n&&void 0===e[i[r]])&&(e[i[r]]=t[i[r]]),r++;return e}),"extend","Use `assign`."),en=Qt((function(e,t){return $t(e,t,!0)}),"merge","Use `assign`.");function tn(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&ye(i,n)}function nn(e,t){return function(){return e.apply(t,arguments)}}function rn(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return!0;return!1}function on(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return e[i];return null}function an(e,t){try{return new RegExp(e,"g").exec(t)}catch(e){return null}}function sn(e){return e.replace(/_/g,".")}function un(e,t){var n=null,i="-1";return rn(e,(function(e){var r=an("("+e.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",t);return!(!r||e.brand)&&(n=e,i=r[3]||"-1",e.versionAlias?i=e.versionAlias:e.versionTest&&(i=function(e,t){var n=an("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",t);return n?n[3]:""}(e.versionTest.toLowerCase(),t)||i),i=sn(i),!0)})),{preset:n,version:i}}function ln(e,t){var n={brand:"",version:"-1"};return rn(e,(function(e){var i=cn(t,e);return!!i&&(n.brand=e.id,n.version=e.versionAlias||i.version,"-1"!==n.version)})),n}function cn(e,t){return on(e,(function(e){var n=e.brand;return an(""+t.test,n.toLowerCase())}))}(function(){var e=function(e,t){return void 0===t&&(t={}),new Wt(e,ve({recognizers:Bt.concat()},t))};return e.VERSION="2.0.17-rc",e.DIRECTION_ALL=30,e.DIRECTION_DOWN=Fe,e.DIRECTION_LEFT=2,e.DIRECTION_RIGHT=4,e.DIRECTION_UP=8,e.DIRECTION_HORIZONTAL=6,e.DIRECTION_VERTICAL=Ge,e.DIRECTION_NONE=1,e.DIRECTION_DOWN=Fe,e.INPUT_START=1,e.INPUT_MOVE=2,e.INPUT_END=4,e.INPUT_CANCEL=8,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=Ct,e.Manager=Wt,e.Input=ut,e.TouchAction=qe,e.TouchInput=bt,e.MouseInput=Ot,e.PointerEventInput=pt,e.TouchMouseInput=It,e.SingleTouchInput=Kt,e.Recognizer=Dt,e.AttrRecognizer=Lt,e.Tap=jt,e.Pan=Mt,e.Swipe=Ht,e.Pinch=Vt,e.Rotate=Ft,e.Press=Gt,e.on=ot,e.off=at,e.each=Ye,e.merge=en,e.extend=$t,e.bindFn=nn,e.assign=ye,e.inherit=tn,e.bindFn=nn,e.prefixed=we,e.toArray=gt,e.inArray=lt,e.uniqueArray=vt,e.splitStr=rt,e.boolOrFn=We,e.hasParent=Ze,e.addEventListeners=ot,e.removeEventListeners=at,e.defaults=ye({},Xt,{preset:Bt}),e})().defaults;var hn=[{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"}],fn=[{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}],dn=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],pn=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],gn=[{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 vn(e){var t=function(e){var t=e;if(void 0===t){if("undefined"==typeof navigator||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}(e),n=!!/mobi/g.exec(t),i={name:"unknown",version:"-1",majorVersion:-1,webview:!!un(pn,t).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=un(hn,t),a=o.preset,s=o.version,u=un(gn,t),l=u.preset,c=u.version,h=un(fn,t);if(i.chromium=!!h.preset,i.chromiumVersion=h.version,!i.chromium){var f=un(dn,t);i.webkit=!!f.preset,i.webkitVersion=f.version}return l&&(r.name=l.id,r.version=c,r.majorVersion=parseInt(c,10)),a&&(i.name=a.id,i.version=s,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 mn(e){return void 0===e}var _n=function(){function e(){this.options={},this._eventHandler={}}var t=e.prototype;return t.trigger=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=this._eventHandler[e]||[],o=r.length>0;if(!o)return!0;var a=n[0]||{},s=n.slice(1);r=r.concat();var u=!1;a.eventType=e,a.stop=function(){u=!0},a.currentTarget=this;var l=[a];return s.length>=1&&(l=l.concat(s)),r.forEach((function(e){e.apply(t,l)})),!u},t.once=function(e,t){var n=this;if("object"==typeof e&&mn(t)){var i=e;for(var r in i)this.once(r,i[r]);return this}if("string"==typeof e&&"function"==typeof t){var o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];t.apply(n,i),n.off(e,o)};this.on(e,o)}return this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&mn(t)){var n=e;for(var i in n)this.on(i,n[i]);return this}if("string"==typeof e&&"function"==typeof t){var r=this._eventHandler[e];mn(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)}return this},t.off=function(e,t){var n,i;if(mn(e))return this._eventHandler={},this;if(mn(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r=e;for(var o in r)this.off(o,r[o]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),l=u.next();!l.done;l=u.next()){if(l.value===t){a.splice(s,1);break}s++}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},e.VERSION="2.2.2",e}(),bn=function(e,t){return bn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},bn(e,t)};var yn,En=function(){return En=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},En.apply(this,arguments)};function Pn(e,t,n,i){var r=e,o=[n[0]?t[0]:i?t[0]-i[0]:t[0],n[1]?t[1]:i?t[1]+i[1]:t[1]];return r=Math.max(o[0],r),r=Math.min(o[1],r)}function xn(e,t){return e<t[0]||e>t[1]}function On(e,t,n){return n[1]&&e>t[1]||n[0]&&e<t[0]}function Tn(e,t,n){var i=e,r=t[0],o=t[1],a=o-r;return n[1]&&e>o&&(i=(i-o)%a+r),n[0]&&e<r&&(i=(i-r)%a+o),i}function wn(e){for(var t=[],n=0,i=e.length;n<i;n++)t.push(e[n]);return t}function Rn(e,t){var n;if(void 0===t&&(t=!1),"string"==typeof e){if(e.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=e,n=wn(i.childNodes)}else n=wn(document.querySelectorAll(e));t||(n=n.length>=1?n[0]:void 0)}else e===yn?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in yn&&e instanceof jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map((function(e){return Rn(e)})),t||(n=n.length>=1?n[0]:void 0)):n=e;return n}var In=(yn="undefined"==typeof window?{navigator:{userAgent:""}}:window).requestAnimationFrame||yn.webkitRequestAnimationFrame,An=yn.cancelAnimationFrame||yn.webkitCancelAnimationFrame;if(In&&!An){var Cn={},kn=In;In=function(e){var t=kn((function(n){Cn[t]&&e(n)}));return Cn[t]=!0,t},An=function(e){delete Cn[e]}}else In&&An||(In=function(e){return yn.setTimeout((function(){e(yn.performance&&yn.performance.now&&yn.performance.now()||(new Date).getTime())}),16)},An=yn.clearTimeout);function Nn(e,t){var n={};for(var i in e)i&&(n[i]=t(e[i],i));return n}function Sn(e,t){var n={};for(var i in e)i&&t(e[i],i)&&(n[i]=e[i]);return n}function Dn(e,t){for(var n in e)if(n&&!t(e[n],n))return!1;return!0}function jn(e,t){return Dn(e,(function(e,n){return e===t[n]}))}var Ln={};function zn(e,t){var n,i;return Ln[t]||(Ln[t]=(i=(n=t)<1?Math.pow(10,Hn(n)):1,function(e){return 0===n?0:Math.round(Math.round(e/n)*n*i)/i})),Ln[t](e)}function Mn(e,t){if(!e||!t)return e;var n="number"==typeof t;return Nn(e,(function(e,i){return zn(e,n?t:t[i])}))}function Hn(e){if(!isFinite(e))return 0;var t=e+"";if(t.indexOf("e")>=0){for(var n=0,i=1;Math.round(e*i)/i!==e;)i*=10,n++;return n}return t.indexOf(".")>=0?t.length-t.indexOf(".")-1:0}function Vn(e,t,n){return Math.max(Math.min(e,n),t)}var Fn,Gn=function(){function e(e){var t=e.options,n=e.itm,i=e.em,r=e.axm;this.options=t,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}var t=e.prototype;return t.getDuration=function(e,t,n){var i,r=this;if(void 0!==n)i=n;else{var o=Nn(t,(function(t,n){return function(e,t){var n=Math.sqrt(e/t*2);return n<100?0:n}(Math.abs(t-e[n]),r.options.deceleration)}));i=Object.keys(o).reduce((function(e,t){return Math.max(e,o[t])}),-1/0)}return Vn(i,this.options.minimumDuration,this.options.maximumDuration)},t.createAnimationParam=function(e,t,n){var i=this.axm.get(),r=e,o=n&&n.event||null;return{depaPos:i,destPos:r,duration:Vn(t,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:o,input:n&&n.input||null,isTrusted:!!o,done:this.animationEnd}},t.grab=function(e,t){if(this._animateParam&&e.length){var n=this.axm.get(e),i=this.axm.map(n,(function(e,t){return Tn(e,t.range,t.circular)}));Dn(i,(function(e,t){return n[t]===e}))||this.em.triggerChange(i,!1,n,t,!!t),this._animateParam=null,this._raf&&(r=this._raf,An(r)),this._raf=null,this.em.triggerAnimationEnd(!(!t||!t.event))}var r},t.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},t.restore=function(e){var t=this.axm.get(),n=this.axm.map(t,(function(e,t){return Math.min(t.range[1],Math.max(t.range[0],e))}));this.animateTo(n,this.getDuration(t,n),e)},t.animationEnd=function(){var e=this.getEventInfo();this._animateParam=null;var t=this.axm.filter(this.axm.get(),(function(e,t){return On(e,t.range,t.circular)}));Object.keys(t).length>0&&this.setTo(this.axm.map(t,(function(e,t){return Tn(e,t.range,t.circular)}))),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!e),this.axm.isOutside()?this.restore(e):this.finish(!!e)},t.finish=function(e){this._animateParam=null,this.itm.setInterrupt(!1),this.em.triggerFinish(e)},t.animateLoop=function(e,t){if(e.duration){this._animateParam=En({},e);var n=this._animateParam,i=this,r=n.destPos,o=n.depaPos,a=0,s=Nn(o,(function(e,t){return e<=r[t]?1:-1})),u=Nn(r,(function(e){return e})),l=(new Date).getTime();n.startTime=l,function c(){i._raf=null;var h=(new Date).getTime(),f=(h-n.startTime)/e.duration,d=i.easing(f),p=i.axm.map(o,(function(e,t,i){var u=f>=1?r[i]:e+n.delta[i]*(d-a),l=Tn(u,t.range,t.circular);if(u!==l){var c=s[i]*(t.range[1]-t.range[0]);r[i]-=c,o[i]-=c}return l})),g=!i.em.triggerChange(p,!1,o);if(o=p,l=h,a=d,d>=1)return jn(r=i.getFinalPos(r,u),i.axm.get(Object.keys(r)))||i.em.triggerChange(r,!0,o),void t();g?i.finish(!1):i._raf=In(c)}()}else this.em.triggerChange(e.destPos,!0),t()},t.getFinalPos=function(e,t){var n=this,i=1e-6;return Nn(e,(function(e,r){return e>=t[r]-i&&e<=t[r]+i?t[r]:zn(e,n.getRoundUnit(e,r))}))},t.getRoundUnit=function(e,t){var n,i=this.options.round,r=null;if(!i){var o=this.axm.getAxisOptions(t);n=Math.max(Hn(o.range[0]),Hn(o.range[1]),Hn(e)),r=1/Math.pow(10,n)}return r||i},t.getUserControll=function(e){var t=e.setTo();return t.destPos=this.axm.get(t.destPos),t.duration=Vn(t.duration,this.options.minimumDuration,this.options.maximumDuration),t},t.animateTo=function(e,t,n){var i=this,r=this.createAnimationParam(e,t,n),o=En({},r.depaPos),a=this.em.triggerAnimationStart(r),s=this.getUserControll(r);if(!a&&this.axm.every(s.destPos,(function(e,t){return On(e,t.range,t.circular)}))&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!jn(s.destPos,o)){var u=n&&n.event||null;this.animateLoop({depaPos:o,destPos:s.destPos,duration:s.duration,delta:this.axm.getDelta(o,s.destPos),isTrusted:!!u,inputEvent:u,input:n&&n.input||null},(function(){return i.animationEnd()}))}},t.easing=function(e){return e>1?1:this.options.easing(e)},t.setTo=function(e,t){void 0===t&&(t=0);var n=Object.keys(e);this.grab(n);var i=this.axm.get(n);if(jn(e,i))return this;this.itm.setInterrupt(!0);var r=Sn(e,(function(e,t){return i[t]!==e}));return Object.keys(r).length?(r=this.axm.map(r,(function(e,t){var n=t.range,i=t.circular;return i&&(i[0]||i[1])?e:Pn(e,n,i)})),jn(r,i)||(t>0?this.animateTo(r,t):(this.em.triggerChange(r),this.finish(!1))),this):this},t.setBy=function(e,t){return void 0===t&&(t=0),this.setTo(Nn(this.axm.get(Object.keys(e)),(function(t,n){return t+e[n]})),t)},e}(),Xn=function(){function e(e){this.axes=e}var t=e.prototype;return t.triggerHold=function(e,t){var n=this.getRoundPos(e).roundPos;this.axes.trigger("hold",{pos:n,input:t.input||null,inputEvent:t.event||null,isTrusted:!0})},t.triggerRelease=function(e){var t=this.getRoundPos(e.destPos,e.depaPos),n=t.roundPos,i=t.roundDepa;e.destPos=n,e.depaPos=i,e.setTo=this.createUserControll(e.destPos,e.duration),this.axes.trigger("release",e)},t.triggerChange=function(e,t,n,i,r){void 0===r&&(r=!1);var o=this.am,a=o.axm,s=o.getEventInfo(),u=this.getRoundPos(e,n),l=u.roundPos,c=u.roundDepa,h=a.moveTo(l,c),f=i&&i.event||s&&s.event||null,d={pos:h.pos,delta:h.delta,holding:r,inputEvent:f,isTrusted:!!f,input:i&&i.input||s&&s.input||null,set:f?this.createUserControll(h.pos):function(){}},p=this.axes.trigger("change",d);return f&&a.set(d.set().destPos),p},t.triggerAnimationStart=function(e){var t=this.getRoundPos(e.destPos,e.depaPos),n=t.roundPos,i=t.roundDepa;return e.destPos=n,e.depaPos=i,e.setTo=this.createUserControll(e.destPos,e.duration),this.axes.trigger("animationStart",e)},t.triggerAnimationEnd=function(e){void 0===e&&(e=!1),this.axes.trigger("animationEnd",{isTrusted:e})},t.triggerFinish=function(e){void 0===e&&(e=!1),this.axes.trigger("finish",{isTrusted:e})},t.createUserControll=function(e,t){void 0===t&&(t=0);var n={destPos:En({},e),duration:t};return function(e,t){return e&&(n.destPos=En({},e)),void 0!==t&&(n.duration=t),n}},t.setAnimationManager=function(e){this.am=e},t.destroy=function(){this.axes.off()},t.getRoundPos=function(e,t){var n=this.axes.options.round;return{roundPos:Mn(e,n),roundDepa:Mn(t,n)}},e}(),Bn=function(){function e(e){this.options=e,this._prevented=!1}var t=e.prototype;return t.isInterrupting=function(){return this.options.interruptable||this._prevented},t.isInterrupted=function(){return!this.options.interruptable&&this._prevented},t.setInterrupt=function(e){!this.options.interruptable&&(this._prevented=e)},e}(),Yn=function(){function e(e,t){var n=this;this.axis=e,this.options=t,this._complementOptions(),this._pos=Object.keys(this.axis).reduce((function(e,t){return e[t]=n.axis[t].range[0],e}),{})}var t=e.prototype;return t._complementOptions=function(){var e=this;Object.keys(this.axis).forEach((function(t){e.axis[t]=En({range:[0,100],bounce:[0,0],circular:[!1,!1]},e.axis[t]),["bounce","circular"].forEach((function(n){var i=e.axis,r=i[t][n];/string|number|boolean/.test(typeof r)&&(i[t][n]=[r,r])}))}))},t.getDelta=function(e,t){var n=this.get(e);return Nn(this.get(t),(function(e,t){return e-n[t]}))},t.get=function(e){var t=this;return e&&Array.isArray(e)?e.reduce((function(e,n){return n&&n in t._pos&&(e[n]=t._pos[n]),e}),{}):En(En({},this._pos),e||{})},t.moveTo=function(e,t){void 0===t&&(t=this._pos);var n=Nn(this._pos,(function(n,i){return i in e&&i in t?e[i]-t[i]:0}));return this.set(this.map(e,(function(e,t){return t?Tn(e,t.range,t.circular):0}))),{pos:En({},this._pos),delta:n}},t.set=function(e){for(var t in e)t&&t in this._pos&&(this._pos[t]=e[t])},t.every=function(e,t){var n=this.axis;return Dn(e,(function(e,i){return t(e,n[i],i)}))},t.filter=function(e,t){var n=this.axis;return Sn(e,(function(e,i){return t(e,n[i],i)}))},t.map=function(e,t){var n=this.axis;return Nn(e,(function(e,i){return t(e,n[i],i)}))},t.isOutside=function(e){return!this.every(e?this.get(e):this._pos,(function(e,t){return!xn(e,t.range)}))},t.getAxisOptions=function(e){return this.axis[e]},e}(),Wn=function(){function e(e){var t=e.options,n=e.itm,i=e.em,r=e.axm,o=e.am;this.isOutside=!1,this.moveDistance=null,this.isStopped=!1,this.options=t,this.itm=n,this.em=i,this.axm=r,this.am=o}var t=e.prototype;return t.atOutside=function(e){var t=this;if(this.isOutside)return this.axm.map(e,(function(e,t){var n=t.range[0]-t.bounce[0],i=t.range[1]+t.bounce[1];return e>i?i:e<n?n:e}));var n=this.am.easing(1e-5)/1e-5;return this.axm.map(e,(function(e,i){var r=i.range[0],o=i.range[1],a=i.bounce,s=i.circular;return s&&(s[0]||s[1])?e:e<r?r-t.am.easing((r-e)/(a[0]*n))*a[0]:e>o?o+t.am.easing((e-o)/(a[1]*n))*a[1]:e}))},t.get=function(e){return this.axm.get(e.axes)},t.hold=function(e,t){if(!this.itm.isInterrupted()&&e.axes.length){var n={input:e,event:t};this.isStopped=!1,this.itm.setInterrupt(!0),this.am.grab(e.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(e.axes),this.moveDistance=this.axm.get(e.axes)}},t.change=function(e,t,n){if(!this.isStopped&&this.itm.isInterrupting()&&!this.axm.every(n,(function(e){return 0===e}))){var i,r=this.moveDistance||this.axm.get(e.axes);i=Nn(r,(function(e,t){return e+(n[t]||0)})),this.moveDistance&&(this.moveDistance=i),this.isOutside&&this.axm.every(r,(function(e,t){return!xn(e,t.range)}))&&(this.isOutside=!1),r=this.atOutside(r),i=this.atOutside(i),!this.em.triggerChange(i,!1,r,{input:e,event:t},!0)&&(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1))}},t.release=function(e,t,n,i){if(!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance){var r=this.axm.get(e.axes),o=this.axm.get(),a=this.axm.get(this.axm.map(n,(function(e,t,n){return t.circular&&(t.circular[0]||t.circular[1])?r[n]+e:Pn(r[n]+e,t.range,t.circular,t.bounce)}))),s=this.am.getDuration(a,r,i);0===s&&(a=En({},o));var u={depaPos:o,destPos:a,duration:s,delta:this.axm.getDelta(o,a),inputEvent:t,input:e,isTrusted:!0};this.em.triggerRelease(u),this.moveDistance=null;var l=this.am.getUserControll(u),c=jn(l.destPos,o),h={input:e,event:t};c||0===l.duration?(!c&&this.em.triggerChange(l.destPos,!1,o,h,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(h):this.em.triggerFinish(!0)):this.am.animateTo(l.destPos,l.duration,h)}},e}(),Un="ontouchstart"in yn&&"safari"===(void 0===Fn&&function(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!(!t||!t.length)}()?function(e){var t=navigator.userAgentData,n=(t.uaList||t.brands).slice(),i=t.mobile||!1,r=n[0],o={name:r.brand,version:r.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!ln(pn,n).brand},a={name:"unknown",version:"-1",majorVersion:-1};o.webkit=!o.chromium&&rn(dn,(function(e){return cn(n,e)}));var s=ln(fn,n);if(o.chromium=!!s.brand,o.chromiumVersion=s.version,!o.chromium){var u=ln(dn,n);o.webkit=!!u.brand,o.webkitVersion=u.version}if(e){var l=e.platform.toLowerCase(),c=on(gn,(function(e){return new RegExp(""+e.test,"g").exec(l)}));a.name=c?c.id:l,a.version=e.platformVersion}var h=ln(hn,n);return h.brand&&(o.name=h.brand,o.version=e?e.uaFullVersion:h.version),"Linux armv8l"===navigator.platform?a.name="android":o.webkit&&(a.name=i?"ios":"mac"),"ios"===a.name&&o.webview&&(o.version="-1"),a.version=sn(a.version),o.version=sn(o.version),a.majorVersion=parseInt(a.version,10),o.majorVersion=parseInt(o.version,10),{browser:o,os:a,isMobile:i,isHints:!0}}():vn(Fn)).browser.name,qn=function(){if("undefined"==typeof document)return"";for(var e=(document.head||document.getElementsByTagName("head")[0]).style,t=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n];return""}(),Zn=function(e){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={});var r=e.call(this)||this;return r.axis=t,r._inputs=[],r.options=En({easing:function(e){return 1-Math.pow(1-e,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null},n),r.itm=new Bn(r.options),r.axm=new Yn(r.axis,r.options),r.em=new Xn(r),r.am=new Gn(r),r.io=new Wn(r),r.em.setAnimationManager(r.am),i&&r.em.triggerChange(i),r}!function(e,t){function n(){this.constructor=e}bn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e);var n=t.prototype;return n.connect=function(e,t){var n;if(n="string"==typeof e?e.split(" "):e.concat(),~this._inputs.indexOf(t)&&this.disconnect(t),"hammer"in t){var i=this._inputs.filter((function(e){return e.hammer&&e.element===t.element}));i.length&&(t.hammer=i[0].hammer)}return t.mapAxes(n),t.connect(this.io),this._inputs.push(t),this},n.disconnect=function(e){if(e){var t=this._inputs.indexOf(e);t>=0&&(this._inputs[t].disconnect(),this._inputs.splice(t,1))}else this._inputs.forEach((function(e){return e.disconnect()})),this._inputs=[];return this},n.get=function(e){return this.axm.get(e)},n.setTo=function(e,t){return void 0===t&&(t=0),this.am.setTo(e,t),this},n.setBy=function(e,t){return void 0===t&&(t=0),this.am.setBy(e,t),this},n.isBounceArea=function(e){return this.axm.isOutside(e)},n.destroy=function(){this.disconnect(),this.em.destroy()},t.VERSION="2.8.0",t.TRANSFORM=qn,t.DIRECTION_NONE=1,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_DOWN=Fe,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=Ge,t.DIRECTION_ALL=30,t}(_n),Kn="PointerEvent"in yn||"MSPointerEvent"in yn,Jn="ontouchstart"in yn,Qn="_EGJS_AXES_INPUTTYPE_";function $n(e,t){return t.reduce((function(t,n,i){return e[i]&&(t[e[i]]=n),t}),{})}function ei(e,t,n){return n?!!(30===t||t&e&&n&e):!!(t&e)}var ti,ni=function(){function e(e,t){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,this.isRightEdge=!1,this.rightEdgeTimer=0,this.panFlag=!1,void 0===Wt)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=Rn(e),this.options=En({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"}}},t),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var t=e.prototype;return t.mapAxes=function(e){var t=!!e[0],n=!!e[1];this._direction=t&&n?30:t?6:n?Ge:1,this.axes=e},t.connect=function(e){var t={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[Qn];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=function(e){void 0===e&&(e=[]);var t=!1,n=!1,i=!1;return e.forEach((function(e){switch(e){case"mouse":n=!0;break;case"touch":t=Jn;break;case"pointer":i=Kn}})),i?pt:t&&n?It:t?bt:n?Ot:null}(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=function(e,t){try{return new Wt(e,En({},t))}catch(e){return null}}(this.element,En({inputClass:i},this.options.hammerManagerOptions)),this.element[Qn]=n}return this.panRecognizer=new Mt(t),this.hammer.add(this.panRecognizer),this.attachEvent(e),this},t.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=1,this},t.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[Qn],this.element=null,this.hammer=null},t.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},t.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},t.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},t.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},t.onHammerInput=function(e){if(this.isEnable())if(e.isFirst){if(this.panFlag=!1,!1!==e.srcEvent.cancelable){var t=this.options.iOSEdgeSwipeThreshold;this.observer.hold(this,e),this.isRightEdge=Un&&e.center.x>window.innerWidth-t,this.panFlag=!0}}else e.isFinal&&this.onPanend(e)},t.onPanmove=function(e){var t=this;if(this.panFlag){var n=this.options,i=n.iOSEdgeSwipeThreshold,r=n.releaseOnScroll,o=function(e,t){if(t<0||t>90)return 1;var n=Math.abs(e);return n>t&&n<180-t?Ge:6}(e.angle,this.options.thresholdAngle),a=this.hammer.session.prevInput;if(!r||e.srcEvent.cancelable){if(a&&Un){if(e.center.x<0)return void this.onPanend(En(En({},a),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}));this.isRightEdge&&(clearTimeout(this.rightEdgeTimer),e.deltaX<-i?this.isRightEdge=!1:this.rightEdgeTimer=window.setTimeout((function(){t.onPanend(En(En({},a),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}),100))}a?(e.offsetX=e.deltaX-a.deltaX,e.offsetY=e.deltaY-a.deltaY):(e.offsetX=0,e.offsetY=0);var s=this.getOffset([e.offsetX,e.offsetY],[ei(6,this._direction,o),ei(Ge,this._direction,o)]),u=s.some((function(e){return 0!==e}));if(u){var l=e.srcEvent;!1!==l.cancelable&&l.preventDefault(),l.stopPropagation()}e.preventSystemEvent=u,u&&this.observer.change(this,e,$n(this.axes,s))}else this.onPanend(En(En({},e),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}},t.onPanend=function(e){if(this.panFlag){clearTimeout(this.rightEdgeTimer),this.panFlag=!1;var t,n,i,r,o=this.getOffset([Math.abs(e.velocityX)*(e.deltaX<0?-1:1),Math.abs(e.velocityY)*(e.deltaY<0?-1:1)],[ei(6,this._direction),ei(Ge,this._direction)]);t=o,n=this.observer.options.deceleration,i=Math.sqrt(t[0]*t[0]+t[1]*t[1]),r=Math.abs(i/-n),o=[t[0]/2*r,t[1]/2*r],this.observer.release(this,e,$n(this.axes,o))}},t.attachEvent=function(e){this.observer=e,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},t.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},t.getOffset=function(e,t){var n=[0,0],i=this.options.scale;return t[0]&&(n[0]=e[0]*i[0]),t[1]&&(n[1]=e[1]*i[1]),n},e}(),ii=Zn,ri={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},oi="flick";!function(e){e[e.IDLE=0]="IDLE",e[e.HOLDING=1]="HOLDING",e[e.DRAGGING=2]="DRAGGING",e[e.ANIMATING=3]="ANIMATING",e[e.DISABLED=4]="DISABLED"}(ti||(ti={}));var ai=function(){function e(){this._delta=0,this._targetPanel=null}var t=e.prototype;return Object.defineProperty(t,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(t,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),t.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},t.onHold=function(e){},t.onChange=function(e){},t.onRelease=function(e){},t.onAnimationEnd=function(e){},t.onFinish=function(e){},t._moveToChangedPosition=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=n.delta.flick;if(r){this._delta+=r;var o=t.camera,a=o.position,s=n.pos.flick,u=t.circularEnabled?$(s,o.range.min,o.range.max):s;o.lookAt(u);var l=new g(C.MOVE,{isTrusted:n.isTrusted,holding:this.holding,direction:q(0,n.delta.flick),axesEvent:n});t.trigger(l),l.isCanceled()&&(o.lookAt(a),i(ti.DISABLED))}},e}(),si=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!1,t}t(n,e);var i=n.prototype;return i.onEnter=function(){this._delta=0,this._targetPanel=null},i.onHold=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;if(t.renderer.panelCount<=0)i(ti.DISABLED);else{var r=new g(C.HOLD_START,{axesEvent:n});t.trigger(r),r.isCanceled()?i(ti.DISABLED):i(ti.HOLDING)}},i.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control.controller.animatingContext,o=new g(C.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:q(r.start,r.end),axesEvent:n});t.trigger(o),o.isCanceled()?i(ti.DISABLED):i(ti.ANIMATING).onChange(e)},n}(ai),ui=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!0,t.animating=!1,t._releaseEvent=null,t}t(n,e);var i=n.prototype;return i.onChange=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=n.inputEvent,o=t.horizontal?r.offsetX:r.offsetY,a=new g(C.MOVE_START,{isTrusted:n.isTrusted,holding:this.holding,direction:q(0,-o),axesEvent:n});t.trigger(a),a.isCanceled()?i(ti.DISABLED):i(ti.DRAGGING).onChange(e)},i.onRelease=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;if(t.trigger(new g(C.HOLD_END,{axesEvent:n})),0!==n.delta.flick)return n.setTo({flick:t.camera.position},0),void i(ti.IDLE);this._releaseEvent=n},i.onFinish=function(e){var t,n,i=e.flicking;if((0,e.transitTo)(ti.IDLE),this._releaseEvent){var r,a=this._releaseEvent.inputEvent.srcEvent;if("touchend"===a.type){var s=a.changedTouches[0];r=document.elementFromPoint(s.clientX,s.clientY)}else r=a.target;var u=i.renderer.panels,l=null;try{for(var c=o(u),h=c.next();!h.done;h=c.next()){var f=h.value;if(f.contains(r)){l=f;break}}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}if(l){var d=i.camera.position,p=l.position;i.trigger(new g(C.SELECT,{index:l.index,panel:l,direction:q(d,p)}))}}},n}(ai),li=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!0,t.animating=!0,t}t(n,e);var i=n.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;if(t.trigger(new g(C.HOLD_END,{axesEvent:n})),t.renderer.panelCount<=0)i(ti.IDLE);else{i(ti.ANIMATING);var r=t.control,o=n.destPos.flick,a=Math.max(n.duration,t.duration);r.moveToPosition(o,a,n)}},n}(ai),ci=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!0,t}t(n,e);var i=n.prototype;return i.onHold=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo;this._delta=0,t.control.updateInput();var r=new g(C.HOLD_START,{axesEvent:n});t.trigger(r),r.isCanceled()?i(ti.DISABLED):i(ti.DRAGGING)},i.onChange=function(e){this._moveToChangedPosition(e)},i.onFinish=function(e){var t=e.flicking,n=e.axesEvent,i=e.transitTo,r=t.control,o=r.controller.animatingContext;i(ti.IDLE),t.trigger(new g(C.MOVE_END,{isTrusted:n.isTrusted,direction:q(o.start,o.end),axesEvent:n})),r.setActive(this._targetPanel,r.activePanel,n.isTrusted)},n}(ai),hi=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.holding=!1,t.animating=!0,t}t(n,e);var i=n.prototype;return i.onAnimationEnd=function(e){(0,e.transitTo)(ti.IDLE)},i.onChange=function(e){var t=e.axesEvent,n=e.transitTo;t.stop(),n(ti.IDLE)},i.onRelease=function(e){var t=e.axesEvent,n=e.transitTo;0===t.delta.flick&&n(ti.IDLE)},n}(ai),fi=function(){function e(){var e=this;this.transitTo=function(t){var n;switch(t){case ti.IDLE:n=new si;break;case ti.HOLDING:n=new ui;break;case ti.DRAGGING:n=new li;break;case ti.ANIMATING:n=new ci;break;case ti.DISABLED:n=new hi}return n.onEnter(e._state),e._state=n,e._state},this._state=new si}var t=e.prototype;return Object.defineProperty(t,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.fire=function(e,t){var i=this._state,r=n(n({},t),{transitTo:this.transitTo});switch(e){case ri.HOLD:i.onHold(r);break;case ri.CHANGE:i.onChange(r);break;case ri.RELEASE:i.onRelease(r);break;case ri.ANIMATION_END:i.onAnimationEnd(r);break;case ri.FINISH:i.onFinish(r)}},e}(),di=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){e._dragged=!0},this._preventClickWhenDragged=function(t){e._dragged&&(t.preventDefault(),t.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new fi}var t=e.prototype;return Object.defineProperty(t,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(t,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(t,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};var t=e.axis.flick;return{range:{min:t.range[0],max:t.range[1]},circular:t.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"enabled",{get:function(){var e,t;return null!==(t=null===(e=this._panInput)||void 0===e?void 0:e.isEnable())&&void 0!==t&&t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){var e,t;return null!==(t=null===(e=this._axes)||void 0===e?void 0:e.get([oi]).flick)&&void 0!==t?t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){var e,t;return null!==(t=null===(e=this._axes)||void 0===e?void 0:e.axis.flick.range)&&void 0!==t?t:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis.flick.bounce},enumerable:!1,configurable:!0}),t.init=function(e){var t,n=this;this._flicking=e,this._axes=new ii(((t={}).flick={range:[0,0],circular:!1,bounce:[0,0]},t),{deceleration:e.deceleration,interruptable:e.interruptable,easing:e.easing}),this._panInput=new ni(e.viewport.element,{inputType:e.inputType,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,scale:e.horizontal?[-1,0]:[0,-1],releaseOnScroll:!0});var i=this._axes;i.connect(e.horizontal?[oi,""]:["",oi],this._panInput);var r=function(t){var r=ri[t];i.on(r,(function(t){n._stateMachine.fire(r,{flicking:e,axesEvent:t})}))};for(var o in ri)r(o);return this},t.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null===(e=this._panInput)||void 0===e||e.destroy(),this._resetInternalValues()},t.enable=function(){var e;return null===(e=this._panInput)||void 0===e||e.enable(),this},t.disable=function(){var e;return null===(e=this._panInput)||void 0===e||e.disable(),this},t.update=function(e){var t,n=F(this._flicking),i=n.camera,r=this._axes,o=r.axis.flick;return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=B(n.bounce,i.size),r.axm.set(((t={}).flick=e.position,t)),this},t.addPreventClickHandler=function(){var e=F(this._flicking),t=this._axes,n=e.camera.element;return t.on(ri.HOLD,this._onAxesHold),t.on(ri.CHANGE,this._onAxesChange),n.addEventListener("click",this._preventClickWhenDragged,!0),this},t.removePreventClickHandler=function(){var e=F(this._flicking),t=this._axes,n=e.camera.element;return t.off(ri.HOLD,this._onAxesHold),t.off(ri.CHANGE,this._onAxesChange),n.removeEventListener("click",this._preventClickWhenDragged,!0),this},t.animateTo=function(e,t,n){var i,r,o=this,a=this._axes,s=this._stateMachine.state;if(!a)return Promise.reject(new ce(y,v.NOT_ATTACHED_TO_FLICKING));var u=a.get([oi]).flick;if(u===e)return(c=F(this._flicking)).camera.lookAt(e),s.targetPanel&&c.control.setActive(s.targetPanel,c.control.activePanel,null!==(r=null==n?void 0:n.isTrusted)&&void 0!==r&&r),Promise.resolve();this._animatingContext={start:u,end:e,offset:0};var l=function(){var i,r;a.once(ri.FINISH,(function(){o._animatingContext={start:0,end:0,offset:0}})),n?n.setTo(((i={}).flick=e,i),t):a.setTo(((r={}).flick=e,r),t)};if(0===t){var c,h=(c=F(this._flicking)).camera;l();var f=c.circularEnabled?$(e,h.range.min,h.range.max):e;return a.axm.set(((i={}).flick=f,i)),Promise.resolve()}return new Promise((function(e,t){var n=function(){a.off(ri.HOLD,i),e()},i=function(){a.off(ri.FINISH,n),t(new ce(w,v.ANIMATION_INTERRUPTED))};a.once(ri.FINISH,n),a.once(ri.HOLD,i),l()}))},t._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),pi=function(){function e(){this._flicking=null,this._controller=new di,this._activePanel=null}var t=e.prototype;return Object.defineProperty(t,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activeIndex",{get:function(){var e,t;return null!==(t=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==t?t:-1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(t,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),t.init=function(e){return this._flicking=e,this._controller.init(e),this},t.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},t.enable=function(){return this._controller.enable(),this},t.disable=function(){return this._controller.disable(),this},t.updatePosition=function(e){var t=F(this._flicking).camera,n=this._activePanel;n&&t.lookAt(t.clampToReachablePosition(n.position))},t.updateInput=function(){var e=F(this._flicking).camera;return this._controller.update(e.controlParams),this},t.resetActive=function(){return this._activePanel=null,this},t.moveToPanel=function(e,t){var n=t.duration,o=t.direction,a=void 0===o?N.NONE:o,s=t.axesEvent;return i(this,void 0,void 0,(function(){var t,i,o,u,l,c,h;return r(this,(function(r){return t=F(this._flicking),i=t.camera,o=e.position,u=i.findNearestAnchor(o),e.removed||!u?[2,Promise.reject(new ce(x(e.position),v.POSITION_NOT_REACHABLE))]:(i.canReach(e)?t.circularEnabled&&(l=this._controller.position,c=i.rangeDiff,h=[o,o+c,o-c].filter((function(e){return a===N.NONE||(a===N.PREV?e<=l:e>=l)})),o=h.reduce((function(e,t){return Math.abs(l-t)<Math.abs(l-e)?t:e}),1/0)):(o=u.position,e=u.panel),this._triggerIndexChangeEvent(e,e.position,s),[2,this._animateToPosition({position:o,duration:n,newActivePanel:e,axesEvent:s})])}))}))},t.setActive=function(e,t,n){var i,r=F(this._flicking);this._activePanel=e,r.camera.updateAdaptiveHeight(),e!==t?r.trigger(new g(C.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==t?void 0:t.index)&&void 0!==i?i:-1,prevPanel:t,isTrusted:n,direction:t?q(t.position,e.position):N.NONE})):r.trigger(new g(C.RESTORED,{isTrusted:n}))},t._triggerIndexChangeEvent=function(e,t,n){var i,r=F(this._flicking),o=e!==this._activePanel?C.WILL_CHANGE:C.WILL_RESTORE,a=r.camera,s=this._activePanel,u=new g(o,{index:e.index,panel:e,isTrusted:(null==n?void 0:n.isTrusted)||!1,direction:q(null!==(i=null==s?void 0:s.position)&&void 0!==i?i:a.position,t)});if(r.trigger(u),u.isCanceled())throw new ce(T,v.STOP_CALLED_BY_USER)},t._animateToPosition=function(e){var t=e.position,n=e.duration,o=e.newActivePanel,a=e.axesEvent;return i(this,void 0,void 0,(function(){var e,s,u=this;return r(this,(function(l){return e=F(this._flicking),s=function(){return u._controller.animateTo(t,n,a)},this._controller.state.targetPanel=o,n<=0?[2,s()]:[2,s().then((function(){return i(u,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,e.renderer.render()];case 1:return t.sent(),[2]}}))}))})).catch((function(e){if(!(a&&e instanceof ce&&e.code===v.ANIMATION_INTERRUPTED))throw e}))]}))}))},e}(),gi=function(){function e(e){var t=e.index,n=e.position,i=e.panel;this._index=t,this._pos=n,this._panel=i}var t=e.prototype;return Object.defineProperty(t,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._pos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panel",{get:function(){return this._panel},enumerable:!1,configurable:!0}),e}(),vi=function(e){function n(t){var n=(void 0===t?{}:t).count,i=void 0===n?1/0:n,r=e.call(this)||this;return r._count=i,r}t(n,e);var o=n.prototype;return Object.defineProperty(o,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),o.moveToPosition=function(e,t,n){return i(this,void 0,void 0,(function(){var i,o,a,s,u,l,c,h,f,d;return r(this,(function(r){return i=F(this._flicking),o=i.camera,a=o.findActiveAnchor(),s=o.findNearestAnchor(o.position),u=i.control.controller.state,a&&s?(l=this._calcSnapThreshold(e,a),c=i.animating?u.delta:e-o.position,h=Math.abs(c),f=n&&0!==n.delta.flick?Math.abs(n.delta.flick):h,d=f>=l&&f>0?this._findSnappedAnchor(e,s):h>=i.threshold&&h>0?this._findAdjacentAnchor(c,s):s,this._triggerIndexChangeEvent(d.panel,e,n),[2,this._animateToPosition({position:o.clampToReachablePosition(d.position),duration:t,newActivePanel:d.panel,axesEvent:n})]):[2,Promise.reject(new ce(x(e),v.POSITION_NOT_REACHABLE))]}))}))},o._findSnappedAnchor=function(e,t){var n=F(this._flicking),i=n.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!t||!s)throw new ce(x(e),v.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var u=n.panelCount,l=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&s.index<t.index||s.position>t.position&&s.index===t.index?c+=1:(e<o&&s.index>t.index||s.position<t.position&&s.index===t.index)&&(c-=1);var h=c*u,f=s.index+h;if(Math.abs(f-t.index)<=r){var d=l[s.index];return new gi({index:d.index,position:d.position+c*i.rangeDiff,panel:d.panel})}if(n.circularEnabled){var p=l[ae(t.index+Math.sign(e-o)*r,u)],g=Math.floor(r/u);return e>o&&p.index<t.index?g+=1:e<o&&p.index>t.index&&(g-=1),new gi({index:p.index,position:p.position+g*i.rangeDiff,panel:p.panel})}return l[V(t.index+Math.sign(e-o)*r,0,l.length-1)]},o._findAdjacentAnchor=function(e,t){var n,i=F(this._flicking).camera;return null!==(n=e>0?i.getNextAnchor(t):i.getPrevAnchor(t))&&void 0!==n?n:t},o._calcSnapThreshold=function(e,t){var n=e>t.position,i=t.panel,r=i.size,o=i.alignPosition;return n?r-o+i.margin.next:o+i.margin.prev},n}(pi),mi=function(e){function n(t){var n=(void 0===t?{}:t).stopAtEdge,i=void 0===n||n,r=e.call(this)||this;return r._stopAtEdge=i,r}t(n,e);var o=n.prototype;return Object.defineProperty(o,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),o.updatePosition=function(e){var t=F(this._flicking).camera,n=this._activePanel;if(n){var i=n.range,r=i.min+(i.max-i.min)*e;t.lookAt(t.clampToReachablePosition(r))}},o.moveToPosition=function(e,t,n){return i(this,void 0,void 0,(function(){var i,o,a,s,u;return r(this,(function(r){return i=F(this._flicking),o=i.camera,a=o.clampToReachablePosition(e),(s=o.findAnchorIncludePosition(a))?((u=s.panel)!==this._activePanel&&this._triggerIndexChangeEvent(u,e,n),[2,this._animateToPosition({position:this._stopAtEdge?a:e,duration:t,newActivePanel:u,axesEvent:n})]):[2,Promise.reject(new ce(x(e),v.POSITION_NOT_REACHABLE))]}))}))},n}(pi),_i=function(e){function n(t){var n=(void 0===t?{}:t).count,i=void 0===n?1:n,r=e.call(this)||this;return r.setActive=function(t,n,i){e.prototype.setActive.call(r,t,n,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}t(n,e);var o=n.prototype;return Object.defineProperty(o,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),o.destroy=function(){e.prototype.destroy.call(this),this._resetIndexRange()},o.updateInput=function(){var e,t=F(this._flicking),n=t.camera,i=t.renderer,r=this._controller,o=n.controlParams,a=this._count,s=r.state.animating?null===(e=n.findNearestAnchor(n.position))||void 0===e?void 0:e.panel:this._activePanel;if(!s)return r.update(o),this._resetIndexRange(),this;var u=o.range,l=s.position,c=s.index,h=i.panelCount,f=c-a,d=c+a;f<0&&(f=t.circularEnabled?K((f+1)%h-1,h):V(f,0,h-1)),d>=h&&(d=t.circularEnabled?d%h:V(d,0,h-1));var p=i.panels[f],g=i.panels[d],v=Math.max(p.position,u.min),m=Math.min(g.position,u.max);return v>l&&(v-=n.rangeDiff),m<l&&(m+=n.rangeDiff),o.range={min:v,max:m},o.circular&&(o.position<v&&(o.position+=n.rangeDiff),o.position>m&&(o.position-=n.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:p.index,max:g.index},this},o.moveToPosition=function(e,t,n){return i(this,void 0,void 0,(function(){var i,o,a,s,u,l,c,h,f,d,p,g,m,_,b,y,E,P,O;return r(this,(function(r){return i=F(this._flicking),o=i.camera,a=this._activePanel,s=this._controller.range,u=this._indexRange,l=o.range,c=V(o.clampToReachablePosition(e),s[0],s[1]),(h=o.findAnchorIncludePosition(c))&&a?(f=a.position,d=Math.abs(e-f)>=i.threshold,p=e>f?o.getNextAnchor(h):o.getPrevAnchor(h),_=o.anchorPoints,b=_[0],y=_[_.length-1],E=e<=l.min&&oe(b.panel.index,u.min,u.max),P=e>=l.max&&oe(y.panel.index,u.min,u.max),E||P?(O=e<l.min?b:y,m=O.panel,g=O.position):d&&h.position!==a.position?(m=h.panel,g=h.position):d&&p&&oe(p.index,u.min,u.max)?(m=p.panel,g=p.position):(g=o.clampToReachablePosition(a.position),m=a),this._triggerIndexChangeEvent(m,e,n),[2,this._animateToPosition({position:g,duration:t,newActivePanel:m,axesEvent:n})]):[2,Promise.reject(new ce(x(e),v.POSITION_NOT_REACHABLE))]}))}))},o._resetIndexRange=function(){this._indexRange={min:0,max:0}},n}(pi),bi={__proto__:null,Control:pi,SnapControl:vi,FreeControl:mi,StrictControl:_i,AxesController:di,State:ai,IdleState:si,HoldingState:ui,DraggingState:li,AnimatingState:ci,DisabledState:hi,StateMachine:fi},yi=function(){function e(e){this._flicking=e}var t=e.prototype;return t.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,t){return new gi({index:t,position:e.position,panel:e})}))},t.findAnchorIncludePosition=function(e){return this._flicking.camera.anchorPoints.filter((function(t){return t.panel.includePosition(e,!0)})).reduce((function(t,n){return t&&Math.abs(t.position-e)<Math.abs(n.position-e)?t:n}),null)},t.clampToReachablePosition=function(e){var t=this._flicking.camera.range;return V(e,t.min,t.max)},t.getCircularOffset=function(){return 0},t.canReach=function(e){var t=this._flicking.camera.range;if(e.removed)return!1;var n=e.position;return n>=t.min&&n<=t.max},t.canSee=function(e){var t=this._flicking.camera.visibleRange;return e.isVisibleOnRange(t.min,t.max)},e}(),Ei=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i.checkAvailability=function(){return!0},i.getRange=function(){var e,t,n=this._flicking.renderer,i=n.getPanel(0),r=n.getPanel(n.panelCount-1);return{min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(t=null==r?void 0:r.position)&&void 0!==t?t:0}},n}(yi),Pi=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i.checkAvailability=function(){var e=this._flicking,t=e.renderer.panels;if(t.length<=0)return!1;var n=t[0],i=t[t.length-1],r=n.range.min-n.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return t.every((function(e){return s-e.size>=a}))},i.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var t=e[0],n=e[e.length-1];return{min:t.range.min-t.margin.prev,max:n.range.max+n.margin.next}},i.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,t){return new gi({index:t,position:e.position,panel:e})}))},i.findAnchorIncludePosition=function(t){var n=this._flicking.camera,i=n.range,r=n.anchorPoints,o=n.rangeDiff,a=r.length,s=$(t,i.min,i.max),u=e.prototype.findAnchorIncludePosition.call(this,s);if(a>0&&(t===i.min||t===i.max)){var l=[u,new gi({index:0,position:r[0].position+o,panel:r[0].panel}),new gi({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));u=l.reduce((function(e,n){return e&&Math.abs(e.position-t)<Math.abs(n.position-t)?e:n}),null)}if(!u)return null;if(t<i.min){var c=-Math.floor((i.min-t)/o)-1;return new gi({index:u.index,position:u.position+o*c,panel:u.panel})}if(t>i.max){c=Math.floor((t-i.max)/o)+1;return new gi({index:u.index,position:u.position+o*c,panel:u.panel})}return u},i.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var t=e.panels.filter((function(e){return e.toggled})),n=t.filter((function(e){return e.toggleDirection===N.PREV})),i=t.filter((function(e){return e.toggleDirection===N.NEXT}));return this._calcPanelAreaSum(n)-this._calcPanelAreaSum(i)},i.clampToReachablePosition=function(e){return e},i.canReach=function(e){return!e.removed},i.canSee=function(t){var n=this._flicking.camera,i=n.range,r=n.rangeDiff,o=n.visibleRange,a=e.prototype.canSee.call(this,t);return o.min<i.min?a||t.isVisibleOnRange(o.min+r,o.max+r):o.max>i.max?a||t.isVisibleOnRange(o.min-r,o.max-r):a},i._calcPanelAreaSum=function(e){return e.reduce((function(e,t){return e+t.sizeIncludingMargin}),0)},n}(yi),xi=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i.checkAvailability=function(){var e=this._flicking,t=e.renderer,n=t.getPanel(0),i=t.getPanel(t.panelCount-1);if(!n||!i)return!1;var r=e.camera.size,o=n.range.min;return r<i.range.max-o},i.getRange=function(){var e=this._flicking,t=e.renderer,n=e.camera.alignPosition,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);if(!i||!r)return{min:0,max:0};var o=e.camera.size,a=i.range.min,s=r.range.max,u=a+n,l=s-o+n;if(o<s-a)return{min:u,max:l};var c=e.camera.align,h="object"==typeof c?c.camera:c,f=u+X(h,l-u);return{min:f,max:f}},i.getAnchors=function(){var e=this._flicking,t=e.camera,n=e.renderer.panels;if(n.length<=0)return[];var i=e.camera.range,r=n.filter((function(e){return t.canReach(e)}));if(r.length>0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,s=o?1:0,u=r.map((function(e,t){return new gi({index:t+s,position:e.position,panel:e})}));return o&&u.splice(0,0,new gi({index:0,position:i.min,panel:n[r[0].index-1]})),a&&u.push(new gi({index:u.length,position:i.max,panel:n[r[r.length-1].index+1]})),u}if(i.min!==i.max){var l=this._findNearestPanel(i.min,n),c=l.index===n.length-1?l.prev():l,h=c.next();return[new gi({index:0,position:i.min,panel:c}),new gi({index:1,position:i.max,panel:h})]}return[new gi({index:0,position:i.min,panel:this._findNearestPanel(i.min,n)})]},i.findAnchorIncludePosition=function(t){var n=this._flicking.camera,i=n.range,r=n.anchorPoints;return r.length<=0?null:t<=i.min?r[0]:t>=i.max?r[r.length-1]:e.prototype.findAnchorIncludePosition.call(this,t)},i._findNearestPanel=function(e,t){for(var n=1/0,i=0;i<t.length;i++){var r=t[i],o=Math.abs(r.position-e);if(o>n)return t[i-1];n=o}return t[t.length-1]},n}(yi),Oi=function(){function e(e){var t=this,n=(void 0===e?{}:e).align,i=void 0===n?k.CENTER:n;this._checkTranslateSupport=function(){var e,n,i=document.documentElement.style,r="";try{for(var a=o(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),s=a.next();!s.done;s=a.next()){var u=s.value;u in i&&(r=u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}if(!r)throw new ce(O,v.TRANSFORM_NOT_SUPPORTED);t._transform=r},this._flicking=null,this._resetInternalValues(),this._align=i}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"children",{get:function(){return G(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking,t=this._position+this._offset,n=this.findNearestAnchor(this._position);if(!e||!n)return NaN;var i=n.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,s=a.min,u=a.max,l=this.rangeDiff;if(t===r)return i.index;if(t<r){var c=i.prev(),h=c?c.position+c.offset:s-o[0];return h>r&&(h-=l),i.index-1+ne(t,h,r)}var f=i.next(),d=f?f.position+f.offset:u+o[1];return d<r&&(d+=l),i.index+ne(t,r,d)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),t.init=function(e){this._flicking=e;var t=e.viewport.element;return H(t.firstElementChild,"First element child of the viewport element"),this._el=t.firstElementChild,this._checkTranslateSupport(),this._updateMode(),this},t.destroy=function(){return this._flicking=null,this._resetInternalValues(),this},t.lookAt=function(e){var t=this,n=F(this._flicking),i=this._position;this._position=e;var r=this._togglePanels(i,e);this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(i,e),this.applyTransform(),r&&n.renderer.render().then((function(){t.updateOffset()}))},t.getPrevAnchor=function(e){if(this._circularEnabled&&0===e.index){var t=this._anchors,n=this.rangeDiff,i=t[t.length-1];return new gi({index:i.index,position:i.position-n,panel:i.panel})}return this._anchors[e.index-1]||null},t.getNextAnchor=function(e){var t=this._anchors;if(this._circularEnabled&&e.index===t.length-1){var n=this.rangeDiff,i=t[0];return new gi({index:i.index,position:i.position+n,panel:i.panel})}return t[e.index+1]||null},t.getProgressInPanel=function(e){var t=e.range;return(this._position-t.min)/(t.max-t.min)},t.findAnchorIncludePosition=function(e){return this._mode.findAnchorIncludePosition(e)},t.findNearestAnchor=function(e){var t=this._anchors;if(t.length<=0)return null;for(var n=1/0,i=0;i<t.length;i++){var r=t[i],o=Math.abs(r.position-e);if(o>n)return t[i-1];n=o}return t[t.length-1]},t.findActiveAnchor=function(){var e=F(this._flicking).control.activeIndex;return ee(this._anchors,(function(t){return t.panel.index===e}))},t.clampToReachablePosition=function(e){return this._mode.clampToReachablePosition(e)},t.canReach=function(e){return this._mode.canReach(e)},t.canSee=function(e){return this._mode.canSee(e)},t.updateRange=function(){var e=F(this._flicking).renderer.panels;return this._updateMode(),this._range=this._mode.getRange(),this._circularEnabled&&e.forEach((function(e){return e.updateCircularToggleDirection()})),this.updateOffset(),this},t.updateAlignPos=function(){var e=this._align,t="object"==typeof e?e.camera:e;return this._alignPos=X(t,this.size),this},t.updateAnchors=function(){return this._anchors=this._mode.getAnchors(),this},t.updateAdaptiveHeight=function(){var e=F(this._flicking),t=e.control.activePanel;e.horizontal&&e.adaptive&&t&&e.viewport.setSize({height:t.height})},t.updateOffset=function(){var e=F(this._flicking),t=this._position,n=e.panels.filter((function(e){return!e.rendered}));return this._offset=n.filter((function(e){return e.position+e.offset<t})).reduce((function(e,t){return e+t.sizeIncludingMargin}),0),this._circularOffset=this._mode.getCircularOffset(),this.applyTransform(),this},t.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},t.applyTransform=function(){var e=this._el,t=F(this._flicking),n=this._position-this._alignPos-this._offset+this._circularOffset;return e.style[this._transform]=t.horizontal?"translate("+-n+"px)":"translate(0, "+-n+"px)",this},t._resetInternalValues=function(){this._position=0,this._alignPos=0,this._offset=0,this._circularOffset=0,this._circularEnabled=!1,this._range={min:0,max:0},this._visiblePanels=[],this._anchors=[],this._needPanelTriggered={prev:!1,next:!1}},t._refreshVisiblePanels=function(){var e=this,t=F(this._flicking),n=t.renderer.panels.filter((function(t){return e.canSee(t)})),i=this._visiblePanels;this._visiblePanels=n;var r=n.filter((function(e){return!J(i,e)})),o=i.filter((function(e){return!J(n,e)}));(r.length>0||o.length>0)&&t.renderer.render().then((function(){t.trigger(new g(C.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:n}))}))},t._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var t=F(this._flicking),n=t.renderer.panels;if(n.length<=0)return e.prev||(t.trigger(new g(C.NEED_PANEL,{direction:N.PREV})),e.prev=!0),void(e.next||(t.trigger(new g(C.NEED_PANEL,{direction:N.NEXT})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=t.needPanelThreshold,s=i-this._alignPos,u=s+r,l=n[0],c=n[n.length-1];if(!e.prev)(s<=l.range.min+a||i<=o.min+a)&&(t.trigger(new g(C.NEED_PANEL,{direction:N.PREV})),e.prev=!0);if(!e.next)(u>=c.range.max-a||i>=o.max-a)&&(t.trigger(new g(C.NEED_PANEL,{direction:N.NEXT})),e.next=!0)}},t._checkReachEnd=function(e,t){var n=F(this._flicking),i=this._range,r=e>i.min&&e<i.max,o=t>i.min&&t<i.max;if(r&&!o){var a=t<=i.min?N.PREV:N.NEXT;n.trigger(new g(C.REACH_EDGE,{direction:a}))}},t._updateMode=function(){var e=F(this._flicking);if(e.circular){var t=new Pi(e),n=t.checkAvailability();if(n)this._mode=t;else{var i=e.circularFallback;this._mode=i===j.BOUND?new xi(e):new Ei(e)}this._circularEnabled=n}else this._mode=e.bound?new xi(e):new Ei(e)},t._togglePanels=function(e,t){return t!==e&&F(this._flicking).renderer.panels.map((function(n){return n.toggle(e,t)})).some((function(e){return e}))},e}(),Ti={__proto__:null,Camera:Oi,LinearCameraMode:Ei,CircularCameraMode:Pi,BoundCameraMode:xi},wi=function(e,t){return wi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},wi(e,t)};function Ri(e,t){function n(){this.constructor=e}wi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ii=function(){return Ii=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Ii.apply(this,arguments)};var Ai="undefined"!=typeof window,Ci=Ai?window.navigator.userAgent:"",ki=!!Ai&&!!("getComputedStyle"in window),Ni=/MSIE|Trident|Windows Phone|Edge/.test(Ci),Si=!!Ai&&!!("addEventListener"in document),Di="width",ji="height";function Li(e,t){return e.getAttribute(t)||""}function zi(e){return[].slice.call(e)}function Mi(e){return"loading"in e&&"lazy"===e.getAttribute("loading")}function Hi(e,t,n){Si?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function Vi(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function Fi(e,t){var n=e["client"+t]||e["offset"+t];return parseFloat(n||function(e){return(ki?window.getComputedStyle(e):e.currentStyle)||{}}(e)[t.toLowerCase()])||0}function Gi(e,t,n){var i=zi(e.querySelectorAll(function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(["["+n+"skip] ["+n+"width]"],t.map((function(e){return["["+n+"skip] "+e,e+"["+n+"skip]","["+n+"width] "+e].join(", ")}))).join(", ")));return zi(e.querySelectorAll("["+n+"width], "+t.join(", "))).filter((function(e){return-1===i.indexOf(e)}))}var Xi=[];function Bi(e,t){!Xi.length&&Hi(window,"resize",Wi),e.__PREFIX__=t,Xi.push(e),Yi(e)}function Yi(e,t){void 0===t&&(t="data-");var n=e.__PREFIX__||t,i=parseInt(Li(e,""+n+Di),10)||0,r=parseInt(Li(e,""+n+ji),10)||0;if(Li(e,n+"fixed")===ji){var o=Fi(e,"Height")||r;e.style.width=i/r*o+"px"}else{o=function(e){return Fi(e,"Width")}(e)||i;e.style.height=r/i*o+"px"}}function Wi(){Xi.forEach((function(e){Yi(e)}))}var Ui=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;i.isReady=!1,i.isPreReady=!1,i.hasDataSize=!1,i.hasLoading=!1,i.isSkip=!1,i.onCheck=function(e){i.clear(),e&&"error"===e.type&&i.onError(i.element);var t=!i.hasDataSize&&!i.hasLoading;i.onReady(t)},i.options=Ii({prefix:"data-"},n),i.element=t;var r=i.options.prefix;return i.hasDataSize=function(e,t){return void 0===t&&(t="data-"),!!e.getAttribute(t+"width")}(t,r),i.isSkip=function(e,t){return void 0===t&&(t="data-"),!!e.getAttribute(t+"skip")}(t,r),i.hasLoading=Mi(t),i}Ri(t,e);var n=t.prototype;return n.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(!0),!1):(this.hasDataSize&&Bi(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},n.addEvents=function(){var e=this,t=this.element;this.constructor.EVENTS.forEach((function(n){Hi(t,n,e.onCheck)}))},n.clear=function(){var e=this,t=this.element;this.constructor.EVENTS.forEach((function(n){Vi(t,n,e.onCheck)})),this.removeAutoSizer()},n.destroy=function(){this.clear(),this.off()},n.removeAutoSizer=function(){if(this.hasDataSize){var e=this.options.prefix;!function(e,t){var n=Xi.indexOf(e);if(!(n<0)){var i=Li(e,t+"fixed");delete e.__PREFIX__,e.style[i===ji?Di:ji]="",Xi.splice(n,1),!Xi.length&&Vi(window,"resize",Wi)}}(this.element,e)}},n.onError=function(e){this.trigger("error",{element:this.element,target:e})},n.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},n.onReady=function(e){this.isReady||((e=!this.isPreReady&&e)&&(this.isPreReady=!0),this.removeAutoSizer(),this.isReady=!0,this.trigger("ready",{element:this.element,withPreReady:e,hasLoading:this.hasLoading,isSkip:this.isSkip}))},n.onAlreadyError=function(e){var t=this;setTimeout((function(){t.onError(e)}))},n.onAlreadyPreReady=function(){var e=this;setTimeout((function(){e.onPreReady()}))},n.onAlreadyReady=function(e){var t=this;setTimeout((function(){t.onReady(e)}))},t.EVENTS=[],t}(p),qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Ri(t,e);var n=t.prototype;return n.setHasLoading=function(e){this.hasLoading=e},n.check=function(){return this.isSkip?(this.onAlreadyReady(!0),!1):(this.hasDataSize?(Bi(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},n.checkElement=function(){return!0},n.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},n.onAlreadyPreReady=function(){e.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},t.EVENTS=[],t}(Ui),Zi=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.readyCount=0,n.preReadyCount=0,n.totalCount=0,n.totalErrorCount=0,n.isPreReadyOver=!0,n.elementInfos=[],n.options=Ii({loaders:{},prefix:"data-"},t),n}Ri(t,e);var n=t.prototype;return n.check=function(e){var t=this,n=this.options.prefix;this.clear(),this.elementInfos=zi(e).map((function(e,i){var r=t.getLoader(e,{prefix:n});return r.check(),r.on("error",(function(e){t.onError(i,e.target)})).on("preReady",(function(e){var n=t.elementInfos[i];n.hasLoading=e.hasLoading,n.isSkip=e.isSkip;var r=t.checkPreReady(i);t.onPreReadyElement(i),r&&t.onPreReady()})).on("ready",(function(e){var n=e.withPreReady,r=e.hasLoading,o=e.isSkip,a=t.elementInfos[i];a.hasLoading=r,a.isSkip=o;var s=n&&t.checkPreReady(i),u=t.checkReady(i);n&&t.onPreReadyElement(i),t.onReadyElement(i),s&&t.onPreReady(),u&&t.onReady()})),{loader:r,element:e,hasLoading:!1,hasError:!1,isPreReady:!1,isReady:!1,isSkip:!1}}));var i=this.elementInfos.length;return this.totalCount=i,i||setTimeout((function(){t.onPreReady(),t.onReady()})),this},n.getTotalCount=function(){return this.totalCount},n.isPreReady=function(){return this.elementInfos.every((function(e){return e.isPreReady}))},n.isReady=function(){return this.elementInfos.every((function(e){return e.isReady}))},n.hasError=function(){return this.totalErrorCount>0},n.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach((function(e){!e.isReady&&e.loader&&e.loader.destroy()})),this.elementInfos=[]},n.destroy=function(){this.clear(),this.off()},n.getLoader=function(e,t){var n=this,i=e.tagName.toLowerCase(),r=this.options.loaders,o=Object.keys(r);if(r[i])return new r[i](e,t);var a=new qi(e,t),s=zi(e.querySelectorAll(o.join(", ")));a.setHasLoading(s.some((function(e){return Mi(e)})));var u=!1,l=this.clone().on("error",(function(e){a.onError(e.target)})).on("ready",(function(){a.onReady(u)}));return a.on("requestChildren",(function(){var t=Gi(e,o,n.options.prefix);l.check(t).on("preReady",(function(e){(u=e.isReady)||a.onPreReady()}))})).on("reqeustReadyChildren",(function(){l.check(s)})).on("requestDestroy",(function(){l.destroy()})),a},n.clone=function(){return new t(Ii({},this.options))},n.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},n.checkReady=function(e){return this.elementInfos[e].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},n.onError=function(e,t){var n=this.elementInfos[e];n.hasError=!0,this.trigger("error",{element:n.element,index:e,target:t,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount})},n.onPreReadyElement=function(e){var t=this.elementInfos[e];this.trigger("preReadyElement",{element:t.element,index:e,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isSkip:t.isSkip})},n.onPreReady=function(){this.isPreReadyOver=!0,this.trigger("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()})},n.onReadyElement=function(e){var t=this.elementInfos[e];this.trigger("readyElement",{index:e,element:t.element,hasError:t.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:t.isSkip})},n.onReady=function(){this.trigger("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount})},n.getErrorCount=function(){return this.elementInfos.filter((function(e){return e.hasError})).length},n.hasLoading=function(){return this.elementInfos.some((function(e){return e.hasLoading}))},t}(p),Ki=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ri(t,e),t.prototype.checkElement=function(){var e=this.element,t=e.getAttribute("src");if(e.complete){if(t)return e.naturalWidth||this.onAlreadyError(e),!1;this.onAlreadyPreReady()}return this.addEvents(),Ni&&e.setAttribute("src",t),!0},t.EVENTS=["load","error"],t}(Ui),Ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ri(t,e),t.prototype.checkElement=function(){var e=this.element;return!(e.readyState>=1)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},t.EVENTS=["loadedmetadata","error"],t}(Ui),Qi=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Ii({loaders:{img:Ki,video:Ji}},t))||this}return Ri(t,e),t}(Zi),$i=function(){function e(e){var t=e.align,n=void 0===t?k.CENTER:t,i=e.strategy;this._flicking=null,this._panels=[],this._align=n,this._strategy=i}var t=e.prototype;return Object.defineProperty(t,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strategy",{get:function(){return this._strategy},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e;var t=U(e);this._panels.forEach((function(e){e.align=t}))},enumerable:!1,configurable:!0}),t.init=function(e){return this._flicking=e,this._collectPanels(),this},t.destroy=function(){this._flicking=null,this._panels=[]},t.getPanel=function(e){return this._panels[e]||null},t.forceRenderAllPanels=function(){return this._panels.forEach((function(e){return e.markForShow()})),Promise.resolve()},t.updatePanelSize=function(){var e=F(this._flicking),t=this._panels;if(t.length<=0)return this;if(e.panelsPerView>0){var n=t[0];n.resize(),this._updatePanelSizeByGrid(n,t)}else e.panels.forEach((function(e){return e.resize()}));return this},t.batchInsert=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this._panels,r=F(this._flicking),o=r.control,a=i[0],u=U(this._align),l=t.reduce((function(t,n){var o,l=K(n.index,i.length),c=i.slice(l),h=n.elements.map((function(t,n){return e._createPanel(t,{index:l+n,align:u,flicking:r})}));if(i.splice.apply(i,s([l,0],h)),n.hasDOMInElements&&e._insertPanelElements(h,null!==(o=c[0])&&void 0!==o?o:null),r.panelsPerView>0){var f=a||h[0].resize();e._updatePanelSizeByGrid(f,h)}else h.forEach((function(e){return e.resize()}));return c.forEach((function(e){e.increaseIndex(h.length),e.updatePosition()})),s(t,h)}),[]);return l.length<=0?[]:(this._updateCameraAndControl(),this.render(),l.length>0&&!o.animating&&o.moveToPanel(o.activePanel||l[0],{duration:0}).catch((function(){})),r.camera.updateOffset(),r.trigger(new g(C.PANEL_CHANGE,{added:l,removed:[]})),this.checkPanelContentsReady(l),l)},t.batchRemove=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this._panels,r=F(this._flicking),o=r.camera,a=r.control,u=a.activePanel,l=a.activeIndex,c=t.reduce((function(t,n){var r=n.index,o=n.deleteCount,l=K(r,i.length),c=i.slice(l+o),h=i.splice(l,o);return h.length<=0?[]:(c.forEach((function(e){e.decreaseIndex(h.length),e.updatePosition()})),n.hasDOMInElements&&e._removePanelElements(h),h.forEach((function(e){return e.destroy()})),J(h,u)&&a.resetActive(),s(t,h))}),[]);if(this._updateCameraAndControl(),this.render(),c.length>0&&!a.animating){var h=J(c,u)?i[l]||i[i.length-1]:u;h?a.moveToPanel(h,{duration:0}).catch((function(){})):o.lookAt(0)}return r.camera.updateOffset(),r.trigger(new g(C.PANEL_CHANGE,{added:[],removed:c})),c},t.checkPanelContentsReady=function(e){var t=this,n=F(this._flicking),i=n.resizeOnContentsReady,r=this._panels;if(i&&!n.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return!!e.element.querySelector("img, video")}(e)}))).length<=0)){var o=new Qi;e.forEach((function(e){e.loading=!0})),o.on("readyElement",(function(i){if(t._flicking){var a=e[i.index],s=n.camera,u=n.control,l=u.activePanel?s.getProgressInPanel(u.activePanel):0;a.loading=!1,a.resize(),r.slice(a.index+1).forEach((function(e){return e.updatePosition()})),n.initialized&&(s.updateRange(),s.updateAnchors(),u.animating||(u.updatePosition(l),u.updateInput()))}else o.destroy()})),o.on("preReady",(function(e){t._flicking&&t.render(),e.readyCount===e.totalCount&&o.destroy()})),o.on("ready",(function(){t._flicking&&t.render(),o.destroy()})),o.check(e.map((function(e){return e.element})))}}},t._updateCameraAndControl=function(){var e=F(this._flicking),t=e.camera,n=e.control;t.updateRange(),t.updateAnchors(),t.resetNeedPanelHistory(),n.updateInput()},t._showOnlyVisiblePanels=function(e){var t=e.renderer.panels,n=e.camera.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(t){t.index in n||t.loading?t.markForShow():e.holding||t.markForHide()}))},t._updatePanelSizeByGrid=function(e,t){var n=F(this._flicking),i=n.panelsPerView;if(i<=0)throw new ce(E("panelsPerView",i),v.WRONG_OPTION);if(!(t.length<=0)){var r=(n.camera.size-(e.margin.prev+e.margin.next)*(i-1))/i,o=n.horizontal?{width:r}:{height:r},a={size:r,height:e.height,margin:e.margin};n.noPanelStyleOverride||this._strategy.updatePanelSizes(n,o),n.panels.forEach((function(e){return e.resize(a)}))}},t._removeAllChildsFromCamera=function(){for(var e=F(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},t._insertPanelElements=function(e,t){void 0===t&&(t=null);var n=F(this._flicking).camera.element,i=(null==t?void 0:t.element)||null,r=document.createDocumentFragment();e.forEach((function(e){return r.appendChild(e.element)})),n.insertBefore(r,i)},t._removePanelElements=function(e){var t=F(this._flicking).camera.element;e.forEach((function(e){t.removeChild(e.element)}))},e}(),er=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var o=n.prototype;return o.render=function(){return i(this,void 0,void 0,(function(){var e,t;return r(this,(function(n){return e=F(this._flicking),(t=this._strategy).updateRenderingPanels(e),t.renderPanels(e),this._resetPanelElementOrder(),[2]}))}))},o._collectPanels=function(){var e=F(this._flicking),t=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,t.children)},o._createPanel=function(e,t){return this._strategy.createPanel(e,t)},o._resetPanelElementOrder=function(){var e=F(this._flicking),t=e.camera.element,n=this._strategy.getRenderingElementsByOrder(e).reverse();n.forEach((function(e,i){var r=n[i-1]?n[i-1]:null;e.nextElementSibling!==r&&t.insertBefore(e,r)}))},o._removeAllTextNodes=function(){var e=F(this._flicking).camera.element;G(e.childNodes).forEach((function(t){t.nodeType===Node.TEXT_NODE&&e.removeChild(t)}))},n}($i),tr=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}t(n,e);var i=n.prototype;return i._removePanelElements=function(e){},i._removeAllChildsFromCamera=function(){},n}($i),nr=function(){function e(e){var t=e.index,n=e.align,i=e.flicking,r=e.elementProvider;this._index=t,this._flicking=i,this._elProvider=r,this._align=n,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var t=e.prototype;return Object.defineProperty(t,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(t,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(t,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(t,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){var e=this._toggleDirection,t=this._flicking.camera.rangeDiff;return e!==N.NONE&&this._toggled?e===N.PREV?-t:t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(t,"outsetProgress",{get:function(){var e=this.position+this.offset,t=this._alignPos,n=this._flicking.camera,i=n.position;if(i===e)return 0;if(i<e){var r=e+(n.size-n.alignPosition)+t;return-ne(i,e,r)}var o=e-(n.alignPosition+this._size-t);return 1-ne(i,o,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRatio",{get:function(){var e=this.range,t=this._size,n=this.offset,i=this._flicking.camera.visibleRange,r=e.min+n,o=e.max+n;if(o<=i.min||r>=i.max)return 0;var a=t;return i.min>r&&(a-=i.min-r),i.max<o&&(a-=o-i.max),a/t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),t.markForShow=function(){this._rendered=!0,this._elProvider.show(this._flicking)},t.markForHide=function(){this._rendered=!1,this._elProvider.hide(this._flicking)},t.resize=function(e){var t=this.element,i=this._flicking.horizontal;if(e)this._size=e.size,this._margin=n({},e.margin),this._height=e.height;else{var r=ie(t);this._size=i?t.offsetWidth:t.offsetHeight,this._margin=i?{prev:parseFloat(r.marginLeft||"0"),next:parseFloat(r.marginRight||"0")}:{prev:parseFloat(r.marginTop||"0"),next:parseFloat(r.marginBottom||"0")},this._height=i?t.offsetHeight:this._size}return this.updatePosition(),this._updateAlignPos(),this},t.setSize=function(e){return re(this.element,e),this},t.contains=function(e){var t;return!!(null===(t=this.element)||void 0===t?void 0:t.contains(e))},t.destroy=function(){this._resetInternalStates(),this._removed=!0},t.includePosition=function(e,t){return void 0===t&&(t=!1),this.includeRange(e,e,t)},t.includeRange=function(e,t,n){void 0===n&&(n=!1);var i=this._margin,r=this.range;return n&&(r.min-=i.prev,r.max+=i.next),t>=r.min&&e<=r.max},t.isVisibleOnRange=function(e,t){var n=this.range;return t>n.min&&e<n.max},t.focus=function(e){return this._flicking.moveTo(this._index,e)},t.prev=function(){var e=this._index,t=this._flicking,n=t.renderer,i=n.panelCount;return 1===i?null:t.circularEnabled?n.getPanel(0===e?i-1:e-1):n.getPanel(e-1)},t.next=function(){var e=this._index,t=this._flicking,n=t.renderer,i=n.panelCount;return 1===i?null:t.circularEnabled?n.getPanel(e===i-1?0:e+1):n.getPanel(e+1)},t.increaseIndex=function(e){return this._index+=Math.max(e,0),this},t.decreaseIndex=function(e){return this._index-=Math.max(e,0),this},t.updatePosition=function(){var e=this._flicking.renderer.panels[this._index-1];return this._pos=e?e.range.max+e.margin.next+this._margin.prev:this._margin.prev,this},t.toggle=function(e,t){var n=this._toggleDirection,i=this._togglePosition;if(n===N.NONE||t===e)return!1;var r=this._toggled;return t>e?i>=e&&i<=t&&(this._toggled=n===N.NEXT):i<=e&&i>=t&&(this._toggled=n!==N.NEXT),r!==this._toggled},t.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=N.NONE,this._toggled=!1,this;var t=e.camera,n=t.range,i=t.alignPosition,r=t.visibleRange,o=r.max-r.min,a=n.min-i,s=n.max-i+o,u=this.includeRange(s-o,s,!1),l=this.includeRange(a,a+o,!1);return this._toggled=!1,u?(this._toggleDirection=N.PREV,this._togglePosition=this.range.max+n.min-n.max+i,this.toggle(1/0,t.position)):l?(this._toggleDirection=N.NEXT,this._togglePosition=this.range.min+n.max-o+i,this.toggle(-1/0,t.position)):(this._toggleDirection=N.NONE,this._togglePosition=0),this},t._updateAlignPos=function(){this._alignPos=X(this._align,this._size)},t._resetInternalStates=function(){this._size=0,this._pos=0,this._margin={prev:0,next:0},this._height=0,this._alignPos=0,this._toggled=!1,this._togglePosition=0,this._toggleDirection=N.NONE},e}(),ir=function(){function e(e){var t=e.providerCtor;this._providerCtor=t}var t=e.prototype;return t.renderPanels=function(){},t.getRenderingIndexesByOrder=function(e){var t=e.renderer.panels.filter((function(e){return e.rendered})),n=t.filter((function(e){return e.toggled&&e.toggleDirection===N.PREV})),i=t.filter((function(e){return e.toggled&&e.toggleDirection===N.NEXT}));return s(n,t.filter((function(e){return!e.toggled})),i).map((function(e){return e.index}))},t.getRenderingElementsByOrder=function(e){var t=e.panels;return this.getRenderingIndexesByOrder(e).map((function(e){return t[e].element}))},t.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach((function(e){return e.markForShow()}))},t.collectPanels=function(e,t){var n=this,i=U(e.renderer.align);return t.map((function(t,r){return new nr({index:r,elementProvider:new n._providerCtor(t),align:i,flicking:e})}))},t.createPanel=function(e,t){return new nr(n(n({},t),{elementProvider:new this._providerCtor(e)}))},t.updatePanelSizes=function(e,t){e.panels.forEach((function(e){return e.setSize(t)}))},t._showOnlyVisiblePanels=function(e){var t=e.renderer.panels,n=e.camera,i=n.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(t){t.index in i||t.loading?t.markForShow():e.holding||t.markForHide()})),n.updateOffset()},e}(),rr=function(e){function n(t){var n=e.call(this,t)||this;return t.elementProvider.init(n),n._elProvider=t.elementProvider,n._cachedInnerHTML=null,n}t(n,e);var i=n.prototype;return Object.defineProperty(i,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cachedInnerHTML",{get:function(){return this._cachedInnerHTML},enumerable:!1,configurable:!0}),Object.defineProperty(i,"elementIndex",{get:function(){var e=this._flicking,t=e.panelsPerView+1,n=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===N.NEXT?i+n:i-n),ae(i,t)},enumerable:!1,configurable:!0}),i.cacheRenderResult=function(e){this._cachedInnerHTML=e},i.uncacheRenderResult=function(){this._cachedInnerHTML=null},i.render=function(){var e=this._flicking.virtual,t=e.renderPanel,n=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||t(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,n&&this.cacheRenderResult(r))},i.increaseIndex=function(t){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,t)},i.decreaseIndex=function(t){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,t)},n}(nr),or=function(){function e(){}var t=e.prototype;return t.renderPanels=function(e){var t=e.virtual,n=e.visiblePanels,i=se(e.panelsPerView+1);n.forEach((function(e){var n=e.elementIndex;e.render(),t.show(n),i[n]=-1})),i.filter((function(e){return e>=0})).forEach((function(e){t.hide(e)}))},t.getRenderingIndexesByOrder=function(e){var t=e.virtual,i=s(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,t){return e.position+e.offset-(t.position+t.offset)}));return i.length<=0?t.elements.map((function(e,t){return t})):s(i.map((function(e){return e.elementIndex})),t.elements.map((function(e,t){return n(n({},e),{idx:t})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},t.getRenderingElementsByOrder=function(e){var t=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map((function(e){return t[e].nativeElement}))},t.updateRenderingPanels=function(e){var t=e.renderer.panels,n=e.camera,i=n.visiblePanels.reduce((function(e,t){return e[t.index]=!0,e}),{});t.forEach((function(e){e.index in i||e.loading?e.markForShow():e.markForHide()})),n.updateOffset()},t.collectPanels=function(e){var t=U(e.renderer.align);return se(e.virtual.initialPanelCount).map((function(n){return new rr({index:n,elementProvider:new pe(e),align:t,flicking:e})}))},t.createPanel=function(e,t){return new rr(n(n({},t),{elementProvider:new pe(t.flicking)}))},t.updatePanelSizes=function(e,t){e.virtual.elements.forEach((function(e){re(e.nativeElement,t)})),e.panels.forEach((function(e){return e.setSize(t)}))},e}(),ar={__proto__:null,Renderer:$i,VanillaRenderer:er,ExternalRenderer:tr,NormalRenderingStrategy:ir,VirtualRenderingStrategy:or},sr=function(e){function o(t,n){var i=void 0===n?{}:n,r=i.align,o=void 0===r?k.CENTER:r,a=i.defaultIndex,s=void 0===a?0:a,u=i.horizontal,l=void 0===u||u,c=i.circular,h=void 0!==c&&c,f=i.circularFallback,d=void 0===f?j.LINEAR:f,p=i.bound,g=void 0!==p&&p,v=i.adaptive,m=void 0!==v&&v,_=i.panelsPerView,b=void 0===_?-1:_,y=i.noPanelStyleOverride,E=void 0!==y&&y,P=i.resizeOnContentsReady,x=void 0!==P&&P,O=i.needPanelThreshold,T=void 0===O?0:O,w=i.preventEventsBeforeInit,R=void 0===w||w,I=i.deceleration,A=void 0===I?.0075:I,C=i.duration,N=void 0===C?500:C,S=i.easing,D=void 0===S?function(e){return 1-Math.pow(1-e,3)}:S,L=i.inputType,z=void 0===L?["mouse","touch"]:L,H=i.moveType,V=void 0===H?"snap":H,F=i.threshold,G=void 0===F?40:F,X=i.interruptable,B=void 0===X||X,Y=i.bounce,W=void 0===Y?"20%":Y,U=i.iOSEdgeSwipeThreshold,q=void 0===U?30:U,Z=i.preventClickOnDrag,K=void 0===Z||Z,J=i.disableOnInit,Q=void 0!==J&&J,$=i.renderOnlyVisible,ee=void 0!==$&&$,te=i.virtual,ne=void 0===te?null:te,ie=i.autoInit,re=void 0===ie||ie,oe=i.autoResize,ae=void 0===oe||oe,se=i.useResizeObserver,ue=void 0===se||se,le=i.externalRenderer,ce=void 0===le?null:le,de=i.renderExternal,pe=void 0===de?null:de,ve=e.call(this)||this;return ve._initialized=!1,ve._plugins=[],ve._align=o,ve._defaultIndex=s,ve._horizontal=l,ve._circular=h,ve._circularFallback=d,ve._bound=g,ve._adaptive=m,ve._panelsPerView=b,ve._noPanelStyleOverride=E,ve._resizeOnContentsReady=x,ve._virtual=ne,ve._needPanelThreshold=T,ve._preventEventsBeforeInit=R,ve._deceleration=A,ve._duration=N,ve._easing=D,ve._inputType=z,ve._moveType=V,ve._threshold=G,ve._interruptable=B,ve._bounce=W,ve._iOSEdgeSwipeThreshold=q,ve._preventClickOnDrag=K,ve._disableOnInit=Q,ve._renderOnlyVisible=ee,ve._autoInit=re,ve._autoResize=ae,ve._useResizeObserver=ue,ve._externalRenderer=ce,ve._renderExternal=pe,ve._viewport=new he(M(t)),ve._autoResizer=new fe(ve),ve._renderer=ve._createRenderer(),ve._camera=ve._createCamera(),ve._control=ve._createControl(),ve._virtualManager=new ge(ve,ne),ve._autoInit&&ve.init(),ve}t(o,e);var a=o.prototype;return Object.defineProperty(a,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(a,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(a,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularEnabled",{get:function(){return this._camera.circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtualEnabled",{get:function(){return this._panelsPerView>0&&null!=this._virtual},enumerable:!1,configurable:!0}),Object.defineProperty(a,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(a,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(a,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(a,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(a,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(a,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(a,"align",{get:function(){return this._align},set:function(e){this._align=e,this._renderer.align=e,this._camera.align=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circular",{get:function(){return this._circular},set:function(e){this._circular=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bound",{get:function(){return this._bound},set:function(e){this._bound=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"easing",{get:function(){return this._easing},set:function(e){this._easing=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){if(e!==this._preventClickOnDrag){var t=this._control.controller;e?t.addPreventClickHandler():t.removePreventClickHandler(),this._preventClickOnDrag=e}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtual",{get:function(){return this._virtualManager},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e,e?this._autoResizer.enable():this._autoResizer.disable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"useResizeObserver",{get:function(){return this._useResizeObserver},set:function(e){this._useResizeObserver=e,this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"externalRenderer",{get:function(){return this._externalRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),a.init=function(){return i(this,void 0,void 0,(function(){var e,t,n,i,o,a,s=this;return r(this,(function(r){switch(r.label){case 0:return this._initialized?[2]:(e=this._camera,t=this._renderer,n=this._control,i=this._virtualManager,o=this.trigger,a=this._preventEventsBeforeInit,e.init(this),i.init(),t.init(this),n.init(this),a&&(this.trigger=function(){return s}),[4,this.resize()]);case 1:return r.sent(),[4,this._moveToInitialPanel()];case 2:return r.sent(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&n.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),t.checkPanelContentsReady(t.panels),this._plugins.forEach((function(e){return e.init(s)})),this._initialized=!0,a&&(this.trigger=o),this.trigger(new g(C.READY)),[2]}}))}))},a.destroy=function(){this.off(),this._autoResizer.disable(),this._control.destroy(),this._camera.destroy(),this._renderer.destroy(),this._plugins.forEach((function(e){return e.destroy()})),this._initialized=!1},a.prev=function(e){var t,n,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(n=null===(t=this._control.activePanel)||void 0===t?void 0:t.prev())||void 0===n?void 0:n.index)&&void 0!==i?i:-1,e,N.PREV)},a.next=function(e){var t,n,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(n=null===(t=this._control.activePanel)||void 0===t?void 0:t.next())||void 0===n?void 0:n.index)&&void 0!==i?i:this._renderer.panelCount,e,N.NEXT)},a.moveTo=function(e,t,n){void 0===t&&(t=this._duration),void 0===n&&(n=N.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new ce(R,v.ANIMATION_ALREADY_PLAYING)):this._control.moveToPanel(o,{duration:t,direction:n}):Promise.reject(new ce(P(e,0,r-1),v.INDEX_OUT_OF_RANGE))},a.getPanel=function(e){return this._renderer.getPanel(e)},a.enableInput=function(){return this._control.enable(),this},a.disableInput=function(){return this._control.disable(),this},a.getStatus=function(e){var t,n,i=void 0===e?{}:e,r=i.index,o=void 0===r||r,a=i.position,s=void 0===a||a,u=i.includePanelHTML,l=void 0!==u&&u,c=i.visiblePanelsOnly,h=void 0!==c&&c,f=this._camera,d={panels:(h?this.visiblePanels:this.panels).map((function(e){var t={index:e.index};return l&&(t.html=e.element.outerHTML),t}))};if(o&&(d.index=this.index),s){var p=f.findNearestAnchor(f.position);p&&(d.position={panel:p.panel.index,progressInPanel:f.getProgressInPanel(p.panel)})}if(h){var g=this.visiblePanels;d.visibleOffset=null!==(n=null===(t=g[0])||void 0===t?void 0:t.index)&&void 0!==n?n:0}return d},a.setStatus=function(e){var t;if(!this._initialized)throw new ce(A,v.NOT_INITIALIZED);var n=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,s=this._control;if((null===(t=o[0])||void 0===t?void 0:t.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:Z(o.map((function(e){return e.html}))),hasDOMInElements:!0})),n){var u=r?n-r:n;this.moveTo(u,0).catch((function(){}))}if(i&&this._moveType===S.FREE_SCROLL){var l=i.panel,c=i.progressInPanel,h=(u=r?l-r:l,a.panels[u].range),f=h.min+(h.max-h.min)*c;s.moveToPosition(f,0).catch((function(){}))}},a.addPlugins=function(){for(var e,t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this._initialized&&n.forEach((function(e){return e.init(t)})),(e=this._plugins).push.apply(e,s(n)),this},a.removePlugins=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){var n=te(e._plugins,(function(e){return e===t}));n>=0&&(t.destroy(),e._plugins.splice(n,1))})),this},a.resize=function(){return i(this,void 0,void 0,(function(){var e,t,n,i,o,a,s,u,l,c,h;return r(this,(function(r){switch(r.label){case 0:return e=this._viewport,t=this._renderer,n=this._camera,i=this._control,o=i.activePanel,a=e.width,s=e.height,u=o?n.getProgressInPanel(o):0,this.trigger(new g(C.BEFORE_RESIZE,{width:a,height:s,element:e.element})),e.resize(),[4,t.forceRenderAllPanels()];case 1:return r.sent(),t.updatePanelSize(),n.updateAlignPos(),n.updateRange(),n.updateAnchors(),[4,t.render()];case 2:return r.sent(),i.animating||(i.updatePosition(u),i.updateInput()),l=e.width,c=e.height,h=l!==a||c!==s,this.trigger(new g(C.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:a,height:s},sizeChanged:h,element:e.element})),[2]}}))}))},a.append=function(e){return this.insert(this._renderer.panelCount,e)},a.prepend=function(e){return this.insert(0,e)},a.insert=function(e,t){if(this._renderExternal)throw new ce(I,v.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:Z(t),hasDOMInElements:!0})},a.remove=function(e,t){if(void 0===t&&(t=1),this._renderExternal)throw new ce(I,v.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:t,hasDOMInElements:!0})},a._createControl=function(){var e,t=this._moveType,n=Object.keys(S).map((function(e){return S[e]})),i=Array.isArray(t)?t[0]:t,r=Array.isArray(t)&&null!==(e=t[1])&&void 0!==e?e:{};if(!J(n,i))throw new ce(E("moveType",JSON.stringify(t)),v.WRONG_OPTION);switch(i){case S.SNAP:return new vi(r);case S.FREE_SCROLL:return new mi(r);case S.STRICT:return new _i(r)}},a._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new Oi({align:this._align})},a._createRenderer=function(){var e=this._externalRenderer;return this._virtual&&this._panelsPerView<=0&&console.warn('"virtual" and "panelsPerView" option should be used together, ignoring virtual.'),e||(this._renderExternal?this._createExternalRenderer():this._createVanillaRenderer())},a._createExternalRenderer=function(){var e=this._renderExternal,t=e.renderer,i=e.rendererOptions;return new t(n({align:this._align},i))},a._createVanillaRenderer=function(){var e=this.virtualEnabled;return new er({align:this._align,strategy:e?new or:new ir({providerCtor:de})})},a._moveToInitialPanel=function(){return i(this,void 0,void 0,(function(){var e,t,n;return r(this,(function(i){return e=this._renderer,t=this._control,(n=e.getPanel(this._defaultIndex)||e.getPanel(0))?(t.setActive(n,null,!1),[2,t.moveToPanel(n,{duration:0})]):[2]}))}))},o.VERSION="4.5.0",o}(p),ur=function(e,t,n,i,r){e.batchInsert.apply(e,s(t.added.slice(i,r).map((function(e,t){return{index:e,elements:[n[t]],hasDOMInElements:!1}}))))},lr=function(e,t,n){var i=e.panels.slice(t,n);e.batchRemove({index:t,deleteCount:i.length,hasDOMInElements:!1})},cr=function(e){var t="object"==typeof e?e.camera:e;return fr(t)},hr=function(e){var t="object"==typeof e?e.panel:e;return W(fr(t))},fr=function(e){if("number"==typeof e)return e+"px";switch(e){case k.CENTER:return"50%";case k.NEXT:return"100%";case k.PREV:return"0%";default:return e}},dr={__proto__:null,withFlickingMethods:function(e,t){[p.prototype,sr.prototype].forEach((function(n){Object.getOwnPropertyNames(n).filter((function(t){return!e[t]&&!t.startsWith("_")&&"constructor"!==t})).forEach((function(i){var r=Object.getOwnPropertyDescriptor(n,i);if(r.value)Object.defineProperty(e,i,{value:function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return(e=r.value).call.apply(e,s([this[t]],n))}});else{var o={};r.get&&(o.get=function(){var e;return null===(e=r.get)||void 0===e?void 0:e.call(this[t])}),r.set&&(o.set=function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return null===(e=r.set)||void 0===e?void 0:e.call.apply(e,s([this[t]],n))}),Object.defineProperty(e,i,o)}}))}))},sync:function(e,t,n){var i=e.renderer,r=i.panels,o=s(t.prevList);if(t.removed.length>0){var u=-1,l=-1;t.removed.forEach((function(e){u<0&&(u=e),l>=0&&e!==l-1?(lr(i,l,u+1),u=e,l=e):l=e,o.splice(e,1)})),lr(i,l,u+1)}if(t.ordered.forEach((function(e){var t=a(e,2),n=t[0],i=t[1],o=r[n],s=i-n;if(s>0){var u=r.slice(n+1,i+1);o.increaseIndex(s),u.forEach((function(e){return e.decreaseIndex(1)}))}else{u=r.slice(i,n);o.decreaseIndex(-s),u.forEach((function(e){return e.increaseIndex(1)}))}o.resize()})),t.ordered.length>0&&r.sort((function(e,t){return e.index-t.index})),t.added.length>0){var c=-1,h=-1,f=n.slice(o.length);t.added.forEach((function(e,n){c<0&&(c=n),h>=0&&e!==h+1?(ur(i,t,f,c,n+1),c=-1,h=-1):h=e})),c>=0&&ur(i,t,f,c)}},getRenderingPanels:function(e,t){var n=t.removed.reduce((function(e,t){return e[t]=!0,e}),{}),i=t.maintained.reduce((function(e,t){var n=a(t,2),i=n[0],r=n[1];return e[i]=r,e}),{});return s(e.panels.filter((function(e){return!n[e.index]})).sort((function(e,t){return e.position+e.offset-(t.position+t.offset)})).map((function(e){return t.list[i[e.index]]})),t.added.map((function(e){return t.list[e]})))},getDefaultCameraTransform:function(e,t,n){void 0===e&&(e=k.CENTER),void 0===t&&(t=!0);var i=cr(e),r=hr(e);if(null==r)return"";var o="calc("+i+" - ("+(n||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return t?"translate("+o+")":"translate(0, "+o+")"}};return z(sr,{__proto__:null,Viewport:he,FlickingError:ce,AnchorPoint:gi,VirtualManager:ge,VanillaElementProvider:de,VirtualElementProvider:pe,Panel:nr,VirtualPanel:rr}),z(sr,Ti),z(sr,bi),z(sr,ar),z(sr,L),z(sr,dr),z(sr,le),sr}));
|
|
10
10
|
//# sourceMappingURL=flicking.pkgd.min.js.map
|