@wikicasa-dev/components 1.9.9 → 1.9.11

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.
@@ -1,7 +1,8 @@
1
- import { defineComponent as Ye, reactive as Me, ref as we, computed as k, onMounted as $e, openBlock as Y, createElementBlock as M, normalizeClass as $, createElementVNode as D, renderSlot as Te, Fragment as ne, renderList as Ee, mergeProps as ye, createCommentVNode as J, withModifiers as re, nextTick as We } from "vue";
1
+ import { defineComponent as Ye, reactive as Me, ref as we, computed as k, onMounted as $e, openBlock as Y, createElementBlock as M, normalizeClass as $, createElementVNode as D, renderSlot as Te, Fragment as ne, renderList as Ee, mergeProps as ye, createCommentVNode as _, withModifiers as re, nextTick as We } from "vue";
2
2
  import { Swiper as be } from "swiper";
3
- import { r as Pe } from "./ObjectUtils.B1Dk4qsM.js";
4
- import "./js.cookie.CkZE2oaL.js";
3
+ import "./types-B0dZ7OiV.D29wNgoj.js";
4
+ import { i as Pe } from "./ObjectUtils.BOUbloeg.js";
5
+ import { _ as Le } from "./_plugin-vue_export-helper.CHgC5LLL.js";
5
6
  import '../assets/SwiperCarousel.css';function Se(n) {
6
7
  return n !== null && typeof n == "object" && "constructor" in n && n.constructor === Object;
7
8
  }
@@ -65,11 +66,11 @@ const Xe = {
65
66
  search: ""
66
67
  }
67
68
  };
68
- function Le() {
69
+ function Oe() {
69
70
  const n = typeof document < "u" ? document : {};
70
71
  return ae(n, Xe), n;
71
72
  }
72
- const Oe = {
73
+ const ke = {
73
74
  document: Xe,
74
75
  navigator: {
75
76
  userAgent: ""
@@ -129,18 +130,18 @@ const Oe = {
129
130
  };
130
131
  function V() {
131
132
  const n = typeof window < "u" ? window : {};
132
- return ae(n, Oe), n;
133
+ return ae(n, ke), n;
133
134
  }
134
- function ke(n) {
135
+ function De(n) {
135
136
  return n === void 0 && (n = ""), n.trim().split(" ").filter((e) => !!e.trim());
136
137
  }
137
- function Ge(n, e) {
138
+ function _e(n, e) {
138
139
  return e === void 0 && (e = 0), setTimeout(n, e);
139
140
  }
140
- function Ke() {
141
+ function Je() {
141
142
  return Date.now();
142
143
  }
143
- function De(n) {
144
+ function Ie(n) {
144
145
  const e = V();
145
146
  let u;
146
147
  return e.getComputedStyle && (u = e.getComputedStyle(n, null)), !u && n.currentStyle && (u = n.currentStyle), u || (u = n.style), u;
@@ -149,10 +150,10 @@ function xe(n, e) {
149
150
  e === void 0 && (e = "x");
150
151
  const u = V();
151
152
  let a, v, d;
152
- const g = De(n);
153
+ const g = Ie(n);
153
154
  return u.WebKitCSSMatrix ? (v = g.transform || g.webkitTransform, v.split(",").length > 6 && (v = v.split(", ").map((y) => y.replace(",", ".")).join(", ")), d = new u.WebKitCSSMatrix(v === "none" ? "" : v)) : (d = g.MozTransform || g.OTransform || g.MsTransform || g.msTransform || g.transform || g.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"), a = d.toString().split(",")), e === "x" && (u.WebKitCSSMatrix ? v = d.m41 : a.length === 16 ? v = parseFloat(a[12]) : v = parseFloat(a[4])), e === "y" && (u.WebKitCSSMatrix ? v = d.m42 : a.length === 16 ? v = parseFloat(a[13]) : v = parseFloat(a[5])), v || 0;
154
155
  }
155
- function Ze(n) {
156
+ function Qe(n) {
156
157
  return typeof n == "object" && n !== null && n.constructor && Object.prototype.toString.call(n).slice(8, -1) === "Object";
157
158
  }
158
159
  function Ce(n, e) {
@@ -160,19 +161,19 @@ function Ce(n, e) {
160
161
  const u = [...n.children];
161
162
  return n instanceof HTMLSlotElement && u.push(...n.assignedElements()), e ? u.filter((a) => a.matches(e)) : u;
162
163
  }
163
- function Je(n, e) {
164
+ function Ue(n, e) {
164
165
  e === void 0 && (e = []);
165
166
  const u = document.createElement(n);
166
- return u.classList.add(...Array.isArray(e) ? e : ke(e)), u;
167
+ return u.classList.add(...Array.isArray(e) ? e : De(e)), u;
167
168
  }
168
169
  function ze(n) {
169
- const e = V(), u = Le(), a = n.getBoundingClientRect(), v = u.body, d = n.clientTop || v.clientTop || 0, g = n.clientLeft || v.clientLeft || 0, y = n === e ? e.scrollY : n.scrollTop, T = n === e ? e.scrollX : n.scrollLeft;
170
+ const e = V(), u = Oe(), a = n.getBoundingClientRect(), v = u.body, d = n.clientTop || v.clientTop || 0, g = n.clientLeft || v.clientLeft || 0, y = n === e ? e.scrollY : n.scrollTop, T = n === e ? e.scrollX : n.scrollLeft;
170
171
  return {
171
172
  top: a.top + y - d,
172
173
  left: a.left + T - g
173
174
  };
174
175
  }
175
- function Qe(n) {
176
+ function et(n) {
176
177
  let e = n, u;
177
178
  if (e) {
178
179
  for (u = 0; (e = e.previousSibling) !== null; )
@@ -187,20 +188,20 @@ function se(n, e) {
187
188
  e ? a.matches(e) && u.push(a) : u.push(a), a = a.parentElement;
188
189
  return u;
189
190
  }
190
- function Ue(n, e) {
191
+ function tt(n, e) {
191
192
  function u(a) {
192
193
  a.target === n && (e.call(n, a), n.removeEventListener("transitionend", u));
193
194
  }
194
195
  e && n.addEventListener("transitionend", u);
195
196
  }
196
- function _e(n, e, u) {
197
+ function it(n, e, u) {
197
198
  const a = V();
198
199
  return n[e === "width" ? "offsetWidth" : "offsetHeight"] + parseFloat(a.getComputedStyle(n, null).getPropertyValue(e === "width" ? "margin-right" : "margin-top")) + parseFloat(a.getComputedStyle(n, null).getPropertyValue(e === "width" ? "margin-left" : "margin-bottom"));
199
200
  }
200
- function et(n) {
201
+ function nt(n) {
201
202
  return (Array.isArray(n) ? n : [n]).filter((e) => !!e);
202
203
  }
203
- function Ie(n) {
204
+ function Re(n) {
204
205
  let {
205
206
  swiper: e,
206
207
  extendParams: u,
@@ -279,7 +280,7 @@ function Ie(n) {
279
280
  }
280
281
  return s;
281
282
  }
282
- function Q() {
283
+ function J() {
283
284
  if (m.length < 2) return {
284
285
  x: null,
285
286
  y: null
@@ -312,7 +313,7 @@ function Ie(n) {
312
313
  t.maxRatio = W();
313
314
  }
314
315
  if (t.imageEl) {
315
- const [o, w] = Q();
316
+ const [o, w] = J();
316
317
  t.originX = o, t.originY = w, t.imageEl.style.transitionDuration = "0ms";
317
318
  }
318
319
  y = !0;
@@ -332,7 +333,7 @@ function Ie(n) {
332
333
  function j() {
333
334
  e.touchEventsData.preventTouchMoveFromPointerMove = !1;
334
335
  }
335
- function U() {
336
+ function Q() {
336
337
  clearTimeout(E), e.touchEventsData.preventTouchMoveFromPointerMove = !0, E = setTimeout(() => {
337
338
  e.destroyed || j();
338
339
  });
@@ -362,7 +363,7 @@ function Ie(n) {
362
363
  return;
363
364
  }
364
365
  }
365
- r.cancelable && r.preventDefault(), r.stopPropagation(), U(), i.isMoved = !0;
366
+ r.cancelable && r.preventDefault(), r.stopPropagation(), Q(), i.isMoved = !0;
366
367
  const P = (s.scale - g) / (t.maxRatio - e.params.zoom.minRatio), {
367
368
  originX: L,
368
369
  originY: A
@@ -398,12 +399,12 @@ function Ie(n) {
398
399
  }
399
400
  if (!t.imageEl || !t.imageWrapEl) return;
400
401
  e.params.cssMode && (e.wrapperEl.style.overflow = "hidden", e.wrapperEl.style.touchAction = "none"), t.slideEl.classList.add(`${o.zoomedSlideClass}`);
401
- let w, S, P, L, A, G, X, O, pe, fe, ge, he, K, Z, _, ee, te, ie;
402
+ let w, S, P, L, A, G, X, O, pe, fe, ge, he, K, Z, U, ee, te, ie;
402
403
  typeof i.touchesStart.x > "u" && r ? (w = r.pageX, S = r.pageY) : (w = i.touchesStart.x, S = i.touchesStart.y);
403
404
  const q = typeof r == "number" ? r : null;
404
405
  g === 1 && q && (w = void 0, S = void 0, i.touchesStart.x = void 0, i.touchesStart.y = void 0);
405
406
  const ve = W();
406
- s.scale = q || ve, g = q || ve, r && !(g === 1 && q) ? (te = t.slideEl.offsetWidth, ie = t.slideEl.offsetHeight, P = ze(t.slideEl).left + d.scrollX, L = ze(t.slideEl).top + d.scrollY, A = P + te / 2 - w, G = L + ie / 2 - S, pe = t.imageEl.offsetWidth || t.imageEl.clientWidth, fe = t.imageEl.offsetHeight || t.imageEl.clientHeight, ge = pe * s.scale, he = fe * s.scale, K = Math.min(te / 2 - ge / 2, 0), Z = Math.min(ie / 2 - he / 2, 0), _ = -K, ee = -Z, X = A * s.scale, O = G * s.scale, X < K && (X = K), X > _ && (X = _), O < Z && (O = Z), O > ee && (O = ee)) : (X = 0, O = 0), q && s.scale === 1 && (t.originX = 0, t.originY = 0), t.imageWrapEl.style.transitionDuration = "300ms", t.imageWrapEl.style.transform = `translate3d(${X}px, ${O}px,0)`, t.imageEl.style.transitionDuration = "300ms", t.imageEl.style.transform = `translate3d(0,0,0) scale(${s.scale})`;
407
+ s.scale = q || ve, g = q || ve, r && !(g === 1 && q) ? (te = t.slideEl.offsetWidth, ie = t.slideEl.offsetHeight, P = ze(t.slideEl).left + d.scrollX, L = ze(t.slideEl).top + d.scrollY, A = P + te / 2 - w, G = L + ie / 2 - S, pe = t.imageEl.offsetWidth || t.imageEl.clientWidth, fe = t.imageEl.offsetHeight || t.imageEl.clientHeight, ge = pe * s.scale, he = fe * s.scale, K = Math.min(te / 2 - ge / 2, 0), Z = Math.min(ie / 2 - he / 2, 0), U = -K, ee = -Z, X = A * s.scale, O = G * s.scale, X < K && (X = K), X > U && (X = U), O < Z && (O = Z), O > ee && (O = ee)) : (X = 0, O = 0), q && s.scale === 1 && (t.originX = 0, t.originY = 0), t.imageWrapEl.style.transitionDuration = "300ms", t.imageWrapEl.style.transform = `translate3d(${X}px, ${O}px,0)`, t.imageEl.style.transitionDuration = "300ms", t.imageEl.style.transform = `translate3d(0,0,0) scale(${s.scale})`;
407
408
  }
408
409
  function le() {
409
410
  const r = e.zoom, s = e.params.zoom;
@@ -477,7 +478,7 @@ function Ie(n) {
477
478
  toggle: ue
478
479
  });
479
480
  }
480
- const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "width", "height", "onLoad"], Fe = ["id"], je = ["loading", "alt"], tt = /* @__PURE__ */ Ye({
481
+ const Ae = ["id"], He = ["id", "data-cy"], Fe = ["data-idx", "loading", "alt", "width", "height", "onLoad"], je = ["id"], qe = ["loading", "alt"], Be = /* @__PURE__ */ Ye({
481
482
  inheritAttrs: !1,
482
483
  __name: "SwiperCarousel",
483
484
  props: {
@@ -493,7 +494,7 @@ const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "
493
494
  emits: ["moved", "click", "firstSlideLoaded"],
494
495
  setup(n, { expose: e, emit: u }) {
495
496
  const a = n, v = u, d = Me({
496
- swiperParams: { modules: [Ie] },
497
+ swiperParams: { modules: [Re] },
497
498
  swiper: null,
498
499
  initCarousel: !1
499
500
  }), g = we(), y = k(() => a.swiperOptions?.slidesPerView || 1), T = k(() => a.thumbSwiperOptions?.slidesPerView || 1), I = k(() => !!a.swiperOptions?.keyboard), m = k(() => {
@@ -526,9 +527,9 @@ const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "
526
527
  let b = l.images;
527
528
  l.images.length > 3 ? b = l.images.slice(2, 5) : a.shiftFirstImage && (b[0] = b[1]), h = b.reduce((x, z, C) => (C === 0 && (c = `${z.storagePath}`), C > 0 && (x += ", "), `${x}${z.storagePath} ${C + 1}x`), "");
528
529
  }
529
- const j = c, U = h;
530
- return typeof y.value == "number" && f > y.value ? (c = "", h = "", { sizes: E, "data-src": j, "data-srcset": U }) : { src: c, srcset: h, sizes: E };
531
- }, W = [], Q = (l) => {
530
+ const j = c, Q = h;
531
+ return typeof y.value == "number" && f > y.value ? (c = "", h = "", { sizes: E, "data-src": j, "data-srcset": Q }) : { src: c, srcset: h, sizes: E };
532
+ }, W = [], J = (l) => {
532
533
  if (typeof y.value == "string") return;
533
534
  const f = W[l];
534
535
  if (f && !f.src && (f.src = f.dataset.src || "", f.srcset = f.dataset.srcset || ""), l < y.value || l + 1 >= (a.images ?? []).length)
@@ -548,11 +549,11 @@ const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "
548
549
  };
549
550
  return $e(async () => {
550
551
  if (H(), I.value) {
551
- const { Keyboard: c } = await import("./index.BbdLcPJo.js");
552
+ const { Keyboard: c } = await import("./index.C7BPB1tC.js");
552
553
  d.swiperParams.modules?.push(c), d.swiperParams.keyboard = a.swiperOptions.keyboard;
553
554
  }
554
555
  if (t.value) {
555
- const { Pagination: c } = await import("./index.BbdLcPJo.js");
556
+ const { Pagination: c } = await import("./index.C7BPB1tC.js");
556
557
  d.swiperParams.modules?.push(c), d.swiperParams.pagination = {
557
558
  el: ".swiper-pagination",
558
559
  renderFraction: (h, E) => `<div class="uikit-rounded-xs uikit-border-w-black uikit-border uikit-border-solid uikit-px-3 uikit-bg-white uikit-pt-[3px] uikit-pb-[3px]">
@@ -564,7 +565,7 @@ const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "
564
565
  };
565
566
  }
566
567
  if (m.value) {
567
- const { Navigation: c } = await import("./index.BbdLcPJo.js");
568
+ const { Navigation: c } = await import("./index.C7BPB1tC.js");
568
569
  d.swiperParams.modules?.push(c);
569
570
  const h = {
570
571
  ...a.swiperOptions.navigation.nextEl ?? {
@@ -580,20 +581,20 @@ const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "
580
581
  };
581
582
  }
582
583
  if (i.value) {
583
- const { Autoplay: c } = await import("./index.BbdLcPJo.js");
584
+ const { Autoplay: c } = await import("./index.C7BPB1tC.js");
584
585
  d.swiperParams.modules?.push(c), d.swiperParams.autoplay = a.swiperOptions.autoplay;
585
586
  }
586
587
  const l = {
587
588
  ...d.swiperParams,
588
589
  on: {
589
590
  slideChange: (c) => {
590
- Q(c.activeIndex), v("moved", { activeIndex: c.activeIndex });
591
+ J(c.activeIndex), v("moved", { activeIndex: c.activeIndex });
591
592
  }
592
593
  }
593
594
  };
594
595
  let f = null;
595
596
  if (a.thumbSwiperOptions) {
596
- const { Thumbs: c, FreeMode: h, Controller: E } = await import("./index.BbdLcPJo.js");
597
+ const { Thumbs: c, FreeMode: h, Controller: E } = await import("./index.C7BPB1tC.js");
597
598
  d.swiperParams.modules?.push(c), d.swiperParams.modules?.push(E), f = new be(`#thumb_${a.id}`, {
598
599
  ...a.thumbSwiperOptions,
599
600
  modules: [h]
@@ -630,7 +631,7 @@ const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "
630
631
  D("div", {
631
632
  class: $(["swiper-zoom-container", l.$attrs["swiper-zoom-container-classes"]])
632
633
  }, [
633
- l.backgroundImage ? J("", !0) : (Y(), M("img", ye({
634
+ l.backgroundImage ? _("", !0) : (Y(), M("img", ye({
634
635
  key: 0,
635
636
  ref_for: !0,
636
637
  ref: (E) => {
@@ -645,17 +646,17 @@ const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "
645
646
  width: c.width,
646
647
  height: c.height,
647
648
  onLoad: (E) => R(h)
648
- }), null, 16, He))
649
+ }), null, 16, Fe))
649
650
  ], 2)
650
651
  ], 2))), 128))
651
- ])
652
+ ], !0)
652
653
  ], 2),
653
654
  t.value ? (Y(), M("div", {
654
655
  key: 0,
655
656
  class: $([l.$attrs["swiper-pagination-classes"], "swiper-pagination [&.swiper-pagination-fraction]:uikit-flex [&.swiper-pagination-fraction]:uikit-justify-center"]),
656
657
  onClick: f[1] || (f[1] = re(() => {
657
658
  }, ["stop"]))
658
- }, null, 2)) : J("", !0),
659
+ }, null, 2)) : _("", !0),
659
660
  m.value ? (Y(), M(ne, { key: 1 }, [
660
661
  D("div", {
661
662
  class: "swiper-button-prev",
@@ -669,8 +670,8 @@ const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "
669
670
  onClick: f[3] || (f[3] = re(() => {
670
671
  }, ["stop"]))
671
672
  })
672
- ], 64)) : J("", !0)
673
- ], 10, Ae),
673
+ ], 64)) : _("", !0)
674
+ ], 10, He),
674
675
  l.thumbSwiperOptions ? (Y(), M("div", {
675
676
  key: 0,
676
677
  id: `thumb_${l.id}`,
@@ -690,27 +691,27 @@ const Re = ["id"], Ae = ["id", "data-cy"], He = ["data-idx", "loading", "alt", "
690
691
  }, F(c), {
691
692
  loading: h >= T.value ? "lazy" : void 0,
692
693
  alt: c.alt
693
- }), null, 16, je)
694
+ }), null, 16, qe)
694
695
  ], 2))), 128))
695
696
  ], 2)
696
- ], 10, Fe)) : J("", !0)
697
- ], 10, Re));
697
+ ], 10, je)) : _("", !0)
698
+ ], 10, Ae));
698
699
  }
699
- });
700
+ }), rt = /* @__PURE__ */ Le(Be, [["__scopeId", "data-v-afed71bb"]]);
700
701
  export {
701
- Ie as Z,
702
- tt as _,
702
+ rt as S,
703
+ Re as Z,
703
704
  V as a,
704
705
  ze as b,
705
706
  Ce as c,
706
- Je as d,
707
+ Ue as d,
707
708
  se as e,
708
- _e as f,
709
- Le as g,
710
- Qe as h,
711
- Ue as i,
712
- Ze as j,
713
- Ke as k,
714
- et as m,
715
- Ge as n
709
+ it as f,
710
+ Oe as g,
711
+ et as h,
712
+ tt as i,
713
+ Qe as j,
714
+ Je as k,
715
+ nt as m,
716
+ _e as n
716
717
  };
@@ -1,5 +1,5 @@
1
- import { g as F, a as W, e as V, b as X, c as _, d as Y, m as P, f as Z, h as G, n as J, i as q, j as Q, k as R } from "./SwiperCarousel.vue_vue_type_style_index_0_lang.PH6iC0qV.js";
2
- import { Z as ce } from "./SwiperCarousel.vue_vue_type_style_index_0_lang.PH6iC0qV.js";
1
+ import { g as F, a as W, e as V, b as X, c as _, d as Y, m as P, f as Z, h as G, n as J, i as q, j as Q, k as R } from "./SwiperCarousel.BV6QiwmC.js";
2
+ import { Z as ce } from "./SwiperCarousel.BV6QiwmC.js";
3
3
  function te(k) {
4
4
  let {
5
5
  swiper: e,