@okam/stack-ui 1.35.1 → 1.35.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 (268) hide show
  1. package/components/fields/SearchField/interface.d.ts +1 -0
  2. package/index105.js +1 -1
  3. package/index105.mjs +1 -1
  4. package/index106.js +1 -1
  5. package/index106.mjs +3 -3
  6. package/index107.js +1 -1
  7. package/index107.mjs +1 -1
  8. package/index112.js +1 -1
  9. package/index112.mjs +1 -1
  10. package/index114.js +1 -1
  11. package/index114.mjs +3 -3
  12. package/index115.js +1 -1
  13. package/index115.mjs +3 -3
  14. package/index116.js +1 -1
  15. package/index116.mjs +1 -1
  16. package/index117.js +1 -1
  17. package/index117.mjs +1 -1
  18. package/index118.js +1 -1
  19. package/index118.mjs +1 -1
  20. package/index122.js +1 -1
  21. package/index122.mjs +2 -2
  22. package/index123.js +1 -1
  23. package/index123.mjs +5 -5
  24. package/index124.js +1 -1
  25. package/index124.mjs +3 -3
  26. package/index131.js +1 -1
  27. package/index131.mjs +1 -1
  28. package/index140.js +1 -1
  29. package/index140.mjs +55 -10
  30. package/index141.js +1 -1
  31. package/index141.mjs +46 -57
  32. package/index142.js +1 -1
  33. package/index142.mjs +241 -46
  34. package/index143.js +2 -1
  35. package/index143.mjs +13 -241
  36. package/index144.js +1 -2
  37. package/index144.mjs +29 -12
  38. package/index145.js +1 -1
  39. package/index145.mjs +12 -30
  40. package/index148.js +1 -1
  41. package/index148.mjs +1 -1
  42. package/index150.js +1 -1
  43. package/index150.mjs +22 -68
  44. package/index151.js +1 -1
  45. package/index151.mjs +62 -370
  46. package/index152.js +1 -1
  47. package/index152.mjs +379 -44
  48. package/index153.js +1 -1
  49. package/index153.mjs +47 -4
  50. package/index154.js +1 -1
  51. package/index154.mjs +4 -25
  52. package/index155.js +1 -1
  53. package/index155.mjs +23 -46
  54. package/index156.js +1 -1
  55. package/index156.mjs +46 -4
  56. package/index157.js +1 -1
  57. package/index157.mjs +5 -24
  58. package/index158.js +1 -1
  59. package/index158.mjs +23 -11
  60. package/index159.js +1 -1
  61. package/index159.mjs +12 -4
  62. package/index160.js +1 -1
  63. package/index160.mjs +4 -14
  64. package/index161.js +1 -1
  65. package/index161.mjs +14 -21
  66. package/index162.js +1 -1
  67. package/index162.mjs +21 -42
  68. package/index163.js +1 -1
  69. package/index163.mjs +41 -23
  70. package/index164.js +1 -1
  71. package/index164.mjs +24 -42
  72. package/index165.js +1 -1
  73. package/index165.mjs +41 -27
  74. package/index166.js +1 -1
  75. package/index166.mjs +27 -30
  76. package/index167.js +1 -1
  77. package/index167.mjs +30 -13
  78. package/index168.js +1 -1
  79. package/index168.mjs +14 -28
  80. package/index169.js +1 -1
  81. package/index169.mjs +28 -9
  82. package/index170.js +1 -1
  83. package/index170.mjs +9 -6
  84. package/index171.js +1 -1
  85. package/index171.mjs +6 -5
  86. package/index172.js +1 -1
  87. package/index172.mjs +5 -13
  88. package/index173.js +1 -1
  89. package/index173.mjs +13 -8
  90. package/index174.js +1 -1
  91. package/index174.mjs +8 -17
  92. package/index175.js +1 -1
  93. package/index175.mjs +17 -19
  94. package/index176.js +1 -1
  95. package/index176.mjs +19 -54
  96. package/index177.js +1 -1
  97. package/index177.mjs +50 -23
  98. package/index18.js +1 -1
  99. package/index18.mjs +22 -22
  100. package/index195.js +1 -1
  101. package/index195.mjs +197 -134
  102. package/index196.js +1 -1
  103. package/index196.mjs +61 -194
  104. package/index197.js +1 -1
  105. package/index197.mjs +142 -21
  106. package/index198.js +1 -1
  107. package/index198.mjs +120 -45
  108. package/index199.js +1 -1
  109. package/index199.mjs +222 -46
  110. package/index200.js +1 -1
  111. package/index200.mjs +187 -94
  112. package/index201.js +1 -1
  113. package/index201.mjs +70 -72
  114. package/index202.js +1 -1
  115. package/index202.mjs +272 -61
  116. package/index203.js +1 -1
  117. package/index203.mjs +98 -7
  118. package/index204.js +1 -1
  119. package/index204.mjs +187 -10
  120. package/index205.js +1 -1
  121. package/index205.mjs +73 -192
  122. package/index206.js +1 -1
  123. package/index206.mjs +51 -57
  124. package/index207.js +1 -1
  125. package/index207.mjs +118 -135
  126. package/index208.js +1 -1
  127. package/index208.mjs +107 -115
  128. package/index209.js +1 -1
  129. package/index209.mjs +110 -212
  130. package/index210.js +1 -1
  131. package/index210.mjs +64 -182
  132. package/index211.js +1 -1
  133. package/index211.mjs +108 -67
  134. package/index212.js +1 -1
  135. package/index212.mjs +49 -276
  136. package/index213.js +1 -1
  137. package/index213.mjs +86 -91
  138. package/index214.js +1 -1
  139. package/index214.mjs +64 -182
  140. package/index215.js +1 -1
  141. package/index215.mjs +51 -79
  142. package/index216.js +1 -1
  143. package/index216.mjs +94 -53
  144. package/index217.js +5 -1
  145. package/index217.mjs +76 -122
  146. package/index218.js +1 -1
  147. package/index218.mjs +2014 -105
  148. package/index219.js +1 -1
  149. package/index219.mjs +57 -120
  150. package/index220.js +1 -1
  151. package/index220.mjs +186 -70
  152. package/index221.js +1 -1
  153. package/index221.mjs +137 -107
  154. package/index222.js +1 -1
  155. package/index222.mjs +197 -52
  156. package/index223.js +1 -1
  157. package/index223.mjs +22 -93
  158. package/index224.js +1 -1
  159. package/index224.mjs +46 -67
  160. package/index225.js +1 -1
  161. package/index225.mjs +47 -55
  162. package/index226.js +1 -1
  163. package/index226.mjs +96 -98
  164. package/index227.js +1 -5
  165. package/index227.mjs +72 -81
  166. package/index228.js +1 -1
  167. package/index228.mjs +58 -2015
  168. package/index229.js +1 -1
  169. package/index229.mjs +7 -59
  170. package/index230.js +1 -1
  171. package/index230.mjs +10 -187
  172. package/index233.js +1 -1
  173. package/index233.mjs +130 -4
  174. package/index234.js +1 -1
  175. package/index234.mjs +191 -5
  176. package/index235.js +1 -1
  177. package/index235.mjs +10 -5
  178. package/index236.js +1 -1
  179. package/index236.mjs +4 -5
  180. package/index237.js +1 -1
  181. package/index237.mjs +37 -5
  182. package/index238.js +1 -1
  183. package/index238.mjs +6 -5
  184. package/index239.js +1 -1
  185. package/index239.mjs +30 -5
  186. package/index240.js +1 -1
  187. package/index240.mjs +7 -5
  188. package/index241.js +1 -1
  189. package/index241.mjs +4 -4
  190. package/index242.js +1 -1
  191. package/index242.mjs +4 -4
  192. package/index243.js +1 -1
  193. package/index243.mjs +1 -1
  194. package/index244.js +1 -1
  195. package/index244.mjs +4 -4
  196. package/index245.js +1 -1
  197. package/index245.mjs +4 -4
  198. package/index246.js +1 -1
  199. package/index246.mjs +4 -4
  200. package/index247.js +1 -1
  201. package/index247.mjs +1 -1
  202. package/index248.js +1 -1
  203. package/index248.mjs +4 -4
  204. package/index249.js +1 -1
  205. package/index249.mjs +4 -4
  206. package/index250.js +1 -1
  207. package/index250.mjs +4 -4
  208. package/index251.js +1 -1
  209. package/index251.mjs +1 -1
  210. package/index252.js +1 -1
  211. package/index252.mjs +4 -4
  212. package/index253.js +1 -1
  213. package/index253.mjs +4 -4
  214. package/index254.js +1 -1
  215. package/index254.mjs +4 -4
  216. package/index255.js +1 -1
  217. package/index255.mjs +4 -4
  218. package/index256.js +1 -1
  219. package/index256.mjs +4 -4
  220. package/index257.js +1 -1
  221. package/index257.mjs +4 -4
  222. package/index258.js +1 -1
  223. package/index258.mjs +4 -4
  224. package/index259.js +1 -1
  225. package/index259.mjs +4 -4
  226. package/index260.js +1 -1
  227. package/index260.mjs +1 -1
  228. package/index261.js +1 -1
  229. package/index261.mjs +4 -4
  230. package/index262.js +1 -1
  231. package/index262.mjs +4 -4
  232. package/index263.js +1 -1
  233. package/index263.mjs +1 -1
  234. package/index264.js +1 -1
  235. package/index264.mjs +4 -4
  236. package/index265.js +1 -1
  237. package/index265.mjs +4 -4
  238. package/index266.js +1 -1
  239. package/index266.mjs +4 -4
  240. package/index267.js +1 -1
  241. package/index267.mjs +4 -130
  242. package/index268.js +1 -1
  243. package/index268.mjs +5 -191
  244. package/index269.js +1 -1
  245. package/index269.mjs +5 -10
  246. package/index270.js +1 -1
  247. package/index270.mjs +5 -4
  248. package/index271.js +1 -1
  249. package/index271.mjs +5 -37
  250. package/index272.js +1 -1
  251. package/index272.mjs +5 -6
  252. package/index273.js +1 -1
  253. package/index273.mjs +5 -30
  254. package/index274.js +1 -1
  255. package/index274.mjs +5 -7
  256. package/index275.js +1 -1
  257. package/index275.mjs +3 -3
  258. package/index277.js +1 -1
  259. package/index277.mjs +2 -2
  260. package/index278.js +1 -1
  261. package/index278.mjs +5 -5
  262. package/index281.js +1 -1
  263. package/index281.mjs +3 -3
  264. package/index284.js +1 -1
  265. package/index284.mjs +1 -1
  266. package/index285.js +1 -1
  267. package/index285.mjs +4 -4
  268. package/package.json +2 -29
package/index214.mjs CHANGED
@@ -1,191 +1,73 @@
1
- import { g as F } from "./index267.mjs";
2
- import { c as y } from "./index270.mjs";
3
- import { c as K, h as j, m as n } from "./index268.mjs";
4
- function Y(P) {
1
+ import { c as h } from "./index240.mjs";
2
+ import { e as x } from "./index237.mjs";
3
+ import { e as M } from "./index238.mjs";
4
+ import { e as E } from "./index239.mjs";
5
+ import { g as T, o as z } from "./index234.mjs";
6
+ function B(w) {
5
7
  let {
6
- swiper: i,
7
- extendParams: N,
8
- on: o
9
- } = P;
10
- N({
11
- a11y: {
12
- enabled: !0,
13
- notificationClass: "swiper-notification",
14
- prevSlideMessage: "Previous slide",
15
- nextSlideMessage: "Next slide",
16
- firstSlideMessage: "This is the first slide",
17
- lastSlideMessage: "This is the last slide",
18
- paginationBulletMessage: "Go to slide {{index}}",
19
- slideLabelMessage: "{{index}} / {{slidesLength}}",
20
- containerMessage: null,
21
- containerRoleDescriptionMessage: null,
22
- containerRole: null,
23
- itemRoleDescriptionMessage: null,
24
- slideRole: "group",
25
- id: null,
26
- scrollOnFocus: !0
8
+ swiper: t,
9
+ extendParams: g,
10
+ on: u
11
+ } = w;
12
+ g({
13
+ flipEffect: {
14
+ slideShadows: !0,
15
+ limitRotation: !0
27
16
  }
28
- }), i.a11y = {
29
- clicked: !1
17
+ });
18
+ const p = (e, r) => {
19
+ let s = t.isHorizontal() ? e.querySelector(".swiper-slide-shadow-left") : e.querySelector(".swiper-slide-shadow-top"), a = t.isHorizontal() ? e.querySelector(".swiper-slide-shadow-right") : e.querySelector(".swiper-slide-shadow-bottom");
20
+ s || (s = h("flip", e, t.isHorizontal() ? "left" : "top")), a || (a = h("flip", e, t.isHorizontal() ? "right" : "bottom")), s && (s.style.opacity = Math.max(-r, 0)), a && (a.style.opacity = Math.max(r, 0));
30
21
  };
31
- let r = null, p, f, L = (/* @__PURE__ */ new Date()).getTime();
32
- function u(e) {
33
- const t = r;
34
- t.length !== 0 && (t.innerHTML = "", t.innerHTML = e);
35
- }
36
- function B(e) {
37
- const t = () => Math.round(16 * Math.random()).toString(16);
38
- return "x".repeat(e).replace(/x/g, t);
39
- }
40
- function g(e) {
41
- e = n(e), e.forEach((t) => {
42
- t.setAttribute("tabIndex", "0");
43
- });
44
- }
45
- function x(e) {
46
- e = n(e), e.forEach((t) => {
47
- t.setAttribute("tabIndex", "-1");
48
- });
49
- }
50
- function m(e, t) {
51
- e = n(e), e.forEach((a) => {
52
- a.setAttribute("role", t);
53
- });
54
- }
55
- function M(e, t) {
56
- e = n(e), e.forEach((a) => {
57
- a.setAttribute("aria-roledescription", t);
58
- });
59
- }
60
- function O(e, t) {
61
- e = n(e), e.forEach((a) => {
62
- a.setAttribute("aria-controls", t);
63
- });
64
- }
65
- function E(e, t) {
66
- e = n(e), e.forEach((a) => {
67
- a.setAttribute("aria-label", t);
68
- });
69
- }
70
- function H(e, t) {
71
- e = n(e), e.forEach((a) => {
72
- a.setAttribute("id", t);
73
- });
74
- }
75
- function q(e, t) {
76
- e = n(e), e.forEach((a) => {
77
- a.setAttribute("aria-live", t);
78
- });
79
- }
80
- function A(e) {
81
- e = n(e), e.forEach((t) => {
82
- t.setAttribute("aria-disabled", !0);
83
- });
84
- }
85
- function w(e) {
86
- e = n(e), e.forEach((t) => {
87
- t.setAttribute("aria-disabled", !1);
88
- });
89
- }
90
- function d(e) {
91
- if (e.keyCode !== 13 && e.keyCode !== 32) return;
92
- const t = i.params.a11y, a = e.target;
93
- if (!(i.pagination && i.pagination.el && (a === i.pagination.el || i.pagination.el.contains(e.target)) && !e.target.matches(y(i.params.pagination.bulletClass)))) {
94
- if (i.navigation && i.navigation.prevEl && i.navigation.nextEl) {
95
- const s = n(i.navigation.prevEl);
96
- n(i.navigation.nextEl).includes(a) && (i.isEnd && !i.params.loop || i.slideNext(), i.isEnd ? u(t.lastSlideMessage) : u(t.nextSlideMessage)), s.includes(a) && (i.isBeginning && !i.params.loop || i.slidePrev(), i.isBeginning ? u(t.firstSlideMessage) : u(t.prevSlideMessage));
22
+ x({
23
+ effect: "flip",
24
+ swiper: t,
25
+ on: u,
26
+ setTranslate: () => {
27
+ const {
28
+ slides: e,
29
+ rtlTranslate: r
30
+ } = t, s = t.params.flipEffect, a = z(t);
31
+ for (let f = 0; f < e.length; f += 1) {
32
+ const o = e[f];
33
+ let l = o.progress;
34
+ t.params.flipEffect.limitRotation && (l = Math.max(Math.min(o.progress, 1), -1));
35
+ const c = o.swiperSlideOffset;
36
+ let i = -180 * l, m = 0, n = t.params.cssMode ? -c - t.translate : -c, d = 0;
37
+ t.isHorizontal() ? r && (i = -i) : (d = n, n = 0, m = -i, i = 0), o.style.zIndex = -Math.abs(Math.round(l)) + e.length, s.slideShadows && p(o, l);
38
+ const S = `translate3d(${n}px, ${d}px, 0px) rotateX(${a(m)}deg) rotateY(${a(i)}deg)`, y = M(s, o);
39
+ y.style.transform = S;
97
40
  }
98
- i.pagination && a.matches(y(i.params.pagination.bulletClass)) && a.click();
99
- }
100
- }
101
- function G() {
102
- if (i.params.loop || i.params.rewind || !i.navigation) return;
103
- const {
104
- nextEl: e,
105
- prevEl: t
106
- } = i.navigation;
107
- t && (i.isBeginning ? (A(t), x(t)) : (w(t), g(t))), e && (i.isEnd ? (A(e), x(e)) : (w(e), g(e)));
108
- }
109
- function k() {
110
- return i.pagination && i.pagination.bullets && i.pagination.bullets.length;
111
- }
112
- function C() {
113
- return k() && i.params.pagination.clickable;
114
- }
115
- function U() {
116
- const e = i.params.a11y;
117
- k() && i.pagination.bullets.forEach((t) => {
118
- i.params.pagination.clickable && (g(t), i.params.pagination.renderBullet || (m(t, "button"), E(t, e.paginationBulletMessage.replace(/\{\{index\}\}/, j(t) + 1)))), t.matches(y(i.params.pagination.bulletActiveClass)) ? t.setAttribute("aria-current", "true") : t.removeAttribute("aria-current");
119
- });
120
- }
121
- const S = (e, t, a) => {
122
- g(e), e.tagName !== "BUTTON" && (m(e, "button"), e.addEventListener("keydown", d)), E(e, a), O(e, t);
123
- }, R = (e) => {
124
- f && f !== e.target && !f.contains(e.target) && (p = !0), i.a11y.clicked = !0;
125
- }, T = () => {
126
- p = !1, requestAnimationFrame(() => {
127
- requestAnimationFrame(() => {
128
- i.destroyed || (i.a11y.clicked = !1);
41
+ },
42
+ setTransition: (e) => {
43
+ const r = t.slides.map((s) => T(s));
44
+ r.forEach((s) => {
45
+ s.style.transitionDuration = `${e}ms`, s.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((a) => {
46
+ a.style.transitionDuration = `${e}ms`;
47
+ });
48
+ }), E({
49
+ swiper: t,
50
+ duration: e,
51
+ transformElements: r
129
52
  });
130
- });
131
- }, D = (e) => {
132
- L = (/* @__PURE__ */ new Date()).getTime();
133
- }, h = (e) => {
134
- if (i.a11y.clicked || !i.params.a11y.scrollOnFocus || (/* @__PURE__ */ new Date()).getTime() - L < 100) return;
135
- const t = e.target.closest(`.${i.params.slideClass}, swiper-slide`);
136
- if (!t || !i.slides.includes(t)) return;
137
- f = t;
138
- const a = i.slides.indexOf(t) === i.activeIndex, s = i.params.watchSlidesProgress && i.visibleSlides && i.visibleSlides.includes(t);
139
- a || s || e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents || (i.isHorizontal() ? i.el.scrollLeft = 0 : i.el.scrollTop = 0, requestAnimationFrame(() => {
140
- p || (i.params.loop ? i.slideToLoop(parseInt(t.getAttribute("data-swiper-slide-index")), 0) : i.slideTo(i.slides.indexOf(t), 0), p = !1);
141
- }));
142
- }, I = () => {
143
- const e = i.params.a11y;
144
- e.itemRoleDescriptionMessage && M(i.slides, e.itemRoleDescriptionMessage), e.slideRole && m(i.slides, e.slideRole);
145
- const t = i.slides.length;
146
- e.slideLabelMessage && i.slides.forEach((a, s) => {
147
- const l = i.params.loop ? parseInt(a.getAttribute("data-swiper-slide-index"), 10) : s, c = e.slideLabelMessage.replace(/\{\{index\}\}/, l + 1).replace(/\{\{slidesLength\}\}/, t);
148
- E(a, c);
149
- });
150
- }, V = () => {
151
- const e = i.params.a11y;
152
- i.el.append(r);
153
- const t = i.el;
154
- e.containerRoleDescriptionMessage && M(t, e.containerRoleDescriptionMessage), e.containerMessage && E(t, e.containerMessage), e.containerRole && m(t, e.containerRole);
155
- const a = i.wrapperEl, s = e.id || a.getAttribute("id") || `swiper-wrapper-${B(16)}`, l = i.params.autoplay && i.params.autoplay.enabled ? "off" : "polite";
156
- H(a, s), q(a, l), I();
157
- let {
158
- nextEl: c,
159
- prevEl: v
160
- } = i.navigation ? i.navigation : {};
161
- c = n(c), v = n(v), c && c.forEach((b) => S(b, s, e.nextSlideMessage)), v && v.forEach((b) => S(b, s, e.prevSlideMessage)), C() && n(i.pagination.el).forEach((z) => {
162
- z.addEventListener("keydown", d);
163
- }), F().addEventListener("visibilitychange", D), i.el.addEventListener("focus", h, !0), i.el.addEventListener("focus", h, !0), i.el.addEventListener("pointerdown", R, !0), i.el.addEventListener("pointerup", T, !0);
164
- };
165
- function $() {
166
- r && r.remove();
167
- let {
168
- nextEl: e,
169
- prevEl: t
170
- } = i.navigation ? i.navigation : {};
171
- e = n(e), t = n(t), e && e.forEach((s) => s.removeEventListener("keydown", d)), t && t.forEach((s) => s.removeEventListener("keydown", d)), C() && n(i.pagination.el).forEach((l) => {
172
- l.removeEventListener("keydown", d);
173
- }), F().removeEventListener("visibilitychange", D), i.el && typeof i.el != "string" && (i.el.removeEventListener("focus", h, !0), i.el.removeEventListener("pointerdown", R, !0), i.el.removeEventListener("pointerup", T, !0));
174
- }
175
- o("beforeInit", () => {
176
- r = K("span", i.params.a11y.notificationClass), r.setAttribute("aria-live", "assertive"), r.setAttribute("aria-atomic", "true");
177
- }), o("afterInit", () => {
178
- i.params.a11y.enabled && V();
179
- }), o("slidesLengthChange snapGridLengthChange slidesGridLengthChange", () => {
180
- i.params.a11y.enabled && I();
181
- }), o("fromEdge toEdge afterInit lock unlock", () => {
182
- i.params.a11y.enabled && G();
183
- }), o("paginationUpdate", () => {
184
- i.params.a11y.enabled && U();
185
- }), o("destroy", () => {
186
- i.params.a11y.enabled && $();
53
+ },
54
+ recreateShadows: () => {
55
+ t.params.flipEffect, t.slides.forEach((e) => {
56
+ let r = e.progress;
57
+ t.params.flipEffect.limitRotation && (r = Math.max(Math.min(e.progress, 1), -1)), p(e, r);
58
+ });
59
+ },
60
+ getEffectParams: () => t.params.flipEffect,
61
+ perspective: () => !0,
62
+ overwriteParams: () => ({
63
+ slidesPerView: 1,
64
+ slidesPerGroup: 1,
65
+ watchSlidesProgress: !0,
66
+ spaceBetween: 0,
67
+ virtualTranslate: !t.params.cssMode
68
+ })
187
69
  });
188
70
  }
189
71
  export {
190
- Y as default
72
+ B as default
191
73
  };
package/index215.js CHANGED
@@ -1 +1 @@
1
- "use strict";const h=require("./index267.js");function $(w){let{swiper:e,extendParams:S,on:c}=w;S({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let d=!1,l={};const y=t=>t.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f=t=>{const o=h.a();let r;t?r=new URL(t):r=o.location;const a=r.pathname.slice(1).split("/").filter(i=>i!==""),n=a.length,s=a[n-2],p=a[n-1];return{key:s,value:p}},m=(t,o)=>{const r=h.a();if(!d||!e.params.history.enabled)return;let a;e.params.url?a=new URL(e.params.url):a=r.location;const n=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${o}"]`):e.slides[o];let s=y(n.getAttribute("data-history"));if(e.params.history.root.length>0){let i=e.params.history.root;i[i.length-1]==="/"&&(i=i.slice(0,i.length-1)),s=`${i}/${t?`${t}/`:""}${s}`}else a.pathname.includes(t)||(s=`${t?`${t}/`:""}${s}`);e.params.history.keepQuery&&(s+=a.search);const p=r.history.state;p&&p.value===s||(e.params.history.replaceState?r.history.replaceState({value:s},null,s):r.history.pushState({value:s},null,s))},g=(t,o,r)=>{if(o)for(let a=0,n=e.slides.length;a<n;a+=1){const s=e.slides[a];if(y(s.getAttribute("data-history"))===o){const i=e.getSlideIndex(s);e.slideTo(i,t,r)}}else e.slideTo(0,t,r)},u=()=>{l=f(e.params.url),g(e.params.speed,l.value,!1)},v=()=>{const t=h.a();if(e.params.history){if(!t.history||!t.history.pushState){e.params.history.enabled=!1,e.params.hashNavigation.enabled=!0;return}if(d=!0,l=f(e.params.url),!l.key&&!l.value){e.params.history.replaceState||t.addEventListener("popstate",u);return}g(0,l.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",u)}},b=()=>{const t=h.a();e.params.history.replaceState||t.removeEventListener("popstate",u)};c("init",()=>{e.params.history.enabled&&v()}),c("destroy",()=>{e.params.history.enabled&&b()}),c("transitionEnd _freeModeNoMomentumRelease",()=>{d&&m(e.params.history.key,e.activeIndex)}),c("slideChange",()=>{d&&e.params.cssMode&&m(e.params.history.key,e.activeIndex)})}module.exports=$;
1
+ "use strict";const v=require("./index240.js"),B=require("./index237.js"),C=require("./index238.js"),$=require("./index234.js");function F(x){let{swiper:o,extendParams:z,on:O}=x;z({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}});const T=()=>{const{width:l,height:b,slides:i,slidesSizesGrid:d}=o,t=o.params.coverflowEffect,s=o.isHorizontal(),S=o.translate,P=s?-S+l/2:-S+b/2,E=s?t.rotate:-t.rotate,X=t.depth,M=$.o(o);for(let c=0,Y=i.length;c<Y;c+=1){const r=i[c],h=d[c],A=r.swiperSlideOffset,q=(P-A-h/2)/h,e=typeof t.modifier=="function"?t.modifier(q):q*t.modifier;let w=s?E*e:0,p=s?0:E*e,m=-X*Math.abs(e),a=t.stretch;typeof a=="string"&&a.indexOf("%")!==-1&&(a=parseFloat(t.stretch)/100*h);let u=s?0:a*e,y=s?a*e:0,g=1-(1-t.scale)*Math.abs(e);Math.abs(y)<.001&&(y=0),Math.abs(u)<.001&&(u=0),Math.abs(m)<.001&&(m=0),Math.abs(w)<.001&&(w=0),Math.abs(p)<.001&&(p=0),Math.abs(g)<.001&&(g=0);const D=`translate3d(${y}px,${u}px,${m}px) rotateX(${M(p)}deg) rotateY(${M(w)}deg) scale(${g})`,I=C.e(t,r);if(I.style.transform=D,r.style.zIndex=-Math.abs(Math.round(e))+1,t.slideShadows){let f=s?r.querySelector(".swiper-slide-shadow-left"):r.querySelector(".swiper-slide-shadow-top"),n=s?r.querySelector(".swiper-slide-shadow-right"):r.querySelector(".swiper-slide-shadow-bottom");f||(f=v.c("coverflow",r,s?"left":"top")),n||(n=v.c("coverflow",r,s?"right":"bottom")),f&&(f.style.opacity=e>0?e:0),n&&(n.style.opacity=-e>0?-e:0)}}},H=l=>{o.slides.map(i=>$.g(i)).forEach(i=>{i.style.transitionDuration=`${l}ms`,i.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>{d.style.transitionDuration=`${l}ms`})})};B.e({effect:"coverflow",swiper:o,on:O,setTranslate:T,setTransition:H,perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}module.exports=F;
package/index215.mjs CHANGED
@@ -1,87 +1,59 @@
1
- import { a as h } from "./index267.mjs";
2
- function x(w) {
1
+ import { c as x } from "./index240.mjs";
2
+ import { e as A } from "./index237.mjs";
3
+ import { e as D } from "./index238.mjs";
4
+ import { g as F, o as I } from "./index234.mjs";
5
+ function j($) {
3
6
  let {
4
- swiper: e,
5
- extendParams: S,
6
- on: c
7
- } = w;
8
- S({
9
- history: {
10
- enabled: !1,
11
- root: "",
12
- replaceState: !1,
13
- key: "slides",
14
- keepQuery: !1
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
15
19
  }
16
- });
17
- let d = !1, l = {};
18
- const y = (t) => t.toString().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, ""), f = (t) => {
19
- const o = h();
20
- let r;
21
- t ? r = new URL(t) : r = o.location;
22
- const a = r.pathname.slice(1).split("/").filter((i) => i !== ""), n = a.length, s = a[n - 2], p = a[n - 1];
23
- return {
24
- key: s,
25
- value: p
26
- };
27
- }, m = (t, o) => {
28
- const r = h();
29
- if (!d || !e.params.history.enabled) return;
30
- let a;
31
- e.params.url ? a = new URL(e.params.url) : a = r.location;
32
- const n = e.virtual && e.params.virtual.enabled ? e.slidesEl.querySelector(`[data-swiper-slide-index="${o}"]`) : e.slides[o];
33
- let s = y(n.getAttribute("data-history"));
34
- if (e.params.history.root.length > 0) {
35
- let i = e.params.history.root;
36
- i[i.length - 1] === "/" && (i = i.slice(0, i.length - 1)), s = `${i}/${t ? `${t}/` : ""}${s}`;
37
- } else a.pathname.includes(t) || (s = `${t ? `${t}/` : ""}${s}`);
38
- e.params.history.keepQuery && (s += a.search);
39
- const p = r.history.state;
40
- p && p.value === s || (e.params.history.replaceState ? r.history.replaceState({
41
- value: s
42
- }, null, s) : r.history.pushState({
43
- value: s
44
- }, null, s));
45
- }, g = (t, o, r) => {
46
- if (o)
47
- for (let a = 0, n = e.slides.length; a < n; a += 1) {
48
- const s = e.slides[a];
49
- if (y(s.getAttribute("data-history")) === o) {
50
- const i = e.getSlideIndex(s);
51
- e.slideTo(i, t, r);
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);
52
41
  }
53
42
  }
54
- else
55
- e.slideTo(0, t, r);
56
- }, u = () => {
57
- l = f(e.params.url), g(e.params.speed, l.value, !1);
58
- }, v = () => {
59
- const t = h();
60
- if (e.params.history) {
61
- if (!t.history || !t.history.pushState) {
62
- e.params.history.enabled = !1, e.params.hashNavigation.enabled = !0;
63
- return;
64
- }
65
- if (d = !0, l = f(e.params.url), !l.key && !l.value) {
66
- e.params.history.replaceState || t.addEventListener("popstate", u);
67
- return;
68
- }
69
- g(0, l.value, e.params.runCallbacksOnInit), e.params.history.replaceState || t.addEventListener("popstate", u);
70
- }
71
- }, b = () => {
72
- const t = h();
73
- e.params.history.replaceState || t.removeEventListener("popstate", u);
74
- };
75
- c("init", () => {
76
- e.params.history.enabled && v();
77
- }), c("destroy", () => {
78
- e.params.history.enabled && b();
79
- }), c("transitionEnd _freeModeNoMomentumRelease", () => {
80
- d && m(e.params.history.key, e.activeIndex);
81
- }), c("slideChange", () => {
82
- d && e.params.cssMode && m(e.params.history.key, e.activeIndex);
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
+ })
83
55
  });
84
56
  }
85
57
  export {
86
- x as default
58
+ j as default
87
59
  };
package/index216.js CHANGED
@@ -1 +1 @@
1
- "use strict";const p=require("./index267.js"),S=require("./index268.js");function x(u){let{swiper:e,extendParams:v,emit:l,on:n}=u,r=!1;const h=p.g(),i=p.a();v({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(a,t){if(e.virtual&&e.params.virtual.enabled){const s=e.slides.filter(f=>f.getAttribute("data-hash")===t)[0];return s?parseInt(s.getAttribute("data-swiper-slide-index"),10):0}return e.getSlideIndex(S.e(e.slidesEl,`.${e.params.slideClass}[data-hash="${t}"], swiper-slide[data-hash="${t}"]`)[0])}}});const o=()=>{l("hashChange");const a=h.location.hash.replace("#",""),t=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],s=t?t.getAttribute("data-hash"):"";if(a!==s){const d=e.params.hashNavigation.getSlideIndex(e,a);if(typeof d>"u"||Number.isNaN(d))return;e.slideTo(d)}},c=()=>{if(!r||!e.params.hashNavigation.enabled)return;const a=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],t=a?a.getAttribute("data-hash")||a.getAttribute("data-history"):"";e.params.hashNavigation.replaceState&&i.history&&i.history.replaceState?(i.history.replaceState(null,null,`#${t}`||""),l("hashSet")):(h.location.hash=t||"",l("hashSet"))},g=()=>{if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;r=!0;const a=h.location.hash.replace("#","");if(a){const s=e.params.hashNavigation.getSlideIndex(e,a);e.slideTo(s||0,0,e.params.runCallbacksOnInit,!0)}e.params.hashNavigation.watchState&&i.addEventListener("hashchange",o)},m=()=>{e.params.hashNavigation.watchState&&i.removeEventListener("hashchange",o)};n("init",()=>{e.params.hashNavigation.enabled&&g()}),n("destroy",()=>{e.params.hashNavigation.enabled&&m()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{r&&c()}),n("slideChange",()=>{r&&e.params.cssMode&&c()})}module.exports=x;
1
+ "use strict";const V=require("./index240.js"),X=require("./index237.js"),j=require("./index238.js"),A=require("./index239.js"),M=require("./index234.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;
package/index216.mjs CHANGED
@@ -1,61 +1,102 @@
1
- import { g as f, a as S } from "./index267.mjs";
2
- import { e as x } from "./index268.mjs";
3
- function w(p) {
1
+ import { c as C } from "./index240.mjs";
2
+ import { e as D } from "./index237.mjs";
3
+ import { e as F } from "./index238.mjs";
4
+ import { e as I } from "./index239.mjs";
5
+ import { g as V, o as X } from "./index234.mjs";
6
+ function Z(E) {
4
7
  let {
5
- swiper: e,
6
- extendParams: u,
7
- emit: l,
8
- on: n
9
- } = p, r = !1;
10
- const h = f(), s = S();
11
- u({
12
- hashNavigation: {
13
- enabled: !1,
14
- replaceState: !1,
15
- watchState: !1,
16
- getSlideIndex(a, t) {
17
- if (e.virtual && e.params.virtual.enabled) {
18
- const i = e.slides.filter((v) => v.getAttribute("data-hash") === t)[0];
19
- return i ? parseInt(i.getAttribute("data-swiper-slide-index"), 10) : 0;
20
- }
21
- return e.getSlideIndex(x(e.slidesEl, `.${e.params.slideClass}[data-hash="${t}"], swiper-slide[data-hash="${t}"]`)[0]);
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
22
29
  }
23
30
  }
24
31
  });
25
- const o = () => {
26
- l("hashChange");
27
- const a = h.location.hash.replace("#", ""), t = e.virtual && e.params.virtual.enabled ? e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`) : e.slides[e.activeIndex], i = t ? t.getAttribute("data-hash") : "";
28
- if (a !== i) {
29
- const d = e.params.hashNavigation.getSlideIndex(e, a);
30
- if (typeof d > "u" || Number.isNaN(d)) return;
31
- e.slideTo(d);
32
- }
33
- }, c = () => {
34
- if (!r || !e.params.hashNavigation.enabled) return;
35
- const a = e.virtual && e.params.virtual.enabled ? e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`) : e.slides[e.activeIndex], t = a ? a.getAttribute("data-hash") || a.getAttribute("data-history") : "";
36
- e.params.hashNavigation.replaceState && s.history && s.history.replaceState ? (s.history.replaceState(null, null, `#${t}` || ""), l("hashSet")) : (h.location.hash = t || "", l("hashSet"));
37
- }, m = () => {
38
- if (!e.params.hashNavigation.enabled || e.params.history && e.params.history.enabled) return;
39
- r = !0;
40
- const a = h.location.hash.replace("#", "");
41
- if (a) {
42
- const i = e.params.hashNavigation.getSlideIndex(e, a);
43
- e.slideTo(i || 0, 0, e.params.runCallbacksOnInit, !0);
44
- }
45
- e.params.hashNavigation.watchState && s.addEventListener("hashchange", o);
46
- }, g = () => {
47
- e.params.hashNavigation.watchState && s.removeEventListener("hashchange", o);
48
- };
49
- n("init", () => {
50
- e.params.hashNavigation.enabled && m();
51
- }), n("destroy", () => {
52
- e.params.hashNavigation.enabled && g();
53
- }), n("transitionEnd _freeModeNoMomentumRelease", () => {
54
- r && c();
55
- }), n("slideChange", () => {
56
- r && e.params.cssMode && c();
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`;
85
+ });
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
+ })
57
98
  });
58
99
  }
59
100
  export {
60
- w as default
101
+ Z as default
61
102
  };
package/index217.js CHANGED
@@ -1 +1,5 @@
1
- "use strict";const h=require("./index267.js");function V(q){let{swiper:e,extendParams:x,on:s,emit:r,params:u}=q;e.autoplay={running:!1,paused:!1,timeLeft:0},x({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let y,E,w=u&&u.autoplay?u.autoplay.delay:3e3,g=u&&u.autoplay?u.autoplay.delay:3e3,n,f=new Date().getTime(),b,v,p,D,L,o,S;function M(t){!e||e.destroyed||!e.wrapperEl||t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",M),!(S||t.detail&&t.detail.bySwiperTouchMove)&&l())}const O=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?b=!0:b&&(g=n,b=!1);const t=e.autoplay.paused?n:f+g-new Date().getTime();e.autoplay.timeLeft=t,r("autoplayTimeLeft",t,t/w),E=requestAnimationFrame(()=>{O()})},B=()=>{let t;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},T=t=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(E),O();let i=typeof t>"u"?e.params.autoplay.delay:t;w=e.params.autoplay.delay,g=e.params.autoplay.delay;const a=B();!Number.isNaN(a)&&a>0&&typeof t>"u"&&(i=a,w=a,g=a),n=i;const c=e.params.speed,N=()=>{!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=new Date().getTime(),requestAnimationFrame(()=>{T()})))};return i>0?(clearTimeout(y),y=setTimeout(()=>{N()},i)):requestAnimationFrame(()=>{N()}),i},I=()=>{f=new Date().getTime(),e.autoplay.running=!0,T(),r("autoplayStart")},m=()=>{e.autoplay.running=!1,clearTimeout(y),cancelAnimationFrame(E),r("autoplayStop")},d=(t,i)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(y),t||(o=!0);const a=()=>{r("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",M):l()};if(e.autoplay.paused=!0,i){L&&(n=e.params.autoplay.delay),L=!1,a();return}n=(n||e.params.autoplay.delay)-(new Date().getTime()-f),!(e.isEnd&&n<0&&!e.params.loop)&&(n<0&&(n=0),a())},l=()=>{e.isEnd&&n<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(f=new Date().getTime(),o?(o=!1,T(n)):T(),e.autoplay.paused=!1,r("autoplayResume"))},A=()=>{if(e.destroyed||!e.autoplay.running)return;const t=h.g();t.visibilityState==="hidden"&&(o=!0,d(!0)),t.visibilityState==="visible"&&l()},P=t=>{t.pointerType==="mouse"&&(o=!0,S=!0,!(e.animating||e.autoplay.paused)&&d(!0))},F=t=>{t.pointerType==="mouse"&&(S=!1,e.autoplay.paused&&l())},C=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",P),e.el.addEventListener("pointerleave",F))},_=()=>{e.el&&typeof e.el!="string"&&(e.el.removeEventListener("pointerenter",P),e.el.removeEventListener("pointerleave",F))},R=()=>{h.g().addEventListener("visibilitychange",A)},j=()=>{h.g().removeEventListener("visibilitychange",A)};s("init",()=>{e.params.autoplay.enabled&&(C(),R(),I())}),s("destroy",()=>{_(),j(),e.autoplay.running&&m()}),s("_freeModeStaticRelease",()=>{(p||o)&&l()}),s("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?m():d(!0,!0)}),s("beforeTransitionStart",(t,i,a)=>{e.destroyed||!e.autoplay.running||(a||!e.params.autoplay.disableOnInteraction?d(!0,!0):m())}),s("sliderFirstMove",()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){m();return}v=!0,p=!1,o=!1,D=setTimeout(()=>{o=!0,p=!0,d(!0)},200)}}),s("touchEnd",()=>{if(!(e.destroyed||!e.autoplay.running||!v)){if(clearTimeout(D),clearTimeout(y),e.params.autoplay.disableOnInteraction){p=!1,v=!1;return}p&&e.params.cssMode&&l(),p=!1,v=!1}}),s("slideChange",()=>{e.destroyed||!e.autoplay.running||(L=!0)}),Object.assign(e.autoplay,{start:I,stop:m,pause:d,resume:l})}module.exports=V;
1
+ "use strict";const D=require("./index240.js"),X=require("./index237.js"),z=require("./index238.js"),A=require("./index239.js"),R=require("./index234.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;