@okam/stack-ui 1.32.5 → 1.32.7

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 (425) hide show
  1. package/index101.js +1 -1
  2. package/index101.mjs +1 -1
  3. package/index102.js +1 -1
  4. package/index102.mjs +3 -3
  5. package/index103.js +1 -1
  6. package/index103.mjs +1 -1
  7. package/index110.js +1 -1
  8. package/index110.mjs +5 -5
  9. package/index111.js +1 -1
  10. package/index111.mjs +2 -2
  11. package/index112.js +1 -1
  12. package/index112.mjs +1 -1
  13. package/index113.js +1 -1
  14. package/index113.mjs +2 -2
  15. package/index115.js +1 -1
  16. package/index115.mjs +4 -4
  17. package/index116.js +1 -1
  18. package/index116.mjs +2 -2
  19. package/index120.js +1 -1
  20. package/index120.mjs +4 -4
  21. package/index121.js +1 -1
  22. package/index121.mjs +2 -2
  23. package/index122.js +1 -1
  24. package/index122.mjs +2 -2
  25. package/index123.js +1 -1
  26. package/index123.mjs +8 -8
  27. package/index125.js +1 -1
  28. package/index125.mjs +2 -2
  29. package/index126.js +1 -1
  30. package/index126.mjs +3 -3
  31. package/index130.js +1 -1
  32. package/index130.mjs +2 -2
  33. package/index138.js +1 -1
  34. package/index138.mjs +52 -12
  35. package/index139.js +1 -1
  36. package/index139.mjs +46 -52
  37. package/index140.js +1 -1
  38. package/index140.mjs +241 -46
  39. package/index141.js +2 -1
  40. package/index141.mjs +13 -241
  41. package/index142.js +1 -2
  42. package/index142.mjs +29 -12
  43. package/index143.js +1 -1
  44. package/index143.mjs +11 -29
  45. package/index145.js +1 -1
  46. package/index145.mjs +1 -1
  47. package/index146.js +1 -1
  48. package/index146.mjs +1 -1
  49. package/index147.js +1 -1
  50. package/index147.mjs +2 -2
  51. package/index148.js +1 -1
  52. package/index148.mjs +3 -3
  53. package/index149.js +1 -1
  54. package/index149.mjs +3 -3
  55. package/index150.js +1 -1
  56. package/index150.mjs +107 -24
  57. package/index151.js +1 -1
  58. package/index151.mjs +79 -110
  59. package/index152.js +1 -1
  60. package/index152.mjs +25 -106
  61. package/index153.js +1 -1
  62. package/index153.mjs +23 -82
  63. package/index154.js +1 -1
  64. package/index154.mjs +113 -25
  65. package/index155.js +1 -1
  66. package/index155.mjs +2 -2
  67. package/index156.js +1 -1
  68. package/index156.mjs +123 -17
  69. package/index157.js +1 -1
  70. package/index157.mjs +24 -122
  71. package/index158.js +1 -1
  72. package/index158.mjs +17 -71
  73. package/index159.js +1 -1
  74. package/index159.mjs +62 -338
  75. package/index160.js +1 -1
  76. package/index160.mjs +346 -42
  77. package/index161.js +1 -1
  78. package/index161.mjs +43 -29
  79. package/index162.js +1 -1
  80. package/index162.mjs +28 -24
  81. package/index164.js +1 -1
  82. package/index164.mjs +2 -2
  83. package/index167.js +1 -1
  84. package/index167.mjs +3 -3
  85. package/index169.js +1 -1
  86. package/index169.mjs +4 -4
  87. package/index17.js +1 -1
  88. package/index17.mjs +15 -15
  89. package/index170.js +1 -1
  90. package/index170.mjs +2 -2
  91. package/index171.js +1 -1
  92. package/index171.mjs +1 -1
  93. package/index173.js +1 -1
  94. package/index173.mjs +1 -1
  95. package/index175.js +1 -1
  96. package/index175.mjs +1 -1
  97. package/index176.js +1 -1
  98. package/index176.mjs +1 -1
  99. package/index177.js +1 -1
  100. package/index177.mjs +1 -1
  101. package/index178.js +1 -1
  102. package/index178.mjs +4 -4
  103. package/index179.js +1 -1
  104. package/index179.mjs +1 -1
  105. package/index180.js +1 -1
  106. package/index180.mjs +2 -2
  107. package/index182.js +1 -1
  108. package/index182.mjs +1 -1
  109. package/index184.js +1 -1
  110. package/index184.mjs +1 -1
  111. package/index185.js +1 -1
  112. package/index185.mjs +197 -205
  113. package/index186.js +1 -1
  114. package/index186.mjs +64 -24
  115. package/index187.js +1 -1
  116. package/index187.mjs +143 -4
  117. package/index188.js +1 -1
  118. package/index188.mjs +124 -3
  119. package/index189.js +1 -1
  120. package/index189.mjs +215 -116
  121. package/index190.js +1 -1
  122. package/index190.mjs +184 -23
  123. package/index191.js +1 -1
  124. package/index191.mjs +69 -51
  125. package/index192.js +1 -1
  126. package/index192.mjs +278 -43
  127. package/index193.js +1 -1
  128. package/index193.mjs +92 -31
  129. package/index194.js +1 -1
  130. package/index194.mjs +184 -109
  131. package/index195.js +1 -1
  132. package/index195.mjs +84 -77
  133. package/index196.js +1 -1
  134. package/index196.mjs +58 -101
  135. package/index197.js +1 -1
  136. package/index197.mjs +127 -98
  137. package/index198.js +1 -1
  138. package/index198.mjs +101 -188
  139. package/index199.js +1 -1
  140. package/index199.mjs +110 -52
  141. package/index200.js +1 -1
  142. package/index200.mjs +67 -138
  143. package/index201.js +1 -1
  144. package/index201.mjs +105 -119
  145. package/index202.js +1 -1
  146. package/index202.mjs +47 -219
  147. package/index203.js +1 -1
  148. package/index203.mjs +88 -185
  149. package/index204.js +1 -1
  150. package/index204.mjs +63 -62
  151. package/index205.js +1 -1
  152. package/index205.mjs +52 -275
  153. package/index206.js +1 -1
  154. package/index206.mjs +94 -93
  155. package/index207.js +5 -1
  156. package/index207.mjs +75 -183
  157. package/index208.js +1 -1
  158. package/index208.mjs +2014 -73
  159. package/index209.js +1 -1
  160. package/index209.mjs +57 -56
  161. package/index21.js +1 -1
  162. package/index21.mjs +96 -92
  163. package/index210.js +1 -1
  164. package/index210.mjs +185 -123
  165. package/index211.js +1 -1
  166. package/index211.mjs +205 -110
  167. package/index212.js +1 -1
  168. package/index212.mjs +24 -122
  169. package/index213.js +1 -1
  170. package/index213.mjs +4 -72
  171. package/index214.js +1 -1
  172. package/index214.mjs +3 -110
  173. package/index215.js +1 -1
  174. package/index215.mjs +124 -51
  175. package/index216.js +1 -1
  176. package/index216.mjs +29 -93
  177. package/index217.js +1 -1
  178. package/index217.mjs +51 -70
  179. package/index218.js +1 -1
  180. package/index218.mjs +44 -56
  181. package/index219.js +1 -1
  182. package/index219.mjs +36 -98
  183. package/index220.js +1 -5
  184. package/index220.mjs +111 -78
  185. package/index221.js +1 -1
  186. package/index221.mjs +73 -2021
  187. package/index222.js +1 -1
  188. package/index222.mjs +99 -57
  189. package/index223.js +1 -1
  190. package/index223.mjs +98 -189
  191. package/index224.js +1 -1
  192. package/index224.mjs +4 -4
  193. package/index225.js +1 -1
  194. package/index225.mjs +1 -1
  195. package/index226.js +1 -1
  196. package/index226.mjs +3 -3
  197. package/index227.js +1 -1
  198. package/index227.mjs +34 -34
  199. package/index230.js +1 -1
  200. package/index230.mjs +2 -2
  201. package/index231.js +1 -1
  202. package/index231.mjs +1 -1
  203. package/index266.js +1 -1
  204. package/index266.mjs +34 -34
  205. package/index269.js +1 -1
  206. package/index269.mjs +130 -4
  207. package/index270.js +1 -1
  208. package/index270.mjs +188 -22
  209. package/index271.js +1 -1
  210. package/index271.mjs +8 -46
  211. package/index272.js +1 -1
  212. package/index272.mjs +3 -5
  213. package/index273.js +1 -1
  214. package/index273.mjs +37 -6
  215. package/index274.js +1 -1
  216. package/index274.mjs +5 -14
  217. package/index275.js +1 -1
  218. package/index275.mjs +29 -24
  219. package/index276.js +1 -1
  220. package/index276.mjs +6 -28
  221. package/index277.js +1 -1
  222. package/index277.mjs +4 -31
  223. package/index278.js +1 -1
  224. package/index278.mjs +48 -9
  225. package/index279.js +1 -1
  226. package/index279.mjs +9 -28
  227. package/index280.js +1 -1
  228. package/index280.mjs +16 -10
  229. package/index281.js +1 -1
  230. package/index281.mjs +16 -6
  231. package/index282.js +1 -1
  232. package/index282.mjs +16 -8
  233. package/index283.js +1 -1
  234. package/index283.mjs +16 -14
  235. package/index284.js +1 -1
  236. package/index284.mjs +16 -9
  237. package/index285.js +1 -1
  238. package/index285.mjs +15 -130
  239. package/index286.js +1 -1
  240. package/index286.mjs +16 -191
  241. package/index287.js +1 -1
  242. package/index287.mjs +16 -10
  243. package/index288.js +1 -1
  244. package/index288.mjs +16 -4
  245. package/index289.js +1 -1
  246. package/index289.mjs +16 -37
  247. package/index290.js +1 -1
  248. package/index290.mjs +16 -6
  249. package/index291.js +1 -1
  250. package/index291.mjs +16 -30
  251. package/index292.js +1 -1
  252. package/index292.mjs +16 -7
  253. package/index293.js +1 -1
  254. package/index293.mjs +16 -49
  255. package/index294.js +1 -1
  256. package/index294.mjs +15 -15
  257. package/index295.js +1 -1
  258. package/index295.mjs +12 -12
  259. package/index296.js +1 -1
  260. package/index296.mjs +15 -15
  261. package/index297.js +1 -1
  262. package/index297.mjs +12 -12
  263. package/index298.js +1 -1
  264. package/index298.mjs +12 -12
  265. package/index299.js +1 -1
  266. package/index299.mjs +15 -15
  267. package/index300.js +1 -1
  268. package/index300.mjs +12 -12
  269. package/index301.js +1 -1
  270. package/index301.mjs +15 -15
  271. package/index302.js +1 -1
  272. package/index302.mjs +12 -12
  273. package/index303.js +1 -1
  274. package/index303.mjs +12 -12
  275. package/index304.js +1 -1
  276. package/index304.mjs +12 -12
  277. package/index305.js +1 -1
  278. package/index305.mjs +15 -15
  279. package/index306.js +1 -1
  280. package/index306.mjs +15 -15
  281. package/index307.js +1 -1
  282. package/index307.mjs +15 -15
  283. package/index308.js +1 -1
  284. package/index308.mjs +15 -15
  285. package/index309.js +1 -1
  286. package/index309.mjs +15 -15
  287. package/index310.js +1 -1
  288. package/index310.mjs +15 -15
  289. package/index311.js +1 -1
  290. package/index311.mjs +15 -15
  291. package/index312.js +1 -1
  292. package/index312.mjs +15 -15
  293. package/index313.js +1 -1
  294. package/index313.mjs +15 -15
  295. package/index314.js +1 -1
  296. package/index314.mjs +25 -16
  297. package/index315.js +1 -1
  298. package/index315.mjs +48 -16
  299. package/index316.js +1 -1
  300. package/index316.mjs +6 -16
  301. package/index317.js +1 -1
  302. package/index317.mjs +6 -16
  303. package/index318.js +1 -1
  304. package/index318.mjs +15 -16
  305. package/index319.js +1 -1
  306. package/index319.mjs +25 -16
  307. package/index320.js +1 -1
  308. package/index320.mjs +29 -16
  309. package/index321.js +1 -1
  310. package/index321.mjs +32 -16
  311. package/index322.js +1 -1
  312. package/index322.mjs +29 -16
  313. package/index323.js +1 -1
  314. package/index323.mjs +10 -16
  315. package/index324.js +1 -1
  316. package/index324.mjs +6 -16
  317. package/index325.js +1 -1
  318. package/index325.mjs +8 -16
  319. package/index326.js +1 -1
  320. package/index326.mjs +14 -16
  321. package/index327.js +1 -1
  322. package/index327.mjs +9 -16
  323. package/index328.js +1 -1
  324. package/index328.mjs +1 -1
  325. package/index329.js +1 -1
  326. package/index329.mjs +1 -1
  327. package/index331.js +1 -1
  328. package/index331.mjs +1 -1
  329. package/index332.js +1 -1
  330. package/index332.mjs +2 -2
  331. package/index333.js +1 -1
  332. package/index333.mjs +1 -1
  333. package/index337.js +1 -1
  334. package/index337.mjs +1 -1
  335. package/index338.js +1 -1
  336. package/index338.mjs +4 -7
  337. package/index339.js +1 -1
  338. package/index339.mjs +6 -68
  339. package/index340.js +1 -1
  340. package/index340.mjs +65 -27
  341. package/index341.js +1 -1
  342. package/index341.mjs +30 -6
  343. package/index342.js +1 -1
  344. package/index342.mjs +6 -6
  345. package/index343.js +1 -1
  346. package/index343.mjs +6 -20
  347. package/index344.js +1 -1
  348. package/index344.mjs +20 -3
  349. package/index345.js +1 -1
  350. package/index345.mjs +117 -5
  351. package/index346.js +1 -1
  352. package/index346.mjs +71 -117
  353. package/index347.js +1 -1
  354. package/index347.mjs +7 -71
  355. package/index348.js +1 -1
  356. package/index348.mjs +7 -7
  357. package/index349.js +1 -1
  358. package/index349.mjs +7 -7
  359. package/index350.js +1 -1
  360. package/index350.mjs +7 -7
  361. package/index351.js +1 -1
  362. package/index351.mjs +4 -4
  363. package/index352.js +1 -1
  364. package/index352.mjs +7 -7
  365. package/index353.js +1 -1
  366. package/index353.mjs +7 -7
  367. package/index354.js +1 -1
  368. package/index354.mjs +4 -4
  369. package/index355.js +1 -1
  370. package/index355.mjs +4 -4
  371. package/index356.js +1 -1
  372. package/index356.mjs +4 -4
  373. package/index357.js +1 -1
  374. package/index357.mjs +4 -4
  375. package/index358.js +1 -1
  376. package/index358.mjs +7 -7
  377. package/index359.js +1 -1
  378. package/index359.mjs +7 -7
  379. package/index360.js +1 -1
  380. package/index360.mjs +7 -7
  381. package/index361.js +1 -1
  382. package/index361.mjs +4 -4
  383. package/index362.js +1 -1
  384. package/index362.mjs +7 -7
  385. package/index363.js +1 -1
  386. package/index363.mjs +7 -7
  387. package/index364.js +1 -1
  388. package/index364.mjs +7 -7
  389. package/index365.js +1 -1
  390. package/index365.mjs +7 -7
  391. package/index366.js +1 -1
  392. package/index366.mjs +7 -7
  393. package/index367.js +1 -1
  394. package/index367.mjs +4 -4
  395. package/index368.js +1 -1
  396. package/index368.mjs +7 -7
  397. package/index369.js +1 -1
  398. package/index369.mjs +7 -7
  399. package/index370.js +1 -1
  400. package/index370.mjs +3 -3
  401. package/index371.js +1 -1
  402. package/index371.mjs +4 -4
  403. package/index372.js +1 -1
  404. package/index372.mjs +7 -7
  405. package/index373.js +1 -1
  406. package/index373.mjs +7 -7
  407. package/index374.js +1 -1
  408. package/index374.mjs +7 -7
  409. package/index375.js +1 -1
  410. package/index375.mjs +4 -4
  411. package/index376.js +1 -1
  412. package/index376.mjs +7 -7
  413. package/index377.js +1 -1
  414. package/index377.mjs +4 -4
  415. package/index378.js +1 -1
  416. package/index378.mjs +4 -4
  417. package/index379.js +1 -1
  418. package/index379.mjs +7 -7
  419. package/index380.js +1 -1
  420. package/index380.mjs +4 -4
  421. package/index381.js +1 -1
  422. package/index381.mjs +6 -8
  423. package/index99.js +1 -1
  424. package/index99.mjs +1 -1
  425. package/package.json +1 -1
package/index211.mjs CHANGED
@@ -1,119 +1,214 @@
1
- import { g as T } from "./index285.mjs";
2
- import { l as I, e as g } from "./index286.mjs";
3
- function A(h) {
4
- let {
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"
1
+ import { toCalendarDateTime as M, toAbsolute as h, epochFromDate as Y, fromAbsolute as $, toCalendar as i } from "./index170.mjs";
2
+ import { GregorianCalendar as Z } from "./index184.mjs";
3
+ const y = 36e5;
4
+ function k(e, r) {
5
+ let n = e.copy(), a = "hour" in n ? p(n, r) : 0;
6
+ x(n, r.years || 0), n.calendar.balanceYearMonth && n.calendar.balanceYearMonth(n, e), n.month += r.months || 0, D(n), v(n), n.day += (r.weeks || 0) * 7, n.day += r.days || 0, n.day += a, U(n), n.calendar.balanceDate && n.calendar.balanceDate(n), n.year < 1 && (n.year = 1, n.month = 1, n.day = 1);
7
+ let c = n.calendar.getYearsInEra(n);
8
+ if (n.year > c) {
9
+ var l, t;
10
+ let d = (l = (t = n.calendar).isInverseEra) === null || l === void 0 ? void 0 : l.call(t, n);
11
+ n.year = c, n.month = d ? 1 : n.calendar.getMonthsInYear(n), n.day = d ? 1 : n.calendar.getDaysInMonth(n);
12
+ }
13
+ n.month < 1 && (n.month = 1, n.day = 1);
14
+ let o = n.calendar.getMonthsInYear(n);
15
+ return n.month > o && (n.month = o, n.day = n.calendar.getDaysInMonth(n)), n.day = Math.max(1, Math.min(n.calendar.getDaysInMonth(n), n.day)), n;
16
+ }
17
+ function x(e, r) {
18
+ var n, a;
19
+ !((n = (a = e.calendar).isInverseEra) === null || n === void 0) && n.call(a, e) && (r = -r), e.year += r;
20
+ }
21
+ function D(e) {
22
+ for (; e.month < 1; )
23
+ x(e, -1), e.month += e.calendar.getMonthsInYear(e);
24
+ let r = 0;
25
+ for (; e.month > (r = e.calendar.getMonthsInYear(e)); )
26
+ e.month -= r, x(e, 1);
27
+ }
28
+ function U(e) {
29
+ for (; e.day < 1; )
30
+ e.month--, D(e), e.day += e.calendar.getDaysInMonth(e);
31
+ for (; e.day > e.calendar.getDaysInMonth(e); )
32
+ e.day -= e.calendar.getDaysInMonth(e), e.month++, D(e);
33
+ }
34
+ function v(e) {
35
+ e.month = Math.max(1, Math.min(e.calendar.getMonthsInYear(e), e.month)), e.day = Math.max(1, Math.min(e.calendar.getDaysInMonth(e), e.day));
36
+ }
37
+ function w(e) {
38
+ e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)), v(e);
39
+ }
40
+ function g(e) {
41
+ let r = {};
42
+ for (let n in e) typeof e[n] == "number" && (r[n] = -e[n]);
43
+ return r;
44
+ }
45
+ function q(e, r) {
46
+ return k(e, g(r));
47
+ }
48
+ function O(e, r) {
49
+ let n = e.copy();
50
+ return r.era != null && (n.era = r.era), r.year != null && (n.year = r.year), r.month != null && (n.month = r.month), r.day != null && (n.day = r.day), w(n), n;
51
+ }
52
+ function I(e, r) {
53
+ let n = e.copy();
54
+ return r.hour != null && (n.hour = r.hour), r.minute != null && (n.minute = r.minute), r.second != null && (n.second = r.second), r.millisecond != null && (n.millisecond = r.millisecond), N(n), n;
55
+ }
56
+ function F(e) {
57
+ e.second += Math.floor(e.millisecond / 1e3), e.millisecond = b(e.millisecond, 1e3), e.minute += Math.floor(e.second / 60), e.second = b(e.second, 60), e.hour += Math.floor(e.minute / 60), e.minute = b(e.minute, 60);
58
+ let r = Math.floor(e.hour / 24);
59
+ return e.hour = b(e.hour, 24), r;
60
+ }
61
+ function N(e) {
62
+ e.millisecond = Math.max(0, Math.min(e.millisecond, 1e3)), e.second = Math.max(0, Math.min(e.second, 59)), e.minute = Math.max(0, Math.min(e.minute, 59)), e.hour = Math.max(0, Math.min(e.hour, 23));
63
+ }
64
+ function b(e, r) {
65
+ let n = e % r;
66
+ return n < 0 && (n += r), n;
67
+ }
68
+ function p(e, r) {
69
+ return e.hour += r.hours || 0, e.minute += r.minutes || 0, e.second += r.seconds || 0, e.millisecond += r.milliseconds || 0, F(e);
70
+ }
71
+ function P(e, r) {
72
+ let n = e.copy();
73
+ return p(n, r), n;
74
+ }
75
+ function z(e, r) {
76
+ return P(e, g(r));
77
+ }
78
+ function V(e, r, n, a) {
79
+ let c = e.copy();
80
+ switch (r) {
81
+ case "era": {
82
+ let o = e.calendar.getEras(), d = o.indexOf(e.era);
83
+ if (d < 0) throw new Error("Invalid era: " + e.era);
84
+ d = s(d, n, 0, o.length - 1, a == null ? void 0 : a.round), c.era = o[d], w(c);
85
+ break;
16
86
  }
17
- });
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);
87
+ case "year":
88
+ var l, t;
89
+ !((l = (t = c.calendar).isInverseEra) === null || l === void 0) && l.call(t, c) && (n = -n), c.year = s(e.year, n, -1 / 0, 9999, a == null ? void 0 : a.round), c.year === -1 / 0 && (c.year = 1), c.calendar.balanceYearMonth && c.calendar.balanceYearMonth(c, e);
90
+ break;
91
+ case "month":
92
+ c.month = s(e.month, n, 1, e.calendar.getMonthsInYear(e), a == null ? void 0 : a.round);
93
+ break;
94
+ case "day":
95
+ c.day = s(e.day, n, 1, e.calendar.getDaysInMonth(e), a == null ? void 0 : a.round);
96
+ break;
97
+ default:
98
+ throw new Error("Unsupported field " + r);
29
99
  }
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;
100
+ return e.calendar.balanceDate && e.calendar.balanceDate(c), w(c), c;
101
+ }
102
+ function G(e, r, n, a) {
103
+ let c = e.copy();
104
+ switch (r) {
105
+ case "hour": {
106
+ let l = e.hour, t = 0, o = 23;
107
+ if ((a == null ? void 0 : a.hourCycle) === 12) {
108
+ let d = l >= 12;
109
+ t = d ? 12 : 0, o = d ? 23 : 11;
110
+ }
111
+ c.hour = s(l, n, t, o, a == null ? void 0 : a.round);
112
+ break;
51
113
  }
52
- return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass), e.thumbs.swiper.on("tap", x), !0;
114
+ case "minute":
115
+ c.minute = s(e.minute, n, 0, 59, a == null ? void 0 : a.round);
116
+ break;
117
+ case "second":
118
+ c.second = s(e.second, n, 0, 59, a == null ? void 0 : a.round);
119
+ break;
120
+ case "millisecond":
121
+ c.millisecond = s(e.millisecond, n, 0, 999, a == null ? void 0 : a.round);
122
+ break;
123
+ default:
124
+ throw new Error("Unsupported field " + r);
53
125
  }
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);
64
- });
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));
126
+ return c;
127
+ }
128
+ function s(e, r, n, a, c = !1) {
129
+ if (c) {
130
+ e += Math.sign(r), e < n && (e = a);
131
+ let l = Math.abs(r);
132
+ r > 0 ? e = Math.ceil(e / l) * l : e = Math.floor(e / l) * l, e > a && (e = n);
133
+ } else
134
+ e += r, e < n ? e = a - (n - e - 1) : e > a && (e = n + (e - a - 1));
135
+ return e;
136
+ }
137
+ function H(e, r) {
138
+ let n;
139
+ if (r.years != null && r.years !== 0 || r.months != null && r.months !== 0 || r.weeks != null && r.weeks !== 0 || r.days != null && r.days !== 0) {
140
+ let c = k(M(e), {
141
+ years: r.years,
142
+ months: r.months,
143
+ weeks: r.weeks,
144
+ days: r.days
145
+ });
146
+ n = h(c, e.timeZone);
147
+ } else
148
+ n = Y(e) - e.offset;
149
+ n += r.milliseconds || 0, n += (r.seconds || 0) * 1e3, n += (r.minutes || 0) * 6e4, n += (r.hours || 0) * 36e5;
150
+ let a = $(n, e.timeZone);
151
+ return i(a, e.calendar);
152
+ }
153
+ function B(e, r) {
154
+ return H(e, g(r));
155
+ }
156
+ function J(e, r, n, a) {
157
+ switch (r) {
158
+ case "hour": {
159
+ let c = 0, l = 23;
160
+ if ((a == null ? void 0 : a.hourCycle) === 12) {
161
+ let f = e.hour >= 12;
162
+ c = f ? 12 : 0, l = f ? 23 : 11;
163
+ }
164
+ let t = M(e), o = i(I(t, {
165
+ hour: c
166
+ }), new Z()), d = [
167
+ h(o, e.timeZone, "earlier"),
168
+ h(o, e.timeZone, "later")
169
+ ].filter((f) => $(f, e.timeZone).day === o.day)[0], m = i(I(t, {
170
+ hour: l
171
+ }), new Z()), E = [
172
+ h(m, e.timeZone, "earlier"),
173
+ h(m, e.timeZone, "later")
174
+ ].filter((f) => $(f, e.timeZone).day === m.day).pop(), u = Y(e) - e.offset, C = Math.floor(u / y), A = u % y;
175
+ return u = s(C, n, Math.floor(d / y), Math.floor(E / y), a == null ? void 0 : a.round) * y + A, i($(u, e.timeZone), e.calendar);
176
+ }
177
+ case "minute":
178
+ case "second":
179
+ case "millisecond":
180
+ return G(e, r, n, a);
181
+ case "era":
182
+ case "year":
183
+ case "month":
184
+ case "day": {
185
+ let c = V(M(e), r, n, a), l = h(c, e.timeZone);
186
+ return i($(l, e.timeZone), e.calendar);
78
187
  }
188
+ default:
189
+ throw new Error("Unsupported field " + r);
79
190
  }
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
115
- });
191
+ }
192
+ function K(e, r, n) {
193
+ let a = M(e), c = I(O(a, r), r);
194
+ if (c.compare(a) === 0) return e;
195
+ let l = h(c, e.timeZone, n);
196
+ return i($(l, e.timeZone), e.calendar);
116
197
  }
117
198
  export {
118
- A as default
199
+ k as add,
200
+ P as addTime,
201
+ H as addZoned,
202
+ w as constrain,
203
+ N as constrainTime,
204
+ V as cycleDate,
205
+ G as cycleTime,
206
+ J as cycleZoned,
207
+ g as invertDuration,
208
+ O as set,
209
+ I as setTime,
210
+ K as setZoned,
211
+ q as subtract,
212
+ z as subtractTime,
213
+ B as subtractZoned
119
214
  };
package/index212.js CHANGED
@@ -1 +1 @@
1
- "use strict";const m=require("./index286.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index170.js"),$=require("./index184.js");function e(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function n(t){let r=c.toCalendar(t,new $.GregorianCalendar),a;return r.era==="BC"?a=r.year===1?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):a=String(r.year).padStart(4,"0"),`${a}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function i(t){return`${n(t)}T${e(t)}`}function S(t){let r=Math.sign(t)<0?"-":"+";t=Math.abs(t);let a=Math.floor(t/36e5),o=t%36e5/6e4;return`${r}${String(a).padStart(2,"0")}:${String(o).padStart(2,"0")}`}function d(t){return`${i(t)}${S(t.offset)}[${t.timeZone}]`}exports.dateTimeToString=i;exports.dateToString=n;exports.timeToString=e;exports.zonedDateTimeToString=d;
package/index212.mjs CHANGED
@@ -1,125 +1,27 @@
1
- import { d as v, k as h } from "./index286.mjs";
2
- function z(g) {
3
- let {
4
- swiper: e,
5
- extendParams: x,
6
- emit: c,
7
- once: S
8
- } = g;
9
- x({
10
- freeMode: {
11
- enabled: !1,
12
- momentum: !0,
13
- momentumRatio: 1,
14
- momentumBounce: !0,
15
- momentumBounceRatio: 1,
16
- momentumVelocityRatio: 1,
17
- sticky: !1,
18
- minimumVelocity: 0.02
19
- }
20
- });
21
- function E() {
22
- if (e.params.cssMode) return;
23
- const s = e.getTranslate();
24
- e.setTranslate(s), e.setTransition(0), e.touchEventsData.velocities.length = 0, e.freeMode.onTouchEnd({
25
- currentPos: e.rtl ? e.translate : -e.translate
26
- });
27
- }
28
- function B() {
29
- if (e.params.cssMode) return;
30
- const {
31
- touchEventsData: s,
32
- touches: m
33
- } = e;
34
- s.velocities.length === 0 && s.velocities.push({
35
- position: m[e.isHorizontal() ? "startX" : "startY"],
36
- time: s.touchStartTime
37
- }), s.velocities.push({
38
- position: m[e.isHorizontal() ? "currentX" : "currentY"],
39
- time: v()
40
- });
41
- }
42
- function b(s) {
43
- let {
44
- currentPos: m
45
- } = s;
46
- if (e.params.cssMode) return;
47
- const {
48
- params: o,
49
- wrapperEl: f,
50
- rtlTranslate: p,
51
- snapGrid: a,
52
- touchEventsData: r
53
- } = e, w = v() - r.touchStartTime;
54
- if (m < -e.minTranslate()) {
55
- e.slideTo(e.activeIndex);
56
- return;
57
- }
58
- if (m > -e.maxTranslate()) {
59
- e.slides.length < a.length ? e.slideTo(a.length - 1) : e.slideTo(e.slides.length - 1);
60
- return;
61
- }
62
- if (o.freeMode.momentum) {
63
- if (r.velocities.length > 1) {
64
- const i = r.velocities.pop(), n = r.velocities.pop(), P = i.position - n.position, y = i.time - n.time;
65
- e.velocity = P / y, e.velocity /= 2, Math.abs(e.velocity) < o.freeMode.minimumVelocity && (e.velocity = 0), (y > 150 || v() - i.time > 300) && (e.velocity = 0);
66
- } else
67
- e.velocity = 0;
68
- e.velocity *= o.freeMode.momentumVelocityRatio, r.velocities.length = 0;
69
- let l = 1e3 * o.freeMode.momentumRatio;
70
- const D = e.velocity * l;
71
- let t = e.translate + D;
72
- p && (t = -t);
73
- let M = !1, u;
74
- const d = Math.abs(e.velocity) * 20 * o.freeMode.momentumBounceRatio;
75
- let T;
76
- if (t < e.maxTranslate())
77
- o.freeMode.momentumBounce ? (t + e.maxTranslate() < -d && (t = e.maxTranslate() - d), u = e.maxTranslate(), M = !0, r.allowMomentumBounce = !0) : t = e.maxTranslate(), o.loop && o.centeredSlides && (T = !0);
78
- else if (t > e.minTranslate())
79
- o.freeMode.momentumBounce ? (t - e.minTranslate() > d && (t = e.minTranslate() + d), u = e.minTranslate(), M = !0, r.allowMomentumBounce = !0) : t = e.minTranslate(), o.loop && o.centeredSlides && (T = !0);
80
- else if (o.freeMode.sticky) {
81
- let i;
82
- for (let n = 0; n < a.length; n += 1)
83
- if (a[n] > -t) {
84
- i = n;
85
- break;
86
- }
87
- Math.abs(a[i] - t) < Math.abs(a[i - 1] - t) || e.swipeDirection === "next" ? t = a[i] : t = a[i - 1], t = -t;
88
- }
89
- if (T && S("transitionEnd", () => {
90
- e.loopFix();
91
- }), e.velocity !== 0) {
92
- if (p ? l = Math.abs((-t - e.translate) / e.velocity) : l = Math.abs((t - e.translate) / e.velocity), o.freeMode.sticky) {
93
- const i = Math.abs((p ? -t : t) - e.translate), n = e.slidesSizesGrid[e.activeIndex];
94
- i < n ? l = o.speed : i < 2 * n ? l = o.speed * 1.5 : l = o.speed * 2.5;
95
- }
96
- } else if (o.freeMode.sticky) {
97
- e.slideToClosest();
98
- return;
99
- }
100
- o.freeMode.momentumBounce && M ? (e.updateProgress(u), e.setTransition(l), e.setTranslate(t), e.transitionStart(!0, e.swipeDirection), e.animating = !0, h(f, () => {
101
- !e || e.destroyed || !r.allowMomentumBounce || (c("momentumBounce"), e.setTransition(o.speed), setTimeout(() => {
102
- e.setTranslate(u), h(f, () => {
103
- !e || e.destroyed || e.transitionEnd();
104
- });
105
- }, 0));
106
- })) : e.velocity ? (c("_freeModeNoMomentumRelease"), e.updateProgress(t), e.setTransition(l), e.setTranslate(t), e.transitionStart(!0, e.swipeDirection), e.animating || (e.animating = !0, h(f, () => {
107
- !e || e.destroyed || e.transitionEnd();
108
- }))) : e.updateProgress(t), e.updateActiveIndex(), e.updateSlidesClasses();
109
- } else if (o.freeMode.sticky) {
110
- e.slideToClosest();
111
- return;
112
- } else o.freeMode && c("_freeModeNoMomentumRelease");
113
- (!o.freeMode.momentum || w >= o.longSwipesMs) && (c("_freeModeStaticRelease"), e.updateProgress(), e.updateActiveIndex(), e.updateSlidesClasses());
114
- }
115
- Object.assign(e, {
116
- freeMode: {
117
- onTouchStart: E,
118
- onTouchMove: B,
119
- onTouchEnd: b
120
- }
121
- });
1
+ import { toCalendar as n } from "./index170.mjs";
2
+ import { GregorianCalendar as $ } from "./index184.mjs";
3
+ function i(a) {
4
+ return `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}:${String(a.second).padStart(2, "0")}${a.millisecond ? String(a.millisecond / 1e3).slice(1) : ""}`;
5
+ }
6
+ function o(a) {
7
+ let t = n(a, new $()), r;
8
+ return t.era === "BC" ? r = t.year === 1 ? "0000" : "-" + String(Math.abs(1 - t.year)).padStart(6, "00") : r = String(t.year).padStart(4, "0"), `${r}-${String(t.month).padStart(2, "0")}-${String(t.day).padStart(2, "0")}`;
9
+ }
10
+ function f(a) {
11
+ return `${o(a)}T${i(a)}`;
12
+ }
13
+ function c(a) {
14
+ let t = Math.sign(a) < 0 ? "-" : "+";
15
+ a = Math.abs(a);
16
+ let r = Math.floor(a / 36e5), e = a % 36e5 / 6e4;
17
+ return `${t}${String(r).padStart(2, "0")}:${String(e).padStart(2, "0")}`;
18
+ }
19
+ function g(a) {
20
+ return `${f(a)}${c(a.offset)}[${a.timeZone}]`;
122
21
  }
123
22
  export {
124
- z as default
23
+ f as dateTimeToString,
24
+ o as dateToString,
25
+ i as timeToString,
26
+ g as zonedDateTimeToString
125
27
  };
package/index213.js CHANGED
@@ -1 +1 @@
1
- "use strict";function B(x){let{swiper:e,extendParams:C,on:w}=x;C({grid:{rows:1,fill:"column"}});let c,h,f,g;const M=()=>{let t=e.params.spaceBetween;return typeof t=="string"&&t.indexOf("%")>=0?t=parseFloat(t.replace("%",""))/100*e.size:typeof t=="string"&&(t=parseFloat(t)),t},L=t=>{const{slidesPerView:s}=e.params,{rows:i,fill:a}=e.params.grid,l=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:t.length;f=Math.floor(l/i),Math.floor(l/i)===l/i?c=l:c=Math.ceil(l/i)*i,s!=="auto"&&a==="row"&&(c=Math.max(c,s*i)),h=c/i},y=()=>{e.slides&&e.slides.forEach(t=>{t.swiperSlideGridSet&&(t.style.height="",t.style[e.getDirectionLabel("margin-top")]="")})},$=(t,s,i)=>{const{slidesPerGroup:a}=e.params,l=M(),{rows:r,fill:u}=e.params.grid,d=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:i.length;let p,n,o;if(u==="row"&&a>1){const m=Math.floor(t/(a*r)),S=t-r*a*m,v=m===0?a:Math.min(Math.ceil((d-m*r*a)/r),a);o=Math.floor(S/v),n=S-o*v+m*a,p=n+o*c/r,s.style.order=p}else u==="column"?(n=Math.floor(t/r),o=t-n*r,(n>f||n===f&&o===r-1)&&(o+=1,o>=r&&(o=0,n+=1))):(o=Math.floor(t/h),n=t-o*h);s.row=o,s.column=n,s.style.height=`calc((100% - ${(r-1)*l}px) / ${r})`,s.style[e.getDirectionLabel("margin-top")]=o!==0?l&&`${l}px`:"",s.swiperSlideGridSet=!0},z=(t,s)=>{const{centeredSlides:i,roundLengths:a}=e.params,l=M(),{rows:r}=e.params.grid;if(e.virtualSize=(t+l)*c,e.virtualSize=Math.ceil(e.virtualSize/r)-l,e.params.cssMode||(e.wrapperEl.style[e.getDirectionLabel("width")]=`${e.virtualSize+l}px`),i){const u=[];for(let d=0;d<s.length;d+=1){let p=s[d];a&&(p=Math.floor(p)),s[d]<e.virtualSize+s[0]&&u.push(p)}s.splice(0,s.length),s.push(...u)}},I=()=>{g=e.params.grid&&e.params.grid.rows>1},b=()=>{const{params:t,el:s}=e,i=t.grid&&t.grid.rows>1;g&&!i?(s.classList.remove(`${t.containerModifierClass}grid`,`${t.containerModifierClass}grid-column`),f=1,e.emitContainerClasses()):!g&&i&&(s.classList.add(`${t.containerModifierClass}grid`),t.grid.fill==="column"&&s.classList.add(`${t.containerModifierClass}grid-column`),e.emitContainerClasses()),g=i};w("init",I),w("update",b),e.grid={initSlides:L,unsetSlides:y,updateSlide:$,updateWrapperSize:z}}module.exports=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index277.js");function _(e,t,i){r._(e,t),t.set(e,i)}exports._=_;
package/index213.mjs CHANGED
@@ -1,75 +1,7 @@
1
- function B(x) {
2
- let {
3
- swiper: e,
4
- extendParams: C,
5
- on: w
6
- } = x;
7
- C({
8
- grid: {
9
- rows: 1,
10
- fill: "column"
11
- }
12
- });
13
- let c, h, f, g;
14
- const M = () => {
15
- let t = e.params.spaceBetween;
16
- return typeof t == "string" && t.indexOf("%") >= 0 ? t = parseFloat(t.replace("%", "")) / 100 * e.size : typeof t == "string" && (t = parseFloat(t)), t;
17
- }, L = (t) => {
18
- const {
19
- slidesPerView: s
20
- } = e.params, {
21
- rows: i,
22
- fill: a
23
- } = e.params.grid, l = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : t.length;
24
- f = Math.floor(l / i), Math.floor(l / i) === l / i ? c = l : c = Math.ceil(l / i) * i, s !== "auto" && a === "row" && (c = Math.max(c, s * i)), h = c / i;
25
- }, y = () => {
26
- e.slides && e.slides.forEach((t) => {
27
- t.swiperSlideGridSet && (t.style.height = "", t.style[e.getDirectionLabel("margin-top")] = "");
28
- });
29
- }, $ = (t, s, i) => {
30
- const {
31
- slidesPerGroup: a
32
- } = e.params, l = M(), {
33
- rows: r,
34
- fill: u
35
- } = e.params.grid, d = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : i.length;
36
- let p, n, o;
37
- if (u === "row" && a > 1) {
38
- const m = Math.floor(t / (a * r)), S = t - r * a * m, v = m === 0 ? a : Math.min(Math.ceil((d - m * r * a) / r), a);
39
- o = Math.floor(S / v), n = S - o * v + m * a, p = n + o * c / r, s.style.order = p;
40
- } else u === "column" ? (n = Math.floor(t / r), o = t - n * r, (n > f || n === f && o === r - 1) && (o += 1, o >= r && (o = 0, n += 1))) : (o = Math.floor(t / h), n = t - o * h);
41
- s.row = o, s.column = n, s.style.height = `calc((100% - ${(r - 1) * l}px) / ${r})`, s.style[e.getDirectionLabel("margin-top")] = o !== 0 ? l && `${l}px` : "", s.swiperSlideGridSet = !0;
42
- }, z = (t, s) => {
43
- const {
44
- centeredSlides: i,
45
- roundLengths: a
46
- } = e.params, l = M(), {
47
- rows: r
48
- } = e.params.grid;
49
- if (e.virtualSize = (t + l) * c, e.virtualSize = Math.ceil(e.virtualSize / r) - l, e.params.cssMode || (e.wrapperEl.style[e.getDirectionLabel("width")] = `${e.virtualSize + l}px`), i) {
50
- const u = [];
51
- for (let d = 0; d < s.length; d += 1) {
52
- let p = s[d];
53
- a && (p = Math.floor(p)), s[d] < e.virtualSize + s[0] && u.push(p);
54
- }
55
- s.splice(0, s.length), s.push(...u);
56
- }
57
- }, I = () => {
58
- g = e.params.grid && e.params.grid.rows > 1;
59
- }, b = () => {
60
- const {
61
- params: t,
62
- el: s
63
- } = e, i = t.grid && t.grid.rows > 1;
64
- g && !i ? (s.classList.remove(`${t.containerModifierClass}grid`, `${t.containerModifierClass}grid-column`), f = 1, e.emitContainerClasses()) : !g && i && (s.classList.add(`${t.containerModifierClass}grid`), t.grid.fill === "column" && s.classList.add(`${t.containerModifierClass}grid-column`), e.emitContainerClasses()), g = i;
65
- };
66
- w("init", I), w("update", b), e.grid = {
67
- initSlides: L,
68
- unsetSlides: y,
69
- updateSlide: $,
70
- updateWrapperSize: z
71
- };
1
+ import { _ as t } from "./index277.mjs";
2
+ function a(_, e, i) {
3
+ t(_, e), e.set(_, i);
72
4
  }
73
5
  export {
74
- B as default
6
+ a as _
75
7
  };
package/index214.js CHANGED
@@ -1 +1 @@
1
- "use strict";function a(o){const e=this,{params:t,slidesEl:p}=e;t.loop&&e.loopDestroy();const f=n=>{if(typeof n=="string"){const i=document.createElement("div");i.innerHTML=n,p.append(i.children[0]),i.innerHTML=""}else p.append(n)};if(typeof o=="object"&&"length"in o)for(let n=0;n<o.length;n+=1)o[n]&&f(o[n]);else f(o);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update()}function m(o){const e=this,{params:t,activeIndex:p,slidesEl:f}=e;t.loop&&e.loopDestroy();let n=p+1;const i=l=>{if(typeof l=="string"){const c=document.createElement("div");c.innerHTML=l,f.prepend(c.children[0]),c.innerHTML=""}else f.prepend(l)};if(typeof o=="object"&&"length"in o){for(let l=0;l<o.length;l+=1)o[l]&&i(o[l]);n=p+o.length}else i(o);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),e.slideTo(n,0,!1)}function h(o,e){const t=this,{params:p,activeIndex:f,slidesEl:n}=t;let i=f;p.loop&&(i-=t.loopedSlides,t.loopDestroy(),t.recalcSlides());const l=t.slides.length;if(o<=0){t.prependSlide(e);return}if(o>=l){t.appendSlide(e);return}let c=i>o?i+1:i;const s=[];for(let r=l-1;r>=o;r-=1){const d=t.slides[r];d.remove(),s.unshift(d)}if(typeof e=="object"&&"length"in e){for(let r=0;r<e.length;r+=1)e[r]&&n.append(e[r]);c=i>o?i+e.length:i}else n.append(e);for(let r=0;r<s.length;r+=1)n.append(s[r]);t.recalcSlides(),p.loop&&t.loopCreate(),(!p.observer||t.isElement)&&t.update(),p.loop?t.slideTo(c+t.loopedSlides,0,!1):t.slideTo(c,0,!1)}function v(o){const e=this,{params:t,activeIndex:p}=e;let f=p;t.loop&&(f-=e.loopedSlides,e.loopDestroy());let n=f,i;if(typeof o=="object"&&"length"in o){for(let l=0;l<o.length;l+=1)i=o[l],e.slides[i]&&e.slides[i].remove(),i<n&&(n-=1);n=Math.max(n,0)}else i=o,e.slides[i]&&e.slides[i].remove(),i<n&&(n-=1),n=Math.max(n,0);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),t.loop?e.slideTo(n+e.loopedSlides,0,!1):e.slideTo(n,0,!1)}function S(){const o=this,e=[];for(let t=0;t<o.slides.length;t+=1)e.push(t);o.removeSlide(e)}function u(o){let{swiper:e}=o;Object.assign(e,{appendSlide:a.bind(e),prependSlide:m.bind(e),addSlide:h.bind(e),removeSlide:v.bind(e),removeAllSlides:S.bind(e)})}module.exports=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(e,t){return e-t*Math.floor(e/t)}exports.mod=o;