@konnectio/core 4.7.2 → 4.7.4

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.
Files changed (106) hide show
  1. package/dist/{ActionField-7Xr4gG3o.js → ActionField-B1aBJVRb.js} +2 -2
  2. package/dist/ActionField-B1aBJVRb.js.br +0 -0
  3. package/dist/ActionField-B1aBJVRb.js.gz +0 -0
  4. package/dist/{AvailabilitySkeleton-C5-svpOi.js → AvailabilitySkeleton-B1hwKbSA.js} +3 -3
  5. package/dist/AvailabilitySkeleton-B1hwKbSA.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-B1hwKbSA.js.gz +0 -0
  7. package/dist/{CheckoutWindow-D5iYTX5x.js → CheckoutWindow-BD2PXPt7.js} +2 -2
  8. package/dist/CheckoutWindow-BD2PXPt7.js.br +0 -0
  9. package/dist/CheckoutWindow-BD2PXPt7.js.gz +0 -0
  10. package/dist/{ErrorMessage-BRxxRXRB.js → ErrorMessage-DiRVby8f.js} +2 -2
  11. package/dist/ErrorMessage-DiRVby8f.js.br +0 -0
  12. package/dist/ErrorMessage-DiRVby8f.js.gz +0 -0
  13. package/dist/{EventAvailabilityForm-4rHGq9tK.js → EventAvailabilityForm-DW6_GZv3.js} +3 -3
  14. package/dist/EventAvailabilityForm-DW6_GZv3.js.br +0 -0
  15. package/dist/EventAvailabilityForm-DW6_GZv3.js.gz +0 -0
  16. package/dist/{Field-B_LqtBqi.js → Field-BYZdtara.js} +2 -2
  17. package/dist/Field-BYZdtara.js.br +0 -0
  18. package/dist/Field-BYZdtara.js.gz +0 -0
  19. package/dist/{HotelAvailabilityForm-BO1Vsd6y.js → HotelAvailabilityForm-B7yHDXz3.js} +3 -3
  20. package/dist/HotelAvailabilityForm-B7yHDXz3.js.br +0 -0
  21. package/dist/HotelAvailabilityForm-B7yHDXz3.js.gz +0 -0
  22. package/dist/{SelectField-BRl5vHI-.js → SelectField-m_n1cMe0.js} +136 -135
  23. package/dist/SelectField-m_n1cMe0.js.br +0 -0
  24. package/dist/SelectField-m_n1cMe0.js.gz +0 -0
  25. package/dist/{TermsOfService-Bbhbw2I8.js → TermsOfService-CXblPhj1.js} +3 -3
  26. package/dist/TermsOfService-CXblPhj1.js.br +0 -0
  27. package/dist/TermsOfService-CXblPhj1.js.gz +0 -0
  28. package/dist/_-CTagk-cE.js +25 -0
  29. package/dist/_-CTagk-cE.js.br +0 -0
  30. package/dist/_-CTagk-cE.js.gz +3 -0
  31. package/dist/availability.js +8 -8
  32. package/dist/availability.js.br +0 -0
  33. package/dist/availability.js.gz +0 -0
  34. package/dist/cancel-reservation.js +5 -5
  35. package/dist/cancel-reservation.js.br +0 -0
  36. package/dist/cancel-reservation.js.gz +0 -0
  37. package/dist/deep-link.js +1 -1
  38. package/dist/deep-link.js.br +0 -0
  39. package/dist/deep-link.js.gz +0 -0
  40. package/dist/{dist-BX1yR1c2.js → dist-8cx1vxIY.js} +4 -4
  41. package/dist/dist-8cx1vxIY.js.br +0 -0
  42. package/dist/dist-8cx1vxIY.js.gz +0 -0
  43. package/dist/event.js +9 -9
  44. package/dist/event.js.br +0 -0
  45. package/dist/event.js.gz +0 -0
  46. package/dist/gift-card-validation.js +8 -8
  47. package/dist/gift-card-validation.js.br +0 -0
  48. package/dist/gift-card-validation.js.gz +0 -0
  49. package/dist/gift-card.js +10 -10
  50. package/dist/gift-card.js.br +0 -0
  51. package/dist/gift-card.js.gz +0 -0
  52. package/dist/{giftCard-BD7_GMEZ.js → giftCard-4w50jcS_.js} +2 -2
  53. package/dist/giftCard-4w50jcS_.js.br +0 -0
  54. package/dist/giftCard-4w50jcS_.js.gz +0 -0
  55. package/dist/hotel.js +523 -521
  56. package/dist/hotel.js.br +0 -0
  57. package/dist/hotel.js.gz +0 -0
  58. package/dist/{masonry.plugin-Cuiw9zoH.js → masonry.plugin-DG-fnTtd.js} +3086 -458
  59. package/dist/masonry.plugin-DG-fnTtd.js.br +0 -0
  60. package/dist/masonry.plugin-DG-fnTtd.js.gz +0 -0
  61. package/dist/{mitt-D_sfUt2u.js → mitt-DosBWi_E.js} +3205 -3177
  62. package/dist/mitt-DosBWi_E.js.br +0 -0
  63. package/dist/mitt-DosBWi_E.js.gz +0 -0
  64. package/dist/polyfill.js +1 -1
  65. package/dist/polyfill.js.br +0 -0
  66. package/dist/polyfill.js.gz +0 -0
  67. package/dist/{style-ChQDJ4NF.js → style-BzTt5D-A.js} +2 -2
  68. package/dist/style-BzTt5D-A.js.br +0 -0
  69. package/dist/style-BzTt5D-A.js.gz +0 -0
  70. package/dist-wix/availability.js +29 -29
  71. package/dist-wix/event.js +18 -18
  72. package/dist-wix/gift-card-validation.js +29 -29
  73. package/dist-wix/gift-card.js +28 -28
  74. package/dist-wix/hotel.js +19 -19
  75. package/package.json +22 -23
  76. package/dist/ActionField-7Xr4gG3o.js.br +0 -0
  77. package/dist/ActionField-7Xr4gG3o.js.gz +0 -0
  78. package/dist/AvailabilitySkeleton-C5-svpOi.js.br +0 -0
  79. package/dist/AvailabilitySkeleton-C5-svpOi.js.gz +0 -0
  80. package/dist/CheckoutWindow-D5iYTX5x.js.br +0 -0
  81. package/dist/CheckoutWindow-D5iYTX5x.js.gz +0 -0
  82. package/dist/ErrorMessage-BRxxRXRB.js.br +0 -0
  83. package/dist/ErrorMessage-BRxxRXRB.js.gz +0 -0
  84. package/dist/EventAvailabilityForm-4rHGq9tK.js.br +0 -0
  85. package/dist/EventAvailabilityForm-4rHGq9tK.js.gz +0 -0
  86. package/dist/Field-B_LqtBqi.js.br +0 -0
  87. package/dist/Field-B_LqtBqi.js.gz +0 -0
  88. package/dist/HotelAvailabilityForm-BO1Vsd6y.js.br +0 -0
  89. package/dist/HotelAvailabilityForm-BO1Vsd6y.js.gz +0 -0
  90. package/dist/SelectField-BRl5vHI-.js.br +0 -0
  91. package/dist/SelectField-BRl5vHI-.js.gz +0 -0
  92. package/dist/TermsOfService-Bbhbw2I8.js.br +0 -0
  93. package/dist/TermsOfService-Bbhbw2I8.js.gz +0 -0
  94. package/dist/_-DgoHYgjI.js +0 -22
  95. package/dist/_-DgoHYgjI.js.br +0 -0
  96. package/dist/_-DgoHYgjI.js.gz +0 -0
  97. package/dist/dist-BX1yR1c2.js.br +0 -0
  98. package/dist/dist-BX1yR1c2.js.gz +0 -0
  99. package/dist/giftCard-BD7_GMEZ.js.br +0 -0
  100. package/dist/giftCard-BD7_GMEZ.js.gz +0 -0
  101. package/dist/masonry.plugin-Cuiw9zoH.js.br +0 -0
  102. package/dist/masonry.plugin-Cuiw9zoH.js.gz +0 -0
  103. package/dist/mitt-D_sfUt2u.js.br +0 -0
  104. package/dist/mitt-D_sfUt2u.js.gz +0 -0
  105. package/dist/style-ChQDJ4NF.js.br +0 -0
  106. package/dist/style-ChQDJ4NF.js.gz +0 -0
@@ -1,9 +1,9 @@
1
1
  import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-Dqa2HsxW.js";
2
- import { $ as renderList, A as createSlots, At as toDisplayString, B as mergeModels, D as createBlock, Dt as normalizeClass, E as createBaseVNode, Et as unref, F as getCurrentInstance, H as nextTick, J as onUnmounted, L as h, M as createVNode, O as createCommentVNode, P as defineComponent, R as inject, T as computed$1, Y as openBlock, _ as vShow, b as Comment, bt as ref, d as Transition, dt as withCtx, et as renderSlot, ft as withDirectives, gt as isRef, j as createTextVNode, k as createElementBlock, kt as normalizeStyle, lt as watch, nt as resolveDirective, o as useI18n, ot as useModel, q as onMounted, st as useSlots, t as mitt_default, tt as resolveComponent, u as storeToRefs, vt as reactive, w as Text, x as Fragment, y as withModifiers } from "./mitt-D_sfUt2u.js";
3
- import { A as usePaymentStore, C as useAvailabilityStore, E as useUtilityStore, F as capitalized, G as showDate, I as convertDescription, J as showPrice, L as daysBetweenDates, O as useHotelStore, Q as BookingLayout, S as _plugin_vue_export_helper_default, V as getUserLanguage, Z as BookingHeaderLayout, _ as InputField_default, j as useApplyGiftCardStore, k as emitter, n as TextField_default, v as Clickable_default, w as useEventStore, x as Icon_default } from "./SelectField-BRl5vHI-.js";
4
- import { n as __default } from "./Field-B_LqtBqi.js";
5
- import { t as ActionField_default } from "./ActionField-7Xr4gG3o.js";
6
- import { a as Base_default$1, n as GoogleNotice_default, r as Checkbox_default } from "./CheckoutWindow-D5iYTX5x.js";
2
+ import { $ as renderList, A as createSlots, At as toDisplayString, B as mergeModels, D as createBlock, Dt as normalizeClass, E as createBaseVNode, Et as unref, F as getCurrentInstance, H as nextTick, J as onUnmounted, L as h, M as createVNode, O as createCommentVNode, P as defineComponent, R as inject, T as computed$1, Y as openBlock, _ as vShow, b as Comment, bt as ref, d as Transition, dt as withCtx, et as renderSlot, ft as withDirectives, gt as isRef, j as createTextVNode, k as createElementBlock, kt as normalizeStyle, lt as watch, nt as resolveDirective, o as useI18n, ot as useModel, q as onMounted, st as useSlots, t as mitt_default, tt as resolveComponent, u as storeToRefs, vt as reactive, w as Text, x as Fragment, y as withModifiers } from "./mitt-DosBWi_E.js";
3
+ import { A as usePaymentStore, C as useAvailabilityStore, E as useUtilityStore, F as capitalized, G as showDate, I as convertDescription, J as showPrice, L as daysBetweenDates, O as useHotelStore, Q as BookingLayout, S as _plugin_vue_export_helper_default, V as getUserLanguage, Z as BookingHeaderLayout, _ as InputField_default, j as useApplyGiftCardStore, k as emitter, n as TextField_default, v as Clickable_default, w as useEventStore, x as Icon_default } from "./SelectField-m_n1cMe0.js";
4
+ import { n as __default } from "./Field-BYZdtara.js";
5
+ import { t as ActionField_default } from "./ActionField-B1aBJVRb.js";
6
+ import { a as Base_default$1, n as GoogleNotice_default, r as Checkbox_default } from "./CheckoutWindow-BD2PXPt7.js";
7
7
  //#region node_modules/@egjs/component/dist/component.esm.js
8
8
  function __values(e) {
9
9
  var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
@@ -126,7 +126,7 @@ function some(e, t) {
126
126
  for (var n = e.length, r = 0; r < n; ++r) if (t(e[r], r)) return !0;
127
127
  return !1;
128
128
  }
129
- function find$1(e, t) {
129
+ function find$2(e, t) {
130
130
  for (var n = e.length, r = 0; r < n; ++r) if (t(e[r], r)) return e[r];
131
131
  return null;
132
132
  }
@@ -178,7 +178,7 @@ function findPresetBrand(e, t) {
178
178
  }), n;
179
179
  }
180
180
  function findBrand(e, t) {
181
- return find$1(e, function(e) {
181
+ return find$2(e, function(e) {
182
182
  var n = e.brand;
183
183
  return execRegExp("" + t.test, n.toLowerCase());
184
184
  });
@@ -357,7 +357,7 @@ function getClientHintsAgent(e) {
357
357
  var p = findPresetBrand(WEBKIT_PRESETS, n);
358
358
  u.webkit = !!p.brand, u.webkitVersion = p.version || "-1";
359
359
  }
360
- var m = find$1(OS_PRESETS, function(e) {
360
+ var m = find$2(OS_PRESETS, function(e) {
361
361
  return RegExp("" + e.test, "g").exec(l);
362
362
  });
363
363
  if (d.name = m ? m.id : "", e && (d.version = e.platformVersion || "-1"), r && r.length) {
@@ -598,7 +598,7 @@ var win = typeof window > "u" ? { navigator: { userAgent: "" } } : window, DIREC
598
598
  "-moz-user-select": "none",
599
599
  "user-select": "none",
600
600
  "-webkit-user-drag": "none"
601
- }, toArray$2 = function(e) {
601
+ }, toArray$3 = function(e) {
602
602
  for (var t = [], n = 0, r = e.length; n < r; n++) t.push(e[n]);
603
603
  return t;
604
604
  }, $ = function(e, t) {
@@ -607,8 +607,8 @@ var win = typeof window > "u" ? { navigator: { userAgent: "" } } : window, DIREC
607
607
  if (typeof e == "string") {
608
608
  if (e.match(/^<([a-z]+)\s*([^>]*)>/)) {
609
609
  var r = document.createElement("div");
610
- r.innerHTML = e, n = toArray$2(r.childNodes);
611
- } else n = toArray$2(document.querySelectorAll(e));
610
+ r.innerHTML = e, n = toArray$3(r.childNodes);
611
+ } else n = toArray$3(document.querySelectorAll(e));
612
612
  t || (n = n.length >= 1 ? n[0] : void 0);
613
613
  } else e === win ? n = e : "value" in e || "current" in e ? n = e.value || e.current : e.nodeName && (e.nodeType === 1 || e.nodeType === 9) ? n = e : "jQuery" in win && e instanceof jQuery || e.constructor.prototype.jquery ? n = t ? e.toArray() : e.get(0) : Array.isArray(e) && (n = e.map(function(e) {
614
614
  return $(e);
@@ -677,7 +677,7 @@ var requestAnimationFrame$2 = function(e) {
677
677
  return Object.keys(PREVENT_DRAG_CSSPROPS).forEach(function(n) {
678
678
  (!e || e[n] !== PREVENT_DRAG_CSSPROPS[n]) && (t = !1);
679
679
  }), t;
680
- }, getDirection$1 = function(e, t) {
680
+ }, getDirection$2 = function(e, t) {
681
681
  return e && t ? DIRECTION_ALL : e ? DIRECTION_HORIZONTAL : t ? DIRECTION_VERTICAL : DIRECTION_NONE;
682
682
  }, useDirection = function(e, t, n) {
683
683
  return n ? !!(t === DIRECTION_ALL || t & e && n & e) : !!(t & e);
@@ -1179,7 +1179,7 @@ var InputObserver = /*#__PURE__*/ function() {
1179
1179
  return e[s] === 0 || t[s] === n[s] && isEndofBounce(r, i.range, i.bounce, i.circular);
1180
1180
  });
1181
1181
  }, e;
1182
- }(), clamp$1 = function(e, t, n) {
1182
+ }(), clamp$2 = function(e, t, n) {
1183
1183
  return Math.max(Math.min(e, n), t);
1184
1184
  }, EasingManager = /*#__PURE__*/ function(e) {
1185
1185
  __extends$1(t, e);
@@ -1250,7 +1250,7 @@ var InputObserver = /*#__PURE__*/ function() {
1250
1250
  return Math.max(e, s[t]);
1251
1251
  }, -Infinity);
1252
1252
  }
1253
- return clamp$1(i, this._options.minimumDuration, this._options.maximumDuration);
1253
+ return clamp$2(i, this._options.minimumDuration, this._options.maximumDuration);
1254
1254
  }, t.getDisplacement = function(e) {
1255
1255
  var t = e.reduce(function(e, t) {
1256
1256
  return e + t * t;
@@ -1290,7 +1290,7 @@ var InputObserver = /*#__PURE__*/ function() {
1290
1290
  this._animateParam = null, this.interruptManager.setInterrupt(!1), this.eventManager.triggerFinish(e);
1291
1291
  }, t.getUserControl = function(e) {
1292
1292
  var t = e.setTo();
1293
- return t.destPos = this.axisManager.get(t.destPos), t.duration = clamp$1(t.duration, this._options.minimumDuration, this._options.maximumDuration), t;
1293
+ return t.destPos = this.axisManager.get(t.destPos), t.duration = clamp$2(t.duration, this._options.minimumDuration, this._options.maximumDuration), t;
1294
1294
  }, t.animateTo = function(e, t, n) {
1295
1295
  var r = this;
1296
1296
  this.stopAnimation();
@@ -1334,7 +1334,7 @@ var InputObserver = /*#__PURE__*/ function() {
1334
1334
  return {
1335
1335
  depaPos: r,
1336
1336
  destPos: i,
1337
- duration: clamp$1(t, this._options.minimumDuration, this._options.maximumDuration),
1337
+ duration: clamp$2(t, this._options.minimumDuration, this._options.maximumDuration),
1338
1338
  delta: this.axisManager.getDelta(r, i),
1339
1339
  inputEvent: s,
1340
1340
  input: n?.input || null,
@@ -1455,7 +1455,7 @@ var InputObserver = /*#__PURE__*/ function() {
1455
1455
  }
1456
1456
  var t = e.prototype;
1457
1457
  return t.mapAxes = function(e) {
1458
- this._direction = getDirection$1(!!e[0], !!e[1]), this.axes = e;
1458
+ this._direction = getDirection$2(!!e[0], !!e[1]), this.axes = e;
1459
1459
  }, t.connect = function(e) {
1460
1460
  return this._activeEvent && (this._detachElementEvent(), this._detachWindowEvent(this._activeEvent)), this._attachElementEvent(e), this;
1461
1461
  }, t.disconnect = function() {
@@ -1570,7 +1570,7 @@ var isWindow = typeof window < "u", ua = isWindow ? window.navigator.userAgent :
1570
1570
  function getAttribute(e, t) {
1571
1571
  return e.getAttribute(t) || "";
1572
1572
  }
1573
- function toArray$1(e) {
1573
+ function toArray$2(e) {
1574
1574
  return [].slice.call(e);
1575
1575
  }
1576
1576
  function hasSizeAttribute(e, t) {
@@ -1602,14 +1602,14 @@ function getSize(e, t) {
1602
1602
  return parseFloat(n || getStyles(e)[t.toLowerCase()]) || 0;
1603
1603
  }
1604
1604
  function getContentElements(e, t, n) {
1605
- var r = toArray$1(e.querySelectorAll(__spreadArrays(["[" + n + "skip] [" + n + "width]"], t.map(function(e) {
1605
+ var r = toArray$2(e.querySelectorAll(__spreadArrays(["[" + n + "skip] [" + n + "width]"], t.map(function(e) {
1606
1606
  return [
1607
1607
  "[" + n + "skip] " + e,
1608
1608
  e + "[" + n + "skip]",
1609
1609
  "[" + n + "width] " + e
1610
1610
  ].join(", ");
1611
1611
  })).join(", ")));
1612
- return toArray$1(e.querySelectorAll("[" + n + "width], " + t.join(", "))).filter(function(e) {
1612
+ return toArray$2(e.querySelectorAll("[" + n + "width], " + t.join(", "))).filter(function(e) {
1613
1613
  return r.indexOf(e) === -1;
1614
1614
  });
1615
1615
  }
@@ -1738,7 +1738,7 @@ var Loader = /*#__PURE__*/ function(e) {
1738
1738
  var n = t.prototype;
1739
1739
  return n.check = function(e) {
1740
1740
  var t = this, n = this.options.prefix;
1741
- this.clear(), this.elementInfos = toArray$1(e).map(function(e, r) {
1741
+ this.clear(), this.elementInfos = toArray$2(e).map(function(e, r) {
1742
1742
  var i = t.getLoader(e, { prefix: n });
1743
1743
  return i.check(), i.on("error", function(e) {
1744
1744
  t.onError(r, e.target);
@@ -1787,7 +1787,7 @@ var Loader = /*#__PURE__*/ function(e) {
1787
1787
  }, n.getLoader = function(e, t) {
1788
1788
  var n = this, r = e.tagName.toLowerCase(), i = this.options.loaders, s = t.prefix, l = Object.keys(i);
1789
1789
  if (i[r]) return new i[r](e, t);
1790
- var u = new ElementLoader(e, t), d = toArray$1(e.querySelectorAll(l.join(", ")));
1790
+ var u = new ElementLoader(e, t), d = toArray$2(e.querySelectorAll(l.join(", ")));
1791
1791
  u.setHasLoading(d.some(function(e) {
1792
1792
  return hasLoadingAttribute(e, s);
1793
1793
  }));
@@ -1906,16 +1906,16 @@ var Loader = /*#__PURE__*/ function(e) {
1906
1906
  } }, t)) || this;
1907
1907
  }
1908
1908
  return t;
1909
- }(ImReadyManager), __defProp$1 = Object.defineProperty, __defProps$1 = Object.defineProperties, __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$1 = Object.getOwnPropertySymbols, __getProtoOf$1 = Object.getPrototypeOf, __hasOwnProp$1 = Object.prototype.hasOwnProperty, __propIsEnum$1 = Object.prototype.propertyIsEnumerable, __reflectGet$1 = Reflect.get, __pow = Math.pow, __defNormalProp$1 = (e, t, n) => t in e ? __defProp$1(e, t, {
1909
+ }(ImReadyManager), __defProp$2 = Object.defineProperty, __defProps$2 = Object.defineProperties, __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$2 = Object.getOwnPropertySymbols, __getProtoOf$2 = Object.getPrototypeOf, __hasOwnProp$2 = Object.prototype.hasOwnProperty, __propIsEnum$2 = Object.prototype.propertyIsEnumerable, __reflectGet$2 = Reflect.get, __pow$1 = Math.pow, __defNormalProp$2 = (e, t, n) => t in e ? __defProp$2(e, t, {
1910
1910
  enumerable: !0,
1911
1911
  configurable: !0,
1912
1912
  writable: !0,
1913
1913
  value: n
1914
- }) : e[t] = n, __spreadValues$1 = (e, t) => {
1915
- for (var n in t ||= {}) __hasOwnProp$1.call(t, n) && __defNormalProp$1(e, n, t[n]);
1916
- if (__getOwnPropSymbols$1) for (var n of __getOwnPropSymbols$1(t)) __propIsEnum$1.call(t, n) && __defNormalProp$1(e, n, t[n]);
1914
+ }) : e[t] = n, __spreadValues$2 = (e, t) => {
1915
+ for (var n in t ||= {}) __hasOwnProp$2.call(t, n) && __defNormalProp$2(e, n, t[n]);
1916
+ if (__getOwnPropSymbols$2) for (var n of __getOwnPropSymbols$2(t)) __propIsEnum$2.call(t, n) && __defNormalProp$2(e, n, t[n]);
1917
1917
  return e;
1918
- }, __spreadProps$1 = (e, t) => __defProps$1(e, __getOwnPropDescs$1(t)), __superGet$1 = (e, t, n) => __reflectGet$1(__getProtoOf$1(e), n, t), __async$1 = (e, t, n) => new Promise((r, i) => {
1918
+ }, __spreadProps$2 = (e, t) => __defProps$2(e, __getOwnPropDescs$2(t)), __superGet$2 = (e, t, n) => __reflectGet$2(__getProtoOf$2(e), n, t), __async$2 = (e, t, n) => new Promise((r, i) => {
1919
1919
  var s = (e) => {
1920
1920
  try {
1921
1921
  u(n.next(e));
@@ -1930,31 +1930,31 @@ var Loader = /*#__PURE__*/ function(e) {
1930
1930
  }
1931
1931
  }, u = (e) => e.done ? r(e.value) : Promise.resolve(e.value).then(s, l);
1932
1932
  u((n = n.apply(e, t)).next());
1933
- }), ALIGN = {
1933
+ }), ALIGN$1 = {
1934
1934
  PREV: "prev",
1935
1935
  CENTER: "center",
1936
1936
  NEXT: "next"
1937
- }, DIRECTION = {
1937
+ }, DIRECTION$1 = {
1938
1938
  PREV: "PREV",
1939
1939
  NEXT: "NEXT",
1940
1940
  NONE: null
1941
- }, MOVE_TYPE = {
1941
+ }, MOVE_TYPE$1 = {
1942
1942
  SNAP: "snap",
1943
1943
  FREE_SCROLL: "freeScroll",
1944
1944
  STRICT: "strict"
1945
- }, CLASS = {
1945
+ }, CLASS$1 = {
1946
1946
  VIEWPORT: "flicking-viewport",
1947
1947
  CAMERA: "flicking-camera",
1948
1948
  VERTICAL: "vertical",
1949
1949
  HIDDEN: "flicking-hidden",
1950
1950
  DEFAULT_VIRTUAL: "flicking-panel"
1951
- }, CIRCULAR_FALLBACK = {
1951
+ }, CIRCULAR_FALLBACK$1 = {
1952
1952
  LINEAR: "linear",
1953
1953
  BOUND: "bound"
1954
- }, ORDER = {
1954
+ }, ORDER$1 = {
1955
1955
  LTR: "ltr",
1956
1956
  RTL: "rtl"
1957
- }, AnchorPoint = class {
1957
+ }, AnchorPoint$1 = class {
1958
1958
  get index() {
1959
1959
  return this._index;
1960
1960
  }
@@ -1968,7 +1968,7 @@ var Loader = /*#__PURE__*/ function(e) {
1968
1968
  let { index: t, position: n, panel: r } = e;
1969
1969
  this._index = t, this._pos = n, this._panel = r;
1970
1970
  }
1971
- }, errors = {
1971
+ }, errors$1 = {
1972
1972
  WRONG_TYPE: {
1973
1973
  code: 0,
1974
1974
  message: (e, t) => `${e}(${typeof e}) is not a ${t.map((e) => `"${e}"`).join(" or ")}.`
@@ -2029,51 +2029,51 @@ var Loader = /*#__PURE__*/ function(e) {
2029
2029
  code: 14,
2030
2030
  message: "This behavior is not allowed when the virtual option is enabled"
2031
2031
  }
2032
- }, CODE = Object.keys(errors).reduce((e, t) => (e[t] = errors[t].code, e), {}), MESSAGE = Object.keys(errors).reduce((e, t) => (e[t] = errors[t].message, e), {}), getElement$1 = (e, t) => {
2032
+ }, CODE$1 = Object.keys(errors$1).reduce((e, t) => (e[t] = errors$1[t].code, e), {}), MESSAGE$1 = Object.keys(errors$1).reduce((e, t) => (e[t] = errors$1[t].message, e), {}), getElement$2 = (e, t) => {
2033
2033
  let n = null;
2034
- if (isString(e)) {
2034
+ if (isString$1(e)) {
2035
2035
  let r = (t || document).querySelector(e);
2036
- if (!r) throw new FlickingError(MESSAGE.ELEMENT_NOT_FOUND(e), CODE.ELEMENT_NOT_FOUND);
2036
+ if (!r) throw new FlickingError$1(MESSAGE$1.ELEMENT_NOT_FOUND(e), CODE$1.ELEMENT_NOT_FOUND);
2037
2037
  n = r;
2038
2038
  } else e && e.nodeType === Node.ELEMENT_NODE && (n = e);
2039
- if (!n) throw new FlickingError(MESSAGE.WRONG_TYPE(e, ["HTMLElement", "string"]), CODE.WRONG_TYPE);
2039
+ if (!n) throw new FlickingError$1(MESSAGE$1.WRONG_TYPE(e, ["HTMLElement", "string"]), CODE$1.WRONG_TYPE);
2040
2040
  return n;
2041
- }, checkExistence = (e, t) => {
2042
- if (e == null) throw new FlickingError(MESSAGE.VAL_MUST_NOT_NULL(e, t), CODE.VAL_MUST_NOT_NULL);
2043
- }, clamp = (e, t, n) => Math.max(Math.min(e, n), t), getFlickingAttached = (e) => {
2044
- if (!e) throw new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING);
2041
+ }, checkExistence$1 = (e, t) => {
2042
+ if (e == null) throw new FlickingError$1(MESSAGE$1.VAL_MUST_NOT_NULL(e, t), CODE$1.VAL_MUST_NOT_NULL);
2043
+ }, clamp$1 = (e, t, n) => Math.max(Math.min(e, n), t), getFlickingAttached$1 = (e) => {
2044
+ if (!e) throw new FlickingError$1(MESSAGE$1.NOT_ATTACHED_TO_FLICKING, CODE$1.NOT_ATTACHED_TO_FLICKING);
2045
2045
  return e;
2046
- }, toArray = (e) => [].slice.call(e), parseAlign$1 = (e, t) => {
2046
+ }, toArray$1 = (e) => [].slice.call(e), parseAlign$1$1 = (e, t) => {
2047
2047
  let n;
2048
- if (isString(e)) switch (e) {
2049
- case ALIGN.PREV:
2048
+ if (isString$1(e)) switch (e) {
2049
+ case ALIGN$1.PREV:
2050
2050
  n = 0;
2051
2051
  break;
2052
- case ALIGN.CENTER:
2052
+ case ALIGN$1.CENTER:
2053
2053
  n = .5 * t;
2054
2054
  break;
2055
- case ALIGN.NEXT:
2055
+ case ALIGN$1.NEXT:
2056
2056
  n = t;
2057
2057
  break;
2058
- default: if (n = parseArithmeticSize(e, t), n == null) throw new FlickingError(MESSAGE.WRONG_OPTION("align", e), CODE.WRONG_OPTION);
2058
+ default: if (n = parseArithmeticSize$1(e, t), n == null) throw new FlickingError$1(MESSAGE$1.WRONG_OPTION("align", e), CODE$1.WRONG_OPTION);
2059
2059
  }
2060
2060
  else n = e;
2061
2061
  return n;
2062
- }, parseBounce = (e, t) => {
2062
+ }, parseBounce$1 = (e, t) => {
2063
2063
  let n;
2064
- if (Array.isArray(e)) n = e.map((e) => parseArithmeticSize(e, t));
2064
+ if (Array.isArray(e)) n = e.map((e) => parseArithmeticSize$1(e, t));
2065
2065
  else {
2066
- let r = parseArithmeticSize(e, t);
2066
+ let r = parseArithmeticSize$1(e, t);
2067
2067
  n = [r, r];
2068
2068
  }
2069
2069
  return n.map((t) => {
2070
- if (t == null) throw new FlickingError(MESSAGE.WRONG_OPTION("bounce", e), CODE.WRONG_OPTION);
2070
+ if (t == null) throw new FlickingError$1(MESSAGE$1.WRONG_OPTION("bounce", e), CODE$1.WRONG_OPTION);
2071
2071
  return t;
2072
2072
  });
2073
- }, parseArithmeticSize = (e, t) => {
2074
- let n = parseArithmeticExpression(e);
2073
+ }, parseArithmeticSize$1 = (e, t) => {
2074
+ let n = parseArithmeticExpression$1(e);
2075
2075
  return n == null ? null : n.percentage * t + n.absolute;
2076
- }, parseArithmeticExpression = (e) => {
2076
+ }, parseArithmeticExpression$1 = (e) => {
2077
2077
  let t = /(?:(\+|-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;
2078
2078
  if (typeof e == "number") return {
2079
2079
  percentage: 0,
@@ -2090,35 +2090,35 @@ var Loader = /*#__PURE__*/ function(e) {
2090
2090
  u === "%" ? n.percentage += d / 100 * f : n.absolute += f * d, ++r, i = t.exec(e);
2091
2091
  }
2092
2092
  return r === 0 ? null : n;
2093
- }, parsePanelAlign = (e) => typeof e == "object" ? e.panel : e, getDirection = (e, t) => e === t ? DIRECTION.NONE : e < t ? DIRECTION.NEXT : DIRECTION.PREV, parseElement = (e) => {
2093
+ }, parsePanelAlign$1 = (e) => typeof e == "object" ? e.panel : e, getDirection$1 = (e, t) => e === t ? DIRECTION$1.NONE : e < t ? DIRECTION$1.NEXT : DIRECTION$1.PREV, parseElement$1 = (e) => {
2094
2094
  Array.isArray(e) || (e = [e]);
2095
2095
  let t = [];
2096
2096
  return e.forEach((e) => {
2097
- if (isString(e)) {
2097
+ if (isString$1(e)) {
2098
2098
  let n = document.createElement("div");
2099
- for (n.innerHTML = e, t.push(...toArray(n.children)); n.firstChild;) n.removeChild(n.firstChild);
2099
+ for (n.innerHTML = e, t.push(...toArray$1(n.children)); n.firstChild;) n.removeChild(n.firstChild);
2100
2100
  } else if (e && e.nodeType === Node.ELEMENT_NODE) t.push(e);
2101
- else throw new FlickingError(MESSAGE.WRONG_TYPE(e, ["HTMLElement", "string"]), CODE.WRONG_TYPE);
2101
+ else throw new FlickingError$1(MESSAGE$1.WRONG_TYPE(e, ["HTMLElement", "string"]), CODE$1.WRONG_TYPE);
2102
2102
  }), t;
2103
- }, getMinusCompensatedIndex = (e, t) => clamp(e < 0 ? e + t : e, 0, t), includes = (e, t) => {
2103
+ }, getMinusCompensatedIndex$1 = (e, t) => clamp$1(e < 0 ? e + t : e, 0, t), includes$1 = (e, t) => {
2104
2104
  for (let n of e) if (n === t) return !0;
2105
2105
  return !1;
2106
- }, isString = (e) => typeof e == "string", circulatePosition = (e, t, n) => {
2106
+ }, isString$1 = (e) => typeof e == "string", circulatePosition$1 = (e, t, n) => {
2107
2107
  let r = n - t;
2108
2108
  return e < t ? e = n - (t - e) % r : e > n && (e = t + (e - n) % r), e;
2109
- }, find = (e, t) => {
2109
+ }, find$1 = (e, t) => {
2110
2110
  for (let n of e) if (t(n)) return n;
2111
2111
  return null;
2112
- }, findIndex = (e, t) => {
2112
+ }, findIndex$1 = (e, t) => {
2113
2113
  for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
2114
2114
  return -1;
2115
- }, getProgress$1 = (e, t, n) => (e - t) / (n - t), getStyle = (e) => e ? window.getComputedStyle(e) || e.currentStyle : {}, setSize = (e, { width: t, height: n }) => {
2116
- e && (t != null && (isString(t) ? e.style.width = t : e.style.width = `${t}px`), n != null && (isString(n) ? e.style.height = n : e.style.height = `${n}px`));
2117
- }, isBetween = (e, t, n) => e >= t && e <= n, circulateIndex = (e, t) => e >= t ? e % t : e < 0 ? getMinusCompensatedIndex((e + 1) % t - 1, t) : e, range = (e) => {
2115
+ }, getProgress$1$1 = (e, t, n) => (e - t) / (n - t), getStyle$1 = (e) => e ? window.getComputedStyle(e) || e.currentStyle : {}, setSize$1 = (e, { width: t, height: n }) => {
2116
+ e && (t != null && (isString$1(t) ? e.style.width = t : e.style.width = `${t}px`), n != null && (isString$1(n) ? e.style.height = n : e.style.height = `${n}px`));
2117
+ }, isBetween$1 = (e, t, n) => e >= t && e <= n, circulateIndex$1 = (e, t) => e >= t ? e % t : e < 0 ? getMinusCompensatedIndex$1((e + 1) % t - 1, t) : e, range$1 = (e) => {
2118
2118
  let t = Array(e);
2119
2119
  for (let n = 0; n < e; n++) t[n] = n;
2120
2120
  return t;
2121
- }, getElementSize = ({ el: e, horizontal: t, useFractionalSize: n, useOffset: r, style: i }) => {
2121
+ }, getElementSize$1 = ({ el: e, horizontal: t, useFractionalSize: n, useOffset: r, style: i }) => {
2122
2122
  let s = 0;
2123
2123
  if (n) {
2124
2124
  let e = parseFloat(t ? i.width : i.height) || 0, n = i.boxSizing === "border-box", l = t ? parseFloat(i.borderLeftWidth || "0") + parseFloat(i.borderRightWidth || "0") : parseFloat(i.borderTopWidth || "0") + parseFloat(i.borderBottomWidth || "0");
@@ -2132,11 +2132,11 @@ var Loader = /*#__PURE__*/ function(e) {
2132
2132
  s = r ? e[`offset${n}`] : e[`client${n}`];
2133
2133
  }
2134
2134
  return Math.max(s, 0);
2135
- }, setPrototypeOf = Object.setPrototypeOf || ((e, t) => (e.__proto__ = t, e)), FlickingError = class e extends Error {
2135
+ }, setPrototypeOf$1 = Object.setPrototypeOf || ((e, t) => (e.__proto__ = t, e)), FlickingError$1 = class e extends Error {
2136
2136
  constructor(t, n) {
2137
- super(t), setPrototypeOf(this, e.prototype), this.name = "FlickingError", this.code = n;
2137
+ super(t), setPrototypeOf$1(this, e.prototype), this.name = "FlickingError", this.code = n;
2138
2138
  }
2139
- }, EVENTS = {
2139
+ }, EVENTS$1 = {
2140
2140
  READY: "ready",
2141
2141
  BEFORE_RESIZE: "beforeResize",
2142
2142
  AFTER_RESIZE: "afterResize",
@@ -2154,12 +2154,12 @@ var Loader = /*#__PURE__*/ function(e) {
2154
2154
  VISIBLE_CHANGE: "visibleChange",
2155
2155
  REACH_EDGE: "reachEdge",
2156
2156
  PANEL_CHANGE: "panelChange"
2157
- }, CameraMode = class {
2157
+ }, CameraMode$1 = class {
2158
2158
  constructor(e) {
2159
2159
  this._flicking = e;
2160
2160
  }
2161
2161
  getAnchors() {
2162
- return this._flicking.renderer.panels.map((e, t) => new AnchorPoint({
2162
+ return this._flicking.renderer.panels.map((e, t) => new AnchorPoint$1({
2163
2163
  index: t,
2164
2164
  position: e.position,
2165
2165
  panel: e
@@ -2181,7 +2181,7 @@ var Loader = /*#__PURE__*/ function(e) {
2181
2181
  }
2182
2182
  clampToReachablePosition(e) {
2183
2183
  let t = this._flicking.camera.range;
2184
- return clamp(e, t.min, t.max);
2184
+ return clamp$1(e, t.min, t.max);
2185
2185
  }
2186
2186
  getCircularOffset() {
2187
2187
  return 0;
@@ -2196,7 +2196,7 @@ var Loader = /*#__PURE__*/ function(e) {
2196
2196
  let t = this._flicking.camera.visibleRange;
2197
2197
  return e.isVisibleOnRange(t.min, t.max);
2198
2198
  }
2199
- }, BoundCameraMode = class extends CameraMode {
2199
+ }, BoundCameraMode$1 = class extends CameraMode$1 {
2200
2200
  checkAvailability() {
2201
2201
  let e = this._flicking, t = e.renderer, n = t.getPanel(0), r = t.getPanel(t.panelCount - 1);
2202
2202
  if (!n || !r) return !1;
@@ -2215,7 +2215,7 @@ var Loader = /*#__PURE__*/ function(e) {
2215
2215
  max: p
2216
2216
  };
2217
2217
  {
2218
- let t = e.camera.align, n = f + parseAlign$1(typeof t == "object" ? t.camera : t, p - f);
2218
+ let t = e.camera.align, n = f + parseAlign$1$1(typeof t == "object" ? t.camera : t, p - f);
2219
2219
  return {
2220
2220
  min: n,
2221
2221
  max: n
@@ -2227,32 +2227,32 @@ var Loader = /*#__PURE__*/ function(e) {
2227
2227
  if (n.length <= 0) return [];
2228
2228
  let r = e.camera.range, i = n.filter((e) => t.canReach(e));
2229
2229
  if (i.length > 0) {
2230
- let e = i[0].position !== r.min, t = i[i.length - 1].position !== r.max, s = +!!e, l = i.map((e, t) => new AnchorPoint({
2230
+ let e = i[0].position !== r.min, t = i[i.length - 1].position !== r.max, s = +!!e, l = i.map((e, t) => new AnchorPoint$1({
2231
2231
  index: t + s,
2232
2232
  position: e.position,
2233
2233
  panel: e
2234
2234
  }));
2235
- return e && l.splice(0, 0, new AnchorPoint({
2235
+ return e && l.splice(0, 0, new AnchorPoint$1({
2236
2236
  index: 0,
2237
2237
  position: r.min,
2238
2238
  panel: n[i[0].index - 1]
2239
- })), t && l.push(new AnchorPoint({
2239
+ })), t && l.push(new AnchorPoint$1({
2240
2240
  index: l.length,
2241
2241
  position: r.max,
2242
2242
  panel: n[i[i.length - 1].index + 1]
2243
2243
  })), l;
2244
2244
  } else if (r.min !== r.max) {
2245
2245
  let e = this._findNearestPanel(r.min, n), t = e.index === n.length - 1 ? e.prev() : e, i = t.next();
2246
- return [new AnchorPoint({
2246
+ return [new AnchorPoint$1({
2247
2247
  index: 0,
2248
2248
  position: r.min,
2249
2249
  panel: t
2250
- }), new AnchorPoint({
2250
+ }), new AnchorPoint$1({
2251
2251
  index: 1,
2252
2252
  position: r.max,
2253
2253
  panel: i
2254
2254
  })];
2255
- } else return [new AnchorPoint({
2255
+ } else return [new AnchorPoint$1({
2256
2256
  index: 0,
2257
2257
  position: r.min,
2258
2258
  panel: this._findNearestPanel(r.min, n)
@@ -2271,7 +2271,7 @@ var Loader = /*#__PURE__*/ function(e) {
2271
2271
  }
2272
2272
  return t[t.length - 1];
2273
2273
  }
2274
- }, CircularCameraMode = class extends CameraMode {
2274
+ }, CircularCameraMode$1 = class extends CameraMode$1 {
2275
2275
  checkAvailability() {
2276
2276
  let e = this._flicking, t = e.renderer.panels;
2277
2277
  if (t.length <= 0) return !1;
@@ -2291,7 +2291,7 @@ var Loader = /*#__PURE__*/ function(e) {
2291
2291
  };
2292
2292
  }
2293
2293
  getAnchors() {
2294
- return this._flicking.renderer.panels.map((e, t) => new AnchorPoint({
2294
+ return this._flicking.renderer.panels.map((e, t) => new AnchorPoint$1({
2295
2295
  index: t,
2296
2296
  position: e.position,
2297
2297
  panel: e
@@ -2308,15 +2308,15 @@ var Loader = /*#__PURE__*/ function(e) {
2308
2308
  return n[s];
2309
2309
  }
2310
2310
  findAnchorIncludePosition(e) {
2311
- let t = this._flicking.camera, n = t.range, r = t.anchorPoints, i = t.rangeDiff, s = r.length, l = circulatePosition(e, n.min, n.max), u = super.findAnchorIncludePosition(l);
2311
+ let t = this._flicking.camera, n = t.range, r = t.anchorPoints, i = t.rangeDiff, s = r.length, l = circulatePosition$1(e, n.min, n.max), u = super.findAnchorIncludePosition(l);
2312
2312
  if (s > 0 && (e === n.min || e === n.max) && (u = [
2313
2313
  u,
2314
- new AnchorPoint({
2314
+ new AnchorPoint$1({
2315
2315
  index: 0,
2316
2316
  position: r[0].position + i,
2317
2317
  panel: r[0].panel
2318
2318
  }),
2319
- new AnchorPoint({
2319
+ new AnchorPoint$1({
2320
2320
  index: s - 1,
2321
2321
  position: r[s - 1].position - i,
2322
2322
  panel: r[s - 1].panel
@@ -2324,14 +2324,14 @@ var Loader = /*#__PURE__*/ function(e) {
2324
2324
  ].filter((e) => !!e).reduce((t, n) => t && Math.abs(t.position - e) < Math.abs(n.position - e) ? t : n, null)), !u) return null;
2325
2325
  if (e < n.min) {
2326
2326
  let t = -Math.floor((n.min - e) / i) - 1;
2327
- return new AnchorPoint({
2327
+ return new AnchorPoint$1({
2328
2328
  index: u.index,
2329
2329
  position: u.position + i * t,
2330
2330
  panel: u.panel
2331
2331
  });
2332
2332
  } else if (e > n.max) {
2333
2333
  let t = Math.floor((e - n.max) / i) + 1;
2334
- return new AnchorPoint({
2334
+ return new AnchorPoint$1({
2335
2335
  index: u.index,
2336
2336
  position: u.position + i * t,
2337
2337
  panel: u.panel
@@ -2342,7 +2342,7 @@ var Loader = /*#__PURE__*/ function(e) {
2342
2342
  getCircularOffset() {
2343
2343
  let e = this._flicking;
2344
2344
  if (!e.camera.circularEnabled) return 0;
2345
- let t = e.panels.filter((e) => e.toggled), n = t.filter((e) => e.toggleDirection === DIRECTION.PREV), r = t.filter((e) => e.toggleDirection === DIRECTION.NEXT);
2345
+ let t = e.panels.filter((e) => e.toggled), n = t.filter((e) => e.toggleDirection === DIRECTION$1.PREV), r = t.filter((e) => e.toggleDirection === DIRECTION$1.NEXT);
2346
2346
  return this._calcPanelAreaSum(n) - this._calcPanelAreaSum(r);
2347
2347
  }
2348
2348
  clampToReachablePosition(e) {
@@ -2358,7 +2358,7 @@ var Loader = /*#__PURE__*/ function(e) {
2358
2358
  _calcPanelAreaSum(e) {
2359
2359
  return e.reduce((e, t) => e + t.sizeIncludingMargin, 0);
2360
2360
  }
2361
- }, LinearCameraMode = class extends CameraMode {
2361
+ }, LinearCameraMode$1 = class extends CameraMode$1 {
2362
2362
  checkAvailability() {
2363
2363
  return !0;
2364
2364
  }
@@ -2370,8 +2370,8 @@ var Loader = /*#__PURE__*/ function(e) {
2370
2370
  max: i?.position ?? 0
2371
2371
  };
2372
2372
  }
2373
- }, Camera = class {
2374
- constructor(e, { align: t = ALIGN.CENTER } = {}) {
2373
+ }, Camera$1 = class {
2374
+ constructor(e, { align: t = ALIGN$1.CENTER } = {}) {
2375
2375
  this._lookedOffset = 0, this._checkTranslateSupport = () => {
2376
2376
  let e = [
2377
2377
  "webkitTransform",
@@ -2381,7 +2381,7 @@ var Loader = /*#__PURE__*/ function(e) {
2381
2381
  "transform"
2382
2382
  ], t = document.documentElement.style, n = "";
2383
2383
  for (let r of e) r in t && (n = r);
2384
- if (!n) throw new FlickingError(MESSAGE.TRANSFORM_NOT_SUPPORTED, CODE.TRANSFORM_NOT_SUPPORTED);
2384
+ if (!n) throw new FlickingError$1(MESSAGE$1.TRANSFORM_NOT_SUPPORTED, CODE$1.TRANSFORM_NOT_SUPPORTED);
2385
2385
  this._transform = n;
2386
2386
  }, this._flicking = e, this._resetInternalValues(), this._align = t;
2387
2387
  }
@@ -2389,7 +2389,7 @@ var Loader = /*#__PURE__*/ function(e) {
2389
2389
  return this._el;
2390
2390
  }
2391
2391
  get children() {
2392
- return toArray(this._el.children);
2392
+ return toArray$1(this._el.children);
2393
2393
  }
2394
2394
  get position() {
2395
2395
  return this._position;
@@ -2445,10 +2445,10 @@ var Loader = /*#__PURE__*/ function(e) {
2445
2445
  if (t === i) return r.index;
2446
2446
  if (t < i) {
2447
2447
  let e = r.prev(), n = e ? e.position + e.offset : l - s[0];
2448
- return n > i && (n -= d), r.index - 1 + getProgress$1(t, n, i);
2448
+ return n > i && (n -= d), r.index - 1 + getProgress$1$1(t, n, i);
2449
2449
  } else {
2450
2450
  let e = r.next(), n = e ? e.position + e.offset : u + s[1];
2451
- return n < i && (n += d), r.index + getProgress$1(t, i, n);
2451
+ return n < i && (n += d), r.index + getProgress$1$1(t, i, n);
2452
2452
  }
2453
2453
  }
2454
2454
  get panelOrder() {
@@ -2462,13 +2462,13 @@ var Loader = /*#__PURE__*/ function(e) {
2462
2462
  }
2463
2463
  init() {
2464
2464
  let e = this._flicking.viewport.element;
2465
- return checkExistence(e.firstElementChild, "First element child of the viewport element"), this._el = e.firstElementChild, this._checkTranslateSupport(), this._updateMode(), this.updatePanelOrder(), this;
2465
+ return checkExistence$1(e.firstElementChild, "First element child of the viewport element"), this._el = e.firstElementChild, this._checkTranslateSupport(), this._updateMode(), this.updatePanelOrder(), this;
2466
2466
  }
2467
2467
  destroy() {
2468
2468
  return this._resetInternalValues(), this;
2469
2469
  }
2470
2470
  lookAt(e) {
2471
- let t = this._offset, n = this._lookedOffset !== t, r = getFlickingAttached(this._flicking), i = this._position;
2471
+ let t = this._offset, n = this._lookedOffset !== t, r = getFlickingAttached$1(this._flicking), i = this._position;
2472
2472
  this._position = e;
2473
2473
  let s = this._togglePanels(i, e);
2474
2474
  this._refreshVisiblePanels(), this._checkNeedPanel(), this._checkReachEnd(i, e), s ? r.renderer.render().then(() => {
@@ -2479,7 +2479,7 @@ var Loader = /*#__PURE__*/ function(e) {
2479
2479
  if (!this._circularEnabled || e.index !== 0) return this._anchors[e.index - 1] || null;
2480
2480
  {
2481
2481
  let e = this._anchors, t = this.rangeDiff, n = e[e.length - 1];
2482
- return new AnchorPoint({
2482
+ return new AnchorPoint$1({
2483
2483
  index: n.index,
2484
2484
  position: n.position - t,
2485
2485
  panel: n.panel
@@ -2491,7 +2491,7 @@ var Loader = /*#__PURE__*/ function(e) {
2491
2491
  if (!this._circularEnabled || e.index !== t.length - 1) return t[e.index + 1] || null;
2492
2492
  {
2493
2493
  let e = this.rangeDiff, n = t[0];
2494
- return new AnchorPoint({
2494
+ return new AnchorPoint$1({
2495
2495
  index: n.index,
2496
2496
  position: n.position + e,
2497
2497
  panel: n.panel
@@ -2510,8 +2510,8 @@ var Loader = /*#__PURE__*/ function(e) {
2510
2510
  }
2511
2511
  findActiveAnchor() {
2512
2512
  var e;
2513
- let t = getFlickingAttached(this._flicking).control.activePanel;
2514
- return t ? find(this._anchors, (e) => e.panel.index === t.index) ?? this.findNearestAnchor(t.position) : null;
2513
+ let t = getFlickingAttached$1(this._flicking).control.activePanel;
2514
+ return t ? find$1(this._anchors, (e) => e.panel.index === t.index) ?? this.findNearestAnchor(t.position) : null;
2515
2515
  }
2516
2516
  clampToReachablePosition(e) {
2517
2517
  return this._mode.clampToReachablePosition(e);
@@ -2523,31 +2523,31 @@ var Loader = /*#__PURE__*/ function(e) {
2523
2523
  return this._mode.canSee(e);
2524
2524
  }
2525
2525
  updateRange() {
2526
- let e = getFlickingAttached(this._flicking).renderer.panels;
2526
+ let e = getFlickingAttached$1(this._flicking).renderer.panels;
2527
2527
  return this._updateMode(), this._range = this._mode.getRange(), e.forEach((e) => e.updateCircularToggleDirection()), this;
2528
2528
  }
2529
2529
  updateAlignPos() {
2530
2530
  let e = this._align, t = typeof e == "object" ? e.camera : e;
2531
- return this._alignPos = parseAlign$1(t, this.size), this;
2531
+ return this._alignPos = parseAlign$1$1(t, this.size), this;
2532
2532
  }
2533
2533
  updateAnchors() {
2534
2534
  return this._anchors = this._mode.getAnchors(), this;
2535
2535
  }
2536
2536
  updateAdaptiveHeight() {
2537
- let e = getFlickingAttached(this._flicking), t = e.control.activePanel, n = [...e.visiblePanels];
2537
+ let e = getFlickingAttached$1(this._flicking), t = e.control.activePanel, n = [...e.visiblePanels];
2538
2538
  if (t && n.push(t), !e.horizontal || !e.adaptive || !n.length) return;
2539
2539
  let r = Math.max(...n.map((e) => e.height));
2540
2540
  e.viewport.setSize({ height: r });
2541
2541
  }
2542
2542
  updateOffset() {
2543
- let e = getFlickingAttached(this._flicking), t = this._position, n = e.panels.filter((e) => !e.rendered);
2543
+ let e = getFlickingAttached$1(this._flicking), t = this._position, n = e.panels.filter((e) => !e.rendered);
2544
2544
  return this._offset = n.filter((e) => e.position + e.offset < t).reduce((e, t) => e + t.sizeIncludingMargin, 0), this._circularOffset = this._mode.getCircularOffset(), this.applyTransform(), this;
2545
2545
  }
2546
2546
  updatePanelOrder() {
2547
- let e = getFlickingAttached(this._flicking);
2547
+ let e = getFlickingAttached$1(this._flicking);
2548
2548
  if (!e.horizontal) return this;
2549
- let t = this._el, n = getStyle(t).direction;
2550
- return n !== this._panelOrder && (this._panelOrder = n === ORDER.RTL ? ORDER.RTL : ORDER.LTR, e.initialized && e.control.controller.updateDirection()), this;
2549
+ let t = this._el, n = getStyle$1(t).direction;
2550
+ return n !== this._panelOrder && (this._panelOrder = n === ORDER$1.RTL ? ORDER$1.RTL : ORDER$1.LTR, e.initialized && e.control.controller.updateDirection()), this;
2551
2551
  }
2552
2552
  resetNeedPanelHistory() {
2553
2553
  return this._needPanelTriggered = {
@@ -2556,10 +2556,10 @@ var Loader = /*#__PURE__*/ function(e) {
2556
2556
  }, this;
2557
2557
  }
2558
2558
  applyTransform() {
2559
- let e = this._el, t = getFlickingAttached(this._flicking);
2559
+ let e = this._el, t = getFlickingAttached$1(this._flicking);
2560
2560
  if (t.renderer.rendering || !t.initialized) return this;
2561
2561
  let n = this._position - this._alignPos - this._offset + this._circularOffset;
2562
- return e.style[this._transform] = t.horizontal ? `translate(${this._panelOrder === ORDER.RTL ? n : -n}px)` : `translate(0, ${-n}px)`, this;
2562
+ return e.style[this._transform] = t.horizontal ? `translate(${this._panelOrder === ORDER$1.RTL ? n : -n}px)` : `translate(0, ${-n}px)`, this;
2563
2563
  }
2564
2564
  _resetInternalValues() {
2565
2565
  this._position = 0, this._lookedOffset = 0, this._alignPos = 0, this._offset = 0, this._circularOffset = 0, this._circularEnabled = !1, this._range = {
@@ -2571,11 +2571,11 @@ var Loader = /*#__PURE__*/ function(e) {
2571
2571
  };
2572
2572
  }
2573
2573
  _refreshVisiblePanels() {
2574
- let e = getFlickingAttached(this._flicking), t = e.renderer.panels.filter((e) => this.canSee(e)), n = this._visiblePanels;
2574
+ let e = getFlickingAttached$1(this._flicking), t = e.renderer.panels.filter((e) => this.canSee(e)), n = this._visiblePanels;
2575
2575
  this._visiblePanels = t;
2576
- let r = t.filter((e) => !includes(n, e)), i = n.filter((e) => !includes(t, e));
2576
+ let r = t.filter((e) => !includes$1(n, e)), i = n.filter((e) => !includes$1(t, e));
2577
2577
  (r.length > 0 || i.length > 0) && e.renderer.render().then(() => {
2578
- e.trigger(new ComponentEvent$1(EVENTS.VISIBLE_CHANGE, {
2578
+ e.trigger(new ComponentEvent$1(EVENTS$1.VISIBLE_CHANGE, {
2579
2579
  added: r,
2580
2580
  removed: i,
2581
2581
  visiblePanels: t
@@ -2585,42 +2585,42 @@ var Loader = /*#__PURE__*/ function(e) {
2585
2585
  _checkNeedPanel() {
2586
2586
  let e = this._needPanelTriggered;
2587
2587
  if (e.prev && e.next) return;
2588
- let t = getFlickingAttached(this._flicking), n = t.renderer.panels;
2588
+ let t = getFlickingAttached$1(this._flicking), n = t.renderer.panels;
2589
2589
  if (n.length <= 0) {
2590
- e.prev ||= (t.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV })), !0), e.next ||= (t.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT })), !0);
2590
+ e.prev ||= (t.trigger(new ComponentEvent$1(EVENTS$1.NEED_PANEL, { direction: DIRECTION$1.PREV })), !0), e.next ||= (t.trigger(new ComponentEvent$1(EVENTS$1.NEED_PANEL, { direction: DIRECTION$1.NEXT })), !0);
2591
2591
  return;
2592
2592
  }
2593
2593
  let r = this._position, i = this.size, s = this._range, l = t.needPanelThreshold, u = r - this._alignPos, d = u + i, f = n[0], p = n[n.length - 1];
2594
- e.prev || (u <= f.range.min + l || r <= s.min + l) && (t.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV })), e.prev = !0), e.next || (d >= p.range.max - l || r >= s.max - l) && (t.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT })), e.next = !0);
2594
+ e.prev || (u <= f.range.min + l || r <= s.min + l) && (t.trigger(new ComponentEvent$1(EVENTS$1.NEED_PANEL, { direction: DIRECTION$1.PREV })), e.prev = !0), e.next || (d >= p.range.max - l || r >= s.max - l) && (t.trigger(new ComponentEvent$1(EVENTS$1.NEED_PANEL, { direction: DIRECTION$1.NEXT })), e.next = !0);
2595
2595
  }
2596
2596
  _checkReachEnd(e, t) {
2597
- let n = getFlickingAttached(this._flicking), r = this._range, i = e > r.min && e < r.max, s = t > r.min && t < r.max;
2597
+ let n = getFlickingAttached$1(this._flicking), r = this._range, i = e > r.min && e < r.max, s = t > r.min && t < r.max;
2598
2598
  if (!i || s) return;
2599
- let l = t <= r.min ? DIRECTION.PREV : DIRECTION.NEXT;
2600
- n.trigger(new ComponentEvent$1(EVENTS.REACH_EDGE, { direction: l }));
2599
+ let l = t <= r.min ? DIRECTION$1.PREV : DIRECTION$1.NEXT;
2600
+ n.trigger(new ComponentEvent$1(EVENTS$1.REACH_EDGE, { direction: l }));
2601
2601
  }
2602
2602
  _updateMode() {
2603
- let e = getFlickingAttached(this._flicking);
2603
+ let e = getFlickingAttached$1(this._flicking);
2604
2604
  if (e.circular) {
2605
- let t = new CircularCameraMode(e), n = t.checkAvailability();
2605
+ let t = new CircularCameraMode$1(e), n = t.checkAvailability();
2606
2606
  if (n) this._mode = t;
2607
2607
  else {
2608
2608
  let t = e.circularFallback;
2609
- this._mode = t === CIRCULAR_FALLBACK.BOUND ? new BoundCameraMode(e) : new LinearCameraMode(e);
2609
+ this._mode = t === CIRCULAR_FALLBACK$1.BOUND ? new BoundCameraMode$1(e) : new LinearCameraMode$1(e);
2610
2610
  }
2611
2611
  this._circularEnabled = n;
2612
- } else this._mode = e.bound ? new BoundCameraMode(e) : new LinearCameraMode(e), this._circularEnabled = !1;
2612
+ } else this._mode = e.bound ? new BoundCameraMode$1(e) : new LinearCameraMode$1(e), this._circularEnabled = !1;
2613
2613
  }
2614
2614
  _togglePanels(e, t) {
2615
- return t !== e && getFlickingAttached(this._flicking).renderer.panels.map((n) => n.toggle(e, t)).some((e) => e);
2615
+ return t !== e && getFlickingAttached$1(this._flicking).renderer.panels.map((n) => n.toggle(e, t)).some((e) => e);
2616
2616
  }
2617
- }, EVENT = {
2617
+ }, EVENT$1 = {
2618
2618
  HOLD: "hold",
2619
2619
  CHANGE: "change",
2620
2620
  RELEASE: "release",
2621
2621
  ANIMATION_END: "animationEnd",
2622
2622
  FINISH: "finish"
2623
- }, POSITION_KEY = "flick", STATE_TYPE = /* @__PURE__ */ ((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", e))(STATE_TYPE || {}), State = class {
2623
+ }, POSITION_KEY$1 = "flick", STATE_TYPE$1 = /* @__PURE__ */ ((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", e))(STATE_TYPE$1 || {}), State$1 = class {
2624
2624
  constructor() {
2625
2625
  this._delta = 0, this._targetPanel = null;
2626
2626
  }
@@ -2642,59 +2642,59 @@ var Loader = /*#__PURE__*/ function(e) {
2642
2642
  onAnimationEnd(e) {}
2643
2643
  onFinish(e) {}
2644
2644
  _moveToChangedPosition(e) {
2645
- let { flicking: t, axesEvent: n, transitTo: r } = e, i = n.delta[POSITION_KEY];
2645
+ let { flicking: t, axesEvent: n, transitTo: r } = e, i = n.delta[POSITION_KEY$1];
2646
2646
  if (!i) return;
2647
2647
  this._delta += i;
2648
- let s = t.camera, l = s.position, u = n.pos[POSITION_KEY], d = t.circularEnabled ? circulatePosition(u, s.range.min, s.range.max) : u;
2648
+ let s = t.camera, l = s.position, u = n.pos[POSITION_KEY$1], d = t.circularEnabled ? circulatePosition$1(u, s.range.min, s.range.max) : u;
2649
2649
  s.lookAt(d);
2650
- let f = new ComponentEvent$1(EVENTS.MOVE, {
2650
+ let f = new ComponentEvent$1(EVENTS$1.MOVE, {
2651
2651
  isTrusted: n.isTrusted,
2652
2652
  holding: this.holding,
2653
- direction: getDirection(0, n.delta[POSITION_KEY]),
2653
+ direction: getDirection$1(0, n.delta[POSITION_KEY$1]),
2654
2654
  axesEvent: n
2655
2655
  });
2656
2656
  t.trigger(f), f.isCanceled() && (s.lookAt(l), r(4));
2657
2657
  }
2658
- }, AnimatingState = class extends State {
2658
+ }, AnimatingState$1 = class extends State$1 {
2659
2659
  constructor() {
2660
2660
  super(...arguments), this.holding = !1, this.animating = !0;
2661
2661
  }
2662
2662
  onHold(e) {
2663
2663
  let { flicking: t, axesEvent: n, transitTo: r } = e, i = this._targetPanel, s = t.control;
2664
2664
  this._delta = 0, t.control.updateInput(), t.changeOnHold && i && s.setActive(i, s.activePanel, n.isTrusted);
2665
- let l = new ComponentEvent$1(EVENTS.HOLD_START, { axesEvent: n });
2666
- t.trigger(l), l.isCanceled() ? r(STATE_TYPE.DISABLED) : r(STATE_TYPE.DRAGGING);
2665
+ let l = new ComponentEvent$1(EVENTS$1.HOLD_START, { axesEvent: n });
2666
+ t.trigger(l), l.isCanceled() ? r(STATE_TYPE$1.DISABLED) : r(STATE_TYPE$1.DRAGGING);
2667
2667
  }
2668
2668
  onChange(e) {
2669
2669
  this._moveToChangedPosition(e);
2670
2670
  }
2671
2671
  onFinish(e) {
2672
2672
  let { flicking: t, axesEvent: n, transitTo: r } = e, i = t.control, s = i.controller.animatingContext;
2673
- r(STATE_TYPE.IDLE), t.trigger(new ComponentEvent$1(EVENTS.MOVE_END, {
2673
+ r(STATE_TYPE$1.IDLE), t.trigger(new ComponentEvent$1(EVENTS$1.MOVE_END, {
2674
2674
  isTrusted: n.isTrusted,
2675
- direction: getDirection(s.start, s.end),
2675
+ direction: getDirection$1(s.start, s.end),
2676
2676
  axesEvent: n
2677
2677
  }));
2678
2678
  let l = this._targetPanel;
2679
2679
  l && i.setActive(l, i.activePanel, n.isTrusted);
2680
2680
  }
2681
- }, DisabledState = class extends State {
2681
+ }, DisabledState$1 = class extends State$1 {
2682
2682
  constructor() {
2683
2683
  super(...arguments), this.holding = !1, this.animating = !0;
2684
2684
  }
2685
2685
  onAnimationEnd(e) {
2686
2686
  let { transitTo: t } = e;
2687
- t(STATE_TYPE.IDLE);
2687
+ t(STATE_TYPE$1.IDLE);
2688
2688
  }
2689
2689
  onChange(e) {
2690
2690
  let { axesEvent: t, transitTo: n } = e;
2691
- t.stop(), n(STATE_TYPE.IDLE);
2691
+ t.stop(), n(STATE_TYPE$1.IDLE);
2692
2692
  }
2693
2693
  onRelease(e) {
2694
2694
  let { axesEvent: t, transitTo: n } = e;
2695
- t.delta.flick === 0 && n(STATE_TYPE.IDLE);
2695
+ t.delta.flick === 0 && n(STATE_TYPE$1.IDLE);
2696
2696
  }
2697
- }, DraggingState = class extends State {
2697
+ }, DraggingState$1 = class extends State$1 {
2698
2698
  constructor() {
2699
2699
  super(...arguments), this.holding = !0, this.animating = !0;
2700
2700
  }
@@ -2703,44 +2703,44 @@ var Loader = /*#__PURE__*/ function(e) {
2703
2703
  }
2704
2704
  onRelease(e) {
2705
2705
  let { flicking: t, axesEvent: n, transitTo: r } = e;
2706
- if (t.trigger(new ComponentEvent$1(EVENTS.HOLD_END, { axesEvent: n })), t.renderer.panelCount <= 0) {
2707
- r(STATE_TYPE.IDLE);
2706
+ if (t.trigger(new ComponentEvent$1(EVENTS$1.HOLD_END, { axesEvent: n })), t.renderer.panelCount <= 0) {
2707
+ r(STATE_TYPE$1.IDLE);
2708
2708
  return;
2709
2709
  }
2710
- r(STATE_TYPE.ANIMATING);
2711
- let i = t.control, s = n.destPos[POSITION_KEY], l = Math.max(n.duration, t.duration);
2710
+ r(STATE_TYPE$1.ANIMATING);
2711
+ let i = t.control, s = n.destPos[POSITION_KEY$1], l = Math.max(n.duration, t.duration);
2712
2712
  try {
2713
2713
  i.moveToPosition(s, l, n);
2714
2714
  } catch {
2715
- r(STATE_TYPE.IDLE), n.setTo({ [POSITION_KEY]: t.camera.position }, 0);
2715
+ r(STATE_TYPE$1.IDLE), n.setTo({ [POSITION_KEY$1]: t.camera.position }, 0);
2716
2716
  }
2717
2717
  }
2718
- }, HoldingState = class extends State {
2718
+ }, HoldingState$1 = class extends State$1 {
2719
2719
  constructor() {
2720
2720
  super(...arguments), this.holding = !0, this.animating = !1, this._releaseEvent = null;
2721
2721
  }
2722
2722
  onChange(e) {
2723
2723
  let { flicking: t, axesEvent: n, transitTo: r } = e, i = n.inputEvent;
2724
2724
  if (!i) return;
2725
- let s = t.horizontal ? i.offsetX : i.offsetY, l = new ComponentEvent$1(EVENTS.MOVE_START, {
2725
+ let s = t.horizontal ? i.offsetX : i.offsetY, l = new ComponentEvent$1(EVENTS$1.MOVE_START, {
2726
2726
  isTrusted: n.isTrusted,
2727
2727
  holding: this.holding,
2728
- direction: getDirection(0, -s),
2728
+ direction: getDirection$1(0, -s),
2729
2729
  axesEvent: n
2730
2730
  });
2731
- t.trigger(l), l.isCanceled() ? r(STATE_TYPE.DISABLED) : r(STATE_TYPE.DRAGGING).onChange(e);
2731
+ t.trigger(l), l.isCanceled() ? r(STATE_TYPE$1.DISABLED) : r(STATE_TYPE$1.DRAGGING).onChange(e);
2732
2732
  }
2733
2733
  onRelease(e) {
2734
2734
  let { flicking: t, axesEvent: n, transitTo: r } = e;
2735
- if (t.trigger(new ComponentEvent$1(EVENTS.HOLD_END, { axesEvent: n })), n.delta.flick !== 0) {
2736
- n.setTo({ flick: t.camera.position }, 0), r(STATE_TYPE.IDLE);
2735
+ if (t.trigger(new ComponentEvent$1(EVENTS$1.HOLD_END, { axesEvent: n })), n.delta.flick !== 0) {
2736
+ n.setTo({ flick: t.camera.position }, 0), r(STATE_TYPE$1.IDLE);
2737
2737
  return;
2738
2738
  }
2739
2739
  this._releaseEvent = n;
2740
2740
  }
2741
2741
  onFinish(e) {
2742
2742
  let { flicking: t, transitTo: n } = e;
2743
- if (n(STATE_TYPE.IDLE), !this._releaseEvent) return;
2743
+ if (n(STATE_TYPE$1.IDLE), !this._releaseEvent) return;
2744
2744
  let r = this._releaseEvent.inputEvent.srcEvent, i;
2745
2745
  if (r.type === "touchend") {
2746
2746
  let e = r.changedTouches[0];
@@ -2753,14 +2753,14 @@ var Loader = /*#__PURE__*/ function(e) {
2753
2753
  }
2754
2754
  if (l) {
2755
2755
  let e = t.camera.position, n = l.position;
2756
- t.trigger(new ComponentEvent$1(EVENTS.SELECT, {
2756
+ t.trigger(new ComponentEvent$1(EVENTS$1.SELECT, {
2757
2757
  index: l.index,
2758
2758
  panel: l,
2759
- direction: getDirection(e, n)
2759
+ direction: getDirection$1(e, n)
2760
2760
  }));
2761
2761
  }
2762
2762
  }
2763
- }, IdleState = class extends State {
2763
+ }, IdleState$1 = class extends State$1 {
2764
2764
  constructor() {
2765
2765
  super(...arguments), this.holding = !1, this.animating = !1;
2766
2766
  }
@@ -2770,69 +2770,69 @@ var Loader = /*#__PURE__*/ function(e) {
2770
2770
  onHold(e) {
2771
2771
  let { flicking: t, axesEvent: n, transitTo: r } = e;
2772
2772
  if (t.renderer.panelCount <= 0) {
2773
- r(STATE_TYPE.DISABLED);
2773
+ r(STATE_TYPE$1.DISABLED);
2774
2774
  return;
2775
2775
  }
2776
- let i = new ComponentEvent$1(EVENTS.HOLD_START, { axesEvent: n });
2777
- t.trigger(i), i.isCanceled() ? r(STATE_TYPE.DISABLED) : r(STATE_TYPE.HOLDING);
2776
+ let i = new ComponentEvent$1(EVENTS$1.HOLD_START, { axesEvent: n });
2777
+ t.trigger(i), i.isCanceled() ? r(STATE_TYPE$1.DISABLED) : r(STATE_TYPE$1.HOLDING);
2778
2778
  }
2779
2779
  onChange(e) {
2780
- let { flicking: t, axesEvent: n, transitTo: r } = e, i = t.control.controller.animatingContext, s = new ComponentEvent$1(EVENTS.MOVE_START, {
2780
+ let { flicking: t, axesEvent: n, transitTo: r } = e, i = t.control.controller.animatingContext, s = new ComponentEvent$1(EVENTS$1.MOVE_START, {
2781
2781
  isTrusted: n.isTrusted,
2782
2782
  holding: this.holding,
2783
- direction: getDirection(i.start, i.end),
2783
+ direction: getDirection$1(i.start, i.end),
2784
2784
  axesEvent: n
2785
2785
  });
2786
- t.trigger(s), s.isCanceled() ? r(STATE_TYPE.DISABLED) : r(STATE_TYPE.ANIMATING).onChange(e);
2786
+ t.trigger(s), s.isCanceled() ? r(STATE_TYPE$1.DISABLED) : r(STATE_TYPE$1.ANIMATING).onChange(e);
2787
2787
  }
2788
- }, StateMachine = class {
2788
+ }, StateMachine$1 = class {
2789
2789
  constructor() {
2790
2790
  this.transitTo = (e) => {
2791
2791
  let t;
2792
2792
  switch (e) {
2793
- case STATE_TYPE.IDLE:
2794
- t = new IdleState();
2793
+ case STATE_TYPE$1.IDLE:
2794
+ t = new IdleState$1();
2795
2795
  break;
2796
- case STATE_TYPE.HOLDING:
2797
- t = new HoldingState();
2796
+ case STATE_TYPE$1.HOLDING:
2797
+ t = new HoldingState$1();
2798
2798
  break;
2799
- case STATE_TYPE.DRAGGING:
2800
- t = new DraggingState();
2799
+ case STATE_TYPE$1.DRAGGING:
2800
+ t = new DraggingState$1();
2801
2801
  break;
2802
- case STATE_TYPE.ANIMATING:
2803
- t = new AnimatingState();
2802
+ case STATE_TYPE$1.ANIMATING:
2803
+ t = new AnimatingState$1();
2804
2804
  break;
2805
- case STATE_TYPE.DISABLED:
2806
- t = new DisabledState();
2805
+ case STATE_TYPE$1.DISABLED:
2806
+ t = new DisabledState$1();
2807
2807
  break;
2808
2808
  }
2809
2809
  return t.onEnter(this._state), this._state = t, this._state;
2810
- }, this._state = new IdleState();
2810
+ }, this._state = new IdleState$1();
2811
2811
  }
2812
2812
  get state() {
2813
2813
  return this._state;
2814
2814
  }
2815
2815
  fire(e, t) {
2816
- let n = this._state, r = __spreadProps$1(__spreadValues$1({}, t), { transitTo: this.transitTo });
2816
+ let n = this._state, r = __spreadProps$2(__spreadValues$2({}, t), { transitTo: this.transitTo });
2817
2817
  switch (e) {
2818
- case EVENT.HOLD:
2818
+ case EVENT$1.HOLD:
2819
2819
  n.onHold(r);
2820
2820
  break;
2821
- case EVENT.CHANGE:
2821
+ case EVENT$1.CHANGE:
2822
2822
  n.onChange(r);
2823
2823
  break;
2824
- case EVENT.RELEASE:
2824
+ case EVENT$1.RELEASE:
2825
2825
  n.onRelease(r);
2826
2826
  break;
2827
- case EVENT.ANIMATION_END:
2827
+ case EVENT$1.ANIMATION_END:
2828
2828
  n.onAnimationEnd(r);
2829
2829
  break;
2830
- case EVENT.FINISH:
2830
+ case EVENT$1.FINISH:
2831
2831
  n.onFinish(r);
2832
2832
  break;
2833
2833
  }
2834
2834
  }
2835
- }, AxesController = class {
2835
+ }, AxesController$1 = class {
2836
2836
  constructor() {
2837
2837
  this._onAxesHold = () => {
2838
2838
  this._dragged = !1;
@@ -2841,7 +2841,7 @@ var Loader = /*#__PURE__*/ function(e) {
2841
2841
  this._dragged = !!this._panInput?.isEnabled();
2842
2842
  }, this._preventClickWhenDragged = (e) => {
2843
2843
  this._dragged && (e.preventDefault(), e.stopPropagation()), this._dragged = !1;
2844
- }, this._resetInternalValues(), this._stateMachine = new StateMachine();
2844
+ }, this._resetInternalValues(), this._stateMachine = new StateMachine$1();
2845
2845
  }
2846
2846
  get axes() {
2847
2847
  return this._axes;
@@ -2868,7 +2868,7 @@ var Loader = /*#__PURE__*/ function(e) {
2868
2868
  position: 0,
2869
2869
  circular: !1
2870
2870
  };
2871
- let t = e.axis[POSITION_KEY];
2871
+ let t = e.axis[POSITION_KEY$1];
2872
2872
  return {
2873
2873
  range: {
2874
2874
  min: t.range[0],
@@ -2884,18 +2884,18 @@ var Loader = /*#__PURE__*/ function(e) {
2884
2884
  }
2885
2885
  get position() {
2886
2886
  var e, t;
2887
- return this._axes?.get([POSITION_KEY])[POSITION_KEY] ?? 0;
2887
+ return this._axes?.get([POSITION_KEY$1])[POSITION_KEY$1] ?? 0;
2888
2888
  }
2889
2889
  get range() {
2890
2890
  var e, t;
2891
- return this._axes?.axis[POSITION_KEY].range ?? [0, 0];
2891
+ return this._axes?.axis[POSITION_KEY$1].range ?? [0, 0];
2892
2892
  }
2893
2893
  get bounce() {
2894
2894
  var e;
2895
- return this._axes?.axis[POSITION_KEY].bounce;
2895
+ return this._axes?.axis[POSITION_KEY$1].bounce;
2896
2896
  }
2897
2897
  init(e) {
2898
- this._flicking = e, this._axes = new Axes({ [POSITION_KEY]: {
2898
+ this._flicking = e, this._axes = new Axes({ [POSITION_KEY$1]: {
2899
2899
  range: [0, 0],
2900
2900
  circular: !1,
2901
2901
  bounce: [0, 0]
@@ -2909,13 +2909,13 @@ var Loader = /*#__PURE__*/ function(e) {
2909
2909
  threshold: e.dragThreshold,
2910
2910
  iOSEdgeSwipeThreshold: e.iOSEdgeSwipeThreshold,
2911
2911
  preventDefaultOnDrag: e.preventDefaultOnDrag,
2912
- scale: e.horizontal ? [e.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],
2912
+ scale: e.horizontal ? [e.camera.panelOrder === ORDER$1.RTL ? 1 : -1, 0] : [0, -1],
2913
2913
  releaseOnScroll: !0
2914
2914
  });
2915
2915
  let t = this._axes;
2916
- t.connect(e.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], this._panInput);
2917
- for (let n in EVENT) {
2918
- let r = EVENT[n];
2916
+ t.connect(e.horizontal ? [POSITION_KEY$1, ""] : ["", POSITION_KEY$1], this._panInput);
2917
+ for (let n in EVENT$1) {
2918
+ let r = EVENT$1[n];
2919
2919
  t.on(r, (t) => {
2920
2920
  this._stateMachine.fire(r, {
2921
2921
  flicking: e,
@@ -2943,8 +2943,8 @@ var Loader = /*#__PURE__*/ function(e) {
2943
2943
  }
2944
2944
  updateAnimation(e, t) {
2945
2945
  var n;
2946
- return this._animatingContext = __spreadProps$1(__spreadValues$1({}, this._animatingContext), { end: e }), (n = this._axes) == null || n.updateAnimation({
2947
- destPos: { [POSITION_KEY]: e },
2946
+ return this._animatingContext = __spreadProps$2(__spreadValues$2({}, this._animatingContext), { end: e }), (n = this._axes) == null || n.updateAnimation({
2947
+ destPos: { [POSITION_KEY$1]: e },
2948
2948
  duration: t
2949
2949
  }), this;
2950
2950
  }
@@ -2953,24 +2953,24 @@ var Loader = /*#__PURE__*/ function(e) {
2953
2953
  return (e = this._axes) == null || e.stopAnimation(), this;
2954
2954
  }
2955
2955
  update(e) {
2956
- let t = getFlickingAttached(this._flicking), n = t.camera, r = this._axes, i = r.axis[POSITION_KEY];
2957
- return i.circular = [e.circular, e.circular], i.range = [e.range.min, e.range.max], i.bounce = parseBounce(t.bounce, n.size), r.axisManager.set({ [POSITION_KEY]: e.position }), this;
2956
+ let t = getFlickingAttached$1(this._flicking), n = t.camera, r = this._axes, i = r.axis[POSITION_KEY$1];
2957
+ return i.circular = [e.circular, e.circular], i.range = [e.range.min, e.range.max], i.bounce = parseBounce$1(t.bounce, n.size), r.axisManager.set({ [POSITION_KEY$1]: e.position }), this;
2958
2958
  }
2959
2959
  addPreventClickHandler() {
2960
- let e = getFlickingAttached(this._flicking), t = this._axes, n = e.camera.element;
2961
- return t.on(EVENT.HOLD, this._onAxesHold), t.on(EVENT.CHANGE, this._onAxesChange), n.addEventListener("click", this._preventClickWhenDragged, !0), this;
2960
+ let e = getFlickingAttached$1(this._flicking), t = this._axes, n = e.camera.element;
2961
+ return t.on(EVENT$1.HOLD, this._onAxesHold), t.on(EVENT$1.CHANGE, this._onAxesChange), n.addEventListener("click", this._preventClickWhenDragged, !0), this;
2962
2962
  }
2963
2963
  removePreventClickHandler() {
2964
- let e = getFlickingAttached(this._flicking), t = this._axes, n = e.camera.element;
2965
- return t.off(EVENT.HOLD, this._onAxesHold), t.off(EVENT.CHANGE, this._onAxesChange), n.removeEventListener("click", this._preventClickWhenDragged, !0), this;
2964
+ let e = getFlickingAttached$1(this._flicking), t = this._axes, n = e.camera.element;
2965
+ return t.off(EVENT$1.HOLD, this._onAxesHold), t.off(EVENT$1.CHANGE, this._onAxesChange), n.removeEventListener("click", this._preventClickWhenDragged, !0), this;
2966
2966
  }
2967
2967
  animateTo(e, t, n) {
2968
2968
  var r;
2969
2969
  let i = this._axes, s = this._stateMachine.state;
2970
- if (!i) return Promise.reject(new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING));
2970
+ if (!i) return Promise.reject(new FlickingError$1(MESSAGE$1.NOT_ATTACHED_TO_FLICKING, CODE$1.NOT_ATTACHED_TO_FLICKING));
2971
2971
  let l = this.getCurrentPosition();
2972
2972
  if (l === e) {
2973
- let t = getFlickingAttached(this._flicking);
2973
+ let t = getFlickingAttached$1(this._flicking);
2974
2974
  return t.camera.lookAt(e), s.targetPanel && t.control.setActive(s.targetPanel, t.control.activePanel, n?.isTrusted ?? !1), Promise.resolve();
2975
2975
  }
2976
2976
  this._animatingContext = {
@@ -2979,30 +2979,30 @@ var Loader = /*#__PURE__*/ function(e) {
2979
2979
  offset: 0
2980
2980
  };
2981
2981
  let u = () => {
2982
- i.once(EVENT.FINISH, () => {
2982
+ i.once(EVENT$1.FINISH, () => {
2983
2983
  this._animatingContext = {
2984
2984
  start: 0,
2985
2985
  end: 0,
2986
2986
  offset: 0
2987
2987
  };
2988
- }), n ? n.setTo({ [POSITION_KEY]: e }, t) : i.setTo({ [POSITION_KEY]: e }, t);
2988
+ }), n ? n.setTo({ [POSITION_KEY$1]: e }, t) : i.setTo({ [POSITION_KEY$1]: e }, t);
2989
2989
  };
2990
2990
  return new Promise((e, t) => {
2991
2991
  let n = () => {
2992
- i.off(EVENT.HOLD, r), e();
2992
+ i.off(EVENT$1.HOLD, r), e();
2993
2993
  }, r = () => {
2994
- i.off(EVENT.FINISH, n), t(new FlickingError(MESSAGE.ANIMATION_INTERRUPTED, CODE.ANIMATION_INTERRUPTED));
2994
+ i.off(EVENT$1.FINISH, n), t(new FlickingError$1(MESSAGE$1.ANIMATION_INTERRUPTED, CODE$1.ANIMATION_INTERRUPTED));
2995
2995
  };
2996
- i.once(EVENT.FINISH, n), i.once(EVENT.HOLD, r), u();
2996
+ i.once(EVENT$1.FINISH, n), i.once(EVENT$1.HOLD, r), u();
2997
2997
  });
2998
2998
  }
2999
2999
  getCurrentPosition() {
3000
3000
  var e, t;
3001
- return this._axes?.get([POSITION_KEY])[POSITION_KEY] ?? 0;
3001
+ return this._axes?.get([POSITION_KEY$1])[POSITION_KEY$1] ?? 0;
3002
3002
  }
3003
3003
  updateDirection() {
3004
- let e = getFlickingAttached(this._flicking), t = this._axes, n = this._panInput;
3005
- t.disconnect(n), t.connect(e.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], n), n.options.scale = e.horizontal ? [e.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1];
3004
+ let e = getFlickingAttached$1(this._flicking), t = this._axes, n = this._panInput;
3005
+ t.disconnect(n), t.connect(e.horizontal ? [POSITION_KEY$1, ""] : ["", POSITION_KEY$1], n), n.options.scale = e.horizontal ? [e.camera.panelOrder === ORDER$1.RTL ? 1 : -1, 0] : [0, -1];
3006
3006
  }
3007
3007
  _resetInternalValues() {
3008
3008
  this._flicking = null, this._axes = null, this._panInput = null, this._animatingContext = {
@@ -3011,7 +3011,7 @@ var Loader = /*#__PURE__*/ function(e) {
3011
3011
  offset: 0
3012
3012
  }, this._dragged = !1;
3013
3013
  }
3014
- }, Control = class {
3014
+ }, Control$1 = class {
3015
3015
  get controller() {
3016
3016
  return this._controller;
3017
3017
  }
@@ -3029,7 +3029,7 @@ var Loader = /*#__PURE__*/ function(e) {
3029
3029
  return this._controller.state.holding;
3030
3030
  }
3031
3031
  constructor() {
3032
- this._flicking = null, this._controller = new AxesController(), this._activePanel = null;
3032
+ this._flicking = null, this._controller = new AxesController$1(), this._activePanel = null;
3033
3033
  }
3034
3034
  init(e) {
3035
3035
  return this._flicking = e, this._controller.init(e), this;
@@ -3047,7 +3047,7 @@ var Loader = /*#__PURE__*/ function(e) {
3047
3047
  return this._controller.release(), this;
3048
3048
  }
3049
3049
  updateAnimation(e, t, n) {
3050
- let r = this._controller.state, i = this._getPosition(e, n ?? DIRECTION.NONE);
3050
+ let r = this._controller.state, i = this._getPosition(e, n ?? DIRECTION$1.NONE);
3051
3051
  return r.targetPanel = e, this._controller.updateAnimation(i, t), this;
3052
3052
  }
3053
3053
  stopAnimation() {
@@ -3055,18 +3055,18 @@ var Loader = /*#__PURE__*/ function(e) {
3055
3055
  return e.targetPanel = null, this._controller.stopAnimation(), this;
3056
3056
  }
3057
3057
  updatePosition(e) {
3058
- let t = getFlickingAttached(this._flicking).camera, n = this._activePanel;
3058
+ let t = getFlickingAttached$1(this._flicking).camera, n = this._activePanel;
3059
3059
  n && t.lookAt(t.clampToReachablePosition(n.position));
3060
3060
  }
3061
3061
  updateInput() {
3062
- let e = getFlickingAttached(this._flicking).camera;
3062
+ let e = getFlickingAttached$1(this._flicking).camera;
3063
3063
  return this._controller.update(e.controlParams), this;
3064
3064
  }
3065
3065
  resetActive() {
3066
3066
  return this._activePanel = null, this;
3067
3067
  }
3068
3068
  moveToPanel(e, t) {
3069
- return __async$1(this, arguments, function* (e, { duration: t, direction: n = DIRECTION.NONE, axesEvent: r }) {
3069
+ return __async$2(this, arguments, function* (e, { duration: t, direction: n = DIRECTION$1.NONE, axesEvent: r }) {
3070
3070
  let i = this._getPosition(e, n);
3071
3071
  return this._triggerIndexChangeEvent(e, e.position, r, n), this._animateToPosition({
3072
3072
  position: i,
@@ -3078,14 +3078,14 @@ var Loader = /*#__PURE__*/ function(e) {
3078
3078
  }
3079
3079
  setActive(e, t, n) {
3080
3080
  var r;
3081
- let i = getFlickingAttached(this._flicking);
3082
- this._activePanel = e, this._nextPanel = null, i.camera.updateAdaptiveHeight(), e === t ? i.trigger(new ComponentEvent$1(EVENTS.RESTORED, { isTrusted: n })) : i.trigger(new ComponentEvent$1(EVENTS.CHANGED, {
3081
+ let i = getFlickingAttached$1(this._flicking);
3082
+ this._activePanel = e, this._nextPanel = null, i.camera.updateAdaptiveHeight(), e === t ? i.trigger(new ComponentEvent$1(EVENTS$1.RESTORED, { isTrusted: n })) : i.trigger(new ComponentEvent$1(EVENTS$1.CHANGED, {
3083
3083
  index: e.index,
3084
3084
  panel: e,
3085
3085
  prevIndex: t?.index ?? -1,
3086
3086
  prevPanel: t,
3087
3087
  isTrusted: n,
3088
- direction: t ? getDirection(t.position, e.position) : DIRECTION.NONE
3088
+ direction: t ? getDirection$1(t.position, e.position) : DIRECTION$1.NONE
3089
3089
  }));
3090
3090
  }
3091
3091
  copy(e) {
@@ -3093,29 +3093,29 @@ var Loader = /*#__PURE__*/ function(e) {
3093
3093
  }
3094
3094
  _triggerIndexChangeEvent(e, t, n, r) {
3095
3095
  var i;
3096
- let s = getFlickingAttached(this._flicking), l = e === this._activePanel ? EVENTS.WILL_RESTORE : EVENTS.WILL_CHANGE, u = s.camera, d = this._activePanel, f = new ComponentEvent$1(l, {
3096
+ let s = getFlickingAttached$1(this._flicking), l = e === this._activePanel ? EVENTS$1.WILL_RESTORE : EVENTS$1.WILL_CHANGE, u = s.camera, d = this._activePanel, f = new ComponentEvent$1(l, {
3097
3097
  index: e.index,
3098
3098
  panel: e,
3099
3099
  isTrusted: n?.isTrusted || !1,
3100
- direction: r ?? getDirection(d?.position ?? u.position, t)
3100
+ direction: r ?? getDirection$1(d?.position ?? u.position, t)
3101
3101
  });
3102
- if (this._nextPanel = e, s.trigger(f), f.isCanceled()) throw new FlickingError(MESSAGE.STOP_CALLED_BY_USER, CODE.STOP_CALLED_BY_USER);
3102
+ if (this._nextPanel = e, s.trigger(f), f.isCanceled()) throw new FlickingError$1(MESSAGE$1.STOP_CALLED_BY_USER, CODE$1.STOP_CALLED_BY_USER);
3103
3103
  }
3104
3104
  _animateToPosition(e) {
3105
- return __async$1(this, arguments, function* ({ position: e, duration: t, newActivePanel: n, axesEvent: r }) {
3106
- let i = getFlickingAttached(this._flicking), s = t;
3105
+ return __async$2(this, arguments, function* ({ position: e, duration: t, newActivePanel: n, axesEvent: r }) {
3106
+ let i = getFlickingAttached$1(this._flicking), s = t;
3107
3107
  Math.abs(s - e) < i.animationThreshold && (s = 0);
3108
3108
  let l = () => this._controller.animateTo(e, s, r), u = this._controller.state;
3109
- return u.targetPanel = n, s <= 0 ? l() : l().then(() => __async$1(this, null, function* () {
3109
+ return u.targetPanel = n, s <= 0 ? l() : l().then(() => __async$2(this, null, function* () {
3110
3110
  i.initialized && (yield i.renderer.render());
3111
3111
  })).catch((e) => {
3112
- if (!(r && e instanceof FlickingError && e.code === CODE.ANIMATION_INTERRUPTED)) throw e;
3112
+ if (!(r && e instanceof FlickingError$1 && e.code === CODE$1.ANIMATION_INTERRUPTED)) throw e;
3113
3113
  });
3114
3114
  });
3115
3115
  }
3116
- _getPosition(e, t = DIRECTION.NONE) {
3117
- let n = getFlickingAttached(this._flicking), r = n.camera, i = e.position, s = r.findNearestAnchor(i);
3118
- if (e.removed || !s) throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e.position), CODE.POSITION_NOT_REACHABLE);
3116
+ _getPosition(e, t = DIRECTION$1.NONE) {
3117
+ let n = getFlickingAttached$1(this._flicking), r = n.camera, i = e.position, s = r.findNearestAnchor(i);
3118
+ if (e.removed || !s) throw new FlickingError$1(MESSAGE$1.POSITION_NOT_REACHABLE(e.position), CODE$1.POSITION_NOT_REACHABLE);
3119
3119
  if (!r.canReach(e)) i = s.position, e = s.panel;
3120
3120
  else if (n.circularEnabled) {
3121
3121
  let e = this._controller.position, n = r.rangeDiff;
@@ -3123,11 +3123,11 @@ var Loader = /*#__PURE__*/ function(e) {
3123
3123
  i,
3124
3124
  i + n,
3125
3125
  i - n
3126
- ].filter((n) => t === DIRECTION.NONE ? !0 : t === DIRECTION.PREV ? n <= e : n >= e).reduce((t, n) => Math.abs(e - n) < Math.abs(e - t) ? n : t, Infinity);
3126
+ ].filter((n) => t === DIRECTION$1.NONE ? !0 : t === DIRECTION$1.PREV ? n <= e : n >= e).reduce((t, n) => Math.abs(e - n) < Math.abs(e - t) ? n : t, Infinity);
3127
3127
  }
3128
3128
  return i;
3129
3129
  }
3130
- }, FreeControl = class extends Control {
3130
+ }, FreeControl$1 = class extends Control$1 {
3131
3131
  get stopAtEdge() {
3132
3132
  return this._stopAtEdge;
3133
3133
  }
@@ -3140,15 +3140,15 @@ var Loader = /*#__PURE__*/ function(e) {
3140
3140
  this._stopAtEdge = t;
3141
3141
  }
3142
3142
  updatePosition(e) {
3143
- let t = getFlickingAttached(this._flicking).camera, n = this._activePanel;
3143
+ let t = getFlickingAttached$1(this._flicking).camera, n = this._activePanel;
3144
3144
  if (n) {
3145
3145
  let r = n.range, i = r.min + (r.max - r.min) * e;
3146
3146
  t.lookAt(t.clampToReachablePosition(i));
3147
3147
  }
3148
3148
  }
3149
3149
  moveToPosition(e, t, n) {
3150
- let r = getFlickingAttached(this._flicking).camera, i = r.clampToReachablePosition(e), s = r.findAnchorIncludePosition(i);
3151
- if (!s) return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE));
3150
+ let r = getFlickingAttached$1(this._flicking).camera, i = r.clampToReachablePosition(e), s = r.findAnchorIncludePosition(i);
3151
+ if (!s) return Promise.reject(new FlickingError$1(MESSAGE$1.POSITION_NOT_REACHABLE(e), CODE$1.POSITION_NOT_REACHABLE));
3152
3152
  let l = s.panel;
3153
3153
  return l !== this._activePanel && this._triggerIndexChangeEvent(l, e, n), this._animateToPosition({
3154
3154
  position: this._stopAtEdge ? i : e,
@@ -3157,7 +3157,7 @@ var Loader = /*#__PURE__*/ function(e) {
3157
3157
  axesEvent: n
3158
3158
  });
3159
3159
  }
3160
- }, SnapControl = class extends Control {
3160
+ }, SnapControl$1 = class extends Control$1 {
3161
3161
  get count() {
3162
3162
  return this._count;
3163
3163
  }
@@ -3170,9 +3170,9 @@ var Loader = /*#__PURE__*/ function(e) {
3170
3170
  this._count = t;
3171
3171
  }
3172
3172
  moveToPosition(e, t, n) {
3173
- let r = getFlickingAttached(this._flicking), i = r.camera, s = i.findActiveAnchor(), l = i.findNearestAnchor(i.position), u = this._controller.state;
3174
- if (!s || !l) return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE));
3175
- let d = this._calcSnapThreshold(r.threshold, e, s), f = r.animating ? u.delta : e - i.position, p = Math.abs(f), m = n && n.delta[POSITION_KEY] !== 0 ? Math.abs(n.delta[POSITION_KEY]) : p, g;
3173
+ let r = getFlickingAttached$1(this._flicking), i = r.camera, s = i.findActiveAnchor(), l = i.findNearestAnchor(i.position), u = this._controller.state;
3174
+ if (!s || !l) return Promise.reject(new FlickingError$1(MESSAGE$1.POSITION_NOT_REACHABLE(e), CODE$1.POSITION_NOT_REACHABLE));
3175
+ let d = this._calcSnapThreshold(r.threshold, e, s), f = r.animating ? u.delta : e - i.position, p = Math.abs(f), m = n && n.delta[POSITION_KEY$1] !== 0 ? Math.abs(n.delta[POSITION_KEY$1]) : p, g;
3176
3176
  if (m >= d && m > 0) g = this._findSnappedAnchor(e, l);
3177
3177
  else if (p >= r.threshold && p > 0) g = this._findAdjacentAnchor(e, f, l);
3178
3178
  else return this.moveToPanel(l.panel, {
@@ -3187,32 +3187,32 @@ var Loader = /*#__PURE__*/ function(e) {
3187
3187
  });
3188
3188
  }
3189
3189
  _findSnappedAnchor(e, t) {
3190
- let n = getFlickingAttached(this._flicking), r = n.camera, i = this._count, s = r.position, l = r.clampToReachablePosition(e), u = r.findAnchorIncludePosition(l);
3191
- if (!t || !u) throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE);
3190
+ let n = getFlickingAttached$1(this._flicking), r = n.camera, i = this._count, s = r.position, l = r.clampToReachablePosition(e), u = r.findAnchorIncludePosition(l);
3191
+ if (!t || !u) throw new FlickingError$1(MESSAGE$1.POSITION_NOT_REACHABLE(e), CODE$1.POSITION_NOT_REACHABLE);
3192
3192
  if (!Number.isFinite(i)) return u;
3193
3193
  let d = n.panelCount, f = r.anchorPoints, p = Math.sign(e - s) * Math.floor(Math.abs(e - s) / r.rangeDiff);
3194
3194
  e > s && u.index < t.index || u.position > t.position && u.index === t.index ? p += 1 : (e < s && u.index > t.index || u.position < t.position && u.index === t.index) && --p;
3195
3195
  let m = p * d, g = u.index + m;
3196
3196
  if (Math.abs(g - t.index) <= i) {
3197
3197
  let e = f[u.index];
3198
- return new AnchorPoint({
3198
+ return new AnchorPoint$1({
3199
3199
  index: e.index,
3200
3200
  position: e.position + p * r.rangeDiff,
3201
3201
  panel: e.panel
3202
3202
  });
3203
3203
  }
3204
3204
  if (n.circularEnabled) {
3205
- let n = f[circulateIndex(t.index + Math.sign(e - s) * i, d)], l = Math.floor(i / d);
3206
- return e > s && n.index < t.index ? l += 1 : e < s && n.index > t.index && --l, new AnchorPoint({
3205
+ let n = f[circulateIndex$1(t.index + Math.sign(e - s) * i, d)], l = Math.floor(i / d);
3206
+ return e > s && n.index < t.index ? l += 1 : e < s && n.index > t.index && --l, new AnchorPoint$1({
3207
3207
  index: n.index,
3208
3208
  position: n.position + l * r.rangeDiff,
3209
3209
  panel: n.panel
3210
3210
  });
3211
- } else return f[clamp(t.index + Math.sign(e - s) * i, 0, f.length - 1)];
3211
+ } else return f[clamp$1(t.index + Math.sign(e - s) * i, 0, f.length - 1)];
3212
3212
  }
3213
3213
  _findAdjacentAnchor(e, t, n) {
3214
3214
  var r;
3215
- let i = getFlickingAttached(this._flicking).camera;
3215
+ let i = getFlickingAttached$1(this._flicking).camera;
3216
3216
  if (i.circularEnabled) {
3217
3217
  let t = i.findAnchorIncludePosition(e);
3218
3218
  if (t && t.position !== n.position) return t;
@@ -3223,7 +3223,7 @@ var Loader = /*#__PURE__*/ function(e) {
3223
3223
  let r = t > n.position, i = n.panel, s = i.size, l = i.alignPosition;
3224
3224
  return Math.max(e, r ? s - l + i.margin.next : l + i.margin.prev);
3225
3225
  }
3226
- }, StrictControl = class e extends Control {
3226
+ }, StrictControl$1 = class e extends Control$1 {
3227
3227
  constructor(e = {}) {
3228
3228
  super(), this.setActive = (e, t, n) => {
3229
3229
  super.setActive(e, t, n), this.updateInput();
@@ -3242,10 +3242,10 @@ var Loader = /*#__PURE__*/ function(e) {
3242
3242
  }
3243
3243
  updateInput() {
3244
3244
  var e;
3245
- let t = getFlickingAttached(this._flicking), n = t.camera, r = t.renderer, i = this._controller, s = n.controlParams, l = this._count, u = i.state.animating ? n.findNearestAnchor(n.position)?.panel : this._activePanel;
3245
+ let t = getFlickingAttached$1(this._flicking), n = t.camera, r = t.renderer, i = this._controller, s = n.controlParams, l = this._count, u = i.state.animating ? n.findNearestAnchor(n.position)?.panel : this._activePanel;
3246
3246
  if (!u) return i.update(s), this._resetIndexRange(), this;
3247
3247
  let d = s.range, f = u.position, p = u.index, m = r.panelCount, g = p - l, _ = p + l;
3248
- g < 0 && (g = t.circularEnabled ? getMinusCompensatedIndex((g + 1) % m - 1, m) : clamp(g, 0, m - 1)), _ >= m && (_ = t.circularEnabled ? _ % m : clamp(_, 0, m - 1));
3248
+ g < 0 && (g = t.circularEnabled ? getMinusCompensatedIndex$1((g + 1) % m - 1, m) : clamp$1(g, 0, m - 1)), _ >= m && (_ = t.circularEnabled ? _ % m : clamp$1(_, 0, m - 1));
3249
3249
  let v = r.panels[g], y = r.panels[_], b = Math.max(v.position, d.min), x = Math.min(y.position, d.max);
3250
3250
  return b > f && (b -= n.rangeDiff), x < f && (x += n.rangeDiff), s.range = {
3251
3251
  min: b,
@@ -3256,16 +3256,16 @@ var Loader = /*#__PURE__*/ function(e) {
3256
3256
  }, this;
3257
3257
  }
3258
3258
  moveToPanel(t, n) {
3259
- return __async$1(this, null, function* () {
3260
- let r = getFlickingAttached(this._flicking).camera;
3261
- return this._controller.update(r.controlParams), __superGet$1(e.prototype, this, "moveToPanel").call(this, t, n);
3259
+ return __async$2(this, null, function* () {
3260
+ let r = getFlickingAttached$1(this._flicking).camera;
3261
+ return this._controller.update(r.controlParams), __superGet$2(e.prototype, this, "moveToPanel").call(this, t, n);
3262
3262
  });
3263
3263
  }
3264
3264
  moveToPosition(e, t, n) {
3265
3265
  var r;
3266
- let i = getFlickingAttached(this._flicking), s = i.camera, l = this._nextPanel ?? this._activePanel, u = this._controller.range, d = this._indexRange, f = s.range, p = this._controller.state, m = clamp(s.clampToReachablePosition(e), u[0], u[1]), g = s.findAnchorIncludePosition(m);
3267
- if (!g || !l) return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE));
3268
- let _ = l.position, v = i.animating ? p.delta : e - s.position, y = Math.abs(v) >= i.threshold, b = e > _ ? s.getNextAnchor(g) : s.getPrevAnchor(g), x, S, C = s.anchorPoints, w = C[0], T = C[C.length - 1], E = e < f.min && isBetween(w.panel.index, d.min, d.max), D = e > f.max && isBetween(T.panel.index, d.min, d.max), O = b && (d.min <= d.max ? isBetween(b.index, d.min, d.max) : b.index >= d.min || b.index <= d.max);
3266
+ let i = getFlickingAttached$1(this._flicking), s = i.camera, l = this._nextPanel ?? this._activePanel, u = this._controller.range, d = this._indexRange, f = s.range, p = this._controller.state, m = clamp$1(s.clampToReachablePosition(e), u[0], u[1]), g = s.findAnchorIncludePosition(m);
3267
+ if (!g || !l) return Promise.reject(new FlickingError$1(MESSAGE$1.POSITION_NOT_REACHABLE(e), CODE$1.POSITION_NOT_REACHABLE));
3268
+ let _ = l.position, v = i.animating ? p.delta : e - s.position, y = Math.abs(v) >= i.threshold, b = e > _ ? s.getNextAnchor(g) : s.getPrevAnchor(g), x, S, C = s.anchorPoints, w = C[0], T = C[C.length - 1], E = e < f.min && isBetween$1(w.panel.index, d.min, d.max), D = e > f.max && isBetween$1(T.panel.index, d.min, d.max), O = b && (d.min <= d.max ? isBetween$1(b.index, d.min, d.max) : b.index >= d.min || b.index <= d.max);
3269
3269
  if (E || D) {
3270
3270
  let t = e < f.min ? w : T;
3271
3271
  S = t.panel, x = t.position;
@@ -3276,7 +3276,7 @@ var Loader = /*#__PURE__*/ function(e) {
3276
3276
  return r ? this.moveToPanel(r.panel, {
3277
3277
  duration: t,
3278
3278
  axesEvent: n
3279
- }) : Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE));
3279
+ }) : Promise.reject(new FlickingError$1(MESSAGE$1.POSITION_NOT_REACHABLE(e), CODE$1.POSITION_NOT_REACHABLE));
3280
3280
  }
3281
3281
  return this._triggerIndexChangeEvent(S, e, n), this._animateToPosition({
3282
3282
  position: x,
@@ -3291,7 +3291,7 @@ var Loader = /*#__PURE__*/ function(e) {
3291
3291
  max: 0
3292
3292
  };
3293
3293
  }
3294
- }, AutoResizer = class {
3294
+ }, AutoResizer$1 = class {
3295
3295
  constructor(e) {
3296
3296
  this._onResizeWrapper = () => {
3297
3297
  this._onResize([]);
@@ -3302,19 +3302,19 @@ var Loader = /*#__PURE__*/ function(e) {
3302
3302
  width: t.viewport.width,
3303
3303
  height: t.viewport.height
3304
3304
  }, n = {
3305
- width: getElementSize({
3305
+ width: getElementSize$1({
3306
3306
  el: i,
3307
3307
  horizontal: !0,
3308
3308
  useFractionalSize: this._flicking.useFractionalSize,
3309
3309
  useOffset: !1,
3310
- style: getStyle(i)
3310
+ style: getStyle$1(i)
3311
3311
  }),
3312
- height: getElementSize({
3312
+ height: getElementSize$1({
3313
3313
  el: i,
3314
3314
  horizontal: !1,
3315
3315
  useFractionalSize: this._flicking.useFractionalSize,
3316
3316
  useOffset: !1,
3317
- style: getStyle(i)
3317
+ style: getStyle$1(i)
3318
3318
  })
3319
3319
  };
3320
3320
  if (e.height === n.height && e.width === n.width) return;
@@ -3367,7 +3367,7 @@ var Loader = /*#__PURE__*/ function(e) {
3367
3367
  let e = this._resizeObserver;
3368
3368
  return e ? (e.disconnect(), this._resizeObserver = null) : window.removeEventListener("resize", this._onResizeWrapper), this._enabled = !1, this;
3369
3369
  }
3370
- }, VanillaElementProvider = class {
3370
+ }, VanillaElementProvider$1 = class {
3371
3371
  get element() {
3372
3372
  return this._element;
3373
3373
  }
@@ -3385,7 +3385,7 @@ var Loader = /*#__PURE__*/ function(e) {
3385
3385
  let t = this.element, n = e.camera.element;
3386
3386
  t.parentElement === n && (n.removeChild(t), this._rendered = !1);
3387
3387
  }
3388
- }, VirtualElementProvider = class {
3388
+ }, VirtualElementProvider$1 = class {
3389
3389
  get element() {
3390
3390
  return this._virtualElement.nativeElement;
3391
3391
  }
@@ -3404,7 +3404,7 @@ var Loader = /*#__PURE__*/ function(e) {
3404
3404
  }
3405
3405
  show() {}
3406
3406
  hide() {}
3407
- }, Viewport = class {
3407
+ }, Viewport$1 = class {
3408
3408
  get element() {
3409
3409
  return this._el;
3410
3410
  }
@@ -3427,12 +3427,12 @@ var Loader = /*#__PURE__*/ function(e) {
3427
3427
  }
3428
3428
  setSize(e) {
3429
3429
  let { width: t, height: n } = e, r = this._el, i = this._padding, s = this._isBorderBoxSizing;
3430
- if (t != null) if (isString(t)) r.style.width = t;
3430
+ if (t != null) if (isString$1(t)) r.style.width = t;
3431
3431
  else {
3432
3432
  let e = s ? t + i.left + i.right : t;
3433
3433
  r.style.width = `${e}px`;
3434
3434
  }
3435
- if (n != null) if (isString(n)) r.style.height = n;
3435
+ if (n != null) if (isString$1(n)) r.style.height = n;
3436
3436
  else {
3437
3437
  let e = s ? n + i.top + i.bottom : n;
3438
3438
  r.style.height = `${e}px`;
@@ -3440,14 +3440,14 @@ var Loader = /*#__PURE__*/ function(e) {
3440
3440
  this.resize();
3441
3441
  }
3442
3442
  resize() {
3443
- let e = this._el, t = getStyle(e), { useFractionalSize: n } = this._flicking;
3444
- this._width = getElementSize({
3443
+ let e = this._el, t = getStyle$1(e), { useFractionalSize: n } = this._flicking;
3444
+ this._width = getElementSize$1({
3445
3445
  el: e,
3446
3446
  horizontal: !0,
3447
3447
  useFractionalSize: n,
3448
3448
  useOffset: !1,
3449
3449
  style: t
3450
- }), this._height = getElementSize({
3450
+ }), this._height = getElementSize$1({
3451
3451
  el: e,
3452
3452
  horizontal: !1,
3453
3453
  useFractionalSize: n,
@@ -3460,7 +3460,7 @@ var Loader = /*#__PURE__*/ function(e) {
3460
3460
  bottom: t.paddingBottom ? parseFloat(t.paddingBottom) : 0
3461
3461
  }, this._isBorderBoxSizing = t.boxSizing === "border-box";
3462
3462
  }
3463
- }, VirtualManager = class {
3463
+ }, VirtualManager$1 = class {
3464
3464
  get elements() {
3465
3465
  return this._elements;
3466
3466
  }
@@ -3487,7 +3487,7 @@ var Loader = /*#__PURE__*/ function(e) {
3487
3487
  }
3488
3488
  constructor(e, t) {
3489
3489
  var n, r, i, s;
3490
- this._flicking = e, this._renderPanel = t?.renderPanel ?? (() => ""), this._initialPanelCount = t?.initialPanelCount ?? -1, this._cache = t?.cache ?? !1, this._panelClass = t?.panelClass ?? CLASS.DEFAULT_VIRTUAL, this._elements = [];
3490
+ this._flicking = e, this._renderPanel = t?.renderPanel ?? (() => ""), this._initialPanelCount = t?.initialPanelCount ?? -1, this._cache = t?.cache ?? !1, this._panelClass = t?.panelClass ?? CLASS$1.DEFAULT_VIRTUAL, this._elements = [];
3491
3491
  }
3492
3492
  init() {
3493
3493
  let e = this._flicking;
@@ -3517,7 +3517,7 @@ var Loader = /*#__PURE__*/ function(e) {
3517
3517
  insert(e, t = 1) {
3518
3518
  return t <= 0 ? [] : this._flicking.renderer.batchInsert({
3519
3519
  index: e,
3520
- elements: range(t),
3520
+ elements: range$1(t),
3521
3521
  hasDOMInElements: !1
3522
3522
  });
3523
3523
  }
@@ -3530,14 +3530,14 @@ var Loader = /*#__PURE__*/ function(e) {
3530
3530
  }
3531
3531
  _initVirtualElements() {
3532
3532
  let e = this._flicking, t = e.camera.element, n = e.panelsPerView, r = document.createDocumentFragment();
3533
- range(n + 1).map((e) => {
3533
+ range$1(n + 1).map((e) => {
3534
3534
  let t = document.createElement("div");
3535
3535
  return t.className = this._panelClass, t.dataset.elementIndex = e.toString(), t;
3536
3536
  }).forEach((e) => {
3537
3537
  r.appendChild(e);
3538
3538
  }), t.appendChild(r);
3539
3539
  }
3540
- }, Renderer$1 = class {
3540
+ }, Renderer$2 = class {
3541
3541
  get panels() {
3542
3542
  return this._panels;
3543
3543
  }
@@ -3555,13 +3555,13 @@ var Loader = /*#__PURE__*/ function(e) {
3555
3555
  }
3556
3556
  set align(e) {
3557
3557
  this._align = e;
3558
- let t = parsePanelAlign(e);
3558
+ let t = parsePanelAlign$1(e);
3559
3559
  this._panels.forEach((e) => {
3560
3560
  e.align = t;
3561
3561
  });
3562
3562
  }
3563
3563
  constructor(e) {
3564
- let { align: t = ALIGN.CENTER, strategy: n } = e;
3564
+ let { align: t = ALIGN$1.CENTER, strategy: n } = e;
3565
3565
  this._flicking = null, this._panels = [], this._rendering = !1, this._align = t, this._strategy = n;
3566
3566
  }
3567
3567
  init(e) {
@@ -3577,10 +3577,10 @@ var Loader = /*#__PURE__*/ function(e) {
3577
3577
  return this._panels.forEach((e) => e.markForShow()), Promise.resolve();
3578
3578
  }
3579
3579
  getRenderedPanels() {
3580
- return getFlickingAttached(this._flicking).renderer.panels.filter((e) => e.rendered);
3580
+ return getFlickingAttached$1(this._flicking).renderer.panels.filter((e) => e.rendered);
3581
3581
  }
3582
3582
  updatePanelSize() {
3583
- let e = getFlickingAttached(this._flicking), t = this._panels;
3583
+ let e = getFlickingAttached$1(this._flicking), t = this._panels;
3584
3584
  if (t.length <= 0) return this;
3585
3585
  if (e.panelsPerView > 0) {
3586
3586
  let e = t[0];
@@ -3593,10 +3593,10 @@ var Loader = /*#__PURE__*/ function(e) {
3593
3593
  return t.length <= 0 ? [] : (this.updateAfterPanelChange(t, []), t);
3594
3594
  }
3595
3595
  batchInsertDefer(...e) {
3596
- let t = this._panels, n = getFlickingAttached(this._flicking), r = t[0], i = parsePanelAlign(this._align);
3596
+ let t = this._panels, n = getFlickingAttached$1(this._flicking), r = t[0], i = parsePanelAlign$1(this._align);
3597
3597
  return e.reduce((e, s) => {
3598
3598
  var l;
3599
- let u = getMinusCompensatedIndex(s.index, t.length), d = t.slice(u), f = s.elements.map((e, t) => this._createPanel(e, {
3599
+ let u = getMinusCompensatedIndex$1(s.index, t.length), d = t.slice(u), f = s.elements.map((e, t) => this._createPanel(e, {
3600
3600
  index: u + t,
3601
3601
  align: i,
3602
3602
  flicking: n
@@ -3615,17 +3615,17 @@ var Loader = /*#__PURE__*/ function(e) {
3615
3615
  return t.length <= 0 ? [] : (this.updateAfterPanelChange([], t), t);
3616
3616
  }
3617
3617
  batchRemoveDefer(...e) {
3618
- let t = this._panels, { control: n } = getFlickingAttached(this._flicking), r = n.activePanel;
3618
+ let t = this._panels, { control: n } = getFlickingAttached$1(this._flicking), r = n.activePanel;
3619
3619
  return e.reduce((e, i) => {
3620
- let { index: s, deleteCount: l } = i, u = getMinusCompensatedIndex(s, t.length), d = t.slice(u + l), f = t.splice(u, l);
3620
+ let { index: s, deleteCount: l } = i, u = getMinusCompensatedIndex$1(s, t.length), d = t.slice(u + l), f = t.splice(u, l);
3621
3621
  return f.length <= 0 ? [] : (d.forEach((e) => {
3622
3622
  e.decreaseIndex(f.length), e.updatePosition();
3623
- }), i.hasDOMInElements && this._removePanelElements(f), f.forEach((e) => e.destroy()), includes(f, r) && n.resetActive(), [...e, ...f]);
3623
+ }), i.hasDOMInElements && this._removePanelElements(f), f.forEach((e) => e.destroy()), includes$1(f, r) && n.resetActive(), [...e, ...f]);
3624
3624
  }, []);
3625
3625
  }
3626
3626
  updateAfterPanelChange(e, t) {
3627
3627
  var n;
3628
- let r = getFlickingAttached(this._flicking), { camera: i, control: s } = r, l = this._panels, u = s.activePanel;
3628
+ let r = getFlickingAttached$1(this._flicking), { camera: i, control: s } = r, l = this._panels, u = s.activePanel;
3629
3629
  if (this._updateCameraAndControl(), r.autoResize && r.useResizeObserver && (e.forEach((e) => {
3630
3630
  e.element && r.autoResizer.observe(e.element);
3631
3631
  }), t.forEach((e) => {
@@ -3636,13 +3636,13 @@ var Loader = /*#__PURE__*/ function(e) {
3636
3636
  e > l.length - 1 && (e = l.length - 1), s.moveToPanel(l[e], { duration: 0 }).catch(() => void 0);
3637
3637
  }
3638
3638
  else s.moveToPanel(u, { duration: 0 }).catch(() => void 0);
3639
- r.camera.updateOffset(), (e.length > 0 || t.length > 0) && (r.trigger(new ComponentEvent$1(EVENTS.PANEL_CHANGE, {
3639
+ r.camera.updateOffset(), (e.length > 0 || t.length > 0) && (r.trigger(new ComponentEvent$1(EVENTS$1.PANEL_CHANGE, {
3640
3640
  added: e,
3641
3641
  removed: t
3642
3642
  })), this.checkPanelContentsReady([...e, ...t]));
3643
3643
  }
3644
3644
  checkPanelContentsReady(e) {
3645
- let t = getFlickingAttached(this._flicking), n = t.resizeOnContentsReady, r = this._panels;
3645
+ let t = getFlickingAttached$1(this._flicking), n = t.resizeOnContentsReady, r = this._panels;
3646
3646
  if (!n || t.virtualEnabled) return;
3647
3647
  let i = (e) => e.element && !!e.element.querySelector("img, video");
3648
3648
  if (e = e.filter((e) => i(e)), e.length <= 0) return;
@@ -3663,7 +3663,7 @@ var Loader = /*#__PURE__*/ function(e) {
3663
3663
  }), s.check(e.map((e) => e.element));
3664
3664
  }
3665
3665
  _updateCameraAndControl() {
3666
- let { camera: e, control: t } = getFlickingAttached(this._flicking);
3666
+ let { camera: e, control: t } = getFlickingAttached$1(this._flicking);
3667
3667
  e.updateRange(), e.updateOffset(), e.updateAnchors(), e.resetNeedPanelHistory(), t.updateInput();
3668
3668
  }
3669
3669
  _showOnlyVisiblePanels(e) {
@@ -3673,33 +3673,33 @@ var Loader = /*#__PURE__*/ function(e) {
3673
3673
  });
3674
3674
  }
3675
3675
  _updatePanelSizeByGrid(e, t) {
3676
- let n = getFlickingAttached(this._flicking), r = n.panelsPerView;
3677
- if (r <= 0) throw new FlickingError(MESSAGE.WRONG_OPTION("panelsPerView", r), CODE.WRONG_OPTION);
3676
+ let n = getFlickingAttached$1(this._flicking), r = n.panelsPerView;
3677
+ if (r <= 0) throw new FlickingError$1(MESSAGE$1.WRONG_OPTION("panelsPerView", r), CODE$1.WRONG_OPTION);
3678
3678
  if (t.length <= 0) return;
3679
- let i = (n.camera.size - (e.margin.prev + e.margin.next) * (r - 1)) / r, s = n.horizontal ? { width: i } : { height: i }, l = __spreadValues$1({
3679
+ let i = (n.camera.size - (e.margin.prev + e.margin.next) * (r - 1)) / r, s = n.horizontal ? { width: i } : { height: i }, l = __spreadValues$2({
3680
3680
  size: i,
3681
3681
  margin: e.margin
3682
3682
  }, !n.horizontal && { height: e.height });
3683
3683
  n.noPanelStyleOverride || this._strategy.updatePanelSizes(n, s), n.panels.forEach((e) => e.resize(l));
3684
3684
  }
3685
3685
  _removeAllChildsFromCamera() {
3686
- let e = getFlickingAttached(this._flicking).camera.element;
3686
+ let e = getFlickingAttached$1(this._flicking).camera.element;
3687
3687
  for (; e.firstChild;) e.removeChild(e.firstChild);
3688
3688
  }
3689
3689
  _insertPanelElements(e, t = null) {
3690
- let n = getFlickingAttached(this._flicking).camera.element, r = t?.element || null, i = document.createDocumentFragment();
3690
+ let n = getFlickingAttached$1(this._flicking).camera.element, r = t?.element || null, i = document.createDocumentFragment();
3691
3691
  e.forEach((e) => i.appendChild(e.element));
3692
3692
  let s = r && r.parentNode === n ? r : null;
3693
3693
  n.insertBefore(i, s);
3694
3694
  }
3695
3695
  _removePanelElements(e) {
3696
- let t = getFlickingAttached(this._flicking).camera.element;
3696
+ let t = getFlickingAttached$1(this._flicking).camera.element;
3697
3697
  e.forEach((e) => {
3698
3698
  e.element.parentNode === t && t.removeChild(e.element);
3699
3699
  });
3700
3700
  }
3701
3701
  _afterRender() {
3702
- let e = getFlickingAttached(this._flicking);
3702
+ let e = getFlickingAttached$1(this._flicking);
3703
3703
  if (e.camera.applyTransform(), e.useCSSOrder) {
3704
3704
  let t = e.renderer.panels.filter((e) => e.rendered);
3705
3705
  this._strategy.getRenderingIndexesByOrder(e).forEach((e, n) => {
@@ -3707,37 +3707,34 @@ var Loader = /*#__PURE__*/ function(e) {
3707
3707
  });
3708
3708
  }
3709
3709
  }
3710
- }, ExternalRenderer = class extends Renderer$1 {
3711
- _removePanelElements(e) {}
3712
- _removeAllChildsFromCamera() {}
3713
- }, VanillaRenderer = class extends Renderer$1 {
3710
+ }, VanillaRenderer$1 = class extends Renderer$2 {
3714
3711
  render() {
3715
- return __async$1(this, null, function* () {
3716
- let e = getFlickingAttached(this._flicking), t = this._strategy;
3712
+ return __async$2(this, null, function* () {
3713
+ let e = getFlickingAttached$1(this._flicking), t = this._strategy;
3717
3714
  t.updateRenderingPanels(e), t.renderPanels(e), this._resetPanelElementOrder(), this._afterRender();
3718
3715
  });
3719
3716
  }
3720
3717
  _collectPanels() {
3721
- let e = getFlickingAttached(this._flicking), t = e.camera;
3718
+ let e = getFlickingAttached$1(this._flicking), t = e.camera;
3722
3719
  this._removeAllTextNodes(), this._panels = this._strategy.collectPanels(e, t.children);
3723
3720
  }
3724
3721
  _createPanel(e, t) {
3725
3722
  return this._strategy.createPanel(e, t);
3726
3723
  }
3727
3724
  _resetPanelElementOrder() {
3728
- let e = getFlickingAttached(this._flicking), t = e.camera.element, n = [];
3725
+ let e = getFlickingAttached$1(this._flicking), t = e.camera.element, n = [];
3729
3726
  n = e.useCSSOrder ? this.getRenderedPanels().map((e) => e.element).reverse() : this._strategy.getRenderingElementsByOrder(e).reverse(), n.forEach((e, r) => {
3730
3727
  let i = n[r - 1] ? n[r - 1] : null;
3731
3728
  e.nextElementSibling !== i && t.insertBefore(e, i);
3732
3729
  });
3733
3730
  }
3734
3731
  _removeAllTextNodes() {
3735
- let e = getFlickingAttached(this._flicking).camera.element;
3736
- toArray(e.childNodes).forEach((t) => {
3732
+ let e = getFlickingAttached$1(this._flicking).camera.element;
3733
+ toArray$1(e.childNodes).forEach((t) => {
3737
3734
  t.nodeType === Node.TEXT_NODE && e.removeChild(t);
3738
3735
  });
3739
3736
  }
3740
- }, Panel = class {
3737
+ }, Panel$1 = class {
3741
3738
  get element() {
3742
3739
  return this._elProvider.element;
3743
3740
  }
@@ -3788,7 +3785,7 @@ var Loader = /*#__PURE__*/ function(e) {
3788
3785
  }
3789
3786
  get offset() {
3790
3787
  let e = this._toggleDirection, t = this._flicking.camera.rangeDiff;
3791
- return e === DIRECTION.NONE || !this._toggled ? 0 : e === DIRECTION.PREV ? -t : t;
3788
+ return e === DIRECTION$1.NONE || !this._toggled ? 0 : e === DIRECTION$1.PREV ? -t : t;
3792
3789
  }
3793
3790
  get progress() {
3794
3791
  let e = this._flicking;
@@ -3796,7 +3793,7 @@ var Loader = /*#__PURE__*/ function(e) {
3796
3793
  }
3797
3794
  get outsetProgress() {
3798
3795
  let e = this.position + this.offset, t = this._alignPos, n = this._flicking.camera, r = n.position;
3799
- return r === e ? 0 : r < e ? -getProgress$1(r, e, e + (n.size - n.alignPosition) + t) : 1 - getProgress$1(r, e - (n.alignPosition + this._size - t), e);
3796
+ return r === e ? 0 : r < e ? -getProgress$1$1(r, e, e + (n.size - n.alignPosition) + t) : 1 - getProgress$1$1(r, e - (n.alignPosition + this._size - t), e);
3800
3797
  }
3801
3798
  get visibleRatio() {
3802
3799
  let e = this.range, t = this._size, n = this.offset, r = this._flicking.camera.visibleRange, i = {
@@ -3830,16 +3827,16 @@ var Loader = /*#__PURE__*/ function(e) {
3830
3827
  var t;
3831
3828
  let n = this.element, { horizontal: r, useFractionalSize: i } = this._flicking;
3832
3829
  if (!n) return this;
3833
- if (e) this._size = e.size, this._margin = __spreadValues$1({}, e.margin), this._height = e.height ?? getElementSize({
3830
+ if (e) this._size = e.size, this._margin = __spreadValues$2({}, e.margin), this._height = e.height ?? getElementSize$1({
3834
3831
  el: n,
3835
3832
  horizontal: !1,
3836
3833
  useFractionalSize: i,
3837
3834
  useOffset: !0,
3838
- style: getStyle(n)
3835
+ style: getStyle$1(n)
3839
3836
  });
3840
3837
  else {
3841
- let e = getStyle(n);
3842
- this._size = getElementSize({
3838
+ let e = getStyle$1(n);
3839
+ this._size = getElementSize$1({
3843
3840
  el: n,
3844
3841
  horizontal: r,
3845
3842
  useFractionalSize: i,
@@ -3851,7 +3848,7 @@ var Loader = /*#__PURE__*/ function(e) {
3851
3848
  } : {
3852
3849
  prev: parseFloat(e.marginTop || "0"),
3853
3850
  next: parseFloat(e.marginBottom || "0")
3854
- }, this._height = r ? getElementSize({
3851
+ }, this._height = r ? getElementSize$1({
3855
3852
  el: n,
3856
3853
  horizontal: !1,
3857
3854
  useFractionalSize: i,
@@ -3862,7 +3859,7 @@ var Loader = /*#__PURE__*/ function(e) {
3862
3859
  return this.updatePosition(), this._updateAlignPos(), this;
3863
3860
  }
3864
3861
  setSize(e) {
3865
- return setSize(this.element, e), this;
3862
+ return setSize$1(this.element, e), this;
3866
3863
  }
3867
3864
  contains(e) {
3868
3865
  var t;
@@ -3905,33 +3902,33 @@ var Loader = /*#__PURE__*/ function(e) {
3905
3902
  }
3906
3903
  toggle(e, t) {
3907
3904
  let n = this._toggleDirection, r = this._togglePosition;
3908
- if (n === DIRECTION.NONE || t === e) return !1;
3905
+ if (n === DIRECTION$1.NONE || t === e) return !1;
3909
3906
  let i = this._toggled;
3910
- return t > e ? r >= e && r <= t && (this._toggled = n === DIRECTION.NEXT) : r <= e && r >= t && (this._toggled = n !== DIRECTION.NEXT), i !== this._toggled;
3907
+ return t > e ? r >= e && r <= t && (this._toggled = n === DIRECTION$1.NEXT) : r <= e && r >= t && (this._toggled = n !== DIRECTION$1.NEXT), i !== this._toggled;
3911
3908
  }
3912
3909
  updateCircularToggleDirection() {
3913
3910
  let e = this._flicking;
3914
- if (!e.circularEnabled) return this._toggleDirection = DIRECTION.NONE, this._togglePosition = 0, this._toggled = !1, this;
3911
+ if (!e.circularEnabled) return this._toggleDirection = DIRECTION$1.NONE, this._togglePosition = 0, this._toggled = !1, this;
3915
3912
  let t = e.camera, n = t.range, r = t.alignPosition, i = t.visibleRange, s = i.max - i.min, l = n.min - r, u = n.max - r + s, d = this.includeRange(u - s, u, !1), f = this.includeRange(l, l + s, !1);
3916
- return this._toggled = !1, d ? (this._toggleDirection = DIRECTION.PREV, this._togglePosition = this.range.max + n.min - n.max + r, this.toggle(Infinity, t.position)) : f ? (this._toggleDirection = DIRECTION.NEXT, this._togglePosition = this.range.min + n.max - s + r, this.toggle(-Infinity, t.position)) : (this._toggleDirection = DIRECTION.NONE, this._togglePosition = 0), this;
3913
+ return this._toggled = !1, d ? (this._toggleDirection = DIRECTION$1.PREV, this._togglePosition = this.range.max + n.min - n.max + r, this.toggle(Infinity, t.position)) : f ? (this._toggleDirection = DIRECTION$1.NEXT, this._togglePosition = this.range.min + n.max - s + r, this.toggle(-Infinity, t.position)) : (this._toggleDirection = DIRECTION$1.NONE, this._togglePosition = 0), this;
3917
3914
  }
3918
3915
  _updateAlignPos() {
3919
- this._alignPos = parseAlign$1(this._align, this._size);
3916
+ this._alignPos = parseAlign$1$1(this._align, this._size);
3920
3917
  }
3921
3918
  _resetInternalStates() {
3922
3919
  this._size = 0, this._pos = 0, this._margin = {
3923
3920
  prev: 0,
3924
3921
  next: 0
3925
- }, this._height = 0, this._alignPos = 0, this._toggled = !1, this._togglePosition = 0, this._toggleDirection = DIRECTION.NONE;
3922
+ }, this._height = 0, this._alignPos = 0, this._toggled = !1, this._togglePosition = 0, this._toggleDirection = DIRECTION$1.NONE;
3926
3923
  }
3927
- }, NormalRenderingStrategy = class {
3924
+ }, NormalRenderingStrategy$1 = class {
3928
3925
  constructor(e) {
3929
3926
  let { providerCtor: t } = e;
3930
3927
  this._providerCtor = t;
3931
3928
  }
3932
3929
  renderPanels() {}
3933
3930
  getRenderingIndexesByOrder(e) {
3934
- let t = e.renderer.panels.filter((e) => e.rendered), n = t.filter((e) => e.toggled && e.toggleDirection === DIRECTION.PREV), r = t.filter((e) => e.toggled && e.toggleDirection === DIRECTION.NEXT), i = t.filter((e) => !e.toggled);
3931
+ let t = e.renderer.panels.filter((e) => e.rendered), n = t.filter((e) => e.toggled && e.toggleDirection === DIRECTION$1.PREV), r = t.filter((e) => e.toggled && e.toggleDirection === DIRECTION$1.NEXT), i = t.filter((e) => !e.toggled);
3935
3932
  return [
3936
3933
  ...n,
3937
3934
  ...i,
@@ -3946,8 +3943,8 @@ var Loader = /*#__PURE__*/ function(e) {
3946
3943
  e.renderOnlyVisible ? this._showOnlyVisiblePanels(e) : e.panels.forEach((e) => e.markForShow());
3947
3944
  }
3948
3945
  collectPanels(e, t) {
3949
- let n = parsePanelAlign(e.renderer.align);
3950
- return t.map((t, r) => new Panel({
3946
+ let n = parsePanelAlign$1(e.renderer.align);
3947
+ return t.map((t, r) => new Panel$1({
3951
3948
  index: r,
3952
3949
  elementProvider: new this._providerCtor(t),
3953
3950
  align: n,
@@ -3955,7 +3952,7 @@ var Loader = /*#__PURE__*/ function(e) {
3955
3952
  }));
3956
3953
  }
3957
3954
  createPanel(e, t) {
3958
- return new Panel(__spreadProps$1(__spreadValues$1({}, t), { elementProvider: new this._providerCtor(e) }));
3955
+ return new Panel$1(__spreadProps$2(__spreadValues$2({}, t), { elementProvider: new this._providerCtor(e) }));
3959
3956
  }
3960
3957
  updatePanelSizes(e, t) {
3961
3958
  e.panels.forEach((e) => e.setSize(t));
@@ -3966,7 +3963,7 @@ var Loader = /*#__PURE__*/ function(e) {
3966
3963
  t.index in r || t.loading ? t.markForShow() : e.holding || t.markForHide();
3967
3964
  }), n.updateOffset();
3968
3965
  }
3969
- }, VirtualPanel = class extends Panel {
3966
+ }, VirtualPanel$1 = class extends Panel$1 {
3970
3967
  get element() {
3971
3968
  return this._elProvider.element;
3972
3969
  }
@@ -3975,7 +3972,7 @@ var Loader = /*#__PURE__*/ function(e) {
3975
3972
  }
3976
3973
  get elementIndex() {
3977
3974
  let e = this._flicking, t = e.panelsPerView + 1, n = e.panelCount, r = this._index;
3978
- return this._toggled && (r = this._toggleDirection === DIRECTION.NEXT ? r + n : r - n), circulateIndex(r, t);
3975
+ return this._toggled && (r = this._toggleDirection === DIRECTION$1.NEXT ? r + n : r - n), circulateIndex$1(r, t);
3979
3976
  }
3980
3977
  constructor(e) {
3981
3978
  super(e), e.elementProvider.init(this), this._elProvider = e.elementProvider, this._cachedInnerHTML = null;
@@ -3996,9 +3993,9 @@ var Loader = /*#__PURE__*/ function(e) {
3996
3993
  decreaseIndex(e) {
3997
3994
  return this.uncacheRenderResult(), super.decreaseIndex(e);
3998
3995
  }
3999
- }, VirtualRenderingStrategy = class {
3996
+ }, VirtualRenderingStrategy$1 = class {
4000
3997
  renderPanels(e) {
4001
- let t = e.virtual, n = e.visiblePanels, r = range(e.panelsPerView + 1);
3998
+ let t = e.virtual, n = e.visiblePanels, r = range$1(e.panelsPerView + 1);
4002
3999
  n.forEach((e) => {
4003
4000
  let n = e.elementIndex;
4004
4001
  e.render(), t.show(n), r[n] = -1;
@@ -4009,7 +4006,7 @@ var Loader = /*#__PURE__*/ function(e) {
4009
4006
  getRenderingIndexesByOrder(e) {
4010
4007
  let t = e.virtual, n = [...e.visiblePanels].filter((e) => e.rendered).sort((e, t) => e.position + e.offset - (t.position + t.offset));
4011
4008
  if (n.length <= 0) return t.elements.map((e, t) => t);
4012
- let r = n.map((e) => e.elementIndex), i = t.elements.map((e, t) => __spreadProps$1(__spreadValues$1({}, e), { idx: t })).filter((e) => !e.visible).map((e) => e.idx);
4009
+ let r = n.map((e) => e.elementIndex), i = t.elements.map((e, t) => __spreadProps$2(__spreadValues$2({}, e), { idx: t })).filter((e) => !e.visible).map((e) => e.idx);
4013
4010
  return [...r, ...i];
4014
4011
  }
4015
4012
  getRenderingElementsByOrder(e) {
@@ -4023,27 +4020,27 @@ var Loader = /*#__PURE__*/ function(e) {
4023
4020
  }), n.updateOffset();
4024
4021
  }
4025
4022
  collectPanels(e) {
4026
- let t = parsePanelAlign(e.renderer.align);
4027
- return range(e.virtual.initialPanelCount).map((n) => new VirtualPanel({
4023
+ let t = parsePanelAlign$1(e.renderer.align);
4024
+ return range$1(e.virtual.initialPanelCount).map((n) => new VirtualPanel$1({
4028
4025
  index: n,
4029
- elementProvider: new VirtualElementProvider(e),
4026
+ elementProvider: new VirtualElementProvider$1(e),
4030
4027
  align: t,
4031
4028
  flicking: e
4032
4029
  }));
4033
4030
  }
4034
4031
  createPanel(e, t) {
4035
- return new VirtualPanel(__spreadProps$1(__spreadValues$1({}, t), { elementProvider: new VirtualElementProvider(t.flicking) }));
4032
+ return new VirtualPanel$1(__spreadProps$2(__spreadValues$2({}, t), { elementProvider: new VirtualElementProvider$1(t.flicking) }));
4036
4033
  }
4037
4034
  updatePanelSizes(e, t) {
4038
4035
  e.virtual.elements.forEach((e) => {
4039
- setSize(e.nativeElement, t);
4036
+ setSize$1(e.nativeElement, t);
4040
4037
  }), e.panels.forEach((e) => e.setSize(t));
4041
4038
  }
4042
- }, _Flicking = class extends Component {
4039
+ }, _Flicking$1 = class extends Component {
4043
4040
  constructor(e, t = {}) {
4044
4041
  super(), this._scheduleResize = !1;
4045
- let { align: n = ALIGN.CENTER, defaultIndex: r = 0, horizontal: i = !0, circular: s = !1, circularFallback: l = CIRCULAR_FALLBACK.LINEAR, bound: u = !1, adaptive: d = !1, panelsPerView: f = -1, noPanelStyleOverride: p = !1, resizeOnContentsReady: m = !1, nested: g = !1, needPanelThreshold: _ = 0, preventEventsBeforeInit: v = !0, deceleration: y = .0075, duration: b = 500, easing: x = (e) => 1 - __pow(1 - e, 3), inputType: S = ["mouse", "touch"], moveType: C = "snap", threshold: w = 40, dragThreshold: T = 1, interruptable: E = !0, bounce: D = "20%", iOSEdgeSwipeThreshold: O = 30, preventClickOnDrag: k = !0, preventDefaultOnDrag: A = !1, disableOnInit: j = !1, changeOnHold: M = !1, renderOnlyVisible: N = !1, virtual: P = null, autoInit: F = !0, autoResize: I = !0, useResizeObserver: L = !0, resizeDebounce: R = 0, observePanelResize: z = !1, maxResizeDebounce: B = 100, useFractionalSize: V = !1, externalRenderer: H = null, renderExternal: U = null, optimizeSizeUpdate: W = !1, animationThreshold: G = .5, useCSSOrder: K = !1 } = t;
4046
- this._initialized = !1, this._plugins = [], this._isResizing = !1, this._align = n, this._defaultIndex = r, this._horizontal = i, this._circular = s, this._circularFallback = l, this._bound = u, this._adaptive = d, this._panelsPerView = f, this._noPanelStyleOverride = p, this._resizeOnContentsReady = m, this._nested = g, this._virtual = P, this._needPanelThreshold = _, this._preventEventsBeforeInit = v, this._deceleration = y, this._duration = b, this._easing = x, this._inputType = S, this._moveType = C, this._threshold = w, this._dragThreshold = T, this._interruptable = E, this._bounce = D, this._iOSEdgeSwipeThreshold = O, this._preventClickOnDrag = k, this._preventDefaultOnDrag = A, this._disableOnInit = j, this._changeOnHold = M, this._renderOnlyVisible = N, this._autoInit = F, this._autoResize = I, this._useResizeObserver = L, this._resizeDebounce = R, this._maxResizeDebounce = B, this._observePanelResize = z, this._useFractionalSize = V, this._externalRenderer = H, this._renderExternal = U, this._optimizeSizeUpdate = W, this._animationThreshold = G, this._useCSSOrder = K, this._viewport = new Viewport(this, getElement$1(e)), this._autoResizer = new AutoResizer(this), this._renderer = this._createRenderer(), this._camera = this._createCamera(), this._control = this._createControl(), this._virtualManager = new VirtualManager(this, P), this._autoInit && this.init();
4042
+ let { align: n = ALIGN$1.CENTER, defaultIndex: r = 0, horizontal: i = !0, circular: s = !1, circularFallback: l = CIRCULAR_FALLBACK$1.LINEAR, bound: u = !1, adaptive: d = !1, panelsPerView: f = -1, noPanelStyleOverride: p = !1, resizeOnContentsReady: m = !1, nested: g = !1, needPanelThreshold: _ = 0, preventEventsBeforeInit: v = !0, deceleration: y = .0075, duration: b = 500, easing: x = (e) => 1 - __pow$1(1 - e, 3), inputType: S = ["mouse", "touch"], moveType: C = "snap", threshold: w = 40, dragThreshold: T = 1, interruptable: E = !0, bounce: D = "20%", iOSEdgeSwipeThreshold: O = 30, preventClickOnDrag: k = !0, preventDefaultOnDrag: A = !1, disableOnInit: j = !1, changeOnHold: M = !1, renderOnlyVisible: N = !1, virtual: P = null, autoInit: F = !0, autoResize: I = !0, useResizeObserver: L = !0, resizeDebounce: R = 0, observePanelResize: z = !1, maxResizeDebounce: B = 100, useFractionalSize: V = !1, externalRenderer: H = null, renderExternal: U = null, optimizeSizeUpdate: W = !1, animationThreshold: G = .5, useCSSOrder: K = !1 } = t;
4043
+ this._initialized = !1, this._plugins = [], this._isResizing = !1, this._align = n, this._defaultIndex = r, this._horizontal = i, this._circular = s, this._circularFallback = l, this._bound = u, this._adaptive = d, this._panelsPerView = f, this._noPanelStyleOverride = p, this._resizeOnContentsReady = m, this._nested = g, this._virtual = P, this._needPanelThreshold = _, this._preventEventsBeforeInit = v, this._deceleration = y, this._duration = b, this._easing = x, this._inputType = S, this._moveType = C, this._threshold = w, this._dragThreshold = T, this._interruptable = E, this._bounce = D, this._iOSEdgeSwipeThreshold = O, this._preventClickOnDrag = k, this._preventDefaultOnDrag = A, this._disableOnInit = j, this._changeOnHold = M, this._renderOnlyVisible = N, this._autoInit = F, this._autoResize = I, this._useResizeObserver = L, this._resizeDebounce = R, this._maxResizeDebounce = B, this._observePanelResize = z, this._useFractionalSize = V, this._externalRenderer = H, this._renderExternal = U, this._optimizeSizeUpdate = W, this._animationThreshold = G, this._useCSSOrder = K, this._viewport = new Viewport$1(this, getElement$2(e)), this._autoResizer = new AutoResizer$1(this), this._renderer = this._createRenderer(), this._camera = this._createCamera(), this._control = this._createControl(), this._virtualManager = new VirtualManager$1(this, P), this._autoInit && this.init();
4047
4044
  }
4048
4045
  get control() {
4049
4046
  return this._control;
@@ -4344,7 +4341,7 @@ var Loader = /*#__PURE__*/ function(e) {
4344
4341
  if (this._initialized) return Promise.resolve();
4345
4342
  let e = this._camera, t = this._renderer, n = this._control, r = this._virtualManager, i = this.trigger, s = this._preventEventsBeforeInit;
4346
4343
  return e.init(), r.init(), t.init(this), n.init(this), s && (this.trigger = () => this), this._initialResize(), this._moveToInitialPanel(), this._autoResize && this._autoResizer.enable(), this._preventClickOnDrag && n.controller.addPreventClickHandler(), this._disableOnInit && this.disableInput(), t.checkPanelContentsReady(t.panels), this._initialized = !0, t.render().then(() => {
4347
- this._plugins.forEach((e) => e.init(this)), s && (this.trigger = i), this.trigger(new ComponentEvent$1(EVENTS.READY));
4344
+ this._plugins.forEach((e) => e.init(this)), s && (this.trigger = i), this.trigger(new ComponentEvent$1(EVENTS$1.READY));
4348
4345
  });
4349
4346
  }
4350
4347
  destroy() {
@@ -4352,23 +4349,23 @@ var Loader = /*#__PURE__*/ function(e) {
4352
4349
  }
4353
4350
  prev(e = this._duration) {
4354
4351
  var t, n, r;
4355
- return this.moveTo(this._control.activePanel?.prev()?.index ?? -1, e, DIRECTION.PREV);
4352
+ return this.moveTo(this._control.activePanel?.prev()?.index ?? -1, e, DIRECTION$1.PREV);
4356
4353
  }
4357
4354
  next(e = this._duration) {
4358
4355
  var t, n, r;
4359
- return this.moveTo(this._control.activePanel?.next()?.index ?? this._renderer.panelCount, e, DIRECTION.NEXT);
4356
+ return this.moveTo(this._control.activePanel?.next()?.index ?? this._renderer.panelCount, e, DIRECTION$1.NEXT);
4360
4357
  }
4361
- moveTo(e, t = this._duration, n = DIRECTION.NONE) {
4358
+ moveTo(e, t = this._duration, n = DIRECTION$1.NONE) {
4362
4359
  let r = this._renderer, i = r.panelCount, s = r.getPanel(e);
4363
- return s ? this._control.animating ? Promise.reject(new FlickingError(MESSAGE.ANIMATION_ALREADY_PLAYING, CODE.ANIMATION_ALREADY_PLAYING)) : (this._control.holding && this._control.controller.release(), this._control.moveToPanel(s, {
4360
+ return s ? this._control.animating ? Promise.reject(new FlickingError$1(MESSAGE$1.ANIMATION_ALREADY_PLAYING, CODE$1.ANIMATION_ALREADY_PLAYING)) : (this._control.holding && this._control.controller.release(), this._control.moveToPanel(s, {
4364
4361
  duration: t,
4365
4362
  direction: n
4366
- })) : Promise.reject(new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(e, 0, i - 1), CODE.INDEX_OUT_OF_RANGE));
4363
+ })) : Promise.reject(new FlickingError$1(MESSAGE$1.INDEX_OUT_OF_RANGE(e, 0, i - 1), CODE$1.INDEX_OUT_OF_RANGE));
4367
4364
  }
4368
4365
  updateAnimation(e, t, n) {
4369
4366
  if (!this._control.animating) return;
4370
4367
  let r = this._renderer, i = r.panelCount, s = r.getPanel(e);
4371
- if (!s) throw new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(e, 0, i - 1), CODE.INDEX_OUT_OF_RANGE);
4368
+ if (!s) throw new FlickingError$1(MESSAGE$1.INDEX_OUT_OF_RANGE(e, 0, i - 1), CODE$1.INDEX_OUT_OF_RANGE);
4372
4369
  this._control.updateAnimation(s, t, n);
4373
4370
  }
4374
4371
  stopAnimation() {
@@ -4400,7 +4397,7 @@ var Loader = /*#__PURE__*/ function(e) {
4400
4397
  }
4401
4398
  setStatus(e) {
4402
4399
  var t;
4403
- if (!this._initialized) throw new FlickingError(MESSAGE.NOT_INITIALIZED, CODE.NOT_INITIALIZED);
4400
+ if (!this._initialized) throw new FlickingError$1(MESSAGE$1.NOT_INITIALIZED, CODE$1.NOT_INITIALIZED);
4404
4401
  let { index: n, position: r, visibleOffset: i, panels: s } = e, l = this._renderer, u = this._control;
4405
4402
  if (s[0]?.html && !this._renderExternal && (l.batchRemove({
4406
4403
  index: 0,
@@ -4408,13 +4405,13 @@ var Loader = /*#__PURE__*/ function(e) {
4408
4405
  hasDOMInElements: !0
4409
4406
  }), l.batchInsert({
4410
4407
  index: 0,
4411
- elements: parseElement(s.map((e) => e.html)),
4408
+ elements: parseElement$1(s.map((e) => e.html)),
4412
4409
  hasDOMInElements: !0
4413
4410
  })), n != null) {
4414
4411
  let e = i ? n - i : n;
4415
4412
  this.moveTo(e, 0).catch(() => void 0);
4416
4413
  }
4417
- if (r && this._moveType === MOVE_TYPE.FREE_SCROLL) {
4414
+ if (r && this._moveType === MOVE_TYPE$1.FREE_SCROLL) {
4418
4415
  let { panel: e, progressInPanel: t } = r, n = i ? e - i : e, s = l.panels[n].range, d = s.min + (s.max - s.min) * t;
4419
4416
  u.moveToPosition(d, 0).catch(() => void 0);
4420
4417
  }
@@ -4424,12 +4421,12 @@ var Loader = /*#__PURE__*/ function(e) {
4424
4421
  }
4425
4422
  removePlugins(...e) {
4426
4423
  return e.forEach((e) => {
4427
- let t = findIndex(this._plugins, (t) => t === e);
4424
+ let t = findIndex$1(this._plugins, (t) => t === e);
4428
4425
  t >= 0 && (e.destroy(), this._plugins.splice(t, 1));
4429
4426
  }), this;
4430
4427
  }
4431
4428
  resize() {
4432
- return __async$1(this, null, function* () {
4429
+ return __async$2(this, null, function* () {
4433
4430
  if (!this._initialized) return;
4434
4431
  if (this._isResizing) {
4435
4432
  this._scheduleResize = !0;
@@ -4437,14 +4434,14 @@ var Loader = /*#__PURE__*/ function(e) {
4437
4434
  }
4438
4435
  this._scheduleResize = !1, this._isResizing = !0;
4439
4436
  let e = this._viewport, t = this._renderer, n = this._camera, r = this._control, i = r.activePanel, s = e.width, l = e.height, u = i ? n.getProgressInPanel(i) : 0;
4440
- if (this.trigger(new ComponentEvent$1(EVENTS.BEFORE_RESIZE, {
4437
+ if (this.trigger(new ComponentEvent$1(EVENTS$1.BEFORE_RESIZE, {
4441
4438
  width: s,
4442
4439
  height: l,
4443
4440
  element: e.element
4444
4441
  })), e.resize(), this._optimizeSizeUpdate ? (this.horizontal && e.width !== s || !this.horizontal && e.height !== l) && (yield t.forceRenderAllPanels()) : yield t.forceRenderAllPanels(), !this._initialized || (t.updatePanelSize(), n.updateAlignPos(), n.updateRange(), n.updateAnchors(), n.updateAdaptiveHeight(), n.updatePanelOrder(), n.updateOffset(), yield t.render(), !this._initialized)) return;
4445
4442
  r.animating || (r.updatePosition(u), r.updateInput());
4446
4443
  let d = e.width, f = e.height, p = d !== s || f !== l;
4447
- this.trigger(new ComponentEvent$1(EVENTS.AFTER_RESIZE, {
4444
+ this.trigger(new ComponentEvent$1(EVENTS$1.AFTER_RESIZE, {
4448
4445
  width: e.width,
4449
4446
  height: e.height,
4450
4447
  prev: {
@@ -4463,15 +4460,15 @@ var Loader = /*#__PURE__*/ function(e) {
4463
4460
  return this.insert(0, e);
4464
4461
  }
4465
4462
  insert(e, t) {
4466
- if (this._renderExternal) throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK);
4463
+ if (this._renderExternal) throw new FlickingError$1(MESSAGE$1.NOT_ALLOWED_IN_FRAMEWORK, CODE$1.NOT_ALLOWED_IN_FRAMEWORK);
4467
4464
  return this._renderer.batchInsert({
4468
4465
  index: e,
4469
- elements: parseElement(t),
4466
+ elements: parseElement$1(t),
4470
4467
  hasDOMInElements: !0
4471
4468
  });
4472
4469
  }
4473
4470
  remove(e, t = 1) {
4474
- if (this._renderExternal) throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK);
4471
+ if (this._renderExternal) throw new FlickingError$1(MESSAGE$1.NOT_ALLOWED_IN_FRAMEWORK, CODE$1.NOT_ALLOWED_IN_FRAMEWORK);
4475
4472
  return this._renderer.batchRemove({
4476
4473
  index: e,
4477
4474
  deleteCount: t,
@@ -4480,16 +4477,16 @@ var Loader = /*#__PURE__*/ function(e) {
4480
4477
  }
4481
4478
  _createControl() {
4482
4479
  var e;
4483
- let t = this._moveType, n = Object.keys(MOVE_TYPE).map((e) => MOVE_TYPE[e]), r = Array.isArray(t) ? t[0] : t, i = Array.isArray(t) ? t[1] ?? {} : {};
4484
- if (!includes(n, r)) throw new FlickingError(MESSAGE.WRONG_OPTION("moveType", JSON.stringify(t)), CODE.WRONG_OPTION);
4480
+ let t = this._moveType, n = Object.keys(MOVE_TYPE$1).map((e) => MOVE_TYPE$1[e]), r = Array.isArray(t) ? t[0] : t, i = Array.isArray(t) ? t[1] ?? {} : {};
4481
+ if (!includes$1(n, r)) throw new FlickingError$1(MESSAGE$1.WRONG_OPTION("moveType", JSON.stringify(t)), CODE$1.WRONG_OPTION);
4485
4482
  switch (r) {
4486
- case MOVE_TYPE.SNAP: return new SnapControl(i);
4487
- case MOVE_TYPE.FREE_SCROLL: return new FreeControl(i);
4488
- case MOVE_TYPE.STRICT: return new StrictControl(i);
4483
+ case MOVE_TYPE$1.SNAP: return new SnapControl$1(i);
4484
+ case MOVE_TYPE$1.FREE_SCROLL: return new FreeControl$1(i);
4485
+ case MOVE_TYPE$1.STRICT: return new StrictControl$1(i);
4489
4486
  }
4490
4487
  }
4491
4488
  _createCamera() {
4492
- return this._circular && this._bound && console.warn("\"circular\" and \"bound\" option cannot be used together, ignoring bound."), new Camera(this, { align: this._align });
4489
+ return this._circular && this._bound && console.warn("\"circular\" and \"bound\" option cannot be used together, ignoring bound."), new Camera$1(this, { align: this._align });
4493
4490
  }
4494
4491
  _createRenderer() {
4495
4492
  let e = this._externalRenderer;
@@ -4497,32 +4494,32 @@ var Loader = /*#__PURE__*/ function(e) {
4497
4494
  }
4498
4495
  _createExternalRenderer() {
4499
4496
  let { renderer: e, rendererOptions: t } = this._renderExternal;
4500
- return new e(__spreadValues$1({ align: this._align }, t));
4497
+ return new e(__spreadValues$2({ align: this._align }, t));
4501
4498
  }
4502
4499
  _createVanillaRenderer() {
4503
4500
  let e = this.virtualEnabled;
4504
- return new VanillaRenderer({
4501
+ return new VanillaRenderer$1({
4505
4502
  align: this._align,
4506
- strategy: e ? new VirtualRenderingStrategy() : new NormalRenderingStrategy({ providerCtor: VanillaElementProvider })
4503
+ strategy: e ? new VirtualRenderingStrategy$1() : new NormalRenderingStrategy$1({ providerCtor: VanillaElementProvider$1 })
4507
4504
  });
4508
4505
  }
4509
4506
  _moveToInitialPanel() {
4510
4507
  let e = this._renderer, t = this._control, n = this._camera, r = e.getPanel(this._defaultIndex) || e.getPanel(0);
4511
4508
  if (!r) return;
4512
4509
  let i = n.findNearestAnchor(r.position), s = i && r.position !== i.panel.position && r.index !== i.panel.index ? i.panel : r;
4513
- if (t.setActive(s, null, !1), !i) throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(s.position), CODE.POSITION_NOT_REACHABLE);
4510
+ if (t.setActive(s, null, !1), !i) throw new FlickingError$1(MESSAGE$1.POSITION_NOT_REACHABLE(s.position), CODE$1.POSITION_NOT_REACHABLE);
4514
4511
  let l = s.position;
4515
4512
  n.canReach(s) || (l = i.position), n.lookAt(l), t.updateInput(), n.updateOffset();
4516
4513
  }
4517
4514
  _initialResize() {
4518
4515
  let e = this._viewport, t = this._renderer, n = this._camera, r = this._control;
4519
- this.trigger(new ComponentEvent$1(EVENTS.BEFORE_RESIZE, {
4516
+ this.trigger(new ComponentEvent$1(EVENTS$1.BEFORE_RESIZE, {
4520
4517
  width: 0,
4521
4518
  height: 0,
4522
4519
  element: e.element
4523
4520
  })), e.resize(), t.updatePanelSize(), n.updateAlignPos(), n.updateRange(), n.updateAnchors(), n.updateOffset(), r.updateInput();
4524
4521
  let i = e.width, s = e.height, l = i !== 0 || s !== 0;
4525
- this.trigger(new ComponentEvent$1(EVENTS.AFTER_RESIZE, {
4522
+ this.trigger(new ComponentEvent$1(EVENTS$1.AFTER_RESIZE, {
4526
4523
  width: e.width,
4527
4524
  height: e.height,
4528
4525
  prev: {
@@ -4534,82 +4531,10 @@ var Loader = /*#__PURE__*/ function(e) {
4534
4531
  }));
4535
4532
  }
4536
4533
  };
4537
- _Flicking.VERSION = "4.16.3";
4538
- var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !0, n) => {
4539
- let r = getCameraAlign(e), i = getPanelAlign(e);
4540
- if (i == null) return "";
4541
- let s = `calc(${r} - (${n || "0px"} * ${i.percentage}) - ${i.absolute}px)`;
4542
- return t ? `translate(${s})` : `translate(0, ${s})`;
4543
- }, getCameraAlign = (e) => parseAlign(typeof e == "object" ? e.camera : e), getPanelAlign = (e) => parseArithmeticExpression(parseAlign(typeof e == "object" ? e.panel : e)), parseAlign = (e) => {
4544
- if (typeof e == "number") return `${e}px`;
4545
- switch (e) {
4546
- case ALIGN.CENTER: return "50%";
4547
- case ALIGN.NEXT: return "100%";
4548
- case ALIGN.PREV: return "0%";
4549
- default: return e;
4550
- }
4551
- }, getRenderingPanels = (e, t) => {
4552
- let n = t.removed.reduce((e, t) => (e[t] = !0, e), {}), r = t.maintained.reduce((e, [t, n]) => (e[t] = n, e), {}), i = e.panels.filter((e) => !n[e.index]);
4553
- return e.useCSSOrder || i.sort((e, t) => e.position + e.offset - (t.position + t.offset)), [...i.map((e) => t.list[r[e.index]]), ...t.added.map((e) => t.list[e])];
4554
- }, sync = (e, t, n) => {
4555
- let r = e.renderer, i = r.panels, s = [...t.prevList], l = [], u = [];
4556
- if (t.removed.length > 0) {
4557
- let e = -1, n = -1;
4558
- t.removed.forEach((t) => {
4559
- e < 0 && (e = t), n >= 0 && t !== n - 1 ? (u.push(...batchRemove(r, n, e + 1)), e = t, n = t) : n = t, s.splice(t, 1);
4560
- }), u.push(...batchRemove(r, n, e + 1));
4561
- }
4562
- if (t.ordered.forEach(([e, t]) => {
4563
- let n = i.splice(e, 1)[0];
4564
- i.splice(t, 0, n);
4565
- }), t.ordered.length > 0 && (i.forEach((e, t) => {
4566
- let n = t - e.index;
4567
- n > 0 ? e.increaseIndex(n) : e.decreaseIndex(-n);
4568
- }), i.sort((e, t) => e.index - t.index), i.forEach((e) => {
4569
- e.updatePosition();
4570
- })), t.added.length > 0) {
4571
- let e = -1, i = -1, u = n.slice(s.length);
4572
- t.added.forEach((n, s) => {
4573
- e < 0 && (e = s), i >= 0 && n !== i + 1 ? (l.push(...batchInsert(r, t, u, e, s + 1)), e = -1, i = -1) : i = n;
4574
- }), e >= 0 && l.push(...batchInsert(r, t, u, e));
4575
- }
4576
- if (t.added.length > 0 || t.removed.length > 0) r.updateAfterPanelChange(l, u);
4577
- else if (t.ordered.length > 0) {
4578
- let t = e.camera;
4579
- t.updateRange(), t.updateOffset(), t.updateAnchors(), t.resetNeedPanelHistory();
4580
- }
4581
- }, batchInsert = (e, t, n, r, i) => e.batchInsertDefer(...t.added.slice(r, i).map((e, t) => ({
4582
- index: e,
4583
- elements: [n[t]],
4584
- hasDOMInElements: !1
4585
- }))), batchRemove = (e, t, n) => {
4586
- let r = e.panels.slice(t, n);
4587
- return e.batchRemoveDefer({
4588
- index: t,
4589
- deleteCount: r.length,
4590
- hasDOMInElements: !1
4591
- });
4592
- }, withFlickingMethods = (e, t) => {
4593
- [Component.prototype, Flicking$1.prototype].forEach((n) => {
4594
- Object.getOwnPropertyNames(n).filter((t) => !e[t] && t.indexOf("_") !== 0 && t !== "constructor").forEach((r) => {
4595
- let i = Object.getOwnPropertyDescriptor(n, r);
4596
- if (i.value) Object.defineProperty(e, r, { value: function(...e) {
4597
- return i.value.call(this[t], ...e);
4598
- } });
4599
- else {
4600
- let n = {};
4601
- i.get && (n.get = function() {
4602
- var e;
4603
- let n = this[t];
4604
- return n && i.get?.call(n);
4605
- }), i.set && (n.set = function(...e) {
4606
- var n;
4607
- return i.set?.call(this[t], ...e);
4608
- }), Object.defineProperty(e, r, n);
4609
- }
4610
- });
4611
- });
4612
- }, ARROW = {
4534
+ _Flicking$1.VERSION = "4.16.3";
4535
+ //#endregion
4536
+ //#region node_modules/@egjs/flicking-plugins/dist/plugins.esm.js
4537
+ var ARROW = {
4613
4538
  PREV_SELECTOR: ".flicking-arrow-prev",
4614
4539
  NEXT_SELECTOR: ".flicking-arrow-next",
4615
4540
  DISABLED_CLASS: "flicking-arrow-disabled"
@@ -4644,7 +4569,7 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4644
4569
  let n = RegExp(`( |^)${t}( |$)`, "g");
4645
4570
  e.className.replace(n, " ");
4646
4571
  }
4647
- }, getElement = (e, t, n) => {
4572
+ }, getElement$1 = (e, t, n) => {
4648
4573
  let r = t.querySelector(e);
4649
4574
  if (!r) throw Error(`[Flicking-${n}] Couldn't find element with the given selector: ${e}`);
4650
4575
  return r;
@@ -4676,7 +4601,7 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4676
4601
  let e = this._flicking, t = e.camera, n = e.control.controller;
4677
4602
  e.holding ? this._updateClass(t.position) : this._updateClass(n.animatingContext.end);
4678
4603
  }, this._onCatch = (e) => {
4679
- if (!(e instanceof FlickingError)) throw e;
4604
+ if (!(e instanceof FlickingError$1)) throw e;
4680
4605
  };
4681
4606
  let { parentEl: t = null, prevElSelector: n = ARROW.PREV_SELECTOR, nextElSelector: r = ARROW.NEXT_SELECTOR, disabledClass: i = ARROW.DISABLED_CLASS, moveCount: s = 1, moveByViewportSize: l = !1 } = e;
4682
4607
  this._parentEl = t, this._prevElSelector = n, this._nextElSelector = r, this._disabledClass = i, this._moveCount = s, this._moveByViewportSize = l;
@@ -4724,8 +4649,8 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4724
4649
  this._moveByViewportSize = e;
4725
4650
  }
4726
4651
  init(e) {
4727
- this._flicking && this.destroy(), this._flicking = e, e.on(EVENTS.MOVE, this._onAnimation);
4728
- let t = this._parentEl ? this._parentEl : e.element, n = getElement(this._prevElSelector, t, "Arrow"), r = getElement(this._nextElSelector, t, "Arrow");
4652
+ this._flicking && this.destroy(), this._flicking = e, e.on(EVENTS$1.MOVE, this._onAnimation);
4653
+ let t = this._parentEl ? this._parentEl : e.element, n = getElement$1(this._prevElSelector, t, "Arrow"), r = getElement$1(this._nextElSelector, t, "Arrow");
4729
4654
  [BROWSER.MOUSE_DOWN, BROWSER.TOUCH_START].forEach((e) => {
4730
4655
  n.addEventListener(e, this._preventInputPropagation, { passive: !0 }), r.addEventListener(e, this._preventInputPropagation, { passive: !0 });
4731
4656
  }), n.addEventListener(BROWSER.CLICK, this._onPrevClick), r.addEventListener(BROWSER.CLICK, this._onNextClick), this._prevEl = n, this._nextEl = r, this.update();
@@ -4733,7 +4658,7 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4733
4658
  destroy() {
4734
4659
  let e = this._flicking;
4735
4660
  if (!e) return;
4736
- e.off(EVENTS.MOVE, this._onAnimation);
4661
+ e.off(EVENTS$1.MOVE, this._onAnimation);
4737
4662
  let t = this._prevEl, n = this._nextEl;
4738
4663
  [BROWSER.MOUSE_DOWN, BROWSER.TOUCH_START].forEach((e) => {
4739
4664
  t.removeEventListener(e, this._preventInputPropagation), n.removeEventListener(e, this._preventInputPropagation);
@@ -4774,12 +4699,12 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4774
4699
  this._scale = e;
4775
4700
  }
4776
4701
  init(e) {
4777
- this._flicking && this.destroy(), this._flicking = e, e.on(EVENTS.MOVE, this._onMove), e.on(EVENTS.AFTER_RESIZE, this.update), this._onMove();
4702
+ this._flicking && this.destroy(), this._flicking = e, e.on(EVENTS$1.MOVE, this._onMove), e.on(EVENTS$1.AFTER_RESIZE, this.update), this._onMove();
4778
4703
  }
4779
4704
  destroy() {
4780
- this._flicking &&= (this._flicking.off(EVENTS.MOVE, this._onMove), this._flicking.off(EVENTS.AFTER_RESIZE, this.update), null);
4705
+ this._flicking &&= (this._flicking.off(EVENTS$1.MOVE, this._onMove), this._flicking.off(EVENTS$1.AFTER_RESIZE, this.update), null);
4781
4706
  }
4782
- }, Renderer = class {
4707
+ }, Renderer$1 = class {
4783
4708
  constructor(e) {
4784
4709
  let { flicking: t, pagination: n, wrapper: r } = e;
4785
4710
  this._flicking = t, this._pagination = n, this._wrapper = r;
@@ -4796,11 +4721,11 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4796
4721
  e.stopPropagation();
4797
4722
  }, { passive: !0 }), e.addEventListener(BROWSER.CLICK, () => {
4798
4723
  this._flicking.moveTo(n).catch((e) => {
4799
- if (!(e instanceof FlickingError)) throw e;
4724
+ if (!(e instanceof FlickingError$1)) throw e;
4800
4725
  });
4801
4726
  });
4802
4727
  }
4803
- }, BulletRenderer = class extends Renderer {
4728
+ }, BulletRenderer = class extends Renderer$1 {
4804
4729
  constructor() {
4805
4730
  super(...arguments), this._bullets = [], this._prevIndex = -1;
4806
4731
  }
@@ -4841,7 +4766,7 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4841
4766
  this._prevIndex = m;
4842
4767
  }
4843
4768
  }
4844
- }, FractionRenderer = class extends Renderer {
4769
+ }, FractionRenderer = class extends Renderer$1 {
4845
4770
  constructor() {
4846
4771
  super(...arguments), this._prevIndex = -1, this._prevTotal = -1;
4847
4772
  }
@@ -4858,7 +4783,7 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4858
4783
  let u = `.${r.classPrefix}-${PAGINATION.FRACTION_CURRENT_SUFFIX}`, d = `.${r.classPrefix}-${PAGINATION.FRACTION_TOTAL_SUFFIX}`, f = n.querySelector(u), p = n.querySelector(d);
4859
4784
  f.innerHTML = r.fractionCurrentFormat(s), p.innerHTML = r.fractionTotalFormat(l), this._prevIndex = s, this._prevTotal = l;
4860
4785
  }
4861
- }, ScrollBulletRenderer = class extends Renderer {
4786
+ }, ScrollBulletRenderer = class extends Renderer$1 {
4862
4787
  constructor() {
4863
4788
  super(...arguments), this._bullets = [], this._bulletSize = 0, this._previousIndex = -1, this._sliderIndex = -1, this.moveTo = (e) => {
4864
4789
  let t = this._pagination, n = this._wrapper.firstElementChild, r = this._bulletSize, i = r * t.bulletCount;
@@ -4904,7 +4829,7 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4904
4829
  total: r.length,
4905
4830
  prevIndex: i,
4906
4831
  sliderIndex: this._sliderIndex,
4907
- direction: d > i ? DIRECTION.NEXT : DIRECTION.PREV,
4832
+ direction: d > i ? DIRECTION$1.NEXT : DIRECTION$1.PREV,
4908
4833
  bullets: [...r],
4909
4834
  moveTo: this.moveTo
4910
4835
  }), this._previousIndex = d;
@@ -4989,11 +4914,11 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
4989
4914
  this._flicking && this.destroy(), this._flicking = e;
4990
4915
  let t = this._type, n = this._selector, r = (this._parentEl ? this._parentEl : e.element).querySelector(n);
4991
4916
  if (!r) throw Error(`[Flicking-Pagination] Couldn't find element with the given selector: ${n}`);
4992
- this._wrapper = r, this._renderer = this._createRenderer(t), e.on(EVENTS.WILL_CHANGE, this._onIndexChange), e.on(EVENTS.WILL_RESTORE, this._onIndexChange), e.on(EVENTS.PANEL_CHANGE, this.update), this.update();
4917
+ this._wrapper = r, this._renderer = this._createRenderer(t), e.on(EVENTS$1.WILL_CHANGE, this._onIndexChange), e.on(EVENTS$1.WILL_RESTORE, this._onIndexChange), e.on(EVENTS$1.PANEL_CHANGE, this.update), this.update();
4993
4918
  }
4994
4919
  destroy() {
4995
4920
  let e = this._flicking;
4996
- e && (e.off(EVENTS.WILL_CHANGE, this._onIndexChange), e.off(EVENTS.WILL_RESTORE, this._onIndexChange), e.off(EVENTS.PANEL_CHANGE, this.update), this._renderer.destroy(), this._removeAllChilds(), this._flicking = null);
4921
+ e && (e.off(EVENTS$1.WILL_CHANGE, this._onIndexChange), e.off(EVENTS$1.WILL_RESTORE, this._onIndexChange), e.off(EVENTS$1.PANEL_CHANGE, this.update), this._renderer.destroy(), this._removeAllChilds(), this._flicking = null);
4997
4922
  }
4998
4923
  _createRenderer(e) {
4999
4924
  let t = {
@@ -5012,6 +4937,2709 @@ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !
5012
4937
  let e = this._wrapper;
5013
4938
  for (; e.firstChild;) e.removeChild(e.firstChild);
5014
4939
  }
4940
+ }, __defProp$1 = Object.defineProperty, __defProps$1 = Object.defineProperties, __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$1 = Object.getOwnPropertySymbols, __getProtoOf$1 = Object.getPrototypeOf, __hasOwnProp$1 = Object.prototype.hasOwnProperty, __propIsEnum$1 = Object.prototype.propertyIsEnumerable, __reflectGet$1 = Reflect.get, __pow = Math.pow, __defNormalProp$1 = (e, t, n) => t in e ? __defProp$1(e, t, {
4941
+ enumerable: !0,
4942
+ configurable: !0,
4943
+ writable: !0,
4944
+ value: n
4945
+ }) : e[t] = n, __spreadValues$1 = (e, t) => {
4946
+ for (var n in t ||= {}) __hasOwnProp$1.call(t, n) && __defNormalProp$1(e, n, t[n]);
4947
+ if (__getOwnPropSymbols$1) for (var n of __getOwnPropSymbols$1(t)) __propIsEnum$1.call(t, n) && __defNormalProp$1(e, n, t[n]);
4948
+ return e;
4949
+ }, __spreadProps$1 = (e, t) => __defProps$1(e, __getOwnPropDescs$1(t)), __superGet$1 = (e, t, n) => __reflectGet$1(__getProtoOf$1(e), n, t), __async$1 = (e, t, n) => new Promise((r, i) => {
4950
+ var s = (e) => {
4951
+ try {
4952
+ u(n.next(e));
4953
+ } catch (e) {
4954
+ i(e);
4955
+ }
4956
+ }, l = (e) => {
4957
+ try {
4958
+ u(n.throw(e));
4959
+ } catch (e) {
4960
+ i(e);
4961
+ }
4962
+ }, u = (e) => e.done ? r(e.value) : Promise.resolve(e.value).then(s, l);
4963
+ u((n = n.apply(e, t)).next());
4964
+ }), ALIGN = {
4965
+ PREV: "prev",
4966
+ CENTER: "center",
4967
+ NEXT: "next"
4968
+ }, DIRECTION = {
4969
+ PREV: "PREV",
4970
+ NEXT: "NEXT",
4971
+ NONE: null
4972
+ }, MOVE_TYPE = {
4973
+ SNAP: "snap",
4974
+ FREE_SCROLL: "freeScroll",
4975
+ STRICT: "strict"
4976
+ }, CLASS = {
4977
+ VIEWPORT: "flicking-viewport",
4978
+ CAMERA: "flicking-camera",
4979
+ VERTICAL: "vertical",
4980
+ HIDDEN: "flicking-hidden",
4981
+ DEFAULT_VIRTUAL: "flicking-panel"
4982
+ }, CIRCULAR_FALLBACK = {
4983
+ LINEAR: "linear",
4984
+ BOUND: "bound"
4985
+ }, ORDER = {
4986
+ LTR: "ltr",
4987
+ RTL: "rtl"
4988
+ }, AnchorPoint = class {
4989
+ get index() {
4990
+ return this._index;
4991
+ }
4992
+ get position() {
4993
+ return this._pos;
4994
+ }
4995
+ get panel() {
4996
+ return this._panel;
4997
+ }
4998
+ constructor(e) {
4999
+ let { index: t, position: n, panel: r } = e;
5000
+ this._index = t, this._pos = n, this._panel = r;
5001
+ }
5002
+ }, errors = {
5003
+ WRONG_TYPE: {
5004
+ code: 0,
5005
+ message: (e, t) => `${e}(${typeof e}) is not a ${t.map((e) => `"${e}"`).join(" or ")}.`
5006
+ },
5007
+ ELEMENT_NOT_FOUND: {
5008
+ code: 1,
5009
+ message: (e) => `Element with selector "${e}" not found.`
5010
+ },
5011
+ VAL_MUST_NOT_NULL: {
5012
+ code: 2,
5013
+ message: (e, t) => `${t} should be provided. Given: ${e}`
5014
+ },
5015
+ NOT_ATTACHED_TO_FLICKING: {
5016
+ code: 3,
5017
+ message: "This module is not attached to the Flicking instance. \"init()\" should be called first."
5018
+ },
5019
+ WRONG_OPTION: {
5020
+ code: 4,
5021
+ message: (e, t) => `Option "${e}" is not in correct format, given: ${t}`
5022
+ },
5023
+ INDEX_OUT_OF_RANGE: {
5024
+ code: 5,
5025
+ message: (e, t, n) => `Index "${e}" is out of range: should be between ${t} and ${n}.`
5026
+ },
5027
+ POSITION_NOT_REACHABLE: {
5028
+ code: 6,
5029
+ message: (e) => `Position "${e}" is not reachable.`
5030
+ },
5031
+ TRANSFORM_NOT_SUPPORTED: {
5032
+ code: 7,
5033
+ message: "Browser does not support CSS transform."
5034
+ },
5035
+ STOP_CALLED_BY_USER: {
5036
+ code: 8,
5037
+ message: "Event stop() is called by user."
5038
+ },
5039
+ ANIMATION_INTERRUPTED: {
5040
+ code: 9,
5041
+ message: "Animation is interrupted by user input."
5042
+ },
5043
+ ANIMATION_ALREADY_PLAYING: {
5044
+ code: 10,
5045
+ message: "Animation is already playing."
5046
+ },
5047
+ NOT_ALLOWED_IN_FRAMEWORK: {
5048
+ code: 11,
5049
+ message: "This behavior is not allowed in the frameworks like React, Vue, or Angular."
5050
+ },
5051
+ NOT_INITIALIZED: {
5052
+ code: 12,
5053
+ message: "Flicking is not initialized yet, call init() first."
5054
+ },
5055
+ NO_ACTIVE: {
5056
+ code: 13,
5057
+ message: "There's no active panel that Flicking has selected. This may be due to the absence of any panels."
5058
+ },
5059
+ NOT_ALLOWED_IN_VIRTUAL: {
5060
+ code: 14,
5061
+ message: "This behavior is not allowed when the virtual option is enabled"
5062
+ }
5063
+ }, CODE = Object.keys(errors).reduce((e, t) => (e[t] = errors[t].code, e), {}), MESSAGE = Object.keys(errors).reduce((e, t) => (e[t] = errors[t].message, e), {}), getElement = (e, t) => {
5064
+ let n = null;
5065
+ if (isString(e)) {
5066
+ let r = (t || document).querySelector(e);
5067
+ if (!r) throw new FlickingError(MESSAGE.ELEMENT_NOT_FOUND(e), CODE.ELEMENT_NOT_FOUND);
5068
+ n = r;
5069
+ } else e && e.nodeType === Node.ELEMENT_NODE && (n = e);
5070
+ if (!n) throw new FlickingError(MESSAGE.WRONG_TYPE(e, ["HTMLElement", "string"]), CODE.WRONG_TYPE);
5071
+ return n;
5072
+ }, checkExistence = (e, t) => {
5073
+ if (e == null) throw new FlickingError(MESSAGE.VAL_MUST_NOT_NULL(e, t), CODE.VAL_MUST_NOT_NULL);
5074
+ }, clamp = (e, t, n) => Math.max(Math.min(e, n), t), getFlickingAttached = (e) => {
5075
+ if (!e) throw new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING);
5076
+ return e;
5077
+ }, toArray = (e) => [].slice.call(e), parseAlign$1 = (e, t) => {
5078
+ let n;
5079
+ if (isString(e)) switch (e) {
5080
+ case ALIGN.PREV:
5081
+ n = 0;
5082
+ break;
5083
+ case ALIGN.CENTER:
5084
+ n = .5 * t;
5085
+ break;
5086
+ case ALIGN.NEXT:
5087
+ n = t;
5088
+ break;
5089
+ default: if (n = parseArithmeticSize(e, t), n == null) throw new FlickingError(MESSAGE.WRONG_OPTION("align", e), CODE.WRONG_OPTION);
5090
+ }
5091
+ else n = e;
5092
+ return n;
5093
+ }, parseBounce = (e, t) => {
5094
+ let n;
5095
+ if (Array.isArray(e)) n = e.map((e) => parseArithmeticSize(e, t));
5096
+ else {
5097
+ let r = parseArithmeticSize(e, t);
5098
+ n = [r, r];
5099
+ }
5100
+ return n.map((t) => {
5101
+ if (t == null) throw new FlickingError(MESSAGE.WRONG_OPTION("bounce", e), CODE.WRONG_OPTION);
5102
+ return t;
5103
+ });
5104
+ }, parseArithmeticSize = (e, t) => {
5105
+ let n = parseArithmeticExpression(e);
5106
+ return n == null ? null : n.percentage * t + n.absolute;
5107
+ }, parseArithmeticExpression = (e) => {
5108
+ let t = /(?:(\+|-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;
5109
+ if (typeof e == "number") return {
5110
+ percentage: 0,
5111
+ absolute: e
5112
+ };
5113
+ let n = {
5114
+ percentage: 0,
5115
+ absolute: 0
5116
+ }, r = 0, i = t.exec(e);
5117
+ for (; i != null;) {
5118
+ let s = i[1], l = i[2], u = i[3], d = parseFloat(l);
5119
+ if (r <= 0 && (s ||= "+"), !s) return null;
5120
+ let f = s === "+" ? 1 : -1;
5121
+ u === "%" ? n.percentage += d / 100 * f : n.absolute += f * d, ++r, i = t.exec(e);
5122
+ }
5123
+ return r === 0 ? null : n;
5124
+ }, parsePanelAlign = (e) => typeof e == "object" ? e.panel : e, getDirection = (e, t) => e === t ? DIRECTION.NONE : e < t ? DIRECTION.NEXT : DIRECTION.PREV, parseElement = (e) => {
5125
+ Array.isArray(e) || (e = [e]);
5126
+ let t = [];
5127
+ return e.forEach((e) => {
5128
+ if (isString(e)) {
5129
+ let n = document.createElement("div");
5130
+ for (n.innerHTML = e, t.push(...toArray(n.children)); n.firstChild;) n.removeChild(n.firstChild);
5131
+ } else if (e && e.nodeType === Node.ELEMENT_NODE) t.push(e);
5132
+ else throw new FlickingError(MESSAGE.WRONG_TYPE(e, ["HTMLElement", "string"]), CODE.WRONG_TYPE);
5133
+ }), t;
5134
+ }, getMinusCompensatedIndex = (e, t) => clamp(e < 0 ? e + t : e, 0, t), includes = (e, t) => {
5135
+ for (let n of e) if (n === t) return !0;
5136
+ return !1;
5137
+ }, isString = (e) => typeof e == "string", circulatePosition = (e, t, n) => {
5138
+ let r = n - t;
5139
+ return e < t ? e = n - (t - e) % r : e > n && (e = t + (e - n) % r), e;
5140
+ }, find = (e, t) => {
5141
+ for (let n of e) if (t(n)) return n;
5142
+ return null;
5143
+ }, findIndex = (e, t) => {
5144
+ for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
5145
+ return -1;
5146
+ }, getProgress$1 = (e, t, n) => (e - t) / (n - t), getStyle = (e) => e ? window.getComputedStyle(e) || e.currentStyle : {}, setSize = (e, { width: t, height: n }) => {
5147
+ e && (t != null && (isString(t) ? e.style.width = t : e.style.width = `${t}px`), n != null && (isString(n) ? e.style.height = n : e.style.height = `${n}px`));
5148
+ }, isBetween = (e, t, n) => e >= t && e <= n, circulateIndex = (e, t) => e >= t ? e % t : e < 0 ? getMinusCompensatedIndex((e + 1) % t - 1, t) : e, range = (e) => {
5149
+ let t = Array(e);
5150
+ for (let n = 0; n < e; n++) t[n] = n;
5151
+ return t;
5152
+ }, getElementSize = ({ el: e, horizontal: t, useFractionalSize: n, useOffset: r, style: i }) => {
5153
+ let s = 0;
5154
+ if (n) {
5155
+ let e = parseFloat(t ? i.width : i.height) || 0, n = i.boxSizing === "border-box", l = t ? parseFloat(i.borderLeftWidth || "0") + parseFloat(i.borderRightWidth || "0") : parseFloat(i.borderTopWidth || "0") + parseFloat(i.borderBottomWidth || "0");
5156
+ if (n) s = r ? e : e - l;
5157
+ else {
5158
+ let n = t ? parseFloat(i.paddingLeft || "0") + parseFloat(i.paddingRight || "0") : parseFloat(i.paddingTop || "0") + parseFloat(i.paddingBottom || "0");
5159
+ s = r ? e + n + l : e + n;
5160
+ }
5161
+ } else {
5162
+ let n = t ? "Width" : "Height";
5163
+ s = r ? e[`offset${n}`] : e[`client${n}`];
5164
+ }
5165
+ return Math.max(s, 0);
5166
+ }, setPrototypeOf = Object.setPrototypeOf || ((e, t) => (e.__proto__ = t, e)), FlickingError = class e extends Error {
5167
+ constructor(t, n) {
5168
+ super(t), setPrototypeOf(this, e.prototype), this.name = "FlickingError", this.code = n;
5169
+ }
5170
+ }, EVENTS = {
5171
+ READY: "ready",
5172
+ BEFORE_RESIZE: "beforeResize",
5173
+ AFTER_RESIZE: "afterResize",
5174
+ HOLD_START: "holdStart",
5175
+ HOLD_END: "holdEnd",
5176
+ MOVE_START: "moveStart",
5177
+ MOVE: "move",
5178
+ MOVE_END: "moveEnd",
5179
+ WILL_CHANGE: "willChange",
5180
+ CHANGED: "changed",
5181
+ WILL_RESTORE: "willRestore",
5182
+ RESTORED: "restored",
5183
+ SELECT: "select",
5184
+ NEED_PANEL: "needPanel",
5185
+ VISIBLE_CHANGE: "visibleChange",
5186
+ REACH_EDGE: "reachEdge",
5187
+ PANEL_CHANGE: "panelChange"
5188
+ }, CameraMode = class {
5189
+ constructor(e) {
5190
+ this._flicking = e;
5191
+ }
5192
+ getAnchors() {
5193
+ return this._flicking.renderer.panels.map((e, t) => new AnchorPoint({
5194
+ index: t,
5195
+ position: e.position,
5196
+ panel: e
5197
+ }));
5198
+ }
5199
+ findAnchorIncludePosition(e) {
5200
+ return this._flicking.camera.anchorPoints.filter((t) => t.panel.includePosition(e, !0)).reduce((t, n) => t && Math.abs(t.position - e) < Math.abs(n.position - e) ? t : n, null);
5201
+ }
5202
+ findNearestAnchor(e) {
5203
+ let t = this._flicking.camera.anchorPoints;
5204
+ if (t.length <= 0) return null;
5205
+ let n = Infinity;
5206
+ for (let r = 0; r < t.length; r++) {
5207
+ let i = t[r], s = Math.abs(i.position - e);
5208
+ if (s > n) return t[r - 1];
5209
+ n = s;
5210
+ }
5211
+ return t[t.length - 1];
5212
+ }
5213
+ clampToReachablePosition(e) {
5214
+ let t = this._flicking.camera.range;
5215
+ return clamp(e, t.min, t.max);
5216
+ }
5217
+ getCircularOffset() {
5218
+ return 0;
5219
+ }
5220
+ canReach(e) {
5221
+ let t = this._flicking.camera.range;
5222
+ if (e.removed) return !1;
5223
+ let n = e.position;
5224
+ return n >= t.min && n <= t.max;
5225
+ }
5226
+ canSee(e) {
5227
+ let t = this._flicking.camera.visibleRange;
5228
+ return e.isVisibleOnRange(t.min, t.max);
5229
+ }
5230
+ }, BoundCameraMode = class extends CameraMode {
5231
+ checkAvailability() {
5232
+ let e = this._flicking, t = e.renderer, n = t.getPanel(0), r = t.getPanel(t.panelCount - 1);
5233
+ if (!n || !r) return !1;
5234
+ let i = e.camera.size, s = n.range.min;
5235
+ return i < r.range.max - s;
5236
+ }
5237
+ getRange() {
5238
+ let e = this._flicking, t = e.renderer, n = e.camera.alignPosition, r = t.getPanel(0), i = t.getPanel(t.panelCount - 1);
5239
+ if (!r || !i) return {
5240
+ min: 0,
5241
+ max: 0
5242
+ };
5243
+ let s = e.camera.size, l = r.range.min, u = i.range.max, d = s < u - l, f = l + n, p = u - s + n;
5244
+ if (d) return {
5245
+ min: f,
5246
+ max: p
5247
+ };
5248
+ {
5249
+ let t = e.camera.align, n = f + parseAlign$1(typeof t == "object" ? t.camera : t, p - f);
5250
+ return {
5251
+ min: n,
5252
+ max: n
5253
+ };
5254
+ }
5255
+ }
5256
+ getAnchors() {
5257
+ let e = this._flicking, t = e.camera, n = e.renderer.panels;
5258
+ if (n.length <= 0) return [];
5259
+ let r = e.camera.range, i = n.filter((e) => t.canReach(e));
5260
+ if (i.length > 0) {
5261
+ let e = i[0].position !== r.min, t = i[i.length - 1].position !== r.max, s = +!!e, l = i.map((e, t) => new AnchorPoint({
5262
+ index: t + s,
5263
+ position: e.position,
5264
+ panel: e
5265
+ }));
5266
+ return e && l.splice(0, 0, new AnchorPoint({
5267
+ index: 0,
5268
+ position: r.min,
5269
+ panel: n[i[0].index - 1]
5270
+ })), t && l.push(new AnchorPoint({
5271
+ index: l.length,
5272
+ position: r.max,
5273
+ panel: n[i[i.length - 1].index + 1]
5274
+ })), l;
5275
+ } else if (r.min !== r.max) {
5276
+ let e = this._findNearestPanel(r.min, n), t = e.index === n.length - 1 ? e.prev() : e, i = t.next();
5277
+ return [new AnchorPoint({
5278
+ index: 0,
5279
+ position: r.min,
5280
+ panel: t
5281
+ }), new AnchorPoint({
5282
+ index: 1,
5283
+ position: r.max,
5284
+ panel: i
5285
+ })];
5286
+ } else return [new AnchorPoint({
5287
+ index: 0,
5288
+ position: r.min,
5289
+ panel: this._findNearestPanel(r.min, n)
5290
+ })];
5291
+ }
5292
+ findAnchorIncludePosition(e) {
5293
+ let t = this._flicking.camera, n = t.range, r = t.anchorPoints;
5294
+ return r.length <= 0 ? null : e <= n.min ? r[0] : e >= n.max ? r[r.length - 1] : super.findAnchorIncludePosition(e);
5295
+ }
5296
+ _findNearestPanel(e, t) {
5297
+ let n = Infinity;
5298
+ for (let r = 0; r < t.length; r++) {
5299
+ let i = t[r], s = Math.abs(i.position - e);
5300
+ if (s > n) return t[r - 1];
5301
+ n = s;
5302
+ }
5303
+ return t[t.length - 1];
5304
+ }
5305
+ }, CircularCameraMode = class extends CameraMode {
5306
+ checkAvailability() {
5307
+ let e = this._flicking, t = e.renderer.panels;
5308
+ if (t.length <= 0) return !1;
5309
+ let n = t[0], r = t[t.length - 1], i = n.range.min - n.margin.prev, s = r.range.max + r.margin.next, l = e.camera.size, u = s - i;
5310
+ return t.every((e) => u - e.size >= l);
5311
+ }
5312
+ getRange() {
5313
+ let e = this._flicking.renderer.panels;
5314
+ if (e.length <= 0) return {
5315
+ min: 0,
5316
+ max: 0
5317
+ };
5318
+ let t = e[0], n = e[e.length - 1];
5319
+ return {
5320
+ min: t.range.min - t.margin.prev,
5321
+ max: n.range.max + n.margin.next
5322
+ };
5323
+ }
5324
+ getAnchors() {
5325
+ return this._flicking.renderer.panels.map((e, t) => new AnchorPoint({
5326
+ index: t,
5327
+ position: e.position,
5328
+ panel: e
5329
+ }));
5330
+ }
5331
+ findNearestAnchor(e) {
5332
+ let t = this._flicking.camera, n = t.anchorPoints;
5333
+ if (n.length <= 0) return null;
5334
+ let r = t.range, i = Infinity, s = -1;
5335
+ for (let t = 0; t < n.length; t++) {
5336
+ let l = n[t], u = Math.min(Math.abs(l.position - e), Math.abs(l.position - r.min + r.max - e), Math.abs(e - r.min + r.max - l.position));
5337
+ u < i && (i = u, s = t);
5338
+ }
5339
+ return n[s];
5340
+ }
5341
+ findAnchorIncludePosition(e) {
5342
+ let t = this._flicking.camera, n = t.range, r = t.anchorPoints, i = t.rangeDiff, s = r.length, l = circulatePosition(e, n.min, n.max), u = super.findAnchorIncludePosition(l);
5343
+ if (s > 0 && (e === n.min || e === n.max) && (u = [
5344
+ u,
5345
+ new AnchorPoint({
5346
+ index: 0,
5347
+ position: r[0].position + i,
5348
+ panel: r[0].panel
5349
+ }),
5350
+ new AnchorPoint({
5351
+ index: s - 1,
5352
+ position: r[s - 1].position - i,
5353
+ panel: r[s - 1].panel
5354
+ })
5355
+ ].filter((e) => !!e).reduce((t, n) => t && Math.abs(t.position - e) < Math.abs(n.position - e) ? t : n, null)), !u) return null;
5356
+ if (e < n.min) {
5357
+ let t = -Math.floor((n.min - e) / i) - 1;
5358
+ return new AnchorPoint({
5359
+ index: u.index,
5360
+ position: u.position + i * t,
5361
+ panel: u.panel
5362
+ });
5363
+ } else if (e > n.max) {
5364
+ let t = Math.floor((e - n.max) / i) + 1;
5365
+ return new AnchorPoint({
5366
+ index: u.index,
5367
+ position: u.position + i * t,
5368
+ panel: u.panel
5369
+ });
5370
+ }
5371
+ return u;
5372
+ }
5373
+ getCircularOffset() {
5374
+ let e = this._flicking;
5375
+ if (!e.camera.circularEnabled) return 0;
5376
+ let t = e.panels.filter((e) => e.toggled), n = t.filter((e) => e.toggleDirection === DIRECTION.PREV), r = t.filter((e) => e.toggleDirection === DIRECTION.NEXT);
5377
+ return this._calcPanelAreaSum(n) - this._calcPanelAreaSum(r);
5378
+ }
5379
+ clampToReachablePosition(e) {
5380
+ return e;
5381
+ }
5382
+ canReach(e) {
5383
+ return !e.removed;
5384
+ }
5385
+ canSee(e) {
5386
+ let t = this._flicking.camera, n = t.range, r = t.rangeDiff, i = t.visibleRange, s = super.canSee(e);
5387
+ return i.min < n.min ? s || e.isVisibleOnRange(i.min + r, i.max + r) : i.max > n.max ? s || e.isVisibleOnRange(i.min - r, i.max - r) : s;
5388
+ }
5389
+ _calcPanelAreaSum(e) {
5390
+ return e.reduce((e, t) => e + t.sizeIncludingMargin, 0);
5391
+ }
5392
+ }, LinearCameraMode = class extends CameraMode {
5393
+ checkAvailability() {
5394
+ return !0;
5395
+ }
5396
+ getRange() {
5397
+ var e, t;
5398
+ let n = this._flicking.renderer, r = n.getPanel(0), i = n.getPanel(n.panelCount - 1);
5399
+ return {
5400
+ min: r?.position ?? 0,
5401
+ max: i?.position ?? 0
5402
+ };
5403
+ }
5404
+ }, Camera = class {
5405
+ constructor(e, { align: t = ALIGN.CENTER } = {}) {
5406
+ this._lookedOffset = 0, this._checkTranslateSupport = () => {
5407
+ let e = [
5408
+ "webkitTransform",
5409
+ "msTransform",
5410
+ "MozTransform",
5411
+ "OTransform",
5412
+ "transform"
5413
+ ], t = document.documentElement.style, n = "";
5414
+ for (let r of e) r in t && (n = r);
5415
+ if (!n) throw new FlickingError(MESSAGE.TRANSFORM_NOT_SUPPORTED, CODE.TRANSFORM_NOT_SUPPORTED);
5416
+ this._transform = n;
5417
+ }, this._flicking = e, this._resetInternalValues(), this._align = t;
5418
+ }
5419
+ get element() {
5420
+ return this._el;
5421
+ }
5422
+ get children() {
5423
+ return toArray(this._el.children);
5424
+ }
5425
+ get position() {
5426
+ return this._position;
5427
+ }
5428
+ get alignPosition() {
5429
+ return this._alignPos;
5430
+ }
5431
+ get offset() {
5432
+ return this._offset - this._circularOffset;
5433
+ }
5434
+ get circularEnabled() {
5435
+ return this._circularEnabled;
5436
+ }
5437
+ get mode() {
5438
+ return this._mode;
5439
+ }
5440
+ get range() {
5441
+ return this._range;
5442
+ }
5443
+ get rangeDiff() {
5444
+ return this._range.max - this._range.min;
5445
+ }
5446
+ get visiblePanels() {
5447
+ return this._visiblePanels;
5448
+ }
5449
+ get visibleRange() {
5450
+ return {
5451
+ min: this._position - this._alignPos,
5452
+ max: this._position - this._alignPos + this.size
5453
+ };
5454
+ }
5455
+ get anchorPoints() {
5456
+ return this._anchors;
5457
+ }
5458
+ get controlParams() {
5459
+ return {
5460
+ range: this._range,
5461
+ position: this._position,
5462
+ circular: this._circularEnabled
5463
+ };
5464
+ }
5465
+ get atEdge() {
5466
+ return this._position <= this._range.min || this._position >= this._range.max;
5467
+ }
5468
+ get size() {
5469
+ let e = this._flicking;
5470
+ return e ? e.horizontal ? e.viewport.width : e.viewport.height : 0;
5471
+ }
5472
+ get progress() {
5473
+ let e = this._flicking, t = this._position + this._offset, n = this.findNearestAnchor(this._position);
5474
+ if (!e || !n) return NaN;
5475
+ let r = n.panel, i = r.position + r.offset, s = e.control.controller.bounce, { min: l, max: u } = this.range, d = this.rangeDiff;
5476
+ if (t === i) return r.index;
5477
+ if (t < i) {
5478
+ let e = r.prev(), n = e ? e.position + e.offset : l - s[0];
5479
+ return n > i && (n -= d), r.index - 1 + getProgress$1(t, n, i);
5480
+ } else {
5481
+ let e = r.next(), n = e ? e.position + e.offset : u + s[1];
5482
+ return n < i && (n += d), r.index + getProgress$1(t, i, n);
5483
+ }
5484
+ }
5485
+ get panelOrder() {
5486
+ return this._panelOrder;
5487
+ }
5488
+ get align() {
5489
+ return this._align;
5490
+ }
5491
+ set align(e) {
5492
+ this._align = e;
5493
+ }
5494
+ init() {
5495
+ let e = this._flicking.viewport.element;
5496
+ return checkExistence(e.firstElementChild, "First element child of the viewport element"), this._el = e.firstElementChild, this._checkTranslateSupport(), this._updateMode(), this.updatePanelOrder(), this;
5497
+ }
5498
+ destroy() {
5499
+ return this._resetInternalValues(), this;
5500
+ }
5501
+ lookAt(e) {
5502
+ let t = this._offset, n = this._lookedOffset !== t, r = getFlickingAttached(this._flicking), i = this._position;
5503
+ this._position = e;
5504
+ let s = this._togglePanels(i, e);
5505
+ this._refreshVisiblePanels(), this._checkNeedPanel(), this._checkReachEnd(i, e), s ? r.renderer.render().then(() => {
5506
+ this.updateOffset(), this._lookedOffset = this._offset;
5507
+ }) : n ? (this.updateOffset(), this._lookedOffset = this._offset) : this.applyTransform();
5508
+ }
5509
+ getPrevAnchor(e) {
5510
+ if (!this._circularEnabled || e.index !== 0) return this._anchors[e.index - 1] || null;
5511
+ {
5512
+ let e = this._anchors, t = this.rangeDiff, n = e[e.length - 1];
5513
+ return new AnchorPoint({
5514
+ index: n.index,
5515
+ position: n.position - t,
5516
+ panel: n.panel
5517
+ });
5518
+ }
5519
+ }
5520
+ getNextAnchor(e) {
5521
+ let t = this._anchors;
5522
+ if (!this._circularEnabled || e.index !== t.length - 1) return t[e.index + 1] || null;
5523
+ {
5524
+ let e = this.rangeDiff, n = t[0];
5525
+ return new AnchorPoint({
5526
+ index: n.index,
5527
+ position: n.position + e,
5528
+ panel: n.panel
5529
+ });
5530
+ }
5531
+ }
5532
+ getProgressInPanel(e) {
5533
+ let t = e.range;
5534
+ return (this._position - t.min) / (t.max - t.min);
5535
+ }
5536
+ findAnchorIncludePosition(e) {
5537
+ return this._mode.findAnchorIncludePosition(e);
5538
+ }
5539
+ findNearestAnchor(e) {
5540
+ return this._mode.findNearestAnchor(e);
5541
+ }
5542
+ findActiveAnchor() {
5543
+ var e;
5544
+ let t = getFlickingAttached(this._flicking).control.activePanel;
5545
+ return t ? find(this._anchors, (e) => e.panel.index === t.index) ?? this.findNearestAnchor(t.position) : null;
5546
+ }
5547
+ clampToReachablePosition(e) {
5548
+ return this._mode.clampToReachablePosition(e);
5549
+ }
5550
+ canReach(e) {
5551
+ return this._mode.canReach(e);
5552
+ }
5553
+ canSee(e) {
5554
+ return this._mode.canSee(e);
5555
+ }
5556
+ updateRange() {
5557
+ let e = getFlickingAttached(this._flicking).renderer.panels;
5558
+ return this._updateMode(), this._range = this._mode.getRange(), e.forEach((e) => e.updateCircularToggleDirection()), this;
5559
+ }
5560
+ updateAlignPos() {
5561
+ let e = this._align, t = typeof e == "object" ? e.camera : e;
5562
+ return this._alignPos = parseAlign$1(t, this.size), this;
5563
+ }
5564
+ updateAnchors() {
5565
+ return this._anchors = this._mode.getAnchors(), this;
5566
+ }
5567
+ updateAdaptiveHeight() {
5568
+ let e = getFlickingAttached(this._flicking), t = e.control.activePanel, n = [...e.visiblePanels];
5569
+ if (t && n.push(t), !e.horizontal || !e.adaptive || !n.length) return;
5570
+ let r = Math.max(...n.map((e) => e.height));
5571
+ e.viewport.setSize({ height: r });
5572
+ }
5573
+ updateOffset() {
5574
+ let e = getFlickingAttached(this._flicking), t = this._position, n = e.panels.filter((e) => !e.rendered);
5575
+ return this._offset = n.filter((e) => e.position + e.offset < t).reduce((e, t) => e + t.sizeIncludingMargin, 0), this._circularOffset = this._mode.getCircularOffset(), this.applyTransform(), this;
5576
+ }
5577
+ updatePanelOrder() {
5578
+ let e = getFlickingAttached(this._flicking);
5579
+ if (!e.horizontal) return this;
5580
+ let t = this._el, n = getStyle(t).direction;
5581
+ return n !== this._panelOrder && (this._panelOrder = n === ORDER.RTL ? ORDER.RTL : ORDER.LTR, e.initialized && e.control.controller.updateDirection()), this;
5582
+ }
5583
+ resetNeedPanelHistory() {
5584
+ return this._needPanelTriggered = {
5585
+ prev: !1,
5586
+ next: !1
5587
+ }, this;
5588
+ }
5589
+ applyTransform() {
5590
+ let e = this._el, t = getFlickingAttached(this._flicking);
5591
+ if (t.renderer.rendering || !t.initialized) return this;
5592
+ let n = this._position - this._alignPos - this._offset + this._circularOffset;
5593
+ return e.style[this._transform] = t.horizontal ? `translate(${this._panelOrder === ORDER.RTL ? n : -n}px)` : `translate(0, ${-n}px)`, this;
5594
+ }
5595
+ _resetInternalValues() {
5596
+ this._position = 0, this._lookedOffset = 0, this._alignPos = 0, this._offset = 0, this._circularOffset = 0, this._circularEnabled = !1, this._range = {
5597
+ min: 0,
5598
+ max: 0
5599
+ }, this._visiblePanels = [], this._anchors = [], this._needPanelTriggered = {
5600
+ prev: !1,
5601
+ next: !1
5602
+ };
5603
+ }
5604
+ _refreshVisiblePanels() {
5605
+ let e = getFlickingAttached(this._flicking), t = e.renderer.panels.filter((e) => this.canSee(e)), n = this._visiblePanels;
5606
+ this._visiblePanels = t;
5607
+ let r = t.filter((e) => !includes(n, e)), i = n.filter((e) => !includes(t, e));
5608
+ (r.length > 0 || i.length > 0) && e.renderer.render().then(() => {
5609
+ e.trigger(new ComponentEvent$1(EVENTS.VISIBLE_CHANGE, {
5610
+ added: r,
5611
+ removed: i,
5612
+ visiblePanels: t
5613
+ }));
5614
+ });
5615
+ }
5616
+ _checkNeedPanel() {
5617
+ let e = this._needPanelTriggered;
5618
+ if (e.prev && e.next) return;
5619
+ let t = getFlickingAttached(this._flicking), n = t.renderer.panels;
5620
+ if (n.length <= 0) {
5621
+ e.prev ||= (t.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV })), !0), e.next ||= (t.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT })), !0);
5622
+ return;
5623
+ }
5624
+ let r = this._position, i = this.size, s = this._range, l = t.needPanelThreshold, u = r - this._alignPos, d = u + i, f = n[0], p = n[n.length - 1];
5625
+ e.prev || (u <= f.range.min + l || r <= s.min + l) && (t.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV })), e.prev = !0), e.next || (d >= p.range.max - l || r >= s.max - l) && (t.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT })), e.next = !0);
5626
+ }
5627
+ _checkReachEnd(e, t) {
5628
+ let n = getFlickingAttached(this._flicking), r = this._range, i = e > r.min && e < r.max, s = t > r.min && t < r.max;
5629
+ if (!i || s) return;
5630
+ let l = t <= r.min ? DIRECTION.PREV : DIRECTION.NEXT;
5631
+ n.trigger(new ComponentEvent$1(EVENTS.REACH_EDGE, { direction: l }));
5632
+ }
5633
+ _updateMode() {
5634
+ let e = getFlickingAttached(this._flicking);
5635
+ if (e.circular) {
5636
+ let t = new CircularCameraMode(e), n = t.checkAvailability();
5637
+ if (n) this._mode = t;
5638
+ else {
5639
+ let t = e.circularFallback;
5640
+ this._mode = t === CIRCULAR_FALLBACK.BOUND ? new BoundCameraMode(e) : new LinearCameraMode(e);
5641
+ }
5642
+ this._circularEnabled = n;
5643
+ } else this._mode = e.bound ? new BoundCameraMode(e) : new LinearCameraMode(e), this._circularEnabled = !1;
5644
+ }
5645
+ _togglePanels(e, t) {
5646
+ return t !== e && getFlickingAttached(this._flicking).renderer.panels.map((n) => n.toggle(e, t)).some((e) => e);
5647
+ }
5648
+ }, EVENT = {
5649
+ HOLD: "hold",
5650
+ CHANGE: "change",
5651
+ RELEASE: "release",
5652
+ ANIMATION_END: "animationEnd",
5653
+ FINISH: "finish"
5654
+ }, POSITION_KEY = "flick", STATE_TYPE = /* @__PURE__ */ ((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", e))(STATE_TYPE || {}), State = class {
5655
+ constructor() {
5656
+ this._delta = 0, this._targetPanel = null;
5657
+ }
5658
+ get delta() {
5659
+ return this._delta;
5660
+ }
5661
+ get targetPanel() {
5662
+ return this._targetPanel;
5663
+ }
5664
+ set targetPanel(e) {
5665
+ this._targetPanel = e;
5666
+ }
5667
+ onEnter(e) {
5668
+ this._delta = e._delta, this._targetPanel = e._targetPanel;
5669
+ }
5670
+ onHold(e) {}
5671
+ onChange(e) {}
5672
+ onRelease(e) {}
5673
+ onAnimationEnd(e) {}
5674
+ onFinish(e) {}
5675
+ _moveToChangedPosition(e) {
5676
+ let { flicking: t, axesEvent: n, transitTo: r } = e, i = n.delta[POSITION_KEY];
5677
+ if (!i) return;
5678
+ this._delta += i;
5679
+ let s = t.camera, l = s.position, u = n.pos[POSITION_KEY], d = t.circularEnabled ? circulatePosition(u, s.range.min, s.range.max) : u;
5680
+ s.lookAt(d);
5681
+ let f = new ComponentEvent$1(EVENTS.MOVE, {
5682
+ isTrusted: n.isTrusted,
5683
+ holding: this.holding,
5684
+ direction: getDirection(0, n.delta[POSITION_KEY]),
5685
+ axesEvent: n
5686
+ });
5687
+ t.trigger(f), f.isCanceled() && (s.lookAt(l), r(4));
5688
+ }
5689
+ }, AnimatingState = class extends State {
5690
+ constructor() {
5691
+ super(...arguments), this.holding = !1, this.animating = !0;
5692
+ }
5693
+ onHold(e) {
5694
+ let { flicking: t, axesEvent: n, transitTo: r } = e, i = this._targetPanel, s = t.control;
5695
+ this._delta = 0, t.control.updateInput(), t.changeOnHold && i && s.setActive(i, s.activePanel, n.isTrusted);
5696
+ let l = new ComponentEvent$1(EVENTS.HOLD_START, { axesEvent: n });
5697
+ t.trigger(l), l.isCanceled() ? r(STATE_TYPE.DISABLED) : r(STATE_TYPE.DRAGGING);
5698
+ }
5699
+ onChange(e) {
5700
+ this._moveToChangedPosition(e);
5701
+ }
5702
+ onFinish(e) {
5703
+ let { flicking: t, axesEvent: n, transitTo: r } = e, i = t.control, s = i.controller.animatingContext;
5704
+ r(STATE_TYPE.IDLE), t.trigger(new ComponentEvent$1(EVENTS.MOVE_END, {
5705
+ isTrusted: n.isTrusted,
5706
+ direction: getDirection(s.start, s.end),
5707
+ axesEvent: n
5708
+ }));
5709
+ let l = this._targetPanel;
5710
+ l && i.setActive(l, i.activePanel, n.isTrusted);
5711
+ }
5712
+ }, DisabledState = class extends State {
5713
+ constructor() {
5714
+ super(...arguments), this.holding = !1, this.animating = !0;
5715
+ }
5716
+ onAnimationEnd(e) {
5717
+ let { transitTo: t } = e;
5718
+ t(STATE_TYPE.IDLE);
5719
+ }
5720
+ onChange(e) {
5721
+ let { axesEvent: t, transitTo: n } = e;
5722
+ t.stop(), n(STATE_TYPE.IDLE);
5723
+ }
5724
+ onRelease(e) {
5725
+ let { axesEvent: t, transitTo: n } = e;
5726
+ t.delta.flick === 0 && n(STATE_TYPE.IDLE);
5727
+ }
5728
+ }, DraggingState = class extends State {
5729
+ constructor() {
5730
+ super(...arguments), this.holding = !0, this.animating = !0;
5731
+ }
5732
+ onChange(e) {
5733
+ this._moveToChangedPosition(e);
5734
+ }
5735
+ onRelease(e) {
5736
+ let { flicking: t, axesEvent: n, transitTo: r } = e;
5737
+ if (t.trigger(new ComponentEvent$1(EVENTS.HOLD_END, { axesEvent: n })), t.renderer.panelCount <= 0) {
5738
+ r(STATE_TYPE.IDLE);
5739
+ return;
5740
+ }
5741
+ r(STATE_TYPE.ANIMATING);
5742
+ let i = t.control, s = n.destPos[POSITION_KEY], l = Math.max(n.duration, t.duration);
5743
+ try {
5744
+ i.moveToPosition(s, l, n);
5745
+ } catch {
5746
+ r(STATE_TYPE.IDLE), n.setTo({ [POSITION_KEY]: t.camera.position }, 0);
5747
+ }
5748
+ }
5749
+ }, HoldingState = class extends State {
5750
+ constructor() {
5751
+ super(...arguments), this.holding = !0, this.animating = !1, this._releaseEvent = null;
5752
+ }
5753
+ onChange(e) {
5754
+ let { flicking: t, axesEvent: n, transitTo: r } = e, i = n.inputEvent;
5755
+ if (!i) return;
5756
+ let s = t.horizontal ? i.offsetX : i.offsetY, l = new ComponentEvent$1(EVENTS.MOVE_START, {
5757
+ isTrusted: n.isTrusted,
5758
+ holding: this.holding,
5759
+ direction: getDirection(0, -s),
5760
+ axesEvent: n
5761
+ });
5762
+ t.trigger(l), l.isCanceled() ? r(STATE_TYPE.DISABLED) : r(STATE_TYPE.DRAGGING).onChange(e);
5763
+ }
5764
+ onRelease(e) {
5765
+ let { flicking: t, axesEvent: n, transitTo: r } = e;
5766
+ if (t.trigger(new ComponentEvent$1(EVENTS.HOLD_END, { axesEvent: n })), n.delta.flick !== 0) {
5767
+ n.setTo({ flick: t.camera.position }, 0), r(STATE_TYPE.IDLE);
5768
+ return;
5769
+ }
5770
+ this._releaseEvent = n;
5771
+ }
5772
+ onFinish(e) {
5773
+ let { flicking: t, transitTo: n } = e;
5774
+ if (n(STATE_TYPE.IDLE), !this._releaseEvent) return;
5775
+ let r = this._releaseEvent.inputEvent.srcEvent, i;
5776
+ if (r.type === "touchend") {
5777
+ let e = r.changedTouches[0];
5778
+ i = document.elementFromPoint(e.clientX, e.clientY);
5779
+ } else i = r.target;
5780
+ let s = t.renderer.panels, l = null;
5781
+ for (let e of s) if (e.contains(i)) {
5782
+ l = e;
5783
+ break;
5784
+ }
5785
+ if (l) {
5786
+ let e = t.camera.position, n = l.position;
5787
+ t.trigger(new ComponentEvent$1(EVENTS.SELECT, {
5788
+ index: l.index,
5789
+ panel: l,
5790
+ direction: getDirection(e, n)
5791
+ }));
5792
+ }
5793
+ }
5794
+ }, IdleState = class extends State {
5795
+ constructor() {
5796
+ super(...arguments), this.holding = !1, this.animating = !1;
5797
+ }
5798
+ onEnter() {
5799
+ this._delta = 0, this._targetPanel = null;
5800
+ }
5801
+ onHold(e) {
5802
+ let { flicking: t, axesEvent: n, transitTo: r } = e;
5803
+ if (t.renderer.panelCount <= 0) {
5804
+ r(STATE_TYPE.DISABLED);
5805
+ return;
5806
+ }
5807
+ let i = new ComponentEvent$1(EVENTS.HOLD_START, { axesEvent: n });
5808
+ t.trigger(i), i.isCanceled() ? r(STATE_TYPE.DISABLED) : r(STATE_TYPE.HOLDING);
5809
+ }
5810
+ onChange(e) {
5811
+ let { flicking: t, axesEvent: n, transitTo: r } = e, i = t.control.controller.animatingContext, s = new ComponentEvent$1(EVENTS.MOVE_START, {
5812
+ isTrusted: n.isTrusted,
5813
+ holding: this.holding,
5814
+ direction: getDirection(i.start, i.end),
5815
+ axesEvent: n
5816
+ });
5817
+ t.trigger(s), s.isCanceled() ? r(STATE_TYPE.DISABLED) : r(STATE_TYPE.ANIMATING).onChange(e);
5818
+ }
5819
+ }, StateMachine = class {
5820
+ constructor() {
5821
+ this.transitTo = (e) => {
5822
+ let t;
5823
+ switch (e) {
5824
+ case STATE_TYPE.IDLE:
5825
+ t = new IdleState();
5826
+ break;
5827
+ case STATE_TYPE.HOLDING:
5828
+ t = new HoldingState();
5829
+ break;
5830
+ case STATE_TYPE.DRAGGING:
5831
+ t = new DraggingState();
5832
+ break;
5833
+ case STATE_TYPE.ANIMATING:
5834
+ t = new AnimatingState();
5835
+ break;
5836
+ case STATE_TYPE.DISABLED:
5837
+ t = new DisabledState();
5838
+ break;
5839
+ }
5840
+ return t.onEnter(this._state), this._state = t, this._state;
5841
+ }, this._state = new IdleState();
5842
+ }
5843
+ get state() {
5844
+ return this._state;
5845
+ }
5846
+ fire(e, t) {
5847
+ let n = this._state, r = __spreadProps$1(__spreadValues$1({}, t), { transitTo: this.transitTo });
5848
+ switch (e) {
5849
+ case EVENT.HOLD:
5850
+ n.onHold(r);
5851
+ break;
5852
+ case EVENT.CHANGE:
5853
+ n.onChange(r);
5854
+ break;
5855
+ case EVENT.RELEASE:
5856
+ n.onRelease(r);
5857
+ break;
5858
+ case EVENT.ANIMATION_END:
5859
+ n.onAnimationEnd(r);
5860
+ break;
5861
+ case EVENT.FINISH:
5862
+ n.onFinish(r);
5863
+ break;
5864
+ }
5865
+ }
5866
+ }, AxesController = class {
5867
+ constructor() {
5868
+ this._onAxesHold = () => {
5869
+ this._dragged = !1;
5870
+ }, this._onAxesChange = () => {
5871
+ var e;
5872
+ this._dragged = !!this._panInput?.isEnabled();
5873
+ }, this._preventClickWhenDragged = (e) => {
5874
+ this._dragged && (e.preventDefault(), e.stopPropagation()), this._dragged = !1;
5875
+ }, this._resetInternalValues(), this._stateMachine = new StateMachine();
5876
+ }
5877
+ get axes() {
5878
+ return this._axes;
5879
+ }
5880
+ get panInput() {
5881
+ return this._panInput;
5882
+ }
5883
+ get stateMachine() {
5884
+ return this._stateMachine;
5885
+ }
5886
+ get state() {
5887
+ return this._stateMachine.state;
5888
+ }
5889
+ get animatingContext() {
5890
+ return this._animatingContext;
5891
+ }
5892
+ get controlParams() {
5893
+ let e = this._axes;
5894
+ if (!e) return {
5895
+ range: {
5896
+ min: 0,
5897
+ max: 0
5898
+ },
5899
+ position: 0,
5900
+ circular: !1
5901
+ };
5902
+ let t = e.axis[POSITION_KEY];
5903
+ return {
5904
+ range: {
5905
+ min: t.range[0],
5906
+ max: t.range[1]
5907
+ },
5908
+ circular: t.circular[0],
5909
+ position: this.position
5910
+ };
5911
+ }
5912
+ get enabled() {
5913
+ var e, t;
5914
+ return this._panInput?.isEnabled() ?? !1;
5915
+ }
5916
+ get position() {
5917
+ var e, t;
5918
+ return this._axes?.get([POSITION_KEY])[POSITION_KEY] ?? 0;
5919
+ }
5920
+ get range() {
5921
+ var e, t;
5922
+ return this._axes?.axis[POSITION_KEY].range ?? [0, 0];
5923
+ }
5924
+ get bounce() {
5925
+ var e;
5926
+ return this._axes?.axis[POSITION_KEY].bounce;
5927
+ }
5928
+ init(e) {
5929
+ this._flicking = e, this._axes = new Axes({ [POSITION_KEY]: {
5930
+ range: [0, 0],
5931
+ circular: !1,
5932
+ bounce: [0, 0]
5933
+ } }, {
5934
+ deceleration: e.deceleration,
5935
+ interruptable: e.interruptable,
5936
+ nested: e.nested,
5937
+ easing: e.easing
5938
+ }), this._panInput = new PanInput(e.viewport.element, {
5939
+ inputType: e.inputType,
5940
+ threshold: e.dragThreshold,
5941
+ iOSEdgeSwipeThreshold: e.iOSEdgeSwipeThreshold,
5942
+ preventDefaultOnDrag: e.preventDefaultOnDrag,
5943
+ scale: e.horizontal ? [e.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],
5944
+ releaseOnScroll: !0
5945
+ });
5946
+ let t = this._axes;
5947
+ t.connect(e.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], this._panInput);
5948
+ for (let n in EVENT) {
5949
+ let r = EVENT[n];
5950
+ t.on(r, (t) => {
5951
+ this._stateMachine.fire(r, {
5952
+ flicking: e,
5953
+ axesEvent: t
5954
+ });
5955
+ });
5956
+ }
5957
+ return this;
5958
+ }
5959
+ destroy() {
5960
+ var e;
5961
+ this._axes && (this.removePreventClickHandler(), this._axes.destroy()), (e = this._panInput) == null || e.destroy(), this._resetInternalValues();
5962
+ }
5963
+ enable() {
5964
+ var e;
5965
+ return (e = this._panInput) == null || e.enable(), this;
5966
+ }
5967
+ disable() {
5968
+ var e;
5969
+ return (e = this._panInput) == null || e.disable(), this;
5970
+ }
5971
+ release() {
5972
+ var e;
5973
+ return (e = this._panInput) == null || e.release(), this;
5974
+ }
5975
+ updateAnimation(e, t) {
5976
+ var n;
5977
+ return this._animatingContext = __spreadProps$1(__spreadValues$1({}, this._animatingContext), { end: e }), (n = this._axes) == null || n.updateAnimation({
5978
+ destPos: { [POSITION_KEY]: e },
5979
+ duration: t
5980
+ }), this;
5981
+ }
5982
+ stopAnimation() {
5983
+ var e;
5984
+ return (e = this._axes) == null || e.stopAnimation(), this;
5985
+ }
5986
+ update(e) {
5987
+ let t = getFlickingAttached(this._flicking), n = t.camera, r = this._axes, i = r.axis[POSITION_KEY];
5988
+ return i.circular = [e.circular, e.circular], i.range = [e.range.min, e.range.max], i.bounce = parseBounce(t.bounce, n.size), r.axisManager.set({ [POSITION_KEY]: e.position }), this;
5989
+ }
5990
+ addPreventClickHandler() {
5991
+ let e = getFlickingAttached(this._flicking), t = this._axes, n = e.camera.element;
5992
+ return t.on(EVENT.HOLD, this._onAxesHold), t.on(EVENT.CHANGE, this._onAxesChange), n.addEventListener("click", this._preventClickWhenDragged, !0), this;
5993
+ }
5994
+ removePreventClickHandler() {
5995
+ let e = getFlickingAttached(this._flicking), t = this._axes, n = e.camera.element;
5996
+ return t.off(EVENT.HOLD, this._onAxesHold), t.off(EVENT.CHANGE, this._onAxesChange), n.removeEventListener("click", this._preventClickWhenDragged, !0), this;
5997
+ }
5998
+ animateTo(e, t, n) {
5999
+ var r;
6000
+ let i = this._axes, s = this._stateMachine.state;
6001
+ if (!i) return Promise.reject(new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING));
6002
+ let l = this.getCurrentPosition();
6003
+ if (l === e) {
6004
+ let t = getFlickingAttached(this._flicking);
6005
+ return t.camera.lookAt(e), s.targetPanel && t.control.setActive(s.targetPanel, t.control.activePanel, n?.isTrusted ?? !1), Promise.resolve();
6006
+ }
6007
+ this._animatingContext = {
6008
+ start: l,
6009
+ end: e,
6010
+ offset: 0
6011
+ };
6012
+ let u = () => {
6013
+ i.once(EVENT.FINISH, () => {
6014
+ this._animatingContext = {
6015
+ start: 0,
6016
+ end: 0,
6017
+ offset: 0
6018
+ };
6019
+ }), n ? n.setTo({ [POSITION_KEY]: e }, t) : i.setTo({ [POSITION_KEY]: e }, t);
6020
+ };
6021
+ return new Promise((e, t) => {
6022
+ let n = () => {
6023
+ i.off(EVENT.HOLD, r), e();
6024
+ }, r = () => {
6025
+ i.off(EVENT.FINISH, n), t(new FlickingError(MESSAGE.ANIMATION_INTERRUPTED, CODE.ANIMATION_INTERRUPTED));
6026
+ };
6027
+ i.once(EVENT.FINISH, n), i.once(EVENT.HOLD, r), u();
6028
+ });
6029
+ }
6030
+ getCurrentPosition() {
6031
+ var e, t;
6032
+ return this._axes?.get([POSITION_KEY])[POSITION_KEY] ?? 0;
6033
+ }
6034
+ updateDirection() {
6035
+ let e = getFlickingAttached(this._flicking), t = this._axes, n = this._panInput;
6036
+ t.disconnect(n), t.connect(e.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], n), n.options.scale = e.horizontal ? [e.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1];
6037
+ }
6038
+ _resetInternalValues() {
6039
+ this._flicking = null, this._axes = null, this._panInput = null, this._animatingContext = {
6040
+ start: 0,
6041
+ end: 0,
6042
+ offset: 0
6043
+ }, this._dragged = !1;
6044
+ }
6045
+ }, Control = class {
6046
+ get controller() {
6047
+ return this._controller;
6048
+ }
6049
+ get activeIndex() {
6050
+ var e, t;
6051
+ return this._activePanel?.index ?? -1;
6052
+ }
6053
+ get activePanel() {
6054
+ return this._activePanel;
6055
+ }
6056
+ get animating() {
6057
+ return this._controller.state.animating;
6058
+ }
6059
+ get holding() {
6060
+ return this._controller.state.holding;
6061
+ }
6062
+ constructor() {
6063
+ this._flicking = null, this._controller = new AxesController(), this._activePanel = null;
6064
+ }
6065
+ init(e) {
6066
+ return this._flicking = e, this._controller.init(e), this;
6067
+ }
6068
+ destroy() {
6069
+ this._controller.destroy(), this._flicking = null, this._activePanel = null;
6070
+ }
6071
+ enable() {
6072
+ return this._controller.enable(), this;
6073
+ }
6074
+ disable() {
6075
+ return this._controller.disable(), this;
6076
+ }
6077
+ release() {
6078
+ return this._controller.release(), this;
6079
+ }
6080
+ updateAnimation(e, t, n) {
6081
+ let r = this._controller.state, i = this._getPosition(e, n ?? DIRECTION.NONE);
6082
+ return r.targetPanel = e, this._controller.updateAnimation(i, t), this;
6083
+ }
6084
+ stopAnimation() {
6085
+ let e = this._controller.state;
6086
+ return e.targetPanel = null, this._controller.stopAnimation(), this;
6087
+ }
6088
+ updatePosition(e) {
6089
+ let t = getFlickingAttached(this._flicking).camera, n = this._activePanel;
6090
+ n && t.lookAt(t.clampToReachablePosition(n.position));
6091
+ }
6092
+ updateInput() {
6093
+ let e = getFlickingAttached(this._flicking).camera;
6094
+ return this._controller.update(e.controlParams), this;
6095
+ }
6096
+ resetActive() {
6097
+ return this._activePanel = null, this;
6098
+ }
6099
+ moveToPanel(e, t) {
6100
+ return __async$1(this, arguments, function* (e, { duration: t, direction: n = DIRECTION.NONE, axesEvent: r }) {
6101
+ let i = this._getPosition(e, n);
6102
+ return this._triggerIndexChangeEvent(e, e.position, r, n), this._animateToPosition({
6103
+ position: i,
6104
+ duration: t,
6105
+ newActivePanel: e,
6106
+ axesEvent: r
6107
+ });
6108
+ });
6109
+ }
6110
+ setActive(e, t, n) {
6111
+ var r;
6112
+ let i = getFlickingAttached(this._flicking);
6113
+ this._activePanel = e, this._nextPanel = null, i.camera.updateAdaptiveHeight(), e === t ? i.trigger(new ComponentEvent$1(EVENTS.RESTORED, { isTrusted: n })) : i.trigger(new ComponentEvent$1(EVENTS.CHANGED, {
6114
+ index: e.index,
6115
+ panel: e,
6116
+ prevIndex: t?.index ?? -1,
6117
+ prevPanel: t,
6118
+ isTrusted: n,
6119
+ direction: t ? getDirection(t.position, e.position) : DIRECTION.NONE
6120
+ }));
6121
+ }
6122
+ copy(e) {
6123
+ this._flicking = e._flicking, this._activePanel = e._activePanel, this._controller = e._controller;
6124
+ }
6125
+ _triggerIndexChangeEvent(e, t, n, r) {
6126
+ var i;
6127
+ let s = getFlickingAttached(this._flicking), l = e === this._activePanel ? EVENTS.WILL_RESTORE : EVENTS.WILL_CHANGE, u = s.camera, d = this._activePanel, f = new ComponentEvent$1(l, {
6128
+ index: e.index,
6129
+ panel: e,
6130
+ isTrusted: n?.isTrusted || !1,
6131
+ direction: r ?? getDirection(d?.position ?? u.position, t)
6132
+ });
6133
+ if (this._nextPanel = e, s.trigger(f), f.isCanceled()) throw new FlickingError(MESSAGE.STOP_CALLED_BY_USER, CODE.STOP_CALLED_BY_USER);
6134
+ }
6135
+ _animateToPosition(e) {
6136
+ return __async$1(this, arguments, function* ({ position: e, duration: t, newActivePanel: n, axesEvent: r }) {
6137
+ let i = getFlickingAttached(this._flicking), s = t;
6138
+ Math.abs(s - e) < i.animationThreshold && (s = 0);
6139
+ let l = () => this._controller.animateTo(e, s, r), u = this._controller.state;
6140
+ return u.targetPanel = n, s <= 0 ? l() : l().then(() => __async$1(this, null, function* () {
6141
+ i.initialized && (yield i.renderer.render());
6142
+ })).catch((e) => {
6143
+ if (!(r && e instanceof FlickingError && e.code === CODE.ANIMATION_INTERRUPTED)) throw e;
6144
+ });
6145
+ });
6146
+ }
6147
+ _getPosition(e, t = DIRECTION.NONE) {
6148
+ let n = getFlickingAttached(this._flicking), r = n.camera, i = e.position, s = r.findNearestAnchor(i);
6149
+ if (e.removed || !s) throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e.position), CODE.POSITION_NOT_REACHABLE);
6150
+ if (!r.canReach(e)) i = s.position, e = s.panel;
6151
+ else if (n.circularEnabled) {
6152
+ let e = this._controller.position, n = r.rangeDiff;
6153
+ i = [
6154
+ i,
6155
+ i + n,
6156
+ i - n
6157
+ ].filter((n) => t === DIRECTION.NONE ? !0 : t === DIRECTION.PREV ? n <= e : n >= e).reduce((t, n) => Math.abs(e - n) < Math.abs(e - t) ? n : t, Infinity);
6158
+ }
6159
+ return i;
6160
+ }
6161
+ }, FreeControl = class extends Control {
6162
+ get stopAtEdge() {
6163
+ return this._stopAtEdge;
6164
+ }
6165
+ set stopAtEdge(e) {
6166
+ this._stopAtEdge = e;
6167
+ }
6168
+ constructor(e = {}) {
6169
+ super();
6170
+ let { stopAtEdge: t = !0 } = e;
6171
+ this._stopAtEdge = t;
6172
+ }
6173
+ updatePosition(e) {
6174
+ let t = getFlickingAttached(this._flicking).camera, n = this._activePanel;
6175
+ if (n) {
6176
+ let r = n.range, i = r.min + (r.max - r.min) * e;
6177
+ t.lookAt(t.clampToReachablePosition(i));
6178
+ }
6179
+ }
6180
+ moveToPosition(e, t, n) {
6181
+ let r = getFlickingAttached(this._flicking).camera, i = r.clampToReachablePosition(e), s = r.findAnchorIncludePosition(i);
6182
+ if (!s) return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE));
6183
+ let l = s.panel;
6184
+ return l !== this._activePanel && this._triggerIndexChangeEvent(l, e, n), this._animateToPosition({
6185
+ position: this._stopAtEdge ? i : e,
6186
+ duration: t,
6187
+ newActivePanel: l,
6188
+ axesEvent: n
6189
+ });
6190
+ }
6191
+ }, SnapControl = class extends Control {
6192
+ get count() {
6193
+ return this._count;
6194
+ }
6195
+ set count(e) {
6196
+ this._count = e;
6197
+ }
6198
+ constructor(e = {}) {
6199
+ super();
6200
+ let { count: t = Infinity } = e;
6201
+ this._count = t;
6202
+ }
6203
+ moveToPosition(e, t, n) {
6204
+ let r = getFlickingAttached(this._flicking), i = r.camera, s = i.findActiveAnchor(), l = i.findNearestAnchor(i.position), u = this._controller.state;
6205
+ if (!s || !l) return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE));
6206
+ let d = this._calcSnapThreshold(r.threshold, e, s), f = r.animating ? u.delta : e - i.position, p = Math.abs(f), m = n && n.delta[POSITION_KEY] !== 0 ? Math.abs(n.delta[POSITION_KEY]) : p, g;
6207
+ if (m >= d && m > 0) g = this._findSnappedAnchor(e, l);
6208
+ else if (p >= r.threshold && p > 0) g = this._findAdjacentAnchor(e, f, l);
6209
+ else return this.moveToPanel(l.panel, {
6210
+ duration: t,
6211
+ axesEvent: n
6212
+ });
6213
+ return this._triggerIndexChangeEvent(g.panel, e, n), this._animateToPosition({
6214
+ position: i.clampToReachablePosition(g.position),
6215
+ duration: t,
6216
+ newActivePanel: g.panel,
6217
+ axesEvent: n
6218
+ });
6219
+ }
6220
+ _findSnappedAnchor(e, t) {
6221
+ let n = getFlickingAttached(this._flicking), r = n.camera, i = this._count, s = r.position, l = r.clampToReachablePosition(e), u = r.findAnchorIncludePosition(l);
6222
+ if (!t || !u) throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE);
6223
+ if (!Number.isFinite(i)) return u;
6224
+ let d = n.panelCount, f = r.anchorPoints, p = Math.sign(e - s) * Math.floor(Math.abs(e - s) / r.rangeDiff);
6225
+ e > s && u.index < t.index || u.position > t.position && u.index === t.index ? p += 1 : (e < s && u.index > t.index || u.position < t.position && u.index === t.index) && --p;
6226
+ let m = p * d, g = u.index + m;
6227
+ if (Math.abs(g - t.index) <= i) {
6228
+ let e = f[u.index];
6229
+ return new AnchorPoint({
6230
+ index: e.index,
6231
+ position: e.position + p * r.rangeDiff,
6232
+ panel: e.panel
6233
+ });
6234
+ }
6235
+ if (n.circularEnabled) {
6236
+ let n = f[circulateIndex(t.index + Math.sign(e - s) * i, d)], l = Math.floor(i / d);
6237
+ return e > s && n.index < t.index ? l += 1 : e < s && n.index > t.index && --l, new AnchorPoint({
6238
+ index: n.index,
6239
+ position: n.position + l * r.rangeDiff,
6240
+ panel: n.panel
6241
+ });
6242
+ } else return f[clamp(t.index + Math.sign(e - s) * i, 0, f.length - 1)];
6243
+ }
6244
+ _findAdjacentAnchor(e, t, n) {
6245
+ var r;
6246
+ let i = getFlickingAttached(this._flicking).camera;
6247
+ if (i.circularEnabled) {
6248
+ let t = i.findAnchorIncludePosition(e);
6249
+ if (t && t.position !== n.position) return t;
6250
+ }
6251
+ return (t > 0 ? i.getNextAnchor(n) : i.getPrevAnchor(n)) ?? n;
6252
+ }
6253
+ _calcSnapThreshold(e, t, n) {
6254
+ let r = t > n.position, i = n.panel, s = i.size, l = i.alignPosition;
6255
+ return Math.max(e, r ? s - l + i.margin.next : l + i.margin.prev);
6256
+ }
6257
+ }, StrictControl = class e extends Control {
6258
+ constructor(e = {}) {
6259
+ super(), this.setActive = (e, t, n) => {
6260
+ super.setActive(e, t, n), this.updateInput();
6261
+ };
6262
+ let { count: t = 1 } = e;
6263
+ this._count = t, this._resetIndexRange();
6264
+ }
6265
+ get count() {
6266
+ return this._count;
6267
+ }
6268
+ set count(e) {
6269
+ this._count = e;
6270
+ }
6271
+ destroy() {
6272
+ super.destroy(), this._resetIndexRange();
6273
+ }
6274
+ updateInput() {
6275
+ var e;
6276
+ let t = getFlickingAttached(this._flicking), n = t.camera, r = t.renderer, i = this._controller, s = n.controlParams, l = this._count, u = i.state.animating ? n.findNearestAnchor(n.position)?.panel : this._activePanel;
6277
+ if (!u) return i.update(s), this._resetIndexRange(), this;
6278
+ let d = s.range, f = u.position, p = u.index, m = r.panelCount, g = p - l, _ = p + l;
6279
+ g < 0 && (g = t.circularEnabled ? getMinusCompensatedIndex((g + 1) % m - 1, m) : clamp(g, 0, m - 1)), _ >= m && (_ = t.circularEnabled ? _ % m : clamp(_, 0, m - 1));
6280
+ let v = r.panels[g], y = r.panels[_], b = Math.max(v.position, d.min), x = Math.min(y.position, d.max);
6281
+ return b > f && (b -= n.rangeDiff), x < f && (x += n.rangeDiff), s.range = {
6282
+ min: b,
6283
+ max: x
6284
+ }, s.circular && (s.position < b && (s.position += n.rangeDiff), s.position > x && (s.position -= n.rangeDiff)), s.circular = !1, i.update(s), this._indexRange = {
6285
+ min: v.index,
6286
+ max: y.index
6287
+ }, this;
6288
+ }
6289
+ moveToPanel(t, n) {
6290
+ return __async$1(this, null, function* () {
6291
+ let r = getFlickingAttached(this._flicking).camera;
6292
+ return this._controller.update(r.controlParams), __superGet$1(e.prototype, this, "moveToPanel").call(this, t, n);
6293
+ });
6294
+ }
6295
+ moveToPosition(e, t, n) {
6296
+ var r;
6297
+ let i = getFlickingAttached(this._flicking), s = i.camera, l = this._nextPanel ?? this._activePanel, u = this._controller.range, d = this._indexRange, f = s.range, p = this._controller.state, m = clamp(s.clampToReachablePosition(e), u[0], u[1]), g = s.findAnchorIncludePosition(m);
6298
+ if (!g || !l) return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE));
6299
+ let _ = l.position, v = i.animating ? p.delta : e - s.position, y = Math.abs(v) >= i.threshold, b = e > _ ? s.getNextAnchor(g) : s.getPrevAnchor(g), x, S, C = s.anchorPoints, w = C[0], T = C[C.length - 1], E = e < f.min && isBetween(w.panel.index, d.min, d.max), D = e > f.max && isBetween(T.panel.index, d.min, d.max), O = b && (d.min <= d.max ? isBetween(b.index, d.min, d.max) : b.index >= d.min || b.index <= d.max);
6300
+ if (E || D) {
6301
+ let t = e < f.min ? w : T;
6302
+ S = t.panel, x = t.position;
6303
+ } else if (y && g.position !== l.position) S = g.panel, x = g.position;
6304
+ else if (y && O) S = b.panel, x = b.position;
6305
+ else {
6306
+ let r = s.findNearestAnchor(s.position);
6307
+ return r ? this.moveToPanel(r.panel, {
6308
+ duration: t,
6309
+ axesEvent: n
6310
+ }) : Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(e), CODE.POSITION_NOT_REACHABLE));
6311
+ }
6312
+ return this._triggerIndexChangeEvent(S, e, n), this._animateToPosition({
6313
+ position: x,
6314
+ duration: t,
6315
+ newActivePanel: S,
6316
+ axesEvent: n
6317
+ });
6318
+ }
6319
+ _resetIndexRange() {
6320
+ this._indexRange = {
6321
+ min: 0,
6322
+ max: 0
6323
+ };
6324
+ }
6325
+ }, AutoResizer = class {
6326
+ constructor(e) {
6327
+ this._onResizeWrapper = () => {
6328
+ this._onResize([]);
6329
+ }, this._onResize = (e) => {
6330
+ let t = this._flicking, n = t.resizeDebounce, r = t.maxResizeDebounce, i = t.element;
6331
+ if (e.find((e) => e.target === t.element) && e.length === 1) {
6332
+ let e = {
6333
+ width: t.viewport.width,
6334
+ height: t.viewport.height
6335
+ }, n = {
6336
+ width: getElementSize({
6337
+ el: i,
6338
+ horizontal: !0,
6339
+ useFractionalSize: this._flicking.useFractionalSize,
6340
+ useOffset: !1,
6341
+ style: getStyle(i)
6342
+ }),
6343
+ height: getElementSize({
6344
+ el: i,
6345
+ horizontal: !1,
6346
+ useFractionalSize: this._flicking.useFractionalSize,
6347
+ useOffset: !1,
6348
+ style: getStyle(i)
6349
+ })
6350
+ };
6351
+ if (e.height === n.height && e.width === n.width) return;
6352
+ }
6353
+ n <= 0 ? t.resize() : (this._maxResizeDebounceTimer <= 0 && r > 0 && r >= n && (this._maxResizeDebounceTimer = window.setTimeout(this._doScheduledResize, r)), this._resizeTimer > 0 && (clearTimeout(this._resizeTimer), this._resizeTimer = 0), this._resizeTimer = window.setTimeout(this._doScheduledResize, n));
6354
+ }, this._doScheduledResize = () => {
6355
+ clearTimeout(this._resizeTimer), clearTimeout(this._maxResizeDebounceTimer), this._maxResizeDebounceTimer = -1, this._resizeTimer = -1, this._flicking.resize();
6356
+ }, this._skipFirstResize = /* @__PURE__ */ (() => {
6357
+ let e = !0;
6358
+ return (t) => {
6359
+ if (e) {
6360
+ e = !1;
6361
+ return;
6362
+ }
6363
+ this._onResize(t);
6364
+ };
6365
+ })(), this._flicking = e, this._enabled = !1, this._resizeObserver = null, this._resizeTimer = -1, this._maxResizeDebounceTimer = -1;
6366
+ }
6367
+ get enabled() {
6368
+ return this._enabled;
6369
+ }
6370
+ enable() {
6371
+ let e = this._flicking, t = e.viewport;
6372
+ if (this._enabled && this.disable(), e.useResizeObserver && window.ResizeObserver) {
6373
+ let n = t.width !== 0 || t.height !== 0 ? new ResizeObserver(this._skipFirstResize) : new ResizeObserver(this._onResize);
6374
+ this._resizeObserver = n, this.observe(e.viewport.element), e.observePanelResize && this.observePanels();
6375
+ } else window.addEventListener("resize", this._onResizeWrapper);
6376
+ return this._enabled = !0, this;
6377
+ }
6378
+ observePanels() {
6379
+ return this._flicking.panels.forEach((e) => {
6380
+ this.observe(e.element);
6381
+ }), this;
6382
+ }
6383
+ unobservePanels() {
6384
+ return this._flicking.panels.forEach((e) => {
6385
+ this.unobserve(e.element);
6386
+ }), this;
6387
+ }
6388
+ observe(e) {
6389
+ let t = this._resizeObserver;
6390
+ return t && t.observe(e), this;
6391
+ }
6392
+ unobserve(e) {
6393
+ let t = this._resizeObserver;
6394
+ return t ? (t.unobserve(e), this._flicking.observePanelResize && this.unobservePanels(), this) : this;
6395
+ }
6396
+ disable() {
6397
+ if (!this._enabled) return this;
6398
+ let e = this._resizeObserver;
6399
+ return e ? (e.disconnect(), this._resizeObserver = null) : window.removeEventListener("resize", this._onResizeWrapper), this._enabled = !1, this;
6400
+ }
6401
+ }, VanillaElementProvider = class {
6402
+ get element() {
6403
+ return this._element;
6404
+ }
6405
+ get rendered() {
6406
+ return this._rendered;
6407
+ }
6408
+ constructor(e) {
6409
+ this._element = e, this._rendered = !0;
6410
+ }
6411
+ show(e) {
6412
+ let t = this.element, n = e.camera.element;
6413
+ t.parentElement !== n && (n.appendChild(t), this._rendered = !0);
6414
+ }
6415
+ hide(e) {
6416
+ let t = this.element, n = e.camera.element;
6417
+ t.parentElement === n && (n.removeChild(t), this._rendered = !1);
6418
+ }
6419
+ }, VirtualElementProvider = class {
6420
+ get element() {
6421
+ return this._virtualElement.nativeElement;
6422
+ }
6423
+ get rendered() {
6424
+ return this._virtualElement.visible;
6425
+ }
6426
+ get _virtualElement() {
6427
+ let e = this._flicking, t = this._panel.elementIndex;
6428
+ return e.virtual.elements[t];
6429
+ }
6430
+ constructor(e) {
6431
+ this._flicking = e;
6432
+ }
6433
+ init(e) {
6434
+ this._panel = e;
6435
+ }
6436
+ show() {}
6437
+ hide() {}
6438
+ }, Viewport = class {
6439
+ get element() {
6440
+ return this._el;
6441
+ }
6442
+ get width() {
6443
+ return this._width - this._padding.left - this._padding.right;
6444
+ }
6445
+ get height() {
6446
+ return this._height - this._padding.top - this._padding.bottom;
6447
+ }
6448
+ get padding() {
6449
+ return this._padding;
6450
+ }
6451
+ constructor(e, t) {
6452
+ this._flicking = e, this._el = t, this._width = 0, this._height = 0, this._padding = {
6453
+ left: 0,
6454
+ right: 0,
6455
+ top: 0,
6456
+ bottom: 0
6457
+ }, this._isBorderBoxSizing = !1;
6458
+ }
6459
+ setSize(e) {
6460
+ let { width: t, height: n } = e, r = this._el, i = this._padding, s = this._isBorderBoxSizing;
6461
+ if (t != null) if (isString(t)) r.style.width = t;
6462
+ else {
6463
+ let e = s ? t + i.left + i.right : t;
6464
+ r.style.width = `${e}px`;
6465
+ }
6466
+ if (n != null) if (isString(n)) r.style.height = n;
6467
+ else {
6468
+ let e = s ? n + i.top + i.bottom : n;
6469
+ r.style.height = `${e}px`;
6470
+ }
6471
+ this.resize();
6472
+ }
6473
+ resize() {
6474
+ let e = this._el, t = getStyle(e), { useFractionalSize: n } = this._flicking;
6475
+ this._width = getElementSize({
6476
+ el: e,
6477
+ horizontal: !0,
6478
+ useFractionalSize: n,
6479
+ useOffset: !1,
6480
+ style: t
6481
+ }), this._height = getElementSize({
6482
+ el: e,
6483
+ horizontal: !1,
6484
+ useFractionalSize: n,
6485
+ useOffset: !1,
6486
+ style: t
6487
+ }), this._padding = {
6488
+ left: t.paddingLeft ? parseFloat(t.paddingLeft) : 0,
6489
+ right: t.paddingRight ? parseFloat(t.paddingRight) : 0,
6490
+ top: t.paddingTop ? parseFloat(t.paddingTop) : 0,
6491
+ bottom: t.paddingBottom ? parseFloat(t.paddingBottom) : 0
6492
+ }, this._isBorderBoxSizing = t.boxSizing === "border-box";
6493
+ }
6494
+ }, VirtualManager = class {
6495
+ get elements() {
6496
+ return this._elements;
6497
+ }
6498
+ get renderPanel() {
6499
+ return this._renderPanel;
6500
+ }
6501
+ get initialPanelCount() {
6502
+ return this._initialPanelCount;
6503
+ }
6504
+ get cache() {
6505
+ return this._cache;
6506
+ }
6507
+ get panelClass() {
6508
+ return this._panelClass;
6509
+ }
6510
+ set renderPanel(e) {
6511
+ this._renderPanel = e, this._flicking.renderer.panels.forEach((e) => e.uncacheRenderResult());
6512
+ }
6513
+ set cache(e) {
6514
+ this._cache = e;
6515
+ }
6516
+ set panelClass(e) {
6517
+ this._panelClass = e;
6518
+ }
6519
+ constructor(e, t) {
6520
+ var n, r, i, s;
6521
+ this._flicking = e, this._renderPanel = t?.renderPanel ?? (() => ""), this._initialPanelCount = t?.initialPanelCount ?? -1, this._cache = t?.cache ?? !1, this._panelClass = t?.panelClass ?? CLASS.DEFAULT_VIRTUAL, this._elements = [];
6522
+ }
6523
+ init() {
6524
+ let e = this._flicking;
6525
+ if (!e.virtualEnabled) return;
6526
+ !e.externalRenderer && !e.renderExternal && this._initVirtualElements();
6527
+ let t = e.camera.children;
6528
+ this._elements = t.map((e) => ({
6529
+ nativeElement: e,
6530
+ visible: !0
6531
+ }));
6532
+ }
6533
+ show(e) {
6534
+ let t = this._elements[e], n = t.nativeElement;
6535
+ t.visible = !0, n.style.display && (n.style.display = "");
6536
+ }
6537
+ hide(e) {
6538
+ let t = this._elements[e], n = t.nativeElement;
6539
+ t.visible = !1, n.style.display = "none";
6540
+ }
6541
+ append(e = 1) {
6542
+ let t = this._flicking;
6543
+ return this.insert(t.panels.length, e);
6544
+ }
6545
+ prepend(e = 1) {
6546
+ return this.insert(0, e);
6547
+ }
6548
+ insert(e, t = 1) {
6549
+ return t <= 0 ? [] : this._flicking.renderer.batchInsert({
6550
+ index: e,
6551
+ elements: range(t),
6552
+ hasDOMInElements: !1
6553
+ });
6554
+ }
6555
+ remove(e, t) {
6556
+ return t <= 0 ? [] : this._flicking.renderer.batchRemove({
6557
+ index: e,
6558
+ deleteCount: t,
6559
+ hasDOMInElements: !1
6560
+ });
6561
+ }
6562
+ _initVirtualElements() {
6563
+ let e = this._flicking, t = e.camera.element, n = e.panelsPerView, r = document.createDocumentFragment();
6564
+ range(n + 1).map((e) => {
6565
+ let t = document.createElement("div");
6566
+ return t.className = this._panelClass, t.dataset.elementIndex = e.toString(), t;
6567
+ }).forEach((e) => {
6568
+ r.appendChild(e);
6569
+ }), t.appendChild(r);
6570
+ }
6571
+ }, Renderer = class {
6572
+ get panels() {
6573
+ return this._panels;
6574
+ }
6575
+ get rendering() {
6576
+ return this._rendering;
6577
+ }
6578
+ get panelCount() {
6579
+ return this._panels.length;
6580
+ }
6581
+ get strategy() {
6582
+ return this._strategy;
6583
+ }
6584
+ get align() {
6585
+ return this._align;
6586
+ }
6587
+ set align(e) {
6588
+ this._align = e;
6589
+ let t = parsePanelAlign(e);
6590
+ this._panels.forEach((e) => {
6591
+ e.align = t;
6592
+ });
6593
+ }
6594
+ constructor(e) {
6595
+ let { align: t = ALIGN.CENTER, strategy: n } = e;
6596
+ this._flicking = null, this._panels = [], this._rendering = !1, this._align = t, this._strategy = n;
6597
+ }
6598
+ init(e) {
6599
+ return this._flicking = e, this._collectPanels(), this;
6600
+ }
6601
+ destroy() {
6602
+ this._flicking = null, this._panels = [];
6603
+ }
6604
+ getPanel(e) {
6605
+ return this._panels[e] || null;
6606
+ }
6607
+ forceRenderAllPanels() {
6608
+ return this._panels.forEach((e) => e.markForShow()), Promise.resolve();
6609
+ }
6610
+ getRenderedPanels() {
6611
+ return getFlickingAttached(this._flicking).renderer.panels.filter((e) => e.rendered);
6612
+ }
6613
+ updatePanelSize() {
6614
+ let e = getFlickingAttached(this._flicking), t = this._panels;
6615
+ if (t.length <= 0) return this;
6616
+ if (e.panelsPerView > 0) {
6617
+ let e = t[0];
6618
+ e.resize(), this._updatePanelSizeByGrid(e, t);
6619
+ } else e.panels.forEach((e) => e.resize());
6620
+ return this;
6621
+ }
6622
+ batchInsert(...e) {
6623
+ let t = this.batchInsertDefer(...e);
6624
+ return t.length <= 0 ? [] : (this.updateAfterPanelChange(t, []), t);
6625
+ }
6626
+ batchInsertDefer(...e) {
6627
+ let t = this._panels, n = getFlickingAttached(this._flicking), r = t[0], i = parsePanelAlign(this._align);
6628
+ return e.reduce((e, s) => {
6629
+ var l;
6630
+ let u = getMinusCompensatedIndex(s.index, t.length), d = t.slice(u), f = s.elements.map((e, t) => this._createPanel(e, {
6631
+ index: u + t,
6632
+ align: i,
6633
+ flicking: n
6634
+ }));
6635
+ if (t.splice(u, 0, ...f), s.hasDOMInElements && this._insertPanelElements(f, d[0] ?? null), n.panelsPerView > 0) {
6636
+ let e = r || f[0].resize();
6637
+ this._updatePanelSizeByGrid(e, f);
6638
+ } else f.forEach((e) => e.resize());
6639
+ return d.forEach((e) => {
6640
+ e.increaseIndex(f.length), e.updatePosition();
6641
+ }), [...e, ...f];
6642
+ }, []);
6643
+ }
6644
+ batchRemove(...e) {
6645
+ let t = this.batchRemoveDefer(...e);
6646
+ return t.length <= 0 ? [] : (this.updateAfterPanelChange([], t), t);
6647
+ }
6648
+ batchRemoveDefer(...e) {
6649
+ let t = this._panels, { control: n } = getFlickingAttached(this._flicking), r = n.activePanel;
6650
+ return e.reduce((e, i) => {
6651
+ let { index: s, deleteCount: l } = i, u = getMinusCompensatedIndex(s, t.length), d = t.slice(u + l), f = t.splice(u, l);
6652
+ return f.length <= 0 ? [] : (d.forEach((e) => {
6653
+ e.decreaseIndex(f.length), e.updatePosition();
6654
+ }), i.hasDOMInElements && this._removePanelElements(f), f.forEach((e) => e.destroy()), includes(f, r) && n.resetActive(), [...e, ...f]);
6655
+ }, []);
6656
+ }
6657
+ updateAfterPanelChange(e, t) {
6658
+ var n;
6659
+ let r = getFlickingAttached(this._flicking), { camera: i, control: s } = r, l = this._panels, u = s.activePanel;
6660
+ if (this._updateCameraAndControl(), r.autoResize && r.useResizeObserver && (e.forEach((e) => {
6661
+ e.element && r.autoResizer.observe(e.element);
6662
+ }), t.forEach((e) => {
6663
+ e.element && r.autoResizer.unobserve(e.element);
6664
+ })), this.render(), !r.animating) if (!u || u.removed) if (l.length <= 0) i.lookAt(0);
6665
+ else {
6666
+ let e = u?.index ?? 0;
6667
+ e > l.length - 1 && (e = l.length - 1), s.moveToPanel(l[e], { duration: 0 }).catch(() => void 0);
6668
+ }
6669
+ else s.moveToPanel(u, { duration: 0 }).catch(() => void 0);
6670
+ r.camera.updateOffset(), (e.length > 0 || t.length > 0) && (r.trigger(new ComponentEvent$1(EVENTS.PANEL_CHANGE, {
6671
+ added: e,
6672
+ removed: t
6673
+ })), this.checkPanelContentsReady([...e, ...t]));
6674
+ }
6675
+ checkPanelContentsReady(e) {
6676
+ let t = getFlickingAttached(this._flicking), n = t.resizeOnContentsReady, r = this._panels;
6677
+ if (!n || t.virtualEnabled) return;
6678
+ let i = (e) => e.element && !!e.element.querySelector("img, video");
6679
+ if (e = e.filter((e) => i(e)), e.length <= 0) return;
6680
+ let s = new ImReady();
6681
+ e.forEach((e) => {
6682
+ e.loading = !0;
6683
+ }), s.on("readyElement", (n) => {
6684
+ if (!this._flicking) {
6685
+ s.destroy();
6686
+ return;
6687
+ }
6688
+ let i = e[n.index], l = t.camera, u = t.control, d = u.activePanel ? l.getProgressInPanel(u.activePanel) : 0;
6689
+ i.loading = !1, i.resize(), r.slice(i.index + 1).forEach((e) => e.updatePosition()), t.initialized && (l.updateRange(), l.updateOffset(), l.updateAnchors(), u.animating || (u.updatePosition(d), u.updateInput()));
6690
+ }), s.on("preReady", (e) => {
6691
+ this._flicking && this.render(), e.readyCount === e.totalCount && s.destroy();
6692
+ }), s.on("ready", () => {
6693
+ this._flicking && this.render(), s.destroy();
6694
+ }), s.check(e.map((e) => e.element));
6695
+ }
6696
+ _updateCameraAndControl() {
6697
+ let { camera: e, control: t } = getFlickingAttached(this._flicking);
6698
+ e.updateRange(), e.updateOffset(), e.updateAnchors(), e.resetNeedPanelHistory(), t.updateInput();
6699
+ }
6700
+ _showOnlyVisiblePanels(e) {
6701
+ let t = e.renderer.panels, n = e.camera.visiblePanels.reduce((e, t) => (e[t.index] = !0, e), {});
6702
+ t.forEach((t) => {
6703
+ t.index in n || t.loading ? t.markForShow() : e.holding || t.markForHide();
6704
+ });
6705
+ }
6706
+ _updatePanelSizeByGrid(e, t) {
6707
+ let n = getFlickingAttached(this._flicking), r = n.panelsPerView;
6708
+ if (r <= 0) throw new FlickingError(MESSAGE.WRONG_OPTION("panelsPerView", r), CODE.WRONG_OPTION);
6709
+ if (t.length <= 0) return;
6710
+ let i = (n.camera.size - (e.margin.prev + e.margin.next) * (r - 1)) / r, s = n.horizontal ? { width: i } : { height: i }, l = __spreadValues$1({
6711
+ size: i,
6712
+ margin: e.margin
6713
+ }, !n.horizontal && { height: e.height });
6714
+ n.noPanelStyleOverride || this._strategy.updatePanelSizes(n, s), n.panels.forEach((e) => e.resize(l));
6715
+ }
6716
+ _removeAllChildsFromCamera() {
6717
+ let e = getFlickingAttached(this._flicking).camera.element;
6718
+ for (; e.firstChild;) e.removeChild(e.firstChild);
6719
+ }
6720
+ _insertPanelElements(e, t = null) {
6721
+ let n = getFlickingAttached(this._flicking).camera.element, r = t?.element || null, i = document.createDocumentFragment();
6722
+ e.forEach((e) => i.appendChild(e.element));
6723
+ let s = r && r.parentNode === n ? r : null;
6724
+ n.insertBefore(i, s);
6725
+ }
6726
+ _removePanelElements(e) {
6727
+ let t = getFlickingAttached(this._flicking).camera.element;
6728
+ e.forEach((e) => {
6729
+ e.element.parentNode === t && t.removeChild(e.element);
6730
+ });
6731
+ }
6732
+ _afterRender() {
6733
+ let e = getFlickingAttached(this._flicking);
6734
+ if (e.camera.applyTransform(), e.useCSSOrder) {
6735
+ let t = e.renderer.panels.filter((e) => e.rendered);
6736
+ this._strategy.getRenderingIndexesByOrder(e).forEach((e, n) => {
6737
+ t[e].element && (t[e].element.style.order = `${n}`);
6738
+ });
6739
+ }
6740
+ }
6741
+ }, ExternalRenderer = class extends Renderer {
6742
+ _removePanelElements(e) {}
6743
+ _removeAllChildsFromCamera() {}
6744
+ }, VanillaRenderer = class extends Renderer {
6745
+ render() {
6746
+ return __async$1(this, null, function* () {
6747
+ let e = getFlickingAttached(this._flicking), t = this._strategy;
6748
+ t.updateRenderingPanels(e), t.renderPanels(e), this._resetPanelElementOrder(), this._afterRender();
6749
+ });
6750
+ }
6751
+ _collectPanels() {
6752
+ let e = getFlickingAttached(this._flicking), t = e.camera;
6753
+ this._removeAllTextNodes(), this._panels = this._strategy.collectPanels(e, t.children);
6754
+ }
6755
+ _createPanel(e, t) {
6756
+ return this._strategy.createPanel(e, t);
6757
+ }
6758
+ _resetPanelElementOrder() {
6759
+ let e = getFlickingAttached(this._flicking), t = e.camera.element, n = [];
6760
+ n = e.useCSSOrder ? this.getRenderedPanels().map((e) => e.element).reverse() : this._strategy.getRenderingElementsByOrder(e).reverse(), n.forEach((e, r) => {
6761
+ let i = n[r - 1] ? n[r - 1] : null;
6762
+ e.nextElementSibling !== i && t.insertBefore(e, i);
6763
+ });
6764
+ }
6765
+ _removeAllTextNodes() {
6766
+ let e = getFlickingAttached(this._flicking).camera.element;
6767
+ toArray(e.childNodes).forEach((t) => {
6768
+ t.nodeType === Node.TEXT_NODE && e.removeChild(t);
6769
+ });
6770
+ }
6771
+ }, Panel = class {
6772
+ get element() {
6773
+ return this._elProvider.element;
6774
+ }
6775
+ get elementProvider() {
6776
+ return this._elProvider;
6777
+ }
6778
+ get index() {
6779
+ return this._index;
6780
+ }
6781
+ get position() {
6782
+ return this._pos + this._alignPos;
6783
+ }
6784
+ get size() {
6785
+ return this._size;
6786
+ }
6787
+ get sizeIncludingMargin() {
6788
+ return this._size + this._margin.prev + this._margin.next;
6789
+ }
6790
+ get height() {
6791
+ return this._height;
6792
+ }
6793
+ get margin() {
6794
+ return this._margin;
6795
+ }
6796
+ get alignPosition() {
6797
+ return this._alignPos;
6798
+ }
6799
+ get removed() {
6800
+ return this._removed;
6801
+ }
6802
+ get rendered() {
6803
+ return this._rendered;
6804
+ }
6805
+ get loading() {
6806
+ return this._loading;
6807
+ }
6808
+ get range() {
6809
+ return {
6810
+ min: this._pos,
6811
+ max: this._pos + this._size
6812
+ };
6813
+ }
6814
+ get toggled() {
6815
+ return this._toggled;
6816
+ }
6817
+ get toggleDirection() {
6818
+ return this._toggleDirection;
6819
+ }
6820
+ get offset() {
6821
+ let e = this._toggleDirection, t = this._flicking.camera.rangeDiff;
6822
+ return e === DIRECTION.NONE || !this._toggled ? 0 : e === DIRECTION.PREV ? -t : t;
6823
+ }
6824
+ get progress() {
6825
+ let e = this._flicking;
6826
+ return this.index - e.camera.progress;
6827
+ }
6828
+ get outsetProgress() {
6829
+ let e = this.position + this.offset, t = this._alignPos, n = this._flicking.camera, r = n.position;
6830
+ return r === e ? 0 : r < e ? -getProgress$1(r, e, e + (n.size - n.alignPosition) + t) : 1 - getProgress$1(r, e - (n.alignPosition + this._size - t), e);
6831
+ }
6832
+ get visibleRatio() {
6833
+ let e = this.range, t = this._size, n = this.offset, r = this._flicking.camera.visibleRange, i = {
6834
+ min: e.min + n,
6835
+ max: e.max + n
6836
+ };
6837
+ if (i.max <= r.min || i.min >= r.max) return 0;
6838
+ let s = t;
6839
+ return r.min > i.min && (s -= r.min - i.min), r.max < i.max && (s -= i.max - r.max), s / t;
6840
+ }
6841
+ set loading(e) {
6842
+ this._loading = e;
6843
+ }
6844
+ get align() {
6845
+ return this._align;
6846
+ }
6847
+ set align(e) {
6848
+ this._align = e, this._updateAlignPos();
6849
+ }
6850
+ constructor(e) {
6851
+ let { index: t, align: n, flicking: r, elementProvider: i } = e;
6852
+ this._index = t, this._flicking = r, this._elProvider = i, this._align = n, this._removed = !1, this._rendered = !0, this._loading = !1, this._resetInternalStates();
6853
+ }
6854
+ markForShow() {
6855
+ this._rendered = !0, this._elProvider.show(this._flicking);
6856
+ }
6857
+ markForHide() {
6858
+ this._rendered = !1, this._elProvider.hide(this._flicking);
6859
+ }
6860
+ resize(e) {
6861
+ var t;
6862
+ let n = this.element, { horizontal: r, useFractionalSize: i } = this._flicking;
6863
+ if (!n) return this;
6864
+ if (e) this._size = e.size, this._margin = __spreadValues$1({}, e.margin), this._height = e.height ?? getElementSize({
6865
+ el: n,
6866
+ horizontal: !1,
6867
+ useFractionalSize: i,
6868
+ useOffset: !0,
6869
+ style: getStyle(n)
6870
+ });
6871
+ else {
6872
+ let e = getStyle(n);
6873
+ this._size = getElementSize({
6874
+ el: n,
6875
+ horizontal: r,
6876
+ useFractionalSize: i,
6877
+ useOffset: !0,
6878
+ style: e
6879
+ }), this._margin = r ? {
6880
+ prev: parseFloat(e.marginLeft || "0"),
6881
+ next: parseFloat(e.marginRight || "0")
6882
+ } : {
6883
+ prev: parseFloat(e.marginTop || "0"),
6884
+ next: parseFloat(e.marginBottom || "0")
6885
+ }, this._height = r ? getElementSize({
6886
+ el: n,
6887
+ horizontal: !1,
6888
+ useFractionalSize: i,
6889
+ useOffset: !0,
6890
+ style: e
6891
+ }) : this._size;
6892
+ }
6893
+ return this.updatePosition(), this._updateAlignPos(), this;
6894
+ }
6895
+ setSize(e) {
6896
+ return setSize(this.element, e), this;
6897
+ }
6898
+ contains(e) {
6899
+ var t;
6900
+ return !!this.element?.contains(e);
6901
+ }
6902
+ destroy() {
6903
+ this._resetInternalStates(), this._removed = !0;
6904
+ }
6905
+ includePosition(e, t = !1) {
6906
+ return this.includeRange(e, e, t);
6907
+ }
6908
+ includeRange(e, t, n = !1) {
6909
+ let r = this._margin, i = this.range;
6910
+ return n && (i.min -= r.prev, i.max += r.next), t >= i.min && e <= i.max;
6911
+ }
6912
+ isVisibleOnRange(e, t) {
6913
+ let n = this.range;
6914
+ return t > n.min && e < n.max;
6915
+ }
6916
+ focus(e) {
6917
+ return this._flicking.moveTo(this._index, e);
6918
+ }
6919
+ prev() {
6920
+ let e = this._index, t = this._flicking, n = t.renderer, r = n.panelCount;
6921
+ return r === 1 ? null : t.circularEnabled ? n.getPanel(e === 0 ? r - 1 : e - 1) : n.getPanel(e - 1);
6922
+ }
6923
+ next() {
6924
+ let e = this._index, t = this._flicking, n = t.renderer, r = n.panelCount;
6925
+ return r === 1 ? null : t.circularEnabled ? n.getPanel(e === r - 1 ? 0 : e + 1) : n.getPanel(e + 1);
6926
+ }
6927
+ increaseIndex(e) {
6928
+ return this._index += Math.max(e, 0), this;
6929
+ }
6930
+ decreaseIndex(e) {
6931
+ return this._index -= Math.max(e, 0), this;
6932
+ }
6933
+ updatePosition() {
6934
+ let e = this._flicking.renderer.panels[this._index - 1];
6935
+ return this._pos = e ? e.range.max + e.margin.next + this._margin.prev : this._margin.prev, this;
6936
+ }
6937
+ toggle(e, t) {
6938
+ let n = this._toggleDirection, r = this._togglePosition;
6939
+ if (n === DIRECTION.NONE || t === e) return !1;
6940
+ let i = this._toggled;
6941
+ return t > e ? r >= e && r <= t && (this._toggled = n === DIRECTION.NEXT) : r <= e && r >= t && (this._toggled = n !== DIRECTION.NEXT), i !== this._toggled;
6942
+ }
6943
+ updateCircularToggleDirection() {
6944
+ let e = this._flicking;
6945
+ if (!e.circularEnabled) return this._toggleDirection = DIRECTION.NONE, this._togglePosition = 0, this._toggled = !1, this;
6946
+ let t = e.camera, n = t.range, r = t.alignPosition, i = t.visibleRange, s = i.max - i.min, l = n.min - r, u = n.max - r + s, d = this.includeRange(u - s, u, !1), f = this.includeRange(l, l + s, !1);
6947
+ return this._toggled = !1, d ? (this._toggleDirection = DIRECTION.PREV, this._togglePosition = this.range.max + n.min - n.max + r, this.toggle(Infinity, t.position)) : f ? (this._toggleDirection = DIRECTION.NEXT, this._togglePosition = this.range.min + n.max - s + r, this.toggle(-Infinity, t.position)) : (this._toggleDirection = DIRECTION.NONE, this._togglePosition = 0), this;
6948
+ }
6949
+ _updateAlignPos() {
6950
+ this._alignPos = parseAlign$1(this._align, this._size);
6951
+ }
6952
+ _resetInternalStates() {
6953
+ this._size = 0, this._pos = 0, this._margin = {
6954
+ prev: 0,
6955
+ next: 0
6956
+ }, this._height = 0, this._alignPos = 0, this._toggled = !1, this._togglePosition = 0, this._toggleDirection = DIRECTION.NONE;
6957
+ }
6958
+ }, NormalRenderingStrategy = class {
6959
+ constructor(e) {
6960
+ let { providerCtor: t } = e;
6961
+ this._providerCtor = t;
6962
+ }
6963
+ renderPanels() {}
6964
+ getRenderingIndexesByOrder(e) {
6965
+ let t = e.renderer.panels.filter((e) => e.rendered), n = t.filter((e) => e.toggled && e.toggleDirection === DIRECTION.PREV), r = t.filter((e) => e.toggled && e.toggleDirection === DIRECTION.NEXT), i = t.filter((e) => !e.toggled);
6966
+ return [
6967
+ ...n,
6968
+ ...i,
6969
+ ...r
6970
+ ].map((e) => e.index);
6971
+ }
6972
+ getRenderingElementsByOrder(e) {
6973
+ let t = e.panels;
6974
+ return this.getRenderingIndexesByOrder(e).map((e) => t[e].element);
6975
+ }
6976
+ updateRenderingPanels(e) {
6977
+ e.renderOnlyVisible ? this._showOnlyVisiblePanels(e) : e.panels.forEach((e) => e.markForShow());
6978
+ }
6979
+ collectPanels(e, t) {
6980
+ let n = parsePanelAlign(e.renderer.align);
6981
+ return t.map((t, r) => new Panel({
6982
+ index: r,
6983
+ elementProvider: new this._providerCtor(t),
6984
+ align: n,
6985
+ flicking: e
6986
+ }));
6987
+ }
6988
+ createPanel(e, t) {
6989
+ return new Panel(__spreadProps$1(__spreadValues$1({}, t), { elementProvider: new this._providerCtor(e) }));
6990
+ }
6991
+ updatePanelSizes(e, t) {
6992
+ e.panels.forEach((e) => e.setSize(t));
6993
+ }
6994
+ _showOnlyVisiblePanels(e) {
6995
+ let t = e.renderer.panels, n = e.camera, r = n.visiblePanels.reduce((e, t) => (e[t.index] = !0, e), {});
6996
+ t.forEach((t) => {
6997
+ t.index in r || t.loading ? t.markForShow() : e.holding || t.markForHide();
6998
+ }), n.updateOffset();
6999
+ }
7000
+ }, VirtualPanel = class extends Panel {
7001
+ get element() {
7002
+ return this._elProvider.element;
7003
+ }
7004
+ get cachedInnerHTML() {
7005
+ return this._cachedInnerHTML;
7006
+ }
7007
+ get elementIndex() {
7008
+ let e = this._flicking, t = e.panelsPerView + 1, n = e.panelCount, r = this._index;
7009
+ return this._toggled && (r = this._toggleDirection === DIRECTION.NEXT ? r + n : r - n), circulateIndex(r, t);
7010
+ }
7011
+ constructor(e) {
7012
+ super(e), e.elementProvider.init(this), this._elProvider = e.elementProvider, this._cachedInnerHTML = null;
7013
+ }
7014
+ cacheRenderResult(e) {
7015
+ this._cachedInnerHTML = e;
7016
+ }
7017
+ uncacheRenderResult() {
7018
+ this._cachedInnerHTML = null;
7019
+ }
7020
+ render() {
7021
+ let { renderPanel: e, cache: t } = this._flicking.virtual, n = this._elProvider.element, r = this._cachedInnerHTML || e(this, this._index);
7022
+ r !== n.innerHTML && (n.innerHTML = r, t && this.cacheRenderResult(r));
7023
+ }
7024
+ increaseIndex(e) {
7025
+ return this.uncacheRenderResult(), super.increaseIndex(e);
7026
+ }
7027
+ decreaseIndex(e) {
7028
+ return this.uncacheRenderResult(), super.decreaseIndex(e);
7029
+ }
7030
+ }, VirtualRenderingStrategy = class {
7031
+ renderPanels(e) {
7032
+ let t = e.virtual, n = e.visiblePanels, r = range(e.panelsPerView + 1);
7033
+ n.forEach((e) => {
7034
+ let n = e.elementIndex;
7035
+ e.render(), t.show(n), r[n] = -1;
7036
+ }), r.filter((e) => e >= 0).forEach((e) => {
7037
+ t.hide(e);
7038
+ });
7039
+ }
7040
+ getRenderingIndexesByOrder(e) {
7041
+ let t = e.virtual, n = [...e.visiblePanels].filter((e) => e.rendered).sort((e, t) => e.position + e.offset - (t.position + t.offset));
7042
+ if (n.length <= 0) return t.elements.map((e, t) => t);
7043
+ let r = n.map((e) => e.elementIndex), i = t.elements.map((e, t) => __spreadProps$1(__spreadValues$1({}, e), { idx: t })).filter((e) => !e.visible).map((e) => e.idx);
7044
+ return [...r, ...i];
7045
+ }
7046
+ getRenderingElementsByOrder(e) {
7047
+ let t = e.virtual.elements;
7048
+ return this.getRenderingIndexesByOrder(e).map((e) => t[e].nativeElement);
7049
+ }
7050
+ updateRenderingPanels(e) {
7051
+ let t = e.renderer.panels, n = e.camera, r = n.visiblePanels.reduce((e, t) => (e[t.index] = !0, e), {});
7052
+ t.forEach((e) => {
7053
+ e.index in r || e.loading ? e.markForShow() : e.markForHide();
7054
+ }), n.updateOffset();
7055
+ }
7056
+ collectPanels(e) {
7057
+ let t = parsePanelAlign(e.renderer.align);
7058
+ return range(e.virtual.initialPanelCount).map((n) => new VirtualPanel({
7059
+ index: n,
7060
+ elementProvider: new VirtualElementProvider(e),
7061
+ align: t,
7062
+ flicking: e
7063
+ }));
7064
+ }
7065
+ createPanel(e, t) {
7066
+ return new VirtualPanel(__spreadProps$1(__spreadValues$1({}, t), { elementProvider: new VirtualElementProvider(t.flicking) }));
7067
+ }
7068
+ updatePanelSizes(e, t) {
7069
+ e.virtual.elements.forEach((e) => {
7070
+ setSize(e.nativeElement, t);
7071
+ }), e.panels.forEach((e) => e.setSize(t));
7072
+ }
7073
+ }, _Flicking = class extends Component {
7074
+ constructor(e, t = {}) {
7075
+ super(), this._scheduleResize = !1;
7076
+ let { align: n = ALIGN.CENTER, defaultIndex: r = 0, horizontal: i = !0, circular: s = !1, circularFallback: l = CIRCULAR_FALLBACK.LINEAR, bound: u = !1, adaptive: d = !1, panelsPerView: f = -1, noPanelStyleOverride: p = !1, resizeOnContentsReady: m = !1, nested: g = !1, needPanelThreshold: _ = 0, preventEventsBeforeInit: v = !0, deceleration: y = .0075, duration: b = 500, easing: x = (e) => 1 - __pow(1 - e, 3), inputType: S = ["mouse", "touch"], moveType: C = "snap", threshold: w = 40, dragThreshold: T = 1, interruptable: E = !0, bounce: D = "20%", iOSEdgeSwipeThreshold: O = 30, preventClickOnDrag: k = !0, preventDefaultOnDrag: A = !1, disableOnInit: j = !1, changeOnHold: M = !1, renderOnlyVisible: N = !1, virtual: P = null, autoInit: F = !0, autoResize: I = !0, useResizeObserver: L = !0, resizeDebounce: R = 0, observePanelResize: z = !1, maxResizeDebounce: B = 100, useFractionalSize: V = !1, externalRenderer: H = null, renderExternal: U = null, optimizeSizeUpdate: W = !1, animationThreshold: G = .5, useCSSOrder: K = !1 } = t;
7077
+ this._initialized = !1, this._plugins = [], this._isResizing = !1, this._align = n, this._defaultIndex = r, this._horizontal = i, this._circular = s, this._circularFallback = l, this._bound = u, this._adaptive = d, this._panelsPerView = f, this._noPanelStyleOverride = p, this._resizeOnContentsReady = m, this._nested = g, this._virtual = P, this._needPanelThreshold = _, this._preventEventsBeforeInit = v, this._deceleration = y, this._duration = b, this._easing = x, this._inputType = S, this._moveType = C, this._threshold = w, this._dragThreshold = T, this._interruptable = E, this._bounce = D, this._iOSEdgeSwipeThreshold = O, this._preventClickOnDrag = k, this._preventDefaultOnDrag = A, this._disableOnInit = j, this._changeOnHold = M, this._renderOnlyVisible = N, this._autoInit = F, this._autoResize = I, this._useResizeObserver = L, this._resizeDebounce = R, this._maxResizeDebounce = B, this._observePanelResize = z, this._useFractionalSize = V, this._externalRenderer = H, this._renderExternal = U, this._optimizeSizeUpdate = W, this._animationThreshold = G, this._useCSSOrder = K, this._viewport = new Viewport(this, getElement(e)), this._autoResizer = new AutoResizer(this), this._renderer = this._createRenderer(), this._camera = this._createCamera(), this._control = this._createControl(), this._virtualManager = new VirtualManager(this, P), this._autoInit && this.init();
7078
+ }
7079
+ get control() {
7080
+ return this._control;
7081
+ }
7082
+ get camera() {
7083
+ return this._camera;
7084
+ }
7085
+ get renderer() {
7086
+ return this._renderer;
7087
+ }
7088
+ get viewport() {
7089
+ return this._viewport;
7090
+ }
7091
+ get autoResizer() {
7092
+ return this._autoResizer;
7093
+ }
7094
+ get initialized() {
7095
+ return this._initialized;
7096
+ }
7097
+ get circularEnabled() {
7098
+ return this._camera.circularEnabled;
7099
+ }
7100
+ get virtualEnabled() {
7101
+ return this._panelsPerView > 0 && this._virtual != null;
7102
+ }
7103
+ get index() {
7104
+ return this._control.activeIndex;
7105
+ }
7106
+ get element() {
7107
+ return this._viewport.element;
7108
+ }
7109
+ get currentPanel() {
7110
+ return this._control.activePanel;
7111
+ }
7112
+ get panels() {
7113
+ return this._renderer.panels;
7114
+ }
7115
+ get panelCount() {
7116
+ return this._renderer.panelCount;
7117
+ }
7118
+ get visiblePanels() {
7119
+ return this._camera.visiblePanels;
7120
+ }
7121
+ get animating() {
7122
+ return this._control.animating;
7123
+ }
7124
+ get holding() {
7125
+ return this._control.holding;
7126
+ }
7127
+ get activePlugins() {
7128
+ return this._plugins;
7129
+ }
7130
+ get align() {
7131
+ return this._align;
7132
+ }
7133
+ get defaultIndex() {
7134
+ return this._defaultIndex;
7135
+ }
7136
+ get horizontal() {
7137
+ return this._horizontal;
7138
+ }
7139
+ get circular() {
7140
+ return this._circular;
7141
+ }
7142
+ get circularFallback() {
7143
+ return this._circularFallback;
7144
+ }
7145
+ get bound() {
7146
+ return this._bound;
7147
+ }
7148
+ get adaptive() {
7149
+ return this._adaptive;
7150
+ }
7151
+ get panelsPerView() {
7152
+ return this._panelsPerView;
7153
+ }
7154
+ get noPanelStyleOverride() {
7155
+ return this._noPanelStyleOverride;
7156
+ }
7157
+ get resizeOnContentsReady() {
7158
+ return this._resizeOnContentsReady;
7159
+ }
7160
+ get nested() {
7161
+ return this._nested;
7162
+ }
7163
+ get needPanelThreshold() {
7164
+ return this._needPanelThreshold;
7165
+ }
7166
+ get preventEventsBeforeInit() {
7167
+ return this._preventEventsBeforeInit;
7168
+ }
7169
+ get deceleration() {
7170
+ return this._deceleration;
7171
+ }
7172
+ get easing() {
7173
+ return this._easing;
7174
+ }
7175
+ get duration() {
7176
+ return this._duration;
7177
+ }
7178
+ get inputType() {
7179
+ return this._inputType;
7180
+ }
7181
+ get moveType() {
7182
+ return this._moveType;
7183
+ }
7184
+ get threshold() {
7185
+ return this._threshold;
7186
+ }
7187
+ get dragThreshold() {
7188
+ return this._dragThreshold;
7189
+ }
7190
+ get animationThreshold() {
7191
+ return this._animationThreshold;
7192
+ }
7193
+ get useCSSOrder() {
7194
+ return this._useCSSOrder;
7195
+ }
7196
+ get interruptable() {
7197
+ return this._interruptable;
7198
+ }
7199
+ get bounce() {
7200
+ return this._bounce;
7201
+ }
7202
+ get iOSEdgeSwipeThreshold() {
7203
+ return this._iOSEdgeSwipeThreshold;
7204
+ }
7205
+ get preventClickOnDrag() {
7206
+ return this._preventClickOnDrag;
7207
+ }
7208
+ get preventDefaultOnDrag() {
7209
+ return this._preventDefaultOnDrag;
7210
+ }
7211
+ get disableOnInit() {
7212
+ return this._disableOnInit;
7213
+ }
7214
+ get changeOnHold() {
7215
+ return this._changeOnHold;
7216
+ }
7217
+ get renderOnlyVisible() {
7218
+ return this._renderOnlyVisible;
7219
+ }
7220
+ get virtual() {
7221
+ return this._virtualManager;
7222
+ }
7223
+ get autoInit() {
7224
+ return this._autoInit;
7225
+ }
7226
+ get autoResize() {
7227
+ return this._autoResize;
7228
+ }
7229
+ get useResizeObserver() {
7230
+ return this._useResizeObserver;
7231
+ }
7232
+ get observePanelResize() {
7233
+ return this._observePanelResize;
7234
+ }
7235
+ get resizeDebounce() {
7236
+ return this._resizeDebounce;
7237
+ }
7238
+ get maxResizeDebounce() {
7239
+ return this._maxResizeDebounce;
7240
+ }
7241
+ get useFractionalSize() {
7242
+ return this._useFractionalSize;
7243
+ }
7244
+ get externalRenderer() {
7245
+ return this._externalRenderer;
7246
+ }
7247
+ get renderExternal() {
7248
+ return this._renderExternal;
7249
+ }
7250
+ get optimizeSizeUpdate() {
7251
+ return this._optimizeSizeUpdate;
7252
+ }
7253
+ set align(e) {
7254
+ this._align = e, this._renderer.align = e, this._camera.align = e, this.resize();
7255
+ }
7256
+ set defaultIndex(e) {
7257
+ this._defaultIndex = e;
7258
+ }
7259
+ set horizontal(e) {
7260
+ this._horizontal = e, this._control.controller.updateDirection(), this.resize();
7261
+ }
7262
+ set circular(e) {
7263
+ this._circular = e, this.resize();
7264
+ }
7265
+ set bound(e) {
7266
+ this._bound = e, this.resize();
7267
+ }
7268
+ set adaptive(e) {
7269
+ this._adaptive = e, this.resize();
7270
+ }
7271
+ set panelsPerView(e) {
7272
+ this._panelsPerView = e, this.resize();
7273
+ }
7274
+ set noPanelStyleOverride(e) {
7275
+ this._noPanelStyleOverride = e, this.resize();
7276
+ }
7277
+ set resizeOnContentsReady(e) {
7278
+ this._resizeOnContentsReady = e, e && this._renderer.checkPanelContentsReady(this._renderer.panels);
7279
+ }
7280
+ set nested(e) {
7281
+ this._nested = e;
7282
+ let t = this._control.controller.axes;
7283
+ t && (t.options.nested = e);
7284
+ }
7285
+ set needPanelThreshold(e) {
7286
+ this._needPanelThreshold = e;
7287
+ }
7288
+ set preventEventsBeforeInit(e) {
7289
+ this._preventEventsBeforeInit = e;
7290
+ }
7291
+ set deceleration(e) {
7292
+ this._deceleration = e;
7293
+ let t = this._control.controller.axes;
7294
+ t && (t.options.deceleration = e);
7295
+ }
7296
+ set easing(e) {
7297
+ this._easing = e;
7298
+ let t = this._control.controller.axes;
7299
+ t && (t.options.easing = e);
7300
+ }
7301
+ set duration(e) {
7302
+ this._duration = e;
7303
+ }
7304
+ set inputType(e) {
7305
+ this._inputType = e;
7306
+ let t = this._control.controller.panInput;
7307
+ t && (t.options.inputType = e);
7308
+ }
7309
+ set moveType(e) {
7310
+ this._moveType = e;
7311
+ let t = this._control, n = this._createControl(), r = t.activePanel;
7312
+ n.copy(t);
7313
+ let i = r ? this._camera.getProgressInPanel(r) : 0;
7314
+ this._control = n, this._control.updatePosition(i), this._control.updateInput();
7315
+ }
7316
+ set threshold(e) {
7317
+ this._threshold = e;
7318
+ }
7319
+ set dragThreshold(e) {
7320
+ this._dragThreshold = e;
7321
+ let t = this._control.controller.panInput;
7322
+ t && (t.options.threshold = e);
7323
+ }
7324
+ set animationThreshold(e) {
7325
+ this._animationThreshold = e;
7326
+ }
7327
+ set useCSSOrder(e) {
7328
+ this._useCSSOrder = e;
7329
+ }
7330
+ set interruptable(e) {
7331
+ this._interruptable = e;
7332
+ let t = this._control.controller.axes;
7333
+ t && (t.options.interruptable = e);
7334
+ }
7335
+ set bounce(e) {
7336
+ this._bounce = e, this._control.updateInput();
7337
+ }
7338
+ set iOSEdgeSwipeThreshold(e) {
7339
+ this._iOSEdgeSwipeThreshold = e;
7340
+ let t = this._control.controller.panInput;
7341
+ t && (t.options.iOSEdgeSwipeThreshold = e);
7342
+ }
7343
+ set preventClickOnDrag(e) {
7344
+ if (e === this._preventClickOnDrag) return;
7345
+ let t = this._control.controller;
7346
+ e ? t.addPreventClickHandler() : t.removePreventClickHandler(), this._preventClickOnDrag = e;
7347
+ }
7348
+ set preventDefaultOnDrag(e) {
7349
+ this._preventDefaultOnDrag = e;
7350
+ let t = this._control.controller.panInput;
7351
+ t && (t.options.preventDefaultOnDrag = e);
7352
+ }
7353
+ set disableOnInit(e) {
7354
+ this._disableOnInit = e;
7355
+ }
7356
+ set changeOnHold(e) {
7357
+ this._changeOnHold = e;
7358
+ }
7359
+ set renderOnlyVisible(e) {
7360
+ this._renderOnlyVisible = e, this._renderer.render();
7361
+ }
7362
+ set autoResize(e) {
7363
+ this._autoResize = e, this._initialized && (e ? this._autoResizer.enable() : this._autoResizer.disable());
7364
+ }
7365
+ set useResizeObserver(e) {
7366
+ this._useResizeObserver = e, this._initialized && this._autoResize && this._autoResizer.enable();
7367
+ }
7368
+ set observePanelResize(e) {
7369
+ this._observePanelResize = e, this._initialized && this._autoResize && (e ? this._autoResizer.observePanels() : this._autoResizer.unobservePanels());
7370
+ }
7371
+ set optimizeSizeUpdate(e) {
7372
+ this._optimizeSizeUpdate = e;
7373
+ }
7374
+ init() {
7375
+ if (this._initialized) return Promise.resolve();
7376
+ let e = this._camera, t = this._renderer, n = this._control, r = this._virtualManager, i = this.trigger, s = this._preventEventsBeforeInit;
7377
+ return e.init(), r.init(), t.init(this), n.init(this), s && (this.trigger = () => this), this._initialResize(), this._moveToInitialPanel(), this._autoResize && this._autoResizer.enable(), this._preventClickOnDrag && n.controller.addPreventClickHandler(), this._disableOnInit && this.disableInput(), t.checkPanelContentsReady(t.panels), this._initialized = !0, t.render().then(() => {
7378
+ this._plugins.forEach((e) => e.init(this)), s && (this.trigger = i), this.trigger(new ComponentEvent$1(EVENTS.READY));
7379
+ });
7380
+ }
7381
+ destroy() {
7382
+ this.off(), this._autoResizer.disable(), this._control.destroy(), this._camera.destroy(), this._renderer.destroy(), this._plugins.forEach((e) => e.destroy()), this._scheduleResize = !1, this._initialized = !1, this._isResizing = !1;
7383
+ }
7384
+ prev(e = this._duration) {
7385
+ var t, n, r;
7386
+ return this.moveTo(this._control.activePanel?.prev()?.index ?? -1, e, DIRECTION.PREV);
7387
+ }
7388
+ next(e = this._duration) {
7389
+ var t, n, r;
7390
+ return this.moveTo(this._control.activePanel?.next()?.index ?? this._renderer.panelCount, e, DIRECTION.NEXT);
7391
+ }
7392
+ moveTo(e, t = this._duration, n = DIRECTION.NONE) {
7393
+ let r = this._renderer, i = r.panelCount, s = r.getPanel(e);
7394
+ return s ? this._control.animating ? Promise.reject(new FlickingError(MESSAGE.ANIMATION_ALREADY_PLAYING, CODE.ANIMATION_ALREADY_PLAYING)) : (this._control.holding && this._control.controller.release(), this._control.moveToPanel(s, {
7395
+ duration: t,
7396
+ direction: n
7397
+ })) : Promise.reject(new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(e, 0, i - 1), CODE.INDEX_OUT_OF_RANGE));
7398
+ }
7399
+ updateAnimation(e, t, n) {
7400
+ if (!this._control.animating) return;
7401
+ let r = this._renderer, i = r.panelCount, s = r.getPanel(e);
7402
+ if (!s) throw new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(e, 0, i - 1), CODE.INDEX_OUT_OF_RANGE);
7403
+ this._control.updateAnimation(s, t, n);
7404
+ }
7405
+ stopAnimation() {
7406
+ this._control.animating && this._control.stopAnimation();
7407
+ }
7408
+ getPanel(e) {
7409
+ return this._renderer.getPanel(e);
7410
+ }
7411
+ enableInput() {
7412
+ return this._control.enable(), this;
7413
+ }
7414
+ disableInput() {
7415
+ return this._control.disable(), this;
7416
+ }
7417
+ getStatus(e = {}) {
7418
+ var t, n;
7419
+ let { index: r = !0, position: i = !0, includePanelHTML: s = !1, visiblePanelsOnly: l = !1 } = e, u = this._camera, d = { panels: (l ? this.visiblePanels : this.panels).map((e) => {
7420
+ let t = { index: e.index };
7421
+ return s && (t.html = e.element.outerHTML), t;
7422
+ }) };
7423
+ if (r && (d.index = this.index), i) {
7424
+ let e = u.findNearestAnchor(u.position);
7425
+ e && (d.position = {
7426
+ panel: e.panel.index,
7427
+ progressInPanel: u.getProgressInPanel(e.panel)
7428
+ });
7429
+ }
7430
+ return l && (d.visibleOffset = this.visiblePanels[0]?.index ?? 0), d;
7431
+ }
7432
+ setStatus(e) {
7433
+ var t;
7434
+ if (!this._initialized) throw new FlickingError(MESSAGE.NOT_INITIALIZED, CODE.NOT_INITIALIZED);
7435
+ let { index: n, position: r, visibleOffset: i, panels: s } = e, l = this._renderer, u = this._control;
7436
+ if (s[0]?.html && !this._renderExternal && (l.batchRemove({
7437
+ index: 0,
7438
+ deleteCount: this.panels.length,
7439
+ hasDOMInElements: !0
7440
+ }), l.batchInsert({
7441
+ index: 0,
7442
+ elements: parseElement(s.map((e) => e.html)),
7443
+ hasDOMInElements: !0
7444
+ })), n != null) {
7445
+ let e = i ? n - i : n;
7446
+ this.moveTo(e, 0).catch(() => void 0);
7447
+ }
7448
+ if (r && this._moveType === MOVE_TYPE.FREE_SCROLL) {
7449
+ let { panel: e, progressInPanel: t } = r, n = i ? e - i : e, s = l.panels[n].range, d = s.min + (s.max - s.min) * t;
7450
+ u.moveToPosition(d, 0).catch(() => void 0);
7451
+ }
7452
+ }
7453
+ addPlugins(...e) {
7454
+ return this._initialized && e.forEach((e) => e.init(this)), this._plugins.push(...e), this;
7455
+ }
7456
+ removePlugins(...e) {
7457
+ return e.forEach((e) => {
7458
+ let t = findIndex(this._plugins, (t) => t === e);
7459
+ t >= 0 && (e.destroy(), this._plugins.splice(t, 1));
7460
+ }), this;
7461
+ }
7462
+ resize() {
7463
+ return __async$1(this, null, function* () {
7464
+ if (!this._initialized) return;
7465
+ if (this._isResizing) {
7466
+ this._scheduleResize = !0;
7467
+ return;
7468
+ }
7469
+ this._scheduleResize = !1, this._isResizing = !0;
7470
+ let e = this._viewport, t = this._renderer, n = this._camera, r = this._control, i = r.activePanel, s = e.width, l = e.height, u = i ? n.getProgressInPanel(i) : 0;
7471
+ if (this.trigger(new ComponentEvent$1(EVENTS.BEFORE_RESIZE, {
7472
+ width: s,
7473
+ height: l,
7474
+ element: e.element
7475
+ })), e.resize(), this._optimizeSizeUpdate ? (this.horizontal && e.width !== s || !this.horizontal && e.height !== l) && (yield t.forceRenderAllPanels()) : yield t.forceRenderAllPanels(), !this._initialized || (t.updatePanelSize(), n.updateAlignPos(), n.updateRange(), n.updateAnchors(), n.updateAdaptiveHeight(), n.updatePanelOrder(), n.updateOffset(), yield t.render(), !this._initialized)) return;
7476
+ r.animating || (r.updatePosition(u), r.updateInput());
7477
+ let d = e.width, f = e.height, p = d !== s || f !== l;
7478
+ this.trigger(new ComponentEvent$1(EVENTS.AFTER_RESIZE, {
7479
+ width: e.width,
7480
+ height: e.height,
7481
+ prev: {
7482
+ width: s,
7483
+ height: l
7484
+ },
7485
+ sizeChanged: p,
7486
+ element: e.element
7487
+ })), this._isResizing = !1, this._scheduleResize && this.resize();
7488
+ });
7489
+ }
7490
+ append(e) {
7491
+ return this.insert(this._renderer.panelCount, e);
7492
+ }
7493
+ prepend(e) {
7494
+ return this.insert(0, e);
7495
+ }
7496
+ insert(e, t) {
7497
+ if (this._renderExternal) throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK);
7498
+ return this._renderer.batchInsert({
7499
+ index: e,
7500
+ elements: parseElement(t),
7501
+ hasDOMInElements: !0
7502
+ });
7503
+ }
7504
+ remove(e, t = 1) {
7505
+ if (this._renderExternal) throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK);
7506
+ return this._renderer.batchRemove({
7507
+ index: e,
7508
+ deleteCount: t,
7509
+ hasDOMInElements: !0
7510
+ });
7511
+ }
7512
+ _createControl() {
7513
+ var e;
7514
+ let t = this._moveType, n = Object.keys(MOVE_TYPE).map((e) => MOVE_TYPE[e]), r = Array.isArray(t) ? t[0] : t, i = Array.isArray(t) ? t[1] ?? {} : {};
7515
+ if (!includes(n, r)) throw new FlickingError(MESSAGE.WRONG_OPTION("moveType", JSON.stringify(t)), CODE.WRONG_OPTION);
7516
+ switch (r) {
7517
+ case MOVE_TYPE.SNAP: return new SnapControl(i);
7518
+ case MOVE_TYPE.FREE_SCROLL: return new FreeControl(i);
7519
+ case MOVE_TYPE.STRICT: return new StrictControl(i);
7520
+ }
7521
+ }
7522
+ _createCamera() {
7523
+ return this._circular && this._bound && console.warn("\"circular\" and \"bound\" option cannot be used together, ignoring bound."), new Camera(this, { align: this._align });
7524
+ }
7525
+ _createRenderer() {
7526
+ let e = this._externalRenderer;
7527
+ 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());
7528
+ }
7529
+ _createExternalRenderer() {
7530
+ let { renderer: e, rendererOptions: t } = this._renderExternal;
7531
+ return new e(__spreadValues$1({ align: this._align }, t));
7532
+ }
7533
+ _createVanillaRenderer() {
7534
+ let e = this.virtualEnabled;
7535
+ return new VanillaRenderer({
7536
+ align: this._align,
7537
+ strategy: e ? new VirtualRenderingStrategy() : new NormalRenderingStrategy({ providerCtor: VanillaElementProvider })
7538
+ });
7539
+ }
7540
+ _moveToInitialPanel() {
7541
+ let e = this._renderer, t = this._control, n = this._camera, r = e.getPanel(this._defaultIndex) || e.getPanel(0);
7542
+ if (!r) return;
7543
+ let i = n.findNearestAnchor(r.position), s = i && r.position !== i.panel.position && r.index !== i.panel.index ? i.panel : r;
7544
+ if (t.setActive(s, null, !1), !i) throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(s.position), CODE.POSITION_NOT_REACHABLE);
7545
+ let l = s.position;
7546
+ n.canReach(s) || (l = i.position), n.lookAt(l), t.updateInput(), n.updateOffset();
7547
+ }
7548
+ _initialResize() {
7549
+ let e = this._viewport, t = this._renderer, n = this._camera, r = this._control;
7550
+ this.trigger(new ComponentEvent$1(EVENTS.BEFORE_RESIZE, {
7551
+ width: 0,
7552
+ height: 0,
7553
+ element: e.element
7554
+ })), e.resize(), t.updatePanelSize(), n.updateAlignPos(), n.updateRange(), n.updateAnchors(), n.updateOffset(), r.updateInput();
7555
+ let i = e.width, s = e.height, l = i !== 0 || s !== 0;
7556
+ this.trigger(new ComponentEvent$1(EVENTS.AFTER_RESIZE, {
7557
+ width: e.width,
7558
+ height: e.height,
7559
+ prev: {
7560
+ width: 0,
7561
+ height: 0
7562
+ },
7563
+ sizeChanged: l,
7564
+ element: e.element
7565
+ }));
7566
+ }
7567
+ };
7568
+ _Flicking.VERSION = "4.16.4";
7569
+ var Flicking$1 = _Flicking, getDefaultCameraTransform = (e = ALIGN.CENTER, t = !0, n) => {
7570
+ let r = getCameraAlign(e), i = getPanelAlign(e);
7571
+ if (i == null) return "";
7572
+ let s = `calc(${r} - (${n || "0px"} * ${i.percentage}) - ${i.absolute}px)`;
7573
+ return t ? `translate(${s})` : `translate(0, ${s})`;
7574
+ }, getCameraAlign = (e) => parseAlign(typeof e == "object" ? e.camera : e), getPanelAlign = (e) => parseArithmeticExpression(parseAlign(typeof e == "object" ? e.panel : e)), parseAlign = (e) => {
7575
+ if (typeof e == "number") return `${e}px`;
7576
+ switch (e) {
7577
+ case ALIGN.CENTER: return "50%";
7578
+ case ALIGN.NEXT: return "100%";
7579
+ case ALIGN.PREV: return "0%";
7580
+ default: return e;
7581
+ }
7582
+ }, getRenderingPanels = (e, t) => {
7583
+ let n = t.removed.reduce((e, t) => (e[t] = !0, e), {}), r = t.maintained.reduce((e, [t, n]) => (e[t] = n, e), {}), i = e.panels.filter((e) => !n[e.index]);
7584
+ return e.useCSSOrder || i.sort((e, t) => e.position + e.offset - (t.position + t.offset)), [...i.map((e) => t.list[r[e.index]]), ...t.added.map((e) => t.list[e])];
7585
+ }, sync = (e, t, n) => {
7586
+ let r = e.renderer, i = r.panels, s = [...t.prevList], l = [], u = [];
7587
+ if (t.removed.length > 0) {
7588
+ let e = -1, n = -1;
7589
+ t.removed.forEach((t) => {
7590
+ e < 0 && (e = t), n >= 0 && t !== n - 1 ? (u.push(...batchRemove(r, n, e + 1)), e = t, n = t) : n = t, s.splice(t, 1);
7591
+ }), u.push(...batchRemove(r, n, e + 1));
7592
+ }
7593
+ if (t.ordered.forEach(([e, t]) => {
7594
+ let n = i.splice(e, 1)[0];
7595
+ i.splice(t, 0, n);
7596
+ }), t.ordered.length > 0 && (i.forEach((e, t) => {
7597
+ let n = t - e.index;
7598
+ n > 0 ? e.increaseIndex(n) : e.decreaseIndex(-n);
7599
+ }), i.sort((e, t) => e.index - t.index), i.forEach((e) => {
7600
+ e.updatePosition();
7601
+ })), t.added.length > 0) {
7602
+ let e = -1, i = -1, u = n.slice(s.length);
7603
+ t.added.forEach((n, s) => {
7604
+ e < 0 && (e = s), i >= 0 && n !== i + 1 ? (l.push(...batchInsert(r, t, u, e, s + 1)), e = -1, i = -1) : i = n;
7605
+ }), e >= 0 && l.push(...batchInsert(r, t, u, e));
7606
+ }
7607
+ if (t.added.length > 0 || t.removed.length > 0) r.updateAfterPanelChange(l, u);
7608
+ else if (t.ordered.length > 0) {
7609
+ let t = e.camera;
7610
+ t.updateRange(), t.updateOffset(), t.updateAnchors(), t.resetNeedPanelHistory();
7611
+ }
7612
+ }, batchInsert = (e, t, n, r, i) => e.batchInsertDefer(...t.added.slice(r, i).map((e, t) => ({
7613
+ index: e,
7614
+ elements: [n[t]],
7615
+ hasDOMInElements: !1
7616
+ }))), batchRemove = (e, t, n) => {
7617
+ let r = e.panels.slice(t, n);
7618
+ return e.batchRemoveDefer({
7619
+ index: t,
7620
+ deleteCount: r.length,
7621
+ hasDOMInElements: !1
7622
+ });
7623
+ }, withFlickingMethods = (e, t) => {
7624
+ [Component.prototype, Flicking$1.prototype].forEach((n) => {
7625
+ Object.getOwnPropertyNames(n).filter((t) => !e[t] && t.indexOf("_") !== 0 && t !== "constructor").forEach((r) => {
7626
+ let i = Object.getOwnPropertyDescriptor(n, r);
7627
+ if (i.value) Object.defineProperty(e, r, { value: function(...e) {
7628
+ return i.value.call(this[t], ...e);
7629
+ } });
7630
+ else {
7631
+ let n = {};
7632
+ i.get && (n.get = function() {
7633
+ var e;
7634
+ let n = this[t];
7635
+ return n && i.get?.call(n);
7636
+ }), i.set && (n.set = function(...e) {
7637
+ var n;
7638
+ return i.set?.call(this[t], ...e);
7639
+ }), Object.defineProperty(e, r, n);
7640
+ }
7641
+ });
7642
+ });
5015
7643
  }, PolyMap = /*#__PURE__*/ function() {
5016
7644
  function e() {
5017
7645
  this.keys = [], this.values = [];
@@ -6511,7 +9139,7 @@ var _hoisted_1$3 = {
6511
9139
  })])]), createBaseVNode("b", null, [createBaseVNode("span", null, toDisplayString(unref(showPrice)(-unref(f), unref(l))), 1)])])),
6512
9140
  createBaseVNode("li", null, [createBaseVNode("span", null, toDisplayString(unref(t)("booking.reservation.totalPrice")), 1), createBaseVNode("b", null, [createBaseVNode("u", null, toDisplayString(unref(showPrice)(e.totalPrice, unref(l))), 1)])])
6513
9141
  ])]),
6514
- unref(v).actions && e.showTermsNotice ? renderSlot(n.$slots, "actions", { key: 1 }) : createCommentVNode("", !0),
9142
+ unref(v).actions && e.showTermsNotice ? renderSlot(n.$slots, "actions", {}, void 0, void 0, 1) : createCommentVNode("", !0),
6515
9143
  renderSlot(n.$slots, "navigation"),
6516
9144
  e.prevCallback === void 0 ? createCommentVNode("", !0) : (openBlock(), createBlock(Clickable_default, {
6517
9145
  key: 2,
@@ -6615,7 +9243,7 @@ var _hoisted_1$3 = {
6615
9243
  secondary: "",
6616
9244
  onClickEvent: e.prevCallback
6617
9245
  }, null, 8, ["label", "onClickEvent"])),
6618
- unref(v).actions && e.showTermsNotice ? renderSlot(n.$slots, "actions", { key: 1 }) : createCommentVNode("", !0)
9246
+ unref(v).actions && e.showTermsNotice ? renderSlot(n.$slots, "actions", {}, void 0, void 0, 1) : createCommentVNode("", !0)
6619
9247
  ])) : createCommentVNode("", !0)
6620
9248
  ])])])])), [[b]]),
6621
9249
  createBaseVNode("div", _hoisted_34, [createVNode(PoweredByKonnectio_default)])