@konnectio/core 4.7.14 → 4.7.15

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