@okam/stack-ui 1.32.1 → 1.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +1 -1
  3. package/index.mjs +53 -55
  4. package/index101.js +1 -1
  5. package/index101.mjs +1 -1
  6. package/index102.js +1 -1
  7. package/index102.mjs +3 -3
  8. package/index103.js +1 -1
  9. package/index103.mjs +1 -1
  10. package/index110.js +1 -1
  11. package/index110.mjs +5 -5
  12. package/index111.js +1 -1
  13. package/index111.mjs +2 -2
  14. package/index112.js +1 -1
  15. package/index112.mjs +1 -1
  16. package/index113.js +1 -1
  17. package/index113.mjs +2 -2
  18. package/index115.js +1 -1
  19. package/index115.mjs +4 -4
  20. package/index116.js +1 -1
  21. package/index116.mjs +2 -2
  22. package/index120.js +1 -1
  23. package/index120.mjs +4 -4
  24. package/index121.js +1 -1
  25. package/index121.mjs +2 -2
  26. package/index124.js +1 -1
  27. package/index124.mjs +1 -1
  28. package/index125.js +1 -1
  29. package/index125.mjs +3 -3
  30. package/index126.js +1 -1
  31. package/index126.mjs +3 -3
  32. package/index130.js +1 -1
  33. package/index130.mjs +2 -2
  34. package/index133.js +1 -1
  35. package/index133.mjs +1 -1
  36. package/index138.js +1 -1
  37. package/index138.mjs +12 -46
  38. package/index139.js +1 -1
  39. package/index139.mjs +46 -241
  40. package/index140.js +1 -2
  41. package/index140.mjs +241 -13
  42. package/index141.js +2 -1
  43. package/index141.mjs +12 -29
  44. package/index142.js +1 -1
  45. package/index142.mjs +30 -52
  46. package/index143.js +1 -1
  47. package/index143.mjs +52 -12
  48. package/index145.js +1 -1
  49. package/index145.mjs +1 -1
  50. package/index147.js +1 -1
  51. package/index147.mjs +2 -2
  52. package/index148.js +1 -1
  53. package/index148.mjs +3 -3
  54. package/index149.js +1 -1
  55. package/index149.mjs +3 -3
  56. package/index150.js +1 -1
  57. package/index150.mjs +1 -1
  58. package/index151.js +1 -1
  59. package/index151.mjs +3 -3
  60. package/index152.js +1 -1
  61. package/index152.mjs +20 -106
  62. package/index153.js +1 -1
  63. package/index153.mjs +107 -83
  64. package/index154.js +1 -1
  65. package/index154.mjs +83 -26
  66. package/index155.js +1 -1
  67. package/index155.mjs +25 -20
  68. package/index156.js +1 -1
  69. package/index156.mjs +123 -17
  70. package/index157.js +1 -1
  71. package/index157.mjs +24 -122
  72. package/index158.js +1 -1
  73. package/index158.mjs +17 -71
  74. package/index159.js +1 -1
  75. package/index159.mjs +62 -338
  76. package/index160.js +1 -1
  77. package/index160.mjs +346 -42
  78. package/index161.js +1 -1
  79. package/index161.mjs +43 -29
  80. package/index162.js +1 -1
  81. package/index162.mjs +28 -24
  82. package/index164.js +1 -1
  83. package/index164.mjs +2 -2
  84. package/index167.js +1 -1
  85. package/index167.mjs +3 -3
  86. package/index169.js +1 -1
  87. package/index169.mjs +1 -1
  88. package/index170.js +1 -1
  89. package/index170.mjs +1 -1
  90. package/index171.js +1 -1
  91. package/index171.mjs +1 -1
  92. package/index178.js +1 -1
  93. package/index178.mjs +1 -1
  94. package/index180.js +1 -1
  95. package/index180.mjs +2 -2
  96. package/index182.js +1 -1
  97. package/index182.mjs +1 -1
  98. package/index198.js +1 -1
  99. package/index198.mjs +70 -201
  100. package/index199.js +1 -1
  101. package/index199.mjs +91 -60
  102. package/index200.js +1 -1
  103. package/index200.mjs +151 -139
  104. package/index201.js +1 -1
  105. package/index201.mjs +72 -125
  106. package/index202.js +1 -1
  107. package/index202.mjs +38 -220
  108. package/index203.js +1 -1
  109. package/index203.mjs +5 -190
  110. package/index204.js +1 -1
  111. package/index204.mjs +60 -68
  112. package/index205.js +1 -1
  113. package/index205.mjs +53 -273
  114. package/index206.js +1 -1
  115. package/index206.mjs +191 -86
  116. package/index207.js +1 -1
  117. package/index207.mjs +56 -180
  118. package/index208.js +1 -1
  119. package/index208.mjs +134 -75
  120. package/index209.js +1 -1
  121. package/index209.mjs +118 -52
  122. package/index210.js +1 -1
  123. package/index210.mjs +214 -116
  124. package/index211.js +1 -1
  125. package/index211.mjs +181 -107
  126. package/index212.js +1 -1
  127. package/index212.mjs +61 -114
  128. package/index213.js +1 -1
  129. package/index213.mjs +272 -65
  130. package/index214.js +1 -1
  131. package/index214.mjs +93 -105
  132. package/index215.js +1 -1
  133. package/index215.mjs +183 -47
  134. package/index216.js +1 -1
  135. package/index216.mjs +77 -86
  136. package/index217.js +1 -1
  137. package/index217.mjs +53 -65
  138. package/index218.js +1 -1
  139. package/index218.mjs +122 -52
  140. package/index219.js +1 -1
  141. package/index219.mjs +111 -94
  142. package/index220.js +1 -5
  143. package/index220.mjs +117 -75
  144. package/index221.js +1 -1
  145. package/index221.mjs +63 -2016
  146. package/index222.js +1 -1
  147. package/index222.mjs +105 -54
  148. package/index223.js +1 -1
  149. package/index223.mjs +50 -186
  150. package/index224.js +1 -1
  151. package/index224.mjs +89 -68
  152. package/index225.js +1 -1
  153. package/index225.mjs +68 -93
  154. package/index226.js +1 -1
  155. package/index226.mjs +52 -151
  156. package/index227.js +1 -1
  157. package/index227.mjs +100 -72
  158. package/index228.js +5 -1
  159. package/index228.mjs +78 -40
  160. package/index229.js +1 -1
  161. package/index229.mjs +2025 -5
  162. package/index230.js +1 -1
  163. package/index230.mjs +59 -61
  164. package/index231.js +1 -1
  165. package/index231.mjs +187 -58
  166. package/index270.js +1 -1
  167. package/index270.mjs +44 -126
  168. package/index271.js +1 -1
  169. package/index271.mjs +9 -190
  170. package/index272.js +1 -1
  171. package/index272.mjs +16 -10
  172. package/index273.js +1 -1
  173. package/index273.mjs +16 -4
  174. package/index274.js +1 -1
  175. package/index274.mjs +16 -37
  176. package/index275.js +1 -1
  177. package/index275.mjs +16 -6
  178. package/index276.js +1 -1
  179. package/index276.mjs +16 -30
  180. package/index277.js +1 -1
  181. package/index277.mjs +16 -7
  182. package/index278.js +1 -1
  183. package/index278.mjs +16 -49
  184. package/index279.js +1 -1
  185. package/index279.mjs +16 -10
  186. package/index280.js +1 -1
  187. package/index280.mjs +15 -15
  188. package/index281.js +1 -1
  189. package/index281.mjs +15 -15
  190. package/index282.js +1 -1
  191. package/index282.mjs +12 -12
  192. package/index283.js +1 -1
  193. package/index283.mjs +15 -15
  194. package/index284.js +1 -1
  195. package/index284.mjs +15 -15
  196. package/index285.js +1 -1
  197. package/index285.mjs +15 -15
  198. package/index286.js +1 -1
  199. package/index286.mjs +15 -15
  200. package/index287.js +1 -1
  201. package/index287.mjs +15 -15
  202. package/index288.js +1 -1
  203. package/index288.mjs +15 -15
  204. package/index289.js +1 -1
  205. package/index289.mjs +15 -15
  206. package/index290.js +1 -1
  207. package/index290.mjs +12 -12
  208. package/index291.js +1 -1
  209. package/index291.mjs +15 -15
  210. package/index292.js +1 -1
  211. package/index292.mjs +15 -15
  212. package/index293.js +1 -1
  213. package/index293.mjs +15 -15
  214. package/index294.js +1 -1
  215. package/index294.mjs +12 -12
  216. package/index295.js +1 -1
  217. package/index295.mjs +15 -15
  218. package/index296.js +1 -1
  219. package/index296.mjs +15 -15
  220. package/index297.js +1 -1
  221. package/index297.mjs +15 -15
  222. package/index298.js +1 -1
  223. package/index298.mjs +12 -12
  224. package/index299.js +1 -1
  225. package/index299.mjs +15 -15
  226. package/index300.js +1 -1
  227. package/index300.mjs +15 -15
  228. package/index301.js +1 -1
  229. package/index301.mjs +15 -15
  230. package/index302.js +1 -1
  231. package/index302.mjs +12 -12
  232. package/index303.js +1 -1
  233. package/index303.mjs +15 -15
  234. package/index304.js +1 -1
  235. package/index304.mjs +15 -15
  236. package/index305.js +1 -1
  237. package/index305.mjs +12 -12
  238. package/index306.js +1 -1
  239. package/index306.mjs +130 -15
  240. package/index307.js +1 -1
  241. package/index307.mjs +191 -16
  242. package/index308.js +1 -1
  243. package/index308.mjs +10 -16
  244. package/index309.js +1 -1
  245. package/index309.mjs +4 -16
  246. package/index310.js +1 -1
  247. package/index310.mjs +37 -16
  248. package/index311.js +1 -1
  249. package/index311.mjs +6 -16
  250. package/index312.js +1 -1
  251. package/index312.mjs +30 -16
  252. package/index313.js +1 -1
  253. package/index313.mjs +7 -16
  254. package/index315.js +1 -1
  255. package/index315.mjs +1 -1
  256. package/index318.js +1 -1
  257. package/index318.mjs +1 -1
  258. package/index325.js +1 -1
  259. package/index325.mjs +1 -1
  260. package/index330.js +1 -1
  261. package/index330.mjs +1 -1
  262. package/index338.js +1 -1
  263. package/index338.mjs +4 -7
  264. package/index339.js +1 -1
  265. package/index339.mjs +6 -68
  266. package/index340.js +1 -1
  267. package/index340.mjs +65 -27
  268. package/index341.js +1 -1
  269. package/index341.mjs +30 -6
  270. package/index342.js +1 -1
  271. package/index342.mjs +6 -6
  272. package/index343.js +1 -1
  273. package/index343.mjs +6 -20
  274. package/index344.js +1 -1
  275. package/index344.mjs +20 -3
  276. package/index99.js +1 -1
  277. package/index99.mjs +1 -1
  278. package/package.json +1 -1
package/index218.mjs CHANGED
@@ -1,59 +1,129 @@
1
- import { c as x } from "./index277.mjs";
2
- import { e as A } from "./index274.mjs";
3
- import { e as D } from "./index275.mjs";
4
- import { g as F, o as I } from "./index271.mjs";
5
- function j($) {
1
+ import { g as S } from "./index306.mjs";
2
+ function k(x) {
6
3
  let {
7
- swiper: r,
8
- extendParams: T,
9
- on: q
10
- } = $;
11
- T({
12
- coverflowEffect: {
13
- rotate: 50,
14
- stretch: 0,
15
- depth: 100,
16
- scale: 1,
17
- modifier: 1,
18
- slideShadows: !0
4
+ swiper: e,
5
+ extendParams: B,
6
+ on: s,
7
+ emit: r,
8
+ params: u
9
+ } = x;
10
+ e.autoplay = {
11
+ running: !1,
12
+ paused: !1,
13
+ timeLeft: 0
14
+ }, B({
15
+ autoplay: {
16
+ enabled: !1,
17
+ delay: 3e3,
18
+ waitForTransition: !0,
19
+ disableOnInteraction: !1,
20
+ stopOnLastSlide: !1,
21
+ reverseDirection: !1,
22
+ pauseOnMouseEnter: !1
19
23
  }
20
- }), A({
21
- effect: "coverflow",
22
- swiper: r,
23
- on: q,
24
- setTranslate: () => {
25
- const {
26
- width: l,
27
- height: S,
28
- slides: a,
29
- slidesSizesGrid: d
30
- } = r, t = r.params.coverflowEffect, s = r.isHorizontal(), b = r.translate, z = s ? -b + l / 2 : -b + S / 2, E = s ? t.rotate : -t.rotate, O = t.depth, M = I(r);
31
- for (let f = 0, H = a.length; f < H; f += 1) {
32
- const o = a[f], h = d[f], P = o.swiperSlideOffset, v = (z - P - h / 2) / h, e = typeof t.modifier == "function" ? t.modifier(v) : v * t.modifier;
33
- let p = s ? E * e : 0, w = s ? 0 : E * e, m = -O * Math.abs(e), i = t.stretch;
34
- typeof i == "string" && i.indexOf("%") !== -1 && (i = parseFloat(t.stretch) / 100 * h);
35
- let g = s ? 0 : i * e, y = s ? i * e : 0, u = 1 - (1 - t.scale) * Math.abs(e);
36
- Math.abs(y) < 1e-3 && (y = 0), Math.abs(g) < 1e-3 && (g = 0), Math.abs(m) < 1e-3 && (m = 0), Math.abs(p) < 1e-3 && (p = 0), Math.abs(w) < 1e-3 && (w = 0), Math.abs(u) < 1e-3 && (u = 0);
37
- const X = `translate3d(${y}px,${g}px,${m}px) rotateX(${M(w)}deg) rotateY(${M(p)}deg) scale(${u})`, Y = D(t, o);
38
- if (Y.style.transform = X, o.style.zIndex = -Math.abs(Math.round(e)) + 1, t.slideShadows) {
39
- let n = s ? o.querySelector(".swiper-slide-shadow-left") : o.querySelector(".swiper-slide-shadow-top"), c = s ? o.querySelector(".swiper-slide-shadow-right") : o.querySelector(".swiper-slide-shadow-bottom");
40
- n || (n = x("coverflow", o, s ? "left" : "top")), c || (c = x("coverflow", o, s ? "right" : "bottom")), n && (n.style.opacity = e > 0 ? e : 0), c && (c.style.opacity = -e > 0 ? -e : 0);
41
- }
24
+ });
25
+ let y, E, b = u && u.autoplay ? u.autoplay.delay : 3e3, g = u && u.autoplay ? u.autoplay.delay : 3e3, n, f = (/* @__PURE__ */ new Date()).getTime(), w, v, p, h, L, o, D;
26
+ function M(t) {
27
+ !e || e.destroyed || !e.wrapperEl || t.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", M), !(D || t.detail && t.detail.bySwiperTouchMove) && l());
28
+ }
29
+ const O = () => {
30
+ if (e.destroyed || !e.autoplay.running) return;
31
+ e.autoplay.paused ? w = !0 : w && (g = n, w = !1);
32
+ const t = e.autoplay.paused ? n : f + g - (/* @__PURE__ */ new Date()).getTime();
33
+ e.autoplay.timeLeft = t, r("autoplayTimeLeft", t, t / b), E = requestAnimationFrame(() => {
34
+ O();
35
+ });
36
+ }, C = () => {
37
+ let t;
38
+ return e.virtual && e.params.virtual.enabled ? t = e.slides.filter((a) => a.classList.contains("swiper-slide-active"))[0] : t = e.slides[e.activeIndex], t ? parseInt(t.getAttribute("data-swiper-autoplay"), 10) : void 0;
39
+ }, T = (t) => {
40
+ if (e.destroyed || !e.autoplay.running) return;
41
+ cancelAnimationFrame(E), O();
42
+ let i = typeof t > "u" ? e.params.autoplay.delay : t;
43
+ b = e.params.autoplay.delay, g = e.params.autoplay.delay;
44
+ const a = C();
45
+ !Number.isNaN(a) && a > 0 && typeof t > "u" && (i = a, b = a, g = a), n = i;
46
+ const c = e.params.speed, N = () => {
47
+ !e || e.destroyed || (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(c, !0, !0), r("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, c, !0, !0), r("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(c, !0, !0), r("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, c, !0, !0), r("autoplay")), e.params.cssMode && (f = (/* @__PURE__ */ new Date()).getTime(), requestAnimationFrame(() => {
48
+ T();
49
+ })));
50
+ };
51
+ return i > 0 ? (clearTimeout(y), y = setTimeout(() => {
52
+ N();
53
+ }, i)) : requestAnimationFrame(() => {
54
+ N();
55
+ }), i;
56
+ }, I = () => {
57
+ f = (/* @__PURE__ */ new Date()).getTime(), e.autoplay.running = !0, T(), r("autoplayStart");
58
+ }, m = () => {
59
+ e.autoplay.running = !1, clearTimeout(y), cancelAnimationFrame(E), r("autoplayStop");
60
+ }, d = (t, i) => {
61
+ if (e.destroyed || !e.autoplay.running) return;
62
+ clearTimeout(y), t || (o = !0);
63
+ const a = () => {
64
+ r("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", M) : l();
65
+ };
66
+ if (e.autoplay.paused = !0, i) {
67
+ L && (n = e.params.autoplay.delay), L = !1, a();
68
+ return;
69
+ }
70
+ n = (n || e.params.autoplay.delay) - ((/* @__PURE__ */ new Date()).getTime() - f), !(e.isEnd && n < 0 && !e.params.loop) && (n < 0 && (n = 0), a());
71
+ }, l = () => {
72
+ e.isEnd && n < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (f = (/* @__PURE__ */ new Date()).getTime(), o ? (o = !1, T(n)) : T(), e.autoplay.paused = !1, r("autoplayResume"));
73
+ }, A = () => {
74
+ if (e.destroyed || !e.autoplay.running) return;
75
+ const t = S();
76
+ t.visibilityState === "hidden" && (o = !0, d(!0)), t.visibilityState === "visible" && l();
77
+ }, P = (t) => {
78
+ t.pointerType === "mouse" && (o = !0, D = !0, !(e.animating || e.autoplay.paused) && d(!0));
79
+ }, F = (t) => {
80
+ t.pointerType === "mouse" && (D = !1, e.autoplay.paused && l());
81
+ }, q = () => {
82
+ e.params.autoplay.pauseOnMouseEnter && (e.el.addEventListener("pointerenter", P), e.el.addEventListener("pointerleave", F));
83
+ }, R = () => {
84
+ e.el && typeof e.el != "string" && (e.el.removeEventListener("pointerenter", P), e.el.removeEventListener("pointerleave", F));
85
+ }, _ = () => {
86
+ S().addEventListener("visibilitychange", A);
87
+ }, j = () => {
88
+ S().removeEventListener("visibilitychange", A);
89
+ };
90
+ s("init", () => {
91
+ e.params.autoplay.enabled && (q(), _(), I());
92
+ }), s("destroy", () => {
93
+ R(), j(), e.autoplay.running && m();
94
+ }), s("_freeModeStaticRelease", () => {
95
+ (p || o) && l();
96
+ }), s("_freeModeNoMomentumRelease", () => {
97
+ e.params.autoplay.disableOnInteraction ? m() : d(!0, !0);
98
+ }), s("beforeTransitionStart", (t, i, a) => {
99
+ e.destroyed || !e.autoplay.running || (a || !e.params.autoplay.disableOnInteraction ? d(!0, !0) : m());
100
+ }), s("sliderFirstMove", () => {
101
+ if (!(e.destroyed || !e.autoplay.running)) {
102
+ if (e.params.autoplay.disableOnInteraction) {
103
+ m();
104
+ return;
42
105
  }
43
- },
44
- setTransition: (l) => {
45
- r.slides.map((a) => F(a)).forEach((a) => {
46
- a.style.transitionDuration = `${l}ms`, a.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((d) => {
47
- d.style.transitionDuration = `${l}ms`;
48
- });
49
- });
50
- },
51
- perspective: () => !0,
52
- overwriteParams: () => ({
53
- watchSlidesProgress: !0
54
- })
106
+ v = !0, p = !1, o = !1, h = setTimeout(() => {
107
+ o = !0, p = !0, d(!0);
108
+ }, 200);
109
+ }
110
+ }), s("touchEnd", () => {
111
+ if (!(e.destroyed || !e.autoplay.running || !v)) {
112
+ if (clearTimeout(h), clearTimeout(y), e.params.autoplay.disableOnInteraction) {
113
+ p = !1, v = !1;
114
+ return;
115
+ }
116
+ p && e.params.cssMode && l(), p = !1, v = !1;
117
+ }
118
+ }), s("slideChange", () => {
119
+ e.destroyed || !e.autoplay.running || (L = !0);
120
+ }), Object.assign(e.autoplay, {
121
+ start: I,
122
+ stop: m,
123
+ pause: d,
124
+ resume: l
55
125
  });
56
126
  }
57
127
  export {
58
- j as default
128
+ k as default
59
129
  };
package/index219.js CHANGED
@@ -1 +1 @@
1
- "use strict";const V=require("./index277.js"),X=require("./index274.js"),j=require("./index275.js"),A=require("./index276.js"),M=require("./index271.js");function B($){let{swiper:t,extendParams:E,on:v}=$;E({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const S=r=>typeof r=="string"?r:`${r}px`,x=()=>{const{slides:r,wrapperEl:d,slidesSizesGrid:c}=t,e=t.params.creativeEffect,{progressMultiplier:f}=e,w=t.params.centeredSlides,u=M.o(t);if(w){const g=c[0]/2-t.params.slidesOffsetBefore||0;d.style.transform=`translateX(calc(50% - ${g}px))`}for(let g=0;g<r.length;g+=1){const a=r[g],T=a.progress,i=Math.min(Math.max(a.progress,-e.limitProgress),e.limitProgress);let o=i;w||(o=Math.min(Math.max(a.originalProgress,-e.limitProgress),e.limitProgress));const P=a.swiperSlideOffset,p=[t.params.cssMode?-P-t.translate:-P,0,0],m=[0,0,0];let h=!1;t.isHorizontal()||(p[1]=p[0],p[0]=0);let s={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};i<0?(s=e.next,h=!0):i>0&&(s=e.prev,h=!0),p.forEach((l,n)=>{p[n]=`calc(${l}px + (${S(s.translate[n])} * ${Math.abs(i*f)}))`}),m.forEach((l,n)=>{let I=s.rotate[n]*Math.abs(i*f);m[n]=I}),a.style.zIndex=-Math.abs(Math.round(T))+r.length;const b=p.join(", "),O=`rotateX(${u(m[0])}deg) rotateY(${u(m[1])}deg) rotateZ(${u(m[2])}deg)`,z=o<0?`scale(${1+(1-s.scale)*o*f})`:`scale(${1-(1-s.scale)*o*f})`,C=o<0?1+(1-s.opacity)*o*f:1-(1-s.opacity)*o*f,D=`translate3d(${b}) ${O} ${z}`;if(h&&s.shadow||!h){let l=a.querySelector(".swiper-slide-shadow");if(!l&&s.shadow&&(l=V.c("creative",a)),l){const n=e.shadowPerProgress?i*(1/e.limitProgress):i;l.style.opacity=Math.min(Math.max(Math.abs(n),0),1)}}const y=j.e(e,a);y.style.transform=D,y.style.opacity=C,s.origin&&(y.style.transformOrigin=s.origin)}},q=r=>{const d=t.slides.map(c=>M.g(c));d.forEach(c=>{c.style.transitionDuration=`${r}ms`,c.querySelectorAll(".swiper-slide-shadow").forEach(e=>{e.style.transitionDuration=`${r}ms`})}),A.e({swiper:t,duration:r,transformElements:d,allSlides:!0})};X.e({effect:"creative",swiper:t,on:v,setTranslate:x,setTransition:q,perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}module.exports=B;
1
+ "use strict";const I=require("./index306.js"),h=require("./index307.js");function g(w){let{swiper:e,extendParams:x,on:m}=w;x({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let f=!1,b=!1;e.thumbs={swiper:null};function v(){const t=e.thumbs.swiper;if(!t||t.destroyed)return;const s=t.clickedIndex,r=t.clickedSlide;if(r&&r.classList.contains(e.params.thumbs.slideThumbActiveClass)||typeof s>"u"||s===null)return;let a;t.params.loop?a=parseInt(t.clickedSlide.getAttribute("data-swiper-slide-index"),10):a=s,e.params.loop?e.slideToLoop(a):e.slideTo(a)}function p(){const{thumbs:t}=e.params;if(f)return!1;f=!0;const s=e.constructor;if(t.swiper instanceof s)e.thumbs.swiper=t.swiper,Object.assign(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper.update();else if(h.l(t.swiper)){const r=Object.assign({},t.swiper);Object.assign(r,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper=new s(r),b=!0}return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",v),!0}function o(t){const s=e.thumbs.swiper;if(!s||s.destroyed)return;const r=s.params.slidesPerView==="auto"?s.slidesPerViewDynamic():s.params.slidesPerView;let a=1;const l=e.params.thumbs.slideThumbActiveClass;if(e.params.slidesPerView>1&&!e.params.centeredSlides&&(a=e.params.slidesPerView),e.params.thumbs.multipleActiveThumbs||(a=1),a=Math.floor(a),s.slides.forEach(i=>i.classList.remove(l)),s.params.loop||s.params.virtual&&s.params.virtual.enabled)for(let i=0;i<a;i+=1)h.e(s.slidesEl,`[data-swiper-slide-index="${e.realIndex+i}"]`).forEach(n=>{n.classList.add(l)});else for(let i=0;i<a;i+=1)s.slides[e.realIndex+i]&&s.slides[e.realIndex+i].classList.add(l);const d=e.params.thumbs.autoScrollOffset,u=d&&!s.params.loop;if(e.realIndex!==s.realIndex||u){const i=s.activeIndex;let n,c;if(s.params.loop){const S=s.slides.filter(T=>T.getAttribute("data-swiper-slide-index")===`${e.realIndex}`)[0];n=s.slides.indexOf(S),c=e.activeIndex>e.previousIndex?"next":"prev"}else n=e.realIndex,c=n>e.previousIndex?"next":"prev";u&&(n+=c==="next"?d:-1*d),s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(n)<0&&(s.params.centeredSlides?n>i?n=n-Math.floor(r/2)+1:n=n+Math.floor(r/2)-1:n>i&&s.params.slidesPerGroup,s.slideTo(n,t?0:void 0))}}m("beforeInit",()=>{const{thumbs:t}=e.params;if(!(!t||!t.swiper))if(typeof t.swiper=="string"||t.swiper instanceof HTMLElement){const s=I.g(),r=()=>{const l=typeof t.swiper=="string"?s.querySelector(t.swiper):t.swiper;if(l&&l.swiper)t.swiper=l.swiper,p(),o(!0);else if(l){const d=`${e.params.eventsPrefix}init`,u=i=>{t.swiper=i.detail[0],l.removeEventListener(d,u),p(),o(!0),t.swiper.update(),e.update()};l.addEventListener(d,u)}return l},a=()=>{if(e.destroyed)return;r()||requestAnimationFrame(a)};requestAnimationFrame(a)}else p(),o(!0)}),m("slideChange update resize observerUpdate",()=>{o()}),m("setTransition",(t,s)=>{const r=e.thumbs.swiper;!r||r.destroyed||r.setTransition(s)}),m("beforeDestroy",()=>{const t=e.thumbs.swiper;!t||t.destroyed||b&&t.destroy()}),Object.assign(e.thumbs,{init:p,update:o})}module.exports=g;
package/index219.mjs CHANGED
@@ -1,102 +1,119 @@
1
- import { c as C } from "./index277.mjs";
2
- import { e as D } from "./index274.mjs";
3
- import { e as F } from "./index275.mjs";
4
- import { e as I } from "./index276.mjs";
5
- import { g as V, o as X } from "./index271.mjs";
6
- function Z(E) {
1
+ import { g as T } from "./index306.mjs";
2
+ import { l as I, e as g } from "./index307.mjs";
3
+ function A(h) {
7
4
  let {
8
- swiper: t,
9
- extendParams: M,
10
- on: $
11
- } = E;
12
- M({
13
- creativeEffect: {
14
- limitProgress: 1,
15
- shadowPerProgress: !1,
16
- progressMultiplier: 1,
17
- perspective: !0,
18
- prev: {
19
- translate: [0, 0, 0],
20
- rotate: [0, 0, 0],
21
- opacity: 1,
22
- scale: 1
23
- },
24
- next: {
25
- translate: [0, 0, 0],
26
- rotate: [0, 0, 0],
27
- opacity: 1,
28
- scale: 1
29
- }
5
+ swiper: e,
6
+ extendParams: w,
7
+ on: m
8
+ } = h;
9
+ w({
10
+ thumbs: {
11
+ swiper: null,
12
+ multipleActiveThumbs: !0,
13
+ autoScrollOffset: 0,
14
+ slideThumbActiveClass: "swiper-slide-thumb-active",
15
+ thumbsContainerClass: "swiper-thumbs"
30
16
  }
31
17
  });
32
- const S = (r) => typeof r == "string" ? r : `${r}px`;
33
- D({
34
- effect: "creative",
35
- swiper: t,
36
- on: $,
37
- setTranslate: () => {
38
- const {
39
- slides: r,
40
- wrapperEl: d,
41
- slidesSizesGrid: c
42
- } = t, e = t.params.creativeEffect, {
43
- progressMultiplier: f
44
- } = e, w = t.params.centeredSlides, y = X(t);
45
- if (w) {
46
- const m = c[0] / 2 - t.params.slidesOffsetBefore || 0;
47
- d.style.transform = `translateX(calc(50% - ${m}px))`;
48
- }
49
- for (let m = 0; m < r.length; m += 1) {
50
- const a = r[m], v = a.progress, o = Math.min(Math.max(a.progress, -e.limitProgress), e.limitProgress);
51
- let i = o;
52
- w || (i = Math.min(Math.max(a.originalProgress, -e.limitProgress), e.limitProgress));
53
- const P = a.swiperSlideOffset, p = [t.params.cssMode ? -P - t.translate : -P, 0, 0], g = [0, 0, 0];
54
- let h = !1;
55
- t.isHorizontal() || (p[1] = p[0], p[0] = 0);
56
- let s = {
57
- translate: [0, 0, 0],
58
- rotate: [0, 0, 0],
59
- scale: 1,
60
- opacity: 1
61
- };
62
- o < 0 ? (s = e.next, h = !0) : o > 0 && (s = e.prev, h = !0), p.forEach((l, n) => {
63
- p[n] = `calc(${l}px + (${S(s.translate[n])} * ${Math.abs(o * f)}))`;
64
- }), g.forEach((l, n) => {
65
- let q = s.rotate[n] * Math.abs(o * f);
66
- g[n] = q;
67
- }), a.style.zIndex = -Math.abs(Math.round(v)) + r.length;
68
- const x = p.join(", "), T = `rotateX(${y(g[0])}deg) rotateY(${y(g[1])}deg) rotateZ(${y(g[2])}deg)`, b = i < 0 ? `scale(${1 + (1 - s.scale) * i * f})` : `scale(${1 - (1 - s.scale) * i * f})`, O = i < 0 ? 1 + (1 - s.opacity) * i * f : 1 - (1 - s.opacity) * i * f, z = `translate3d(${x}) ${T} ${b}`;
69
- if (h && s.shadow || !h) {
70
- let l = a.querySelector(".swiper-slide-shadow");
71
- if (!l && s.shadow && (l = C("creative", a)), l) {
72
- const n = e.shadowPerProgress ? o * (1 / e.limitProgress) : o;
73
- l.style.opacity = Math.min(Math.max(Math.abs(n), 0), 1);
74
- }
75
- }
76
- const u = F(e, a);
77
- u.style.transform = z, u.style.opacity = O, s.origin && (u.style.transformOrigin = s.origin);
78
- }
79
- },
80
- setTransition: (r) => {
81
- const d = t.slides.map((c) => V(c));
82
- d.forEach((c) => {
83
- c.style.transitionDuration = `${r}ms`, c.querySelectorAll(".swiper-slide-shadow").forEach((e) => {
84
- e.style.transitionDuration = `${r}ms`;
18
+ let f = !1, b = !1;
19
+ e.thumbs = {
20
+ swiper: null
21
+ };
22
+ function x() {
23
+ const t = e.thumbs.swiper;
24
+ if (!t || t.destroyed) return;
25
+ const s = t.clickedIndex, r = t.clickedSlide;
26
+ if (r && r.classList.contains(e.params.thumbs.slideThumbActiveClass) || typeof s > "u" || s === null) return;
27
+ let a;
28
+ t.params.loop ? a = parseInt(t.clickedSlide.getAttribute("data-swiper-slide-index"), 10) : a = s, e.params.loop ? e.slideToLoop(a) : e.slideTo(a);
29
+ }
30
+ function p() {
31
+ const {
32
+ thumbs: t
33
+ } = e.params;
34
+ if (f) return !1;
35
+ f = !0;
36
+ const s = e.constructor;
37
+ if (t.swiper instanceof s)
38
+ e.thumbs.swiper = t.swiper, Object.assign(e.thumbs.swiper.originalParams, {
39
+ watchSlidesProgress: !0,
40
+ slideToClickedSlide: !1
41
+ }), Object.assign(e.thumbs.swiper.params, {
42
+ watchSlidesProgress: !0,
43
+ slideToClickedSlide: !1
44
+ }), e.thumbs.swiper.update();
45
+ else if (I(t.swiper)) {
46
+ const r = Object.assign({}, t.swiper);
47
+ Object.assign(r, {
48
+ watchSlidesProgress: !0,
49
+ slideToClickedSlide: !1
50
+ }), e.thumbs.swiper = new s(r), b = !0;
51
+ }
52
+ return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass), e.thumbs.swiper.on("tap", x), !0;
53
+ }
54
+ function o(t) {
55
+ const s = e.thumbs.swiper;
56
+ if (!s || s.destroyed) return;
57
+ const r = s.params.slidesPerView === "auto" ? s.slidesPerViewDynamic() : s.params.slidesPerView;
58
+ let a = 1;
59
+ const n = e.params.thumbs.slideThumbActiveClass;
60
+ if (e.params.slidesPerView > 1 && !e.params.centeredSlides && (a = e.params.slidesPerView), e.params.thumbs.multipleActiveThumbs || (a = 1), a = Math.floor(a), s.slides.forEach((i) => i.classList.remove(n)), s.params.loop || s.params.virtual && s.params.virtual.enabled)
61
+ for (let i = 0; i < a; i += 1)
62
+ g(s.slidesEl, `[data-swiper-slide-index="${e.realIndex + i}"]`).forEach((l) => {
63
+ l.classList.add(n);
85
64
  });
86
- }), I({
87
- swiper: t,
88
- duration: r,
89
- transformElements: d,
90
- allSlides: !0
91
- });
92
- },
93
- perspective: () => t.params.creativeEffect.perspective,
94
- overwriteParams: () => ({
95
- watchSlidesProgress: !0,
96
- virtualTranslate: !t.params.cssMode
97
- })
65
+ else
66
+ for (let i = 0; i < a; i += 1)
67
+ s.slides[e.realIndex + i] && s.slides[e.realIndex + i].classList.add(n);
68
+ const d = e.params.thumbs.autoScrollOffset, u = d && !s.params.loop;
69
+ if (e.realIndex !== s.realIndex || u) {
70
+ const i = s.activeIndex;
71
+ let l, c;
72
+ if (s.params.loop) {
73
+ const v = s.slides.filter((S) => S.getAttribute("data-swiper-slide-index") === `${e.realIndex}`)[0];
74
+ l = s.slides.indexOf(v), c = e.activeIndex > e.previousIndex ? "next" : "prev";
75
+ } else
76
+ l = e.realIndex, c = l > e.previousIndex ? "next" : "prev";
77
+ u && (l += c === "next" ? d : -1 * d), s.visibleSlidesIndexes && s.visibleSlidesIndexes.indexOf(l) < 0 && (s.params.centeredSlides ? l > i ? l = l - Math.floor(r / 2) + 1 : l = l + Math.floor(r / 2) - 1 : l > i && s.params.slidesPerGroup, s.slideTo(l, t ? 0 : void 0));
78
+ }
79
+ }
80
+ m("beforeInit", () => {
81
+ const {
82
+ thumbs: t
83
+ } = e.params;
84
+ if (!(!t || !t.swiper))
85
+ if (typeof t.swiper == "string" || t.swiper instanceof HTMLElement) {
86
+ const s = T(), r = () => {
87
+ const n = typeof t.swiper == "string" ? s.querySelector(t.swiper) : t.swiper;
88
+ if (n && n.swiper)
89
+ t.swiper = n.swiper, p(), o(!0);
90
+ else if (n) {
91
+ const d = `${e.params.eventsPrefix}init`, u = (i) => {
92
+ t.swiper = i.detail[0], n.removeEventListener(d, u), p(), o(!0), t.swiper.update(), e.update();
93
+ };
94
+ n.addEventListener(d, u);
95
+ }
96
+ return n;
97
+ }, a = () => {
98
+ if (e.destroyed) return;
99
+ r() || requestAnimationFrame(a);
100
+ };
101
+ requestAnimationFrame(a);
102
+ } else
103
+ p(), o(!0);
104
+ }), m("slideChange update resize observerUpdate", () => {
105
+ o();
106
+ }), m("setTransition", (t, s) => {
107
+ const r = e.thumbs.swiper;
108
+ !r || r.destroyed || r.setTransition(s);
109
+ }), m("beforeDestroy", () => {
110
+ const t = e.thumbs.swiper;
111
+ !t || t.destroyed || b && t.destroy();
112
+ }), Object.assign(e.thumbs, {
113
+ init: p,
114
+ update: o
98
115
  });
99
116
  }
100
117
  export {
101
- Z as default
118
+ A as default
102
119
  };
package/index220.js CHANGED
@@ -1,5 +1 @@
1
- "use strict";const D=require("./index277.js"),X=require("./index274.js"),z=require("./index275.js"),A=require("./index276.js"),R=require("./index271.js");function Y(x){let{swiper:e,extendParams:g,on:E}=x;g({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}});const T=()=>{const{slides:o,activeIndex:l,rtlTranslate:a}=e,i=e.params.cardsEffect,{startTranslate:M,isTouched:$}=e.touchEventsData,S=a?-e.translate:e.translate;for(let c=0;c<o.length;c+=1){const n=o[c],w=n.progress,t=Math.min(Math.max(w,-4),4);let p=n.swiperSlideOffset;e.params.centeredSlides&&!e.params.cssMode&&(e.wrapperEl.style.transform=`translateX(${e.minTranslate()}px)`),e.params.centeredSlides&&e.params.cssMode&&(p-=o[0].swiperSlideOffset);let r=e.params.cssMode?-p-e.translate:-p,d=0;const v=-100*Math.abs(t);let h=1,m=-i.perSlideRotate*t,u=i.perSlideOffset-Math.abs(t)*.75;const f=e.virtual&&e.params.virtual.enabled?e.virtual.from+c:c,y=(f===l||f===l-1)&&t>0&&t<1&&($||e.params.cssMode)&&S<M,q=(f===l||f===l+1)&&t<0&&t>-1&&($||e.params.cssMode)&&S>M;if(y||q){const s=(1-Math.abs((Math.abs(t)-.5)/.5))**.5;m+=-28*t*s,h+=-.5*s,u+=96*s,d=`${-25*s*Math.abs(t)}%`}if(t<0?r=`calc(${r}px ${a?"-":"+"} (${u*Math.abs(t)}%))`:t>0?r=`calc(${r}px ${a?"-":"+"} (-${u*Math.abs(t)}%))`:r=`${r}px`,!e.isHorizontal()){const s=d;d=r,r=s}const P=t<0?`${1+(1-h)*t}`:`${1-(1-h)*t}`,I=`
2
- translate3d(${r}, ${d}, ${v}px)
3
- rotateZ(${i.rotate?a?-m:m:0}deg)
4
- scale(${P})
5
- `;if(i.slideShadows){let s=n.querySelector(".swiper-slide-shadow");s||(s=D.c("cards",n)),s&&(s.style.opacity=Math.min(Math.max((Math.abs(t)-.5)/.5,0),1))}n.style.zIndex=-Math.abs(Math.round(w))+o.length;const O=z.e(i,n);O.style.transform=I}},b=o=>{const l=e.slides.map(a=>R.g(a));l.forEach(a=>{a.style.transitionDuration=`${o}ms`,a.querySelectorAll(".swiper-slide-shadow").forEach(i=>{i.style.transitionDuration=`${o}ms`})}),A.e({swiper:e,duration:o,transformElements:l})};X.e({effect:"cards",swiper:e,on:E,setTranslate:T,setTransition:b,perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!e.params.cssMode})})}module.exports=Y;
1
+ "use strict";const m=require("./index307.js");function k(y){let{swiper:e,extendParams:g,emit:u,once:x}=y;g({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function S(){if(e.params.cssMode)return;const n=e.getTranslate();e.setTranslate(n),e.setTransition(0),e.touchEventsData.velocities.length=0,e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function E(){if(e.params.cssMode)return;const{touchEventsData:n,touches:c}=e;n.velocities.length===0&&n.velocities.push({position:c[e.isHorizontal()?"startX":"startY"],time:n.touchStartTime}),n.velocities.push({position:c[e.isHorizontal()?"currentX":"currentY"],time:m.d()})}function B(n){let{currentPos:c}=n;if(e.params.cssMode)return;const{params:i,wrapperEl:p,rtlTranslate:M,snapGrid:a,touchEventsData:r}=e,b=m.d()-r.touchStartTime;if(c<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(c>-e.maxTranslate()){e.slides.length<a.length?e.slideTo(a.length-1):e.slideTo(e.slides.length-1);return}if(i.freeMode.momentum){if(r.velocities.length>1){const o=r.velocities.pop(),s=r.velocities.pop(),D=o.position-s.position,h=o.time-s.time;e.velocity=D/h,e.velocity/=2,Math.abs(e.velocity)<i.freeMode.minimumVelocity&&(e.velocity=0),(h>150||m.d()-o.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=i.freeMode.momentumVelocityRatio,r.velocities.length=0;let l=1e3*i.freeMode.momentumRatio;const w=e.velocity*l;let t=e.translate+w;M&&(t=-t);let T=!1,d;const f=Math.abs(e.velocity)*20*i.freeMode.momentumBounceRatio;let v;if(t<e.maxTranslate())i.freeMode.momentumBounce?(t+e.maxTranslate()<-f&&(t=e.maxTranslate()-f),d=e.maxTranslate(),T=!0,r.allowMomentumBounce=!0):t=e.maxTranslate(),i.loop&&i.centeredSlides&&(v=!0);else if(t>e.minTranslate())i.freeMode.momentumBounce?(t-e.minTranslate()>f&&(t=e.minTranslate()+f),d=e.minTranslate(),T=!0,r.allowMomentumBounce=!0):t=e.minTranslate(),i.loop&&i.centeredSlides&&(v=!0);else if(i.freeMode.sticky){let o;for(let s=0;s<a.length;s+=1)if(a[s]>-t){o=s;break}Math.abs(a[o]-t)<Math.abs(a[o-1]-t)||e.swipeDirection==="next"?t=a[o]:t=a[o-1],t=-t}if(v&&x("transitionEnd",()=>{e.loopFix()}),e.velocity!==0){if(M?l=Math.abs((-t-e.translate)/e.velocity):l=Math.abs((t-e.translate)/e.velocity),i.freeMode.sticky){const o=Math.abs((M?-t:t)-e.translate),s=e.slidesSizesGrid[e.activeIndex];o<s?l=i.speed:o<2*s?l=i.speed*1.5:l=i.speed*2.5}}else if(i.freeMode.sticky){e.slideToClosest();return}i.freeMode.momentumBounce&&T?(e.updateProgress(d),e.setTransition(l),e.setTranslate(t),e.transitionStart(!0,e.swipeDirection),e.animating=!0,m.k(p,()=>{!e||e.destroyed||!r.allowMomentumBounce||(u("momentumBounce"),e.setTransition(i.speed),setTimeout(()=>{e.setTranslate(d),m.k(p,()=>{!e||e.destroyed||e.transitionEnd()})},0))})):e.velocity?(u("_freeModeNoMomentumRelease"),e.updateProgress(t),e.setTransition(l),e.setTranslate(t),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,m.k(p,()=>{!e||e.destroyed||e.transitionEnd()}))):e.updateProgress(t),e.updateActiveIndex(),e.updateSlidesClasses()}else if(i.freeMode.sticky){e.slideToClosest();return}else i.freeMode&&u("_freeModeNoMomentumRelease");(!i.freeMode.momentum||b>=i.longSwipesMs)&&(u("_freeModeStaticRelease"),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}Object.assign(e,{freeMode:{onTouchStart:S,onTouchMove:E,onTouchEnd:B}})}module.exports=k;