@okam/stack-ui 1.31.1 → 1.32.0

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 (418) hide show
  1. package/components/fields/Select/Select.interface.d.ts +2 -2
  2. package/components/fields/TextInputField/index.d.ts +5 -1
  3. package/components/fields/TextInputField/interface.d.ts +3 -1
  4. package/index110.js +1 -1
  5. package/index110.mjs +5 -5
  6. package/index111.js +1 -1
  7. package/index111.mjs +2 -2
  8. package/index112.js +1 -1
  9. package/index112.mjs +1 -1
  10. package/index113.js +1 -1
  11. package/index113.mjs +2 -2
  12. package/index115.js +1 -1
  13. package/index115.mjs +3 -3
  14. package/index116.js +1 -1
  15. package/index116.mjs +2 -2
  16. package/index120.js +1 -1
  17. package/index120.mjs +3 -3
  18. package/index121.js +1 -1
  19. package/index121.mjs +2 -2
  20. package/index123.js +1 -1
  21. package/index123.mjs +8 -8
  22. package/index124.js +1 -1
  23. package/index124.mjs +1 -1
  24. package/index125.js +1 -1
  25. package/index125.mjs +3 -3
  26. package/index126.js +1 -1
  27. package/index126.mjs +3 -3
  28. package/index130.js +1 -1
  29. package/index130.mjs +2 -2
  30. package/index133.js +1 -1
  31. package/index133.mjs +1 -1
  32. package/index138.js +1 -1
  33. package/index138.mjs +2 -2
  34. package/index140.js +1 -1
  35. package/index140.mjs +23 -23
  36. package/index141.js +1 -1
  37. package/index141.mjs +3 -3
  38. package/index144.js +1 -1
  39. package/index144.mjs +1 -1
  40. package/index145.js +1 -1
  41. package/index145.mjs +5 -5
  42. package/index146.js +1 -1
  43. package/index146.mjs +3 -3
  44. package/index147.js +1 -1
  45. package/index147.mjs +1 -1
  46. package/index148.js +1 -1
  47. package/index148.mjs +3 -3
  48. package/index149.js +1 -1
  49. package/index149.mjs +3 -3
  50. package/index150.js +1 -1
  51. package/index150.mjs +1 -1
  52. package/index151.js +1 -1
  53. package/index151.mjs +3 -3
  54. package/index152.js +1 -1
  55. package/index152.mjs +106 -20
  56. package/index153.js +1 -1
  57. package/index153.mjs +83 -107
  58. package/index154.js +1 -1
  59. package/index154.mjs +26 -83
  60. package/index155.js +1 -1
  61. package/index155.mjs +20 -25
  62. package/index156.js +1 -1
  63. package/index156.mjs +17 -123
  64. package/index157.js +1 -1
  65. package/index157.mjs +122 -24
  66. package/index158.js +1 -1
  67. package/index158.mjs +71 -17
  68. package/index159.js +1 -1
  69. package/index159.mjs +338 -62
  70. package/index160.js +1 -1
  71. package/index160.mjs +42 -346
  72. package/index161.js +1 -1
  73. package/index161.mjs +29 -43
  74. package/index162.js +1 -1
  75. package/index162.mjs +24 -28
  76. package/index164.js +1 -1
  77. package/index164.mjs +2 -2
  78. package/index167.js +1 -1
  79. package/index167.mjs +2 -2
  80. package/index169.js +1 -1
  81. package/index169.mjs +4 -4
  82. package/index170.js +1 -1
  83. package/index170.mjs +2 -2
  84. package/index173.js +1 -1
  85. package/index173.mjs +1 -1
  86. package/index175.js +1 -1
  87. package/index175.mjs +1 -1
  88. package/index176.js +1 -1
  89. package/index176.mjs +1 -1
  90. package/index178.js +1 -1
  91. package/index178.mjs +3 -3
  92. package/index179.js +1 -1
  93. package/index179.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/index184.js +1 -1
  99. package/index184.mjs +1 -1
  100. package/index185.js +1 -1
  101. package/index185.mjs +205 -197
  102. package/index186.js +1 -1
  103. package/index186.mjs +24 -64
  104. package/index187.js +1 -1
  105. package/index187.mjs +4 -143
  106. package/index188.js +1 -1
  107. package/index188.mjs +3 -124
  108. package/index189.js +1 -1
  109. package/index189.mjs +116 -215
  110. package/index190.js +1 -1
  111. package/index190.mjs +23 -184
  112. package/index191.js +1 -1
  113. package/index191.mjs +51 -69
  114. package/index192.js +1 -1
  115. package/index192.mjs +43 -278
  116. package/index193.js +1 -1
  117. package/index193.mjs +31 -92
  118. package/index194.js +1 -1
  119. package/index194.mjs +109 -184
  120. package/index195.js +1 -1
  121. package/index195.mjs +77 -84
  122. package/index196.js +1 -1
  123. package/index196.mjs +101 -58
  124. package/index197.js +1 -1
  125. package/index197.mjs +98 -127
  126. package/index198.js +1 -1
  127. package/index198.mjs +70 -114
  128. package/index199.js +1 -1
  129. package/index199.mjs +91 -118
  130. package/index200.js +1 -1
  131. package/index200.mjs +152 -69
  132. package/index201.js +1 -1
  133. package/index201.mjs +72 -111
  134. package/index202.js +1 -1
  135. package/index202.mjs +41 -51
  136. package/index203.js +1 -1
  137. package/index203.mjs +5 -93
  138. package/index204.js +1 -1
  139. package/index204.mjs +60 -69
  140. package/index205.js +1 -1
  141. package/index205.mjs +58 -55
  142. package/index206.js +1 -1
  143. package/index206.mjs +196 -92
  144. package/index207.js +1 -5
  145. package/index207.mjs +59 -75
  146. package/index208.js +1 -1
  147. package/index208.mjs +126 -2008
  148. package/index209.js +1 -1
  149. package/index209.mjs +121 -56
  150. package/index210.js +1 -1
  151. package/index210.mjs +221 -185
  152. package/index211.js +1 -1
  153. package/index211.mjs +185 -206
  154. package/index212.js +1 -1
  155. package/index212.mjs +69 -24
  156. package/index213.js +1 -1
  157. package/index213.mjs +279 -4
  158. package/index214.js +1 -1
  159. package/index214.mjs +98 -3
  160. package/index215.js +1 -1
  161. package/index215.mjs +179 -116
  162. package/index216.js +1 -1
  163. package/index216.mjs +84 -29
  164. package/index217.js +1 -1
  165. package/index217.mjs +58 -51
  166. package/index218.js +1 -1
  167. package/index218.mjs +125 -43
  168. package/index219.js +1 -1
  169. package/index219.mjs +112 -33
  170. package/index22.js +1 -1
  171. package/index22.mjs +148 -61
  172. package/index220.js +1 -1
  173. package/index220.mjs +119 -110
  174. package/index221.js +1 -1
  175. package/index221.mjs +72 -77
  176. package/index222.js +1 -1
  177. package/index222.mjs +105 -96
  178. package/index223.js +1 -1
  179. package/index223.mjs +53 -98
  180. package/index224.js +1 -1
  181. package/index224.mjs +89 -68
  182. package/index225.js +1 -1
  183. package/index225.mjs +68 -93
  184. package/index226.js +1 -1
  185. package/index226.mjs +52 -151
  186. package/index227.js +1 -1
  187. package/index227.mjs +100 -72
  188. package/index228.js +5 -1
  189. package/index228.mjs +78 -40
  190. package/index229.js +1 -1
  191. package/index229.mjs +2025 -5
  192. package/index230.js +1 -1
  193. package/index230.mjs +59 -61
  194. package/index231.js +1 -1
  195. package/index231.mjs +187 -58
  196. package/index269.js +1 -1
  197. package/index269.mjs +4 -24
  198. package/index270.js +1 -1
  199. package/index270.mjs +46 -45
  200. package/index271.js +1 -1
  201. package/index271.mjs +9 -5
  202. package/index272.js +1 -1
  203. package/index272.mjs +16 -6
  204. package/index273.js +1 -1
  205. package/index273.mjs +16 -15
  206. package/index274.js +1 -1
  207. package/index274.mjs +16 -25
  208. package/index275.js +1 -1
  209. package/index275.mjs +16 -29
  210. package/index276.js +1 -1
  211. package/index276.mjs +16 -32
  212. package/index277.js +1 -1
  213. package/index277.mjs +16 -10
  214. package/index278.js +1 -1
  215. package/index278.mjs +16 -29
  216. package/index279.js +1 -1
  217. package/index279.mjs +16 -10
  218. package/index280.js +1 -1
  219. package/index280.mjs +16 -6
  220. package/index281.js +1 -1
  221. package/index281.mjs +16 -8
  222. package/index282.js +1 -1
  223. package/index282.mjs +16 -14
  224. package/index283.js +1 -1
  225. package/index283.mjs +16 -9
  226. package/index284.js +1 -1
  227. package/index284.mjs +15 -130
  228. package/index285.js +1 -1
  229. package/index285.mjs +16 -191
  230. package/index286.js +1 -1
  231. package/index286.mjs +16 -10
  232. package/index287.js +1 -1
  233. package/index287.mjs +16 -4
  234. package/index288.js +1 -1
  235. package/index288.mjs +16 -37
  236. package/index289.js +1 -1
  237. package/index289.mjs +16 -6
  238. package/index290.js +1 -1
  239. package/index290.mjs +16 -30
  240. package/index291.js +1 -1
  241. package/index291.mjs +16 -7
  242. package/index292.js +1 -1
  243. package/index292.mjs +16 -141
  244. package/index293.js +1 -1
  245. package/index293.mjs +16 -198
  246. package/index294.js +1 -1
  247. package/index294.mjs +16 -23
  248. package/index295.js +1 -1
  249. package/index295.mjs +16 -47
  250. package/index296.js +1 -1
  251. package/index296.mjs +16 -49
  252. package/index297.js +1 -1
  253. package/index297.mjs +16 -101
  254. package/index298.js +1 -1
  255. package/index298.mjs +15 -71
  256. package/index299.js +1 -1
  257. package/index299.mjs +16 -59
  258. package/index300.js +1 -1
  259. package/index300.mjs +16 -8
  260. package/index301.js +1 -1
  261. package/index301.mjs +16 -12
  262. package/index302.js +1 -1
  263. package/index302.mjs +16 -5
  264. package/index303.js +1 -1
  265. package/index303.mjs +16 -49
  266. package/index304.js +1 -1
  267. package/index304.mjs +12 -12
  268. package/index305.js +1 -1
  269. package/index305.mjs +12 -12
  270. package/index306.js +1 -1
  271. package/index306.mjs +25 -16
  272. package/index307.js +1 -1
  273. package/index307.mjs +48 -16
  274. package/index308.js +1 -1
  275. package/index308.mjs +6 -16
  276. package/index309.js +1 -1
  277. package/index309.mjs +6 -16
  278. package/index310.js +1 -1
  279. package/index310.mjs +15 -16
  280. package/index311.js +1 -1
  281. package/index311.mjs +25 -16
  282. package/index312.js +1 -1
  283. package/index312.mjs +29 -16
  284. package/index313.js +1 -1
  285. package/index313.mjs +32 -16
  286. package/index314.js +1 -1
  287. package/index314.mjs +29 -16
  288. package/index315.js +1 -1
  289. package/index315.mjs +10 -16
  290. package/index316.js +1 -1
  291. package/index316.mjs +6 -16
  292. package/index317.js +1 -1
  293. package/index317.mjs +8 -16
  294. package/index318.js +1 -1
  295. package/index318.mjs +14 -16
  296. package/index319.js +1 -1
  297. package/index319.mjs +9 -16
  298. package/index320.js +1 -1
  299. package/index320.mjs +130 -15
  300. package/index321.js +1 -1
  301. package/index321.mjs +191 -16
  302. package/index322.js +1 -1
  303. package/index322.mjs +10 -16
  304. package/index323.js +1 -1
  305. package/index323.mjs +4 -16
  306. package/index324.js +1 -1
  307. package/index324.mjs +37 -16
  308. package/index325.js +1 -1
  309. package/index325.mjs +6 -16
  310. package/index326.js +1 -1
  311. package/index326.mjs +30 -16
  312. package/index327.js +1 -1
  313. package/index327.mjs +7 -16
  314. package/index328.js +1 -1
  315. package/index328.mjs +141 -16
  316. package/index329.js +1 -1
  317. package/index329.mjs +198 -16
  318. package/index330.js +1 -1
  319. package/index330.mjs +23 -16
  320. package/index331.js +1 -1
  321. package/index331.mjs +47 -16
  322. package/index332.js +1 -1
  323. package/index332.mjs +49 -16
  324. package/index333.js +1 -1
  325. package/index333.mjs +101 -16
  326. package/index334.js +1 -1
  327. package/index334.mjs +71 -15
  328. package/index335.js +1 -1
  329. package/index335.mjs +59 -16
  330. package/index336.js +1 -1
  331. package/index336.mjs +8 -16
  332. package/index337.js +1 -1
  333. package/index337.mjs +12 -16
  334. package/index338.js +1 -1
  335. package/index338.mjs +7 -4
  336. package/index339.js +1 -1
  337. package/index339.mjs +68 -6
  338. package/index340.js +1 -1
  339. package/index340.mjs +27 -65
  340. package/index341.js +1 -1
  341. package/index341.mjs +6 -30
  342. package/index342.js +1 -1
  343. package/index342.mjs +6 -6
  344. package/index343.js +1 -1
  345. package/index343.mjs +20 -6
  346. package/index344.js +1 -1
  347. package/index344.mjs +3 -20
  348. package/index381.js +1 -1
  349. package/index381.mjs +6 -5
  350. package/index382.js +1 -1
  351. package/index382.mjs +1 -1
  352. package/index383.js +1 -1
  353. package/index383.mjs +4 -4
  354. package/index384.js +1 -1
  355. package/index384.mjs +1 -1
  356. package/index385.js +1 -1
  357. package/index385.mjs +1 -1
  358. package/index386.js +1 -1
  359. package/index386.mjs +4 -4
  360. package/index387.js +1 -1
  361. package/index387.mjs +4 -4
  362. package/index388.js +1 -1
  363. package/index388.mjs +1 -1
  364. package/index389.js +1 -1
  365. package/index389.mjs +4 -4
  366. package/index390.js +1 -1
  367. package/index390.mjs +4 -4
  368. package/index391.js +1 -1
  369. package/index391.mjs +1 -1
  370. package/index392.js +1 -1
  371. package/index392.mjs +4 -4
  372. package/index393.js +1 -1
  373. package/index393.mjs +4 -4
  374. package/index394.js +1 -1
  375. package/index394.mjs +1 -1
  376. package/index395.js +1 -1
  377. package/index395.mjs +1 -1
  378. package/index396.js +1 -1
  379. package/index396.mjs +4 -4
  380. package/index397.js +1 -1
  381. package/index397.mjs +4 -4
  382. package/index398.js +1 -1
  383. package/index398.mjs +1 -1
  384. package/index399.js +1 -1
  385. package/index399.mjs +4 -4
  386. package/index400.js +1 -1
  387. package/index400.mjs +4 -4
  388. package/index401.js +1 -1
  389. package/index401.mjs +4 -4
  390. package/index402.js +1 -1
  391. package/index402.mjs +1 -1
  392. package/index403.js +1 -1
  393. package/index403.mjs +4 -4
  394. package/index404.js +1 -1
  395. package/index404.mjs +4 -4
  396. package/index405.js +1 -1
  397. package/index405.mjs +4 -4
  398. package/index406.js +1 -1
  399. package/index406.mjs +4 -4
  400. package/index407.js +1 -1
  401. package/index407.mjs +4 -4
  402. package/index408.js +1 -1
  403. package/index408.mjs +1 -1
  404. package/index409.js +1 -1
  405. package/index409.mjs +1 -1
  406. package/index410.js +1 -1
  407. package/index410.mjs +1 -1
  408. package/index411.js +1 -1
  409. package/index411.mjs +4 -4
  410. package/index412.js +1 -1
  411. package/index412.mjs +4 -4
  412. package/index413.js +1 -1
  413. package/index413.mjs +4 -4
  414. package/index414.js +1 -1
  415. package/index414.mjs +4 -4
  416. package/index415.js +1 -1
  417. package/index415.mjs +5 -6
  418. package/package.json +1 -1
package/index215.mjs CHANGED
@@ -1,128 +1,191 @@
1
- import { CalendarDate as $ } from "./index169.mjs";
2
- import { GregorianCalendar as c } from "./index184.mjs";
3
- const f = [
4
- [
5
- 1868,
6
- 9,
7
- 8
8
- ],
9
- [
10
- 1912,
11
- 7,
12
- 30
13
- ],
14
- [
15
- 1926,
16
- 12,
17
- 25
18
- ],
19
- [
20
- 1989,
21
- 1,
22
- 8
23
- ],
24
- [
25
- 2019,
26
- 5,
27
- 1
28
- ]
29
- ], D = [
30
- [
31
- 1912,
32
- 7,
33
- 29
34
- ],
35
- [
36
- 1926,
37
- 12,
38
- 24
39
- ],
40
- [
41
- 1989,
42
- 1,
43
- 7
44
- ],
45
- [
46
- 2019,
47
- 4,
48
- 30
49
- ]
50
- ], u = [
51
- 1867,
52
- 1911,
53
- 1925,
54
- 1988,
55
- 2018
56
- ], i = [
57
- "meiji",
58
- "taisho",
59
- "showa",
60
- "heisei",
61
- "reiwa"
62
- ];
63
- function h(e) {
64
- const r = f.findIndex(([n, a, t]) => e.year < n || e.year === n && e.month < a || e.year === n && e.month === a && e.day < t);
65
- return r === -1 ? f.length - 1 : r === 0 ? 0 : r - 1;
66
- }
67
- function s(e) {
68
- let r = u[i.indexOf(e.era)];
69
- if (!r) throw new Error("Unknown era: " + e.era);
70
- return new $(e.year + r, e.month, e.day);
71
- }
72
- class g extends c {
73
- fromJulianDay(r) {
74
- let n = super.fromJulianDay(r), a = h(n);
75
- return new $(this, i[a], n.year - u[a], n.month, n.day);
76
- }
77
- toJulianDay(r) {
78
- return super.toJulianDay(s(r));
79
- }
80
- balanceDate(r) {
81
- let n = s(r), a = h(n);
82
- i[a] !== r.era && (r.era = i[a], r.year = n.year - u[a]), this.constrainDate(r);
83
- }
84
- constrainDate(r) {
85
- let n = i.indexOf(r.era), a = D[n];
86
- if (a != null) {
87
- let [t, o, y] = a, m = t - u[n];
88
- r.year = Math.max(1, Math.min(m, r.year)), r.year === m && (r.month = Math.min(o, r.month), r.month === o && (r.day = Math.min(y, r.day)));
89
- }
90
- if (r.year === 1 && n >= 0) {
91
- let [, t, o] = f[n];
92
- r.month = Math.max(t, r.month), r.month === t && (r.day = Math.max(o, r.day));
1
+ import { g as F } from "./index320.mjs";
2
+ import { c as y } from "./index323.mjs";
3
+ import { c as K, h as j, m as n } from "./index321.mjs";
4
+ function Y(P) {
5
+ 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
93
27
  }
28
+ }), i.a11y = {
29
+ clicked: !1
30
+ };
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);
94
35
  }
95
- getEras() {
96
- return i;
36
+ function B(e) {
37
+ const t = () => Math.round(16 * Math.random()).toString(16);
38
+ return "x".repeat(e).replace(/x/g, t);
97
39
  }
98
- getYearsInEra(r) {
99
- let n = i.indexOf(r.era), a = f[n], t = f[n + 1];
100
- if (t == null)
101
- return 9999 - a[0] + 1;
102
- let o = t[0] - a[0];
103
- return (r.month < t[1] || r.month === t[1] && r.day < t[2]) && o++, o;
40
+ function g(e) {
41
+ e = n(e), e.forEach((t) => {
42
+ t.setAttribute("tabIndex", "0");
43
+ });
104
44
  }
105
- getDaysInMonth(r) {
106
- return super.getDaysInMonth(s(r));
45
+ function x(e) {
46
+ e = n(e), e.forEach((t) => {
47
+ t.setAttribute("tabIndex", "-1");
48
+ });
107
49
  }
108
- getMinimumMonthInYear(r) {
109
- let n = l(r);
110
- return n ? n[1] : 1;
50
+ function m(e, t) {
51
+ e = n(e), e.forEach((a) => {
52
+ a.setAttribute("role", t);
53
+ });
111
54
  }
112
- getMinimumDayInMonth(r) {
113
- let n = l(r);
114
- return n && r.month === n[1] ? n[2] : 1;
55
+ function M(e, t) {
56
+ e = n(e), e.forEach((a) => {
57
+ a.setAttribute("aria-roledescription", t);
58
+ });
115
59
  }
116
- constructor(...r) {
117
- super(...r), this.identifier = "japanese";
60
+ function O(e, t) {
61
+ e = n(e), e.forEach((a) => {
62
+ a.setAttribute("aria-controls", t);
63
+ });
118
64
  }
119
- }
120
- function l(e) {
121
- if (e.year === 1) {
122
- let r = i.indexOf(e.era);
123
- return f[r];
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));
97
+ }
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);
129
+ });
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));
124
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 && $();
187
+ });
125
188
  }
126
189
  export {
127
- g as JapaneseCalendar
190
+ Y as default
128
191
  };
package/index216.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index169.js"),t=require("./index184.js"),o=-543;class i extends t.GregorianCalendar{fromJulianDay(e){let r=super.fromJulianDay(e),u=t.getExtendedYear(r.era,r.year);return new d.CalendarDate(this,u-o,r.month,r.day)}toJulianDay(e){return super.toJulianDay(n(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(n(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function n(a){let[e,r]=t.fromExtendedYear(a.year+o);return new d.CalendarDate(e,r,a.month,a.day)}exports.BuddhistCalendar=i;
1
+ "use strict";const h=require("./index320.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=$;
package/index216.mjs CHANGED
@@ -1,32 +1,87 @@
1
- import { CalendarDate as n } from "./index169.mjs";
2
- import { GregorianCalendar as s, getExtendedYear as $, fromExtendedYear as c } from "./index184.mjs";
3
- const o = -543;
4
- class u extends s {
5
- fromJulianDay(e) {
6
- let r = super.fromJulianDay(e), d = $(r.era, r.year);
7
- return new n(this, d - o, r.month, r.day);
8
- }
9
- toJulianDay(e) {
10
- return super.toJulianDay(t(e));
11
- }
12
- getEras() {
13
- return [
14
- "BE"
15
- ];
16
- }
17
- getDaysInMonth(e) {
18
- return super.getDaysInMonth(t(e));
19
- }
20
- balanceDate() {
21
- }
22
- constructor(...e) {
23
- super(...e), this.identifier = "buddhist";
24
- }
25
- }
26
- function t(a) {
27
- let [e, r] = c(a.year + o);
28
- return new n(e, r, a.month, a.day);
1
+ import { a as h } from "./index320.mjs";
2
+ function x(w) {
3
+ 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
15
+ }
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);
52
+ }
53
+ }
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);
83
+ });
29
84
  }
30
85
  export {
31
- u as BuddhistCalendar
86
+ x as default
32
87
  };
package/index217.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index169.js"),o=require("./index184.js"),n=1911;function l(r){return r.era==="minguo"?r.year+n:1-r.year+n}function u(r){let e=r-n;return e>0?["minguo",e]:["before_minguo",1-e]}class c extends o.GregorianCalendar{fromJulianDay(e){let a=super.fromJulianDay(e),t=o.getExtendedYear(a.era,a.year),[s,g]=u(t);return new f.CalendarDate(this,s,g,a.month,a.day)}toJulianDay(e){return super.toJulianDay(i(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[a,t]=u(l(e));e.era=a,e.year=t}isInverseEra(e){return e.era==="before_minguo"}getDaysInMonth(e){return super.getDaysInMonth(i(e))}getYearsInEra(e){return e.era==="before_minguo"?9999:9999-n}constructor(...e){super(...e),this.identifier="roc"}}function i(r){let[e,a]=o.fromExtendedYear(l(r));return new f.CalendarDate(e,a,r.month,r.day)}exports.TaiwanCalendar=c;
1
+ "use strict";const p=require("./index320.js"),S=require("./index321.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;
package/index217.mjs CHANGED
@@ -1,54 +1,61 @@
1
- import { CalendarDate as f } from "./index169.mjs";
2
- import { GregorianCalendar as c, getExtendedYear as s, fromExtendedYear as g } from "./index184.mjs";
3
- const n = 1911;
4
- function i(r) {
5
- return r.era === "minguo" ? r.year + n : 1 - r.year + n;
6
- }
7
- function o(r) {
8
- let e = r - n;
9
- return e > 0 ? [
10
- "minguo",
11
- e
12
- ] : [
13
- "before_minguo",
14
- 1 - e
15
- ];
16
- }
17
- class m extends c {
18
- fromJulianDay(e) {
19
- let a = super.fromJulianDay(e), t = s(a.era, a.year), [u, $] = o(t);
20
- return new f(this, u, $, a.month, a.day);
21
- }
22
- toJulianDay(e) {
23
- return super.toJulianDay(b(e));
24
- }
25
- getEras() {
26
- return [
27
- "before_minguo",
28
- "minguo"
29
- ];
30
- }
31
- balanceDate(e) {
32
- let [a, t] = o(i(e));
33
- e.era = a, e.year = t;
34
- }
35
- isInverseEra(e) {
36
- return e.era === "before_minguo";
37
- }
38
- getDaysInMonth(e) {
39
- return super.getDaysInMonth(b(e));
40
- }
41
- getYearsInEra(e) {
42
- return e.era === "before_minguo" ? 9999 : 9999 - n;
43
- }
44
- constructor(...e) {
45
- super(...e), this.identifier = "roc";
46
- }
47
- }
48
- function b(r) {
49
- let [e, a] = g(i(r));
50
- return new f(e, a, r.month, r.day);
1
+ import { g as f, a as S } from "./index320.mjs";
2
+ import { e as x } from "./index321.mjs";
3
+ function w(p) {
4
+ 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]);
22
+ }
23
+ }
24
+ });
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();
57
+ });
51
58
  }
52
59
  export {
53
- m as TaiwanCalendar
60
+ w as default
54
61
  };
package/index218.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index169.js"),u=require("./index214.js"),o=1948320,l=[0,31,62,93,124,155,186,216,246,276,306,336];class c{fromJulianDay(e){let r=e-o,a=1+Math.floor((33*r+3)/12053),i=365*(a-1)+Math.floor((8*a+21)/33),t=r-i,n=t<216?Math.floor(t/31):Math.floor((t-6)/30),s=t-l[n]+1;return new f.CalendarDate(this,a,n+1,s)}toJulianDay(e){let r=o-1+365*(e.year-1)+Math.floor((8*e.year+21)/33);return r+=l[e.month-1],r+=e.day,r}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||u.mod(25*e.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}exports.PersianCalendar=c;
1
+ "use strict";const h=require("./index320.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;