@egjs/flicking 4.14.2-beta.2 → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/flicking.cjs.js +14 -6
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +14 -6
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +14 -6
- 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 +14 -6
- 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 +1 -1
- package/src/Flicking.ts +4 -0
- package/src/cfc/getRenderingPanels.ts +1 -2
- package/src/renderer/Renderer.ts +7 -4
- package/src/renderer/VanillaRenderer.ts +1 -1
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.15.0
|
|
8
8
|
*/
|
|
9
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("@egjs/component"),require("@egjs/axes"),require("@egjs/imready"),require("@cfcs/core")):"function"==typeof define&&define.amd?define(["@egjs/component","@egjs/axes","@egjs/imready","@cfcs/core"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=n(e.eg.Component,e.eg.Axes,e.eg.ImReady,e.core)}(this,(function(e,n,t,i){"use strict";var r=function(e,n){return r=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])},r(e,n)};function o(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}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var a=function(){return a=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},a.apply(this,arguments)};function s(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 l(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(s){return function(l){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(t=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=n.call(e,a)}catch(e){s=[6,e],i=0}finally{t=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function u(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 c(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 d(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(c(arguments[n]));return e}"function"==typeof SuppressedError&&SuppressedError;var h,f={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},g=function(e,n){return e+"("+typeof e+") is not a "+n.map((function(e){return'"'+e+'"'})).join(" or ")+"."},p=function(e){return'Element with selector "'+e+'" not found.'},_=function(e,n){return n+" should be provided. Given: "+e},v='This module is not attached to the Flicking instance. "init()" should be called first.',m=function(e,n){return'Option "'+e+'" is not in correct format, given: '+n},b=function(e,n,t){return'Index "'+e+'" is out of range: should be between '+n+" and "+t+"."},P=function(e){return'Position "'+e+'" is not reachable.'},E="Browser does not support CSS transform.",O="Event stop() is called by user.",x="Animation is interrupted by user input.",y="Animation is already playing.",T="This behavior is not allowed in the frameworks like React, Vue, or Angular.",R="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"},A={PREV:"prev",CENTER:"center",NEXT:"next"},C={PREV:"PREV",NEXT:"NEXT",NONE:null},S={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},w={VIEWPORT:"flicking-viewport",CAMERA:"flicking-camera",VERTICAL:"vertical",HIDDEN:"flicking-hidden",DEFAULT_VIRTUAL:"flicking-panel"},z={LINEAR:"linear",BOUND:"bound"},N={LTR:"ltr",RTL:"rtl"},k={HORIZONTAL:"horizontal",VERTICAL:"vertical"},D={__proto__:null,EVENTS:I,ALIGN:A,DIRECTION:C,MOVE_TYPE:S,CLASS:w,CIRCULAR_FALLBACK:z,ORDER:N,MOVE_DIRECTION:k,ERROR_CODE:f},j=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},L=function(e,n){var t=null;if(J(e)){var i=(n||document).querySelector(e);if(!i)throw new he(p(e),f.ELEMENT_NOT_FOUND);t=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(t=e);if(!t)throw new he(g(e,["HTMLElement","string"]),f.WRONG_TYPE);return t},M=function(e,n){if(null==e)throw new he(_(e,n),f.VAL_MUST_NOT_NULL)},H=function(e,n,t){return Math.max(Math.min(e,t),n)},F=function(e){if(!e)throw new he(v,f.NOT_ATTACHED_TO_FLICKING);return e},V=function(e){return[].slice.call(e)},G=function(e,n){var t;if(J(e))switch(e){case A.PREV:t=0;break;case A.CENTER:t=.5*n;break;case A.NEXT:t=n;break;default:if(null==(t=W(e,n)))throw new he(m("align",e),f.WRONG_OPTION)}else t=e;return t},B=function(e,n){var t;if(Array.isArray(e))t=e.map((function(e){return W(e,n)}));else{var i=W(e,n);t=[i,i]}return t.map((function(n){if(null==n)throw new he(m("bounce",e),f.WRONG_OPTION);return n}))},W=function(e,n){var t=U(e);return null==t?null:t.percentage*n+t.absolute},U=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},X=function(e){return"object"==typeof e?e.panel:e},Y=function(e,n){return e===n?C.NONE:e<n?C.NEXT:C.PREV},Z=function(e){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){if(J(e)){var t=document.createElement("div");for(t.innerHTML=e,n.push.apply(n,d(V(t.children)));t.firstChild;)t.removeChild(t.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new he(g(e,["HTMLElement","string"]),f.WRONG_TYPE);n.push(e)}})),n},q=function(e,n){return H(e<0?e+n:e,0,n)},K=function(e,n){var t,i;try{for(var r=u(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},J=function(e){return"string"==typeof e},Q=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},$=function(e,n){var t,i;try{for(var r=u(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},ee=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1},ne=function(e,n,t){return(e-n)/(t-n)},te=function(e){return e?window.getComputedStyle(e)||e.currentStyle:{}},ie=function(e,n){var t=n.width,i=n.height;e&&(null!=t&&(J(t)?e.style.width=t:e.style.width=t+"px"),null!=i&&(J(i)?e.style.height=i:e.style.height=i+"px"))},re=function(e,n,t){return e>=n&&e<=t},oe=function(e,n){return e>=n?e%n:e<0?q((e+1)%n-1,n):e},ae=function(e){for(var n=new Array(e),t=0;t<e;t++)n[t]=t;return n},se=function(e){var n=e.el,t=e.horizontal,i=e.useFractionalSize,r=e.useOffset,o=e.style,a=0;if(i){var s=parseFloat(t?o.width:o.height)||0,l="border-box"===o.boxSizing,u=t?parseFloat(o.borderLeftWidth||"0")+parseFloat(o.borderRightWidth||"0"):parseFloat(o.borderTopWidth||"0")+parseFloat(o.borderBottomWidth||"0");if(l)a=r?s:s-u;else{var c=t?parseFloat(o.paddingLeft||"0")+parseFloat(o.paddingRight||"0"):parseFloat(o.paddingTop||"0")+parseFloat(o.paddingBottom||"0");a=r?s+c+u:s+c}}else{var d=t?"Width":"Height";a=r?n["offset"+d]:n["client"+d]}return Math.max(a,0)},le=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},ue=function(e){return e.replace(/[\s-_]([a-z])/g,(function(e,n){return n.toUpperCase()}))},ce=function(e,n){for(var t={},i=e.attributes,r=i.length,o=0;o<r;++o){var a=i[o],s=a.name,l=a.value;-1!==s.indexOf(n)&&(t[ue(s.replace(n,""))]=l)}return t},de={__proto__:null,merge:j,getElement:L,checkExistence:M,clamp:H,getFlickingAttached:F,toArray:V,parseAlign:G,parseBounce:B,parseArithmeticSize:W,parseArithmeticExpression:U,parseCSSSizeValue:function(e){return J(e)?e:e+"px"},parsePanelAlign:X,getDirection:Y,parseElement:Z,getMinusCompensatedIndex:q,includes:K,isString:J,circulatePosition:Q,find:$,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:ee,getProgress:ne,getStyle:te,setSize:ie,isBetween:re,circulateIndex:oe,range:ae,getElementSize:se,setPrototypeOf:le,camelize:ue,getDataAttributes:ce},he=function(e){function n(t,i){var r=e.call(this,t)||this;return le(r,n.prototype),r.name="FlickingError",r.code=i,r}return o(n,e),n}(Error),fe=function(){function e(e,n){this._flicking=e,this._el=n,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(J(n))i.style.width=n;else{var a=o?n+r.left+r.right:n;i.style.width=a+"px"}if(null!=t)if(J(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=te(e),t=this._flicking.useFractionalSize;this._width=se({el:e,horizontal:!0,useFractionalSize:t,useOffset:!1,style:n}),this._height=se({el:e,horizontal:!1,useFractionalSize:t,useOffset:!1,style:n}),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}(),ge=function(){function e(e){var n,t=this;this._onResizeWrapper=function(){t._onResize([])},this._onResize=function(e){var n=t._flicking,i=n.resizeDebounce,r=n.maxResizeDebounce,o=n.element;if(e.find((function(e){return e.target===n.element}))&&1===e.length){var a={width:n.viewport.width,height:n.viewport.height},s={width:se({el:o,horizontal:!0,useFractionalSize:t._flicking.useFractionalSize,useOffset:!1,style:te(o)}),height:se({el:o,horizontal:!1,useFractionalSize:t._flicking.useFractionalSize,useOffset:!1,style:te(o)})};if(a.height===s.height&&a.width===s.width)return}i<=0?n.resize():(t._maxResizeDebounceTimer<=0&&r>0&&r>=i&&(t._maxResizeDebounceTimer=window.setTimeout(t._doScheduledResize,r)),t._resizeTimer>0&&(clearTimeout(t._resizeTimer),t._resizeTimer=0),t._resizeTimer=window.setTimeout(t._doScheduledResize,i))},this._doScheduledResize=function(){clearTimeout(t._resizeTimer),clearTimeout(t._maxResizeDebounceTimer),t._maxResizeDebounceTimer=-1,t._resizeTimer=-1,t._flicking.resize()},this._skipFirstResize=(n=!0,function(e){n?n=!1:t._onResize(e)}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}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);this._resizeObserver=t,this.observe(e.viewport.element),e.observePanelResize&&this.observePanels()}else window.addEventListener("resize",this._onResizeWrapper);return this._enabled=!0,this},n.observePanels=function(){var e=this;return this._flicking.panels.forEach((function(n){e.observe(n.element)})),this},n.unobservePanels=function(){var e=this;return this._flicking.panels.forEach((function(n){e.unobserve(n.element)})),this},n.observe=function(e){var n=this._resizeObserver;return n?(n.observe(e),this):this},n.unobserve=function(e){var n=this._resizeObserver;return n?(n.unobserve(e),this._flicking.observePanelResize&&this.unobservePanels(),this):this},n.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResizeWrapper),this._enabled=!1,this},e}(),pe=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}(),_e=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}(),ve=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:w.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:ae(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();ae(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}(),me={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},be="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"}(h||(h={}));var Pe=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[be];if(o){this._delta+=o;var a=t.camera,s=a.position,l=i.pos[be],u=t.circularEnabled?Q(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:Y(0,i.delta[be]),axesEvent:i});t.trigger(c),c.isCanceled()&&(a.lookAt(s),r(h.DISABLED))}},n}(),Ee=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!1,e}o(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(h.DISABLED);else{var o=new e.ComponentEvent(I.HOLD_START,{axesEvent:i});t.trigger(o),o.isCanceled()?r(h.DISABLED):r(h.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:Y(o.start,o.end),axesEvent:i});t.trigger(a),a.isCanceled()?r(h.DISABLED):r(h.ANIMATING).onChange(n)},t}(Pe),Oe=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!1,e._releaseEvent=null,e}o(t,n);var i=t.prototype;return i.onChange=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=i.inputEvent;if(o){var a=t.horizontal?o.offsetX:o.offsetY,s=new e.ComponentEvent(I.MOVE_START,{isTrusted:i.isTrusted,holding:this.holding,direction:Y(0,-a),axesEvent:i});t.trigger(s),s.isCanceled()?r(h.DISABLED):r(h.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(h.IDLE);this._releaseEvent=i},i.onFinish=function(n){var t,i,r=n.flicking;if((0,n.transitTo)(h.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 l=r.renderer.panels,c=null;try{for(var d=u(l),f=d.next();!f.done;f=d.next()){var g=f.value;if(g.contains(o)){c=g;break}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}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:Y(p,_)}))}}},t}(Pe),xe=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!0,e}o(t,n);var i=t.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(n){var t,i=n.flicking,r=n.axesEvent,o=n.transitTo;if(i.trigger(new e.ComponentEvent(I.HOLD_END,{axesEvent:r})),i.renderer.panelCount<=0)o(h.IDLE);else{o(h.ANIMATING);var a=i.control,s=r.destPos[be],l=Math.max(r.duration,i.duration);try{a.moveToPosition(s,l,r)}catch(e){o(h.IDLE),r.setTo(((t={})[be]=i.camera.position,t),0)}}},t}(Pe),ye=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!0,e}o(t,n);var i=t.prototype;return i.onHold=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=this._targetPanel,a=t.control;this._delta=0,t.control.updateInput(),t.changeOnHold&&o&&a.setActive(o,a.activePanel,i.isTrusted);var s=new e.ComponentEvent(I.HOLD_START,{axesEvent:i});t.trigger(s),s.isCanceled()?r(h.DISABLED):r(h.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(h.IDLE),t.trigger(new e.ComponentEvent(I.MOVE_END,{isTrusted:i.isTrusted,direction:Y(a.start,a.end),axesEvent:i}));var s=this._targetPanel;s&&o.setActive(s,o.activePanel,i.isTrusted)},t}(Pe),Te=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}o(n,e);var t=n.prototype;return t.onAnimationEnd=function(e){(0,e.transitTo)(h.IDLE)},t.onChange=function(e){var n=e.axesEvent,t=e.transitTo;n.stop(),t(h.IDLE)},t.onRelease=function(e){var n=e.axesEvent,t=e.transitTo;0===n.delta.flick&&t(h.IDLE)},n}(Pe),Re=function(){function e(){var e=this;this.transitTo=function(n){var t;switch(n){case h.IDLE:t=new Ee;break;case h.HOLDING:t=new Oe;break;case h.DRAGGING:t=new xe;break;case h.ANIMATING:t=new ye;break;case h.DISABLED:t=new Te}return t.onEnter(e._state),e._state=t,e._state},this._state=new Ee}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=a(a({},n),{transitTo:this.transitTo});switch(e){case me.HOLD:t.onHold(i);break;case me.CHANGE:t.onChange(i);break;case me.RELEASE:t.onRelease(i);break;case me.ANIMATION_END:t.onAnimationEnd(i);break;case me.FINISH:t.onFinish(i)}},e}(),Ie=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){var n;e._dragged=!!(null===(n=e._panInput)||void 0===n?void 0:n.isEnabled())},this._preventClickWhenDragged=function(n){e._dragged&&(n.preventDefault(),n.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new Re}var t=e.prototype;return Object.defineProperty(t,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panInput",{get:function(){return this._panInput},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[be];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.isEnabled())&&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([be])[be])&&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[be].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[be].bounce},enumerable:!1,configurable:!0}),t.init=function(e){var t,i=this;this._flicking=e,this._axes=new n(((t={})[be]={range:[0,0],circular:!1,bounce:[0,0]},t),{deceleration:e.deceleration,interruptable:e.interruptable,nested:e.nested,easing:e.easing}),this._panInput=new n.PanInput(e.viewport.element,{inputType:e.inputType,threshold:e.dragThreshold,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,preventDefaultOnDrag:e.preventDefaultOnDrag,scale:e.horizontal?[e.camera.panelOrder===N.RTL?1:-1,0]:[0,-1],releaseOnScroll:!0});var r=this._axes;r.connect(e.horizontal?[be,""]:["",be],this._panInput);var o=function(n){var t=me[n];r.on(t,(function(n){i._stateMachine.fire(t,{flicking:e,axesEvent:n})}))};for(var a in me)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.release=function(){var e;return null===(e=this._panInput)||void 0===e||e.release(),this},t.updateAnimation=function(e,n){var t,i;return this._animatingContext=a(a({},this._animatingContext),{end:e}),null===(i=this._axes)||void 0===i||i.updateAnimation({destPos:(t={},t[be]=e,t),duration:n}),this},t.stopAnimation=function(){var e;return null===(e=this._axes)||void 0===e||e.stopAnimation(),this},t.update=function(e){var n,t=F(this._flicking),i=t.camera,r=this._axes,o=r.axis[be];return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=B(t.bounce,i.size),r.axisManager.set(((n={})[be]=e.position,n)),this},t.addPreventClickHandler=function(){var e=F(this._flicking),n=this._axes,t=e.camera.element;return n.on(me.HOLD,this._onAxesHold),n.on(me.CHANGE,this._onAxesChange),t.addEventListener("click",this._preventClickWhenDragged,!0),this},t.removePreventClickHandler=function(){var e=F(this._flicking),n=this._axes,t=e.camera.element;return n.off(me.HOLD,this._onAxesHold),n.off(me.CHANGE,this._onAxesChange),t.removeEventListener("click",this._preventClickWhenDragged,!0),this},t.animateTo=function(e,n,t){var i,r=this,o=this._axes,a=this._stateMachine.state;if(!o)return Promise.reject(new he(v,f.NOT_ATTACHED_TO_FLICKING));var s=this.getCurrentPosition();if(s===e){var l=F(this._flicking);return l.camera.lookAt(e),a.targetPanel&&l.control.setActive(a.targetPanel,l.control.activePanel,null!==(i=null==t?void 0:t.isTrusted)&&void 0!==i&&i),Promise.resolve()}this._animatingContext={start:s,end:e,offset:0};return new Promise((function(i,a){var s=function(){o.off(me.HOLD,l),i()},l=function(){o.off(me.FINISH,s),a(new he(x,f.ANIMATION_INTERRUPTED))};o.once(me.FINISH,s),o.once(me.HOLD,l),function(){var i,a;o.once(me.FINISH,(function(){r._animatingContext={start:0,end:0,offset:0}})),t?t.setTo(((i={})[be]=e,i),n):o.setTo(((a={})[be]=e,a),n)}()}))},t.getCurrentPosition=function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.get([be])[be])&&void 0!==n?n:0},t.updateDirection=function(){var e=F(this._flicking),n=this._axes,t=this._panInput;n.disconnect(t),n.connect(e.horizontal?[be,""]:["",be],t),t.options.scale=e.horizontal?[e.camera.panelOrder===N.RTL?1:-1,0]:[0,-1]},t._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),Ae=function(){function n(){this._flicking=null,this._controller=new Ie,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.release=function(){return this._controller.release(),this},t.updateAnimation=function(e,n,t){var i=this._controller.state,r=this._getPosition(e,null!=t?t:C.NONE);return i.targetPanel=e,this._controller.updateAnimation(r,n),this},t.stopAnimation=function(){return this._controller.state.targetPanel=null,this._controller.stopAnimation(),this},t.updatePosition=function(e){var n=F(this._flicking).camera,t=this._activePanel;t&&n.lookAt(n.clampToReachablePosition(t.position))},t.updateInput=function(){var e=F(this._flicking).camera;return this._controller.update(e.controlParams),this},t.resetActive=function(){return this._activePanel=null,this},t.moveToPanel=function(e,n){var t=n.duration,i=n.direction,r=void 0===i?C.NONE:i,o=n.axesEvent;return s(this,void 0,void 0,(function(){var n;return l(this,(function(i){return n=this._getPosition(e,r),this._triggerIndexChangeEvent(e,e.position,o,r),[2,this._animateToPosition({position:n,duration:t,newActivePanel:e,axesEvent:o})]}))}))},t.setActive=function(n,t,i){var r,o=F(this._flicking);this._activePanel=n,this._nextPanel=null,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?Y(t.position,n.position):C.NONE})):o.trigger(new e.ComponentEvent(I.RESTORED,{isTrusted:i}))},t.copy=function(e){this._flicking=e._flicking,this._activePanel=e._activePanel,this._controller=e._controller},t._triggerIndexChangeEvent=function(n,t,i,r){var o,a=F(this._flicking),s=n!==this._activePanel?I.WILL_CHANGE:I.WILL_RESTORE,l=a.camera,u=this._activePanel,c=new e.ComponentEvent(s,{index:n.index,panel:n,isTrusted:(null==i?void 0:i.isTrusted)||!1,direction:null!=r?r:Y(null!==(o=null==u?void 0:u.position)&&void 0!==o?o:l.position,t)});if(this._nextPanel=n,a.trigger(c),c.isCanceled())throw new he(O,f.STOP_CALLED_BY_USER)},t._animateToPosition=function(e){var n=e.position,t=e.duration,i=e.newActivePanel,r=e.axesEvent;return s(this,void 0,void 0,(function(){var e,o,a,u=this;return l(this,(function(c){return e=F(this._flicking),o=t,Math.abs(o-n)<e.animationThreshold&&(o=0),a=function(){return u._controller.animateTo(n,o,r)},this._controller.state.targetPanel=i,o<=0?[2,a()]:[2,a().then((function(){return s(u,void 0,void 0,(function(){return l(this,(function(n){switch(n.label){case 0:return e.initialized?[4,e.renderer.render()]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))})).catch((function(e){if(!(r&&e instanceof he&&e.code===f.ANIMATION_INTERRUPTED))throw e}))]}))}))},t._getPosition=function(e,n){void 0===n&&(n=C.NONE);var t=F(this._flicking),i=t.camera,r=e.position,o=i.findNearestAnchor(r);if(e.removed||!o)throw new he(P(e.position),f.POSITION_NOT_REACHABLE);if(i.canReach(e)){if(t.circularEnabled){var a=this._controller.position,s=i.rangeDiff,l=[r,r+s,r-s].filter((function(e){return n===C.NONE||(n===C.PREV?e<=a:e>=a)}));r=l.reduce((function(e,n){return Math.abs(a-n)<Math.abs(a-e)?n:e}),1/0)}}else r=o.position,e=o.panel;return r},n}(),Ce=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}(),Se=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}o(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){var i=F(this._flicking),r=i.camera,o=r.findActiveAnchor(),a=r.findNearestAnchor(r.position),s=this._controller.state;if(!o||!a)return Promise.reject(new he(P(e),f.POSITION_NOT_REACHABLE));var l,u=this._calcSnapThreshold(i.threshold,e,o),c=i.animating?s.delta:e-r.position,d=Math.abs(c),h=t&&0!==t.delta[be]?Math.abs(t.delta[be]):d;if(h>=u&&h>0)l=this._findSnappedAnchor(e,a);else{if(!(d>=i.threshold&&d>0))return this.moveToPanel(a.panel,{duration:n,axesEvent:t});l=this._findAdjacentAnchor(e,c,a)}return this._triggerIndexChangeEvent(l.panel,e,t),this._animateToPosition({position:r.clampToReachablePosition(l.position),duration:n,newActivePanel:l.panel,axesEvent:t})},t._findSnappedAnchor=function(e,n){var t=F(this._flicking),i=t.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!n||!s)throw new he(P(e),f.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 d=c*l,h=s.index+d;if(Math.abs(h-n.index)<=r){var g=u[s.index];return new Ce({index:g.index,position:g.position+c*i.rangeDiff,panel:g.panel})}if(t.circularEnabled){var p=u[oe(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 Ce({index:p.index,position:p.position+_*i.rangeDiff,panel:p.panel})}return u[H(n.index+Math.sign(e-o)*r,0,u.length-1)]},t._findAdjacentAnchor=function(e,n,t){var i,r=F(this._flicking).camera;if(r.circularEnabled){var o=r.findAnchorIncludePosition(e);if(o&&o.position!==t.position)return o}return null!==(i=n>0?r.getNextAnchor(t):r.getPrevAnchor(t))&&void 0!==i?i:t},t._calcSnapThreshold=function(e,n,t){var i=n>t.position,r=t.panel,o=r.size,a=r.alignPosition;return Math.max(e,i?o-a+r.margin.next:a+r.margin.prev)},n}(Ae),we=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}o(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=F(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){var i=F(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new he(P(e),f.POSITION_NOT_REACHABLE));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,t),this._animateToPosition({position:this._stopAtEdge?r:e,duration:n,newActivePanel:a,axesEvent:t})},n}(Ae),ze=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}o(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=F(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,d=i.panelCount,h=c-a,f=c+a;h<0&&(h=n.circularEnabled?q((h+1)%d-1,d):H(h,0,d-1)),f>=d&&(f=n.circularEnabled?f%d:H(f,0,d-1));var g=i.panels[h],p=i.panels[f],_=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.moveToPanel=function(n,t){return s(this,void 0,void 0,(function(){var i,r;return l(this,(function(o){return i=F(this._flicking),r=i.camera,this._controller.update(r.controlParams),[2,e.prototype.moveToPanel.call(this,n,t)]}))}))},t.moveToPosition=function(e,n,t){var i,r=F(this._flicking),o=r.camera,a=null!==(i=this._nextPanel)&&void 0!==i?i:this._activePanel,s=this._controller.range,l=this._indexRange,u=o.range,c=this._controller.state,d=H(o.clampToReachablePosition(e),s[0],s[1]),h=o.findAnchorIncludePosition(d);if(!h||!a)return Promise.reject(new he(P(e),f.POSITION_NOT_REACHABLE));var g,p,_=a.position,v=r.animating?c.delta:e-o.position,m=Math.abs(v)>=r.threshold,b=e>_?o.getNextAnchor(h):o.getPrevAnchor(h),E=o.anchorPoints,O=E[0],x=E[E.length-1],y=e<u.min&&re(O.panel.index,l.min,l.max),T=e>u.max&&re(x.panel.index,l.min,l.max),R=b&&(l.min<=l.max?re(b.index,l.min,l.max):b.index>=l.min||b.index<=l.max);if(y||T){var I=e<u.min?O:x;p=I.panel,g=I.position}else if(m&&h.position!==a.position)p=h.panel,g=h.position;else{if(!m||!R){var A=o.findNearestAnchor(o.position);return A?this.moveToPanel(A.panel,{duration:n,axesEvent:t}):Promise.reject(new he(P(e),f.POSITION_NOT_REACHABLE))}p=b.panel,g=b.position}return this._triggerIndexChangeEvent(p,e,t),this._animateToPosition({position:g,duration:n,newActivePanel:p,axesEvent:t})},t._resetIndexRange=function(){this._indexRange={min:0,max:0}},n}(Ae),Ne={__proto__:null,Control:Ae,SnapControl:Se,FreeControl:we,StrictControl:ze,AxesController:Ie,State:Pe,IdleState:Ee,HoldingState:Oe,DraggingState:xe,AnimatingState:ye,DisabledState:Te,StateMachine:Re},ke=function(){function e(e){this._flicking=e}var n=e.prototype;return n.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new Ce({index:n,position:e.position,panel:e})}))},n.findAnchorIncludePosition=function(e){return this._flicking.camera.anchorPoints.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)},n.findNearestAnchor=function(e){var n=this._flicking.camera.anchorPoints;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]},n.clampToReachablePosition=function(e){var n=this._flicking.camera.range;return H(e,n.min,n.max)},n.getCircularOffset=function(){return 0},n.canReach=function(e){var n=this._flicking.camera.range;if(e.removed)return!1;var t=e.position;return t>=n.min&&t<=n.max},n.canSee=function(e){var n=this._flicking.camera.visibleRange;return e.isVisibleOnRange(n.min,n.max)},e}(),De=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t.checkAvailability=function(){return!0},t.getRange=function(){var e,n,t=this._flicking.renderer,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);return{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}},n}(ke),je=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t.checkAvailability=function(){var e=this._flicking,n=e.renderer.panels;if(n.length<=0)return!1;var t=n[0],i=n[n.length-1],r=t.range.min-t.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return n.every((function(e){return s-e.size>=a}))},t.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var n=e[0],t=e[e.length-1];return{min:n.range.min-n.margin.prev,max:t.range.max+t.margin.next}},t.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new Ce({index:n,position:e.position,panel:e})}))},t.findNearestAnchor=function(e){var n=this._flicking.camera,t=n.anchorPoints;if(t.length<=0)return null;for(var i=n.range,r=1/0,o=-1,a=0;a<t.length;a++){var s=t[a],l=Math.min(Math.abs(s.position-e),Math.abs(s.position-i.min+i.max-e),Math.abs(e-i.min+i.max-s.position));l<r&&(r=l,o=a)}return t[o]},t.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints,o=t.rangeDiff,a=r.length,s=Q(n,i.min,i.max),l=e.prototype.findAnchorIncludePosition.call(this,s);if(a>0&&(n===i.min||n===i.max)){var u=[l,new Ce({index:0,position:r[0].position+o,panel:r[0].panel}),new Ce({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));l=u.reduce((function(e,t){return e&&Math.abs(e.position-n)<Math.abs(t.position-n)?e:t}),null)}if(!l)return null;if(n<i.min){var c=-Math.floor((i.min-n)/o)-1;return new Ce({index:l.index,position:l.position+o*c,panel:l.panel})}if(n>i.max){c=Math.floor((n-i.max)/o)+1;return new Ce({index:l.index,position:l.position+o*c,panel:l.panel})}return l},t.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var n=e.panels.filter((function(e){return e.toggled})),t=n.filter((function(e){return e.toggleDirection===C.PREV})),i=n.filter((function(e){return e.toggleDirection===C.NEXT}));return this._calcPanelAreaSum(t)-this._calcPanelAreaSum(i)},t.clampToReachablePosition=function(e){return e},t.canReach=function(e){return!e.removed},t.canSee=function(n){var t=this._flicking.camera,i=t.range,r=t.rangeDiff,o=t.visibleRange,a=e.prototype.canSee.call(this,n);return o.min<i.min?a||n.isVisibleOnRange(o.min+r,o.max+r):o.max>i.max?a||n.isVisibleOnRange(o.min-r,o.max-r):a},t._calcPanelAreaSum=function(e){return e.reduce((function(e,n){return e+n.sizeIncludingMargin}),0)},n}(ke),Le=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t.checkAvailability=function(){var e=this._flicking,n=e.renderer,t=n.getPanel(0),i=n.getPanel(n.panelCount-1);if(!t||!i)return!1;var r=e.camera.size,o=t.range.min;return r<i.range.max-o},t.getRange=function(){var e=this._flicking,n=e.renderer,t=e.camera.alignPosition,i=n.getPanel(0),r=n.getPanel(n.panelCount-1);if(!i||!r)return{min:0,max:0};var o=e.camera.size,a=i.range.min,s=r.range.max,l=a+t,u=s-o+t;if(o<s-a)return{min:l,max:u};var c=e.camera.align,d="object"==typeof c?c.camera:c,h=l+G(d,u-l);return{min:h,max:h}},t.getAnchors=function(){var e=this._flicking,n=e.camera,t=e.renderer.panels;if(t.length<=0)return[];var i=e.camera.range,r=t.filter((function(e){return n.canReach(e)}));if(r.length>0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,s=o?1:0,l=r.map((function(e,n){return new Ce({index:n+s,position:e.position,panel:e})}));return o&&l.splice(0,0,new Ce({index:0,position:i.min,panel:t[r[0].index-1]})),a&&l.push(new Ce({index:l.length,position:i.max,panel:t[r[r.length-1].index+1]})),l}if(i.min!==i.max){var u=this._findNearestPanel(i.min,t),c=u.index===t.length-1?u.prev():u,d=c.next();return[new Ce({index:0,position:i.min,panel:c}),new Ce({index:1,position:i.max,panel:d})]}return[new Ce({index:0,position:i.min,panel:this._findNearestPanel(i.min,t)})]},t.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints;return r.length<=0?null:n<=i.min?r[0]:n>=i.max?r[r.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}(ke),Me=function(){function n(e,n){var t=this,i=(void 0===n?{}:n).align,r=void 0===i?A.CENTER:i;this._lookedOffset=0,this._checkTranslateSupport=function(){var e,n,i=document.documentElement.style,r="";try{for(var o=u(["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&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}if(!r)throw new he(E,f.TRANSFORM_NOT_SUPPORTED);t._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}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 V(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking,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(),d=c?c.position+c.offset:s-o[0];return d>r&&(d-=u),i.index-1+ne(n,d,r)}var h=i.next(),f=h?h.position+h.offset:l+o[1];return f<r&&(f+=u),i.index+ne(n,r,f)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelOrder",{get:function(){return this._panelOrder},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(){var e=this._flicking.viewport.element;return M(e.firstElementChild,"First element child of the viewport element"),this._el=e.firstElementChild,this._checkTranslateSupport(),this._updateMode(),this.updatePanelOrder(),this},t.destroy=function(){return this._resetInternalValues(),this},t.lookAt=function(e){var n=this,t=this._offset,i=this._lookedOffset!==t,r=F(this._flicking),o=this._position;this._position=e;var a=this._togglePanels(o,e);this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(o,e),a?r.renderer.render().then((function(){n.updateOffset(),n._lookedOffset=n._offset})):i?(this.updateOffset(),this._lookedOffset=this._offset):this.applyTransform()},t.getPrevAnchor=function(e){if(this._circularEnabled&&0===e.index){var n=this._anchors,t=this.rangeDiff,i=n[n.length-1];return new Ce({index:i.index,position:i.position-t,panel:i.panel})}return this._anchors[e.index-1]||null},t.getNextAnchor=function(e){var n=this._anchors;if(this._circularEnabled&&e.index===n.length-1){var t=this.rangeDiff,i=n[0];return new Ce({index:i.index,position:i.position+t,panel:i.panel})}return n[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._mode.findAnchorIncludePosition(e)},t.findNearestAnchor=function(e){return this._mode.findNearestAnchor(e)},t.findActiveAnchor=function(){var e,n=F(this._flicking).control.activePanel;return n?null!==(e=$(this._anchors,(function(e){return e.panel.index===n.index})))&&void 0!==e?e:this.findNearestAnchor(n.position):null},t.clampToReachablePosition=function(e){return this._mode.clampToReachablePosition(e)},t.canReach=function(e){return this._mode.canReach(e)},t.canSee=function(e){return this._mode.canSee(e)},t.updateRange=function(){var e=F(this._flicking).renderer.panels;return this._updateMode(),this._range=this._mode.getRange(),e.forEach((function(e){return e.updateCircularToggleDirection()})),this},t.updateAlignPos=function(){var e=this._align,n="object"==typeof e?e.camera:e;return this._alignPos=G(n,this.size),this},t.updateAnchors=function(){return this._anchors=this._mode.getAnchors(),this},t.updateAdaptiveHeight=function(){var e=F(this._flicking),n=e.control.activePanel,t=d(e.visiblePanels);if(n&&t.push(n),e.horizontal&&e.adaptive&&t.length){var i=Math.max.apply(Math,d(t.map((function(e){return e.height}))));e.viewport.setSize({height:i})}},t.updateOffset=function(){var e=F(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._circularOffset=this._mode.getCircularOffset(),this.applyTransform(),this},t.updatePanelOrder=function(){var e=F(this._flicking);if(!e.horizontal)return this;var n=this._el,t=te(n).direction;return t!==this._panelOrder&&(this._panelOrder=t===N.RTL?N.RTL:N.LTR,e.initialized&&e.control.controller.updateDirection()),this},t.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},t.applyTransform=function(){var e=this._el,n=F(this._flicking);if(n.renderer.rendering||!n.initialized)return this;var t=this._position-this._alignPos-this._offset+this._circularOffset;return e.style[this._transform]=n.horizontal?"translate("+(this._panelOrder===N.RTL?t:-t)+"px)":"translate(0, "+-t+"px)",this},t._resetInternalValues=function(){this._position=0,this._lookedOffset=0,this._alignPos=0,this._offset=0,this._circularOffset=0,this._circularEnabled=!1,this._range={min:0,max:0},this._visiblePanels=[],this._anchors=[],this._needPanelTriggered={prev:!1,next:!1}},t._refreshVisiblePanels=function(){var n=this,t=F(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!K(r,e)})),a=r.filter((function(e){return!K(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=F(this._flicking),i=t.renderer.panels;if(i.length<=0)return n.prev||(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:C.PREV})),n.prev=!0),void(n.next||(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:C.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],d=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:C.PREV})),n.prev=!0);if(!n.next)(u>=d.range.max-s||r>=a.max-s)&&(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:C.NEXT})),n.next=!0)}},t._checkReachEnd=function(n,t){var i=F(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?C.PREV:C.NEXT;i.trigger(new e.ComponentEvent(I.REACH_EDGE,{direction:s}))}},t._updateMode=function(){var e=F(this._flicking);if(e.circular){var n=new je(e),t=n.checkAvailability();if(t)this._mode=n;else{var i=e.circularFallback;this._mode=i===z.BOUND?new Le(e):new De(e)}this._circularEnabled=t}else this._mode=e.bound?new Le(e):new De(e),this._circularEnabled=!1},t._togglePanels=function(e,n){return n!==e&&F(this._flicking).renderer.panels.map((function(t){return t.toggle(e,n)})).some((function(e){return e}))},n}(),He={__proto__:null,Camera:Me,LinearCameraMode:De,CircularCameraMode:je,BoundCameraMode:Le},Fe=function(){function n(e){var n=e.align,t=void 0===n?A.CENTER:n,i=e.strategy;this._flicking=null,this._panels=[],this._rendering=!1,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,"rendering",{get:function(){return this._rendering},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=X(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.getRenderedPanels=function(){return F(this._flicking).renderer.panels.filter((function(e){return e.rendered}))},i.updatePanelSize=function(){var e=F(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 e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchInsertDefer.apply(this,d(e));return t.length<=0?[]:(this.updateAfterPanelChange(t,[]),t)},i.batchInsertDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=F(this._flicking),o=i[0],a=X(this._align);return n.reduce((function(n,t){var s,l=q(t.index,i.length),u=i.slice(l),c=t.elements.map((function(n,t){return e._createPanel(n,{index:l+t,align:a,flicking:r})}));if(i.splice.apply(i,d([l,0],c)),t.hasDOMInElements&&e._insertPanelElements(c,null!==(s=u[0])&&void 0!==s?s:null),r.panelsPerView>0){var h=o||c[0].resize();e._updatePanelSizeByGrid(h,c)}else c.forEach((function(e){return e.resize()}));return u.forEach((function(e){e.increaseIndex(c.length),e.updatePosition()})),d(n,c)}),[])},i.batchRemove=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchRemoveDefer.apply(this,d(e));return t.length<=0?[]:(this.updateAfterPanelChange([],t),t)},i.batchRemoveDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=F(this._flicking).control,o=r.activePanel;return n.reduce((function(n,t){var a=t.index,s=t.deleteCount,l=q(a,i.length),u=i.slice(l+s),c=i.splice(l,s);return c.length<=0?[]:(u.forEach((function(e){e.decreaseIndex(c.length),e.updatePosition()})),t.hasDOMInElements&&e._removePanelElements(c),c.forEach((function(e){return e.destroy()})),K(c,o)&&r.resetActive(),d(n,c))}),[])},i.updateAfterPanelChange=function(n,t){var i,r=F(this._flicking),o=r.camera,a=r.control,s=this._panels,l=a.activePanel;if(this._updateCameraAndControl(),r.autoResize&&r.useResizeObserver&&(n.forEach((function(e){e.element&&r.autoResizer.observe(e.element)})),t.forEach((function(e){e.element&&r.autoResizer.unobserve(e.element)}))),this.render(),!r.animating)if(!l||l.removed)if(s.length<=0)o.lookAt(0);else{var u=null!==(i=null==l?void 0:l.index)&&void 0!==i?i:0;u>s.length-1&&(u=s.length-1),a.moveToPanel(s[u],{duration:0}).catch((function(){}))}else a.moveToPanel(l,{duration:0}).catch((function(){}));r.camera.updateOffset(),(n.length>0||t.length>0)&&(r.trigger(new e.ComponentEvent(I.PANEL_CHANGE,{added:n,removed:t})),this.checkPanelContentsReady(d(n,t)))},i.checkPanelContentsReady=function(e){var n=this,i=F(this._flicking),r=i.resizeOnContentsReady,o=this._panels;if(r&&!i.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return e.element&&!!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.updateOffset(),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=F(this._flicking),n=e.camera,t=e.control;n.updateRange(),n.updateOffset(),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=F(this._flicking),i=t.panelsPerView;if(i<=0)throw new he(m("panelsPerView",i),f.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},s=a({size:r,margin:e.margin},!t.horizontal&&{height:e.height});t.noPanelStyleOverride||this._strategy.updatePanelSizes(t,o),t.panels.forEach((function(e){return e.resize(s)}))}},i._removeAllChildsFromCamera=function(){for(var e=F(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},i._insertPanelElements=function(e,n){void 0===n&&(n=null);var t=F(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=F(this._flicking).camera.element;e.forEach((function(e){n.removeChild(e.element)}))},i._afterRender=function(){var e=F(this._flicking);if(e.camera.applyTransform(),e.useCSSOrder){var n=e.panels;this._strategy.getRenderingIndexesByOrder(e).forEach((function(e,t){n[e].element.style.order=""+t}))}},n}(),Ve=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t.render=function(){return s(this,void 0,void 0,(function(){var e,n;return l(this,(function(t){return e=F(this._flicking),(n=this._strategy).updateRenderingPanels(e),n.renderPanels(e),this._resetPanelElementOrder(),this._afterRender(),[2]}))}))},t._collectPanels=function(){var e=F(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=F(this._flicking),n=e.camera.element,t=[];(t=e.useCSSOrder?this.getRenderedPanels().map((function(e){return e.element})).reverse():this._strategy.getRenderingElementsByOrder(e).reverse()).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=F(this._flicking).camera.element;V(e.childNodes).forEach((function(n){n.nodeType===Node.TEXT_NODE&&e.removeChild(n)}))},n}(Fe),Ge=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t._removePanelElements=function(e){},t._removeAllChildsFromCamera=function(){},n}(Fe),Be=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!==C.NONE&&this._toggled?e===C.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-ne(i,e,r)}var o=e-(t.alignPosition+this._size-n);return 1-ne(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,this._updateAlignPos()},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,t=this.element,i=this._flicking,r=i.horizontal,o=i.useFractionalSize;if(!t)return this;if(e)this._size=e.size,this._margin=a({},e.margin),this._height=null!==(n=e.height)&&void 0!==n?n:se({el:t,horizontal:!1,useFractionalSize:o,useOffset:!0,style:te(t)});else{var s=te(t);this._size=se({el:t,horizontal:r,useFractionalSize:o,useOffset:!0,style:s}),this._margin=r?{prev:parseFloat(s.marginLeft||"0"),next:parseFloat(s.marginRight||"0")}:{prev:parseFloat(s.marginTop||"0"),next:parseFloat(s.marginBottom||"0")},this._height=r?se({el:t,horizontal:!1,useFractionalSize:o,useOffset:!0,style:s}):this._size}return this.updatePosition(),this._updateAlignPos(),this},n.setSize=function(e){return ie(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===C.NONE||n===e)return!1;var r=this._toggled;return n>e?i>=e&&i<=n&&(this._toggled=t===C.NEXT):i<=e&&i>=n&&(this._toggled=t!==C.NEXT),r!==this._toggled},n.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=C.NONE,this._togglePosition=0,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=C.PREV,this._togglePosition=this.range.max+t.min-t.max+i,this.toggle(1/0,n.position)):u?(this._toggleDirection=C.NEXT,this._togglePosition=this.range.min+t.max-o+i,this.toggle(-1/0,n.position)):(this._toggleDirection=C.NONE,this._togglePosition=0),this},n._updateAlignPos=function(){this._alignPos=G(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=C.NONE},e}(),We=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===C.PREV})),i=n.filter((function(e){return e.toggled&&e.toggleDirection===C.NEXT}));return d(t,n.filter((function(e){return!e.toggled})),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=X(e.renderer.align);return n.map((function(n,r){return new Be({index:r,elementProvider:new t._providerCtor(n),align:i,flicking:e})}))},n.createPanel=function(e,n){return new Be(a(a({},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}(),Ue=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}o(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===C.NEXT?i+t:i-t),oe(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}(Be),Xe=function(){function e(){}var n=e.prototype;return n.renderPanels=function(e){var n=e.virtual,t=e.visiblePanels,i=ae(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=d(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)}));return t.length<=0?n.elements.map((function(e,n){return n})):d(t.map((function(e){return e.elementIndex})),n.elements.map((function(e,n){return a(a({},e),{idx:n})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},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=X(e.renderer.align);return ae(e.virtual.initialPanelCount).map((function(t){return new Ue({index:t,elementProvider:new _e(e),align:n,flicking:e})}))},n.createPanel=function(e,n){return new Ue(a(a({},n),{elementProvider:new _e(n.flicking)}))},n.updatePanelSizes=function(e,n){e.virtual.elements.forEach((function(e){ie(e.nativeElement,n)})),e.panels.forEach((function(e){return e.setSize(n)}))},e}(),Ye={__proto__:null,Renderer:Fe,VanillaRenderer:Ve,ExternalRenderer:Ge,NormalRenderingStrategy:We,VirtualRenderingStrategy:Xe},Ze=function(n){function t(e,t){var i=void 0===t?{}:t,r=i.align,o=void 0===r?A.CENTER:r,a=i.defaultIndex,s=void 0===a?0:a,l=i.horizontal,u=void 0===l||l,c=i.circular,d=void 0!==c&&c,h=i.circularFallback,f=void 0===h?z.LINEAR:h,g=i.bound,p=void 0!==g&&g,_=i.adaptive,v=void 0!==_&&_,m=i.panelsPerView,b=void 0===m?-1:m,P=i.noPanelStyleOverride,E=void 0!==P&&P,O=i.resizeOnContentsReady,x=void 0!==O&&O,y=i.nested,T=void 0!==y&&y,R=i.needPanelThreshold,I=void 0===R?0:R,C=i.preventEventsBeforeInit,S=void 0===C||C,w=i.deceleration,N=void 0===w?.0075:w,k=i.duration,D=void 0===k?500:k,j=i.easing,M=void 0===j?function(e){return 1-Math.pow(1-e,3)}:j,H=i.inputType,F=void 0===H?["mouse","touch"]:H,V=i.moveType,G=void 0===V?"snap":V,B=i.threshold,W=void 0===B?40:B,U=i.dragThreshold,X=void 0===U?1:U,Y=i.interruptable,Z=void 0===Y||Y,q=i.bounce,K=void 0===q?"20%":q,J=i.iOSEdgeSwipeThreshold,Q=void 0===J?30:J,$=i.preventClickOnDrag,ee=void 0===$||$,ne=i.preventDefaultOnDrag,te=void 0!==ne&&ne,ie=i.disableOnInit,re=void 0!==ie&&ie,oe=i.changeOnHold,ae=void 0!==oe&&oe,se=i.renderOnlyVisible,le=void 0!==se&&se,ue=i.virtual,ce=void 0===ue?null:ue,de=i.autoInit,he=void 0===de||de,pe=i.autoResize,_e=void 0===pe||pe,me=i.useResizeObserver,be=void 0===me||me,Pe=i.resizeDebounce,Ee=void 0===Pe?0:Pe,Oe=i.observePanelResize,xe=void 0!==Oe&&Oe,ye=i.maxResizeDebounce,Te=void 0===ye?100:ye,Re=i.useFractionalSize,Ie=void 0!==Re&&Re,Ae=i.externalRenderer,Ce=void 0===Ae?null:Ae,Se=i.renderExternal,we=void 0===Se?null:Se,ze=i.optimizeSizeUpdate,Ne=void 0!==ze&&ze,ke=i.animationThreshold,De=void 0===ke?.5:ke,je=i.useCSSOrder,Le=void 0!==je&&je,Me=n.call(this)||this;return Me._scheduleResize=!1,Me._initialized=!1,Me._plugins=[],Me._isResizing=!1,Me._align=o,Me._defaultIndex=s,Me._horizontal=u,Me._circular=d,Me._circularFallback=f,Me._bound=p,Me._adaptive=v,Me._panelsPerView=b,Me._noPanelStyleOverride=E,Me._resizeOnContentsReady=x,Me._nested=T,Me._virtual=ce,Me._needPanelThreshold=I,Me._preventEventsBeforeInit=S,Me._deceleration=N,Me._duration=D,Me._easing=M,Me._inputType=F,Me._moveType=G,Me._threshold=W,Me._dragThreshold=X,Me._interruptable=Z,Me._bounce=K,Me._iOSEdgeSwipeThreshold=Q,Me._preventClickOnDrag=ee,Me._preventDefaultOnDrag=te,Me._disableOnInit=re,Me._changeOnHold=ae,Me._renderOnlyVisible=le,Me._autoInit=he,Me._autoResize=_e,Me._useResizeObserver=be,Me._resizeDebounce=Ee,Me._maxResizeDebounce=Te,Me._observePanelResize=xe,Me._useFractionalSize=Ie,Me._externalRenderer=Ce,Me._renderExternal=we,Me._optimizeSizeUpdate=Ne,Me._animationThreshold=De,Me._useCSSOrder=Le,Me._viewport=new fe(Me,L(e)),Me._autoResizer=new ge(Me),Me._renderer=Me._createRenderer(),Me._camera=Me._createCamera(),Me._control=Me._createControl(),Me._virtualManager=new ve(Me,ce),Me._autoInit&&Me.init(),Me}o(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,"autoResizer",{get:function(){return this._autoResizer},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.circularEnabled},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,this.resize()},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,this._control.controller.updateDirection(),this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"circular",{get:function(){return this._circular},set:function(e){this._circular=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(i,"bound",{get:function(){return this._bound},set:function(e){this._bound=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e,e&&this._renderer.checkPanelContentsReady(this._renderer.panels)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"nested",{get:function(){return this._nested},set:function(e){this._nested=e;var n=this._control.controller.axes;n&&(n.options.nested=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;var n=this._control.controller.axes;n&&(n.options.deceleration=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"easing",{get:function(){return this._easing},set:function(e){this._easing=e;var n=this._control.controller.axes;n&&(n.options.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;var n=this._control.controller.panInput;n&&(n.options.inputType=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e;var n=this._control,t=this._createControl(),i=n.activePanel;t.copy(n);var r=i?this._camera.getProgressInPanel(i):0;this._control=t,this._control.updatePosition(r),this._control.updateInput()},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,"dragThreshold",{get:function(){return this._dragThreshold},set:function(e){this._dragThreshold=e;var n=this._control.controller.panInput;n&&(n.options.threshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"animationThreshold",{get:function(){return this._animationThreshold},set:function(e){this._animationThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"useCSSOrder",{get:function(){return this._useCSSOrder},set:function(e){this._useCSSOrder=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e;var n=this._control.controller.axes;n&&(n.options.interruptable=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e,this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e;var n=this._control.controller.panInput;n&&(n.options.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,"preventDefaultOnDrag",{get:function(){return this._preventDefaultOnDrag},set:function(e){this._preventDefaultOnDrag=e;var n=this._control.controller.panInput;n&&(n.options.preventDefaultOnDrag=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,"changeOnHold",{get:function(){return this._changeOnHold},set:function(e){this._changeOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e,this._renderer.render()},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,this._initialized&&(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._initialized&&this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"observePanelResize",{get:function(){return this._observePanelResize},set:function(e){this._observePanelResize=e,this._initialized&&this._autoResize&&(e?this._autoResizer.observePanels():this._autoResizer.unobservePanels())},enumerable:!1,configurable:!0}),Object.defineProperty(i,"resizeDebounce",{get:function(){return this._resizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(i,"maxResizeDebounce",{get:function(){return this._maxResizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(i,"useFractionalSize",{get:function(){return this._useFractionalSize},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}),Object.defineProperty(i,"optimizeSizeUpdate",{get:function(){return this._optimizeSizeUpdate},set:function(e){this._optimizeSizeUpdate=e},enumerable:!1,configurable:!0}),i.init=function(){var n=this;if(this._initialized)return Promise.resolve();var t=this._camera,i=this._renderer,r=this._control,o=this._virtualManager,a=this.trigger,s=this._preventEventsBeforeInit;return t.init(),o.init(),i.init(this),r.init(this),s&&(this.trigger=function(){return n}),this._initialResize(),this._moveToInitialPanel(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&r.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),i.checkPanelContentsReady(i.panels),this._initialized=!0,i.render().then((function(){n._plugins.forEach((function(e){return e.init(n)})),s&&(n.trigger=a),n.trigger(new e.ComponentEvent(I.READY))}))},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._scheduleResize=!1,this._initialized=!1,this._isResizing=!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,C.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,C.NEXT)},i.moveTo=function(e,n,t){void 0===n&&(n=this._duration),void 0===t&&(t=C.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new he(y,f.ANIMATION_ALREADY_PLAYING)):(this._control.holding&&this._control.controller.release(),this._control.moveToPanel(o,{duration:n,direction:t})):Promise.reject(new he(b(e,0,r-1),f.INDEX_OUT_OF_RANGE))},i.updateAnimation=function(e,n,t){if(this._control.animating){var i=this._renderer,r=i.panelCount,o=i.getPanel(e);if(!o)throw new he(b(e,0,r-1),f.INDEX_OUT_OF_RANGE);this._control.updateAnimation(o,n,t)}},i.stopAnimation=function(){this._control.animating&&this._control.stopAnimation()},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,d=void 0!==c&&c,h=this._camera,f={panels:(d?this.visiblePanels:this.panels).map((function(e){var n={index:e.index};return u&&(n.html=e.element.outerHTML),n}))};if(o&&(f.index=this.index),s){var g=h.findNearestAnchor(h.position);g&&(f.position={panel:g.panel.index,progressInPanel:h.getProgressInPanel(g.panel)})}if(d){var p=this.visiblePanels;f.visibleOffset=null!==(t=null===(n=p[0])||void 0===n?void 0:n.index)&&void 0!==t?t:0}return f},i.setStatus=function(e){var n;if(!this._initialized)throw new he(R,f.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:Z(o.map((function(e){return e.html}))),hasDOMInElements:!0})),null!=t){var l=r?t-r:t;this.moveTo(l,0).catch((function(){}))}if(i&&this._moveType===S.FREE_SCROLL){var u=i.panel,c=i.progressInPanel,d=(l=r?u-r:u,a.panels[l].range),h=d.min+(d.max-d.min)*c;s.moveToPosition(h,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,d(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=ee(e._plugins,(function(e){return e===n}));t>=0&&(n.destroy(),e._plugins.splice(t,1))})),this},i.resize=function(){return s(this,void 0,void 0,(function(){var n,t,i,r,o,a,s,u,c,d,h;return l(this,(function(l){switch(l.label){case 0:return this._initialized?this._isResizing?(this._scheduleResize=!0,[2]):(this._scheduleResize=!1,this._isResizing=!0,n=this._viewport,t=this._renderer,i=this._camera,r=this._control,o=r.activePanel,a=n.width,s=n.height,u=o?i.getProgressInPanel(o):0,this.trigger(new e.ComponentEvent(I.BEFORE_RESIZE,{width:a,height:s,element:n.element})),n.resize(),this._optimizeSizeUpdate?this.horizontal&&n.width!==a||!this.horizontal&&n.height!==s?[4,t.forceRenderAllPanels()]:[3,2]:[3,3]):[2];case 1:l.sent(),l.label=2;case 2:return[3,5];case 3:return[4,t.forceRenderAllPanels()];case 4:l.sent(),l.label=5;case 5:return this._initialized?(t.updatePanelSize(),i.updateAlignPos(),i.updateRange(),i.updateAnchors(),i.updateAdaptiveHeight(),i.updatePanelOrder(),i.updateOffset(),[4,t.render()]):[2];case 6:return l.sent(),this._initialized?(r.animating||(r.updatePosition(u),r.updateInput()),c=n.width,d=n.height,h=c!==a||d!==s,this.trigger(new e.ComponentEvent(I.AFTER_RESIZE,{width:n.width,height:n.height,prev:{width:a,height:s},sizeChanged:h,element:n.element})),this._isResizing=!1,this._scheduleResize&&this.resize(),[2]):[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 he(T,f.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:Z(n),hasDOMInElements:!0})},i.remove=function(e,n){if(void 0===n&&(n=1),this._renderExternal)throw new he(T,f.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(S).map((function(e){return S[e]})),i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)&&null!==(e=n[1])&&void 0!==e?e:{};if(!K(t,i))throw new he(m("moveType",JSON.stringify(n)),f.WRONG_OPTION);switch(i){case S.SNAP:return new Se(r);case S.FREE_SCROLL:return new we(r);case S.STRICT:return new ze(r)}},i._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new Me(this,{align:this._align})},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(a({align:this._align},t))},i._createVanillaRenderer=function(){var e=this.virtualEnabled;return new Ve({align:this._align,strategy:e?new Xe:new We({providerCtor:pe})})},i._moveToInitialPanel=function(){var e=this._renderer,n=this._control,t=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=t.findNearestAnchor(i.position),o=r&&i.position!==r.panel.position&&i.index!==r.panel.index?r.panel:i;if(n.setActive(o,null,!1),!r)throw new he(P(o.position),f.POSITION_NOT_REACHABLE);var a=o.position;t.canReach(o)||(a=r.position),t.lookAt(a),n.updateInput(),t.updateOffset()}},i._initialResize=function(){var n=this._viewport,t=this._renderer,i=this._camera,r=this._control;this.trigger(new e.ComponentEvent(I.BEFORE_RESIZE,{width:0,height:0,element:n.element})),n.resize(),t.updatePanelSize(),i.updateAlignPos(),i.updateRange(),i.updateAnchors(),i.updateOffset(),r.updateInput();var o=n.width,a=n.height,s=0!==o||0!==a;this.trigger(new e.ComponentEvent(I.AFTER_RESIZE,{width:n.width,height:n.height,prev:{width:0,height:0},sizeChanged:s,element:n.element}))},t.VERSION="4.14.2-beta.2",t}(e),qe={HOLD_START:"sideHoldStart",HOLD_END:"sideHoldEnd",MOVE_START:"sideMoveStart",MOVE:"sideMove",MOVE_END:"sideMoveEnd",WILL_CHANGE:"sideWillChange",CHANGED:"sideChanged",WILL_RESTORE:"sideWillRestore",RESTORED:"sideRestored"},Ke={__proto__:null,SIDE_EVENTS:qe,CrossFlicking:function(n){function t(e,t){var i=n.call(this,e,t)||this;i._syncToCategory=function(e,n){i._disableIndexSync||(i.stopAnimation(),i._sideFlicking.forEach((function(t,r){var o=i._sideState[r],a=o.start,s=o.end;a<=e&&s>=e&&n!==r&&(t.stopAnimation(),t.moveTo(e,0),i.moveTo(r,0))})))},i._setDraggable=function(e,n){if(i._disableSlideOnHold){var t=i._originalDragThreshold,r=n?t&&t>=10?t:10:1/0;e===k.HORIZONTAL===i.horizontal?i.dragThreshold=r:e===k.VERTICAL===i.horizontal&&i._sideFlicking.forEach((function(e){e.dragThreshold=r}))}},i._setPreviousSideIndex=function(){i._sideFlicking.forEach((function(e,n){var t=i._sideState[n],r=t.start,o=t.end;i._preserveIndex?i._nextIndex!==n&&(e.index<r?(e.stopAnimation(),e.moveTo(r,0)):e.index>o&&(e.stopAnimation(),e.moveTo(o,0))):i._nextIndex!==n&&e.moveTo(r,0)}))},i._addSideIndex=function(e){e.sideIndex=i._sideFlicking[e.index].index},i._onHorizontalHoldStart=function(){i._setDraggable(k.HORIZONTAL,!0),i._moveDirection=null},i._onHorizontalMove=function(e){e.isTrusted&&!i._moveDirection&&(i._setDraggable(k.VERTICAL,!1),i._moveDirection=k.HORIZONTAL)},i._onHorizontalMoveEnd=function(e){var n=i.visiblePanels;n.length>1?i._nextIndex="NEXT"===e.direction?n[1].index:n[0].index:i._nextIndex=n[0].index,i._setDraggable(k.VERTICAL,!0),i._moveDirection=null,requestAnimationFrame((function(){return i._setPreviousSideIndex()})),e.isTrusted&&i._syncToCategory(i._sideFlicking[i._nextIndex].index,i._nextIndex)},i._onSideHoldStart=function(){i._setDraggable(k.VERTICAL,!0),i._moveDirection=null},i._onSideMove=function(e){e.isTrusted&&!i._moveDirection&&(i._setDraggable(k.HORIZONTAL,!1),i._moveDirection=k.VERTICAL)},i._onSideMoveEnd=function(){i._setDraggable(k.HORIZONTAL,!0),i._moveDirection=null},i._onSideChanged=function(e){i.visiblePanels.length<2&&i._sideFlicking[i.index]===e.currentTarget&&i._syncToCategory(e.index,i.index)};var r=t.sideOptions,o=void 0===r?{}:r,a=t.preserveIndex,s=void 0===a||a,l=t.disableSlideOnHold,u=void 0===l||l,c=t.disableIndexSync,d=void 0!==c&&c;return i._moveDirection=null,i._nextIndex=0,i._originalDragThreshold=i.dragThreshold,i._sideOptions=o,i._preserveIndex=s,i._disableSlideOnHold=u,i._disableIndexSync=d,i}o(t,n);var i=t.prototype;return Object.defineProperty(i,"sideFlicking",{get:function(){return this._sideFlicking},enumerable:!1,configurable:!0}),Object.defineProperty(i,"sideIndex",{get:function(){return this._sideFlicking.map((function(e){return e.index}))},enumerable:!1,configurable:!0}),Object.defineProperty(i,"sideState",{get:function(){return this._sideState},enumerable:!1,configurable:!0}),Object.defineProperty(i,"sideOptions",{get:function(){return this._sideOptions},set:function(e){this._sideOptions=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"preserveIndex",{get:function(){return this._preserveIndex},set:function(e){this._preserveIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"disableSlideOnHold",{get:function(){return this._disableSlideOnHold},set:function(e){this._disableSlideOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"disableIndexSync",{get:function(){return this._disableIndexSync},set:function(e){this._disableIndexSync=e},enumerable:!1,configurable:!0}),i.init=function(){var e=this;return n.prototype.init.call(this).then((function(){e._sideState=e._createSideState(),e._sideFlicking=e._createSideFlicking(),e._addComponentEvents()}))},i.destroy=function(){this._sideFlicking.forEach((function(e){e.destroy()})),n.prototype.destroy.call(this)},i._addComponentEvents=function(){var n=this;this.on(I.HOLD_START,this._onHorizontalHoldStart),this.on(I.MOVE,this._onHorizontalMove),this.on(I.MOVE_END,this._onHorizontalMoveEnd),[I.CHANGED,I.WILL_CHANGE].forEach((function(e){n.on(e,n._addSideIndex)})),this._sideFlicking.forEach((function(t,i){t.on(I.HOLD_START,n._onSideHoldStart),t.on(I.MOVE,n._onSideMove),t.on(I.MOVE_END,n._onSideMoveEnd),t.on(I.CHANGED,n._onSideChanged),Object.keys(qe).forEach((function(r){t.on(I[r],(function(t){n.trigger(new e.ComponentEvent(qe[r],a({mainIndex:i},t)))}))}))}))},i._createSideState=function(){var e=this.element,n=this.camera.element,t=V(n.children),i=[];if(ce(e,"data-cross-").structure)i=this._getSideStateFromCrossStructure(t);else{var r=this._getGroupFromAttribute(t),o=Object.keys(r);o.length?(i=this._getSideStateFromGroup(r),this.remove(0,this.panelCount-o.length)):i=this._getSideStateFromPanels(t),this._createCrossStructure(i)}return this.resize(),i},i._createCrossStructure=function(e){var n=this,t=document.createElement("div"),i="";t.classList.add(w.CAMERA),e.forEach((function(e,t){var r=n.camera.children[t];i+=e.element.innerHTML,Array.from(r.attributes).forEach((function(e){return r.removeAttribute(e.name)}))})),t.innerHTML=i,e.forEach((function(e,i){var r=n.camera.children[i];[w.VIEWPORT,w.VERTICAL].forEach((function(e){r.classList.contains(e)||r.classList.add(e)})),r.innerHTML=t.outerHTML})),this.element.setAttribute("data-cross-structure","true")},i._getGroupFromAttribute=function(e){var n=[],t={};return e.forEach((function(e){var i=ce(e,"data-cross-").groupkey;i&&!K(n,i)?(n.push(i),t[i]=[e]):i&&t[i].push(e)})),t},i._getSideStateFromGroup=function(e){return Object.keys(e).reduce((function(n,t){var i=n.length?+n[n.length-1].end+1:0,r=e[t].reduce((function(e,n){return e.innerHTML+=n.outerHTML,e}),document.createElement("div"));return d(n,[{key:t,start:i,end:i+e[t].length-1,element:r}])}),[])},i._getSideStateFromPanels=function(e){return e.reduce((function(e,n,t){var i=e.length?+e[e.length-1].end+1:0;return d(e,[{key:t.toString(),start:i,end:i+n.children.length-1,element:n}])}),[])},i._getSideStateFromCrossStructure=function(e){var n=this._getGroupFromAttribute(e);return this._getSideStateFromGroup(n)},i._createSideFlicking=function(){var e=this;return this.sideState.map((function(n,t){return new Ze(e.camera.children[t],a(a({},e.sideOptions),{horizontal:!1,panelsPerView:1,defaultIndex:n.start}))}))},t}(Ze)},Je=function(e,n,t,i,r){return e.batchInsertDefer.apply(e,d(n.added.slice(i,r).map((function(e,n){return{index:e,elements:[t[n]],hasDOMInElements:!1}}))))},Qe=function(e,n,t){var i=e.panels.slice(n,t);return e.batchRemoveDefer({index:n,deleteCount:i.length,hasDOMInElements:!1})},$e=function(e){var n="object"==typeof e?e.camera:e;return nn(n)},en=function(e){var n="object"==typeof e?e.panel:e;return U(nn(n))},nn=function(e){if("number"==typeof e)return e+"px";switch(e){case A.CENTER:return"50%";case A.NEXT:return"100%";case A.PREV:return"0%";default:return e}},tn={__proto__:null,withFlickingMethods:function(n,t){[e.prototype,Ze.prototype].forEach((function(e){Object.getOwnPropertyNames(e).filter((function(e){return!n[e]&&0!==e.indexOf("_")&&"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,d([this[t]],n))}});else{var o={};r.get&&(o.get=function(){var e,n=this[t];return n&&(null===(e=r.get)||void 0===e?void 0:e.call(n))}),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,d([this[t]],n))}),Object.defineProperty(n,i,o)}}))}))},sync:function(e,n,t){var i=e.renderer,r=i.panels,o=d(n.prevList),a=[],s=[];if(n.removed.length>0){var l=-1,u=-1;n.removed.forEach((function(e){l<0&&(l=e),u>=0&&e!==u-1?(s.push.apply(s,d(Qe(i,u,l+1))),l=e,u=e):u=e,o.splice(e,1)})),s.push.apply(s,d(Qe(i,u,l+1)))}if(n.ordered.forEach((function(e){var n=c(e,2),t=n[0],i=n[1],o=r.splice(t,1)[0];r.splice(i,0,o)})),n.ordered.length>0&&(r.forEach((function(e,n){var t=n-e.index;t>0?e.increaseIndex(t):e.decreaseIndex(-t)})),r.sort((function(e,n){return e.index-n.index})),r.forEach((function(e){e.updatePosition()}))),n.added.length>0){var h=-1,f=-1,g=t.slice(o.length);n.added.forEach((function(e,t){h<0&&(h=t),f>=0&&e!==f+1?(a.push.apply(a,d(Je(i,n,g,h,t+1))),h=-1,f=-1):f=e})),h>=0&&a.push.apply(a,d(Je(i,n,g,h)))}if(n.added.length>0||n.removed.length>0)i.updateAfterPanelChange(a,s);else if(n.ordered.length>0){var p=e.camera;p.updateRange(),p.updateOffset(),p.updateAnchors(),p.resetNeedPanelHistory()}},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=c(n,2),i=t[0],r=t[1];return e[i]=r,e}),{}),r=e.panels.filter((function(e){return!t[e.index]}));return e.useCSSOrder||r.sort((function(e,n){return e.position+e.offset-(n.position+n.offset)})),d(r.map((function(e){return n.list[i[e.index]]})),n.added.map((function(e){return n.list[e]})))},getDefaultCameraTransform:function(e,n,t){void 0===e&&(e=A.CENTER),void 0===n&&(n=!0);var i=$e(e),r=en(e);if(null==r)return"";var o="calc("+i+" - ("+(t||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return n?"translate("+o+")":"translate(0, "+o+")"}},rn=function(e){return!e.circular&&0===e.index},on=function(e){return!e.circular&&e.index===e.panelCount-1},an=function(e){return e.panelCount},sn=function(e){return e.index},ln=function(e){var n=e.camera,t=(n.position-n.range.min)/(n.range.max-n.range.min);return 100*Math.min(Math.max(t,0),1)},un=function(e){var n,t,r,o,a=e.onInit,s=e.onDestroy,l=e.setMethods,u=e.getProps;l(["moveTo"]);var c=u().options,d=i.reactive({isReachStart:!(null==c?void 0:c.defaultIndex)||0===(null==c?void 0:c.defaultIndex),isReachEnd:!(!(null==c?void 0:c.totalPanelCount)||!(null==c?void 0:c.defaultIndex))&&c.defaultIndex===c.totalPanelCount-1,totalPanelCount:null!==(n=null==c?void 0:c.totalPanelCount)&&void 0!==n?n:0,currentPanelIndex:null!==(t=null==c?void 0:c.defaultIndex)&&void 0!==t?t:0,progress:0,indexProgress:null!==(r=null==c?void 0:c.defaultIndex)&&void 0!==r?r:0,moveTo:function(e){return null==o?Promise.reject(new Error("Flicking instance is not available")):(null==o?void 0:o.animating)?Promise.resolve():o.moveTo(e)}}),h=function(){void 0!==o&&(d.isReachStart=rn(o),d.isReachEnd=on(o),d.currentPanelIndex=sn(o))},f=function(){void 0!==o&&(h(),d.totalPanelCount=an(o))},g=function(){void 0!==o&&(d.progress=ln(o),d.indexProgress=function(e){var n=e.camera,t=n.anchorPoints,i=t.length,r=n.position,o=e.circularEnabled,a=0,s=n.range,l=s.min,u=s.max,c=t[0],d=u-t[i-1].position+(c.position-l);return t.some((function(e,n){var s=e.position,l=t[n+1];if(0===n&&r<=s)a=o?(r-s)/d:(r-s)/e.panel.size;else if(n===i-1&&r>=s)a=o?n+(r-s)/d:n+(r-s)/e.panel.size;else{if(!(l&&s<=r&&r<=l.position))return!1;a=n+(r-s)/(l.position-s)}return!0})),a}(o))};return a((function(e,n){void 0!==(o=n.flicking)&&(d.isReachStart=rn(o),d.isReachEnd=on(o),d.currentPanelIndex=sn(o),d.progress=ln(o),d.totalPanelCount=an(o),null==o||o.on("changed",h),null==o||o.on("panelChange",f),null==o||o.on("move",g))})),s((function(){null==o||o.off("changed",h),null==o||o.off("panelChange",f),null==o||o.off("move",g)})),d},cn={__proto__:null,flickingReactiveAPIAdapter:un,connectFlickingReactiveAPI:function(e,n){var t=i.adaptReactive(un,(function(){return{flicking:e,options:n}}));t.mounted();var r=t.instance();return t.init(),r}};return j(Ze,{__proto__:null,Viewport:fe,FlickingError:he,AnchorPoint:Ce,VirtualManager:ve,VanillaElementProvider:pe,VirtualElementProvider:_e,Panel:Be,VirtualPanel:Ue}),j(Ze,He),j(Ze,Ne),j(Ze,Ye),j(Ze,D),j(Ze,tn),j(Ze,de),j(Ze,Ke),j(Ze,cn),Ze}));
|
|
9
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("@egjs/component"),require("@egjs/axes"),require("@egjs/imready"),require("@cfcs/core")):"function"==typeof define&&define.amd?define(["@egjs/component","@egjs/axes","@egjs/imready","@cfcs/core"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=n(e.eg.Component,e.eg.Axes,e.eg.ImReady,e.core)}(this,(function(e,n,t,i){"use strict";var r=function(e,n){return r=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])},r(e,n)};function o(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}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var a=function(){return a=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},a.apply(this,arguments)};function s(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 l(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(s){return function(l){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(t=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=n.call(e,a)}catch(e){s=[6,e],i=0}finally{t=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function u(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 c(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 d(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(c(arguments[n]));return e}"function"==typeof SuppressedError&&SuppressedError;var h,f={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},g=function(e,n){return e+"("+typeof e+") is not a "+n.map((function(e){return'"'+e+'"'})).join(" or ")+"."},p=function(e){return'Element with selector "'+e+'" not found.'},_=function(e,n){return n+" should be provided. Given: "+e},v='This module is not attached to the Flicking instance. "init()" should be called first.',m=function(e,n){return'Option "'+e+'" is not in correct format, given: '+n},b=function(e,n,t){return'Index "'+e+'" is out of range: should be between '+n+" and "+t+"."},P=function(e){return'Position "'+e+'" is not reachable.'},E="Browser does not support CSS transform.",O="Event stop() is called by user.",x="Animation is interrupted by user input.",y="Animation is already playing.",T="This behavior is not allowed in the frameworks like React, Vue, or Angular.",R="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"},A={PREV:"prev",CENTER:"center",NEXT:"next"},C={PREV:"PREV",NEXT:"NEXT",NONE:null},S={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},w={VIEWPORT:"flicking-viewport",CAMERA:"flicking-camera",VERTICAL:"vertical",HIDDEN:"flicking-hidden",DEFAULT_VIRTUAL:"flicking-panel"},z={LINEAR:"linear",BOUND:"bound"},N={LTR:"ltr",RTL:"rtl"},k={HORIZONTAL:"horizontal",VERTICAL:"vertical"},D={__proto__:null,EVENTS:I,ALIGN:A,DIRECTION:C,MOVE_TYPE:S,CLASS:w,CIRCULAR_FALLBACK:z,ORDER:N,MOVE_DIRECTION:k,ERROR_CODE:f},j=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},L=function(e,n){var t=null;if(J(e)){var i=(n||document).querySelector(e);if(!i)throw new he(p(e),f.ELEMENT_NOT_FOUND);t=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(t=e);if(!t)throw new he(g(e,["HTMLElement","string"]),f.WRONG_TYPE);return t},M=function(e,n){if(null==e)throw new he(_(e,n),f.VAL_MUST_NOT_NULL)},H=function(e,n,t){return Math.max(Math.min(e,t),n)},F=function(e){if(!e)throw new he(v,f.NOT_ATTACHED_TO_FLICKING);return e},V=function(e){return[].slice.call(e)},G=function(e,n){var t;if(J(e))switch(e){case A.PREV:t=0;break;case A.CENTER:t=.5*n;break;case A.NEXT:t=n;break;default:if(null==(t=W(e,n)))throw new he(m("align",e),f.WRONG_OPTION)}else t=e;return t},B=function(e,n){var t;if(Array.isArray(e))t=e.map((function(e){return W(e,n)}));else{var i=W(e,n);t=[i,i]}return t.map((function(n){if(null==n)throw new he(m("bounce",e),f.WRONG_OPTION);return n}))},W=function(e,n){var t=U(e);return null==t?null:t.percentage*n+t.absolute},U=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},X=function(e){return"object"==typeof e?e.panel:e},Y=function(e,n){return e===n?C.NONE:e<n?C.NEXT:C.PREV},Z=function(e){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){if(J(e)){var t=document.createElement("div");for(t.innerHTML=e,n.push.apply(n,d(V(t.children)));t.firstChild;)t.removeChild(t.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new he(g(e,["HTMLElement","string"]),f.WRONG_TYPE);n.push(e)}})),n},q=function(e,n){return H(e<0?e+n:e,0,n)},K=function(e,n){var t,i;try{for(var r=u(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},J=function(e){return"string"==typeof e},Q=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},$=function(e,n){var t,i;try{for(var r=u(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},ee=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1},ne=function(e,n,t){return(e-n)/(t-n)},te=function(e){return e?window.getComputedStyle(e)||e.currentStyle:{}},ie=function(e,n){var t=n.width,i=n.height;e&&(null!=t&&(J(t)?e.style.width=t:e.style.width=t+"px"),null!=i&&(J(i)?e.style.height=i:e.style.height=i+"px"))},re=function(e,n,t){return e>=n&&e<=t},oe=function(e,n){return e>=n?e%n:e<0?q((e+1)%n-1,n):e},ae=function(e){for(var n=new Array(e),t=0;t<e;t++)n[t]=t;return n},se=function(e){var n=e.el,t=e.horizontal,i=e.useFractionalSize,r=e.useOffset,o=e.style,a=0;if(i){var s=parseFloat(t?o.width:o.height)||0,l="border-box"===o.boxSizing,u=t?parseFloat(o.borderLeftWidth||"0")+parseFloat(o.borderRightWidth||"0"):parseFloat(o.borderTopWidth||"0")+parseFloat(o.borderBottomWidth||"0");if(l)a=r?s:s-u;else{var c=t?parseFloat(o.paddingLeft||"0")+parseFloat(o.paddingRight||"0"):parseFloat(o.paddingTop||"0")+parseFloat(o.paddingBottom||"0");a=r?s+c+u:s+c}}else{var d=t?"Width":"Height";a=r?n["offset"+d]:n["client"+d]}return Math.max(a,0)},le=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},ue=function(e){return e.replace(/[\s-_]([a-z])/g,(function(e,n){return n.toUpperCase()}))},ce=function(e,n){for(var t={},i=e.attributes,r=i.length,o=0;o<r;++o){var a=i[o],s=a.name,l=a.value;-1!==s.indexOf(n)&&(t[ue(s.replace(n,""))]=l)}return t},de={__proto__:null,merge:j,getElement:L,checkExistence:M,clamp:H,getFlickingAttached:F,toArray:V,parseAlign:G,parseBounce:B,parseArithmeticSize:W,parseArithmeticExpression:U,parseCSSSizeValue:function(e){return J(e)?e:e+"px"},parsePanelAlign:X,getDirection:Y,parseElement:Z,getMinusCompensatedIndex:q,includes:K,isString:J,circulatePosition:Q,find:$,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:ee,getProgress:ne,getStyle:te,setSize:ie,isBetween:re,circulateIndex:oe,range:ae,getElementSize:se,setPrototypeOf:le,camelize:ue,getDataAttributes:ce},he=function(e){function n(t,i){var r=e.call(this,t)||this;return le(r,n.prototype),r.name="FlickingError",r.code=i,r}return o(n,e),n}(Error),fe=function(){function e(e,n){this._flicking=e,this._el=n,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(J(n))i.style.width=n;else{var a=o?n+r.left+r.right:n;i.style.width=a+"px"}if(null!=t)if(J(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=te(e),t=this._flicking.useFractionalSize;this._width=se({el:e,horizontal:!0,useFractionalSize:t,useOffset:!1,style:n}),this._height=se({el:e,horizontal:!1,useFractionalSize:t,useOffset:!1,style:n}),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}(),ge=function(){function e(e){var n,t=this;this._onResizeWrapper=function(){t._onResize([])},this._onResize=function(e){var n=t._flicking,i=n.resizeDebounce,r=n.maxResizeDebounce,o=n.element;if(e.find((function(e){return e.target===n.element}))&&1===e.length){var a={width:n.viewport.width,height:n.viewport.height},s={width:se({el:o,horizontal:!0,useFractionalSize:t._flicking.useFractionalSize,useOffset:!1,style:te(o)}),height:se({el:o,horizontal:!1,useFractionalSize:t._flicking.useFractionalSize,useOffset:!1,style:te(o)})};if(a.height===s.height&&a.width===s.width)return}i<=0?n.resize():(t._maxResizeDebounceTimer<=0&&r>0&&r>=i&&(t._maxResizeDebounceTimer=window.setTimeout(t._doScheduledResize,r)),t._resizeTimer>0&&(clearTimeout(t._resizeTimer),t._resizeTimer=0),t._resizeTimer=window.setTimeout(t._doScheduledResize,i))},this._doScheduledResize=function(){clearTimeout(t._resizeTimer),clearTimeout(t._maxResizeDebounceTimer),t._maxResizeDebounceTimer=-1,t._resizeTimer=-1,t._flicking.resize()},this._skipFirstResize=(n=!0,function(e){n?n=!1:t._onResize(e)}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}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);this._resizeObserver=t,this.observe(e.viewport.element),e.observePanelResize&&this.observePanels()}else window.addEventListener("resize",this._onResizeWrapper);return this._enabled=!0,this},n.observePanels=function(){var e=this;return this._flicking.panels.forEach((function(n){e.observe(n.element)})),this},n.unobservePanels=function(){var e=this;return this._flicking.panels.forEach((function(n){e.unobserve(n.element)})),this},n.observe=function(e){var n=this._resizeObserver;return n?(n.observe(e),this):this},n.unobserve=function(e){var n=this._resizeObserver;return n?(n.unobserve(e),this._flicking.observePanelResize&&this.unobservePanels(),this):this},n.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResizeWrapper),this._enabled=!1,this},e}(),pe=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}(),_e=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}(),ve=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:w.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:ae(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();ae(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}(),me={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},be="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"}(h||(h={}));var Pe=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[be];if(o){this._delta+=o;var a=t.camera,s=a.position,l=i.pos[be],u=t.circularEnabled?Q(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:Y(0,i.delta[be]),axesEvent:i});t.trigger(c),c.isCanceled()&&(a.lookAt(s),r(h.DISABLED))}},n}(),Ee=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!1,e}o(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(h.DISABLED);else{var o=new e.ComponentEvent(I.HOLD_START,{axesEvent:i});t.trigger(o),o.isCanceled()?r(h.DISABLED):r(h.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:Y(o.start,o.end),axesEvent:i});t.trigger(a),a.isCanceled()?r(h.DISABLED):r(h.ANIMATING).onChange(n)},t}(Pe),Oe=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!1,e._releaseEvent=null,e}o(t,n);var i=t.prototype;return i.onChange=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=i.inputEvent;if(o){var a=t.horizontal?o.offsetX:o.offsetY,s=new e.ComponentEvent(I.MOVE_START,{isTrusted:i.isTrusted,holding:this.holding,direction:Y(0,-a),axesEvent:i});t.trigger(s),s.isCanceled()?r(h.DISABLED):r(h.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(h.IDLE);this._releaseEvent=i},i.onFinish=function(n){var t,i,r=n.flicking;if((0,n.transitTo)(h.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 l=r.renderer.panels,c=null;try{for(var d=u(l),f=d.next();!f.done;f=d.next()){var g=f.value;if(g.contains(o)){c=g;break}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}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:Y(p,_)}))}}},t}(Pe),xe=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!0,e}o(t,n);var i=t.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(n){var t,i=n.flicking,r=n.axesEvent,o=n.transitTo;if(i.trigger(new e.ComponentEvent(I.HOLD_END,{axesEvent:r})),i.renderer.panelCount<=0)o(h.IDLE);else{o(h.ANIMATING);var a=i.control,s=r.destPos[be],l=Math.max(r.duration,i.duration);try{a.moveToPosition(s,l,r)}catch(e){o(h.IDLE),r.setTo(((t={})[be]=i.camera.position,t),0)}}},t}(Pe),ye=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!0,e}o(t,n);var i=t.prototype;return i.onHold=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=this._targetPanel,a=t.control;this._delta=0,t.control.updateInput(),t.changeOnHold&&o&&a.setActive(o,a.activePanel,i.isTrusted);var s=new e.ComponentEvent(I.HOLD_START,{axesEvent:i});t.trigger(s),s.isCanceled()?r(h.DISABLED):r(h.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(h.IDLE),t.trigger(new e.ComponentEvent(I.MOVE_END,{isTrusted:i.isTrusted,direction:Y(a.start,a.end),axesEvent:i}));var s=this._targetPanel;s&&o.setActive(s,o.activePanel,i.isTrusted)},t}(Pe),Te=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}o(n,e);var t=n.prototype;return t.onAnimationEnd=function(e){(0,e.transitTo)(h.IDLE)},t.onChange=function(e){var n=e.axesEvent,t=e.transitTo;n.stop(),t(h.IDLE)},t.onRelease=function(e){var n=e.axesEvent,t=e.transitTo;0===n.delta.flick&&t(h.IDLE)},n}(Pe),Re=function(){function e(){var e=this;this.transitTo=function(n){var t;switch(n){case h.IDLE:t=new Ee;break;case h.HOLDING:t=new Oe;break;case h.DRAGGING:t=new xe;break;case h.ANIMATING:t=new ye;break;case h.DISABLED:t=new Te}return t.onEnter(e._state),e._state=t,e._state},this._state=new Ee}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=a(a({},n),{transitTo:this.transitTo});switch(e){case me.HOLD:t.onHold(i);break;case me.CHANGE:t.onChange(i);break;case me.RELEASE:t.onRelease(i);break;case me.ANIMATION_END:t.onAnimationEnd(i);break;case me.FINISH:t.onFinish(i)}},e}(),Ie=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){var n;e._dragged=!!(null===(n=e._panInput)||void 0===n?void 0:n.isEnabled())},this._preventClickWhenDragged=function(n){e._dragged&&(n.preventDefault(),n.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new Re}var t=e.prototype;return Object.defineProperty(t,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panInput",{get:function(){return this._panInput},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[be];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.isEnabled())&&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([be])[be])&&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[be].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[be].bounce},enumerable:!1,configurable:!0}),t.init=function(e){var t,i=this;this._flicking=e,this._axes=new n(((t={})[be]={range:[0,0],circular:!1,bounce:[0,0]},t),{deceleration:e.deceleration,interruptable:e.interruptable,nested:e.nested,easing:e.easing}),this._panInput=new n.PanInput(e.viewport.element,{inputType:e.inputType,threshold:e.dragThreshold,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,preventDefaultOnDrag:e.preventDefaultOnDrag,scale:e.horizontal?[e.camera.panelOrder===N.RTL?1:-1,0]:[0,-1],releaseOnScroll:!0});var r=this._axes;r.connect(e.horizontal?[be,""]:["",be],this._panInput);var o=function(n){var t=me[n];r.on(t,(function(n){i._stateMachine.fire(t,{flicking:e,axesEvent:n})}))};for(var a in me)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.release=function(){var e;return null===(e=this._panInput)||void 0===e||e.release(),this},t.updateAnimation=function(e,n){var t,i;return this._animatingContext=a(a({},this._animatingContext),{end:e}),null===(i=this._axes)||void 0===i||i.updateAnimation({destPos:(t={},t[be]=e,t),duration:n}),this},t.stopAnimation=function(){var e;return null===(e=this._axes)||void 0===e||e.stopAnimation(),this},t.update=function(e){var n,t=F(this._flicking),i=t.camera,r=this._axes,o=r.axis[be];return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=B(t.bounce,i.size),r.axisManager.set(((n={})[be]=e.position,n)),this},t.addPreventClickHandler=function(){var e=F(this._flicking),n=this._axes,t=e.camera.element;return n.on(me.HOLD,this._onAxesHold),n.on(me.CHANGE,this._onAxesChange),t.addEventListener("click",this._preventClickWhenDragged,!0),this},t.removePreventClickHandler=function(){var e=F(this._flicking),n=this._axes,t=e.camera.element;return n.off(me.HOLD,this._onAxesHold),n.off(me.CHANGE,this._onAxesChange),t.removeEventListener("click",this._preventClickWhenDragged,!0),this},t.animateTo=function(e,n,t){var i,r=this,o=this._axes,a=this._stateMachine.state;if(!o)return Promise.reject(new he(v,f.NOT_ATTACHED_TO_FLICKING));var s=this.getCurrentPosition();if(s===e){var l=F(this._flicking);return l.camera.lookAt(e),a.targetPanel&&l.control.setActive(a.targetPanel,l.control.activePanel,null!==(i=null==t?void 0:t.isTrusted)&&void 0!==i&&i),Promise.resolve()}this._animatingContext={start:s,end:e,offset:0};return new Promise((function(i,a){var s=function(){o.off(me.HOLD,l),i()},l=function(){o.off(me.FINISH,s),a(new he(x,f.ANIMATION_INTERRUPTED))};o.once(me.FINISH,s),o.once(me.HOLD,l),function(){var i,a;o.once(me.FINISH,(function(){r._animatingContext={start:0,end:0,offset:0}})),t?t.setTo(((i={})[be]=e,i),n):o.setTo(((a={})[be]=e,a),n)}()}))},t.getCurrentPosition=function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.get([be])[be])&&void 0!==n?n:0},t.updateDirection=function(){var e=F(this._flicking),n=this._axes,t=this._panInput;n.disconnect(t),n.connect(e.horizontal?[be,""]:["",be],t),t.options.scale=e.horizontal?[e.camera.panelOrder===N.RTL?1:-1,0]:[0,-1]},t._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),Ae=function(){function n(){this._flicking=null,this._controller=new Ie,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.release=function(){return this._controller.release(),this},t.updateAnimation=function(e,n,t){var i=this._controller.state,r=this._getPosition(e,null!=t?t:C.NONE);return i.targetPanel=e,this._controller.updateAnimation(r,n),this},t.stopAnimation=function(){return this._controller.state.targetPanel=null,this._controller.stopAnimation(),this},t.updatePosition=function(e){var n=F(this._flicking).camera,t=this._activePanel;t&&n.lookAt(n.clampToReachablePosition(t.position))},t.updateInput=function(){var e=F(this._flicking).camera;return this._controller.update(e.controlParams),this},t.resetActive=function(){return this._activePanel=null,this},t.moveToPanel=function(e,n){var t=n.duration,i=n.direction,r=void 0===i?C.NONE:i,o=n.axesEvent;return s(this,void 0,void 0,(function(){var n;return l(this,(function(i){return n=this._getPosition(e,r),this._triggerIndexChangeEvent(e,e.position,o,r),[2,this._animateToPosition({position:n,duration:t,newActivePanel:e,axesEvent:o})]}))}))},t.setActive=function(n,t,i){var r,o=F(this._flicking);this._activePanel=n,this._nextPanel=null,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?Y(t.position,n.position):C.NONE})):o.trigger(new e.ComponentEvent(I.RESTORED,{isTrusted:i}))},t.copy=function(e){this._flicking=e._flicking,this._activePanel=e._activePanel,this._controller=e._controller},t._triggerIndexChangeEvent=function(n,t,i,r){var o,a=F(this._flicking),s=n!==this._activePanel?I.WILL_CHANGE:I.WILL_RESTORE,l=a.camera,u=this._activePanel,c=new e.ComponentEvent(s,{index:n.index,panel:n,isTrusted:(null==i?void 0:i.isTrusted)||!1,direction:null!=r?r:Y(null!==(o=null==u?void 0:u.position)&&void 0!==o?o:l.position,t)});if(this._nextPanel=n,a.trigger(c),c.isCanceled())throw new he(O,f.STOP_CALLED_BY_USER)},t._animateToPosition=function(e){var n=e.position,t=e.duration,i=e.newActivePanel,r=e.axesEvent;return s(this,void 0,void 0,(function(){var e,o,a,u=this;return l(this,(function(c){return e=F(this._flicking),o=t,Math.abs(o-n)<e.animationThreshold&&(o=0),a=function(){return u._controller.animateTo(n,o,r)},this._controller.state.targetPanel=i,o<=0?[2,a()]:[2,a().then((function(){return s(u,void 0,void 0,(function(){return l(this,(function(n){switch(n.label){case 0:return e.initialized?[4,e.renderer.render()]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))})).catch((function(e){if(!(r&&e instanceof he&&e.code===f.ANIMATION_INTERRUPTED))throw e}))]}))}))},t._getPosition=function(e,n){void 0===n&&(n=C.NONE);var t=F(this._flicking),i=t.camera,r=e.position,o=i.findNearestAnchor(r);if(e.removed||!o)throw new he(P(e.position),f.POSITION_NOT_REACHABLE);if(i.canReach(e)){if(t.circularEnabled){var a=this._controller.position,s=i.rangeDiff,l=[r,r+s,r-s].filter((function(e){return n===C.NONE||(n===C.PREV?e<=a:e>=a)}));r=l.reduce((function(e,n){return Math.abs(a-n)<Math.abs(a-e)?n:e}),1/0)}}else r=o.position,e=o.panel;return r},n}(),Ce=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}(),Se=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}o(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){var i=F(this._flicking),r=i.camera,o=r.findActiveAnchor(),a=r.findNearestAnchor(r.position),s=this._controller.state;if(!o||!a)return Promise.reject(new he(P(e),f.POSITION_NOT_REACHABLE));var l,u=this._calcSnapThreshold(i.threshold,e,o),c=i.animating?s.delta:e-r.position,d=Math.abs(c),h=t&&0!==t.delta[be]?Math.abs(t.delta[be]):d;if(h>=u&&h>0)l=this._findSnappedAnchor(e,a);else{if(!(d>=i.threshold&&d>0))return this.moveToPanel(a.panel,{duration:n,axesEvent:t});l=this._findAdjacentAnchor(e,c,a)}return this._triggerIndexChangeEvent(l.panel,e,t),this._animateToPosition({position:r.clampToReachablePosition(l.position),duration:n,newActivePanel:l.panel,axesEvent:t})},t._findSnappedAnchor=function(e,n){var t=F(this._flicking),i=t.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!n||!s)throw new he(P(e),f.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 d=c*l,h=s.index+d;if(Math.abs(h-n.index)<=r){var g=u[s.index];return new Ce({index:g.index,position:g.position+c*i.rangeDiff,panel:g.panel})}if(t.circularEnabled){var p=u[oe(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 Ce({index:p.index,position:p.position+_*i.rangeDiff,panel:p.panel})}return u[H(n.index+Math.sign(e-o)*r,0,u.length-1)]},t._findAdjacentAnchor=function(e,n,t){var i,r=F(this._flicking).camera;if(r.circularEnabled){var o=r.findAnchorIncludePosition(e);if(o&&o.position!==t.position)return o}return null!==(i=n>0?r.getNextAnchor(t):r.getPrevAnchor(t))&&void 0!==i?i:t},t._calcSnapThreshold=function(e,n,t){var i=n>t.position,r=t.panel,o=r.size,a=r.alignPosition;return Math.max(e,i?o-a+r.margin.next:a+r.margin.prev)},n}(Ae),we=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}o(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=F(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){var i=F(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new he(P(e),f.POSITION_NOT_REACHABLE));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,t),this._animateToPosition({position:this._stopAtEdge?r:e,duration:n,newActivePanel:a,axesEvent:t})},n}(Ae),ze=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}o(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=F(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,d=i.panelCount,h=c-a,f=c+a;h<0&&(h=n.circularEnabled?q((h+1)%d-1,d):H(h,0,d-1)),f>=d&&(f=n.circularEnabled?f%d:H(f,0,d-1));var g=i.panels[h],p=i.panels[f],_=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.moveToPanel=function(n,t){return s(this,void 0,void 0,(function(){var i,r;return l(this,(function(o){return i=F(this._flicking),r=i.camera,this._controller.update(r.controlParams),[2,e.prototype.moveToPanel.call(this,n,t)]}))}))},t.moveToPosition=function(e,n,t){var i,r=F(this._flicking),o=r.camera,a=null!==(i=this._nextPanel)&&void 0!==i?i:this._activePanel,s=this._controller.range,l=this._indexRange,u=o.range,c=this._controller.state,d=H(o.clampToReachablePosition(e),s[0],s[1]),h=o.findAnchorIncludePosition(d);if(!h||!a)return Promise.reject(new he(P(e),f.POSITION_NOT_REACHABLE));var g,p,_=a.position,v=r.animating?c.delta:e-o.position,m=Math.abs(v)>=r.threshold,b=e>_?o.getNextAnchor(h):o.getPrevAnchor(h),E=o.anchorPoints,O=E[0],x=E[E.length-1],y=e<u.min&&re(O.panel.index,l.min,l.max),T=e>u.max&&re(x.panel.index,l.min,l.max),R=b&&(l.min<=l.max?re(b.index,l.min,l.max):b.index>=l.min||b.index<=l.max);if(y||T){var I=e<u.min?O:x;p=I.panel,g=I.position}else if(m&&h.position!==a.position)p=h.panel,g=h.position;else{if(!m||!R){var A=o.findNearestAnchor(o.position);return A?this.moveToPanel(A.panel,{duration:n,axesEvent:t}):Promise.reject(new he(P(e),f.POSITION_NOT_REACHABLE))}p=b.panel,g=b.position}return this._triggerIndexChangeEvent(p,e,t),this._animateToPosition({position:g,duration:n,newActivePanel:p,axesEvent:t})},t._resetIndexRange=function(){this._indexRange={min:0,max:0}},n}(Ae),Ne={__proto__:null,Control:Ae,SnapControl:Se,FreeControl:we,StrictControl:ze,AxesController:Ie,State:Pe,IdleState:Ee,HoldingState:Oe,DraggingState:xe,AnimatingState:ye,DisabledState:Te,StateMachine:Re},ke=function(){function e(e){this._flicking=e}var n=e.prototype;return n.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new Ce({index:n,position:e.position,panel:e})}))},n.findAnchorIncludePosition=function(e){return this._flicking.camera.anchorPoints.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)},n.findNearestAnchor=function(e){var n=this._flicking.camera.anchorPoints;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]},n.clampToReachablePosition=function(e){var n=this._flicking.camera.range;return H(e,n.min,n.max)},n.getCircularOffset=function(){return 0},n.canReach=function(e){var n=this._flicking.camera.range;if(e.removed)return!1;var t=e.position;return t>=n.min&&t<=n.max},n.canSee=function(e){var n=this._flicking.camera.visibleRange;return e.isVisibleOnRange(n.min,n.max)},e}(),De=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t.checkAvailability=function(){return!0},t.getRange=function(){var e,n,t=this._flicking.renderer,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);return{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}},n}(ke),je=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t.checkAvailability=function(){var e=this._flicking,n=e.renderer.panels;if(n.length<=0)return!1;var t=n[0],i=n[n.length-1],r=t.range.min-t.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return n.every((function(e){return s-e.size>=a}))},t.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var n=e[0],t=e[e.length-1];return{min:n.range.min-n.margin.prev,max:t.range.max+t.margin.next}},t.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new Ce({index:n,position:e.position,panel:e})}))},t.findNearestAnchor=function(e){var n=this._flicking.camera,t=n.anchorPoints;if(t.length<=0)return null;for(var i=n.range,r=1/0,o=-1,a=0;a<t.length;a++){var s=t[a],l=Math.min(Math.abs(s.position-e),Math.abs(s.position-i.min+i.max-e),Math.abs(e-i.min+i.max-s.position));l<r&&(r=l,o=a)}return t[o]},t.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints,o=t.rangeDiff,a=r.length,s=Q(n,i.min,i.max),l=e.prototype.findAnchorIncludePosition.call(this,s);if(a>0&&(n===i.min||n===i.max)){var u=[l,new Ce({index:0,position:r[0].position+o,panel:r[0].panel}),new Ce({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));l=u.reduce((function(e,t){return e&&Math.abs(e.position-n)<Math.abs(t.position-n)?e:t}),null)}if(!l)return null;if(n<i.min){var c=-Math.floor((i.min-n)/o)-1;return new Ce({index:l.index,position:l.position+o*c,panel:l.panel})}if(n>i.max){c=Math.floor((n-i.max)/o)+1;return new Ce({index:l.index,position:l.position+o*c,panel:l.panel})}return l},t.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var n=e.panels.filter((function(e){return e.toggled})),t=n.filter((function(e){return e.toggleDirection===C.PREV})),i=n.filter((function(e){return e.toggleDirection===C.NEXT}));return this._calcPanelAreaSum(t)-this._calcPanelAreaSum(i)},t.clampToReachablePosition=function(e){return e},t.canReach=function(e){return!e.removed},t.canSee=function(n){var t=this._flicking.camera,i=t.range,r=t.rangeDiff,o=t.visibleRange,a=e.prototype.canSee.call(this,n);return o.min<i.min?a||n.isVisibleOnRange(o.min+r,o.max+r):o.max>i.max?a||n.isVisibleOnRange(o.min-r,o.max-r):a},t._calcPanelAreaSum=function(e){return e.reduce((function(e,n){return e+n.sizeIncludingMargin}),0)},n}(ke),Le=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t.checkAvailability=function(){var e=this._flicking,n=e.renderer,t=n.getPanel(0),i=n.getPanel(n.panelCount-1);if(!t||!i)return!1;var r=e.camera.size,o=t.range.min;return r<i.range.max-o},t.getRange=function(){var e=this._flicking,n=e.renderer,t=e.camera.alignPosition,i=n.getPanel(0),r=n.getPanel(n.panelCount-1);if(!i||!r)return{min:0,max:0};var o=e.camera.size,a=i.range.min,s=r.range.max,l=a+t,u=s-o+t;if(o<s-a)return{min:l,max:u};var c=e.camera.align,d="object"==typeof c?c.camera:c,h=l+G(d,u-l);return{min:h,max:h}},t.getAnchors=function(){var e=this._flicking,n=e.camera,t=e.renderer.panels;if(t.length<=0)return[];var i=e.camera.range,r=t.filter((function(e){return n.canReach(e)}));if(r.length>0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,s=o?1:0,l=r.map((function(e,n){return new Ce({index:n+s,position:e.position,panel:e})}));return o&&l.splice(0,0,new Ce({index:0,position:i.min,panel:t[r[0].index-1]})),a&&l.push(new Ce({index:l.length,position:i.max,panel:t[r[r.length-1].index+1]})),l}if(i.min!==i.max){var u=this._findNearestPanel(i.min,t),c=u.index===t.length-1?u.prev():u,d=c.next();return[new Ce({index:0,position:i.min,panel:c}),new Ce({index:1,position:i.max,panel:d})]}return[new Ce({index:0,position:i.min,panel:this._findNearestPanel(i.min,t)})]},t.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints;return r.length<=0?null:n<=i.min?r[0]:n>=i.max?r[r.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}(ke),Me=function(){function n(e,n){var t=this,i=(void 0===n?{}:n).align,r=void 0===i?A.CENTER:i;this._lookedOffset=0,this._checkTranslateSupport=function(){var e,n,i=document.documentElement.style,r="";try{for(var o=u(["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&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}if(!r)throw new he(E,f.TRANSFORM_NOT_SUPPORTED);t._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}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 V(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking,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(),d=c?c.position+c.offset:s-o[0];return d>r&&(d-=u),i.index-1+ne(n,d,r)}var h=i.next(),f=h?h.position+h.offset:l+o[1];return f<r&&(f+=u),i.index+ne(n,r,f)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panelOrder",{get:function(){return this._panelOrder},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(){var e=this._flicking.viewport.element;return M(e.firstElementChild,"First element child of the viewport element"),this._el=e.firstElementChild,this._checkTranslateSupport(),this._updateMode(),this.updatePanelOrder(),this},t.destroy=function(){return this._resetInternalValues(),this},t.lookAt=function(e){var n=this,t=this._offset,i=this._lookedOffset!==t,r=F(this._flicking),o=this._position;this._position=e;var a=this._togglePanels(o,e);this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(o,e),a?r.renderer.render().then((function(){n.updateOffset(),n._lookedOffset=n._offset})):i?(this.updateOffset(),this._lookedOffset=this._offset):this.applyTransform()},t.getPrevAnchor=function(e){if(this._circularEnabled&&0===e.index){var n=this._anchors,t=this.rangeDiff,i=n[n.length-1];return new Ce({index:i.index,position:i.position-t,panel:i.panel})}return this._anchors[e.index-1]||null},t.getNextAnchor=function(e){var n=this._anchors;if(this._circularEnabled&&e.index===n.length-1){var t=this.rangeDiff,i=n[0];return new Ce({index:i.index,position:i.position+t,panel:i.panel})}return n[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._mode.findAnchorIncludePosition(e)},t.findNearestAnchor=function(e){return this._mode.findNearestAnchor(e)},t.findActiveAnchor=function(){var e,n=F(this._flicking).control.activePanel;return n?null!==(e=$(this._anchors,(function(e){return e.panel.index===n.index})))&&void 0!==e?e:this.findNearestAnchor(n.position):null},t.clampToReachablePosition=function(e){return this._mode.clampToReachablePosition(e)},t.canReach=function(e){return this._mode.canReach(e)},t.canSee=function(e){return this._mode.canSee(e)},t.updateRange=function(){var e=F(this._flicking).renderer.panels;return this._updateMode(),this._range=this._mode.getRange(),e.forEach((function(e){return e.updateCircularToggleDirection()})),this},t.updateAlignPos=function(){var e=this._align,n="object"==typeof e?e.camera:e;return this._alignPos=G(n,this.size),this},t.updateAnchors=function(){return this._anchors=this._mode.getAnchors(),this},t.updateAdaptiveHeight=function(){var e=F(this._flicking),n=e.control.activePanel,t=d(e.visiblePanels);if(n&&t.push(n),e.horizontal&&e.adaptive&&t.length){var i=Math.max.apply(Math,d(t.map((function(e){return e.height}))));e.viewport.setSize({height:i})}},t.updateOffset=function(){var e=F(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._circularOffset=this._mode.getCircularOffset(),this.applyTransform(),this},t.updatePanelOrder=function(){var e=F(this._flicking);if(!e.horizontal)return this;var n=this._el,t=te(n).direction;return t!==this._panelOrder&&(this._panelOrder=t===N.RTL?N.RTL:N.LTR,e.initialized&&e.control.controller.updateDirection()),this},t.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},t.applyTransform=function(){var e=this._el,n=F(this._flicking);if(n.renderer.rendering||!n.initialized)return this;var t=this._position-this._alignPos-this._offset+this._circularOffset;return e.style[this._transform]=n.horizontal?"translate("+(this._panelOrder===N.RTL?t:-t)+"px)":"translate(0, "+-t+"px)",this},t._resetInternalValues=function(){this._position=0,this._lookedOffset=0,this._alignPos=0,this._offset=0,this._circularOffset=0,this._circularEnabled=!1,this._range={min:0,max:0},this._visiblePanels=[],this._anchors=[],this._needPanelTriggered={prev:!1,next:!1}},t._refreshVisiblePanels=function(){var n=this,t=F(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!K(r,e)})),a=r.filter((function(e){return!K(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=F(this._flicking),i=t.renderer.panels;if(i.length<=0)return n.prev||(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:C.PREV})),n.prev=!0),void(n.next||(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:C.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],d=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:C.PREV})),n.prev=!0);if(!n.next)(u>=d.range.max-s||r>=a.max-s)&&(t.trigger(new e.ComponentEvent(I.NEED_PANEL,{direction:C.NEXT})),n.next=!0)}},t._checkReachEnd=function(n,t){var i=F(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?C.PREV:C.NEXT;i.trigger(new e.ComponentEvent(I.REACH_EDGE,{direction:s}))}},t._updateMode=function(){var e=F(this._flicking);if(e.circular){var n=new je(e),t=n.checkAvailability();if(t)this._mode=n;else{var i=e.circularFallback;this._mode=i===z.BOUND?new Le(e):new De(e)}this._circularEnabled=t}else this._mode=e.bound?new Le(e):new De(e),this._circularEnabled=!1},t._togglePanels=function(e,n){return n!==e&&F(this._flicking).renderer.panels.map((function(t){return t.toggle(e,n)})).some((function(e){return e}))},n}(),He={__proto__:null,Camera:Me,LinearCameraMode:De,CircularCameraMode:je,BoundCameraMode:Le},Fe=function(){function n(e){var n=e.align,t=void 0===n?A.CENTER:n,i=e.strategy;this._flicking=null,this._panels=[],this._rendering=!1,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,"rendering",{get:function(){return this._rendering},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=X(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.getRenderedPanels=function(){return F(this._flicking).renderer.panels.filter((function(e){return e.rendered}))},i.updatePanelSize=function(){var e=F(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 e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchInsertDefer.apply(this,d(e));return t.length<=0?[]:(this.updateAfterPanelChange(t,[]),t)},i.batchInsertDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=F(this._flicking),o=i[0],a=X(this._align);return n.reduce((function(n,t){var s,l=q(t.index,i.length),u=i.slice(l),c=t.elements.map((function(n,t){return e._createPanel(n,{index:l+t,align:a,flicking:r})}));if(i.splice.apply(i,d([l,0],c)),t.hasDOMInElements&&e._insertPanelElements(c,null!==(s=u[0])&&void 0!==s?s:null),r.panelsPerView>0){var h=o||c[0].resize();e._updatePanelSizeByGrid(h,c)}else c.forEach((function(e){return e.resize()}));return u.forEach((function(e){e.increaseIndex(c.length),e.updatePosition()})),d(n,c)}),[])},i.batchRemove=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchRemoveDefer.apply(this,d(e));return t.length<=0?[]:(this.updateAfterPanelChange([],t),t)},i.batchRemoveDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=F(this._flicking).control,o=r.activePanel;return n.reduce((function(n,t){var a=t.index,s=t.deleteCount,l=q(a,i.length),u=i.slice(l+s),c=i.splice(l,s);return c.length<=0?[]:(u.forEach((function(e){e.decreaseIndex(c.length),e.updatePosition()})),t.hasDOMInElements&&e._removePanelElements(c),c.forEach((function(e){return e.destroy()})),K(c,o)&&r.resetActive(),d(n,c))}),[])},i.updateAfterPanelChange=function(n,t){var i,r=F(this._flicking),o=r.camera,a=r.control,s=this._panels,l=a.activePanel;if(this._updateCameraAndControl(),r.autoResize&&r.useResizeObserver&&(n.forEach((function(e){e.element&&r.autoResizer.observe(e.element)})),t.forEach((function(e){e.element&&r.autoResizer.unobserve(e.element)}))),this.render(),!r.animating)if(!l||l.removed)if(s.length<=0)o.lookAt(0);else{var u=null!==(i=null==l?void 0:l.index)&&void 0!==i?i:0;u>s.length-1&&(u=s.length-1),a.moveToPanel(s[u],{duration:0}).catch((function(){}))}else a.moveToPanel(l,{duration:0}).catch((function(){}));r.camera.updateOffset(),(n.length>0||t.length>0)&&(r.trigger(new e.ComponentEvent(I.PANEL_CHANGE,{added:n,removed:t})),this.checkPanelContentsReady(d(n,t)))},i.checkPanelContentsReady=function(e){var n=this,i=F(this._flicking),r=i.resizeOnContentsReady,o=this._panels;if(r&&!i.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return e.element&&!!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.updateOffset(),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=F(this._flicking),n=e.camera,t=e.control;n.updateRange(),n.updateOffset(),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=F(this._flicking),i=t.panelsPerView;if(i<=0)throw new he(m("panelsPerView",i),f.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},s=a({size:r,margin:e.margin},!t.horizontal&&{height:e.height});t.noPanelStyleOverride||this._strategy.updatePanelSizes(t,o),t.panels.forEach((function(e){return e.resize(s)}))}},i._removeAllChildsFromCamera=function(){for(var e=F(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},i._insertPanelElements=function(e,n){void 0===n&&(n=null);var t=F(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=F(this._flicking).camera.element;e.forEach((function(e){n.removeChild(e.element)}))},i._afterRender=function(){var e=F(this._flicking);if(e.camera.applyTransform(),e.useCSSOrder){var n=e.renderer.panels.filter((function(e){return e.rendered}));this._strategy.getRenderingIndexesByOrder(e).forEach((function(e,t){n[e].element&&(n[e].element.style.order=""+t)}))}},n}(),Ve=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t.render=function(){return s(this,void 0,void 0,(function(){var e,n;return l(this,(function(t){return e=F(this._flicking),(n=this._strategy).updateRenderingPanels(e),n.renderPanels(e),this._resetPanelElementOrder(),this._afterRender(),[2]}))}))},t._collectPanels=function(){var e=F(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=F(this._flicking),n=e.camera.element,t=[];(t=e.useCSSOrder?this.getRenderedPanels().map((function(e){return e.element})).reverse():this._strategy.getRenderingElementsByOrder(e).reverse()).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=F(this._flicking).camera.element;V(e.childNodes).forEach((function(n){n.nodeType===Node.TEXT_NODE&&e.removeChild(n)}))},n}(Fe),Ge=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}o(n,e);var t=n.prototype;return t._removePanelElements=function(e){},t._removeAllChildsFromCamera=function(){},n}(Fe),Be=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!==C.NONE&&this._toggled?e===C.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-ne(i,e,r)}var o=e-(t.alignPosition+this._size-n);return 1-ne(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,this._updateAlignPos()},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,t=this.element,i=this._flicking,r=i.horizontal,o=i.useFractionalSize;if(!t)return this;if(e)this._size=e.size,this._margin=a({},e.margin),this._height=null!==(n=e.height)&&void 0!==n?n:se({el:t,horizontal:!1,useFractionalSize:o,useOffset:!0,style:te(t)});else{var s=te(t);this._size=se({el:t,horizontal:r,useFractionalSize:o,useOffset:!0,style:s}),this._margin=r?{prev:parseFloat(s.marginLeft||"0"),next:parseFloat(s.marginRight||"0")}:{prev:parseFloat(s.marginTop||"0"),next:parseFloat(s.marginBottom||"0")},this._height=r?se({el:t,horizontal:!1,useFractionalSize:o,useOffset:!0,style:s}):this._size}return this.updatePosition(),this._updateAlignPos(),this},n.setSize=function(e){return ie(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===C.NONE||n===e)return!1;var r=this._toggled;return n>e?i>=e&&i<=n&&(this._toggled=t===C.NEXT):i<=e&&i>=n&&(this._toggled=t!==C.NEXT),r!==this._toggled},n.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=C.NONE,this._togglePosition=0,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=C.PREV,this._togglePosition=this.range.max+t.min-t.max+i,this.toggle(1/0,n.position)):u?(this._toggleDirection=C.NEXT,this._togglePosition=this.range.min+t.max-o+i,this.toggle(-1/0,n.position)):(this._toggleDirection=C.NONE,this._togglePosition=0),this},n._updateAlignPos=function(){this._alignPos=G(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=C.NONE},e}(),We=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===C.PREV})),i=n.filter((function(e){return e.toggled&&e.toggleDirection===C.NEXT}));return d(t,n.filter((function(e){return!e.toggled})),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=X(e.renderer.align);return n.map((function(n,r){return new Be({index:r,elementProvider:new t._providerCtor(n),align:i,flicking:e})}))},n.createPanel=function(e,n){return new Be(a(a({},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}(),Ue=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}o(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===C.NEXT?i+t:i-t),oe(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}(Be),Xe=function(){function e(){}var n=e.prototype;return n.renderPanels=function(e){var n=e.virtual,t=e.visiblePanels,i=ae(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=d(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)}));return t.length<=0?n.elements.map((function(e,n){return n})):d(t.map((function(e){return e.elementIndex})),n.elements.map((function(e,n){return a(a({},e),{idx:n})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},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=X(e.renderer.align);return ae(e.virtual.initialPanelCount).map((function(t){return new Ue({index:t,elementProvider:new _e(e),align:n,flicking:e})}))},n.createPanel=function(e,n){return new Ue(a(a({},n),{elementProvider:new _e(n.flicking)}))},n.updatePanelSizes=function(e,n){e.virtual.elements.forEach((function(e){ie(e.nativeElement,n)})),e.panels.forEach((function(e){return e.setSize(n)}))},e}(),Ye={__proto__:null,Renderer:Fe,VanillaRenderer:Ve,ExternalRenderer:Ge,NormalRenderingStrategy:We,VirtualRenderingStrategy:Xe},Ze=function(n){function t(e,t){var i=void 0===t?{}:t,r=i.align,o=void 0===r?A.CENTER:r,a=i.defaultIndex,s=void 0===a?0:a,l=i.horizontal,u=void 0===l||l,c=i.circular,d=void 0!==c&&c,h=i.circularFallback,f=void 0===h?z.LINEAR:h,g=i.bound,p=void 0!==g&&g,_=i.adaptive,v=void 0!==_&&_,m=i.panelsPerView,b=void 0===m?-1:m,P=i.noPanelStyleOverride,E=void 0!==P&&P,O=i.resizeOnContentsReady,x=void 0!==O&&O,y=i.nested,T=void 0!==y&&y,R=i.needPanelThreshold,I=void 0===R?0:R,C=i.preventEventsBeforeInit,S=void 0===C||C,w=i.deceleration,N=void 0===w?.0075:w,k=i.duration,D=void 0===k?500:k,j=i.easing,M=void 0===j?function(e){return 1-Math.pow(1-e,3)}:j,H=i.inputType,F=void 0===H?["mouse","touch"]:H,V=i.moveType,G=void 0===V?"snap":V,B=i.threshold,W=void 0===B?40:B,U=i.dragThreshold,X=void 0===U?1:U,Y=i.interruptable,Z=void 0===Y||Y,q=i.bounce,K=void 0===q?"20%":q,J=i.iOSEdgeSwipeThreshold,Q=void 0===J?30:J,$=i.preventClickOnDrag,ee=void 0===$||$,ne=i.preventDefaultOnDrag,te=void 0!==ne&&ne,ie=i.disableOnInit,re=void 0!==ie&&ie,oe=i.changeOnHold,ae=void 0!==oe&&oe,se=i.renderOnlyVisible,le=void 0!==se&&se,ue=i.virtual,ce=void 0===ue?null:ue,de=i.autoInit,he=void 0===de||de,pe=i.autoResize,_e=void 0===pe||pe,me=i.useResizeObserver,be=void 0===me||me,Pe=i.resizeDebounce,Ee=void 0===Pe?0:Pe,Oe=i.observePanelResize,xe=void 0!==Oe&&Oe,ye=i.maxResizeDebounce,Te=void 0===ye?100:ye,Re=i.useFractionalSize,Ie=void 0!==Re&&Re,Ae=i.externalRenderer,Ce=void 0===Ae?null:Ae,Se=i.renderExternal,we=void 0===Se?null:Se,ze=i.optimizeSizeUpdate,Ne=void 0!==ze&&ze,ke=i.animationThreshold,De=void 0===ke?.5:ke,je=i.useCSSOrder,Le=void 0!==je&&je,Me=n.call(this)||this;return Me._scheduleResize=!1,Me._initialized=!1,Me._plugins=[],Me._isResizing=!1,Me._align=o,Me._defaultIndex=s,Me._horizontal=u,Me._circular=d,Me._circularFallback=f,Me._bound=p,Me._adaptive=v,Me._panelsPerView=b,Me._noPanelStyleOverride=E,Me._resizeOnContentsReady=x,Me._nested=T,Me._virtual=ce,Me._needPanelThreshold=I,Me._preventEventsBeforeInit=S,Me._deceleration=N,Me._duration=D,Me._easing=M,Me._inputType=F,Me._moveType=G,Me._threshold=W,Me._dragThreshold=X,Me._interruptable=Z,Me._bounce=K,Me._iOSEdgeSwipeThreshold=Q,Me._preventClickOnDrag=ee,Me._preventDefaultOnDrag=te,Me._disableOnInit=re,Me._changeOnHold=ae,Me._renderOnlyVisible=le,Me._autoInit=he,Me._autoResize=_e,Me._useResizeObserver=be,Me._resizeDebounce=Ee,Me._maxResizeDebounce=Te,Me._observePanelResize=xe,Me._useFractionalSize=Ie,Me._externalRenderer=Ce,Me._renderExternal=we,Me._optimizeSizeUpdate=Ne,Me._animationThreshold=De,Me._useCSSOrder=Le,Me._viewport=new fe(Me,L(e)),Me._autoResizer=new ge(Me),Me._renderer=Me._createRenderer(),Me._camera=Me._createCamera(),Me._control=Me._createControl(),Me._virtualManager=new ve(Me,ce),Me._autoInit&&Me.init(),Me}o(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,"autoResizer",{get:function(){return this._autoResizer},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.circularEnabled},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,this.resize()},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,this._control.controller.updateDirection(),this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"circular",{get:function(){return this._circular},set:function(e){this._circular=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(i,"bound",{get:function(){return this._bound},set:function(e){this._bound=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e,e&&this._renderer.checkPanelContentsReady(this._renderer.panels)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"nested",{get:function(){return this._nested},set:function(e){this._nested=e;var n=this._control.controller.axes;n&&(n.options.nested=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;var n=this._control.controller.axes;n&&(n.options.deceleration=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"easing",{get:function(){return this._easing},set:function(e){this._easing=e;var n=this._control.controller.axes;n&&(n.options.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;var n=this._control.controller.panInput;n&&(n.options.inputType=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e;var n=this._control,t=this._createControl(),i=n.activePanel;t.copy(n);var r=i?this._camera.getProgressInPanel(i):0;this._control=t,this._control.updatePosition(r),this._control.updateInput()},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,"dragThreshold",{get:function(){return this._dragThreshold},set:function(e){this._dragThreshold=e;var n=this._control.controller.panInput;n&&(n.options.threshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"animationThreshold",{get:function(){return this._animationThreshold},set:function(e){this._animationThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"useCSSOrder",{get:function(){return this._useCSSOrder},set:function(e){this._useCSSOrder=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e;var n=this._control.controller.axes;n&&(n.options.interruptable=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e,this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e;var n=this._control.controller.panInput;n&&(n.options.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,"preventDefaultOnDrag",{get:function(){return this._preventDefaultOnDrag},set:function(e){this._preventDefaultOnDrag=e;var n=this._control.controller.panInput;n&&(n.options.preventDefaultOnDrag=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,"changeOnHold",{get:function(){return this._changeOnHold},set:function(e){this._changeOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e,this._renderer.render()},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,this._initialized&&(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._initialized&&this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"observePanelResize",{get:function(){return this._observePanelResize},set:function(e){this._observePanelResize=e,this._initialized&&this._autoResize&&(e?this._autoResizer.observePanels():this._autoResizer.unobservePanels())},enumerable:!1,configurable:!0}),Object.defineProperty(i,"resizeDebounce",{get:function(){return this._resizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(i,"maxResizeDebounce",{get:function(){return this._maxResizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(i,"useFractionalSize",{get:function(){return this._useFractionalSize},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}),Object.defineProperty(i,"optimizeSizeUpdate",{get:function(){return this._optimizeSizeUpdate},set:function(e){this._optimizeSizeUpdate=e},enumerable:!1,configurable:!0}),i.init=function(){var n=this;if(this._initialized)return Promise.resolve();var t=this._camera,i=this._renderer,r=this._control,o=this._virtualManager,a=this.trigger,s=this._preventEventsBeforeInit;return t.init(),o.init(),i.init(this),r.init(this),s&&(this.trigger=function(){return n}),this._initialResize(),this._moveToInitialPanel(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&r.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),i.checkPanelContentsReady(i.panels),this._initialized=!0,i.render().then((function(){n._plugins.forEach((function(e){return e.init(n)})),s&&(n.trigger=a),n.trigger(new e.ComponentEvent(I.READY))}))},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._scheduleResize=!1,this._initialized=!1,this._isResizing=!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,C.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,C.NEXT)},i.moveTo=function(e,n,t){void 0===n&&(n=this._duration),void 0===t&&(t=C.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new he(y,f.ANIMATION_ALREADY_PLAYING)):(this._control.holding&&this._control.controller.release(),this._control.moveToPanel(o,{duration:n,direction:t})):Promise.reject(new he(b(e,0,r-1),f.INDEX_OUT_OF_RANGE))},i.updateAnimation=function(e,n,t){if(this._control.animating){var i=this._renderer,r=i.panelCount,o=i.getPanel(e);if(!o)throw new he(b(e,0,r-1),f.INDEX_OUT_OF_RANGE);this._control.updateAnimation(o,n,t)}},i.stopAnimation=function(){this._control.animating&&this._control.stopAnimation()},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,d=void 0!==c&&c,h=this._camera,f={panels:(d?this.visiblePanels:this.panels).map((function(e){var n={index:e.index};return u&&(n.html=e.element.outerHTML),n}))};if(o&&(f.index=this.index),s){var g=h.findNearestAnchor(h.position);g&&(f.position={panel:g.panel.index,progressInPanel:h.getProgressInPanel(g.panel)})}if(d){var p=this.visiblePanels;f.visibleOffset=null!==(t=null===(n=p[0])||void 0===n?void 0:n.index)&&void 0!==t?t:0}return f},i.setStatus=function(e){var n;if(!this._initialized)throw new he(R,f.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:Z(o.map((function(e){return e.html}))),hasDOMInElements:!0})),null!=t){var l=r?t-r:t;this.moveTo(l,0).catch((function(){}))}if(i&&this._moveType===S.FREE_SCROLL){var u=i.panel,c=i.progressInPanel,d=(l=r?u-r:u,a.panels[l].range),h=d.min+(d.max-d.min)*c;s.moveToPosition(h,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,d(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=ee(e._plugins,(function(e){return e===n}));t>=0&&(n.destroy(),e._plugins.splice(t,1))})),this},i.resize=function(){return s(this,void 0,void 0,(function(){var n,t,i,r,o,a,s,u,c,d,h;return l(this,(function(l){switch(l.label){case 0:return this._initialized?this._isResizing?(this._scheduleResize=!0,[2]):(this._scheduleResize=!1,this._isResizing=!0,n=this._viewport,t=this._renderer,i=this._camera,r=this._control,o=r.activePanel,a=n.width,s=n.height,u=o?i.getProgressInPanel(o):0,this.trigger(new e.ComponentEvent(I.BEFORE_RESIZE,{width:a,height:s,element:n.element})),n.resize(),this._optimizeSizeUpdate?this.horizontal&&n.width!==a||!this.horizontal&&n.height!==s?[4,t.forceRenderAllPanels()]:[3,2]:[3,3]):[2];case 1:l.sent(),l.label=2;case 2:return[3,5];case 3:return[4,t.forceRenderAllPanels()];case 4:l.sent(),l.label=5;case 5:return this._initialized?(t.updatePanelSize(),i.updateAlignPos(),i.updateRange(),i.updateAnchors(),i.updateAdaptiveHeight(),i.updatePanelOrder(),i.updateOffset(),[4,t.render()]):[2];case 6:return l.sent(),this._initialized?(r.animating||(r.updatePosition(u),r.updateInput()),c=n.width,d=n.height,h=c!==a||d!==s,this.trigger(new e.ComponentEvent(I.AFTER_RESIZE,{width:n.width,height:n.height,prev:{width:a,height:s},sizeChanged:h,element:n.element})),this._isResizing=!1,this._scheduleResize&&this.resize(),[2]):[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 he(T,f.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:Z(n),hasDOMInElements:!0})},i.remove=function(e,n){if(void 0===n&&(n=1),this._renderExternal)throw new he(T,f.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(S).map((function(e){return S[e]})),i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)&&null!==(e=n[1])&&void 0!==e?e:{};if(!K(t,i))throw new he(m("moveType",JSON.stringify(n)),f.WRONG_OPTION);switch(i){case S.SNAP:return new Se(r);case S.FREE_SCROLL:return new we(r);case S.STRICT:return new ze(r)}},i._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new Me(this,{align:this._align})},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(a({align:this._align},t))},i._createVanillaRenderer=function(){var e=this.virtualEnabled;return new Ve({align:this._align,strategy:e?new Xe:new We({providerCtor:pe})})},i._moveToInitialPanel=function(){var e=this._renderer,n=this._control,t=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=t.findNearestAnchor(i.position),o=r&&i.position!==r.panel.position&&i.index!==r.panel.index?r.panel:i;if(n.setActive(o,null,!1),!r)throw new he(P(o.position),f.POSITION_NOT_REACHABLE);var a=o.position;t.canReach(o)||(a=r.position),t.lookAt(a),n.updateInput(),t.updateOffset()}},i._initialResize=function(){var n=this._viewport,t=this._renderer,i=this._camera,r=this._control;this.trigger(new e.ComponentEvent(I.BEFORE_RESIZE,{width:0,height:0,element:n.element})),n.resize(),t.updatePanelSize(),i.updateAlignPos(),i.updateRange(),i.updateAnchors(),i.updateOffset(),r.updateInput();var o=n.width,a=n.height,s=0!==o||0!==a;this.trigger(new e.ComponentEvent(I.AFTER_RESIZE,{width:n.width,height:n.height,prev:{width:0,height:0},sizeChanged:s,element:n.element}))},t.VERSION="4.15.0",t}(e),qe={HOLD_START:"sideHoldStart",HOLD_END:"sideHoldEnd",MOVE_START:"sideMoveStart",MOVE:"sideMove",MOVE_END:"sideMoveEnd",WILL_CHANGE:"sideWillChange",CHANGED:"sideChanged",WILL_RESTORE:"sideWillRestore",RESTORED:"sideRestored"},Ke={__proto__:null,SIDE_EVENTS:qe,CrossFlicking:function(n){function t(e,t){var i=n.call(this,e,t)||this;i._syncToCategory=function(e,n){i._disableIndexSync||(i.stopAnimation(),i._sideFlicking.forEach((function(t,r){var o=i._sideState[r],a=o.start,s=o.end;a<=e&&s>=e&&n!==r&&(t.stopAnimation(),t.moveTo(e,0),i.moveTo(r,0))})))},i._setDraggable=function(e,n){if(i._disableSlideOnHold){var t=i._originalDragThreshold,r=n?t&&t>=10?t:10:1/0;e===k.HORIZONTAL===i.horizontal?i.dragThreshold=r:e===k.VERTICAL===i.horizontal&&i._sideFlicking.forEach((function(e){e.dragThreshold=r}))}},i._setPreviousSideIndex=function(){i._sideFlicking.forEach((function(e,n){var t=i._sideState[n],r=t.start,o=t.end;i._preserveIndex?i._nextIndex!==n&&(e.index<r?(e.stopAnimation(),e.moveTo(r,0)):e.index>o&&(e.stopAnimation(),e.moveTo(o,0))):i._nextIndex!==n&&e.moveTo(r,0)}))},i._addSideIndex=function(e){e.sideIndex=i._sideFlicking[e.index].index},i._onHorizontalHoldStart=function(){i._setDraggable(k.HORIZONTAL,!0),i._moveDirection=null},i._onHorizontalMove=function(e){e.isTrusted&&!i._moveDirection&&(i._setDraggable(k.VERTICAL,!1),i._moveDirection=k.HORIZONTAL)},i._onHorizontalMoveEnd=function(e){var n=i.visiblePanels;n.length>1?i._nextIndex="NEXT"===e.direction?n[1].index:n[0].index:i._nextIndex=n[0].index,i._setDraggable(k.VERTICAL,!0),i._moveDirection=null,requestAnimationFrame((function(){return i._setPreviousSideIndex()})),e.isTrusted&&i._syncToCategory(i._sideFlicking[i._nextIndex].index,i._nextIndex)},i._onSideHoldStart=function(){i._setDraggable(k.VERTICAL,!0),i._moveDirection=null},i._onSideMove=function(e){e.isTrusted&&!i._moveDirection&&(i._setDraggable(k.HORIZONTAL,!1),i._moveDirection=k.VERTICAL)},i._onSideMoveEnd=function(){i._setDraggable(k.HORIZONTAL,!0),i._moveDirection=null},i._onSideChanged=function(e){i.visiblePanels.length<2&&i._sideFlicking[i.index]===e.currentTarget&&i._syncToCategory(e.index,i.index)};var r=t.sideOptions,o=void 0===r?{}:r,a=t.preserveIndex,s=void 0===a||a,l=t.disableSlideOnHold,u=void 0===l||l,c=t.disableIndexSync,d=void 0!==c&&c;return i._moveDirection=null,i._nextIndex=0,i._originalDragThreshold=i.dragThreshold,i._sideOptions=o,i._preserveIndex=s,i._disableSlideOnHold=u,i._disableIndexSync=d,i}o(t,n);var i=t.prototype;return Object.defineProperty(i,"sideFlicking",{get:function(){return this._sideFlicking},enumerable:!1,configurable:!0}),Object.defineProperty(i,"sideIndex",{get:function(){return this._sideFlicking.map((function(e){return e.index}))},enumerable:!1,configurable:!0}),Object.defineProperty(i,"sideState",{get:function(){return this._sideState},enumerable:!1,configurable:!0}),Object.defineProperty(i,"sideOptions",{get:function(){return this._sideOptions},set:function(e){this._sideOptions=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"preserveIndex",{get:function(){return this._preserveIndex},set:function(e){this._preserveIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"disableSlideOnHold",{get:function(){return this._disableSlideOnHold},set:function(e){this._disableSlideOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"disableIndexSync",{get:function(){return this._disableIndexSync},set:function(e){this._disableIndexSync=e},enumerable:!1,configurable:!0}),i.init=function(){var e=this;return n.prototype.init.call(this).then((function(){e._sideState=e._createSideState(),e._sideFlicking=e._createSideFlicking(),e._addComponentEvents()}))},i.destroy=function(){this._sideFlicking.forEach((function(e){e.destroy()})),n.prototype.destroy.call(this)},i._addComponentEvents=function(){var n=this;this.on(I.HOLD_START,this._onHorizontalHoldStart),this.on(I.MOVE,this._onHorizontalMove),this.on(I.MOVE_END,this._onHorizontalMoveEnd),[I.CHANGED,I.WILL_CHANGE].forEach((function(e){n.on(e,n._addSideIndex)})),this._sideFlicking.forEach((function(t,i){t.on(I.HOLD_START,n._onSideHoldStart),t.on(I.MOVE,n._onSideMove),t.on(I.MOVE_END,n._onSideMoveEnd),t.on(I.CHANGED,n._onSideChanged),Object.keys(qe).forEach((function(r){t.on(I[r],(function(t){n.trigger(new e.ComponentEvent(qe[r],a({mainIndex:i},t)))}))}))}))},i._createSideState=function(){var e=this.element,n=this.camera.element,t=V(n.children),i=[];if(ce(e,"data-cross-").structure)i=this._getSideStateFromCrossStructure(t);else{var r=this._getGroupFromAttribute(t),o=Object.keys(r);o.length?(i=this._getSideStateFromGroup(r),this.remove(0,this.panelCount-o.length)):i=this._getSideStateFromPanels(t),this._createCrossStructure(i)}return this.resize(),i},i._createCrossStructure=function(e){var n=this,t=document.createElement("div"),i="";t.classList.add(w.CAMERA),e.forEach((function(e,t){var r=n.camera.children[t];i+=e.element.innerHTML,Array.from(r.attributes).forEach((function(e){return r.removeAttribute(e.name)}))})),t.innerHTML=i,e.forEach((function(e,i){var r=n.camera.children[i];[w.VIEWPORT,w.VERTICAL].forEach((function(e){r.classList.contains(e)||r.classList.add(e)})),r.innerHTML=t.outerHTML})),this.element.setAttribute("data-cross-structure","true")},i._getGroupFromAttribute=function(e){var n=[],t={};return e.forEach((function(e){var i=ce(e,"data-cross-").groupkey;i&&!K(n,i)?(n.push(i),t[i]=[e]):i&&t[i].push(e)})),t},i._getSideStateFromGroup=function(e){return Object.keys(e).reduce((function(n,t){var i=n.length?+n[n.length-1].end+1:0,r=e[t].reduce((function(e,n){return e.innerHTML+=n.outerHTML,e}),document.createElement("div"));return d(n,[{key:t,start:i,end:i+e[t].length-1,element:r}])}),[])},i._getSideStateFromPanels=function(e){return e.reduce((function(e,n,t){var i=e.length?+e[e.length-1].end+1:0;return d(e,[{key:t.toString(),start:i,end:i+n.children.length-1,element:n}])}),[])},i._getSideStateFromCrossStructure=function(e){var n=this._getGroupFromAttribute(e);return this._getSideStateFromGroup(n)},i._createSideFlicking=function(){var e=this;return this.sideState.map((function(n,t){return new Ze(e.camera.children[t],a(a({},e.sideOptions),{horizontal:!1,panelsPerView:1,defaultIndex:n.start}))}))},t}(Ze)},Je=function(e,n,t,i,r){return e.batchInsertDefer.apply(e,d(n.added.slice(i,r).map((function(e,n){return{index:e,elements:[t[n]],hasDOMInElements:!1}}))))},Qe=function(e,n,t){var i=e.panels.slice(n,t);return e.batchRemoveDefer({index:n,deleteCount:i.length,hasDOMInElements:!1})},$e=function(e){var n="object"==typeof e?e.camera:e;return nn(n)},en=function(e){var n="object"==typeof e?e.panel:e;return U(nn(n))},nn=function(e){if("number"==typeof e)return e+"px";switch(e){case A.CENTER:return"50%";case A.NEXT:return"100%";case A.PREV:return"0%";default:return e}},tn={__proto__:null,withFlickingMethods:function(n,t){[e.prototype,Ze.prototype].forEach((function(e){Object.getOwnPropertyNames(e).filter((function(e){return!n[e]&&0!==e.indexOf("_")&&"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,d([this[t]],n))}});else{var o={};r.get&&(o.get=function(){var e,n=this[t];return n&&(null===(e=r.get)||void 0===e?void 0:e.call(n))}),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,d([this[t]],n))}),Object.defineProperty(n,i,o)}}))}))},sync:function(e,n,t){var i=e.renderer,r=i.panels,o=d(n.prevList),a=[],s=[];if(n.removed.length>0){var l=-1,u=-1;n.removed.forEach((function(e){l<0&&(l=e),u>=0&&e!==u-1?(s.push.apply(s,d(Qe(i,u,l+1))),l=e,u=e):u=e,o.splice(e,1)})),s.push.apply(s,d(Qe(i,u,l+1)))}if(n.ordered.forEach((function(e){var n=c(e,2),t=n[0],i=n[1],o=r.splice(t,1)[0];r.splice(i,0,o)})),n.ordered.length>0&&(r.forEach((function(e,n){var t=n-e.index;t>0?e.increaseIndex(t):e.decreaseIndex(-t)})),r.sort((function(e,n){return e.index-n.index})),r.forEach((function(e){e.updatePosition()}))),n.added.length>0){var h=-1,f=-1,g=t.slice(o.length);n.added.forEach((function(e,t){h<0&&(h=t),f>=0&&e!==f+1?(a.push.apply(a,d(Je(i,n,g,h,t+1))),h=-1,f=-1):f=e})),h>=0&&a.push.apply(a,d(Je(i,n,g,h)))}if(n.added.length>0||n.removed.length>0)i.updateAfterPanelChange(a,s);else if(n.ordered.length>0){var p=e.camera;p.updateRange(),p.updateOffset(),p.updateAnchors(),p.resetNeedPanelHistory()}},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=c(n,2),i=t[0],r=t[1];return e[i]=r,e}),{}),r=e.panels.filter((function(e){return!t[e.index]}));return e.useCSSOrder||r.sort((function(e,n){return e.position+e.offset-(n.position+n.offset)})),d(r.map((function(e){return n.list[i[e.index]]})),n.added.map((function(e){return n.list[e]})))},getDefaultCameraTransform:function(e,n,t){void 0===e&&(e=A.CENTER),void 0===n&&(n=!0);var i=$e(e),r=en(e);if(null==r)return"";var o="calc("+i+" - ("+(t||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return n?"translate("+o+")":"translate(0, "+o+")"}},rn=function(e){return!e.circular&&0===e.index},on=function(e){return!e.circular&&e.index===e.panelCount-1},an=function(e){return e.panelCount},sn=function(e){return e.index},ln=function(e){var n=e.camera,t=(n.position-n.range.min)/(n.range.max-n.range.min);return 100*Math.min(Math.max(t,0),1)},un=function(e){var n,t,r,o,a=e.onInit,s=e.onDestroy,l=e.setMethods,u=e.getProps;l(["moveTo"]);var c=u().options,d=i.reactive({isReachStart:!(null==c?void 0:c.defaultIndex)||0===(null==c?void 0:c.defaultIndex),isReachEnd:!(!(null==c?void 0:c.totalPanelCount)||!(null==c?void 0:c.defaultIndex))&&c.defaultIndex===c.totalPanelCount-1,totalPanelCount:null!==(n=null==c?void 0:c.totalPanelCount)&&void 0!==n?n:0,currentPanelIndex:null!==(t=null==c?void 0:c.defaultIndex)&&void 0!==t?t:0,progress:0,indexProgress:null!==(r=null==c?void 0:c.defaultIndex)&&void 0!==r?r:0,moveTo:function(e){return null==o?Promise.reject(new Error("Flicking instance is not available")):(null==o?void 0:o.animating)?Promise.resolve():o.moveTo(e)}}),h=function(){void 0!==o&&(d.isReachStart=rn(o),d.isReachEnd=on(o),d.currentPanelIndex=sn(o))},f=function(){void 0!==o&&(h(),d.totalPanelCount=an(o))},g=function(){void 0!==o&&(d.progress=ln(o),d.indexProgress=function(e){var n=e.camera,t=n.anchorPoints,i=t.length,r=n.position,o=e.circularEnabled,a=0,s=n.range,l=s.min,u=s.max,c=t[0],d=u-t[i-1].position+(c.position-l);return t.some((function(e,n){var s=e.position,l=t[n+1];if(0===n&&r<=s)a=o?(r-s)/d:(r-s)/e.panel.size;else if(n===i-1&&r>=s)a=o?n+(r-s)/d:n+(r-s)/e.panel.size;else{if(!(l&&s<=r&&r<=l.position))return!1;a=n+(r-s)/(l.position-s)}return!0})),a}(o))};return a((function(e,n){void 0!==(o=n.flicking)&&(d.isReachStart=rn(o),d.isReachEnd=on(o),d.currentPanelIndex=sn(o),d.progress=ln(o),d.totalPanelCount=an(o),null==o||o.on("changed",h),null==o||o.on("panelChange",f),null==o||o.on("move",g))})),s((function(){null==o||o.off("changed",h),null==o||o.off("panelChange",f),null==o||o.off("move",g)})),d},cn={__proto__:null,flickingReactiveAPIAdapter:un,connectFlickingReactiveAPI:function(e,n){var t=i.adaptReactive(un,(function(){return{flicking:e,options:n}}));t.mounted();var r=t.instance();return t.init(),r}};return j(Ze,{__proto__:null,Viewport:fe,FlickingError:he,AnchorPoint:Ce,VirtualManager:ve,VanillaElementProvider:pe,VirtualElementProvider:_e,Panel:Be,VirtualPanel:Ue}),j(Ze,He),j(Ze,Ne),j(Ze,Ye),j(Ze,D),j(Ze,tn),j(Ze,de),j(Ze,Ke),j(Ze,cn),Ze}));
|
|
10
10
|
//# sourceMappingURL=flicking.min.js.map
|