@egjs/flicking 4.2.5 → 4.4.1
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 -1
- package/declaration/Flicking.d.ts +27 -11
- package/declaration/camera/Camera.d.ts +3 -2
- package/declaration/camera/CircularCamera.d.ts +2 -1
- package/declaration/const/error.d.ts +3 -1
- package/declaration/const/external.d.ts +5 -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 +17 -10
- 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 +18 -13
- 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/utils.d.ts +7 -1
- package/dist/flicking.esm.js +1616 -562
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +1571 -494
- 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 +8733 -6647
- 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 +10 -22
- package/src/Flicking.ts +163 -32
- package/src/camera/BoundCamera.ts +2 -2
- package/src/camera/Camera.ts +49 -26
- package/src/camera/CircularCamera.ts +52 -27
- package/src/camera/LinearCamera.ts +1 -1
- package/src/cfc/sync.ts +2 -2
- package/src/const/error.ts +6 -3
- package/src/const/external.ts +6 -0
- package/src/control/AxesController.ts +15 -8
- package/src/control/Control.ts +7 -7
- 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 +68 -60
- 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 +173 -68
- 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/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/core/panel/ElementPanel.ts +0 -52
- package/src/core/panel/ExternalPanel.ts +0 -32
- package/src/exports.ts +0 -16
package/dist/flicking.min.js
CHANGED
|
@@ -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.4.1
|
|
8
8
|
*/
|
|
9
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("@egjs/component"),require("@egjs/axes")):"function"==typeof define&&define.amd?define(["@egjs/component","@egjs/axes"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=n(e.eg.Component,e.eg.Axes)}(this,function(c,o){"use strict";var i=function(e,n){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)};function a(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}i(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var s=function(){return(s=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)};function h(e,a,s,l){return new(s=s||Promise)(function(t,n){function i(e){try{o(l.next(e))}catch(e){n(e)}}function r(e){try{o(l.throw(e))}catch(e){n(e)}}function o(e){var n;e.done?t(e.value):((n=e.value)instanceof s?n:new s(function(e){e(n)})).then(i,r)}o((l=l.apply(e,a||[])).next())})}function v(t,i){var r,o,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:n(0),throw:n(1),return:n(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function n(n){return function(e){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,(n=a?[2&n[0],a.value]:n)[0]){case 0:case 1:a=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===n[0]||2===n[0])){s=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){s.label=n[1];break}if(6===n[0]&&s.label<a[1]){s.label=a[1],a=n;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(n);break}a[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(e){n=[6,e],o=0}finally{r=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,e])}}}function f(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.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(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||0<n--)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function g(e,n){for(var t=0,i=n.length,r=e.length;t<i;t++,r++)e[r]=n[t];return e}function e(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.forEach(function(n){Object.keys(n).forEach(function(e){t[e]=n[e]})}),t}function m(e,n){if(!e)throw new L(C.NOT_ATTACHED_TO_FLICKING(n),I.NOT_ATTACHED_TO_FLICKING);return e}function r(e){return[].slice.call(e)}function l(e,n){var t;if(D(e))switch(e){case R.PREV:t=0;break;case R.CENTER:t=.5*n;break;case R.NEXT:t=n;break;default:if(null==(t=u(e,n)))throw new L(C.WRONG_OPTION("align",e),I.WRONG_OPTION)}else t=e;return t}function u(e,n){return null==(e=S(e))?null:e.percentage*n+e.absolute}function _(e,n){return e===n?N.NONE:e<n?N.NEXT:N.PREV}function p(e){Array.isArray(e)||(e=[e]);var t=[];return e.forEach(function(e){if(D(e)){var n=document.createElement("div");for(n.innerHTML=e,t.push.apply(t,g([],d(r(n.children))));n.firstChild;)n.removeChild(n.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new L(C.WRONG_TYPE(e,["HTMLElement","string"]),I.WRONG_TYPE);t.push(e)}}),t}function b(e,n){return A(e<0?e+n:e,0,n)}function E(e,n){var t,i;try{for(var r=f(e),o=r.next();!o.done;o=r.next())if(o.value===n)return 1}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}}function P(e,n,t){var i=t-n;return e<n?e=t-(n-e)%i:t<e&&(e=n+(e-t)%i),e}function O(e,n,t){return(e-n)/(t-n)}function x(e){return window.getComputedStyle(e)||e.currentStyle}function y(e,n,t){return n<=e&&e<=t}var t,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,n){return e+"("+typeof e+") is not a "+n.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,n){return n+" 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,n){return'Option "'+e+'" is not in correct format, given: '+n},INDEX_OUT_OF_RANGE:function(e,n,t){return'Index "'+e+'" is out of range: should be between '+n+" and "+t+"."},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."},T={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"},R={PREV:"prev",CENTER:"center",NEXT:"next"},N={PREV:"PREV",NEXT:"NEXT",NONE:null},w={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},n={__proto__:null,EVENTS:T,ALIGN:R,DIRECTION:N,MOVE_TYPE:w,ERROR_CODE:I},A=function(e,n,t){return Math.max(Math.min(e,t),n)},S=function(e){var n=/(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;if("number"==typeof e)return{percentage:0,absolute:e};for(var t={percentage:0,absolute:0},i=0,r=n.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?t.percentage+=a/100*o:t.absolute+=o*a,++i,r=n.exec(e)}return 0===i?null:t},D=function(e){return"string"==typeof e},k=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},L=(a(j,t=Error),j);function j(e,n){e=t.call(this,e)||this;return k(e,j.prototype),e.name="FlickingError",e.code=n,e}var z=(se=M.prototype,Object.defineProperty(se,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(se,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(se,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(se,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),se.setSize=function(e){var n=e.width,t=e.height,i=this._el,r=this._padding,e=this._isBorderBoxSizing;null!=n&&(D(n)?i.style.width=n:(n=e?n+r.left+r.right:n,i.style.width=n+"px")),null!=t&&(D(t)?i.style.height=t:(t=e?t+r.top+r.bottom:t,i.style.height=t+"px")),this.resize()},se.resize=function(){var e=this._el,n=x(e);this._width=e.clientWidth,this._height=e.clientHeight,this._padding={left:parseFloat(n.paddingLeft),right:parseFloat(n.paddingRight),top:parseFloat(n.paddingTop),bottom:parseFloat(n.paddingBottom)},this._isBorderBoxSizing="border-box"===n.boxSizing},M);function M(e){this._el=e,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}var H,G={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},F="flick";($=H=H||{})[$.IDLE=0]="IDLE",$[$.HOLDING=1]="HOLDING",$[$.DRAGGING=2]="DRAGGING",$[$.ANIMATING=3]="ANIMATING",$[$.DISABLED=4]="DISABLED";var V=(ge=B.prototype,Object.defineProperty(ge,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(ge,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),ge.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},ge.onHold=function(e){},ge.onChange=function(e){},ge.onRelease=function(e){},ge.onAnimationEnd=function(e){},ge.onFinish=function(e){},ge._moveToChangedPosition=function(e){var n,t=e.flicking,i=e.axesEvent,r=e.transitTo,o=i.delta[F];o&&(this._delta+=o,e=(n=t.camera).position,o=i.pos[F],o=t.circularEnabled?P(o,n.range.min,n.range.max):o,n.lookAt(o),i=new c.ComponentEvent(T.MOVE,{isTrusted:i.isTrusted,holding:this.holding,direction:_(0,i.delta[F]),axesEvent:i}),t.trigger(i),i.isCanceled()&&(n.lookAt(e),r(H.DISABLED)))},B);function B(){this._delta=0,this._targetPanel=null}var W=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!1,e}a(e,n);var t=e.prototype;return t.onEnter=function(){this._delta=0,this._targetPanel=null},t.onHold=function(e){var n=e.flicking,t=e.axesEvent,e=e.transitTo;n.renderer.panelCount<=0?e(H.DISABLED):(t=new c.ComponentEvent(T.HOLD_START,{axesEvent:t}),n.trigger(t),t.isCanceled()?e(H.DISABLED):e(H.HOLDING))},t.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control.controller.animatingContext,t=new c.ComponentEvent(T.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:_(r.start,r.end),axesEvent:t});n.trigger(t),t.isCanceled()?i(H.DISABLED):i(H.ANIMATING).onChange(e)},e}(V),U=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!1,e._releaseEvent=null,e}a(e,n);var t=e.prototype;return t.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=t.inputEvent,r=n.horizontal?r.offsetX:r.offsetY,t=new c.ComponentEvent(T.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:_(0,-r),axesEvent:t});n.trigger(t),t.isCanceled()?i(H.DISABLED):i(H.DRAGGING).onChange(e)},t.onRelease=function(e){var n=e.flicking,t=e.axesEvent,e=e.transitTo;if(n.trigger(new c.ComponentEvent(T.HOLD_END,{axesEvent:t})),0!==t.delta.flick)return t.setTo({flick:n.camera.position},0),void e(H.IDLE);this._releaseEvent=t},t.onFinish=function(e){var n=e.flicking;if((0,e.transitTo)(H.IDLE),this._releaseEvent){var t,i=this._releaseEvent.inputEvent.srcEvent;t="touchend"===i.type?(e=i.changedTouches[0],document.elementFromPoint(e.clientX,e.clientY)):i.target;var r,o,i=n.renderer.panels,a=null;try{for(var s=f(i),l=s.next();!l.done;l=s.next()){var u=l.value;if(u.contains(t)){a=u;break}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}a&&(r=n.camera.position,o=a.position,n.trigger(new c.ComponentEvent(T.SELECT,{index:a.index,panel:a,direction:_(r,o)})))}},e}(V),Y=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!0,e}a(e,n);var t=e.prototype;return t.onChange=function(e){this._moveToChangedPosition(e)},t.onRelease=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo;n.trigger(new c.ComponentEvent(T.HOLD_END,{axesEvent:t})),n.renderer.panelCount<=0?i(H.IDLE):(i(H.ANIMATING),e=n.control,i=t.destPos[F],n=Math.max(t.duration,n.duration),e.moveToPosition(i,n,t))},e}(V),X=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!0,e}a(e,n);var t=e.prototype;return t.onHold=function(e){var n=e.flicking,t=e.axesEvent,e=e.transitTo;this._delta=0,n.control.updateInput();t=new c.ComponentEvent(T.HOLD_START,{axesEvent:t});n.trigger(t),t.isCanceled()?e(H.DISABLED):e(H.DRAGGING)},t.onChange=function(e){this._moveToChangedPosition(e)},t.onFinish=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control,e=r.controller.animatingContext;i(H.IDLE),n.trigger(new c.ComponentEvent(T.MOVE_END,{isTrusted:t.isTrusted,direction:_(e.start,e.end),axesEvent:t})),r.setActive(this._targetPanel,r.activePanel,t.isTrusted)},e}(V),K=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!0,e}a(e,n);var t=e.prototype;return t.onAnimationEnd=function(e){(0,e.transitTo)(H.IDLE)},t.onChange=function(e){var n=e.axesEvent,e=e.transitTo;n.stop(),e(H.IDLE)},t.onRelease=function(e){var n=e.axesEvent,e=e.transitTo;0===n.delta.flick&&e(H.IDLE)},e}(V),Z=(ae=q.prototype,Object.defineProperty(ae,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),ae.fire=function(e,n){var t=this._state,i=s(s({},n),{transitTo:this.transitTo});switch(e){case G.HOLD:t.onHold(i);break;case G.CHANGE:t.onChange(i);break;case G.RELEASE:t.onRelease(i);break;case G.ANIMATION_END:t.onAnimationEnd(i);break;case G.FINISH:t.onFinish(i)}},q);function q(){var t=this;this.transitTo=function(e){var n;switch(e){case H.IDLE:n=new W;break;case H.HOLDING:n=new U;break;case H.DRAGGING:n=new Y;break;case H.ANIMATING:n=new X;break;case H.DISABLED:n=new K}return n.onEnter(t._state),t._state=n,t._state},this._state=new W}var J=(Ee=Q.prototype,Object.defineProperty(Ee,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};e=e.axis[F];return{range:{min:e.range[0],max:e.range[1]},circular:e.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"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(Ee,"position",{get:function(){var e;return null!==(e=null===(e=this._axes)||void 0===e?void 0:e.get([F])[F])&&void 0!==e?e:0},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"range",{get:function(){var e;return null!==(e=null===(e=this._axes)||void 0===e?void 0:e.axis[F].range)&&void 0!==e?e:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis[F].bounce},enumerable:!1,configurable:!0}),Ee.init=function(t){var e,i=this;this._flicking=t,this._axes=new o(((e={})[F]={range:[0,0],circular:!1,bounce:[0,0]},e),{deceleration:t.deceleration,interruptable:t.interruptable,easing:t.easing}),this._panInput=new o.PanInput(t.viewport.element,{inputType:t.inputType,iOSEdgeSwipeThreshold:t.iOSEdgeSwipeThreshold,scale:t.horizontal?[-1,0]:[0,-1],releaseOnScroll:!0});var r=this._axes;r.connect(t.horizontal?[F,""]:["",F],this._panInput);for(var n in G)!function(e){var n=G[e];r.on(n,function(e){i._stateMachine.fire(n,{flicking:t,axesEvent:e})})}(n);return this},Ee.destroy=function(){var e;this.removePreventClickHandler(),null!==(e=this._axes)&&void 0!==e&&e.destroy(),null!==(e=this._panInput)&&void 0!==e&&e.destroy(),this._resetInternalValues()},Ee.enable=function(){var e;return null!==(e=this._panInput)&&void 0!==e&&e.enable(),this},Ee.disable=function(){var e;return null!==(e=this._panInput)&&void 0!==e&&e.disable(),this},Ee.update=function(e){var n,t,i=m(this._flicking,"Control"),r=i.camera,o=this._axes,a=o.axis[F];return a.circular=[e.circular,e.circular],a.range=[e.range.min,e.range.max],a.bounce=(n=i.bounce,t=r.size,(Array.isArray(n)?n.map(function(e){return u(e,t)}):[r=u(n,t),r]).map(function(e){if(null==e)throw new L(C.WRONG_OPTION("bounce",n),I.WRONG_OPTION);return e})),o.axm.set(((o={})[F]=e.position,o)),this},Ee.addPreventClickHandler=function(){var e=m(this._flicking,"Control"),n=this._axes,e=e.camera.element;return n.on(G.HOLD,this._onAxesHold),n.on(G.CHANGE,this._onAxesChange),e.addEventListener("click",this._preventClickWhenDragged,!0),this},Ee.removePreventClickHandler=function(){var e=m(this._flicking,"Control"),n=this._axes,e=e.camera.element;return n.off(G.HOLD,this._onAxesHold),n.off(G.CHANGE,this._onAxesChange),e.removeEventListener("click",this._preventClickWhenDragged,!0),this},Ee.animateTo=function(n,t,i){var r=this,o=this._axes;if(!o)return Promise.reject(new L(C.NOT_ATTACHED_TO_FLICKING("Control"),I.NOT_ATTACHED_TO_FLICKING));var e=o.get([F])[F];if(e===n)return(s=m(this._flicking,"Control")).camera.lookAt(n),Promise.resolve();this._animatingContext={start:e,end:n,offset:0};function a(){var e;o.once(G.FINISH,function(){r._animatingContext={start:0,end:0,offset:0}}),i?i.setTo(((e={})[F]=n,e),t):o.setTo(((e={})[F]=n,e),t)}if(0!==t)return new Promise(function(e,n){function t(){o.off(G.FINISH,i),n(new L(C.ANIMATION_INTERRUPTED,I.ANIMATION_INTERRUPTED))}var i=function(){o.off(G.HOLD,t),e()};o.once(G.FINISH,i),o.once(G.HOLD,t),a()});var e=(s=m(this._flicking,"Control")).camera;a();var s=s.circularEnabled?P(n,e.range.min,e.range.max):n;return o.axm.set(((e={})[F]=s,e)),Promise.resolve()},Ee._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},Q);function Q(){var n=this;this._onAxesHold=function(){n._dragged=!1},this._onAxesChange=function(){n._dragged=!0},this._preventClickWhenDragged=function(e){n._dragged&&(e.preventDefault(),e.stopPropagation()),n._dragged=!1},this._resetInternalValues(),this._stateMachine=new Z}var $=(se=ee.prototype,Object.defineProperty(se,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(se,"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(se,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(se,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(se,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),se.init=function(e){return this._flicking=e,this._controller.init(e),this},se.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},se.enable=function(){return this._controller.enable(),this},se.disable=function(){return this._controller.disable(),this},se.updatePosition=function(e){var n=m(this._flicking,"Control").camera,t=this._activePanel;t&&n.lookAt(n.clampToReachablePosition(t.position))},se.updateInput=function(){var e=m(this._flicking,"Control").camera;return this._controller.update(e.controlParams),this},se.resetActive=function(){return this._activePanel=null,this},se.moveToPanel=function(a,e){var s=e.duration,n=e.direction,l=void 0===n?N.NONE:n,u=e.axesEvent;return h(this,void 0,void 0,function(){var n,t,i,r,o;return v(this,function(e){return n=m(this._flicking,"Control"),o=n.camera,t=a.position,i=o.findNearestAnchor(t),a.removed||!i?[2,Promise.reject(new L(C.POSITION_NOT_REACHABLE(a.position),I.POSITION_NOT_REACHABLE))]:(o.canReach(a)?n.circularEnabled&&(r=this._controller.position,o=o.rangeDiff,t=[t,t+o,t-o].filter(function(e){return l===N.NONE||(l===N.PREV?e<=r:r<=e)}).reduce(function(e,n){return Math.abs(r-n)<Math.abs(r-e)?n:e},1/0)):(t=i.position,a=i.panel),this._triggerIndexChangeEvent(a,a.position,u),[2,this._animateToPosition({position:t,duration:s,newActivePanel:a,axesEvent:u})])})})},se.setActive=function(e,n,t){var i,r=m(this._flicking,"Control");this._activePanel=e,r.camera.updateAdaptiveHeight(),e!==n?r.trigger(new c.ComponentEvent(T.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==n?void 0:n.index)&&void 0!==i?i:-1,prevPanel:n,isTrusted:t,direction:n?_(n.position,e.position):N.NONE})):r.trigger(new c.ComponentEvent(T.RESTORED,{isTrusted:t}))},se._triggerIndexChangeEvent=function(e,n,t){var i=m(this._flicking,"Control"),r=e!==this._activePanel?T.WILL_CHANGE:T.WILL_RESTORE,o=i.camera,a=this._activePanel,n=new c.ComponentEvent(r,{index:e.index,panel:e,isTrusted:(null==t?void 0:t.isTrusted)||!1,direction:_(null!==(a=null==a?void 0:a.position)&&void 0!==a?a:o.position,n)});if(i.trigger(n),n.isCanceled())throw new L(C.STOP_CALLED_BY_USER,I.STOP_CALLED_BY_USER)},se._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 n,t,i=this;return v(this,function(e){return n=m(this._flicking,"Control"),t=function(){return i._controller.animateTo(r,o,s)},this._controller.state.targetPanel=a,o<=0?[2,t()]:[2,t().then(function(){return h(i,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:return[4,n.renderer.render()];case 1:return e.sent(),[2]}})})}).catch(function(e){if(!(s&&e instanceof L&&e.code===I.ANIMATION_INTERRUPTED))throw e})]})})},ee);function ee(){this._flicking=null,this._controller=new J,this._activePanel=null}var ne=(ge=te.prototype,Object.defineProperty(ge,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(ge,"position",{get:function(){return this._pos},enumerable:!1,configurable:!0}),Object.defineProperty(ge,"panel",{get:function(){return this._panel},enumerable:!1,configurable:!0}),te);function te(e){var n=e.index,t=e.position,e=e.panel;this._index=n,this._pos=t,this._panel=e}var ie=function(t){function e(e){var n=(void 0===e?{}:e).count,e=void 0===n?1/0:n,n=t.call(this)||this;return n._count=e,n}a(e,t);var n=e.prototype;return Object.defineProperty(n,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),n.moveToPosition=function(l,u,c){return h(this,void 0,void 0,function(){var n,t,i,r,o,a,s;return v(this,function(e){return n=m(this._flicking,"Control"),t=n.camera,o=t.findActiveAnchor(),s=t.findNearestAnchor(t.position),a=n.control.controller.state,o&&s?(i=this._calcSnapThreshold(l,o),r=n.animating?a.delta:l-t.position,o=Math.abs(r),a=c&&0!==c.delta[F]?Math.abs(c.delta[F]):o,s=i<=a&&0<a?this._findSnappedAnchor(l,s):o>=n.threshold&&0<o?this._findAdjacentAnchor(r,s):s,this._triggerIndexChangeEvent(s.panel,l,c),[2,this._animateToPosition({position:t.clampToReachablePosition(s.position),duration:u,newActivePanel:s.panel,axesEvent:c})]):[2,Promise.reject(new L(C.POSITION_NOT_REACHABLE(l),I.POSITION_NOT_REACHABLE))]})})},n._findSnappedAnchor=function(e,n){var t=m(this._flicking,"Control"),i=t.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!n||!s)throw new L(C.POSITION_NOT_REACHABLE(e),I.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var l=t.panelCount,u=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);o<e&&s.index<n.index||s.position>n.position&&s.index===n.index?c+=1:(e<o&&s.index>n.index||s.position<n.position&&s.index===n.index)&&--c;a=s.index+c*l;if(Math.abs(a-n.index)<=r){var h=u[s.index];return new ne({index:h.index,position:h.position+c*i.rangeDiff,panel:h.panel})}if(t.circularEnabled){h=u[h=n.index+Math.sign(e-o)*r,(t=l)<=h?h%t:h<0?b((h+1)%t-1,t):h],l=Math.floor(r/l);return o<e&&h.index<n.index?l+=1:e<o&&h.index>n.index&&--l,new ne({index:h.index,position:h.position+l*i.rangeDiff,panel:h.panel})}return u[A(n.index+Math.sign(e-o)*r,0,u.length-1)]},n._findAdjacentAnchor=function(e,n){var t=m(this._flicking,"Control").camera;return null!==(t=0<e?t.getNextAnchor(n):t.getPrevAnchor(n))&&void 0!==t?t:n},n._calcSnapThreshold=function(e,n){var t=e>n.position,i=n.panel,e=i.size,n=i.alignPosition;return t?e-n+i.margin.next:n+i.margin.prev},e}($),re=function(t){function e(e){var n=(void 0===e?{}:e).stopAtEdge,e=void 0===n||n,n=t.call(this)||this;return n._stopAtEdge=e,n}a(e,t);var n=e.prototype;return Object.defineProperty(n,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),n.updatePosition=function(e){var n=m(this._flicking,"Control").camera,t=this._activePanel;t&&(e=(t=t.range).min+(t.max-t.min)*e,n.lookAt(n.clampToReachablePosition(e)))},n.moveToPosition=function(i,r,o){return h(this,void 0,void 0,function(){var n,t;return v(this,function(e){return n=m(this._flicking,"Control"),t=n.camera,n=t.clampToReachablePosition(i),(t=t.findAnchorIncludePosition(n))?((t=t.panel)!==this._activePanel&&this._triggerIndexChangeEvent(t,i,o),[2,this._animateToPosition({position:this._stopAtEdge?n:i,duration:r,newActivePanel:t,axesEvent:o})]):[2,Promise.reject(new L(C.POSITION_NOT_REACHABLE(i),I.POSITION_NOT_REACHABLE))]})})},e}($),oe=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,n,t){r.prototype.setActive.call(i,e,n,t),i.updateInput()},i._count=e,i._resetIndexRange(),i}a(e,r);var n=e.prototype;return Object.defineProperty(n,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),n.destroy=function(){r.prototype.destroy.call(this),this._resetIndexRange()},n.updateInput=function(){var e=m(this._flicking,"Control"),n=e.camera,t=e.renderer,i=this._controller,r=n.controlParams,o=this._count,a=i.state.animating?null===(c=n.findNearestAnchor(n.position))||void 0===c?void 0:c.panel:this._activePanel;if(!a)return i.update(r),this._resetIndexRange(),this;var s=r.range,l=a.position,u=a.index,c=t.panelCount,a=u-o,o=u+o;a<0&&(a=e.circularEnabled?b((a+1)%c-1,c):A(a,0,c-1)),c<=o&&(o=e.circularEnabled?o%c:A(o,0,c-1));a=t.panels[a],t=t.panels[o],o=Math.max(a.position,s.min),s=Math.min(t.position,s.max);return l<o&&(o-=n.rangeDiff),s<l&&(s+=n.rangeDiff),r.range={min:o,max:s},r.circular&&(r.position<o&&(r.position+=n.rangeDiff),r.position>s&&(r.position-=n.rangeDiff)),r.circular=!1,i.update(r),this._indexRange={min:a.index,max:t.index},this},n.moveToPosition=function(g,_,p){return h(this,void 0,void 0,function(){var n,t,i,r,o,a,s,l,u,c,h,f,d;return v(this,function(e){return c=m(this._flicking,"Control"),n=c.camera,t=this._activePanel,f=this._controller.range,i=this._indexRange,r=n.range,u=A(n.clampToReachablePosition(g),f[0],f[1]),(o=n.findAnchorIncludePosition(u))&&t?(h=t.position,a=Math.abs(g-h)>=c.threshold,s=h<g?n.getNextAnchor(o):n.getPrevAnchor(o),f=n.anchorPoints,u=f[0],c=f[f.length-1],h=g<=r.min&&y(u.panel.index,i.min,i.max),f=g>=r.max&&y(c.panel.index,i.min,i.max),h||f?(d=g<r.min?u:c,l=d.panel,d=d.position):a&&o.position!==t.position?(l=o.panel,d=o.position):a&&s&&y(s.index,i.min,i.max)?(l=s.panel,d=s.position):(d=n.clampToReachablePosition(t.position),l=t),this._triggerIndexChangeEvent(l,g,p),[2,this._animateToPosition({position:d,duration:_,newActivePanel:l,axesEvent:p})]):[2,Promise.reject(new L(C.POSITION_NOT_REACHABLE(g),I.POSITION_NOT_REACHABLE))]})})},n._resetIndexRange=function(){this._indexRange={min:0,max:0}},e}($),ae={__proto__:null,Control:$,SnapControl:ie,FreeControl:re,StrictControl:oe,AxesController:J,State:V,IdleState:W,HoldingState:U,DraggingState:Y,AnimatingState:X,DisabledState:K,StateMachine:Z},se=(Ee=le.prototype,Object.defineProperty(Ee,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"offset",{get:function(){return this._offset},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:!1}},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"progress",{get:function(){var e=this._flicking,n=this._position+this._offset,t=this.findNearestAnchor(this._position);if(!e||!t)return NaN;var i=t.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,t=a.min,e=a.max,a=this.rangeDiff;if(n===r)return i.index;if(n<r){var s=i.prev(),s=s?s.position+s.offset:t-o[0];return r<s&&(s-=a),i.index-1+O(n,s,r)}s=i.next(),o=s?s.position+s.offset:e+o[1];return o<r&&(o+=a),i.index+O(n,r,o)},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),Ee.init=function(e){e=(this._flicking=e).viewport.element;return function(e,n){if(null==e)throw new L(C.VAL_MUST_NOT_NULL(e,n),I.VAL_MUST_NOT_NULL)}(e.firstElementChild,"First element child of the viewport element"),this._el=e.firstElementChild,this._checkTranslateSupport(),this},Ee.destroy=function(){return this._flicking=null,this._resetInternalValues(),this},Ee.lookAt=function(e){var n=this._position;this._position=e,this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(n,e),this._applyTransform()},Ee.getPrevAnchor=function(e){return this._anchors[e.index-1]||null},Ee.getNextAnchor=function(e){return this._anchors[e.index+1]||null},Ee.getProgressInPanel=function(e){e=e.range;return(this._position-e.min)/(e.max-e.min)},Ee.findAnchorIncludePosition=function(t){return this._anchors.filter(function(e){return e.panel.includePosition(t,!0)}).reduce(function(e,n){return e&&Math.abs(e.position-t)<Math.abs(n.position-t)?e:n},null)},Ee.findNearestAnchor=function(e){var n=this._anchors;if(n.length<=0)return null;for(var t=1/0,i=0;i<n.length;i++){var r=n[i],r=Math.abs(r.position-e);if(t<r)return n[i-1];t=r}return n[n.length-1]},Ee.findActiveAnchor=function(){var n=m(this._flicking,"Camera").control.activeIndex;return function(e,n){var t,i;try{for(var r=f(e),o=r.next();!o.done;o=r.next()){var a=o.value;if(n(a))return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return null}(this._anchors,function(e){return e.panel.index===n})},Ee.clampToReachablePosition=function(e){var n=this._range;return A(e,n.min,n.max)},Ee.canReach=function(e){var n=this._range;if(e.removed)return!1;e=e.position;return e>=n.min&&e<=n.max},Ee.canSee=function(e){var n=this.visibleRange;return e.includeRange(n.min,n.max,!1)},Ee.updateAlignPos=function(){var e=this._align,e="object"==typeof e?e.camera:e;return this._alignPos=l(e,this.size),this},Ee.updateAnchors=function(){var e=m(this._flicking,"Camera").renderer.panels;return this._anchors=e.map(function(e,n){return new ne({index:n,position:e.position,panel:e})}),this},Ee.updateAdaptiveHeight=function(){var e=m(this._flicking,"Camera"),n=e.control.activePanel;e.horizontal&&e.adaptive&&n&&e.viewport.setSize({height:n.height})},Ee.updateOffset=function(){var e=m(this._flicking,"Camera").panels.filter(function(e){return!e.rendered}),n=this._position;this._offset=e.filter(function(e){return e.position+e.offset<n}).reduce(function(e,n){return e+n.sizeIncludingMargin},0),this._applyTransform()},Ee.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},Ee._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}},Ee._refreshVisiblePanels=function(){var n=this,e=m(this._flicking,"Camera"),t=e.renderer.panels.filter(function(e){return n.canSee(e)}),i=this._visiblePanels,r=(this._visiblePanels=t).filter(function(e){return!E(i,e)}),o=i.filter(function(e){return!E(t,e)});(0<r.length||0<o.length)&&e.renderer.render().then(function(){e.trigger(new c.ComponentEvent(T.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:t}))})},Ee._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var n=m(this._flicking,"Camera"),t=n.renderer.panels;if(t.length<=0)return e.prev||(n.trigger(new c.ComponentEvent(T.NEED_PANEL,{direction:N.PREV})),e.prev=!0),void(e.next||(n.trigger(new c.ComponentEvent(T.NEED_PANEL,{direction:N.NEXT})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=n.needPanelThreshold,s=i-this._alignPos,l=s+r,r=t[0],t=t[t.length-1];e.prev||(s<=r.range.min+a||i<=o.min+a)&&(n.trigger(new c.ComponentEvent(T.NEED_PANEL,{direction:N.PREV})),e.prev=!0),e.next||(t.range.max-a<=l||i>=o.max-a)&&(n.trigger(new c.ComponentEvent(T.NEED_PANEL,{direction:N.NEXT})),e.next=!0)}},Ee._checkReachEnd=function(e,n){var t=m(this._flicking,"Camera"),i=this._range,r=e>i.min&&e<i.max,e=n>i.min&&n<i.max;r&&!e&&(i=n<=i.min?N.PREV:N.NEXT,t.trigger(new c.ComponentEvent(T.REACH_EDGE,{direction:i})))},Ee._applyTransform=function(){var e=this._el,n=m(this._flicking,"Camera"),t=this._position-this._alignPos-this._offset;e.style[this._transform]=n.horizontal?"translate("+-t+"px)":"translate(0, "+-t+"px)"},le);function le(e){var s=this,e=(void 0===e?{}:e).align,e=void 0===e?R.CENTER:e;this._checkTranslateSupport=function(){var n,e,t=document.documentElement.style,i="";try{for(var r=f(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),o=r.next();!o.done;o=r.next()){var a=o.value;a in t&&(i=a)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}if(!i)throw new L(C.TRANSFORM_NOT_SUPPORTED,I.TRANSFORM_NOT_SUPPORTED);s._transform=i},this._flicking=null,this._resetInternalValues(),this._align=e}var ue,ce=(a(he,ue=se),he.prototype.updateRange=function(){var e=m(this._flicking,"Camera").renderer,n=e.getPanel(0),e=e.getPanel(e.panelCount-1);return this._range={min:null!==(n=null==n?void 0:n.position)&&void 0!==n?n:0,max:null!==(e=null==e?void 0:e.position)&&void 0!==e?e:0},this},he);function he(){return null!==ue&&ue.apply(this,arguments)||this}var fe=function(o){function e(){var e=null!==o&&o.apply(this,arguments)||this;return e._circularOffset=0,e._circularEnabled=!1,e}a(e,o);var n=e.prototype;return Object.defineProperty(n,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(n,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),n.getPrevAnchor=function(e){if(!this._circularEnabled||0!==e.index)return o.prototype.getPrevAnchor.call(this,e);var n=this._anchors,e=this.rangeDiff,n=n[n.length-1];return new ne({index:n.index,position:n.position-e,panel:n.panel})},n.getNextAnchor=function(e){var n=this._anchors;if(!this._circularEnabled||e.index!==n.length-1)return o.prototype.getNextAnchor.call(this,e);e=this.rangeDiff,n=n[0];return new ne({index:n.index,position:n.position+e,panel:n.panel})},n.findAnchorIncludePosition=function(e){if(!this._circularEnabled)return o.prototype.findAnchorIncludePosition.call(this,e);var n=this._range,t=P(e,n.min,n.max),i=o.prototype.findAnchorIncludePosition.call(this,t);if(!i)return null;t=this.rangeDiff;if(e<n.min){var r=-Math.floor((n.min-e)/t)-1;return new ne({index:i.index,position:i.position+t*r,panel:i.panel})}if(e>n.max){r=Math.floor((e-n.max)/t)+1;return new ne({index:i.index,position:i.position+t*r,panel:i.panel})}return i},n.clampToReachablePosition=function(e){return this._circularEnabled?e:o.prototype.clampToReachablePosition.call(this,e)},n.canReach=function(e){return!e.removed&&(!!this._circularEnabled||o.prototype.canReach.call(this,e))},n.canSee=function(e){var n=this._range,t=this.rangeDiff,i=this.visibleRange,r=o.prototype.canSee.call(this,e);return this._circularEnabled?i.min<n.min?r||e.includeRange(i.min+t,i.max+t,!1):i.max>n.max?r||e.includeRange(i.min-t,i.max-t,!1):r:r},n.updateRange=function(){var e=m(this._flicking,"Camera").renderer.panels;if(e.length<=0)return this._resetInternalValues(),this;var n=e[0],t=e[e.length-1],i=n.range.min-n.margin.prev,r=t.range.max+t.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:n.position,max:t.position},this._updateCircularOffset(),this},n.lookAt=function(n){var e=m(this._flicking,"Camera"),t=this._position;if(n===t)return o.prototype.lookAt.call(this,n);var i=e.renderer.panels.map(function(e){return e.toggle(t,n)});return this._position=n,i.some(function(e){return e})&&(this._updateCircularOffset(),e.renderer.render()),o.prototype.lookAt.call(this,n)},n._applyTransform=function(){var e=this._el,n=m(this._flicking,"Camera"),t=this._position-this._alignPos-this._offset+this._circularOffset;e.style[this._transform]=n.horizontal?"translate("+-t+"px)":"translate(0, "+-t+"px)"},n._resetInternalValues=function(){o.prototype._resetInternalValues.call(this),this._circularOffset=0,this._circularEnabled=!1},n._calcPanelAreaSum=function(e){return e.reduce(function(e,n){return e+n.sizeIncludingMargin},0)},n._updateCircularOffset=function(){var e,n,t;this._circularEnabled?(e=m(this._flicking,"Camera"),n=[],t=[],e.panels.filter(function(e){return e.toggled}).forEach(function(e){(e.toggleDirection===N.PREV?n:t).push(e)}),this._circularOffset=this._calcPanelAreaSum(n)-this._calcPanelAreaSum(t)):this._circularOffset=0},e}(se),de=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}a(e,i);var n=e.prototype;return n.updateRange=function(){var e=m(this._flicking,"Camera").renderer,n=this._alignPos,t=e.getPanel(0),i=e.getPanel(e.panelCount-1);if(!t||!i)return this._range={min:0,max:0},this;var r=this.size,e=t.range.min,t=i.range.max,i=e+n,n=t-r+n;return r<t-e?this._range={min:i,max:n}:(e="object"==typeof(e=this._align)?e.camera:e,i=i+l(e,n-i),this._range={min:i,max:i}),this},n.updateAnchors=function(){var n=this,e=m(this._flicking,"Camera").renderer.panels;if(e.length<=0)return this._anchors=[],this;var t,i,r,o,a=this._range,s=e.filter(function(e){return n.canReach(e)});return 0<s.length?(t=s[0].position!==a.min,i=s[s.length-1].position!==a.max,r=t?1:0,o=s.map(function(e,n){return new ne({index:n+r,position:e.position,panel:e})}),t&&o.splice(0,0,new ne({index:0,position:a.min,panel:e[s[0].index-1]})),i&&o.push(new ne({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 ne({index:0,position:a.min,panel:o}),new ne({index:1,position:a.max,panel:s})]):this._anchors=[new ne({index:0,position:a.min,panel:this._findNearestPanel(a.min,e)})],this},n.findAnchorIncludePosition=function(e){var n=this._range,t=this._anchors;return t.length<=0?null:e<=n.min?t[0]:e>=n.max?t[t.length-1]:i.prototype.findAnchorIncludePosition.call(this,e)},n._findNearestPanel=function(e,n){for(var t=1/0,i=0;i<n.length;i++){var r=n[i],r=Math.abs(r.position-e);if(t<r)return n[i-1];t=r}return n[n.length-1]},e}(se),ge={__proto__:null,Camera:se,LinearCamera:ce,CircularCamera:fe,BoundCamera:de},V=($=_e.prototype,Object.defineProperty($,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty($,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty($,"align",{get:function(){return this._align},set:function(e){this._align=e;var n=this._getPanelAlign();this._panels.forEach(function(e){e.align=n})},enumerable:!1,configurable:!0}),$.init=function(e){return this._flicking=e,this._collectPanels(),this},$.destroy=function(){this._flicking=null,this._panels=[]},$.getPanel=function(e){return this._panels[e]||null},$.updatePanelSize=function(){var e=m(this._flicking,"Renderer");return 0<e.panelsPerView?this._updatePanelSizeByGrid(e):e.panels.forEach(function(e){return e.resize()}),this},$.batchInsert=function(){for(var a=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var s=this._panels,l=m(this._flicking,"Renderer"),t=l.control,u=this._getPanelAlign(),i=e.reduce(function(e,n){var t=b(n.index,s.length),i=s.slice(t),r=n.elements.map(function(e,n){return a._createPanel(e,{index:t+n,align:u,flicking:l})});s.splice.apply(s,g([t,0],d(r))),a._insertPanelElements(r,null!==(n=i[0])&&void 0!==n?n:null),r.forEach(function(e){return e.resize()});var o=a._getPanelSizeSum(r);return i.forEach(function(e){e.increaseIndex(r.length),e.increasePosition(o)}),g(g([],d(e)),d(r))},[]);return i.length<=0?[]:(this._updateCameraAndControl(),this.render(),0<i.length&&!t.animating&&t.moveToPanel(t.activePanel||i[0],{duration:0}).catch(function(){}),l.camera.updateOffset(),l.trigger(new c.ComponentEvent(T.PANEL_CHANGE,{added:i,removed:[]})),i)},$.batchRemove=function(){for(var a=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var s=this._panels,t=m(this._flicking,"Renderer"),i=t.camera,l=t.control,u=l.activePanel,r=l.activeIndex,o=e.reduce(function(e,n){var t=n.index,i=n.deleteCount,n=b(t,s.length),t=s.slice(n+i),r=s.splice(n,i);if(r.length<=0)return[];var o=a._getPanelSizeSum(r);return t.forEach(function(e){e.decreaseIndex(r.length),e.decreasePosition(o)}),a._removePanelElements(r),r.forEach(function(e){return e.destroy()}),a._updateCameraAndControl(),E(r,u)&&l.resetActive(),g(g([],d(e)),d(r))},[]);return this.render(),0<o.length&&!l.animating&&((r=E(o,u)?s[r]||s[s.length-1]:u)?l.moveToPanel(r,{duration:0}).catch(function(){}):i.lookAt(0)),t.camera.updateOffset(),t.trigger(new c.ComponentEvent(T.PANEL_CHANGE,{added:[],removed:o})),o},$._getPanelAlign=function(){var e=this._align;return"object"==typeof e?e.panel:e},$._getPanelSizeSum=function(e){var n=e[0],t=e[e.length-1],e=t.margin.next-n.margin.prev;return t.range.max-n.range.min+e},$._updateCameraAndControl=function(){var e=m(this._flicking,"Renderer"),n=e.camera,e=e.control;n.updateRange(),n.updateAnchors(),n.resetNeedPanelHistory(),e.updateInput()},$._updateRenderingPanels=function(){var e=m(this._flicking,"Renderer");e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach(function(e){return e.markForShow()})},$._showOnlyVisiblePanels=function(n){var e=n.renderer.panels,t=n.camera,i=t.visiblePanels.reduce(function(e,n){return e[n.index]=!0,e},{});e.forEach(function(e){e.index in i?e.markForShow():n.holding||e.markForHide()}),t.updateOffset()},$._updatePanelSizeByGrid=function(e){var n,t,i=e.panels,r=e.panelsPerView;if(r<=0)throw new L(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,n=e.horizontal?{width:r}:{height:r},t={size:r,height:i.height,margin:i.margin},e.noPanelStyleOverride||e.panels.forEach(function(e){return e.setSize(n)}),e.panels.forEach(function(e){return e.resize(t)}))},_e);function _e(e){e=(void 0===e?{}:e).align,e=void 0===e?R.CENTER:e;this._flicking=null,this._panels=[],this._align=e}Ee=pe.prototype,Object.defineProperty(Ee,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"offset",{get:function(){var e=this._toggleDirection,n=this._flicking.camera.rangeDiff;return e!==N.NONE&&this._toggled?e===N.PREV?-n:n:0},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"outsetProgress",{get:function(){var e=this.position+this.offset,n=this._alignPos,t=this._flicking.camera,i=t.position;if(i===e)return 0;if(i<e){var r=e+(t.size-t.alignPosition)+n;return-O(i,e,r)}n=e-(t.alignPosition+this._size-n);return 1-O(i,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"visibleRatio",{get:function(){var e=this.range,n=this._size,t=this.offset,i=this._flicking.camera.visibleRange,r=e.min+t,e=e.max+t;if(e<=i.min||r>=i.max)return 0;t=n;return i.min>r&&(t-=i.min-r),i.max<e&&(t-=e-i.max),t/n},enumerable:!1,configurable:!0}),Object.defineProperty(Ee,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),Ee.resize=function(e){var n=this.element,t=x(n),i=this._flicking,r=i.horizontal,i=i.renderer.panels[this._index-1];return e?(this._size=e.size,this._margin=s({},e.margin),this._height=e.height):(this._size=r?n.offsetWidth:n.offsetHeight,this._margin=r?{prev:parseFloat(t.marginLeft||"0"),next:parseFloat(t.marginRight||"0")}:{prev:parseFloat(t.marginTop||"0"),next:parseFloat(t.marginBottom||"0")},this._height=r?n.offsetHeight:this._size),this._pos=i?i.range.max+i.margin.next+this._margin.prev:this._margin.prev,this._updateAlignPos(),this},Ee.setSize=function(e){var n=e.width,t=e.height,e=this.element;return null!=n&&(D(n)?e.style.width=n:e.style.width=n+"px"),null!=t&&(D(t)?e.style.height=t:e.style.height=t+"px"),this},Ee.contains=function(e){var n;return!(null===(n=this.element)||void 0===n||!n.contains(e))},Ee.destroy=function(){this._resetInternalStates(),this._removed=!0},Ee.includePosition=function(e,n){return this.includeRange(e,e,n=void 0===n?!1:n)},Ee.includeRange=function(e,n,t){var i=this._margin,r=this.range;return(t=void 0===t?!1:t)&&(r.min-=i.prev,r.max+=i.next),n>=r.min&&e<=r.max},Ee.focus=function(e){return this._flicking.moveTo(this._index,e)},Ee.prev=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(0===e?i-1:e-1):t.getPanel(e-1)},Ee.next=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(e===i-1?0:e+1):t.getPanel(e+1)},Ee.increaseIndex=function(e){return this._index+=Math.max(e,0),this},Ee.decreaseIndex=function(e){return this._index-=Math.max(e,0),this},Ee.increasePosition=function(e){return this._moveBy(Math.max(e,0)),this},Ee.decreasePosition=function(e){return this._moveBy(-Math.max(e,0)),this},Ee.toggle=function(e,n){var t=this._toggleDirection,i=this._togglePosition;if(t===N.NONE||n===e)return!1;var r=this._toggled;return e<n?e<=i&&i<=n&&(this._toggled=t===N.NEXT):i<=e&&n<=i&&(this._toggled=t!==N.NEXT),r!==this._toggled},Ee.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=N.NONE,this._toggled=!1,this;var n=e.camera,t=n.range,i=n.alignPosition,r=n.visibleRange,o=r.max-r.min,e=t.min-i,r=t.max-i+o,r=this.includeRange(r-o,r,!1),e=this.includeRange(e,e+o,!1);return this._toggled=!1,r?(this._toggleDirection=N.PREV,this._togglePosition=this.range.max+t.min-t.max+i,this.toggle(1/0,n.position)):e?(this._toggleDirection=N.NEXT,this._togglePosition=this.range.min+t.max-o+i,this.toggle(-1/0,n.position)):(this._toggleDirection=N.NONE,this._togglePosition=0),this},Ee._moveBy=function(e){return this._pos+=e,this},Ee._updateAlignPos=function(){this._alignPos=l(this._align,this._size)},Ee._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},se=pe;function pe(e){var n=e.index,t=e.align,e=e.flicking;this._index=n,this._flicking=e,this._align=t,this._removed=!1,this._resetInternalStates()}var ve,me=function(t){function e(e){var n=t.call(this,e)||this;return n._el=e.el,n._rendered=!0,n}a(e,t);var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),n.markForShow=function(){this._rendered=!0},n.markForHide=function(){this._rendered=!1},e}(se),be=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}a(n,e);var t=n.prototype;return t.render=function(){return h(this,void 0,void 0,function(){var n,t,i;return v(this,function(e){return i=m(this._flicking,"Renderer"),n=i.camera.element,t=this._panels.filter(function(e){return e.element.parentElement===n}),this._updateRenderingPanels(),i=this._getRenderingPanelsByOrder(),this._removePanelElements(t.filter(function(e){return!e.rendered})),this._insertPanelElements(i.filter(function(e){return e.element.parentElement!==n}),null),this._resetPanelElementOrder(i),[2]})})},t.forceRenderAllPanels=function(){return h(this,void 0,void 0,function(){var n,t;return v(this,function(e){return n=m(this._flicking,"Renderer"),n=n.camera,n=n.element,t=document.createDocumentFragment(),this._panels.forEach(function(e){return t.appendChild(e.element)}),this._removeAllChildsFromCamera(),n.appendChild(t),[2]})})},t._collectPanels=function(){var t=m(this._flicking,"Renderer"),n=t.camera.element;r(n.childNodes).forEach(function(e){e.nodeType===Node.TEXT_NODE&&n.removeChild(e)});var i=this._getPanelAlign(),e=r(n.children);this._panels=e.map(function(e,n){return new me({flicking:t,el:e,index:n,align:i})})},t._createPanel=function(e,n){return new me(s({el:e},n))},t._insertPanelElements=function(e,n){var t=m(this._flicking,"Renderer").camera.element,n=(null==n?void 0:n.element)||null,i=document.createDocumentFragment();return e.forEach(function(e){return i.appendChild(e.element)}),t.insertBefore(i,n),this},t._removePanelElements=function(e){var n=m(this._flicking,"Renderer").camera.element;return e.forEach(function(e){n.removeChild(e.element)}),this},t._resetPanelElementOrder=function(e){var t=m(this._flicking,"Renderer").camera.element,i=g([],d(e)).reverse();i.forEach(function(e,n){n=i[n-1],n=n?n.element:null;e.element.nextElementSibling!==n&&t.insertBefore(e.element,n)})},t._removeAllChildsFromCamera=function(){for(var e=m(this._flicking,"Renderer").camera.element;e.firstChild;)e.removeChild(e.firstChild)},t._getRenderingPanelsByOrder=function(){return m(this._flicking,"Renderer").renderer.panels.filter(function(e){return e.rendered}).sort(function(e,n){return e.position+e.offset-(n.position+n.offset)})},n}(V),$=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}a(n,e);var t=n.prototype;return t._insertPanelElements=function(e,n){},t._removePanelElements=function(e){},n}(V),Ee={__proto__:null,Renderer:V,VanillaRenderer:be,ExternalRenderer:$},Pe=function(A){function e(e,n){var t=void 0===n?{}:n,i=t.align,r=void 0===i?R.CENTER:i,o=t.defaultIndex,a=void 0===o?0:o,s=t.horizontal,l=void 0===s||s,u=t.circular,c=void 0!==u&&u,h=t.bound,f=void 0!==h&&h,d=t.adaptive,g=void 0!==d&&d,_=t.panelsPerView,p=void 0===_?-1:_,v=t.noPanelStyleOverride,m=void 0!==v&&v,b=t.needPanelThreshold,E=void 0===b?0:b,P=t.preventEventsBeforeInit,O=void 0===P||P,x=t.deceleration,y=void 0===x?.0075:x,T=t.duration,N=void 0===T?500:T,n=t.easing,i=void 0===n?function(e){return 1-Math.pow(1-e,3)}:n,o=t.inputType,s=void 0===o?["mouse","touch"]:o,u=t.moveType,h=void 0===u?"snap":u,d=t.threshold,_=void 0===d?40:d,v=t.interruptable,b=void 0===v||v,P=t.bounce,x=void 0===P?"20%":P,T=t.iOSEdgeSwipeThreshold,n=void 0===T?30:T,o=t.preventClickOnDrag,u=void 0===o||o,d=t.disableOnInit,v=void 0!==d&&d,P=t.renderOnlyVisible,T=void 0!==P&&P,o=t.autoInit,d=void 0===o||o,P=t.autoResize,o=void 0===P||P,P=t.renderExternal,t=void 0===P?null:P,P=A.call(this)||this;return P._initialized=!1,P._plugins=[],P._align=r,P._defaultIndex=a,P._horizontal=l,P._circular=c,P._bound=f,P._adaptive=g,P._panelsPerView=p,P._noPanelStyleOverride=m,P._needPanelThreshold=E,P._preventEventsBeforeInit=O,P._deceleration=y,P._duration=N,P._easing=i,P._inputType=s,P._moveType=h,P._threshold=_,P._interruptable=b,P._bounce=x,P._iOSEdgeSwipeThreshold=n,P._preventClickOnDrag=u,P._disableOnInit=v,P._renderOnlyVisible=T,P._autoResize=o,P._autoInit=d,P._renderExternal=t,P._viewport=new z(function(e,n){var t=null;if(D(e)){n=(n||document).querySelector(e);if(!n)throw new L(C.ELEMENT_NOT_FOUND(e),I.ELEMENT_NOT_FOUND);t=n}else e&&e.nodeType===Node.ELEMENT_NODE&&(t=e);if(!t)throw new L(C.WRONG_TYPE(e,["HTMLElement","string"]),I.WRONG_TYPE);return t}(e)),P._renderer=P._createRenderer(),P._camera=P._createCamera(),P._control=P._createControl(),P.resize=P.resize.bind(P),P._autoInit&&P.init(),P}a(e,A);var n=e.prototype;return Object.defineProperty(n,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(n,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(n,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(n,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(n,"circularEnabled",{get:function(){return this._camera.controlParams.circular},enumerable:!1,configurable:!0}),Object.defineProperty(n,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(n,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(n,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(n,"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(n,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"circular",{get:function(){return this._circular},set:function(e){this._circular=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"bound",{get:function(){return this._bound},set:function(e){this._bound=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"easing",{get:function(){return this._easing},set:function(e){this._easing=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){var n;e!==this._preventClickOnDrag&&(n=this._control.controller,e?n.addPreventClickHandler():n.removePreventClickHandler(),this._preventClickOnDrag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(n,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),n.init=function(){return h(this,void 0,void 0,function(){var n,t,i,r,o,a=this;return v(this,function(e){switch(e.label){case 0:return this._initialized?[2]:(n=this._camera,t=this._renderer,i=this._control,r=this.trigger,o=this._preventEventsBeforeInit,n.init(this),t.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(),this._plugins.forEach(function(e){return e.init(a)}),this._initialized=!0,o&&(this.trigger=r),this.trigger(new c.ComponentEvent(T.READY)),[2]}})})},n.destroy=function(){this._initialized&&(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)},n.prev=function(e){var n;return void 0===e&&(e=this._duration),this.moveTo(null!==(n=null===(n=null===(n=this._control.activePanel)||void 0===n?void 0:n.prev())||void 0===n?void 0:n.index)&&void 0!==n?n:-1,e,N.PREV)},n.next=function(e){var n;return void 0===e&&(e=this._duration),this.moveTo(null!==(n=null===(n=null===(n=this._control.activePanel)||void 0===n?void 0:n.next())||void 0===n?void 0:n.index)&&void 0!==n?n:this._renderer.panelCount,e,N.NEXT)},n.moveTo=function(e,n,t){void 0===n&&(n=this._duration),void 0===t&&(t=N.NONE);var i=this._renderer,r=i.panelCount,i=i.getPanel(e);return i?this._control.animating?Promise.reject(new L(C.ANIMATION_ALREADY_PLAYING,I.ANIMATION_ALREADY_PLAYING)):this._control.moveToPanel(i,{duration:n,direction:t}):Promise.reject(new L(C.INDEX_OUT_OF_RANGE(e,0,r-1),I.INDEX_OUT_OF_RANGE))},n.getPanel=function(e){return this._renderer.getPanel(e)},n.enableInput=function(){return this._control.enable(),this},n.disableInput=function(){return this._control.disable(),this},n.getStatus=function(e){var n=void 0===e?{}:e,t=n.index,i=void 0===t||t,r=n.position,e=void 0===r||r,t=n.includePanelHTML,o=void 0!==t&&t,r=n.visiblePanelsOnly,t=void 0!==r&&r,n=this._camera,r={panels:(t?this.visiblePanels:this.panels).map(function(e){var n={index:e.index};return o&&(n.html=e.element.outerHTML),n})};return i&&(r.index=this.index),!e||(e=n.findNearestAnchor(n.position))&&(r.position={panel:e.panel.index,progressInPanel:n.getProgressInPanel(e.panel)}),t&&(t=this.visiblePanels,r.visibleOffset=null!==(t=null===(t=t[0])||void 0===t?void 0:t.index)&&void 0!==t?t:0),r},n.setStatus=function(e){if(!this._initialized)throw new L(C.NOT_INITIALIZED,I.NOT_INITIALIZED);var n=e.index,t=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:p(r.map(function(e){return e.html}))})),n&&this.moveTo(i?n-i:n,0).catch(function(){}),t&&this._moveType===w.FREE_SCROLL&&(n=t.panel,t=t.progressInPanel,t=(n=o.panels[i?n-i:n].range).min+(n.max-n.min)*t,a.moveToPosition(t,0).catch(function(){}))},n.addPlugins=function(){for(var e,n=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return this._initialized&&t.forEach(function(e){return e.init(n)}),(e=this._plugins).push.apply(e,g([],d(t))),this},n.removePlugins=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.forEach(function(n){var e=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1}(t._plugins,function(e){return e===n});0<=e&&(n.destroy(),t._plugins.splice(e,1))}),this},n.resize=function(){return h(this,void 0,void 0,function(){var n,t,i,r,o,a,s,l,u;return v(this,function(e){switch(e.label){case 0:return n=this._viewport,t=this._renderer,i=this._camera,r=this._control,u=r.activePanel,o=n.width,a=n.height,s=u?i.getProgressInPanel(u):0,this.trigger(new c.ComponentEvent(T.BEFORE_RESIZE,{width:o,height:a,element:n.element})),n.resize(),[4,t.forceRenderAllPanels()];case 1:return e.sent(),t.updatePanelSize(),i.updateAlignPos(),i.updateRange(),i.updateAnchors(),[4,t.render()];case 2:return e.sent(),r.animating||(r.updatePosition(s),r.updateInput()),l=n.width,u=n.height,u=l!==o||u!==a,this.trigger(new c.ComponentEvent(T.AFTER_RESIZE,{width:n.width,height:n.height,prev:{width:o,height:a},sizeChanged:u,element:n.element})),[2]}})})},n.append=function(e){return this.insert(this._renderer.panelCount,e)},n.prepend=function(e){return this.insert(0,e)},n.insert=function(e,n){if(this._renderExternal)throw new L(C.NOT_ALLOWED_IN_FRAMEWORK,I.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:p(n)})},n.remove=function(e,n){if(void 0===n&&(n=1),this._renderExternal)throw new L(C.NOT_ALLOWED_IN_FRAMEWORK,I.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:n})},n._createControl=function(){var e,n=this._moveType,t=Object.keys(w).map(function(e){return w[e]}),i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)&&null!==(e=n[1])&&void 0!==e?e:{};if(!E(t,i))throw new L(C.WRONG_OPTION("moveType",JSON.stringify(n)),I.WRONG_OPTION);switch(i){case w.SNAP:return new ie(r);case w.FREE_SCROLL:return new re(r);case w.STRICT:return new oe(r)}},n._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 fe(e)):new(this._bound?de:ce)(e)},n._createRenderer=function(){var e={align:this._align},n=this._renderExternal;return n?new n.renderer(s(s({},e),n.rendererOptions)):new be(e)},n._moveToInitialPanel=function(){return h(this,void 0,void 0,function(){var n,t;return v(this,function(e){return t=this._renderer,n=this._control,(t=t.getPanel(this._defaultIndex)||t.getPanel(0))?[2,n.moveToPanel(t,{duration:0})]:[2]})})},e.VERSION="4.2.5",e}(c),V=(a(Oe,ve=se),Oe);function Oe(e){var n=ve.call(this,e)||this;return n._externalComponent=e.externalComponent,n}function xe(e,t,i,n,r){e.batchInsert.apply(e,g([],d(t.added.slice(n,r).map(function(e,n){return{index:e,elements:[i[n+t.prevList.length]]}}))))}function ye(e,n,t){t=e.panels.slice(n,t),e.batchRemove({index:n,deleteCount:t.length})}var Te=function(e){if("number"==typeof e)return e+"px";switch(e){case R.CENTER:return"50%";case R.NEXT:return"100%";case R.PREV:return"0%";default:return e}},$={__proto__:null,withFlickingMethods:function(r,o){[c.prototype,Pe.prototype].forEach(function(t){Object.getOwnPropertyNames(t).filter(function(e){return!r[e]&&!e.startsWith("_")&&"constructor"!==e}).forEach(function(e){var n,i=Object.getOwnPropertyDescriptor(t,e);i.value?Object.defineProperty(r,e,{value:function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return(e=i.value).call.apply(e,g([this[o]],d(n)))}}):(n={},i.get&&(n.get=function(){var e;return null===(e=i.get)||void 0===e?void 0:e.call(this[o])}),i.set&&(n.set=function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return null===(e=i.set)||void 0===e?void 0:e.call.apply(e,g([this[o]],d(n)))}),Object.defineProperty(r,e,n))})})},sync:function(e,t,i){var n,r,o,a,s=e.renderer,l=s.panels;0<t.removed.length&&(r=n=-1,t.removed.forEach(function(e){n<0&&(n=e),r=0<=r&&e!==r-1?(ye(s,r,n+1),n=e):e}),ye(s,r,n+1)),t.ordered.forEach(function(e){var n,t=d(e,2),i=t[0],r=t[1],e=l[i],t=r-i;0<t?(n=l.slice(i+1,r+1),e.increaseIndex(t),n.forEach(function(e){return e.decreaseIndex(1)})):(n=l.slice(r,i),e.decreaseIndex(-t),n.forEach(function(e){return e.increaseIndex(1)})),e.resize()}),0<t.ordered.length&&l.sort(function(e,n){return e.index-n.index}),0<t.added.length&&(a=o=-1,t.added.forEach(function(e,n){o<0&&(o=n),a=0<=a&&e!==a+1?(xe(s,t,i,o,n+1),o=-1):e}),0<=o&&xe(s,t,i,o))},getRenderingPanels:function(e,n){var t=n.removed.reduce(function(e,n){return e[n]=!0,e},{}),i=n.maintained.reduce(function(e,n){var t=d(n,2),n=t[0],t=t[1];return e[n]=t,e},{});return g(g([],d(e.panels.filter(function(e){return!t[e.index]}).sort(function(e,n){return e.position+e.offset-(n.position+n.offset)}).map(function(e){return n.list[i[e.index]]}))),d(n.added.map(function(e){return n.list[e]})))},getDefaultCameraTransform:function(e,n,t){void 0===n&&(n=!0);var i,i=(i="object"==typeof(i=e=void 0===e?R.CENTER:e)?i.camera:i,Te(i)),e=(e="object"==typeof(e=e)?e.panel:e,S(Te(e)));if(null==e)return"";e="calc("+i+" - ("+(t||"0px")+" * "+e.percentage+") - "+e.absolute+"px)";return n?"translate("+e+")":"translate(0, "+e+")"}};return e(Pe,{__proto__:null,Viewport:z,FlickingError:L,AnchorPoint:ne,Panel:se,ElementPanel:me,ExternalPanel:V}),e(Pe,ge),e(Pe,ae),e(Pe,Ee),e(Pe,n),e(Pe,$),Pe});
|
|
9
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("@egjs/component"),require("@egjs/axes"),require("@egjs/imready")):"function"==typeof define&&define.amd?define(["@egjs/component","@egjs/axes","@egjs/imready"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=n(e.eg.Component,e.eg.Axes,e.eg.ImReady)}(this,(function(e,n,t){"use strict";var i=function(e,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},i(e,n)};function r(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}i(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var o=function(){return o=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},o.apply(this,arguments)};function a(e,n,t,i){return new(t||(t=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,s)}l((i=i.apply(e,n||[])).next())}))}function s(e,n){var t,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(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=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=n.call(e,a)}catch(e){o=[6,e],i=0}finally{t=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function l(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.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(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function c(e,n){for(var t=0,i=n.length,r=e.length;t<i;t++,r++)e[r]=n[t];return e}var f,h={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},d=function(e,n){return e+"("+typeof e+") is not a "+n.map((function(e){return'"'+e+'"'})).join(" or ")+"."},g=function(e){return'Element with selector "'+e+'" not found.'},p=function(e,n){return n+" should be provided. Given: "+e},_='This module is not attached to the Flicking instance. "init()" should be called first.',v=function(e,n){return'Option "'+e+'" is not in correct format, given: '+n},m=function(e,n,t){return'Index "'+e+'" is out of range: should be between '+n+" and "+t+"."},b=function(e){return'Position "'+e+'" is not reachable.'},P="Browser does not support CSS transform.",E="Event stop() is called by user.",y="Animation is interrupted by user input.",x="Animation is already playing.",O="This behavior is not allowed in the frameworks like React, Vue, or Angular.",T="Flicking is not initialized yet, call init() first.",I={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"},R={PREV:"prev",CENTER:"center",NEXT:"next"},A={PREV:"PREV",NEXT:"NEXT",NONE:null},w={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},N={VERTICAL:"vertical",HIDDEN:"flicking-hidden",DEFAULT_VIRTUAL:"flicking-panel"},C={__proto__:null,EVENTS:I,ALIGN:R,DIRECTION:A,MOVE_TYPE:w,CLASS:N,ERROR_CODE:h},k=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return n.forEach((function(n){Object.keys(n).forEach((function(t){e[t]=n[t]}))})),e},j=function(e,n){var t=null;if(Y(e)){var i=(n||document).querySelector(e);if(!i)throw new oe(g(e),h.ELEMENT_NOT_FOUND);t=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(t=e);if(!t)throw new oe(d(e,["HTMLElement","string"]),h.WRONG_TYPE);return t},S=function(e,n){if(null==e)throw new oe(p(e,n),h.VAL_MUST_NOT_NULL)},D=function(e,n,t){return Math.max(Math.min(e,t),n)},z=function(e){if(!e)throw new oe(_,h.NOT_ATTACHED_TO_FLICKING);return e},L=function(e){return[].slice.call(e)},M=function(e,n){var t;if(Y(e))switch(e){case R.PREV:t=0;break;case R.CENTER:t=.5*n;break;case R.NEXT:t=n;break;default:if(null==(t=H(e,n)))throw new oe(v("align",e),h.WRONG_OPTION)}else t=e;return t},V=function(e,n){var t;if(Array.isArray(e))t=e.map((function(e){return H(e,n)}));else{var i=H(e,n);t=[i,i]}return t.map((function(n){if(null==n)throw new oe(v("bounce",e),h.WRONG_OPTION);return n}))},H=function(e,n){var t=F(e);return null==t?null:t.percentage*n+t.absolute},F=function(e){var n=/(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;if("number"==typeof e)return{percentage:0,absolute:e};for(var t={percentage:0,absolute:0},i=0,r=n.exec(e);null!=r;){var o=r[1],a=r[2],s=r[3],l=parseFloat(a);if(i<=0&&(o=o||"+"),!o)return null;var u="+"===o?1:-1;"%"===s?t.percentage+=u*(l/100):t.absolute+=u*l,++i,r=n.exec(e)}return 0===i?null:t},G=function(e){return"object"==typeof e?e.panel:e},B=function(e,n){return e===n?A.NONE:e<n?A.NEXT:A.PREV},W=function(e){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){if(Y(e)){var t=document.createElement("div");for(t.innerHTML=e,n.push.apply(n,c([],u(L(t.children))));t.firstChild;)t.removeChild(t.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new oe(d(e,["HTMLElement","string"]),h.WRONG_TYPE);n.push(e)}})),n},X=function(e,n){return D(e<0?e+n:e,0,n)},U=function(e,n){var t,i;try{for(var r=l(e),o=r.next();!o.done;o=r.next()){if(o.value===n)return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return!1},Y=function(e){return"string"==typeof e},K=function(e,n,t){var i=t-n;if(e<n)e=t-(n-e)%i;else if(e>t){e=n+(e-t)%i}return e},Z=function(e,n){var t,i;try{for(var r=l(e),o=r.next();!o.done;o=r.next()){var a=o.value;if(n(a))return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return null},q=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1},J=function(e,n,t){return(e-n)/(t-n)},Q=function(e){return window.getComputedStyle(e)||e.currentStyle},$=function(e,n){var t=n.width,i=n.height;null!=t&&(Y(t)?e.style.width=t:e.style.width=t+"px"),null!=i&&(Y(i)?e.style.height=i:e.style.height=i+"px")},ee=function(e,n,t){return e>=n&&e<=t},ne=function(e,n){return e>=n?e%n:e<0?X((e+1)%n-1,n):e},te=function(e){for(var n=new Array(e),t=0;t<e;t++)n[t]=t;return n},ie=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},re={__proto__:null,merge:k,getElement:j,checkExistence:S,clamp:D,getFlickingAttached:z,toArray:L,parseAlign:M,parseBounce:V,parseArithmeticSize:H,parseArithmeticExpression:F,parseCSSSizeValue:function(e){return Y(e)?e:e+"px"},parsePanelAlign:G,getDirection:B,parseElement:W,getMinusCompensatedIndex:X,includes:U,isString:Y,circulatePosition:K,find:Z,findRight:function(e,n){for(var t=e.length-1;t>=0;t--){var i=e[t];if(n(i))return i}return null},findIndex:q,getProgress:J,getStyle:Q,setSize:$,isBetween:ee,circulateIndex:ne,range:te,setPrototypeOf:ie},oe=function(e){function n(t,i){var r=e.call(this,t)||this;return ie(r,n.prototype),r.name="FlickingError",r.code=i,r}return r(n,e),n}(Error),ae=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 n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(n,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),n.setSize=function(e){var n=e.width,t=e.height,i=this._el,r=this._padding,o=this._isBorderBoxSizing;if(null!=n)if(Y(n))i.style.width=n;else{var a=o?n+r.left+r.right:n;i.style.width=a+"px"}if(null!=t)if(Y(t))i.style.height=t;else{var s=o?t+r.top+r.bottom:t;i.style.height=s+"px"}this.resize()},n.resize=function(){var e=this._el,n=Q(e);this._width=e.clientWidth,this._height=e.clientHeight,this._padding={left:n.paddingLeft?parseFloat(n.paddingLeft):0,right:n.paddingRight?parseFloat(n.paddingRight):0,top:n.paddingTop?parseFloat(n.paddingTop):0,bottom:n.paddingBottom?parseFloat(n.paddingBottom):0},this._isBorderBoxSizing="border-box"===n.boxSizing},e}(),se=function(){function e(e){var n,t=this;this._onResize=function(){t._flicking.resize()},this._skipFirstResize=(n=!0,function(){n?n=!1:t._onResize()}),this._flicking=e,this._enabled=!1,this._resizeObserver=null}var n=e.prototype;return Object.defineProperty(n,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),n.enable=function(){var e=this._flicking,n=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var t=0!==n.width||0!==n.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);t.observe(e.viewport.element),this._resizeObserver=t}else window.addEventListener("resize",this._onResize);return this._enabled=!0,this},n.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}(),le=function(){function e(e){this._element=e,this._rendered=!0}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),n.show=function(e){var n=this.element,t=e.camera.element;n.parentElement!==t&&(t.appendChild(n),this._rendered=!0)},n.hide=function(e){var n=this.element,t=e.camera.element;n.parentElement===t&&(t.removeChild(n),this._rendered=!1)},e}(),ue=function(){function e(e){this._flicking=e}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(n,"_virtualElement",{get:function(){var e=this._flicking,n=this._panel.elementIndex;return e.virtual.elements[n]},enumerable:!1,configurable:!0}),n.init=function(e){this._panel=e},n.show=function(){},n.hide=function(){},e}(),ce=function(){function e(e,n){var t,i,r,o;this._flicking=e,this._renderPanel=null!==(t=null==n?void 0:n.renderPanel)&&void 0!==t?t:function(){return""},this._initialPanelCount=null!==(i=null==n?void 0:n.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==n?void 0:n.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==n?void 0:n.panelClass)&&void 0!==o?o:N.DEFAULT_VIRTUAL,this._elements=[]}var n=e.prototype;return Object.defineProperty(n,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(n,"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(n,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),n.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var n=e.camera.children;this._elements=n.map((function(e){return{nativeElement:e,visible:!0}}))}},n.show=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!0,t.style.display&&(t.style.display="")},n.hide=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!1,t.style.display="none"},n.append=function(e){void 0===e&&(e=1);var n=this._flicking;return this.insert(n.panels.length,e)},n.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},n.insert=function(e,n){return void 0===n&&(n=1),n<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:te(n),hasDOMInElements:!1})},n.remove=function(e,n){return n<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!1})},n._initVirtualElements=function(){var e=this,n=this._flicking,t=n.camera.element,i=n.panelsPerView,r=document.createDocumentFragment();te(i+1).map((function(n){var t=document.createElement("div");return t.className=e._panelClass,t.dataset.elementIndex=n.toString(),t})).forEach((function(e){r.appendChild(e)})),t.appendChild(r)},e}(),fe={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},he="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"}(f||(f={}));var de=function(){function n(){this._delta=0,this._targetPanel=null}var t=n.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(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=i.delta.flick;if(o){this._delta+=o;var a=t.camera,s=a.position,l=i.pos.flick,u=t.circularEnabled?K(l,a.range.min,a.range.max):l;a.lookAt(u);var c=new e.ComponentEvent(I.MOVE,{isTrusted:i.isTrusted,holding:this.holding,direction:B(0,i.delta.flick),axesEvent:i});t.trigger(c),c.isCanceled()&&(a.lookAt(s),r(f.DISABLED))}},n}(),ge=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!1,e}r(t,n);var i=t.prototype;return i.onEnter=function(){this._delta=0,this._targetPanel=null},i.onHold=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo;if(t.renderer.panelCount<=0)r(f.DISABLED);else{var o=new e.ComponentEvent(I.HOLD_START,{axesEvent:i});t.trigger(o),o.isCanceled()?r(f.DISABLED):r(f.HOLDING)}},i.onChange=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=t.control.controller.animatingContext,a=new e.ComponentEvent(I.MOVE_START,{isTrusted:i.isTrusted,holding:this.holding,direction:B(o.start,o.end),axesEvent:i});t.trigger(a),a.isCanceled()?r(f.DISABLED):r(f.ANIMATING).onChange(n)},t}(de),pe=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!1,e._releaseEvent=null,e}r(t,n);var i=t.prototype;return i.onChange=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=i.inputEvent,a=t.horizontal?o.offsetX:o.offsetY,s=new e.ComponentEvent(I.MOVE_START,{isTrusted:i.isTrusted,holding:this.holding,direction:B(0,-a),axesEvent:i});t.trigger(s),s.isCanceled()?r(f.DISABLED):r(f.DRAGGING).onChange(n)},i.onRelease=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo;if(t.trigger(new e.ComponentEvent(I.HOLD_END,{axesEvent:i})),0!==i.delta.flick)return i.setTo({flick:t.camera.position},0),void r(f.IDLE);this._releaseEvent=i},i.onFinish=function(n){var t,i,r=n.flicking;if((0,n.transitTo)(f.IDLE),this._releaseEvent){var o,a=this._releaseEvent.inputEvent.srcEvent;if("touchend"===a.type){var s=a.changedTouches[0];o=document.elementFromPoint(s.clientX,s.clientY)}else o=a.target;var u=r.renderer.panels,c=null;try{for(var h=l(u),d=h.next();!d.done;d=h.next()){var g=d.value;if(g.contains(o)){c=g;break}}}catch(e){t={error:e}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(t)throw t.error}}if(c){var p=r.camera.position,_=c.position;r.trigger(new e.ComponentEvent(I.SELECT,{index:c.index,panel:c,direction:B(p,_)}))}}},t}(de),_e=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!0,e}r(t,n);var i=t.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo;if(t.trigger(new e.ComponentEvent(I.HOLD_END,{axesEvent:i})),t.renderer.panelCount<=0)r(f.IDLE);else{r(f.ANIMATING);var o=t.control,a=i.destPos.flick,s=Math.max(i.duration,t.duration);o.moveToPosition(a,s,i)}},t}(de),ve=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!0,e}r(t,n);var i=t.prototype;return i.onHold=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo;this._delta=0,t.control.updateInput();var o=new e.ComponentEvent(I.HOLD_START,{axesEvent:i});t.trigger(o),o.isCanceled()?r(f.DISABLED):r(f.DRAGGING)},i.onChange=function(e){this._moveToChangedPosition(e)},i.onFinish=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=t.control,a=o.controller.animatingContext;r(f.IDLE),t.trigger(new e.ComponentEvent(I.MOVE_END,{isTrusted:i.isTrusted,direction:B(a.start,a.end),axesEvent:i})),o.setActive(this._targetPanel,o.activePanel,i.isTrusted)},t}(de),me=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}r(n,e);var t=n.prototype;return t.onAnimationEnd=function(e){(0,e.transitTo)(f.IDLE)},t.onChange=function(e){var n=e.axesEvent,t=e.transitTo;n.stop(),t(f.IDLE)},t.onRelease=function(e){var n=e.axesEvent,t=e.transitTo;0===n.delta.flick&&t(f.IDLE)},n}(de),be=function(){function e(){var e=this;this.transitTo=function(n){var t;switch(n){case f.IDLE:t=new ge;break;case f.HOLDING:t=new pe;break;case f.DRAGGING:t=new _e;break;case f.ANIMATING:t=new ve;break;case f.DISABLED:t=new me}return t.onEnter(e._state),e._state=t,e._state},this._state=new ge}var n=e.prototype;return Object.defineProperty(n,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),n.fire=function(e,n){var t=this._state,i=o(o({},n),{transitTo:this.transitTo});switch(e){case fe.HOLD:t.onHold(i);break;case fe.CHANGE:t.onChange(i);break;case fe.RELEASE:t.onRelease(i);break;case fe.ANIMATION_END:t.onAnimationEnd(i);break;case fe.FINISH:t.onFinish(i)}},e}(),Pe=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){e._dragged=!0},this._preventClickWhenDragged=function(n){e._dragged&&(n.preventDefault(),n.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new be}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 n=e.axis.flick;return{range:{min:n.range[0],max:n.range[1]},circular:n.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"enabled",{get:function(){var e,n;return null!==(n=null===(e=this._panInput)||void 0===e?void 0:e.isEnable())&&void 0!==n&&n},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.get([he]).flick)&&void 0!==n?n:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.axis.flick.range)&&void 0!==n?n:[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,i=this;this._flicking=e,this._axes=new n(((t={}).flick={range:[0,0],circular:!1,bounce:[0,0]},t),{deceleration:e.deceleration,interruptable:e.interruptable,easing:e.easing}),this._panInput=new n.PanInput(e.viewport.element,{inputType:e.inputType,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,scale:e.horizontal?[-1,0]:[0,-1],releaseOnScroll:!0});var r=this._axes;r.connect(e.horizontal?[he,""]:["",he],this._panInput);var o=function(n){var t=fe[n];r.on(t,(function(n){i._stateMachine.fire(t,{flicking:e,axesEvent:n})}))};for(var a in fe)o(a);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 n,t=z(this._flicking),i=t.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=V(t.bounce,i.size),r.axm.set(((n={}).flick=e.position,n)),this},t.addPreventClickHandler=function(){var e=z(this._flicking),n=this._axes,t=e.camera.element;return n.on(fe.HOLD,this._onAxesHold),n.on(fe.CHANGE,this._onAxesChange),t.addEventListener("click",this._preventClickWhenDragged,!0),this},t.removePreventClickHandler=function(){var e=z(this._flicking),n=this._axes,t=e.camera.element;return n.off(fe.HOLD,this._onAxesHold),n.off(fe.CHANGE,this._onAxesChange),t.removeEventListener("click",this._preventClickWhenDragged,!0),this},t.animateTo=function(e,n,t){var i,r,o=this,a=this._axes,s=this._stateMachine.state;if(!a)return Promise.reject(new oe(_,h.NOT_ATTACHED_TO_FLICKING));var l=a.get([he]).flick;if(l===e)return(c=z(this._flicking)).camera.lookAt(e),s.targetPanel&&c.control.setActive(s.targetPanel,c.control.activePanel,null!==(r=null==t?void 0:t.isTrusted)&&void 0!==r&&r),Promise.resolve();this._animatingContext={start:l,end:e,offset:0};var u=function(){var i,r;a.once(fe.FINISH,(function(){o._animatingContext={start:0,end:0,offset:0}})),t?t.setTo(((i={}).flick=e,i),n):a.setTo(((r={}).flick=e,r),n)};if(0===n){var c,f=(c=z(this._flicking)).camera;u();var d=c.circularEnabled?K(e,f.range.min,f.range.max):e;return a.axm.set(((i={}).flick=d,i)),Promise.resolve()}return new Promise((function(e,n){var t=function(){a.off(fe.HOLD,i),e()},i=function(){a.off(fe.FINISH,t),n(new oe(y,h.ANIMATION_INTERRUPTED))};a.once(fe.FINISH,t),a.once(fe.HOLD,i),u()}))},t._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),Ee=function(){function n(){this._flicking=null,this._controller=new Pe,this._activePanel=null}var t=n.prototype;return Object.defineProperty(t,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activeIndex",{get:function(){var e,n;return null!==(n=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==n?n:-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 n=z(this._flicking).camera,t=this._activePanel;t&&n.lookAt(n.clampToReachablePosition(t.position))},t.updateInput=function(){var e=z(this._flicking).camera;return this._controller.update(e.controlParams),this},t.resetActive=function(){return this._activePanel=null,this},t.moveToPanel=function(e,n){var t=n.duration,i=n.direction,r=void 0===i?A.NONE:i,o=n.axesEvent;return a(this,void 0,void 0,(function(){var n,i,a,l,u,c,f;return s(this,(function(s){return n=z(this._flicking),i=n.camera,a=e.position,l=i.findNearestAnchor(a),e.removed||!l?[2,Promise.reject(new oe(b(e.position),h.POSITION_NOT_REACHABLE))]:(i.canReach(e)?n.circularEnabled&&(u=this._controller.position,c=i.rangeDiff,f=[a,a+c,a-c].filter((function(e){return r===A.NONE||(r===A.PREV?e<=u:e>=u)})),a=f.reduce((function(e,n){return Math.abs(u-n)<Math.abs(u-e)?n:e}),1/0)):(a=l.position,e=l.panel),this._triggerIndexChangeEvent(e,e.position,o),[2,this._animateToPosition({position:a,duration:t,newActivePanel:e,axesEvent:o})])}))}))},t.setActive=function(n,t,i){var r,o=z(this._flicking);this._activePanel=n,o.camera.updateAdaptiveHeight(),n!==t?o.trigger(new e.ComponentEvent(I.CHANGED,{index:n.index,panel:n,prevIndex:null!==(r=null==t?void 0:t.index)&&void 0!==r?r:-1,prevPanel:t,isTrusted:i,direction:t?B(t.position,n.position):A.NONE})):o.trigger(new e.ComponentEvent(I.RESTORED,{isTrusted:i}))},t._triggerIndexChangeEvent=function(n,t,i){var r,o=z(this._flicking),a=n!==this._activePanel?I.WILL_CHANGE:I.WILL_RESTORE,s=o.camera,l=this._activePanel,u=new e.ComponentEvent(a,{index:n.index,panel:n,isTrusted:(null==i?void 0:i.isTrusted)||!1,direction:B(null!==(r=null==l?void 0:l.position)&&void 0!==r?r:s.position,t)});if(o.trigger(u),u.isCanceled())throw new oe(E,h.STOP_CALLED_BY_USER)},t._animateToPosition=function(e){var n=e.position,t=e.duration,i=e.newActivePanel,r=e.axesEvent;return a(this,void 0,void 0,(function(){var e,o,l=this;return s(this,(function(u){return e=z(this._flicking),o=function(){return l._controller.animateTo(n,t,r)},this._controller.state.targetPanel=i,t<=0?[2,o()]:[2,o().then((function(){return a(l,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,e.renderer.render()];case 1:return n.sent(),[2]}}))}))})).catch((function(e){if(!(r&&e instanceof oe&&e.code===h.ANIMATION_INTERRUPTED))throw e}))]}))}))},n}(),ye=function(){function e(e){var n=e.index,t=e.position,i=e.panel;this._index=n,this._pos=t,this._panel=i}var n=e.prototype;return Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panel",{get:function(){return this._panel},enumerable:!1,configurable:!0}),e}(),xe=function(e){function n(n){var t=(void 0===n?{}:n).count,i=void 0===t?1/0:t,r=e.call(this)||this;return r._count=i,r}r(n,e);var t=n.prototype;return Object.defineProperty(t,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),t.moveToPosition=function(e,n,t){return a(this,void 0,void 0,(function(){var i,r,o,a,l,u,c,f,d,g;return s(this,(function(s){return i=z(this._flicking),r=i.camera,o=r.findActiveAnchor(),a=r.findNearestAnchor(r.position),l=i.control.controller.state,o&&a?(u=this._calcSnapThreshold(e,o),c=i.animating?l.delta:e-r.position,f=Math.abs(c),d=t&&0!==t.delta.flick?Math.abs(t.delta.flick):f,g=d>=u&&d>0?this._findSnappedAnchor(e,a):f>=i.threshold&&f>0?this._findAdjacentAnchor(c,a):a,this._triggerIndexChangeEvent(g.panel,e,t),[2,this._animateToPosition({position:r.clampToReachablePosition(g.position),duration:n,newActivePanel:g.panel,axesEvent:t})]):[2,Promise.reject(new oe(b(e),h.POSITION_NOT_REACHABLE))]}))}))},t._findSnappedAnchor=function(e,n){var t=z(this._flicking),i=t.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!n||!s)throw new oe(b(e),h.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var l=t.panelCount,u=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&s.index<n.index||s.position>n.position&&s.index===n.index?c+=1:(e<o&&s.index>n.index||s.position<n.position&&s.index===n.index)&&(c-=1);var f=c*l,d=s.index+f;if(Math.abs(d-n.index)<=r){var g=u[s.index];return new ye({index:g.index,position:g.position+c*i.rangeDiff,panel:g.panel})}if(t.circularEnabled){var p=u[ne(n.index+Math.sign(e-o)*r,l)],_=Math.floor(r/l);return e>o&&p.index<n.index?_+=1:e<o&&p.index>n.index&&(_-=1),new ye({index:p.index,position:p.position+_*i.rangeDiff,panel:p.panel})}return u[D(n.index+Math.sign(e-o)*r,0,u.length-1)]},t._findAdjacentAnchor=function(e,n){var t,i=z(this._flicking).camera;return null!==(t=e>0?i.getNextAnchor(n):i.getPrevAnchor(n))&&void 0!==t?t:n},t._calcSnapThreshold=function(e,n){var t=e>n.position,i=n.panel,r=i.size,o=i.alignPosition;return t?r-o+i.margin.next:o+i.margin.prev},n}(Ee),Oe=function(e){function n(n){var t=(void 0===n?{}:n).stopAtEdge,i=void 0===t||t,r=e.call(this)||this;return r._stopAtEdge=i,r}r(n,e);var t=n.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 n=z(this._flicking).camera,t=this._activePanel;if(t){var i=t.range,r=i.min+(i.max-i.min)*e;n.lookAt(n.clampToReachablePosition(r))}},t.moveToPosition=function(e,n,t){return a(this,void 0,void 0,(function(){var i,r,o,a,l;return s(this,(function(s){return i=z(this._flicking),r=i.camera,o=r.clampToReachablePosition(e),(a=r.findAnchorIncludePosition(o))?((l=a.panel)!==this._activePanel&&this._triggerIndexChangeEvent(l,e,t),[2,this._animateToPosition({position:this._stopAtEdge?o:e,duration:n,newActivePanel:l,axesEvent:t})]):[2,Promise.reject(new oe(b(e),h.POSITION_NOT_REACHABLE))]}))}))},n}(Ee),Te=function(e){function n(n){var t=(void 0===n?{}:n).count,i=void 0===t?1:t,r=e.call(this)||this;return r.setActive=function(n,t,i){e.prototype.setActive.call(r,n,t,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}r(n,e);var t=n.prototype;return Object.defineProperty(t,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),t.destroy=function(){e.prototype.destroy.call(this),this._resetIndexRange()},t.updateInput=function(){var e,n=z(this._flicking),t=n.camera,i=n.renderer,r=this._controller,o=t.controlParams,a=this._count,s=r.state.animating?null===(e=t.findNearestAnchor(t.position))||void 0===e?void 0:e.panel:this._activePanel;if(!s)return r.update(o),this._resetIndexRange(),this;var l=o.range,u=s.position,c=s.index,f=i.panelCount,h=c-a,d=c+a;h<0&&(h=n.circularEnabled?X((h+1)%f-1,f):D(h,0,f-1)),d>=f&&(d=n.circularEnabled?d%f:D(d,0,f-1));var g=i.panels[h],p=i.panels[d],_=Math.max(g.position,l.min),v=Math.min(p.position,l.max);return _>u&&(_-=t.rangeDiff),v<u&&(v+=t.rangeDiff),o.range={min:_,max:v},o.circular&&(o.position<_&&(o.position+=t.rangeDiff),o.position>v&&(o.position-=t.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:g.index,max:p.index},this},t.moveToPosition=function(e,n,t){return a(this,void 0,void 0,(function(){var i,r,o,a,l,u,c,f,d,g,p,_,v,m,P,E,y,x,O;return s(this,(function(s){return i=z(this._flicking),r=i.camera,o=this._activePanel,a=this._controller.range,l=this._indexRange,u=r.range,c=D(r.clampToReachablePosition(e),a[0],a[1]),(f=r.findAnchorIncludePosition(c))&&o?(d=o.position,g=Math.abs(e-d)>=i.threshold,p=e>d?r.getNextAnchor(f):r.getPrevAnchor(f),m=r.anchorPoints,P=m[0],E=m[m.length-1],y=e<=u.min&&ee(P.panel.index,l.min,l.max),x=e>=u.max&&ee(E.panel.index,l.min,l.max),y||x?(O=e<u.min?P:E,v=O.panel,_=O.position):g&&f.position!==o.position?(v=f.panel,_=f.position):g&&p&&ee(p.index,l.min,l.max)?(v=p.panel,_=p.position):(_=r.clampToReachablePosition(o.position),v=o),this._triggerIndexChangeEvent(v,e,t),[2,this._animateToPosition({position:_,duration:n,newActivePanel:v,axesEvent:t})]):[2,Promise.reject(new oe(b(e),h.POSITION_NOT_REACHABLE))]}))}))},t._resetIndexRange=function(){this._indexRange={min:0,max:0}},n}(Ee),Ie={__proto__:null,Control:Ee,SnapControl:xe,FreeControl:Oe,StrictControl:Te,AxesController:Pe,State:de,IdleState:ge,HoldingState:pe,DraggingState:_e,AnimatingState:ve,DisabledState:me,StateMachine:be},Re=function(){function n(e){var n=this,t=(void 0===e?{}:e).align,i=void 0===t?R.CENTER:t;this._checkTranslateSupport=function(){var e,t,i=document.documentElement.style,r="";try{for(var o=l(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),a=o.next();!a.done;a=o.next()){var s=a.value;s in i&&(r=s)}}catch(n){e={error:n}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}if(!r)throw new oe(P,h.TRANSFORM_NOT_SUPPORTED);n._transform=r},this._flicking=null,this._resetInternalValues(),this._align=i}var t=n.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"children",{get:function(){return L(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},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:!1}},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,n=this._position+this._offset,t=this.findNearestAnchor(this._position);if(!e||!t)return NaN;var i=t.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,s=a.min,l=a.max,u=this.rangeDiff;if(n===r)return i.index;if(n<r){var c=i.prev(),f=c?c.position+c.offset:s-o[0];return f>r&&(f-=u),i.index-1+J(n,f,r)}var h=i.next(),d=h?h.position+h.offset:l+o[1];return d<r&&(d+=u),i.index+J(n,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 n=e.viewport.element;return S(n.firstElementChild,"First element child of the viewport element"),this._el=n.firstElementChild,this._checkTranslateSupport(),this},t.destroy=function(){return this._flicking=null,this._resetInternalValues(),this},t.lookAt=function(e){var n=this._position;this._position=e,this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(n,e),this.applyTransform()},t.getPrevAnchor=function(e){return this._anchors[e.index-1]||null},t.getNextAnchor=function(e){return this._anchors[e.index+1]||null},t.getProgressInPanel=function(e){var n=e.range;return(this._position-n.min)/(n.max-n.min)},t.findAnchorIncludePosition=function(e){return this._anchors.filter((function(n){return n.panel.includePosition(e,!0)})).reduce((function(n,t){return n&&Math.abs(n.position-e)<Math.abs(t.position-e)?n:t}),null)},t.findNearestAnchor=function(e){var n=this._anchors;if(n.length<=0)return null;for(var t=1/0,i=0;i<n.length;i++){var r=n[i],o=Math.abs(r.position-e);if(o>t)return n[i-1];t=o}return n[n.length-1]},t.findActiveAnchor=function(){var e=z(this._flicking).control.activeIndex;return Z(this._anchors,(function(n){return n.panel.index===e}))},t.clampToReachablePosition=function(e){var n=this._range;return D(e,n.min,n.max)},t.canReach=function(e){var n=this._range;if(e.removed)return!1;var t=e.position;return t>=n.min&&t<=n.max},t.canSee=function(e){var n=this.visibleRange;return e.isVisibleOnRange(n.min,n.max)},t.updateAlignPos=function(){var e=this._align,n="object"==typeof e?e.camera:e;return this._alignPos=M(n,this.size),this},t.updateAnchors=function(){var e=z(this._flicking).renderer.panels;return this._anchors=e.map((function(e,n){return new ye({index:n,position:e.position,panel:e})})),this},t.updateAdaptiveHeight=function(){var e=z(this._flicking),n=e.control.activePanel;e.horizontal&&e.adaptive&&n&&e.viewport.setSize({height:n.height})},t.updateOffset=function(){var e=z(this._flicking),n=this._position,t=e.panels.filter((function(e){return!e.rendered}));return this._offset=t.filter((function(e){return e.position+e.offset<n})).reduce((function(e,n){return e+n.sizeIncludingMargin}),0),this.applyTransform(),this},t.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},t.applyTransform=function(){var e=this._el,n=z(this._flicking),t=this._position-this._alignPos-this._offset;return e.style[this._transform]=n.horizontal?"translate("+-t+"px)":"translate(0, "+-t+"px)",this},t._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}},t._refreshVisiblePanels=function(){var n=this,t=z(this._flicking),i=t.renderer.panels.filter((function(e){return n.canSee(e)})),r=this._visiblePanels;this._visiblePanels=i;var o=i.filter((function(e){return!U(r,e)})),a=r.filter((function(e){return!U(i,e)}));(o.length>0||a.length>0)&&t.renderer.render().then((function(){t.trigger(new e.ComponentEvent(I.VISIBLE_CHANGE,{added:o,removed:a,visiblePanels:i}))}))},t._checkNeedPanel=function(){var n=this._needPanelTriggered;if(!n.prev||!n.next){var t=z(this._flicking),i=t.renderer.panels;if(i.length<=0)return n.prev||(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:A.PREV})),n.prev=!0),void(n.next||(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:A.NEXT})),n.next=!0));var r=this._position,o=this.size,a=this._range,s=t.needPanelThreshold,l=r-this._alignPos,u=l+o,c=i[0],f=i[i.length-1];if(!n.prev)(l<=c.range.min+s||r<=a.min+s)&&(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:A.PREV})),n.prev=!0);if(!n.next)(u>=f.range.max-s||r>=a.max-s)&&(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:A.NEXT})),n.next=!0)}},t._checkReachEnd=function(n,t){var i=z(this._flicking),r=this._range,o=n>r.min&&n<r.max,a=t>r.min&&t<r.max;if(o&&!a){var s=t<=r.min?A.PREV:A.NEXT;i.trigger(new e.ComponentEvent(I.REACH_EDGE,{direction:s}))}},n}(),Ae=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r(n,e),n.prototype.updateRange=function(){var e,n,t=z(this._flicking).renderer,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);return this._range={min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(n=null==r?void 0:r.position)&&void 0!==n?n:0},this},n}(Re),we=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n._circularOffset=0,n._circularEnabled=!1,n}r(n,e);var t=n.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(n){if(!this._circularEnabled||0!==n.index)return e.prototype.getPrevAnchor.call(this,n);var t=this._anchors,i=this.rangeDiff,r=t[t.length-1];return new ye({index:r.index,position:r.position-i,panel:r.panel})},t.getNextAnchor=function(n){var t=this._anchors;if(!this._circularEnabled||n.index!==t.length-1)return e.prototype.getNextAnchor.call(this,n);var i=this.rangeDiff,r=t[0];return new ye({index:r.index,position:r.position+i,panel:r.panel})},t.findAnchorIncludePosition=function(n){if(!this._circularEnabled)return e.prototype.findAnchorIncludePosition.call(this,n);var t=this._range,i=this._anchors,r=this.rangeDiff,o=i.length,a=K(n,t.min,t.max),s=e.prototype.findAnchorIncludePosition.call(this,a);if(o>0&&(n===t.min||n===t.max)){var l=[s,new ye({index:0,position:i[0].position+r,panel:i[0].panel}),new ye({index:o-1,position:i[o-1].position-r,panel:i[o-1].panel})].filter((function(e){return!!e}));s=l.reduce((function(e,t){return e&&Math.abs(e.position-n)<Math.abs(t.position-n)?e:t}),null)}if(!s)return null;if(n<t.min){var u=-Math.floor((t.min-n)/r)-1;return new ye({index:s.index,position:s.position+r*u,panel:s.panel})}if(n>t.max){u=Math.floor((n-t.max)/r)+1;return new ye({index:s.index,position:s.position+r*u,panel:s.panel})}return s},t.clampToReachablePosition=function(n){return this._circularEnabled?n:e.prototype.clampToReachablePosition.call(this,n)},t.canReach=function(n){return!n.removed&&(!!this._circularEnabled||e.prototype.canReach.call(this,n))},t.canSee=function(n){var t=this._range,i=this.rangeDiff,r=this.visibleRange,o=e.prototype.canSee.call(this,n);return this._circularEnabled?r.min<t.min?o||n.isVisibleOnRange(r.min+i,r.max+i):r.max>t.max?o||n.isVisibleOnRange(r.min-i,r.max-i):o:o},t.updateRange=function(){var e=z(this._flicking).renderer.panels;if(e.length<=0)return this._resetInternalValues(),this;var n=e[0],t=e[e.length-1],i=n.range.min-n.margin.prev,r=t.range.max+t.margin.next,o=this.size,a=r-i,s=e.every((function(e){return a-e.size>=o}));return this._circularEnabled=s,s?(this._range={min:i,max:r},e.forEach((function(e){return e.updateCircularToggleDirection()}))):this._range={min:n.position,max:t.position},this.updateOffset(),this},t.updateOffset=function(){return this._updateCircularOffset(),e.prototype.updateOffset.call(this)},t.lookAt=function(n){var t=this,i=z(this._flicking),r=this._position;if(n===r)return e.prototype.lookAt.call(this,n);var o=i.renderer.panels.map((function(e){return e.toggle(r,n)}));this._position=n,e.prototype.lookAt.call(this,n),o.some((function(e){return e}))&&i.renderer.render().then((function(){t.updateOffset()}))},t.applyTransform=function(){var e=this._el,n=z(this._flicking),t=this._position-this._alignPos-this._offset+this._circularOffset;return e.style[this._transform]=n.horizontal?"translate("+-t+"px)":"translate(0, "+-t+"px)",this},t._resetInternalValues=function(){e.prototype._resetInternalValues.call(this),this._circularOffset=0,this._circularEnabled=!1},t._calcPanelAreaSum=function(e){return e.reduce((function(e,n){return e+n.sizeIncludingMargin}),0)},t._updateCircularOffset=function(){if(this._circularEnabled){var e=z(this._flicking).panels.filter((function(e){return e.toggled})),n=e.filter((function(e){return e.toggleDirection===A.PREV})),t=e.filter((function(e){return e.toggleDirection===A.NEXT}));this._circularOffset=this._calcPanelAreaSum(n)-this._calcPanelAreaSum(t)}else this._circularOffset=0},n}(Re),Ne=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}r(n,e);var t=n.prototype;return t.updateRange=function(){var e=z(this._flicking).renderer,n=this._alignPos,t=e.getPanel(0),i=e.getPanel(e.panelCount-1);if(!t||!i)return this._range={min:0,max:0},this;var r=this.size,o=t.range.min,a=i.range.max,s=o+n,l=a-r+n;if(r<a-o)this._range={min:s,max:l};else{var u=this._align,c="object"==typeof u?u.camera:u,f=s+M(c,l-s);this._range={min:f,max:f}}return this},t.updateAnchors=function(){var e=this,n=z(this._flicking).renderer.panels;if(n.length<=0)return this._anchors=[],this;var t=this._range,i=n.filter((function(n){return e.canReach(n)}));if(i.length>0){var r=i[0].position!==t.min,o=i[i.length-1].position!==t.max,a=r?1:0,s=i.map((function(e,n){return new ye({index:n+a,position:e.position,panel:e})}));r&&s.splice(0,0,new ye({index:0,position:t.min,panel:n[i[0].index-1]})),o&&s.push(new ye({index:s.length,position:t.max,panel:n[i[i.length-1].index+1]})),this._anchors=s}else if(t.min!==t.max){var l=this._findNearestPanel(t.min,n),u=l.index===n.length-1?l.prev():l,c=u.next();this._anchors=[new ye({index:0,position:t.min,panel:u}),new ye({index:1,position:t.max,panel:c})]}else this._anchors=[new ye({index:0,position:t.min,panel:this._findNearestPanel(t.min,n)})];return this},t.findAnchorIncludePosition=function(n){var t=this._range,i=this._anchors;return i.length<=0?null:n<=t.min?i[0]:n>=t.max?i[i.length-1]:e.prototype.findAnchorIncludePosition.call(this,n)},t._findNearestPanel=function(e,n){for(var t=1/0,i=0;i<n.length;i++){var r=n[i],o=Math.abs(r.position-e);if(o>t)return n[i-1];t=o}return n[n.length-1]},n}(Re),Ce={__proto__:null,Camera:Re,LinearCamera:Ae,CircularCamera:we,BoundCamera:Ne},ke=function(){function n(e){var n=e.align,t=void 0===n?R.CENTER:n,i=e.strategy;this._flicking=null,this._panels=[],this._align=t,this._strategy=i}var i=n.prototype;return Object.defineProperty(i,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty(i,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty(i,"strategy",{get:function(){return this._strategy},enumerable:!1,configurable:!0}),Object.defineProperty(i,"align",{get:function(){return this._align},set:function(e){this._align=e;var n=G(e);this._panels.forEach((function(e){e.align=n}))},enumerable:!1,configurable:!0}),i.init=function(e){return this._flicking=e,this._collectPanels(),this},i.destroy=function(){this._flicking=null,this._panels=[]},i.getPanel=function(e){return this._panels[e]||null},i.forceRenderAllPanels=function(){return this._panels.forEach((function(e){return e.markForShow()})),Promise.resolve()},i.updatePanelSize=function(){var e=z(this._flicking),n=this._panels;if(n.length<=0)return this;if(e.panelsPerView>0){var t=n[0];t.resize(),this._updatePanelSizeByGrid(t,n)}else e.panels.forEach((function(e){return e.resize()}));return this},i.batchInsert=function(){for(var n=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var r=this._panels,o=z(this._flicking),a=o.control,s=r[0],l=G(this._align),f=t.reduce((function(e,t){var i,a=X(t.index,r.length),f=r.slice(a),h=t.elements.map((function(e,t){return n._createPanel(e,{index:a+t,align:l,flicking:o})}));if(r.splice.apply(r,c([a,0],u(h))),t.hasDOMInElements&&n._insertPanelElements(h,null!==(i=f[0])&&void 0!==i?i:null),o.panelsPerView>0){var d=s||h[0].resize();n._updatePanelSizeByGrid(d,h)}else h.forEach((function(e){return e.resize()}));return f.forEach((function(e){e.increaseIndex(h.length),e.updatePosition()})),c(c([],u(e)),u(h))}),[]);return f.length<=0?[]:(this._updateCameraAndControl(),this.render(),f.length>0&&!a.animating&&a.moveToPanel(a.activePanel||f[0],{duration:0}).catch((function(){})),o.camera.updateOffset(),o.trigger(new e.ComponentEvent(I.PANEL_CHANGE,{added:f,removed:[]})),this.checkPanelContentsReady(f),f)},i.batchRemove=function(){for(var n=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var r=this._panels,o=z(this._flicking),a=o.camera,s=o.control,l=s.activePanel,f=s.activeIndex,h=t.reduce((function(e,t){var i=t.index,o=t.deleteCount,a=X(i,r.length),f=r.slice(a+o),h=r.splice(a,o);return h.length<=0?[]:(f.forEach((function(e){e.decreaseIndex(h.length),e.updatePosition()})),t.hasDOMInElements&&n._removePanelElements(h),h.forEach((function(e){return e.destroy()})),U(h,l)&&s.resetActive(),c(c([],u(e)),u(h)))}),[]);if(this._updateCameraAndControl(),this.render(),h.length>0&&!s.animating){var d=U(h,l)?r[f]||r[r.length-1]:l;d?s.moveToPanel(d,{duration:0}).catch((function(){})):a.lookAt(0)}return o.camera.updateOffset(),o.trigger(new e.ComponentEvent(I.PANEL_CHANGE,{added:[],removed:h})),h},i.checkPanelContentsReady=function(e){var n=this,i=z(this._flicking),r=i.resizeOnContentsReady,o=this._panels;if(r&&!i.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return!!e.element.querySelector("img, video")}(e)}))).length<=0)){var a=new t;e.forEach((function(e){e.loading=!0})),a.on("readyElement",(function(t){if(n._flicking){var r=e[t.index],s=i.camera,l=i.control,u=l.activePanel?s.getProgressInPanel(l.activePanel):0;r.loading=!1,r.resize(),o.slice(r.index+1).forEach((function(e){return e.updatePosition()})),i.initialized&&(s.updateRange(),s.updateAnchors(),l.animating||(l.updatePosition(u),l.updateInput()))}else a.destroy()})),a.on("preReady",(function(e){n._flicking&&n.render(),e.readyCount===e.totalCount&&a.destroy()})),a.on("ready",(function(){n._flicking&&n.render(),a.destroy()})),a.check(e.map((function(e){return e.element})))}}},i._updateCameraAndControl=function(){var e=z(this._flicking),n=e.camera,t=e.control;n.updateRange(),n.updateAnchors(),n.resetNeedPanelHistory(),t.updateInput()},i._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in t||n.loading?n.markForShow():e.holding||n.markForHide()}))},i._updatePanelSizeByGrid=function(e,n){var t=z(this._flicking),i=t.panelsPerView;if(i<=0)throw new oe(v("panelsPerView",i),h.WRONG_OPTION);if(!(n.length<=0)){var r=(t.camera.size-(e.margin.prev+e.margin.next)*(i-1))/i,o=t.horizontal?{width:r}:{height:r},a={size:r,height:e.height,margin:e.margin};t.noPanelStyleOverride||this._strategy.updatePanelSizes(t,o),t.panels.forEach((function(e){return e.resize(a)}))}},i._removeAllChildsFromCamera=function(){for(var e=z(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},i._insertPanelElements=function(e,n){void 0===n&&(n=null);var t=z(this._flicking).camera.element,i=(null==n?void 0:n.element)||null,r=document.createDocumentFragment();e.forEach((function(e){return r.appendChild(e.element)})),t.insertBefore(r,i)},i._removePanelElements=function(e){var n=z(this._flicking).camera.element;e.forEach((function(e){n.removeChild(e.element)}))},n}(),je=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}r(n,e);var t=n.prototype;return t.render=function(){return a(this,void 0,void 0,(function(){var e,n;return s(this,(function(t){return e=z(this._flicking),(n=this._strategy).updateRenderingPanels(e),n.renderPanels(e),this._resetPanelElementOrder(),[2]}))}))},t._collectPanels=function(){var e=z(this._flicking),n=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,n.children)},t._createPanel=function(e,n){return this._strategy.createPanel(e,n)},t._resetPanelElementOrder=function(){var e=z(this._flicking),n=e.camera.element,t=this._strategy.getRenderingElementsByOrder(e).reverse();t.forEach((function(e,i){var r=t[i-1]?t[i-1]:null;e.nextElementSibling!==r&&n.insertBefore(e,r)}))},t._removeAllTextNodes=function(){var e=z(this._flicking).camera.element;L(e.childNodes).forEach((function(n){n.nodeType===Node.TEXT_NODE&&e.removeChild(n)}))},n}(ke),Se=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}r(n,e);var t=n.prototype;return t._removePanelElements=function(e){},t._removeAllChildsFromCamera=function(){},n}(ke),De=function(){function e(e){var n=e.index,t=e.align,i=e.flicking,r=e.elementProvider;this._index=n,this._flicking=i,this._elProvider=r,this._align=t,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(n,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(n,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(n,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){var e=this._toggleDirection,n=this._flicking.camera.rangeDiff;return e!==A.NONE&&this._toggled?e===A.PREV?-n:n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(n,"outsetProgress",{get:function(){var e=this.position+this.offset,n=this._alignPos,t=this._flicking.camera,i=t.position;if(i===e)return 0;if(i<e){var r=e+(t.size-t.alignPosition)+n;return-J(i,e,r)}var o=e-(t.alignPosition+this._size-n);return 1-J(i,o,e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visibleRatio",{get:function(){var e=this.range,n=this._size,t=this.offset,i=this._flicking.camera.visibleRange,r=e.min+t,o=e.max+t;if(o<=i.min||r>=i.max)return 0;var a=n;return i.min>r&&(a-=i.min-r),i.max<o&&(a-=o-i.max),a/n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),n.markForShow=function(){this._rendered=!0,this._elProvider.show(this._flicking)},n.markForHide=function(){this._rendered=!1,this._elProvider.hide(this._flicking)},n.resize=function(e){var n=this.element,t=this._flicking.horizontal;if(e)this._size=e.size,this._margin=o({},e.margin),this._height=e.height;else{var i=Q(n);this._size=t?n.offsetWidth:n.offsetHeight,this._margin=t?{prev:parseFloat(i.marginLeft||"0"),next:parseFloat(i.marginRight||"0")}:{prev:parseFloat(i.marginTop||"0"),next:parseFloat(i.marginBottom||"0")},this._height=t?n.offsetHeight:this._size}return this.updatePosition(),this._updateAlignPos(),this},n.setSize=function(e){return $(this.element,e),this},n.contains=function(e){var n;return!!(null===(n=this.element)||void 0===n?void 0:n.contains(e))},n.destroy=function(){this._resetInternalStates(),this._removed=!0},n.includePosition=function(e,n){return void 0===n&&(n=!1),this.includeRange(e,e,n)},n.includeRange=function(e,n,t){void 0===t&&(t=!1);var i=this._margin,r=this.range;return t&&(r.min-=i.prev,r.max+=i.next),n>=r.min&&e<=r.max},n.isVisibleOnRange=function(e,n){var t=this.range;return n>t.min&&e<t.max},n.focus=function(e){return this._flicking.moveTo(this._index,e)},n.prev=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(0===e?i-1:e-1):t.getPanel(e-1)},n.next=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(e===i-1?0:e+1):t.getPanel(e+1)},n.increaseIndex=function(e){return this._index+=Math.max(e,0),this},n.decreaseIndex=function(e){return this._index-=Math.max(e,0),this},n.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},n.toggle=function(e,n){var t=this._toggleDirection,i=this._togglePosition;if(t===A.NONE||n===e)return!1;var r=this._toggled;return n>e?i>=e&&i<=n&&(this._toggled=t===A.NEXT):i<=e&&i>=n&&(this._toggled=t!==A.NEXT),r!==this._toggled},n.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=A.NONE,this._toggled=!1,this;var n=e.camera,t=n.range,i=n.alignPosition,r=n.visibleRange,o=r.max-r.min,a=t.min-i,s=t.max-i+o,l=this.includeRange(s-o,s,!1),u=this.includeRange(a,a+o,!1);return this._toggled=!1,l?(this._toggleDirection=A.PREV,this._togglePosition=this.range.max+t.min-t.max+i,this.toggle(1/0,n.position)):u?(this._toggleDirection=A.NEXT,this._togglePosition=this.range.min+t.max-o+i,this.toggle(-1/0,n.position)):(this._toggleDirection=A.NONE,this._togglePosition=0),this},n._updateAlignPos=function(){this._alignPos=M(this._align,this._size)},n._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=A.NONE},e}(),ze=function(){function e(e){var n=e.providerCtor;this._providerCtor=n}var n=e.prototype;return n.renderPanels=function(){},n.getRenderingIndexesByOrder=function(e){var n=e.renderer.panels.filter((function(e){return e.rendered})),t=n.filter((function(e){return e.toggled&&e.toggleDirection===A.PREV})),i=n.filter((function(e){return e.toggled&&e.toggleDirection===A.NEXT})),r=n.filter((function(e){return!e.toggled}));return c(c(c([],u(t)),u(r)),u(i)).map((function(e){return e.index}))},n.getRenderingElementsByOrder=function(e){var n=e.panels;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].element}))},n.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach((function(e){return e.markForShow()}))},n.collectPanels=function(e,n){var t=this,i=G(e.renderer.align);return n.map((function(n,r){return new De({index:r,elementProvider:new t._providerCtor(n),align:i,flicking:e})}))},n.createPanel=function(e,n){return new De(o(o({},n),{elementProvider:new this._providerCtor(e)}))},n.updatePanelSizes=function(e,n){e.panels.forEach((function(e){return e.setSize(n)}))},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in i||n.loading?n.markForShow():e.holding||n.markForHide()})),t.updateOffset()},e}(),Le=function(e){function n(n){var t=e.call(this,n)||this;return n.elementProvider.init(t),t._elProvider=n.elementProvider,t._cachedInnerHTML=null,t}r(n,e);var t=n.prototype;return Object.defineProperty(t,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cachedInnerHTML",{get:function(){return this._cachedInnerHTML},enumerable:!1,configurable:!0}),Object.defineProperty(t,"elementIndex",{get:function(){var e=this._flicking,n=e.panelsPerView+1,t=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===A.NEXT?i+t:i-t),ne(i,n)},enumerable:!1,configurable:!0}),t.cacheRenderResult=function(e){this._cachedInnerHTML=e},t.uncacheRenderResult=function(){this._cachedInnerHTML=null},t.render=function(){var e=this._flicking.virtual,n=e.renderPanel,t=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||n(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,t&&this.cacheRenderResult(r))},t.increaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,n)},t.decreaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,n)},n}(De),Me=function(){function e(){}var n=e.prototype;return n.renderPanels=function(e){var n=e.virtual,t=e.visiblePanels,i=te(e.panelsPerView+1);t.forEach((function(e){var t=e.elementIndex;e.render(),n.show(t),i[t]=-1})),i.filter((function(e){return e>=0})).forEach((function(e){n.hide(e)}))},n.getRenderingIndexesByOrder=function(e){var n=e.virtual,t=c([],u(e.visiblePanels)).filter((function(e){return e.rendered})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)}));if(t.length<=0)return n.elements.map((function(e,n){return n}));var i=t.map((function(e){return e.elementIndex})),r=n.elements.map((function(e,n){return o(o({},e),{idx:n})})).filter((function(e){return!e.visible})).map((function(e){return e.idx}));return c(c([],u(i)),u(r))},n.getRenderingElementsByOrder=function(e){var n=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].nativeElement}))},n.updateRenderingPanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(e){e.index in i||e.loading?e.markForShow():e.markForHide()})),t.updateOffset()},n.collectPanels=function(e){var n=G(e.renderer.align);return te(e.virtual.initialPanelCount).map((function(t){return new Le({index:t,elementProvider:new ue(e),align:n,flicking:e})}))},n.createPanel=function(e,n){return new Le(o(o({},n),{elementProvider:new ue(n.flicking)}))},n.updatePanelSizes=function(e,n){e.virtual.elements.forEach((function(e){$(e.nativeElement,n)})),e.panels.forEach((function(e){return e.setSize(n)}))},e}(),Ve={__proto__:null,Renderer:ke,VanillaRenderer:je,ExternalRenderer:Se,NormalRenderingStrategy:ze,VirtualRenderingStrategy:Me},He=function(n){function t(e,t){var i=void 0===t?{}:t,r=i.align,o=void 0===r?R.CENTER:r,a=i.defaultIndex,s=void 0===a?0:a,l=i.horizontal,u=void 0===l||l,c=i.circular,f=void 0!==c&&c,h=i.bound,d=void 0!==h&&h,g=i.adaptive,p=void 0!==g&&g,_=i.panelsPerView,v=void 0===_?-1:_,m=i.noPanelStyleOverride,b=void 0!==m&&m,P=i.resizeOnContentsReady,E=void 0!==P&&P,y=i.needPanelThreshold,x=void 0===y?0:y,O=i.preventEventsBeforeInit,T=void 0===O||O,I=i.deceleration,A=void 0===I?.0075:I,w=i.duration,N=void 0===w?500:w,C=i.easing,k=void 0===C?function(e){return 1-Math.pow(1-e,3)}:C,S=i.inputType,D=void 0===S?["mouse","touch"]:S,z=i.moveType,L=void 0===z?"snap":z,M=i.threshold,V=void 0===M?40:M,H=i.interruptable,F=void 0===H||H,G=i.bounce,B=void 0===G?"20%":G,W=i.iOSEdgeSwipeThreshold,X=void 0===W?30:W,U=i.preventClickOnDrag,Y=void 0===U||U,K=i.disableOnInit,Z=void 0!==K&&K,q=i.renderOnlyVisible,J=void 0!==q&&q,Q=i.virtual,$=void 0===Q?null:Q,ee=i.autoInit,ne=void 0===ee||ee,te=i.autoResize,ie=void 0===te||te,re=i.useResizeObserver,oe=void 0===re||re,le=i.externalRenderer,ue=void 0===le?null:le,fe=i.renderExternal,he=void 0===fe?null:fe,de=n.call(this)||this;return de._initialized=!1,de._plugins=[],de._align=o,de._defaultIndex=s,de._horizontal=u,de._circular=f,de._bound=d,de._adaptive=p,de._panelsPerView=v,de._noPanelStyleOverride=b,de._resizeOnContentsReady=E,de._virtual=$,de._needPanelThreshold=x,de._preventEventsBeforeInit=T,de._deceleration=A,de._duration=N,de._easing=k,de._inputType=D,de._moveType=L,de._threshold=V,de._interruptable=F,de._bounce=B,de._iOSEdgeSwipeThreshold=X,de._preventClickOnDrag=Y,de._disableOnInit=Z,de._renderOnlyVisible=J,de._autoInit=ne,de._autoResize=ie,de._useResizeObserver=oe,de._externalRenderer=ue,de._renderExternal=he,de._viewport=new ae(j(e)),de._autoResizer=new se(de),de._renderer=de._createRenderer(),de._camera=de._createCamera(),de._control=de._createControl(),de._virtualManager=new ce(de,$),de._autoInit&&de.init(),de}r(t,n);var i=t.prototype;return Object.defineProperty(i,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(i,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(i,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(i,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(i,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(i,"circularEnabled",{get:function(){return this._camera.controlParams.circular},enumerable:!1,configurable:!0}),Object.defineProperty(i,"virtualEnabled",{get:function(){return this._panelsPerView>0&&null!=this._virtual},enumerable:!1,configurable:!0}),Object.defineProperty(i,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(i,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(i,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(i,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(i,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(i,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(i,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(i,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(i,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(i,"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(i,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"circular",{get:function(){return this._circular},set:function(e){this._circular=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"bound",{get:function(){return this._bound},set:function(e){this._bound=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"easing",{get:function(){return this._easing},set:function(e){this._easing=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){if(e!==this._preventClickOnDrag){var n=this._control.controller;e?n.addPreventClickHandler():n.removePreventClickHandler(),this._preventClickOnDrag=e}},enumerable:!1,configurable:!0}),Object.defineProperty(i,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"virtual",{get:function(){return this._virtualManager},enumerable:!1,configurable:!0}),Object.defineProperty(i,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(i,"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(i,"useResizeObserver",{get:function(){return this._useResizeObserver},set:function(e){this._useResizeObserver=e,this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"externalRenderer",{get:function(){return this._externalRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(i,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),i.init=function(){return a(this,void 0,void 0,(function(){var n,t,i,r,o,a,l=this;return s(this,(function(s){switch(s.label){case 0:return this._initialized?[2]:(n=this._camera,t=this._renderer,i=this._control,r=this._virtualManager,o=this.trigger,a=this._preventEventsBeforeInit,n.init(this),r.init(),t.init(this),i.init(this),a&&(this.trigger=function(){return l}),[4,this.resize()]);case 1:return s.sent(),[4,this._moveToInitialPanel()];case 2:return s.sent(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&i.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),t.checkPanelContentsReady(t.panels),this._plugins.forEach((function(e){return e.init(l)})),this._initialized=!0,a&&(this.trigger=o),this.trigger(new e.ComponentEvent(I.READY)),[2]}}))}))},i.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},i.prev=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.prev())||void 0===t?void 0:t.index)&&void 0!==i?i:-1,e,A.PREV)},i.next=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.next())||void 0===t?void 0:t.index)&&void 0!==i?i:this._renderer.panelCount,e,A.NEXT)},i.moveTo=function(e,n,t){void 0===n&&(n=this._duration),void 0===t&&(t=A.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new oe(x,h.ANIMATION_ALREADY_PLAYING)):this._control.moveToPanel(o,{duration:n,direction:t}):Promise.reject(new oe(m(e,0,r-1),h.INDEX_OUT_OF_RANGE))},i.getPanel=function(e){return this._renderer.getPanel(e)},i.enableInput=function(){return this._control.enable(),this},i.disableInput=function(){return this._control.disable(),this},i.getStatus=function(e){var n,t,i=void 0===e?{}:e,r=i.index,o=void 0===r||r,a=i.position,s=void 0===a||a,l=i.includePanelHTML,u=void 0!==l&&l,c=i.visiblePanelsOnly,f=void 0!==c&&c,h=this._camera,d={panels:(f?this.visiblePanels:this.panels).map((function(e){var n={index:e.index};return u&&(n.html=e.element.outerHTML),n}))};if(o&&(d.index=this.index),s){var g=h.findNearestAnchor(h.position);g&&(d.position={panel:g.panel.index,progressInPanel:h.getProgressInPanel(g.panel)})}if(f){var p=this.visiblePanels;d.visibleOffset=null!==(t=null===(n=p[0])||void 0===n?void 0:n.index)&&void 0!==t?t:0}return d},i.setStatus=function(e){var n;if(!this._initialized)throw new oe(T,h.NOT_INITIALIZED);var t=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,s=this._control;if((null===(n=o[0])||void 0===n?void 0:n.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:W(o.map((function(e){return e.html}))),hasDOMInElements:!0})),t){var l=r?t-r:t;this.moveTo(l,0).catch((function(){}))}if(i&&this._moveType===w.FREE_SCROLL){var u=i.panel,c=i.progressInPanel,f=(l=r?u-r:u,a.panels[l].range),d=f.min+(f.max-f.min)*c;s.moveToPosition(d,0).catch((function(){}))}},i.addPlugins=function(){for(var e,n=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return this._initialized&&t.forEach((function(e){return e.init(n)})),(e=this._plugins).push.apply(e,c([],u(t))),this},i.removePlugins=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.forEach((function(n){var t=q(e._plugins,(function(e){return e===n}));t>=0&&(n.destroy(),e._plugins.splice(t,1))})),this},i.resize=function(){return a(this,void 0,void 0,(function(){var n,t,i,r,o,a,l,u,c,f,h;return s(this,(function(s){switch(s.label){case 0:return n=this._viewport,t=this._renderer,i=this._camera,r=this._control,o=r.activePanel,a=n.width,l=n.height,u=o?i.getProgressInPanel(o):0,this.trigger(new e.ComponentEvent(I.BEFORE_RESIZE,{width:a,height:l,element:n.element})),n.resize(),[4,t.forceRenderAllPanels()];case 1:return s.sent(),t.updatePanelSize(),i.updateAlignPos(),i.updateRange(),i.updateAnchors(),[4,t.render()];case 2:return s.sent(),r.animating||(r.updatePosition(u),r.updateInput()),c=n.width,f=n.height,h=c!==a||f!==l,this.trigger(new e.ComponentEvent(I.AFTER_RESIZE,{width:n.width,height:n.height,prev:{width:a,height:l},sizeChanged:h,element:n.element})),[2]}}))}))},i.append=function(e){return this.insert(this._renderer.panelCount,e)},i.prepend=function(e){return this.insert(0,e)},i.insert=function(e,n){if(this._renderExternal)throw new oe(O,h.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:W(n),hasDOMInElements:!0})},i.remove=function(e,n){if(void 0===n&&(n=1),this._renderExternal)throw new oe(O,h.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!0})},i._createControl=function(){var e,n=this._moveType,t=Object.keys(w).map((function(e){return w[e]})),i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)&&null!==(e=n[1])&&void 0!==e?e:{};if(!U(t,i))throw new oe(v("moveType",JSON.stringify(n)),h.WRONG_OPTION);switch(i){case w.SNAP:return new xe(r);case w.FREE_SCROLL:return new Oe(r);case w.STRICT:return new Te(r)}},i._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 we(e)):this._bound?new Ne(e):new Ae(e)},i._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())},i._createExternalRenderer=function(){var e=this._renderExternal,n=e.renderer,t=e.rendererOptions;return new n(o({align:this._align},t))},i._createVanillaRenderer=function(){var e=this.virtualEnabled;return new je({align:this._align,strategy:e?new Me:new ze({providerCtor:le})})},i._moveToInitialPanel=function(){return a(this,void 0,void 0,(function(){var e,n,t;return s(this,(function(i){return e=this._renderer,n=this._control,(t=e.getPanel(this._defaultIndex)||e.getPanel(0))?(n.setActive(t,null,!1),[2,n.moveToPanel(t,{duration:0})]):[2]}))}))},t.VERSION="4.4.1",t}(e),Fe=function(e,n,t,i,r){e.batchInsert.apply(e,c([],u(n.added.slice(i,r).map((function(e,i){return{index:e,elements:[t[i+n.prevList.length]],hasDOMInElements:!1}})))))},Ge=function(e,n,t){var i=e.panels.slice(n,t);e.batchRemove({index:n,deleteCount:i.length,hasDOMInElements:!1})},Be=function(e){var n="object"==typeof e?e.camera:e;return Xe(n)},We=function(e){var n="object"==typeof e?e.panel:e;return F(Xe(n))},Xe=function(e){if("number"==typeof e)return e+"px";switch(e){case R.CENTER:return"50%";case R.NEXT:return"100%";case R.PREV:return"0%";default:return e}},Ue={__proto__:null,withFlickingMethods:function(n,t){[e.prototype,He.prototype].forEach((function(e){Object.getOwnPropertyNames(e).filter((function(e){return!n[e]&&!e.startsWith("_")&&"constructor"!==e})).forEach((function(i){var r=Object.getOwnPropertyDescriptor(e,i);if(r.value)Object.defineProperty(n,i,{value:function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return(e=r.value).call.apply(e,c([this[t]],u(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,c([this[t]],u(n)))}),Object.defineProperty(n,i,o)}}))}))},sync:function(e,n,t){var i=e.renderer,r=i.panels;if(n.removed.length>0){var o=-1,a=-1;n.removed.forEach((function(e){o<0&&(o=e),a>=0&&e!==a-1?(Ge(i,a,o+1),o=e,a=e):a=e})),Ge(i,a,o+1)}if(n.ordered.forEach((function(e){var n=u(e,2),t=n[0],i=n[1],o=r[t],a=i-t;if(a>0){var s=r.slice(t+1,i+1);o.increaseIndex(a),s.forEach((function(e){return e.decreaseIndex(1)}))}else{s=r.slice(i,t);o.decreaseIndex(-a),s.forEach((function(e){return e.increaseIndex(1)}))}o.resize()})),n.ordered.length>0&&r.sort((function(e,n){return e.index-n.index})),n.added.length>0){var s=-1,l=-1;n.added.forEach((function(e,r){s<0&&(s=r),l>=0&&e!==l+1?(Fe(i,n,t,s,r+1),s=-1,l=-1):l=e})),s>=0&&Fe(i,n,t,s)}},getRenderingPanels:function(e,n){var t=n.removed.reduce((function(e,n){return e[n]=!0,e}),{}),i=n.maintained.reduce((function(e,n){var t=u(n,2),i=t[0],r=t[1];return e[i]=r,e}),{});return c(c([],u(e.panels.filter((function(e){return!t[e.index]})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)})).map((function(e){return n.list[i[e.index]]})))),u(n.added.map((function(e){return n.list[e]}))))},getDefaultCameraTransform:function(e,n,t){void 0===e&&(e=R.CENTER),void 0===n&&(n=!0);var i=Be(e),r=We(e);if(null==r)return"";var o="calc("+i+" - ("+(t||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return n?"translate("+o+")":"translate(0, "+o+")"}};return k(He,{__proto__:null,Viewport:ae,FlickingError:oe,AnchorPoint:ye,VirtualManager:ce,VanillaElementProvider:le,VirtualElementProvider:ue,Panel:De,VirtualPanel:Le}),k(He,Ce),k(He,Ie),k(He,Ve),k(He,C),k(He,Ue),k(He,re),He}));
|
|
10
10
|
//# sourceMappingURL=flicking.min.js.map
|