ire-preview 2.4.14 → 2.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.es.js CHANGED
@@ -79,18 +79,18 @@ function createOptionsStore(Ne, _e, ke, De) {
79
79
  function Ae() {
80
80
  Le || (ke.state.value[Ne] = $e ? $e() : {});
81
81
  const ze = toRefs(ke.state.value[Ne]);
82
- return assign(ze, Re, Object.keys(Be || {}).reduce((je, Fe) => (je[Fe] = markRaw(computed$1(() => {
82
+ return assign(ze, Re, Object.keys(Be || {}).reduce((Ve, Fe) => (Ve[Fe] = markRaw(computed$1(() => {
83
83
  setActivePinia(ke);
84
- const Ve = ke._s.get(Ne);
85
- return Be[Fe].call(Ve, Ve);
86
- })), je), {}));
84
+ const je = ke._s.get(Ne);
85
+ return Be[Fe].call(je, je);
86
+ })), Ve), {}));
87
87
  }
88
88
  return Ie = createSetupStore(Ne, Ae, _e, ke, De, !0), Ie;
89
89
  }
90
90
  function createSetupStore(Ne, _e, ke = {}, De, $e, Re) {
91
91
  let Be;
92
92
  const Le = assign({ actions: {} }, ke), Ie = { deep: !0 };
93
- let Ae, ze, je = [], Fe = [], Ve;
93
+ let Ae, ze, Ve = [], Fe = [], je;
94
94
  const He = De.state.value[Ne];
95
95
  !Re && !He && (De.state.value[Ne] = {}), ref({});
96
96
  let qe;
@@ -99,17 +99,17 @@ function createSetupStore(Ne, _e, ke = {}, De, $e, Re) {
99
99
  Ae = ze = !1, typeof Ke == "function" ? (Ke(De.state.value[Ne]), ei = {
100
100
  type: MutationType.patchFunction,
101
101
  storeId: Ne,
102
- events: Ve
102
+ events: je
103
103
  }) : (mergeReactiveObjects(De.state.value[Ne], Ke), ei = {
104
104
  type: MutationType.patchObject,
105
105
  payload: Ke,
106
106
  storeId: Ne,
107
- events: Ve
107
+ events: je
108
108
  });
109
109
  const ii = qe = Symbol();
110
110
  nextTick().then(() => {
111
111
  qe === ii && (Ae = !0);
112
- }), ze = !0, triggerSubscriptions(je, ei, De.state.value[Ne]);
112
+ }), ze = !0, triggerSubscriptions(Ve, ei, De.state.value[Ne]);
113
113
  }
114
114
  const We = Re ? function() {
115
115
  const { state: ei } = ke, ii = ei ? ei() : {};
@@ -121,7 +121,7 @@ function createSetupStore(Ne, _e, ke = {}, De, $e, Re) {
121
121
  noop
122
122
  );
123
123
  function Ze() {
124
- Be.stop(), je = [], Fe = [], De._s.delete(Ne);
124
+ Be.stop(), Ve = [], Fe = [], De._s.delete(Ne);
125
125
  }
126
126
  const Ge = (Ke, ei = "") => {
127
127
  if (ACTION_MARKER in Ke)
@@ -159,11 +159,11 @@ function createSetupStore(Ne, _e, ke = {}, De, $e, Re) {
159
159
  $patch: Xe,
160
160
  $reset: We,
161
161
  $subscribe(Ke, ei = {}) {
162
- const ii = addSubscription(je, Ke, ei.detached, () => ti()), ti = Be.run(() => watch(() => De.state.value[Ne], (ni) => {
162
+ const ii = addSubscription(Ve, Ke, ei.detached, () => ti()), ti = Be.run(() => watch(() => De.state.value[Ne], (ni) => {
163
163
  (ei.flush === "sync" ? ze : Ae) && Ke({
164
164
  storeId: Ne,
165
165
  type: MutationType.direct,
166
- events: Ve
166
+ events: je
167
167
  }, ni);
168
168
  }, assign({}, Ie, ei)));
169
169
  return ii;
@@ -228,9 +228,9 @@ function storeToRefs(Ne) {
228
228
  }
229
229
  const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
230
230
  const Ne = ref(), _e = ref("1"), ke = ref(), De = ref(), $e = (Ae) => {
231
- var ze, je, Fe;
232
- return (Fe = (je = (ze = ke.value) == null ? void 0 : ze.meta) == null ? void 0 : je.find(
233
- (Ve) => (Ve == null ? void 0 : Ve.meta_key) === Ae
231
+ var ze, Ve, Fe;
232
+ return (Fe = (Ve = (ze = ke.value) == null ? void 0 : ze.meta) == null ? void 0 : Ve.find(
233
+ (je) => (je == null ? void 0 : je.meta_key) === Ae
234
234
  )) == null ? void 0 : Fe.meta_value;
235
235
  }, Re = computed$1(() => $e("open_reserved_flat") === "true"), Be = computed$1(() => $e("open_sold_flat") === "true"), Le = computed$1(() => $e("price_rounded") === "true");
236
236
  return {
@@ -501,11 +501,12 @@ const tr = (Ne) => {
501
501
  )) == null ? void 0 : Re.meta_value) || "usd";
502
502
  return ((Be = Ne.find((Le) => Le.value === ke)) == null ? void 0 : Be.symbol) || "$";
503
503
  }, getPrice = (Ne) => {
504
- const ke = useGlobalStore().priceRounded ? 0 : 2;
505
- return Number(Ne).toLocaleString("en-US", {
504
+ const _e = useGlobalStore(), ke = _e.priceRounded ? 0 : 2;
505
+ let De = Number(Ne).toLocaleString("en-US", {
506
506
  minimumFractionDigits: ke,
507
507
  maximumFractionDigits: ke
508
508
  });
509
+ return _e.getMetaValue("currency") === "chf" && (De = De.replaceAll(",", "'")), De;
509
510
  }, getArea = (Ne) => Number(Ne).toLocaleString(), _hoisted_1$h = {
510
511
  key: 0,
511
512
  class: "irep-tooltip-1 ire-pointer-events-none ire-absolute !ire-bottom-10 !ire-right-10 ire-w-fit ire-select-none ire-rounded-lg ire-border ire-bg-white ire-p-4 ire-text-black"
@@ -556,7 +557,7 @@ const tr = (Ne) => {
556
557
  return (De, $e) => (openBlock(), createElementBlock("div", null, [
557
558
  createVNode(Transition, { name: "ire-fade-in-out" }, {
558
559
  default: withCtx(() => {
559
- var Re, Be, Le, Ie, Ae, ze, je, Fe, Ve, He, qe, Xe, We, Ze, Ge, Ye, Ue, Qe, Je, Ke, ei, ii, ti, ni, oi;
560
+ var Re, Be, Le, Ie, Ae, ze, Ve, Fe, je, He, qe, Xe, We, Ze, Ge, Ye, Ue, Qe, Je, Ke, ei, ii, ti, ni, oi;
560
561
  return [
561
562
  De.type && De.hoveredData && De.type !== "tooltip" ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
562
563
  De.type === "floor" ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
@@ -567,10 +568,10 @@ const tr = (Ne) => {
567
568
  (Be = De.hoveredData) != null && Be.conf || (Ie = (Le = De.hoveredData) == null ? void 0 : Le.flats) != null && Ie.length ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
568
569
  ke.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(ke.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_8$3, [
569
570
  (ze = (Ae = De.hoveredData) == null ? void 0 : Ae.counts) != null && ze.available ? (openBlock(), createElementBlock("div", _hoisted_9$3, [
570
- createElementVNode("div", _hoisted_10$3, toDisplayString(((Fe = (je = De.hoveredData) == null ? void 0 : je.counts) == null ? void 0 : Fe.available) || 0), 1),
571
+ createElementVNode("div", _hoisted_10$3, toDisplayString(((Fe = (Ve = De.hoveredData) == null ? void 0 : Ve.counts) == null ? void 0 : Fe.available) || 0), 1),
571
572
  createElementVNode("div", _hoisted_11$3, toDisplayString(unref(tr)("available")), 1)
572
573
  ])) : createCommentVNode("", !0),
573
- (He = (Ve = De.hoveredData) == null ? void 0 : Ve.counts) != null && He.reserved ? (openBlock(), createElementBlock("div", _hoisted_12$3, [
574
+ (He = (je = De.hoveredData) == null ? void 0 : je.counts) != null && He.reserved ? (openBlock(), createElementBlock("div", _hoisted_12$3, [
574
575
  createElementVNode("div", _hoisted_13$2, toDisplayString((Xe = (qe = De.hoveredData) == null ? void 0 : qe.counts) == null ? void 0 : Xe.reserved), 1),
575
576
  createElementVNode("div", _hoisted_14$2, toDisplayString(unref(tr)("reserved")), 1)
576
577
  ])) : createCommentVNode("", !0),
@@ -660,7 +661,7 @@ const tr = (Ne) => {
660
661
  return tr((Re = _e.hoveredData) == null ? void 0 : Re.conf);
661
662
  });
662
663
  return (Re, Be) => {
663
- var Le, Ie, Ae, ze, je, Fe, Ve, He, qe, Xe, We, Ze, Ge, Ye, Ue, Qe, Je, Ke, ei, ii, ti;
664
+ var Le, Ie, Ae, ze, Ve, Fe, je, He, qe, Xe, We, Ze, Ge, Ye, Ue, Qe, Je, Ke, ei, ii, ti, ni;
664
665
  return Re.type && Re.hoveredData && Re.type !== "tooltip" ? (openBlock(), createElementBlock("div", {
665
666
  key: 0,
666
667
  class: normalizeClass(["ire-pointer-events-none ire-absolute ire-select-none", {
@@ -690,12 +691,12 @@ const tr = (Ne) => {
690
691
  ]),
691
692
  createElementVNode("div", _hoisted_9$2, [
692
693
  createElementVNode("div", _hoisted_10$2, [
693
- createElementVNode("span", null, toDisplayString($e.value ? 0 : ((je = (ze = Re.hoveredData) == null ? void 0 : ze.counts) == null ? void 0 : je.available) || 0), 1),
694
+ createElementVNode("span", null, toDisplayString($e.value ? 0 : ((Ve = (ze = Re.hoveredData) == null ? void 0 : ze.counts) == null ? void 0 : Ve.available) || 0), 1),
694
695
  createTextVNode(" " + toDisplayString(unref(tr)("available")), 1)
695
696
  ]),
696
697
  Be[1] || (Be[1] = createElementVNode("span", null, "•", -1)),
697
698
  createElementVNode("div", _hoisted_11$2, [
698
- createElementVNode("span", null, toDisplayString($e.value === "sold" ? ((Ve = (Fe = Re.hoveredData) == null ? void 0 : Fe.flats) == null ? void 0 : Ve.length) || 0 : ((qe = (He = Re.hoveredData) == null ? void 0 : He.counts) == null ? void 0 : qe.sold) || 0), 1),
699
+ createElementVNode("span", null, toDisplayString($e.value === "sold" ? ((je = (Fe = Re.hoveredData) == null ? void 0 : Fe.flats) == null ? void 0 : je.length) || 0 : ((qe = (He = Re.hoveredData) == null ? void 0 : He.counts) == null ? void 0 : qe.sold) || 0), 1),
699
700
  createTextVNode(" " + toDisplayString(unref(tr)("sold")), 1)
700
701
  ]),
701
702
  Be[2] || (Be[2] = createElementVNode("span", null, "•", -1)),
@@ -714,7 +715,7 @@ const tr = (Ne) => {
714
715
  createElementVNode("div", _hoisted_19, toDisplayString((Ue = Re.hoveredData) == null ? void 0 : Ue.flat_number), 1),
715
716
  Be[4] || (Be[4] = createElementVNode("span", null, "|", -1)),
716
717
  $e.value ? (openBlock(), createElementBlock("div", _hoisted_20, toDisplayString($e.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_21, [
717
- createElementVNode("div", null, [
718
+ createElementVNode("template", null, [
718
719
  (Qe = Re.hoveredData) != null && Qe.request_price ? (openBlock(), createElementBlock("div", _hoisted_22, toDisplayString(unref(tr)("Request Price")), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
719
720
  Re.hoveredData.offer_price ? (openBlock(), createElementBlock("div", _hoisted_23, [
720
721
  createElementVNode("div", _hoisted_24, [
@@ -725,15 +726,15 @@ const tr = (Ne) => {
725
726
  createTextVNode(toDisplayString(unref(getPrice)(+((Ke = Re.hoveredData) == null ? void 0 : Ke.offer_price))) + " ", 1),
726
727
  createElementVNode("span", _hoisted_26, toDisplayString(unref(currencySymbol)()), 1)
727
728
  ])
728
- ])) : (openBlock(), createElementBlock("div", _hoisted_27, [
729
- createTextVNode(toDisplayString(unref(getPrice)(+((ei = Re.hoveredData) == null ? void 0 : ei.price))) + " ", 1),
729
+ ])) : (ei = Re.hoveredData) != null && ei.price ? (openBlock(), createElementBlock("div", _hoisted_27, [
730
+ createTextVNode(toDisplayString(unref(getPrice)(+((ii = Re.hoveredData) == null ? void 0 : ii.price))) + " ", 1),
730
731
  createElementVNode("span", _hoisted_28, toDisplayString(unref(currencySymbol)()), 1)
731
- ]))
732
+ ])) : createCommentVNode("", !0)
732
733
  ], 64))
733
734
  ]),
734
735
  createElementVNode("div", _hoisted_29, [
735
736
  createElementVNode("span", _hoisted_30, [
736
- createTextVNode(toDisplayString(unref(getArea)(+((ti = (ii = Re.hoveredData) == null ? void 0 : ii.type) == null ? void 0 : ti.area_m2))) + " m", 1),
737
+ createTextVNode(toDisplayString(unref(getArea)(+((ni = (ti = Re.hoveredData) == null ? void 0 : ti.type) == null ? void 0 : ni.area_m2))) + " m", 1),
737
738
  Be[3] || (Be[3] = createElementVNode("sup", { class: "ire-bg-transparent !ire-text-base" }, " 2 ", -1))
738
739
  ])
739
740
  ])
@@ -860,10 +861,10 @@ const tr = (Ne) => {
860
861
  },
861
862
  emits: ["changeComponent"],
862
863
  setup(Ne, { emit: _e }) {
863
- const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re), Ie = ref(), Ae = ref(null), ze = ref(), je = ref(null), Fe = computed(() => {
864
+ const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re), Ie = ref(), Ae = ref(null), ze = ref(), Ve = ref(null), Fe = computed(() => {
864
865
  if (De.project)
865
866
  return De.project.svg;
866
- }), Ve = (Xe) => {
867
+ }), je = (Xe) => {
867
868
  const We = Xe == null ? void 0 : Xe.target;
868
869
  We && (Ae.value = We);
869
870
  }, He = () => {
@@ -892,12 +893,12 @@ const tr = (Ne) => {
892
893
  }, qe = (Xe) => {
893
894
  var Ze, Ge, Ye;
894
895
  const We = Xe.target;
895
- (We == null ? void 0 : We.nodeName) === "path" && (((Ze = ze.value) == null ? void 0 : Ze.conf) === "reserved" && !Be.value || ((Ge = ze.value) == null ? void 0 : Ge.conf) === "sold" && !Le.value || ke("changeComponent", ((Ye = je.value) == null ? void 0 : Ye.type) || "", ze == null ? void 0 : ze.value));
896
+ (We == null ? void 0 : We.nodeName) === "path" && (((Ze = ze.value) == null ? void 0 : Ze.conf) === "reserved" && !Be.value || ((Ge = ze.value) == null ? void 0 : Ge.conf) === "sold" && !Le.value || ke("changeComponent", ((Ye = Ve.value) == null ? void 0 : Ye.type) || "", ze == null ? void 0 : ze.value));
896
897
  };
897
898
  return watch(
898
899
  () => $e == null ? void 0 : $e.value,
899
900
  () => {
900
- $e != null && $e.value || (Ae.value = null, je.value = null);
901
+ $e != null && $e.value || (Ae.value = null, Ve.value = null);
901
902
  }
902
903
  ), watch(
903
904
  () => Ae.value,
@@ -908,9 +909,9 @@ const tr = (Ne) => {
908
909
  const We = Xe.parentElement;
909
910
  if (We && (We == null ? void 0 : We.nodeName) === "g") {
910
911
  const ei = We == null ? void 0 : We.getAttribute("id");
911
- if (!ei || (je.value = ((Ze = De.project) == null ? void 0 : Ze.polygon_data.find((ti) => (ti == null ? void 0 : ti.key) === ei)) || null, !je.value)) return;
912
- const ii = (Ge = je.value) == null ? void 0 : Ge.id;
913
- switch ((Ye = je.value) == null ? void 0 : Ye.type) {
912
+ if (!ei || (Ve.value = ((Ze = De.project) == null ? void 0 : Ze.polygon_data.find((ti) => (ti == null ? void 0 : ti.key) === ei)) || null, !Ve.value)) return;
913
+ const ii = (Ge = Ve.value) == null ? void 0 : Ge.id;
914
+ switch ((Ye = Ve.value) == null ? void 0 : Ye.type) {
914
915
  case "floor":
915
916
  const ti = (Ue = De.floors) == null ? void 0 : Ue.find(
916
917
  (ri) => ri.id === ii
@@ -940,17 +941,17 @@ const tr = (Ne) => {
940
941
  break;
941
942
  }
942
943
  } else
943
- je.value = null, ze.value = null;
944
+ Ve.value = null, ze.value = null;
944
945
  }
945
946
  ), onMounted(() => {
946
- document.addEventListener("mousemove", Ve), He();
947
+ document.addEventListener("mousemove", je), He();
947
948
  }), onUnmounted(() => {
948
- document.removeEventListener("mousemove", Ve);
949
+ document.removeEventListener("mousemove", je);
949
950
  }), (Xe, We) => {
950
951
  var Ze;
951
952
  return openBlock(), createBlock(_sfc_main$i, {
952
953
  hoverdData: ze.value,
953
- type: (Ze = je.value) == null ? void 0 : Ze.type
954
+ type: (Ze = Ve.value) == null ? void 0 : Ze.type
954
955
  }, {
955
956
  default: withCtx(() => {
956
957
  var Ge, Ye, Ue;
@@ -1067,7 +1068,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
1067
1068
  },
1068
1069
  emits: ["changeComponent"],
1069
1070
  setup(Ne, { emit: _e }) {
1070
- const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re), Ie = ref(), Ae = ref(null), ze = ref(), je = ref(null), Fe = ref(), Ve = ref(), He = computed$1(() => {
1071
+ const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re), Ie = ref(), Ae = ref(null), ze = ref(), Ve = ref(null), Fe = ref(), je = ref(), He = computed$1(() => {
1071
1072
  var Ye;
1072
1073
  if ((Ye = De.floor) != null && Ye.svg)
1073
1074
  return De.floor.svg;
@@ -1098,7 +1099,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
1098
1099
  }, We = (Ye) => {
1099
1100
  var Qe, Je, Ke;
1100
1101
  const Ue = Ye.target;
1101
- (Ue == null ? void 0 : Ue.nodeName) === "path" && (je.value && "conf" in je.value && (((Qe = je.value) == null ? void 0 : Qe.conf) === "reserved" && !Be.value || ((Je = je.value) == null ? void 0 : Je.conf) === "sold" && !Le.value) || ke("changeComponent", ((Ke = ze.value) == null ? void 0 : Ke.type) || "", je.value));
1102
+ (Ue == null ? void 0 : Ue.nodeName) === "path" && (Ve.value && "conf" in Ve.value && (((Qe = Ve.value) == null ? void 0 : Qe.conf) === "reserved" && !Be.value || ((Je = Ve.value) == null ? void 0 : Je.conf) === "sold" && !Le.value) || ke("changeComponent", ((Ke = ze.value) == null ? void 0 : Ke.type) || "", Ve.value));
1102
1103
  }, Ze = () => {
1103
1104
  var Ye;
1104
1105
  Ie.value && ((Ye = Ie.value) == null ? void 0 : Ye.querySelectorAll("g")).forEach((Qe) => {
@@ -1118,7 +1119,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
1118
1119
  });
1119
1120
  }, Ge = () => {
1120
1121
  var Ye;
1121
- (Ye = De.floor) != null && Ye.block_id ? ke("changeComponent", "block", Ve.value) : ke("changeComponent", "project", null);
1122
+ (Ye = De.floor) != null && Ye.block_id ? ke("changeComponent", "block", je.value) : ke("changeComponent", "project", null);
1122
1123
  };
1123
1124
  return watch(
1124
1125
  () => Ae.value,
@@ -1140,7 +1141,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
1140
1141
  ...si,
1141
1142
  conf: si.conf || ((ii = De.floor) == null ? void 0 : ii.conf) || ""
1142
1143
  } : null;
1143
- je.value = ri;
1144
+ Ve.value = ri;
1144
1145
  } else if (((ti = ze.value) == null ? void 0 : ti.type) === "tooltip") {
1145
1146
  const si = (ni = De.actions) == null ? void 0 : ni.find(
1146
1147
  (ri) => {
@@ -1148,9 +1149,9 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
1148
1149
  return (ri == null ? void 0 : ri.id) === ((ai = ze.value) == null ? void 0 : ai.id);
1149
1150
  }
1150
1151
  );
1151
- je.value = si ?? null;
1152
+ Ve.value = si ?? null;
1152
1153
  } else
1153
- je.value = null;
1154
+ Ve.value = null;
1154
1155
  } else
1155
1156
  ze.value = null;
1156
1157
  }
@@ -1172,7 +1173,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
1172
1173
  }
1173
1174
  ), onMounted(() => {
1174
1175
  var Ye, Ue, Qe;
1175
- Ve.value = (Ye = De.blocks) == null ? void 0 : Ye.find(
1176
+ je.value = (Ye = De.blocks) == null ? void 0 : Ye.find(
1176
1177
  (Je) => {
1177
1178
  var Ke, ei;
1178
1179
  return (Je == null ? void 0 : Je.id) === ((ei = (Ke = De.floor) == null ? void 0 : Ke.block_id) == null ? void 0 : ei.toString());
@@ -1188,7 +1189,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
1188
1189
  }), (Ye, Ue) => {
1189
1190
  var Qe;
1190
1191
  return openBlock(), createBlock(_sfc_main$i, {
1191
- hoverdData: je.value,
1192
+ hoverdData: Ve.value,
1192
1193
  type: (Qe = ze.value) == null ? void 0 : Qe.type
1193
1194
  }, {
1194
1195
  header: withCtx(() => [
@@ -1526,7 +1527,7 @@ class I extends g {
1526
1527
  Le = De - Be < 0.5 * (ke - Be) ? ke : Be;
1527
1528
  break;
1528
1529
  case "iterateZoom":
1529
- let Ie = [1, ke, Re].sort((ze, je) => ze - je), Ae = Ie.findIndex((ze) => ze > De + 1e-5);
1530
+ let Ie = [1, ke, Re].sort((ze, Ve) => ze - Ve), Ae = Ie.findIndex((ze) => ze > De + 1e-5);
1530
1531
  Le = Ie[Ae] || 1;
1531
1532
  }
1532
1533
  return Le;
@@ -1566,9 +1567,9 @@ class I extends g {
1566
1567
  for (const _e of v) _e === "e" && this.isBouncingX || _e === "f" && this.isBouncingY || (this.velocity[_e] = (1 / (1 - this.friction) - 1) * (this.target[_e] - this.current[_e]));
1567
1568
  }
1568
1569
  checkBounds(_e = 0, ke = 0) {
1569
- const { current: De } = this, $e = De.e + _e, Re = De.f + ke, Be = this.getBounds(), { x: Le, y: Ie } = Be, Ae = Le.min, ze = Le.max, je = Ie.min, Fe = Ie.max;
1570
- let Ve = 0, He = 0;
1571
- return Ae !== 1 / 0 && $e < Ae ? Ve = Ae - $e : ze !== 1 / 0 && $e > ze && (Ve = ze - $e), je !== 1 / 0 && Re < je ? He = je - Re : Fe !== 1 / 0 && Re > Fe && (He = Fe - Re), Math.abs(Ve) < 1e-4 && (Ve = 0), Math.abs(He) < 1e-4 && (He = 0), Object.assign(Object.assign({}, Be), { xDiff: Ve, yDiff: He, inBounds: !Ve && !He });
1570
+ const { current: De } = this, $e = De.e + _e, Re = De.f + ke, Be = this.getBounds(), { x: Le, y: Ie } = Be, Ae = Le.min, ze = Le.max, Ve = Ie.min, Fe = Ie.max;
1571
+ let je = 0, He = 0;
1572
+ return Ae !== 1 / 0 && $e < Ae ? je = Ae - $e : ze !== 1 / 0 && $e > ze && (je = ze - $e), Ve !== 1 / 0 && Re < Ve ? He = Ve - Re : Fe !== 1 / 0 && Re > Fe && (He = Fe - Re), Math.abs(je) < 1e-4 && (je = 0), Math.abs(He) < 1e-4 && (He = 0), Object.assign(Object.assign({}, Be), { xDiff: je, yDiff: He, inBounds: !je && !He });
1572
1573
  }
1573
1574
  clampTargetBounds() {
1574
1575
  const { target: _e } = this, { x: ke, y: De } = this.getBounds();
@@ -1578,7 +1579,7 @@ class I extends g {
1578
1579
  const { content: ke, contentRect: De } = this, { fitWidth: $e, fitHeight: Re, fullWidth: Be, fullHeight: Le } = De;
1579
1580
  let Ie = Be, Ae = Le;
1580
1581
  if (this.option("zoom") || this.angle !== 0) {
1581
- const ze = !(ke instanceof HTMLImageElement) && (window.getComputedStyle(ke).maxWidth === "none" || window.getComputedStyle(ke).maxHeight === "none"), je = ze ? Be : $e, Fe = ze ? Le : Re, Ve = this.getMatrix(_e), He = new DOMPoint(0, 0).matrixTransform(Ve), qe = new DOMPoint(0 + je, 0).matrixTransform(Ve), Xe = new DOMPoint(0 + je, 0 + Fe).matrixTransform(Ve), We = new DOMPoint(0, 0 + Fe).matrixTransform(Ve), Ze = Math.abs(Xe.x - He.x), Ge = Math.abs(Xe.y - He.y), Ye = Math.abs(We.x - qe.x), Ue = Math.abs(We.y - qe.y);
1582
+ const ze = !(ke instanceof HTMLImageElement) && (window.getComputedStyle(ke).maxWidth === "none" || window.getComputedStyle(ke).maxHeight === "none"), Ve = ze ? Be : $e, Fe = ze ? Le : Re, je = this.getMatrix(_e), He = new DOMPoint(0, 0).matrixTransform(je), qe = new DOMPoint(0 + Ve, 0).matrixTransform(je), Xe = new DOMPoint(0 + Ve, 0 + Fe).matrixTransform(je), We = new DOMPoint(0, 0 + Fe).matrixTransform(je), Ze = Math.abs(Xe.x - He.x), Ge = Math.abs(Xe.y - He.y), Ye = Math.abs(We.x - qe.x), Ue = Math.abs(We.y - qe.y);
1582
1583
  Ie = Math.max(Ze, Ye), Ae = Math.max(Ge, Ue);
1583
1584
  }
1584
1585
  return { contentWidth: Ie, contentHeight: Ae };
@@ -1601,16 +1602,16 @@ class I extends g {
1601
1602
  if (!De || _e.defaultPrevented) return;
1602
1603
  if (De.hasAttribute("disabled")) return _e.preventDefault(), void _e.stopPropagation();
1603
1604
  if ((() => {
1604
- const Ve = window.getSelection();
1605
- return Ve && Ve.type === "Range";
1605
+ const je = window.getSelection();
1606
+ return je && je.type === "Range";
1606
1607
  })() && !De.closest("button")) return;
1607
1608
  const $e = De.closest("[data-panzoom-action]"), Re = De.closest("[data-panzoom-change]"), Be = $e || Re, Le = Be && E(Be) ? Be.dataset : null;
1608
1609
  if (Le) {
1609
- const Ve = Le.panzoomChange, He = Le.panzoomAction;
1610
- if ((Ve || He) && _e.preventDefault(), Ve) {
1610
+ const je = Le.panzoomChange, He = Le.panzoomAction;
1611
+ if ((je || He) && _e.preventDefault(), je) {
1611
1612
  let qe = {};
1612
1613
  try {
1613
- qe = JSON.parse(Ve);
1614
+ qe = JSON.parse(je);
1614
1615
  } catch {
1615
1616
  console && console.warn("The given data was not valid JSON");
1616
1617
  }
@@ -1623,12 +1624,12 @@ class I extends g {
1623
1624
  const Ie = this.content.getBoundingClientRect(), Ae = this.dragStart;
1624
1625
  if (Ae.time && !this.canZoomOut() && (Math.abs(Ie.x - Ae.x) > 2 || Math.abs(Ie.y - Ae.y) > 2)) return;
1625
1626
  this.dragStart.time = 0;
1626
- const ze = (Ve) => {
1627
- this.option("zoom", _e) && Ve && typeof Ve == "string" && /(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(Ve) && typeof this[Ve] == "function" && (_e.preventDefault(), this[Ve]({ event: _e }));
1628
- }, je = this.option("click", _e), Fe = this.option("dblClick", _e);
1627
+ const ze = (je) => {
1628
+ this.option("zoom", _e) && je && typeof je == "string" && /(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(je) && typeof this[je] == "function" && (_e.preventDefault(), this[je]({ event: _e }));
1629
+ }, Ve = this.option("click", _e), Fe = this.option("dblClick", _e);
1629
1630
  Fe ? (this.clicks++, this.clicks == 1 && (this.clickTimer = setTimeout(() => {
1630
- this.clicks === 1 ? (this.emit("click", _e), !_e.defaultPrevented && je && ze(je)) : (this.emit("dblClick", _e), _e.defaultPrevented || ze(Fe)), this.clicks = 0, this.clickTimer = null;
1631
- }, 350))) : (this.emit("click", _e), !_e.defaultPrevented && je && ze(je));
1631
+ this.clicks === 1 ? (this.emit("click", _e), !_e.defaultPrevented && Ve && ze(Ve)) : (this.emit("dblClick", _e), _e.defaultPrevented || ze(Fe)), this.clicks = 0, this.clickTimer = null;
1632
+ }, 350))) : (this.emit("click", _e), !_e.defaultPrevented && Ve && ze(Ve));
1632
1633
  }
1633
1634
  addTrackingPoint(_e) {
1634
1635
  const ke = this.trackingPoints.filter((De) => De.time > Date.now() - 100);
@@ -1660,20 +1661,20 @@ class I extends g {
1660
1661
  Le = Re.clientX - Ge.left - 0.5 * Ge.width, Ie = Re.clientY - Ge.top - 0.5 * Ge.height;
1661
1662
  }
1662
1663
  const Ae = c(De[0], De[1]), ze = c(ke[0], ke[1]);
1663
- let je = Ae ? ze / Ae : 1, Fe = Be.clientX - Re.clientX, Ve = Be.clientY - Re.clientY;
1664
- this.dragOffset.x += Fe, this.dragOffset.y += Ve, this.dragOffset.time = Date.now() - this.dragStart.time;
1664
+ let Ve = Ae ? ze / Ae : 1, Fe = Be.clientX - Re.clientX, je = Be.clientY - Re.clientY;
1665
+ this.dragOffset.x += Fe, this.dragOffset.y += je, this.dragOffset.time = Date.now() - this.dragStart.time;
1665
1666
  let He = t(this.targetScale) === t(this.minScale) && this.option("lockAxis");
1666
1667
  if (He && !this.lockedAxis) if (He === "xy" || He === "y" || _e.type === "touchmove") {
1667
1668
  if (Math.abs(this.dragOffset.x) < 6 && Math.abs(this.dragOffset.y) < 6) return void _e.preventDefault();
1668
1669
  const Ge = Math.abs(180 * Math.atan2(this.dragOffset.y, this.dragOffset.x) / Math.PI);
1669
- this.lockedAxis = Ge > 45 && Ge < 135 ? "y" : "x", this.dragOffset.x = 0, this.dragOffset.y = 0, Fe = 0, Ve = 0;
1670
+ this.lockedAxis = Ge > 45 && Ge < 135 ? "y" : "x", this.dragOffset.x = 0, this.dragOffset.y = 0, Fe = 0, je = 0;
1670
1671
  } else this.lockedAxis = He;
1671
1672
  if (i(_e.target, this.content) && (He = "x", this.dragOffset.y = 0), He && He !== "xy" && this.lockedAxis !== He && t(this.targetScale) === t(this.minScale)) return;
1672
1673
  _e.cancelable && _e.preventDefault(), this.container.classList.add(this.cn("isDragging"));
1673
- const qe = this.checkBounds(Fe, Ve);
1674
- this.option("rubberband") ? (this.isInfinite !== "x" && (qe.xDiff > 0 && Fe < 0 || qe.xDiff < 0 && Fe > 0) && (Fe *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitWidth * qe.xDiff))), this.isInfinite !== "y" && (qe.yDiff > 0 && Ve < 0 || qe.yDiff < 0 && Ve > 0) && (Ve *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitHeight * qe.yDiff)))) : (qe.xDiff && (Fe = 0), qe.yDiff && (Ve = 0));
1674
+ const qe = this.checkBounds(Fe, je);
1675
+ this.option("rubberband") ? (this.isInfinite !== "x" && (qe.xDiff > 0 && Fe < 0 || qe.xDiff < 0 && Fe > 0) && (Fe *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitWidth * qe.xDiff))), this.isInfinite !== "y" && (qe.yDiff > 0 && je < 0 || qe.yDiff < 0 && je > 0) && (je *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitHeight * qe.yDiff)))) : (qe.xDiff && (Fe = 0), qe.yDiff && (je = 0));
1675
1676
  const Xe = this.targetScale, We = this.minScale, Ze = this.maxScale;
1676
- Xe < 0.5 * We && (je = Math.max(je, We)), Xe > 1.5 * Ze && (je = Math.min(je, Ze)), this.lockedAxis === "y" && t(Xe) === t(We) && (Fe = 0), this.lockedAxis === "x" && t(Xe) === t(We) && (Ve = 0), this.applyChange({ originX: Le, originY: Ie, panX: Fe, panY: Ve, scale: je, friction: this.option("dragFriction"), ignoreBounds: !0 });
1677
+ Xe < 0.5 * We && (Ve = Math.max(Ve, We)), Xe > 1.5 * Ze && (Ve = Math.min(Ve, Ze)), this.lockedAxis === "y" && t(Xe) === t(We) && (Fe = 0), this.lockedAxis === "x" && t(Xe) === t(We) && (je = 0), this.applyChange({ originX: Le, originY: Ie, panX: Fe, panY: je, scale: Ve, friction: this.option("dragFriction"), ignoreBounds: !0 });
1677
1678
  }
1678
1679
  onPointerUp(_e, ke, De) {
1679
1680
  if (De.length) return this.dragOffset.x = 0, this.dragOffset.y = 0, void (this.trackingPoints = []);
@@ -1690,16 +1691,16 @@ class I extends g {
1690
1691
  Re && $e && (Be = Re.clientX - $e.clientX, Le = Re.clientY - $e.clientY, Ie = Re.time - $e.time);
1691
1692
  const Ae = ((_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.scale) || 1;
1692
1693
  Ae !== 1 && (Be *= Ae, Le *= Ae);
1693
- let ze = 0, je = 0, Fe = 0, Ve = 0, He = this.option("decelFriction");
1694
+ let ze = 0, Ve = 0, Fe = 0, je = 0, He = this.option("decelFriction");
1694
1695
  const qe = this.targetScale;
1695
1696
  if (Ie > 0) {
1696
- Fe = Math.abs(Be) > 3 ? Be / (Ie / 30) : 0, Ve = Math.abs(Le) > 3 ? Le / (Ie / 30) : 0;
1697
+ Fe = Math.abs(Be) > 3 ? Be / (Ie / 30) : 0, je = Math.abs(Le) > 3 ? Le / (Ie / 30) : 0;
1697
1698
  const Ge = this.option("maxVelocity");
1698
- Ge && (Fe = Math.max(Math.min(Fe, Ge), -1 * Ge), Ve = Math.max(Math.min(Ve, Ge), -1 * Ge));
1699
+ Ge && (Fe = Math.max(Math.min(Fe, Ge), -1 * Ge), je = Math.max(Math.min(je, Ge), -1 * Ge));
1699
1700
  }
1700
- Fe && (ze = Fe / (1 / (1 - He) - 1)), Ve && (je = Ve / (1 / (1 - He) - 1)), (this.option("lockAxis") === "y" || this.option("lockAxis") === "xy" && this.lockedAxis === "y" && t(qe) === this.minScale) && (ze = Fe = 0), (this.option("lockAxis") === "x" || this.option("lockAxis") === "xy" && this.lockedAxis === "x" && t(qe) === this.minScale) && (je = Ve = 0);
1701
+ Fe && (ze = Fe / (1 / (1 - He) - 1)), je && (Ve = je / (1 / (1 - He) - 1)), (this.option("lockAxis") === "y" || this.option("lockAxis") === "xy" && this.lockedAxis === "y" && t(qe) === this.minScale) && (ze = Fe = 0), (this.option("lockAxis") === "x" || this.option("lockAxis") === "xy" && this.lockedAxis === "x" && t(qe) === this.minScale) && (Ve = je = 0);
1701
1702
  const Xe = this.dragOffset.x, We = this.dragOffset.y, Ze = this.option("dragMinThreshold") || 0;
1702
- Math.abs(Xe) < Ze && Math.abs(We) < Ze && (ze = je = 0, Fe = Ve = 0), (this.option("zoom") && (qe < this.minScale - 1e-5 || qe > this.maxScale + 1e-5) || ke && !ze && !je) && (He = 0.35), this.applyChange({ panX: ze, panY: je, friction: He }), this.emit("decel", Fe, Ve, Xe, We);
1703
+ Math.abs(Xe) < Ze && Math.abs(We) < Ze && (ze = Ve = 0, Fe = je = 0), (this.option("zoom") && (qe < this.minScale - 1e-5 || qe > this.maxScale + 1e-5) || ke && !ze && !Ve) && (He = 0.35), this.applyChange({ panX: ze, panY: Ve, friction: He }), this.emit("decel", Fe, je, Xe, We);
1703
1704
  }
1704
1705
  onWheel(_e) {
1705
1706
  var ke = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(Re, Be) {
@@ -1726,9 +1727,9 @@ class I extends g {
1726
1727
  const We = Xe == "e" || Xe === "f" ? M : T;
1727
1728
  Re[Xe] = t(_e[Xe], We), Math.abs(ke[Xe] - _e[Xe]) < (Xe == "e" || Xe === "f" ? 0.51 : 1e-3) && (_e[Xe] = ke[Xe]);
1728
1729
  }
1729
- let { a: Be, b: Le, c: Ie, d: Ae, e: ze, f: je } = Re, Fe = `matrix(${Be}, ${Le}, ${Ie}, ${Ae}, ${ze}, ${je})`, Ve = De.parentElement instanceof HTMLPictureElement ? De.parentElement : De;
1730
- if (this.option("transformParent") && (Ve = Ve.parentElement || Ve), Ve.style.transform === Fe) return;
1731
- Ve.style.transform = Fe;
1730
+ let { a: Be, b: Le, c: Ie, d: Ae, e: ze, f: Ve } = Re, Fe = `matrix(${Be}, ${Le}, ${Ie}, ${Ae}, ${ze}, ${Ve})`, je = De.parentElement instanceof HTMLPictureElement ? De.parentElement : De;
1731
+ if (this.option("transformParent") && (je = je.parentElement || je), je.style.transform === Fe) return;
1732
+ je.style.transform = Fe;
1732
1733
  const { contentWidth: He, contentHeight: qe } = this.calculateContentDim();
1733
1734
  $e.width = He, $e.height = qe, this.emit("afterTransform");
1734
1735
  }
@@ -1737,8 +1738,8 @@ class I extends g {
1737
1738
  if (!this || this.state === m.Destroy || this.isContentLoading) return;
1738
1739
  const De = Math.max(1, ((ke = window.visualViewport) === null || ke === void 0 ? void 0 : ke.scale) || 1), { container: $e, content: Re } = this, Be = Re instanceof HTMLImageElement, Le = $e.getBoundingClientRect(), Ie = getComputedStyle(this.container);
1739
1740
  let Ae = Le.width * De, ze = Le.height * De;
1740
- const je = parseFloat(Ie.paddingTop) + parseFloat(Ie.paddingBottom), Fe = Ae - (parseFloat(Ie.paddingLeft) + parseFloat(Ie.paddingRight)), Ve = ze - je;
1741
- this.containerRect = { width: Ae, height: ze, innerWidth: Fe, innerHeight: Ve };
1741
+ const Ve = parseFloat(Ie.paddingTop) + parseFloat(Ie.paddingBottom), Fe = Ae - (parseFloat(Ie.paddingLeft) + parseFloat(Ie.paddingRight)), je = ze - Ve;
1742
+ this.containerRect = { width: Ae, height: ze, innerWidth: Fe, innerHeight: je };
1742
1743
  const He = parseFloat(Re.dataset.width || "") || ((oi) => {
1743
1744
  let si = 0;
1744
1745
  return si = oi instanceof HTMLImageElement ? oi.naturalWidth : oi instanceof SVGElement ? oi.width.baseVal.value : Math.max(oi.offsetWidth, oi.scrollWidth), si || 0;
@@ -1765,18 +1766,18 @@ class I extends g {
1765
1766
  calculateBounds() {
1766
1767
  const { contentWidth: _e, contentHeight: ke } = this.calculateContentDim(this.target), { targetScale: De, lockedAxis: $e } = this, { fitWidth: Re, fitHeight: Be } = this.contentRect;
1767
1768
  let Le = 0, Ie = 0, Ae = 0, ze = 0;
1768
- const je = this.option("infinite");
1769
- if (je === !0 || $e && je === $e) Le = -1 / 0, Ae = 1 / 0, Ie = -1 / 0, ze = 1 / 0;
1769
+ const Ve = this.option("infinite");
1770
+ if (Ve === !0 || $e && Ve === $e) Le = -1 / 0, Ae = 1 / 0, Ie = -1 / 0, ze = 1 / 0;
1770
1771
  else {
1771
- let { containerRect: Fe, contentRect: Ve } = this, He = t(Re * De, M), qe = t(Be * De, M), { innerWidth: Xe, innerHeight: We } = Fe;
1772
+ let { containerRect: Fe, contentRect: je } = this, He = t(Re * De, M), qe = t(Be * De, M), { innerWidth: Xe, innerHeight: We } = Fe;
1772
1773
  if (Fe.width === He && (Xe = Fe.width), Fe.width === qe && (We = Fe.height), _e > Xe) {
1773
1774
  Ae = 0.5 * (_e - Xe), Le = -1 * Ae;
1774
- let Ze = 0.5 * (Ve.right - Ve.left);
1775
+ let Ze = 0.5 * (je.right - je.left);
1775
1776
  Le += Ze, Ae += Ze;
1776
1777
  }
1777
1778
  if (Re > Xe && _e < Xe && (Le -= 0.5 * (Re - Xe), Ae -= 0.5 * (Re - Xe)), ke > We) {
1778
1779
  ze = 0.5 * (ke - We), Ie = -1 * ze;
1779
- let Ze = 0.5 * (Ve.bottom - Ve.top);
1780
+ let Ze = 0.5 * (je.bottom - je.top);
1780
1781
  Ie += Ze, ze += Ze;
1781
1782
  }
1782
1783
  Be > We && ke < We && (Le -= 0.5 * (Be - We), Ae -= 0.5 * (Be - We));
@@ -1791,10 +1792,10 @@ class I extends g {
1791
1792
  const _e = this, ke = _e.container, { panMode: De, contentRect: $e, targetScale: Re, minScale: Be } = _e;
1792
1793
  let Le = Be, Ie = _e.option("click") || !1;
1793
1794
  Ie && (Le = _e.getNextScale(Ie));
1794
- let Ae = _e.canZoomIn(), ze = _e.canZoomOut(), je = De === A && !!this.option("touch"), Fe = ze && je;
1795
- if (je && (t(Re) < t(Be) && !this.panOnlyZoomed && (Fe = !0), (t($e.width, 1) > t($e.fitWidth, 1) || t($e.height, 1) > t($e.fitHeight, 1)) && (Fe = !0)), t($e.width * Re, 1) < t($e.fitWidth, 1) && (Fe = !1), De === O && (Fe = !1), o(ke, this.cn("isDraggable"), Fe), !this.option("zoom")) return;
1796
- let Ve = Ae && t(Le) > t(Re), He = !Ve && !Fe && ze && t(Le) < t(Re);
1797
- o(ke, this.cn("canZoomIn"), Ve), o(ke, this.cn("canZoomOut"), He);
1795
+ let Ae = _e.canZoomIn(), ze = _e.canZoomOut(), Ve = De === A && !!this.option("touch"), Fe = ze && Ve;
1796
+ if (Ve && (t(Re) < t(Be) && !this.panOnlyZoomed && (Fe = !0), (t($e.width, 1) > t($e.fitWidth, 1) || t($e.height, 1) > t($e.fitHeight, 1)) && (Fe = !0)), t($e.width * Re, 1) < t($e.fitWidth, 1) && (Fe = !1), De === O && (Fe = !1), o(ke, this.cn("isDraggable"), Fe), !this.option("zoom")) return;
1797
+ let je = Ae && t(Le) > t(Re), He = !je && !Fe && ze && t(Le) < t(Re);
1798
+ o(ke, this.cn("canZoomIn"), je), o(ke, this.cn("canZoomOut"), He);
1798
1799
  for (const qe of ke.querySelectorAll("[data-panzoom-action]")) {
1799
1800
  let Xe = !1, We = !1;
1800
1801
  switch (qe.dataset.panzoomAction) {
@@ -1816,11 +1817,11 @@ class I extends g {
1816
1817
  panTo({ x: _e = this.target.e, y: ke = this.target.f, scale: De = this.targetScale, friction: $e = this.option("friction"), angle: Re = 0, originX: Be = 0, originY: Le = 0, flipX: Ie = !1, flipY: Ae = !1, ignoreBounds: ze = !1 }) {
1817
1818
  this.state !== m.Destroy && this.applyChange({ panX: _e - this.target.e, panY: ke - this.target.f, scale: De / this.targetScale, angle: Re, originX: Be, originY: Le, friction: $e, flipX: Ie, flipY: Ae, ignoreBounds: ze });
1818
1819
  }
1819
- applyChange({ panX: _e = 0, panY: ke = 0, scale: De = 1, angle: $e = 0, originX: Re = -this.current.e, originY: Be = -this.current.f, friction: Le = this.option("friction"), flipX: Ie = !1, flipY: Ae = !1, ignoreBounds: ze = !1, bounce: je = this.option("bounce") }) {
1820
+ applyChange({ panX: _e = 0, panY: ke = 0, scale: De = 1, angle: $e = 0, originX: Re = -this.current.e, originY: Be = -this.current.f, friction: Le = this.option("friction"), flipX: Ie = !1, flipY: Ae = !1, ignoreBounds: ze = !1, bounce: Ve = this.option("bounce") }) {
1820
1821
  const Fe = this.state;
1821
1822
  if (Fe === m.Destroy) return;
1822
1823
  this.rAF && (cancelAnimationFrame(this.rAF), this.rAF = null), this.friction = Le || 0, this.ignoreBounds = ze;
1823
- const { current: Ve } = this, He = Ve.e, qe = Ve.f, Xe = this.getMatrix(this.target);
1824
+ const { current: je } = this, He = je.e, qe = je.f, Xe = this.getMatrix(this.target);
1824
1825
  let We = new DOMMatrix().translate(He, qe).translate(Re, Be).translate(_e, ke);
1825
1826
  if (this.option("zoom")) {
1826
1827
  if (!ze) {
@@ -1831,7 +1832,7 @@ class I extends g {
1831
1832
  }
1832
1833
  We = We.translate(-Re, -Be).translate(-He, -qe).multiply(Xe), $e && (We = We.rotate($e)), Ie && (We = We.scale(-1, 1)), Ae && (We = We.scale(1, -1));
1833
1834
  for (const Ze of v) Ze !== "e" && Ze !== "f" && (We[Ze] > this.minScale + 1e-5 || We[Ze] < this.minScale - 1e-5) ? this.target[Ze] = We[Ze] : this.target[Ze] = t(We[Ze], M);
1834
- (this.targetScale < this.scale || Math.abs(De - 1) > 0.1 || this.panMode === O || je === !1) && !ze && this.clampTargetBounds(), Fe === m.Init ? this.animate() : this.isResting || (this.state = m.Panning, this.requestTick());
1835
+ (this.targetScale < this.scale || Math.abs(De - 1) > 0.1 || this.panMode === O || Ve === !1) && !ze && this.clampTargetBounds(), Fe === m.Init ? this.animate() : this.isResting || (this.state = m.Panning, this.requestTick());
1835
1836
  }
1836
1837
  stop(_e = !1) {
1837
1838
  if (this.state === m.Init || this.state === m.Destroy) return;
@@ -1847,10 +1848,10 @@ class I extends g {
1847
1848
  if (this.pmme = _e, this.panMode !== O || !_e || t(this.targetScale) <= t(this.minScale)) return;
1848
1849
  this.emit("mouseMove", _e);
1849
1850
  const { container: De, containerRect: $e, contentRect: Re } = this, Be = $e.width, Le = $e.height, Ie = De.getBoundingClientRect(), Ae = (_e.clientX || 0) - Ie.left, ze = (_e.clientY || 0) - Ie.top;
1850
- let { contentWidth: je, contentHeight: Fe } = this.calculateContentDim(this.target);
1851
- const Ve = this.option("mouseMoveFactor");
1852
- Ve > 1 && (je !== Be && (je *= Ve), Fe !== Le && (Fe *= Ve));
1853
- let He = 0.5 * (je - Be) - Ae / Be * 100 / 100 * (je - Be);
1851
+ let { contentWidth: Ve, contentHeight: Fe } = this.calculateContentDim(this.target);
1852
+ const je = this.option("mouseMoveFactor");
1853
+ je > 1 && (Ve !== Be && (Ve *= je), Fe !== Le && (Fe *= je));
1854
+ let He = 0.5 * (Ve - Be) - Ae / Be * 100 / 100 * (Ve - Be);
1854
1855
  He += 0.5 * (Re.right - Re.left);
1855
1856
  let qe = 0.5 * (Fe - Le) - ze / Le * 100 / 100 * (Fe - Le);
1856
1857
  qe += 0.5 * (Re.bottom - Re.top), this.applyChange({ panX: He - this.target.e, panY: qe - this.target.f, friction: ke });
@@ -1907,8 +1908,8 @@ class I extends g {
1907
1908
  if (this.isContentLoading || this.state === m.Destroy) return;
1908
1909
  const { targetScale: Be, fullScale: Le, maxScale: Ie, coverScale: Ae } = this;
1909
1910
  if (this.stop(), this.panMode === O && (Re = this.pmme || Re), Re || De === z || $e === z) {
1910
- const je = this.content.getBoundingClientRect(), Fe = this.container.getBoundingClientRect(), Ve = Re ? Re.clientX : Fe.left + 0.5 * Fe.width, He = Re ? Re.clientY : Fe.top + 0.5 * Fe.height;
1911
- De = Ve - je.left - 0.5 * je.width, $e = He - je.top - 0.5 * je.height;
1911
+ const Ve = this.content.getBoundingClientRect(), Fe = this.container.getBoundingClientRect(), je = Re ? Re.clientX : Fe.left + 0.5 * Fe.width, He = Re ? Re.clientY : Fe.top + 0.5 * Fe.height;
1912
+ De = je - Ve.left - 0.5 * Ve.width, $e = He - Ve.top - 0.5 * Ve.height;
1912
1913
  }
1913
1914
  let ze = 1;
1914
1915
  typeof _e == "number" ? ze = _e : _e === "full" ? ze = Le : _e === "cover" ? ze = Ae : _e === "max" ? ze = Ie : _e === "fit" ? ze = 1 : _e === "next" && (ze = this.getNextScale("iterateZoom")), ze = ze / Be || 1, ke = ke === z ? ze > 1 ? 0.15 : 0.25 : ke, this.applyChange({ scale: ze, originX: De, originY: $e, friction: ke }), Re && this.panMode === O && this.panWithMouse(Re, ke);
@@ -2018,19 +2019,19 @@ class W extends _ {
2018
2019
  const Be = typeof Re == "number" && ke > 5 && ke >= Re, Le = !this.list || this.isDynamic !== Be || this.list.children.length !== ke;
2019
2020
  Le && this.cleanup();
2020
2021
  const Ie = this.build();
2021
- if (o(Ie, this.cn("isDynamic"), !!Be), Le) for (let je = 0; je < ke; je++) Ie.append(this.createItem(je));
2022
+ if (o(Ie, this.cn("isDynamic"), !!Be), Le) for (let Ve = 0; Ve < ke; Ve++) Ie.append(this.createItem(Ve));
2022
2023
  let Ae, ze = 0;
2023
- for (const je of [...Ie.children]) {
2024
+ for (const Ve of [...Ie.children]) {
2024
2025
  const Fe = ze === this.instance.page;
2025
- Fe && (Ae = je), o(je, this.cn("isCurrent"), Fe), (_e = je.children[0]) === null || _e === void 0 || _e.setAttribute("aria-selected", Fe ? "true" : "false");
2026
- for (const Ve of ["isBeforePrev", "isPrev", "isNext", "isAfterNext"]) S(je, this.cn(Ve));
2026
+ Fe && (Ae = Ve), o(Ve, this.cn("isCurrent"), Fe), (_e = Ve.children[0]) === null || _e === void 0 || _e.setAttribute("aria-selected", Fe ? "true" : "false");
2027
+ for (const je of ["isBeforePrev", "isPrev", "isNext", "isAfterNext"]) S(Ve, this.cn(je));
2027
2028
  ze++;
2028
2029
  }
2029
2030
  if (Ae = Ae || Ie.firstChild, Be && Ae) {
2030
- const je = Ae.previousElementSibling, Fe = je && je.previousElementSibling;
2031
- P(je, this.cn("isPrev")), P(Fe, this.cn("isBeforePrev"));
2032
- const Ve = Ae.nextElementSibling, He = Ve && Ve.nextElementSibling;
2033
- P(Ve, this.cn("isNext")), P(He, this.cn("isAfterNext"));
2031
+ const Ve = Ae.previousElementSibling, Fe = Ve && Ve.previousElementSibling;
2032
+ P(Ve, this.cn("isPrev")), P(Fe, this.cn("isBeforePrev"));
2033
+ const je = Ae.nextElementSibling, He = je && je.nextElementSibling;
2034
+ P(je, this.cn("isNext")), P(He, this.cn("isAfterNext"));
2034
2035
  }
2035
2036
  this.isDynamic = Be;
2036
2037
  }
@@ -2118,8 +2119,8 @@ class Z extends _ {
2118
2119
  if (!Le || !Ie || !Be) return;
2119
2120
  const Ae = Be.closest("[data-index]");
2120
2121
  if (De.stopPropagation(), De.preventDefault(), !Ae) return;
2121
- const ze = parseInt(Ae.dataset.index || "", 10) || 0, je = Ie.getPageForSlide(ze), Fe = Le.getPageForSlide(ze);
2122
- Le.slideTo(Fe), Ie.slideTo(je, { friction: ((Re = ($e = this.nav) === null || $e === void 0 ? void 0 : $e.plugins) === null || Re === void 0 ? void 0 : Re.Sync.option("friction")) || 0 }), this.markSelectedSlide(ze);
2122
+ const ze = parseInt(Ae.dataset.index || "", 10) || 0, Ve = Ie.getPageForSlide(ze), Fe = Le.getPageForSlide(ze);
2123
+ Le.slideTo(Fe), Ie.slideTo(Ve, { friction: ((Re = ($e = this.nav) === null || $e === void 0 ? void 0 : $e.plugins) === null || Re === void 0 ? void 0 : Re.Sync.option("friction")) || 0 }), this.markSelectedSlide(ze);
2123
2124
  }
2124
2125
  onNavCreateSlide(_e, ke) {
2125
2126
  ke.index === this.selectedIndex && this.markSelectedSlide(ke.index);
@@ -2244,10 +2245,10 @@ class Q extends g {
2244
2245
  }
2245
2246
  processPages() {
2246
2247
  const _e = this.pages, { contentDim: ke, viewportDim: De, isInfinite: $e } = this, Re = this.option("center"), Be = this.option("fill"), Le = Be && Re && ke > De && !$e;
2247
- if (_e.forEach((ze, je) => {
2248
+ if (_e.forEach((ze, Ve) => {
2248
2249
  var Fe;
2249
- ze.index = je, ze.pos = ((Fe = ze.slides[0]) === null || Fe === void 0 ? void 0 : Fe.pos) || 0, ze.dim = 0;
2250
- for (const [Ve, He] of ze.slides.entries()) ze.dim += He.dim, Ve < ze.slides.length - 1 && (ze.dim += He.gap);
2250
+ ze.index = Ve, ze.pos = ((Fe = ze.slides[0]) === null || Fe === void 0 ? void 0 : Fe.pos) || 0, ze.dim = 0;
2251
+ for (const [je, He] of ze.slides.entries()) ze.dim += He.dim, je < ze.slides.length - 1 && (ze.dim += He.gap);
2251
2252
  Le && ze.pos + 0.5 * ze.dim < 0.5 * De ? ze.pos = 0 : Le && ze.pos + 0.5 * ze.dim >= ke - 0.5 * De ? ze.pos = ke - De : Re && (ze.pos += -0.5 * (De - ze.dim));
2252
2253
  }), _e.forEach((ze) => {
2253
2254
  Be && !$e && ke > De && (ze.pos = Math.max(ze.pos, 0), ze.pos = Math.min(ze.pos, ke - De)), ze.pos = t(ze.pos, 1e3), ze.dim = t(ze.dim, 1e3), Math.abs(ze.pos) <= 0.1 && (ze.pos = 0);
@@ -2255,8 +2256,8 @@ class Q extends g {
2255
2256
  const Ie = [];
2256
2257
  let Ae;
2257
2258
  return _e.forEach((ze) => {
2258
- const je = Object.assign({}, ze);
2259
- Ae && je.pos === Ae.pos ? (Ae.dim += je.dim, Ae.slides = [...Ae.slides, ...je.slides]) : (je.index = Ie.length, Ae = je, Ie.push(je));
2259
+ const Ve = Object.assign({}, ze);
2260
+ Ae && Ve.pos === Ae.pos ? (Ae.dim += Ve.dim, Ae.slides = [...Ae.slides, ...Ve.slides]) : (Ve.index = Ie.length, Ae = Ve, Ie.push(Ve));
2260
2261
  }), Ie;
2261
2262
  }
2262
2263
  getPageFromIndex(_e = 0) {
@@ -2289,16 +2290,16 @@ class Q extends g {
2289
2290
  return { x: De ? Re : { min: 0, max: 0 }, y: De ? { min: 0, max: 0 } : Re };
2290
2291
  }
2291
2292
  repositionSlides() {
2292
- let _e, { isHorizontal: ke, isRTL: De, isInfinite: $e, viewport: Re, viewportDim: Be, contentDim: Le, page: Ie, pages: Ae, slides: ze, panzoom: je } = this, Fe = 0, Ve = 0, He = 0, qe = 0;
2293
- je ? qe = -1 * je.current[this.axis] : Ae[Ie] && (qe = Ae[Ie].pos || 0), _e = ke ? De ? "right" : "left" : "top", De && ke && (qe *= -1);
2293
+ let _e, { isHorizontal: ke, isRTL: De, isInfinite: $e, viewport: Re, viewportDim: Be, contentDim: Le, page: Ie, pages: Ae, slides: ze, panzoom: Ve } = this, Fe = 0, je = 0, He = 0, qe = 0;
2294
+ Ve ? qe = -1 * Ve.current[this.axis] : Ae[Ie] && (qe = Ae[Ie].pos || 0), _e = ke ? De ? "right" : "left" : "top", De && ke && (qe *= -1);
2294
2295
  for (const Ge of ze) {
2295
2296
  const Ye = Ge.el;
2296
- Ye ? (_e === "top" ? (Ye.style.right = "", Ye.style.left = "") : Ye.style.top = "", Ge.index !== Fe ? Ye.style[_e] = Ve === 0 ? "" : `${t(Ve, 1e3)}px` : Ye.style[_e] = "", He += Ge.dim + Ge.gap, Fe++) : Ve += Ge.dim + Ge.gap;
2297
+ Ye ? (_e === "top" ? (Ye.style.right = "", Ye.style.left = "") : Ye.style.top = "", Ge.index !== Fe ? Ye.style[_e] = je === 0 ? "" : `${t(je, 1e3)}px` : Ye.style[_e] = "", He += Ge.dim + Ge.gap, Fe++) : je += Ge.dim + Ge.gap;
2297
2298
  }
2298
2299
  if ($e && He && Re) {
2299
2300
  let Ge = getComputedStyle(Re), Ye = "padding", Ue = ke ? "Right" : "Bottom", Qe = parseFloat(Ge[Ye + (ke ? "Left" : "Top")]);
2300
2301
  qe -= Qe, Be += Qe, Be += parseFloat(Ge[Ye + Ue]);
2301
- for (const Je of ze) Je.el && (t(Je.pos) < t(Be) && t(Je.pos + Je.dim + Je.gap) < t(qe) && t(qe) > t(Le - Be) && (Je.el.style[_e] = `${t(Ve + He, 1e3)}px`), t(Je.pos + Je.gap) >= t(Le - Be) && t(Je.pos) > t(qe + Be) && t(qe) < t(Be) && (Je.el.style[_e] = `-${t(He, 1e3)}px`));
2302
+ for (const Je of ze) Je.el && (t(Je.pos) < t(Be) && t(Je.pos + Je.dim + Je.gap) < t(qe) && t(qe) > t(Le - Be) && (Je.el.style[_e] = `${t(je + He, 1e3)}px`), t(Je.pos + Je.gap) >= t(Le - Be) && t(Je.pos) > t(qe + Be) && t(qe) < t(Be) && (Je.el.style[_e] = `-${t(He, 1e3)}px`));
2302
2303
  }
2303
2304
  let Xe, We, Ze = [...this.inTransition];
2304
2305
  if (Ze.length > 1 && (Xe = Ae[Ze[0]], We = Ae[Ze[1]]), Xe && We) {
@@ -2314,12 +2315,12 @@ class Q extends g {
2314
2315
  const Re = _e.html;
2315
2316
  Re && (Re instanceof HTMLElement ? $e.appendChild(Re) : $e.innerHTML = _e.html + "");
2316
2317
  const Be = [];
2317
- De.forEach((ze, je) => {
2318
- ze.el && Be.push(je);
2318
+ De.forEach((ze, Ve) => {
2319
+ ze.el && Be.push(Ve);
2319
2320
  });
2320
2321
  const Le = _e.index;
2321
2322
  let Ie = null;
2322
- Be.length && (Ie = De[Be.reduce((ze, je) => Math.abs(je - Le) < Math.abs(ze - Le) ? je : ze)]);
2323
+ Be.length && (Ie = De[Be.reduce((ze, Ve) => Math.abs(Ve - Le) < Math.abs(ze - Le) ? Ve : ze)]);
2323
2324
  const Ae = Ie && Ie.el && Ie.el.parentNode ? Ie.index < _e.index ? Ie.el.nextSibling : Ie.el : null;
2324
2325
  ke.insertBefore($e, ke.contains(Ae) ? Ae : null), _e.el = $e, this.emit("createSlide", _e);
2325
2326
  }
@@ -2339,19 +2340,19 @@ class Q extends g {
2339
2340
  _e = parseInt((_e || 0).toString()) || 0;
2340
2341
  const ze = this.getPageFromIndex(_e);
2341
2342
  if (!Ae || !Ie[ze] || Ie.length < 2 || Math.abs(((($e = (De = Ie[Le]) === null || De === void 0 ? void 0 : De.slides[0]) === null || $e === void 0 ? void 0 : $e.dim) || 0) - this.viewportDim) > 1) return !1;
2342
- let je = _e > Le ? 1 : -1;
2343
- this.isInfinite && (Le === 0 && _e === Ie.length - 1 && (je = -1), Le === Ie.length - 1 && _e === 0 && (je = 1));
2343
+ let Ve = _e > Le ? 1 : -1;
2344
+ this.isInfinite && (Le === 0 && _e === Ie.length - 1 && (Ve = -1), Le === Ie.length - 1 && _e === 0 && (Ve = 1));
2344
2345
  const Fe = Ie[ze].pos * (this.isRTL ? 1 : -1);
2345
2346
  if (Le === ze && Math.abs(Fe - Ae.target[this.axis]) < 1) return !1;
2346
2347
  this.clearTransitions();
2347
- const Ve = Ae.isResting;
2348
+ const je = Ae.isResting;
2348
2349
  P(this.container, this.cn("inTransition"));
2349
2350
  const He = ((Re = Ie[Le]) === null || Re === void 0 ? void 0 : Re.slides[0]) || null, qe = ((Be = Ie[ze]) === null || Be === void 0 ? void 0 : Be.slides[0]) || null;
2350
2351
  this.inTransition.add(qe.index), this.createSlideEl(qe);
2351
2352
  let Xe = He.el, We = qe.el;
2352
- Ve || ke === J || (ke = "fadeFast", Xe = null);
2353
+ je || ke === J || (ke = "fadeFast", Xe = null);
2353
2354
  const Ze = this.isRTL ? "next" : "prev", Ge = this.isRTL ? "prev" : "next";
2354
- return Xe && (this.inTransition.add(He.index), He.transition = ke, Xe.addEventListener(G, this.onAnimationEnd), Xe.classList.add(`f-${ke}Out`, `to-${je > 0 ? Ge : Ze}`)), We && (qe.transition = ke, We.addEventListener(G, this.onAnimationEnd), We.classList.add(`f-${ke}In`, `from-${je > 0 ? Ze : Ge}`)), Ae.current[this.axis] = Fe, Ae.target[this.axis] = Fe, Ae.requestTick(), this.onChange(ze), !0;
2355
+ return Xe && (this.inTransition.add(He.index), He.transition = ke, Xe.addEventListener(G, this.onAnimationEnd), Xe.classList.add(`f-${ke}Out`, `to-${Ve > 0 ? Ge : Ze}`)), We && (qe.transition = ke, We.addEventListener(G, this.onAnimationEnd), We.classList.add(`f-${ke}In`, `from-${Ve > 0 ? Ze : Ge}`)), Ae.current[this.axis] = Fe, Ae.target[this.axis] = Fe, Ae.requestTick(), this.onChange(ze), !0;
2355
2356
  }
2356
2357
  manageSlideVisiblity() {
2357
2358
  const _e = /* @__PURE__ */ new Set(), ke = /* @__PURE__ */ new Set(), De = this.getVisibleSlides(parseFloat(this.option("preload", 0) + "") || 0);
@@ -2373,8 +2374,8 @@ class Q extends g {
2373
2374
  flipInfiniteTrack() {
2374
2375
  const { axis: _e, isHorizontal: ke, isInfinite: De, isRTL: $e, viewportDim: Re, contentDim: Be } = this, Le = this.panzoom;
2375
2376
  if (!Le || !De) return;
2376
- let Ie = Le.current[_e], Ae = Le.target[_e] - Ie, ze = 0, je = 0.5 * Re;
2377
- $e && ke ? (Ie < -je && (ze = -1, Ie += Be), Ie > Be - je && (ze = 1, Ie -= Be)) : (Ie > je && (ze = 1, Ie -= Be), Ie < -Be + je && (ze = -1, Ie += Be)), ze && (Le.current[_e] = Ie, Le.target[_e] = Ie + Ae);
2377
+ let Ie = Le.current[_e], Ae = Le.target[_e] - Ie, ze = 0, Ve = 0.5 * Re;
2378
+ $e && ke ? (Ie < -Ve && (ze = -1, Ie += Be), Ie > Be - Ve && (ze = 1, Ie -= Be)) : (Ie > Ve && (ze = 1, Ie -= Be), Ie < -Be + Ve && (ze = -1, Ie += Be)), ze && (Le.current[_e] = Ie, Le.target[_e] = Ie + Ae);
2378
2379
  }
2379
2380
  lazyLoadImg(_e, ke) {
2380
2381
  const De = this, $e = "f-fadeIn", Re = "is-preloading";
@@ -2412,13 +2413,13 @@ class Q extends g {
2412
2413
  }
2413
2414
  onDecel(_e, ke = 0, De = 0, $e = 0, Re = 0) {
2414
2415
  if (this.option("dragFree")) return void this.setPageFromPosition();
2415
- const { isRTL: Be, isHorizontal: Le, axis: Ie, pages: Ae } = this, ze = Ae.length, je = Math.abs(Math.atan2(De, ke) / (Math.PI / 180));
2416
+ const { isRTL: Be, isHorizontal: Le, axis: Ie, pages: Ae } = this, ze = Ae.length, Ve = Math.abs(Math.atan2(De, ke) / (Math.PI / 180));
2416
2417
  let Fe = 0;
2417
- if (Fe = je > 45 && je < 135 ? Le ? 0 : De : Le ? ke : 0, !ze) return;
2418
- let Ve = this.page, He = Be && Le ? 1 : -1;
2418
+ if (Fe = Ve > 45 && Ve < 135 ? Le ? 0 : De : Le ? ke : 0, !ze) return;
2419
+ let je = this.page, He = Be && Le ? 1 : -1;
2419
2420
  const qe = _e.current[Ie] * He;
2420
2421
  let { pageIndex: Xe } = this.getPageFromPosition(qe);
2421
- Math.abs(Fe) > 5 ? (Ae[Ve].dim < document.documentElement["client" + (this.isHorizontal ? "Width" : "Height")] - 1 && (Ve = Xe), Ve = Be && Le ? Fe < 0 ? Ve - 1 : Ve + 1 : Fe < 0 ? Ve + 1 : Ve - 1) : Ve = $e === 0 && Re === 0 ? Ve : Xe, this.slideTo(Ve, { transition: !1, friction: _e.option("decelFriction") });
2422
+ Math.abs(Fe) > 5 ? (Ae[je].dim < document.documentElement["client" + (this.isHorizontal ? "Width" : "Height")] - 1 && (je = Xe), je = Be && Le ? Fe < 0 ? je - 1 : je + 1 : Fe < 0 ? je + 1 : je - 1) : je = $e === 0 && Re === 0 ? je : Xe, this.slideTo(je, { transition: !1, friction: _e.option("decelFriction") });
2422
2423
  }
2423
2424
  onClick(_e) {
2424
2425
  const ke = _e.target, De = ke && E(ke) ? ke.dataset : null;
@@ -2456,21 +2457,21 @@ class Q extends g {
2456
2457
  slideTo(_e = 0, { friction: ke = this.option("friction"), transition: De = this.option("transition") } = {}) {
2457
2458
  if (this.state === B.Destroy) return;
2458
2459
  _e = parseInt((_e || 0).toString()) || 0;
2459
- const $e = this.getPageFromIndex(_e), { axis: Re, isHorizontal: Be, isRTL: Le, pages: Ie, panzoom: Ae } = this, ze = Ie.length, je = Le && Be ? 1 : -1;
2460
+ const $e = this.getPageFromIndex(_e), { axis: Re, isHorizontal: Be, isRTL: Le, pages: Ie, panzoom: Ae } = this, ze = Ie.length, Ve = Le && Be ? 1 : -1;
2460
2461
  if (!Ae || !ze) return;
2461
2462
  if (this.page !== $e) {
2462
- const Ve = new Event("beforeChange", { bubbles: !0, cancelable: !0 });
2463
- if (this.emit("beforeChange", Ve, _e), Ve.defaultPrevented) return;
2463
+ const je = new Event("beforeChange", { bubbles: !0, cancelable: !0 });
2464
+ if (this.emit("beforeChange", je, _e), je.defaultPrevented) return;
2464
2465
  }
2465
2466
  if (this.transitionTo(_e, De)) return;
2466
2467
  let Fe = Ie[$e].pos;
2467
2468
  if (this.isInfinite) {
2468
- const Ve = this.contentDim, He = Ae.target[Re] * je;
2469
- ze === 2 ? Fe += Ve * Math.floor(parseFloat(_e + "") / 2) : Fe = [Fe, Fe - Ve, Fe + Ve].reduce(function(qe, Xe) {
2469
+ const je = this.contentDim, He = Ae.target[Re] * Ve;
2470
+ ze === 2 ? Fe += je * Math.floor(parseFloat(_e + "") / 2) : Fe = [Fe, Fe - je, Fe + je].reduce(function(qe, Xe) {
2470
2471
  return Math.abs(Xe - He) < Math.abs(qe - He) ? Xe : qe;
2471
2472
  });
2472
2473
  }
2473
- Fe *= je, Math.abs(Ae.target[Re] - Fe) < 1 || (Ae.panTo({ x: Be ? Fe : 0, y: Be ? 0 : Fe, friction: ke }), this.onChange($e));
2474
+ Fe *= Ve, Math.abs(Ae.target[Re] - Fe) < 1 || (Ae.panTo({ x: Be ? Fe : 0, y: Be ? 0 : Fe, friction: ke }), this.onChange($e));
2474
2475
  }
2475
2476
  slideToClosest(_e) {
2476
2477
  if (this.panzoom) {
@@ -2500,17 +2501,17 @@ class Q extends g {
2500
2501
  addSlide(_e, ke) {
2501
2502
  var De, $e, Re, Be;
2502
2503
  const Le = this.panzoom, Ie = ((De = this.pages[this.page]) === null || De === void 0 ? void 0 : De.pos) || 0, Ae = (($e = this.pages[this.page]) === null || $e === void 0 ? void 0 : $e.dim) || 0, ze = this.contentDim < this.viewportDim;
2503
- let je = Array.isArray(ke) ? ke : [ke];
2504
+ let Ve = Array.isArray(ke) ? ke : [ke];
2504
2505
  const Fe = [];
2505
- for (const Ve of je) Fe.push(H(Ve));
2506
+ for (const je of Ve) Fe.push(H(je));
2506
2507
  this.slides.splice(_e, 0, ...Fe);
2507
- for (let Ve = 0; Ve < this.slides.length; Ve++) this.slides[Ve].index = Ve;
2508
- for (const Ve of Fe) this.emit("beforeInitSlide", Ve, Ve.index);
2508
+ for (let je = 0; je < this.slides.length; je++) this.slides[je].index = je;
2509
+ for (const je of Fe) this.emit("beforeInitSlide", je, je.index);
2509
2510
  if (this.page >= _e && (this.page += Fe.length), this.updateMetrics(), Le) {
2510
- const Ve = ((Re = this.pages[this.page]) === null || Re === void 0 ? void 0 : Re.pos) || 0, He = ((Be = this.pages[this.page]) === null || Be === void 0 ? void 0 : Be.dim) || 0, qe = this.pages.length || 1, Xe = this.isRTL ? Ae - He : He - Ae, We = this.isRTL ? Ie - Ve : Ve - Ie;
2511
- ze && qe === 1 ? (_e <= this.page && (Le.current[this.axis] -= Xe, Le.target[this.axis] -= Xe), Le.panTo({ [this.isHorizontal ? "x" : "y"]: -1 * Ve })) : We && _e <= this.page && (Le.target[this.axis] -= We, Le.current[this.axis] -= We, Le.requestTick());
2511
+ const je = ((Re = this.pages[this.page]) === null || Re === void 0 ? void 0 : Re.pos) || 0, He = ((Be = this.pages[this.page]) === null || Be === void 0 ? void 0 : Be.dim) || 0, qe = this.pages.length || 1, Xe = this.isRTL ? Ae - He : He - Ae, We = this.isRTL ? Ie - je : je - Ie;
2512
+ ze && qe === 1 ? (_e <= this.page && (Le.current[this.axis] -= Xe, Le.target[this.axis] -= Xe), Le.panTo({ [this.isHorizontal ? "x" : "y"]: -1 * je })) : We && _e <= this.page && (Le.target[this.axis] -= We, Le.current[this.axis] -= We, Le.requestTick());
2512
2513
  }
2513
- for (const Ve of Fe) this.emit("initSlide", Ve, Ve.index);
2514
+ for (const je of Fe) this.emit("initSlide", je, je.index);
2514
2515
  }
2515
2516
  prependSlide(_e) {
2516
2517
  this.addSlide(0, _e);
@@ -2533,13 +2534,13 @@ class Q extends g {
2533
2534
  if (!De) return;
2534
2535
  const Le = Re ? "width" : "height", Ie = Re ? "offsetWidth" : "offsetHeight";
2535
2536
  if (ke) {
2536
- let je = Math.max(ke[Ie], t(ke.getBoundingClientRect()[Le], 1e3)), Fe = getComputedStyle(ke), Ve = "padding", He = Re ? "Right" : "Bottom";
2537
- je -= parseFloat(Fe[Ve + (Re ? "Left" : "Top")]) + parseFloat(Fe[Ve + He]), this.viewportDim = je;
2537
+ let Ve = Math.max(ke[Ie], t(ke.getBoundingClientRect()[Le], 1e3)), Fe = getComputedStyle(ke), je = "padding", He = Re ? "Right" : "Bottom";
2538
+ Ve -= parseFloat(Fe[je + (Re ? "Left" : "Top")]) + parseFloat(Fe[je + He]), this.viewportDim = Ve;
2538
2539
  }
2539
2540
  let Ae, ze = 0;
2540
- for (const [je, Fe] of $e.entries()) {
2541
- let Ve = 0, He = 0;
2542
- !Fe.el && Ae ? (Ve = Ae.dim, He = Ae.gap) : ({ dim: Ve, gap: He } = this.getSlideMetrics(Fe), Ae = Fe), Ve = t(Ve, 1e3), He = t(He, 1e3), Fe.dim = Ve, Fe.gap = He, Fe.pos = ze, ze += Ve, (Be || je < $e.length - 1) && (ze += He);
2541
+ for (const [Ve, Fe] of $e.entries()) {
2542
+ let je = 0, He = 0;
2543
+ !Fe.el && Ae ? (je = Ae.dim, He = Ae.gap) : ({ dim: je, gap: He } = this.getSlideMetrics(Fe), Ae = Fe), je = t(je, 1e3), He = t(He, 1e3), Fe.dim = je, Fe.gap = He, Fe.pos = ze, ze += je, (Be || Ve < $e.length - 1) && (ze += He);
2543
2544
  }
2544
2545
  ze = t(ze, 1e3), this.contentDim = ze, _e && (_e.contentRect[Le] = ze, _e.contentRect[Re ? "fullWidth" : "fullHeight"] = ze), this.pages = this.createPages(), this.pages = this.processPages(), this.state === B.Init && this.setInitialPage(), this.page = Math.max(0, Math.min(this.page, this.pages.length - 1)), this.manageSlideVisiblity(), this.emit("refresh");
2545
2546
  }
@@ -2547,10 +2548,10 @@ class Q extends g {
2547
2548
  _e === void 0 && (_e = this.page);
2548
2549
  const $e = this, Re = $e.panzoom, Be = $e.contentDim, Le = $e.pages[_e] || 0;
2549
2550
  if (!Le || !Re) return _e > this.page ? -1 : 1;
2550
- let Ie = -1 * Re.current.e, Ae = t((Ie - Le.pos) / (1 * Le.dim), 1e3), ze = Ae, je = Ae;
2551
- this.isInfinite && De !== !0 && (ze = t((Ie - Le.pos + Be) / (1 * Le.dim), 1e3), je = t((Ie - Le.pos - Be) / (1 * Le.dim), 1e3));
2552
- let Fe = [Ae, ze, je].reduce(function(Ve, He) {
2553
- return Math.abs(He) < Math.abs(Ve) ? He : Ve;
2551
+ let Ie = -1 * Re.current.e, Ae = t((Ie - Le.pos) / (1 * Le.dim), 1e3), ze = Ae, Ve = Ae;
2552
+ this.isInfinite && De !== !0 && (ze = t((Ie - Le.pos + Be) / (1 * Le.dim), 1e3), Ve = t((Ie - Le.pos - Be) / (1 * Le.dim), 1e3));
2553
+ let Fe = [Ae, ze, Ve].reduce(function(je, He) {
2554
+ return Math.abs(He) < Math.abs(je) ? He : je;
2554
2555
  });
2555
2556
  return ke ? Fe : Fe > 1 ? 1 : Fe < -1 ? -1 : Fe;
2556
2557
  }
@@ -2574,23 +2575,23 @@ class Q extends g {
2574
2575
  Re = Re + ((ke = this.slides[this.slides.length - 1]) === null || ke === void 0 ? void 0 : ke.gap) || 0;
2575
2576
  let Ae = 0;
2576
2577
  Ae = $e && $e.state !== m.Init && $e.state !== m.Destroy ? -1 * $e.current[this.axis] : Le[Ie] && Le[Ie].pos || 0, this.isInfinite && (Ae -= Math.floor(Ae / Re) * Re), this.isRTL && this.isHorizontal && (Ae *= -1);
2577
- const ze = Ae - Be * _e, je = Ae + Be * (_e + 1), Fe = this.isInfinite ? [-1, 0, 1] : [0];
2578
- for (const Ve of this.slides) for (const He of Fe) {
2579
- const qe = Ve.pos + He * Re, Xe = qe + Ve.dim + Ve.gap;
2580
- qe < je && Xe > ze && De.add(Ve);
2578
+ const ze = Ae - Be * _e, Ve = Ae + Be * (_e + 1), Fe = this.isInfinite ? [-1, 0, 1] : [0];
2579
+ for (const je of this.slides) for (const He of Fe) {
2580
+ const qe = je.pos + He * Re, Xe = qe + je.dim + je.gap;
2581
+ qe < Ve && Xe > ze && De.add(je);
2581
2582
  }
2582
2583
  }
2583
2584
  return De;
2584
2585
  }
2585
2586
  getPageFromPosition(_e) {
2586
- const { viewportDim: ke, contentDim: De, slides: $e, pages: Re, panzoom: Be } = this, Le = Re.length, Ie = $e.length, Ae = $e[0], ze = $e[Ie - 1], je = this.option("center");
2587
- let Fe = 0, Ve = 0, He = 0, qe = _e === void 0 ? -1 * ((Be == null ? void 0 : Be.target[this.axis]) || 0) : _e;
2588
- je && (qe += 0.5 * ke), this.isInfinite ? (qe < Ae.pos - 0.5 * ze.gap && (qe -= De, He = -1), qe > ze.pos + ze.dim + 0.5 * ze.gap && (qe -= De, He = 1)) : qe = Math.max(Ae.pos || 0, Math.min(qe, ze.pos));
2587
+ const { viewportDim: ke, contentDim: De, slides: $e, pages: Re, panzoom: Be } = this, Le = Re.length, Ie = $e.length, Ae = $e[0], ze = $e[Ie - 1], Ve = this.option("center");
2588
+ let Fe = 0, je = 0, He = 0, qe = _e === void 0 ? -1 * ((Be == null ? void 0 : Be.target[this.axis]) || 0) : _e;
2589
+ Ve && (qe += 0.5 * ke), this.isInfinite ? (qe < Ae.pos - 0.5 * ze.gap && (qe -= De, He = -1), qe > ze.pos + ze.dim + 0.5 * ze.gap && (qe -= De, He = 1)) : qe = Math.max(Ae.pos || 0, Math.min(qe, ze.pos));
2589
2590
  let Xe = ze, We = $e.find((Ze) => {
2590
2591
  const Ge = Ze.pos - 0.5 * Xe.gap, Ye = Ze.pos + Ze.dim + 0.5 * Ze.gap;
2591
2592
  return Xe = Ze, qe >= Ge && qe < Ye;
2592
2593
  });
2593
- return We || (We = ze), Ve = this.getPageForSlide(We.index), Fe = Ve + He * Le, { page: Fe, pageIndex: Ve };
2594
+ return We || (We = ze), je = this.getPageForSlide(We.index), Fe = je + He * Le, { page: Fe, pageIndex: je };
2594
2595
  }
2595
2596
  setPageFromPosition() {
2596
2597
  const { pageIndex: _e } = this.getPageFromPosition();
@@ -2722,19 +2723,19 @@ class wt extends _ {
2722
2723
  this.instance.state = rt.CustomClosing, De.classList.remove(yt), De.classList.add("is-zooming-out"), Be.style.backgroundImage = `url('${Ie}')`;
2723
2724
  const ze = De.getBoundingClientRect();
2724
2725
  (((_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.scale) || 1) === 1 && Object.assign(De.style, { position: "absolute", top: `${De.offsetTop + window.scrollY}px`, left: `${De.offsetLeft + window.scrollX}px`, bottom: "auto", right: "auto", width: `${ze.width}px`, height: `${ze.height}px`, overflow: "hidden" });
2725
- const { x: je, y: Fe, scale: Ve, opacity: He } = Ae;
2726
+ const { x: Ve, y: Fe, scale: je, opacity: He } = Ae;
2726
2727
  if (He) {
2727
2728
  const qe = ((Xe, We, Ze, Ge) => {
2728
2729
  const Ye = We - Xe, Ue = Ge - Ze;
2729
2730
  return (Qe) => Ze + ((Qe - Xe) / Ye * Ue || 0);
2730
- })(Le.scale, Ve, 1, 0);
2731
+ })(Le.scale, je, 1, 0);
2731
2732
  Le.on("afterTransform", () => {
2732
2733
  Be.style.opacity = qe(Le.scale) + "";
2733
2734
  });
2734
2735
  }
2735
2736
  Le.on("endAnimation", () => {
2736
2737
  ke.destroy();
2737
- }), Le.target.a = Ve, Le.target.b = 0, Le.target.c = 0, Le.target.d = Ve, Le.panTo({ x: je, y: Fe, scale: Ve, friction: He ? 0.2 : 0.33, ignoreBounds: !0 }), Le.isResting && ke.destroy();
2738
+ }), Le.target.a = je, Le.target.b = 0, Le.target.c = 0, Le.target.d = je, Le.panTo({ x: Ve, y: Fe, scale: je, friction: He ? 0.2 : 0.33, ignoreBounds: !0 }), Le.isResting && ke.destroy();
2738
2739
  }
2739
2740
  setImage(_e, ke) {
2740
2741
  const De = this.instance;
@@ -2747,16 +2748,16 @@ class wt extends _ {
2747
2748
  Ie.addEventListener("contextmenu", (Fe) => {
2748
2749
  Fe.preventDefault();
2749
2750
  });
2750
- const je = document.createElement("div");
2751
- P(je, "fancybox-protected"), Re.appendChild(je);
2751
+ const Ve = document.createElement("div");
2752
+ P(Ve, "fancybox-protected"), Re.appendChild(Ve);
2752
2753
  }
2753
2754
  if (Le && Ae) {
2754
- const je = $e.contentRect, Fe = Math.max(je.fullWidth, je.fullHeight);
2755
- let Ve = null;
2756
- !Ae.opacity && Fe > 1200 && (Ve = document.createElement("img"), P(Ve, "fancybox-ghost"), Ve.src = Le, Re.appendChild(Ve));
2755
+ const Ve = $e.contentRect, Fe = Math.max(Ve.fullWidth, Ve.fullHeight);
2756
+ let je = null;
2757
+ !Ae.opacity && Fe > 1200 && (je = document.createElement("img"), P(je, "fancybox-ghost"), je.src = Le, Re.appendChild(je));
2757
2758
  const He = () => {
2758
- Ve && (P(Ve, "f-fadeFastOut"), setTimeout(() => {
2759
- Ve && (Ve.remove(), Ve = null);
2759
+ je && (P(je, "f-fadeFastOut"), setTimeout(() => {
2760
+ je && (je.remove(), je = null);
2760
2761
  }, 200));
2761
2762
  };
2762
2763
  (ze = Le, new Promise((qe, Xe) => {
@@ -2766,16 +2767,16 @@ class wt extends _ {
2766
2767
  De.hideLoading(_e), _e.state = lt.Opening, this.instance.emit("reveal", _e), this.zoomIn(_e).then(() => {
2767
2768
  He(), this.instance.done(_e);
2768
2769
  }, () => {
2769
- }), Ve && setTimeout(() => {
2770
+ }), je && setTimeout(() => {
2770
2771
  He();
2771
2772
  }, Fe > 2500 ? 800 : 200);
2772
2773
  }, () => {
2773
2774
  De.hideLoading(_e), De.revealContent(_e);
2774
2775
  });
2775
2776
  } else {
2776
- const je = this.optionFor(_e, "initialSize"), Fe = this.optionFor(_e, "zoom"), Ve = { event: De.prevMouseMoveEvent || De.options.event, friction: Fe ? 0.12 : 0 };
2777
+ const Ve = this.optionFor(_e, "initialSize"), Fe = this.optionFor(_e, "zoom"), je = { event: De.prevMouseMoveEvent || De.options.event, friction: Fe ? 0.12 : 0 };
2777
2778
  let He = De.optionFor(_e, "showClass") || void 0, qe = !0;
2778
- De.isOpeningSlide(_e) && (je === "full" ? $e.zoomToFull(Ve) : je === "cover" ? $e.zoomToCover(Ve) : je === "max" ? $e.zoomToMax(Ve) : qe = !1, $e.stop("current")), qe && He && (He = $e.isDragging ? "f-fadeIn" : ""), De.hideLoading(_e), De.revealContent(_e, He);
2779
+ De.isOpeningSlide(_e) && (Ve === "full" ? $e.zoomToFull(je) : Ve === "cover" ? $e.zoomToCover(je) : Ve === "max" ? $e.zoomToMax(je) : qe = !1, $e.stop("current")), qe && He && (He = $e.isDragging ? "f-fadeIn" : ""), De.hideLoading(_e), De.revealContent(_e, He);
2779
2780
  }
2780
2781
  var ze;
2781
2782
  }, () => {
@@ -2799,14 +2800,14 @@ class wt extends _ {
2799
2800
  const Ae = Be.option("wheel");
2800
2801
  return (Ae === "zoom" || Ae == "pan") && Ae;
2801
2802
  }, click: (Ae, ze) => {
2802
- var je, Fe;
2803
- if (Be.isCompact || Be.isClosing() || _e.index !== ((je = Be.getSlide()) === null || je === void 0 ? void 0 : je.index)) return !1;
2803
+ var Ve, Fe;
2804
+ if (Be.isCompact || Be.isClosing() || _e.index !== ((Ve = Be.getSlide()) === null || Ve === void 0 ? void 0 : Ve.index)) return !1;
2804
2805
  if (ze) {
2805
2806
  const He = ze.composedPath()[0];
2806
2807
  if (["A", "BUTTON", "TEXTAREA", "OPTION", "INPUT", "SELECT", "VIDEO"].includes(He.nodeName)) return !1;
2807
2808
  }
2808
- let Ve = !ze || ze.target && ((Fe = _e.contentEl) === null || Fe === void 0 ? void 0 : Fe.contains(ze.target));
2809
- return Be.option(Ve ? "contentClick" : "backdropClick") || !1;
2809
+ let je = !ze || ze.target && ((Fe = _e.contentEl) === null || Fe === void 0 ? void 0 : Fe.contains(ze.target));
2810
+ return Be.option(je ? "contentClick" : "backdropClick") || !1;
2810
2811
  }, dblClick: () => Be.isCompact ? "toggleZoom" : Be.option("contentDblClick") || !1, spinner: !1, panOnlyZoomed: !0, wheelLimit: 1 / 0, on: { ready: (Ae) => {
2811
2812
  De(Ae);
2812
2813
  }, error: () => {
@@ -2822,14 +2823,14 @@ class wt extends _ {
2822
2823
  Be && Be.updateMetrics();
2823
2824
  const Ae = this.getZoomInfo(_e);
2824
2825
  if (!(Ae && Ie && Le && Be && Re)) return void De();
2825
- const { x: ze, y: je, scale: Fe, opacity: Ve } = Ae, He = () => {
2826
- _e.state !== lt.Closing && (Ve && (Le.style.opacity = Math.max(Math.min(1, 1 - (1 - Be.scale) / (1 - Fe)), 0) + ""), Be.scale >= 1 && Be.scale > Be.targetScale - 0.1 && ke(Be));
2826
+ const { x: ze, y: Ve, scale: Fe, opacity: je } = Ae, He = () => {
2827
+ _e.state !== lt.Closing && (je && (Le.style.opacity = Math.max(Math.min(1, 1 - (1 - Be.scale) / (1 - Fe)), 0) + ""), Be.scale >= 1 && Be.scale > Be.targetScale - 0.1 && ke(Be));
2827
2828
  }, qe = (Ze) => {
2828
2829
  (Ze.scale < 0.99 || Ze.scale > 1.01) && !Ze.isDragging || (S(Re, yt), Le.style.opacity = "", Ze.off("endAnimation", qe), Ze.off("touchStart", qe), Ze.off("afterTransform", He), ke(Ze));
2829
2830
  };
2830
2831
  Be.on("endAnimation", qe), Be.on("touchStart", qe), Be.on("afterTransform", He), Be.on(["error", "destroy"], () => {
2831
2832
  De();
2832
- }), Be.panTo({ x: ze, y: je, scale: Fe, friction: 0, ignoreBounds: !0 }), Be.stop("current");
2833
+ }), Be.panTo({ x: ze, y: Ve, scale: Fe, friction: 0, ignoreBounds: !0 }), Be.stop("current");
2833
2834
  const Xe = { event: Be.panMode === "mousemove" ? $e.prevMouseMoveEvent || $e.options.event : void 0 }, We = this.optionFor(_e, "initialSize");
2834
2835
  P(Re, yt), $e.hideLoading(_e), We === "full" ? Be.zoomToFull(Xe) : We === "cover" ? Be.zoomToCover(Xe) : We === "max" ? Be.zoomToMax(Xe) : Be.reset(0.172);
2835
2836
  });
@@ -2839,13 +2840,13 @@ class wt extends _ {
2839
2840
  if (!ke || !De || !$e || !Re || tt($e) < 3 || !this.optionFor(_e, "zoom") || !Le || Be.state === rt.Destroy || getComputedStyle(Le).getPropertyValue("--f-images-zoom") === "0") return !1;
2840
2841
  const Ie = window.visualViewport || null;
2841
2842
  if ((Ie ? Ie.scale : 1) !== 1) return !1;
2842
- let { top: Ae, left: ze, width: je, height: Fe } = $e.getBoundingClientRect(), { top: Ve, left: He, fitWidth: qe, fitHeight: Xe } = Re.contentRect;
2843
- if (!(je && Fe && qe && Xe)) return !1;
2843
+ let { top: Ae, left: ze, width: Ve, height: Fe } = $e.getBoundingClientRect(), { top: je, left: He, fitWidth: qe, fitHeight: Xe } = Re.contentRect;
2844
+ if (!(Ve && Fe && qe && Xe)) return !1;
2844
2845
  const We = Re.container.getBoundingClientRect();
2845
- He += We.left, Ve += We.top;
2846
- const Ze = -1 * (He + 0.5 * qe - (ze + 0.5 * je)), Ge = -1 * (Ve + 0.5 * Xe - (Ae + 0.5 * Fe)), Ye = je / qe;
2846
+ He += We.left, je += We.top;
2847
+ const Ze = -1 * (He + 0.5 * qe - (ze + 0.5 * Ve)), Ge = -1 * (je + 0.5 * Xe - (Ae + 0.5 * Fe)), Ye = Ve / qe;
2847
2848
  let Ue = this.option("zoomOpacity") || !1;
2848
- return Ue === "auto" && (Ue = Math.abs(je / Fe - qe / Xe) > 0.1), { x: Ze, y: Ge, scale: Ye, opacity: Ue };
2849
+ return Ue === "auto" && (Ue = Math.abs(Ve / Fe - qe / Xe) > 0.1), { x: Ze, y: Ge, scale: Ye, opacity: Ue };
2849
2850
  }
2850
2851
  attach() {
2851
2852
  const _e = this, ke = _e.instance;
@@ -2982,10 +2983,10 @@ class Lt extends _ {
2982
2983
  Be && Le && (Re = !1);
2983
2984
  const Ie = $e && $e.style;
2984
2985
  if (_e.preload !== !1 && Re !== !1 && Ie) try {
2985
- const Ae = window.getComputedStyle($e), ze = parseFloat(Ae.paddingLeft) + parseFloat(Ae.paddingRight), je = parseFloat(Ae.paddingTop) + parseFloat(Ae.paddingBottom), Fe = De.contentWindow;
2986
+ const Ae = window.getComputedStyle($e), ze = parseFloat(Ae.paddingLeft) + parseFloat(Ae.paddingRight), Ve = parseFloat(Ae.paddingTop) + parseFloat(Ae.paddingBottom), Fe = De.contentWindow;
2986
2987
  if (Fe) {
2987
- const Ve = Fe.document, He = Ve.getElementsByTagName(xt)[0], qe = Ve.body;
2988
- Ie.width = "", qe.style.overflow = "hidden", Be = Be || He.scrollWidth + ze, Ie.width = `${Be}px`, qe.style.overflow = "", Ie.flex = "0 0 auto", Ie.height = `${qe.scrollHeight}px`, Le = He.scrollHeight + je;
2988
+ const je = Fe.document, He = je.getElementsByTagName(xt)[0], qe = je.body;
2989
+ Ie.width = "", qe.style.overflow = "hidden", Be = Be || He.scrollWidth + ze, Ie.width = `${Be}px`, qe.style.overflow = "", Ie.flex = "0 0 auto", Ie.height = `${qe.scrollHeight}px`, Le = He.scrollHeight + Ve;
2989
2990
  }
2990
2991
  } catch {
2991
2992
  }
@@ -3027,14 +3028,14 @@ class Lt extends _ {
3027
3028
  if (!ke || typeof ke != "string") return;
3028
3029
  let De = _e.type, $e = null;
3029
3030
  if ($e = ke.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)) {
3030
- const Re = this.optionFor(_e, Pt), { nocookie: Be } = Re, Le = function(je, Fe) {
3031
- var Ve = {};
3032
- for (var He in je) Object.prototype.hasOwnProperty.call(je, He) && Fe.indexOf(He) < 0 && (Ve[He] = je[He]);
3033
- if (je != null && typeof Object.getOwnPropertySymbols == "function") {
3031
+ const Re = this.optionFor(_e, Pt), { nocookie: Be } = Re, Le = function(Ve, Fe) {
3032
+ var je = {};
3033
+ for (var He in Ve) Object.prototype.hasOwnProperty.call(Ve, He) && Fe.indexOf(He) < 0 && (je[He] = Ve[He]);
3034
+ if (Ve != null && typeof Object.getOwnPropertySymbols == "function") {
3034
3035
  var qe = 0;
3035
- for (He = Object.getOwnPropertySymbols(je); qe < He.length; qe++) Fe.indexOf(He[qe]) < 0 && Object.prototype.propertyIsEnumerable.call(je, He[qe]) && (Ve[He[qe]] = je[He[qe]]);
3036
+ for (He = Object.getOwnPropertySymbols(Ve); qe < He.length; qe++) Fe.indexOf(He[qe]) < 0 && Object.prototype.propertyIsEnumerable.call(Ve, He[qe]) && (je[He[qe]] = Ve[He[qe]]);
3036
3037
  }
3037
- return Ve;
3038
+ return je;
3038
3039
  }(Re, ["nocookie"]), Ie = `www.youtube${Be ? "-nocookie" : ""}.com`, Ae = Mt(ke, Le), ze = encodeURIComponent($e[2]);
3039
3040
  _e.videoId = ze, _e.src = `https://${Ie}/embed/${ze}?${Ae}`, _e.thumbSrc = _e.thumbSrc || `https://i.ytimg.com/vi/${ze}/mqdefault.jpg`, De = Pt;
3040
3041
  } else if ($e = ke.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)) {
@@ -3333,16 +3334,16 @@ let $t = class extends _ {
3333
3334
  Ie || (Ie = document.createElement("div"), P(Ie, Be), Re ? Re.appendChild(Ie) : ke.after(Ie)), P(Ie, `is-${$e}`), P(ke, Ne.cn("hasThumbs")), Ne.container = Ie, Ne.updateProps();
3334
3335
  let Ae = Ie.querySelector("." + Le);
3335
3336
  Ae || (Ae = document.createElement("div"), P(Ae, Ne.cn("track")), Ie.appendChild(Ae)), Ne.track = Ae;
3336
- const ze = u({}, { track: Ae, infinite: !1, center: !0, fill: $e === "classic", dragFree: !0, slidesPerPage: 1, transition: !1, preload: 0.25, friction: 0.12, Panzoom: { maxVelocity: 0 }, Dots: !1, Navigation: !1, classes: { container: "f-thumbs", viewport: "f-thumbs__viewport", track: "f-thumbs__track", slide: "f-thumbs__slide" } }, Ne.option("Carousel") || {}, { Sync: { target: _e }, slides: De }), je = new _e.constructor(Ie, ze);
3337
- je.on("createSlide", (Fe, Ve) => {
3338
- Ne.setProps(Ve.index), Ne.emit("createSlide", Ve, Ve.el);
3339
- }), je.on("ready", () => {
3337
+ const ze = u({}, { track: Ae, infinite: !1, center: !0, fill: $e === "classic", dragFree: !0, slidesPerPage: 1, transition: !1, preload: 0.25, friction: 0.12, Panzoom: { maxVelocity: 0 }, Dots: !1, Navigation: !1, classes: { container: "f-thumbs", viewport: "f-thumbs__viewport", track: "f-thumbs__track", slide: "f-thumbs__slide" } }, Ne.option("Carousel") || {}, { Sync: { target: _e }, slides: De }), Ve = new _e.constructor(Ie, ze);
3338
+ Ve.on("createSlide", (Fe, je) => {
3339
+ Ne.setProps(je.index), Ne.emit("createSlide", je, je.el);
3340
+ }), Ve.on("ready", () => {
3340
3341
  Ne.shiftModern(), Ne.emit("ready");
3341
- }), je.on("refresh", () => {
3342
+ }), Ve.on("refresh", () => {
3342
3343
  Ne.shiftModern();
3343
- }), je.on("Panzoom.click", (Fe, Ve, He) => {
3344
+ }), Ve.on("Panzoom.click", (Fe, je, He) => {
3344
3345
  Ne.onClick(He);
3345
- }), Ne.carousel = je, Ne.state = jt.Ready;
3346
+ }), Ne.carousel = Ve, Ne.state = jt.Ready;
3346
3347
  }
3347
3348
  onClick(Ne) {
3348
3349
  Ne.preventDefault(), Ne.stopPropagation();
@@ -3359,8 +3360,8 @@ let $t = class extends _ {
3359
3360
  let [Be, Le] = $e(Ne.target);
3360
3361
  if (Be > -1) return;
3361
3362
  const Ie = this[_t], Ae = Ne.clientX, ze = Ne.clientY;
3362
- let [je, Fe] = Re(Ae - Ie, ze), [Ve, He] = Re(Ae + Ie, ze);
3363
- Fe && He ? (Be = Math.abs(Ae - Fe.getBoundingClientRect().right) < Math.abs(Ae - He.getBoundingClientRect().left) ? je : Ve, Be === De && (Be = Be === je ? Ve : je)) : Fe ? Be = je : He && (Be = Ve), Be > -1 && ke[Be] && _e.slideTo(Be);
3363
+ let [Ve, Fe] = Re(Ae - Ie, ze), [je, He] = Re(Ae + Ie, ze);
3364
+ Fe && He ? (Be = Math.abs(Ae - Fe.getBoundingClientRect().right) < Math.abs(Ae - He.getBoundingClientRect().left) ? Ve : je, Be === De && (Be = Be === Ve ? je : Ve)) : Fe ? Be = Ve : He && (Be = je), Be > -1 && ke[Be] && _e.slideTo(Be);
3364
3365
  }
3365
3366
  getShift(Ne) {
3366
3367
  var _e;
@@ -3369,9 +3370,9 @@ let $t = class extends _ {
3369
3370
  const Re = ke[Ht], Be = ke[_t], Le = ke.thumbGap, Ie = ke.thumbExtraGap;
3370
3371
  if (!(!((_e = $e.slides[Ne]) === null || _e === void 0) && _e.el)) return 0;
3371
3372
  const Ae = 0.5 * (Re - Be), ze = De.pages.length - 1;
3372
- let je = De.getProgress(0), Fe = De.getProgress(ze), Ve = De.getProgress(Ne, !1, !0), He = 0, qe = Ae + Ie + Le;
3373
- const Xe = je < 0 && je > -1, We = Fe > 0 && Fe < 1;
3374
- return Ne === 0 ? (He = qe * Math.abs(je), We && je === 1 && (He -= qe * Math.abs(Fe))) : Ne === ze ? (He = qe * Math.abs(Fe) * -1, Xe && Fe === -1 && (He += qe * Math.abs(je))) : Xe || We ? (He = -1 * qe, He += qe * Math.abs(je), He += qe * (1 - Math.abs(Fe))) : He = qe * Ve, He;
3373
+ let Ve = De.getProgress(0), Fe = De.getProgress(ze), je = De.getProgress(Ne, !1, !0), He = 0, qe = Ae + Ie + Le;
3374
+ const Xe = Ve < 0 && Ve > -1, We = Fe > 0 && Fe < 1;
3375
+ return Ne === 0 ? (He = qe * Math.abs(Ve), We && Ve === 1 && (He -= qe * Math.abs(Fe))) : Ne === ze ? (He = qe * Math.abs(Fe) * -1, Xe && Fe === -1 && (He += qe * Math.abs(Ve))) : Xe || We ? (He = -1 * qe, He += qe * Math.abs(Ve), He += qe * (1 - Math.abs(Fe))) : He = qe * je, He;
3375
3376
  }
3376
3377
  setProps(Ne) {
3377
3378
  var _e;
@@ -3503,23 +3504,23 @@ class Qt extends _ {
3503
3504
  if (Re === "auto") {
3504
3505
  const Ae = this.instance.carousel;
3505
3506
  let ze = 0;
3506
- if (Ae) for (const je of Ae.slides) (je.panzoom || je.type === "image") && ze++;
3507
+ if (Ae) for (const Ve of Ae.slides) (Ve.panzoom || Ve.type === "image") && ze++;
3507
3508
  ze || (Re = !1);
3508
3509
  }
3509
3510
  Re || (De = void 0);
3510
3511
  let Be = 0;
3511
3512
  const Le = { left: [], middle: [], right: [] };
3512
3513
  if (De) for (const Ae of ["left", "middle", "right"]) for (const ze of De[Ae]) {
3513
- const je = this.createEl(ze);
3514
- je && ((ke = Le[Ae]) === null || ke === void 0 || ke.push(je), Be++);
3514
+ const Ve = this.createEl(ze);
3515
+ Ve && ((ke = Le[Ae]) === null || ke === void 0 || ke.push(Ve), Be++);
3515
3516
  }
3516
3517
  let Ie = null;
3517
3518
  if (Be && (Ie = this.createContainer()), Ie) {
3518
3519
  for (const [Ae, ze] of Object.entries(Le)) {
3519
- const je = document.createElement("div");
3520
- P(je, Jt + "__column is-" + Ae);
3521
- for (const Fe of ze) je.appendChild(Fe);
3522
- $e !== "auto" || Ae !== "middle" || ze.length || ($e = !0), Ie.appendChild(je);
3520
+ const Ve = document.createElement("div");
3521
+ P(Ve, Jt + "__column is-" + Ae);
3522
+ for (const Fe of ze) Ve.appendChild(Fe);
3523
+ $e !== "auto" || Ae !== "middle" || ze.length || ($e = !0), Ie.appendChild(Ve);
3523
3524
  }
3524
3525
  $e === !0 && P(Ie, "is-absolute"), this.state = Zt.Ready, this.onRefresh();
3525
3526
  } else this.state = Zt.Disabled;
@@ -3532,18 +3533,18 @@ class Qt extends _ {
3532
3533
  if (Ie.fancyboxToggleFullscreen !== void 0) return _e.preventDefault(), _e.stopPropagation(), void this.instance.toggleFullscreen();
3533
3534
  if (Ie.fancyboxToggleSlideshow !== void 0) {
3534
3535
  _e.preventDefault(), _e.stopPropagation();
3535
- const je = (De = $e.carousel) === null || De === void 0 ? void 0 : De.plugins.Autoplay;
3536
- let Fe = je.isActive;
3537
- return Be && Be.panMode === "mousemove" && !Fe && Be.reset(), void (Fe ? je.stop() : je.start());
3536
+ const Ve = (De = $e.carousel) === null || De === void 0 ? void 0 : De.plugins.Autoplay;
3537
+ let Fe = Ve.isActive;
3538
+ return Be && Be.panMode === "mousemove" && !Fe && Be.reset(), void (Fe ? Ve.stop() : Ve.start());
3538
3539
  }
3539
3540
  const Ae = Ie.panzoomAction, ze = Ie.panzoomChange;
3540
3541
  if ((ze || Ae) && (_e.preventDefault(), _e.stopPropagation()), ze) {
3541
- let je = {};
3542
+ let Ve = {};
3542
3543
  try {
3543
- je = JSON.parse(ze);
3544
+ Ve = JSON.parse(ze);
3544
3545
  } catch {
3545
3546
  }
3546
- Be && Be.applyChange(je);
3547
+ Be && Be.applyChange(Ve);
3547
3548
  } else Ae && Be && Be[Ae] && Be[Ae]();
3548
3549
  }
3549
3550
  onChange() {
@@ -3881,7 +3882,7 @@ class Oe extends g {
3881
3882
  if (!Re) return;
3882
3883
  S(Re, de);
3883
3884
  const Be = this.isCompact || this.option("commonCaption"), Le = !Be;
3884
- if (this.caption && this.stop(this.caption), Le && this.caption && (this.caption.remove(), this.caption = null), Be && !this.caption) for (const je of ((ke = this.carousel) === null || ke === void 0 ? void 0 : ke.slides) || []) je.captionEl && (je.captionEl.remove(), je.captionEl = void 0, S(je.el, de), (De = je.el) === null || De === void 0 || De.removeAttribute("aria-labelledby"));
3885
+ if (this.caption && this.stop(this.caption), Le && this.caption && (this.caption.remove(), this.caption = null), Be && !this.caption) for (const Ve of ((ke = this.carousel) === null || ke === void 0 ? void 0 : ke.slides) || []) Ve.captionEl && (Ve.captionEl.remove(), Ve.captionEl = void 0, S(Ve.el, de), (De = Ve.el) === null || De === void 0 || De.removeAttribute("aria-labelledby"));
3885
3886
  if (_e || (_e = this.getSlide()), !_e || Be && !this.isCurrentSlide(_e)) return;
3886
3887
  const Ie = _e.el;
3887
3888
  let Ae = this.optionFor(_e, "caption", "");
@@ -3891,8 +3892,8 @@ class Oe extends g {
3891
3892
  let ze = null;
3892
3893
  if (Le) {
3893
3894
  if (ze = _e.captionEl || null, Ie && !ze) {
3894
- const je = $e + `_${this.id}_${_e.index}`;
3895
- ze = document.createElement("div"), P(ze, $e), ze.setAttribute("id", je), _e.captionEl = Ie.appendChild(ze), P(Ie, de), Ie.setAttribute("aria-labelledby", je);
3895
+ const Ve = $e + `_${this.id}_${_e.index}`;
3896
+ ze = document.createElement("div"), P(ze, $e), ze.setAttribute("id", Ve), _e.captionEl = Ie.appendChild(ze), P(Ie, de), Ie.setAttribute("aria-labelledby", Ve);
3896
3897
  }
3897
3898
  } else
3898
3899
  ze = this.caption, ze || (ze = Re.querySelector("." + $e)), !ze && (ze = document.createElement("div"), ze.dataset.fancyboxCaption = "", P(ze, $e), (this.footer || Re).prepend(ze)), P(Re, de), this.caption = ze;
@@ -3910,20 +3911,20 @@ class Oe extends g {
3910
3911
  if (!Ie || Ie.contains(De) || Re === De) return;
3911
3912
  _e && _e.cancelable && _e.preventDefault(), this.ignoreFocusChange = !0;
3912
3913
  const Ae = Array.from(Re.querySelectorAll(nt));
3913
- let ze = [], je = null;
3914
- for (let Ve of Ae) {
3915
- const He = !Ve.offsetParent || !!Ve.closest('[aria-hidden="true"]'), qe = Ie && Ie.contains(Ve), Xe = !Be.contains(Ve);
3916
- if (Ve === Re || (qe || Xe) && !He) {
3917
- ze.push(Ve);
3918
- const We = Ve.dataset.origTabindex;
3919
- We !== void 0 && We && (Ve.tabIndex = parseFloat(We)), Ve.removeAttribute("data-orig-tabindex"), !Ve.hasAttribute("autoFocus") && je || (je = Ve);
3914
+ let ze = [], Ve = null;
3915
+ for (let je of Ae) {
3916
+ const He = !je.offsetParent || !!je.closest('[aria-hidden="true"]'), qe = Ie && Ie.contains(je), Xe = !Be.contains(je);
3917
+ if (je === Re || (qe || Xe) && !He) {
3918
+ ze.push(je);
3919
+ const We = je.dataset.origTabindex;
3920
+ We !== void 0 && We && (je.tabIndex = parseFloat(We)), je.removeAttribute("data-orig-tabindex"), !je.hasAttribute("autoFocus") && Ve || (Ve = je);
3920
3921
  } else {
3921
- const We = Ve.dataset.origTabindex === void 0 ? Ve.getAttribute("tabindex") || "" : Ve.dataset.origTabindex;
3922
- We && (Ve.dataset.origTabindex = We), Ve.tabIndex = -1;
3922
+ const We = je.dataset.origTabindex === void 0 ? je.getAttribute("tabindex") || "" : je.dataset.origTabindex;
3923
+ We && (je.dataset.origTabindex = We), je.tabIndex = -1;
3923
3924
  }
3924
3925
  }
3925
3926
  let Fe = null;
3926
- _e ? (!$e || ze.indexOf($e) < 0) && (Fe = je || Re, ze.length && (De === xe ? Fe = ze[0] : this.lastFocus !== Re && De !== we || (Fe = ze[ze.length - 1]))) : Fe = Le && Le.type === "image" ? Re : je || Re, Fe && st(Fe), this.lastFocus = document.activeElement, this.ignoreFocusChange = !1;
3927
+ _e ? (!$e || ze.indexOf($e) < 0) && (Fe = Ve || Re, ze.length && (De === xe ? Fe = ze[0] : this.lastFocus !== Re && De !== we || (Fe = ze[ze.length - 1]))) : Fe = Le && Le.type === "image" ? Re : Ve || Re, Fe && st(Fe), this.lastFocus = document.activeElement, this.ignoreFocusChange = !1;
3927
3928
  }
3928
3929
  next() {
3929
3930
  const _e = this.carousel;
@@ -4069,8 +4070,8 @@ class Oe extends g {
4069
4070
  Ae.state = lt.Closing, this.hideLoading(Ae);
4070
4071
  const ze = Ae.contentEl;
4071
4072
  ze && this.stop(ze);
4072
- const je = Ae == null ? void 0 : Ae.panzoom;
4073
- je && (je.stop(), je.detachEvents(), je.detachObserver()), this.isCurrentSlide(Ae) || Be.emit("removeSlide", Ae);
4073
+ const Ve = Ae == null ? void 0 : Ae.panzoom;
4074
+ Ve && (Ve.stop(), Ve.detachEvents(), Ve.detachObserver()), this.isCurrentSlide(Ae) || Be.emit("removeSlide", Ae);
4074
4075
  }
4075
4076
  }
4076
4077
  Pe = window.scrollX, Ce = window.scrollY, window.addEventListener("scroll", this.onScroll), this.emit("close", _e), this.state !== rt.CustomClosing ? (ke === void 0 && Le && (ke = this.optionFor(Le, "hideClass")), ke && Le ? (this.animate(Le.contentEl, ke, () => {
@@ -4131,10 +4132,10 @@ class Oe extends g {
4131
4132
  Le = Le || {}, _e.preventDefault(), ke = Be;
4132
4133
  let Ie = [], Ae = u({}, at, Le);
4133
4134
  Ae.event = _e, Ae.triggerEl = ke, Ae.delegate = De;
4134
- const ze = Ae.groupAll, je = Ae.groupAttr, Fe = je && ke ? ke.getAttribute(`${je}`) : "";
4135
- if ((!ke || Fe || ze) && (Ie = [].slice.call($e.querySelectorAll(Re))), ke && !ze && (Ie = Fe ? Ie.filter((He) => He.getAttribute(`${je}`) === Fe) : [ke]), !Ie.length) return;
4136
- const Ve = Oe.getInstance();
4137
- return Ve && Ve.options.triggerEl && Ie.indexOf(Ve.options.triggerEl) > -1 ? void 0 : (ke && (Ae.startIndex = Ie.indexOf(ke)), Oe.fromNodes(Ie, Ae));
4135
+ const ze = Ae.groupAll, Ve = Ae.groupAttr, Fe = Ve && ke ? ke.getAttribute(`${Ve}`) : "";
4136
+ if ((!ke || Fe || ze) && (Ie = [].slice.call($e.querySelectorAll(Re))), ke && !ze && (Ie = Fe ? Ie.filter((He) => He.getAttribute(`${Ve}`) === Fe) : [ke]), !Ie.length) return;
4137
+ const je = Oe.getInstance();
4138
+ return je && je.options.triggerEl && Ie.indexOf(je.options.triggerEl) > -1 ? void 0 : (ke && (Ae.startIndex = Ie.indexOf(ke)), Oe.fromNodes(Ie, Ae));
4138
4139
  }
4139
4140
  static fromSelector(_e, ke, De) {
4140
4141
  let $e = null, Re = "", Be = {};
@@ -4152,9 +4153,9 @@ class Oe extends g {
4152
4153
  let Ae;
4153
4154
  Ie && De.length === ke.startIndex && (Le = Ie instanceof HTMLImageElement ? Ie : Ie.querySelector("img:not([aria-hidden])")), Le || (Le = $e instanceof HTMLImageElement ? $e : $e.querySelector("img:not([aria-hidden])")), Le && (Ae = Le.currentSrc || Le[me] || void 0, !Ae && Le.dataset && (Ae = Le.dataset.lazySrc || Le.dataset[me] || void 0));
4154
4155
  const ze = { src: Be, triggerEl: $e, thumbEl: Le, thumbElSrc: Ae, thumbSrc: Ae };
4155
- for (const je in Re) {
4156
- let Fe = Re[je] + "";
4157
- Fe = Fe !== "false" && (Fe === "true" || Fe), ze[je] = Fe;
4156
+ for (const Ve in Re) {
4157
+ let Fe = Re[Ve] + "";
4158
+ Fe = Fe !== "false" && (Fe === "true" || Fe), ze[Ve] = Fe;
4158
4159
  }
4159
4160
  De.push(ze);
4160
4161
  }
@@ -4274,15 +4275,15 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
4274
4275
  emits: ["changeComponent"],
4275
4276
  setup(Ne) {
4276
4277
  const _e = Ne, ke = ref(!1), De = ref(0), $e = computed$1(() => {
4277
- var Le, Ie, Ae, ze, je, Fe;
4278
- return !!((Ae = (Ie = (Le = _e.flat) == null ? void 0 : Le.type) == null ? void 0 : Ie.image_2d) != null && Ae.length && ((Fe = (je = (ze = _e.flat) == null ? void 0 : ze.type) == null ? void 0 : je.image_3d) != null && Fe.length));
4278
+ var Le, Ie, Ae, ze, Ve, Fe;
4279
+ return !!((Ae = (Ie = (Le = _e.flat) == null ? void 0 : Le.type) == null ? void 0 : Ie.image_2d) != null && Ae.length && ((Fe = (Ve = (ze = _e.flat) == null ? void 0 : ze.type) == null ? void 0 : Ve.image_3d) != null && Fe.length));
4279
4280
  }), Re = computed$1(() => {
4280
- var Ie, Ae, ze, je, Fe, Ve;
4281
- const Le = ke.value ? (ze = (Ae = (Ie = _e.flat) == null ? void 0 : Ie.type) == null ? void 0 : Ae.image_2d) == null ? void 0 : ze.length : (Ve = (Fe = (je = _e.flat) == null ? void 0 : je.type) == null ? void 0 : Fe.image_3d) == null ? void 0 : Ve.length;
4281
+ var Ie, Ae, ze, Ve, Fe, je;
4282
+ const Le = ke.value ? (ze = (Ae = (Ie = _e.flat) == null ? void 0 : Ie.type) == null ? void 0 : Ae.image_2d) == null ? void 0 : ze.length : (je = (Fe = (Ve = _e.flat) == null ? void 0 : Ve.type) == null ? void 0 : Fe.image_3d) == null ? void 0 : je.length;
4282
4283
  return ["I", "II", "III"].slice(0, Le);
4283
4284
  }), Be = computed$1(() => {
4284
- var Le, Ie, Ae, ze, je, Fe;
4285
- return ((Ae = (Ie = (Le = _e.flat) == null ? void 0 : Le.type) == null ? void 0 : Ie.image_3d) == null ? void 0 : Ae.length) || ((Fe = (je = (ze = _e.flat) == null ? void 0 : ze.type) == null ? void 0 : je.image_2d) == null ? void 0 : Fe.length);
4285
+ var Le, Ie, Ae, ze, Ve, Fe;
4286
+ return ((Ae = (Ie = (Le = _e.flat) == null ? void 0 : Le.type) == null ? void 0 : Ie.image_3d) == null ? void 0 : Ae.length) || ((Fe = (Ve = (ze = _e.flat) == null ? void 0 : ze.type) == null ? void 0 : Ve.image_2d) == null ? void 0 : Fe.length);
4286
4287
  });
4287
4288
  return watch(
4288
4289
  () => ke.value,
@@ -4293,7 +4294,7 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
4293
4294
  var Le, Ie, Ae;
4294
4295
  (Ae = Object.keys(((Ie = (Le = _e.flat) == null ? void 0 : Le.type) == null ? void 0 : Ie.image_3d) || {})) != null && Ae.length || (ke.value = !0);
4295
4296
  }), (Le, Ie) => {
4296
- var Ae, ze, je, Fe, Ve, He, qe, Xe, We, Ze, Ge, Ye, Ue, Qe, Je, Ke, ei, ii, ti, ni, oi, si, ri, ai, li, hi, di, fi, mi, gi, vi, bi, yi, _i, wi;
4297
+ var Ae, ze, Ve, Fe, je, He, qe, Xe, We, Ze, Ge, Ye, Ue, Qe, Je, Ke, ei, ii, ti, ni, oi, si, ri, ai, li, hi, di, fi, mi, gi, vi, bi, yi, _i, wi;
4297
4298
  return openBlock(), createElementBlock("div", _hoisted_1$5, [
4298
4299
  Be.value ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
4299
4300
  (Ae = Le.flat) != null && Ae.conf ? (openBlock(), createElementBlock("div", _hoisted_3$3, toDisplayString(unref(tr)(Le.flat.conf)), 1)) : createCommentVNode("", !0),
@@ -4304,7 +4305,7 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
4304
4305
  mode: "out-in"
4305
4306
  }, {
4306
4307
  default: withCtx(() => {
4307
- var ci, ui, pi, xi, Si, ki, Ei, Ci, Pi, Ti, Mi, Oi, Di, $i, Ri, Bi, Ni, Li, Ai, Ii, zi, ji, Vi, Fi, Hi, Wi, Xi, qi, Yi, Zi, Ui, Gi;
4308
+ var ci, ui, pi, xi, Si, ki, Ei, Ci, Pi, Ti, Mi, Oi, Di, $i, Ri, Bi, Ni, Li, Ai, Ii, zi, Vi, ji, Fi, Hi, Wi, Xi, qi, Yi, Zi, Ui, Gi;
4308
4309
  return [
4309
4310
  ke.value && ((xi = (pi = (ui = (ci = Le.flat) == null ? void 0 : ci.type) == null ? void 0 : ui.image_2d) == null ? void 0 : pi[De.value]) != null && xi.url) ? (openBlock(), createElementBlock("a", {
4310
4311
  key: 0,
@@ -4320,7 +4321,7 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
4320
4321
  ], 8, _hoisted_4$2)) : (Ii = (Ai = (Li = (Ni = Le.flat) == null ? void 0 : Ni.type) == null ? void 0 : Li.image_3d) == null ? void 0 : Ai[De.value]) != null && Ii.url ? (openBlock(), createElementBlock("a", {
4321
4322
  key: 1,
4322
4323
  "data-fancybox": "",
4323
- href: (Fi = (Vi = (ji = (zi = Le.flat) == null ? void 0 : zi.type) == null ? void 0 : ji.image_3d) == null ? void 0 : Vi[De.value]) == null ? void 0 : Fi.url,
4324
+ href: (Fi = (ji = (Vi = (zi = Le.flat) == null ? void 0 : zi.type) == null ? void 0 : Vi.image_3d) == null ? void 0 : ji[De.value]) == null ? void 0 : Fi.url,
4324
4325
  class: "irep-flat-preview__left-3d"
4325
4326
  }, [
4326
4327
  (openBlock(), createElementBlock("img", {
@@ -4338,7 +4339,7 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
4338
4339
  }),
4339
4340
  $e.value || ((ze = Re.value) == null ? void 0 : ze.length) > 1 ? (openBlock(), createElementBlock("div", _hoisted_8, [
4340
4341
  $e.value ? (openBlock(), createElementBlock("div", _hoisted_9, [
4341
- (He = (Ve = (Fe = (je = Le.flat) == null ? void 0 : je.type) == null ? void 0 : Fe.image_3d) == null ? void 0 : Ve[0]) != null && He.url ? (openBlock(), createBlock(_sfc_main$a, {
4342
+ (He = (je = (Fe = (Ve = Le.flat) == null ? void 0 : Ve.type) == null ? void 0 : Fe.image_3d) == null ? void 0 : je[0]) != null && He.url ? (openBlock(), createBlock(_sfc_main$a, {
4342
4343
  key: 0,
4343
4344
  title: unref(tr)("3d plan"),
4344
4345
  active: !ke.value,
@@ -4486,7 +4487,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4486
4487
  createElementVNode("div", _hoisted_2$2, [
4487
4488
  createElementVNode("div", _hoisted_3$2, [
4488
4489
  createElementVNode("div", {
4489
- class: "ire-z-[999] ire-mx-3 ire-my-2 ire-w-fit ire-cursor-pointer ire-rounded-full ire-bg-white ire-p-1 ire-transition-all hover:ire-bg-gray-600 [&_path]:ire-fill-gray-400 [&_path]:hover:ire-fill-white [&_svg]:ire-h-3 [&_svg]:ire-w-3",
4490
+ class: "ire-z-[999] ire-mx-3 ire-my-2 ire-flex ire-aspect-[1/1] ire-w-fit ire-cursor-pointer ire-justify-center ire-rounded-full ire-bg-white ire-p-1 ire-text-center ire-transition-all hover:ire-bg-gray-600 [&_path]:ire-fill-gray-400 [&_path]:hover:ire-fill-white [&_svg]:ire-h-3 [&_svg]:ire-w-3",
4490
4491
  onClick: ke[1] || (ke[1] = (De) => _e.$emit("close"))
4491
4492
  }, [
4492
4493
  createVNode(Close)
@@ -4516,7 +4517,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4516
4517
  },
4517
4518
  setup(Ne) {
4518
4519
  return (_e, ke) => {
4519
- var De, $e, Re, Be, Le, Ie, Ae, ze, je, Fe, Ve, He;
4520
+ var De, $e, Re, Be, Le, Ie, Ae, ze, Ve, Fe, je, He;
4520
4521
  return openBlock(), createElementBlock("div", _hoisted_1$1, [
4521
4522
  createElementVNode("p", _hoisted_2$1, toDisplayString(($e = (De = _e.modalData) == null ? void 0 : De.modalObject) == null ? void 0 : $e.title), 1),
4522
4523
  createVNode(_sfc_main$5, {
@@ -4524,7 +4525,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4524
4525
  }, null, 8, ["editor"]),
4525
4526
  (ze = (Ae = (Ie = (Le = _e.modalData) == null ? void 0 : Le.modalObject) == null ? void 0 : Ie.modalImage) == null ? void 0 : Ae[0]) != null && ze.url ? (openBlock(), createElementBlock("img", {
4526
4527
  key: 0,
4527
- src: (He = (Ve = (Fe = (je = _e.modalData) == null ? void 0 : je.modalObject) == null ? void 0 : Fe.modalImage) == null ? void 0 : Ve[0]) == null ? void 0 : He.url,
4528
+ src: (He = (je = (Fe = (Ve = _e.modalData) == null ? void 0 : Ve.modalObject) == null ? void 0 : Fe.modalImage) == null ? void 0 : je[0]) == null ? void 0 : He.url,
4528
4529
  alt: "",
4529
4530
  class: "ire-mt-5 ire-h-[400px] ire-w-full ire-object-contain"
4530
4531
  }, null, 8, _hoisted_3$1)) : createCommentVNode("", !0)
@@ -4541,20 +4542,20 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4541
4542
  },
4542
4543
  emits: ["changeComponent"],
4543
4544
  setup(Ne, { emit: _e }) {
4544
- const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re), Ie = ref(), Ae = ref(null), ze = ref(), je = ref(), Fe = computed$1(() => {
4545
+ const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re), Ie = ref(), Ae = ref(null), ze = ref(), Ve = ref(), Fe = computed$1(() => {
4545
4546
  var Xe, We;
4546
4547
  if ((Xe = De.block) != null && Xe.svg)
4547
4548
  return (We = De.block) == null ? void 0 : We.svg;
4548
- }), Ve = (Xe) => {
4549
+ }), je = (Xe) => {
4549
4550
  const We = Xe.target;
4550
4551
  We && (Ae.value = We);
4551
4552
  }, He = (Xe) => {
4552
4553
  var Ze, Ge, Ye;
4553
4554
  const We = Xe.target;
4554
- (We == null ? void 0 : We.nodeName) === "path" && (((Ze = je.value) == null ? void 0 : Ze.conf) === "reserved" && !Be.value || ((Ge = je.value) == null ? void 0 : Ge.conf) === "sold" && !Le.value || ke(
4555
+ (We == null ? void 0 : We.nodeName) === "path" && (((Ze = Ve.value) == null ? void 0 : Ze.conf) === "reserved" && !Be.value || ((Ge = Ve.value) == null ? void 0 : Ge.conf) === "sold" && !Le.value || ke(
4555
4556
  "changeComponent",
4556
4557
  ((Ye = ze.value) == null ? void 0 : Ye.type) || "",
4557
- je.value
4558
+ Ve.value
4558
4559
  ));
4559
4560
  }, qe = () => {
4560
4561
  var We;
@@ -4598,7 +4599,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4598
4599
  return (ni == null ? void 0 : ni.id) === ((oi = ze.value) == null ? void 0 : oi.id);
4599
4600
  }
4600
4601
  );
4601
- je.value = ti;
4602
+ Ve.value = ti;
4602
4603
  } else if (((Qe = ze.value) == null ? void 0 : Qe.type) === "flat") {
4603
4604
  const ti = (Je = De.flats) == null ? void 0 : Je.find(
4604
4605
  (ni) => {
@@ -4606,7 +4607,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4606
4607
  return (ni == null ? void 0 : ni.id) === ((oi = ze.value) == null ? void 0 : oi.id);
4607
4608
  }
4608
4609
  );
4609
- je.value = ti;
4610
+ Ve.value = ti;
4610
4611
  } else if (((Ke = ze.value) == null ? void 0 : Ke.type) === "tooltip") {
4611
4612
  const ti = (ei = De.actions) == null ? void 0 : ei.find(
4612
4613
  (ni) => {
@@ -4614,20 +4615,20 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4614
4615
  return (ni == null ? void 0 : ni.id) === ((oi = ze.value) == null ? void 0 : oi.id);
4615
4616
  }
4616
4617
  );
4617
- je.value = ti;
4618
+ Ve.value = ti;
4618
4619
  } else
4619
- je.value = null;
4620
+ Ve.value = null;
4620
4621
  } else
4621
- ze.value = null, je.value = null;
4622
+ ze.value = null, Ve.value = null;
4622
4623
  }
4623
4624
  ), onMounted(() => {
4624
- qe(), document.addEventListener("mousemove", Ve);
4625
+ qe(), document.addEventListener("mousemove", je);
4625
4626
  }), onUnmounted(() => {
4626
- document.removeEventListener("mousemove", Ve);
4627
+ document.removeEventListener("mousemove", je);
4627
4628
  }), (Xe, We) => {
4628
4629
  var Ze;
4629
4630
  return openBlock(), createBlock(_sfc_main$i, {
4630
- hoverdData: je.value,
4631
+ hoverdData: Ve.value,
4631
4632
  type: (Ze = ze.value) == null ? void 0 : Ze.type
4632
4633
  }, {
4633
4634
  header: withCtx(() => {
@@ -4668,25 +4669,25 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4668
4669
  setup(Ne) {
4669
4670
  const _e = useGlobalStore(), ke = ref(!0), De = ref(-400), $e = ref(-400), Re = ref(null);
4670
4671
  let Be = null, Le = 0, Ie = 0;
4671
- const Ae = (Fe, Ve, He) => Fe * (1 - He) + Ve * He, ze = () => {
4672
+ const Ae = (Fe, je, He) => Fe * (1 - He) + je * He, ze = () => {
4672
4673
  if (Be) return;
4673
4674
  const Fe = () => {
4674
4675
  De.value = Ae(De.value, Le, 0.06), $e.value = Ae($e.value, Ie, 0.06), Math.abs(De.value - Le) > 0.06 || Math.abs($e.value - Ie) > 0.06 ? Be = requestAnimationFrame(Fe) : Be = null;
4675
4676
  };
4676
4677
  Be = requestAnimationFrame(Fe);
4677
- }, je = (Fe) => {
4678
+ }, Ve = (Fe) => {
4678
4679
  var Qe;
4679
- const Ve = document.querySelector(".irep-tooltip"), He = ((Qe = _e.hoverdSvg) == null ? void 0 : Qe.nodeName) === "path" ? _e.hoverdSvg : null;
4680
- if (!Re.value || !Ve || !He)
4680
+ const je = document.querySelector(".irep-tooltip"), He = ((Qe = _e.hoverdSvg) == null ? void 0 : Qe.nodeName) === "path" ? _e.hoverdSvg : null;
4681
+ if (!Re.value || !je || !He)
4681
4682
  return;
4682
- const qe = Re.value.getBoundingClientRect(), Xe = He.getBoundingClientRect(), We = Ve.getBoundingClientRect(), Ze = qe.left + qe.width / 2, Ge = qe.top + qe.height / 2, Ye = Xe.left > Ze, Ue = Xe.bottom > Ge;
4683
+ const qe = Re.value.getBoundingClientRect(), Xe = He.getBoundingClientRect(), We = je.getBoundingClientRect(), Ze = qe.left + qe.width / 2, Ge = qe.top + qe.height / 2, Ye = Xe.left > Ze, Ue = Xe.bottom > Ge;
4683
4684
  Le = Fe.clientX - qe.left - (Ye ? We.width : -20), Ie = Fe.clientY - qe.top - (Ue ? We.height : -20), ke.value && (De.value = Le, $e.value = Ie), ze(), ke.value = !1;
4684
4685
  };
4685
4686
  return onMounted(() => {
4686
- document.addEventListener("mousemove", je);
4687
+ document.addEventListener("mousemove", Ve);
4687
4688
  }), onUnmounted(() => {
4688
- document.removeEventListener("mousemove", je), Be && cancelAnimationFrame(Be);
4689
- }), provide("mouseX", De), provide("mouseY", $e), (Fe, Ve) => (openBlock(), createElementBlock("div", {
4689
+ document.removeEventListener("mousemove", Ve), Be && cancelAnimationFrame(Be);
4690
+ }), provide("mouseX", De), provide("mouseY", $e), (Fe, je) => (openBlock(), createElementBlock("div", {
4690
4691
  ref_key: "canvasRef",
4691
4692
  ref: Re
4692
4693
  }, [
@@ -4734,8 +4735,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4734
4735
  var Le, Ie;
4735
4736
  if (shortcodeData.value)
4736
4737
  return (Le = shortcodeData.value.floors) == null || Le.forEach((Ae) => {
4737
- var Fe, Ve;
4738
- const ze = (Ve = (Fe = shortcodeData.value) == null ? void 0 : Fe.flats) == null ? void 0 : Ve.filter((He) => {
4738
+ var Fe, je;
4739
+ const ze = (je = (Fe = shortcodeData.value) == null ? void 0 : Fe.flats) == null ? void 0 : je.filter((He) => {
4739
4740
  var qe;
4740
4741
  return (He == null ? void 0 : He.floor_number) !== ((qe = Ae == null ? void 0 : Ae.floor_number) == null ? void 0 : qe.toString()) ? !1 : Ae != null && Ae.polygon_data ? Object == null ? void 0 : Object.values(Ae == null ? void 0 : Ae.polygon_data).some(
4741
4742
  (We) => {
@@ -4745,8 +4746,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4745
4746
  ) : !1;
4746
4747
  });
4747
4748
  Ae.flats = ze;
4748
- const { conf: je } = Ae || {};
4749
- if (ze != null && ze.length && !je) {
4749
+ const { conf: Ve } = Ae || {};
4750
+ if (ze != null && ze.length && !Ve) {
4750
4751
  const He = ze == null ? void 0 : ze.every((Xe) => (Xe == null ? void 0 : Xe.conf) === "reserved"), qe = ze == null ? void 0 : ze.every((Xe) => (Xe == null ? void 0 : Xe.conf) === "sold");
4751
4752
  He ? Ae.conf = "reserved" : qe && (Ae.conf = "sold");
4752
4753
  }
@@ -4763,8 +4764,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4763
4764
  return (Ie = (Le = shortcodeData.value) == null ? void 0 : Le.flats) == null ? void 0 : Ie.map((Ae) => {
4764
4765
  var ze;
4765
4766
  if (Ae != null && Ae.use_type || !(Ae != null && Ae.type)) {
4766
- const je = (ze = types.value) == null ? void 0 : ze.find((Fe) => (Fe == null ? void 0 : Fe.id) === (Ae == null ? void 0 : Ae.type_id));
4767
- je && (Ae.type = je);
4767
+ const Ve = (ze = types.value) == null ? void 0 : ze.find((Fe) => (Fe == null ? void 0 : Fe.id) === (Ae == null ? void 0 : Ae.type_id));
4768
+ Ve && (Ae.type = Ve);
4768
4769
  }
4769
4770
  return Ae;
4770
4771
  });
@@ -4815,8 +4816,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
4815
4816
  return watch(
4816
4817
  () => projectMeta.value,
4817
4818
  () => {
4818
- const Le = getMetaValue("path_color"), Ie = getMetaValue("path_hover_color"), Ae = getMetaValue("reserved_color"), ze = getMetaValue("sold_color"), je = getMetaValue("stroke_color"), Fe = getMetaValue("stroke_width");
4819
- Le && (colors.path = Le.toString()), Ie && (colors.path_hover = Ie.toString()), Ae && (colors.reserved = Ae.toString()), ze && (colors.sold = ze.toString()), je && (colors.stroke_color = je.toString()), Fe && (colors.stroke_width = Number(Fe));
4819
+ const Le = getMetaValue("path_color"), Ie = getMetaValue("path_hover_color"), Ae = getMetaValue("reserved_color"), ze = getMetaValue("sold_color"), Ve = getMetaValue("stroke_color"), Fe = getMetaValue("stroke_width");
4820
+ Le && (colors.path = Le.toString()), Ie && (colors.path_hover = Ie.toString()), Ae && (colors.reserved = Ae.toString()), ze && (colors.sold = ze.toString()), Ve && (colors.stroke_color = Ve.toString()), Fe && (colors.stroke_width = Number(Fe));
4820
4821
  }
4821
4822
  ), provide("showFlatModal", showFlatModal), (Le, Ie) => (openBlock(), createBlock(_sfc_main$2, { class: "interactive-real-estate ire-text-[16px]" }, {
4822
4823
  default: withCtx(() => [