@okam/stack-ui 1.41.0 → 1.41.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.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +169 -167
- package/index10.js +1 -1
- package/index10.mjs +1 -1
- package/index100.js +1 -2
- package/index100.mjs +24 -10
- package/index101.js +1 -1
- package/index101.mjs +9 -18
- package/index102.js +1 -1
- package/index102.mjs +15 -47
- package/index103.js +1 -1
- package/index103.mjs +47 -38
- package/index104.js +1 -1
- package/index104.mjs +39 -10
- package/index105.js +1 -1
- package/index105.mjs +10 -35
- package/index106.js +1 -1
- package/index106.mjs +35 -13
- package/index107.js +1 -1
- package/index107.mjs +10 -16
- package/index108.js +1 -1
- package/index108.mjs +22 -12
- package/index109.js +1 -1
- package/index109.mjs +21 -11
- package/index110.js +1 -1
- package/index110.mjs +13 -12
- package/index111.js +1 -1
- package/index111.mjs +11 -34
- package/index112.js +2 -1
- package/index112.mjs +37 -4
- package/index113.js +1 -1
- package/index113.mjs +4 -2
- package/index114.js +1 -6
- package/index114.mjs +2 -94
- package/index115.js +6 -1
- package/index115.mjs +79 -55
- package/index116.js +1 -1
- package/index116.mjs +62 -33
- package/index117.js +1 -42
- package/index117.mjs +34 -67
- package/index118.js +38 -60
- package/index118.mjs +65 -219
- package/index119.js +63 -9
- package/index119.mjs +214 -57
- package/index12.js +1 -1
- package/index12.mjs +3 -3
- package/index120.js +10 -1
- package/index120.mjs +61 -35
- package/index121.js +1 -1
- package/index121.mjs +40 -8
- package/index122.js +1 -6
- package/index122.mjs +10 -46
- package/index123.js +6 -5
- package/index123.mjs +44 -83
- package/index124.js +5 -1
- package/index124.mjs +88 -6
- package/index125.js +1 -12
- package/index125.mjs +6 -40
- package/index126.js +12 -1
- package/index126.mjs +34 -83
- package/index127.js +1 -1
- package/index127.mjs +88 -12
- package/index128.js +1 -1
- package/index128.mjs +13 -29
- package/index129.js +1 -1
- package/index129.mjs +24 -8
- package/index13.js +1 -1
- package/index13.mjs +3 -3
- package/index130.js +1 -7
- package/index130.mjs +7 -13
- package/index131.js +6 -14
- package/index131.mjs +13 -65
- package/index132.js +15 -1
- package/index132.mjs +71 -7
- package/index133.js +1 -41
- package/index133.mjs +7 -106
- package/index134.js +32 -38
- package/index134.mjs +78 -74
- package/index135.js +46 -15
- package/index135.mjs +96 -19
- package/index136.js +16 -1
- package/index136.mjs +20 -37
- package/index137.js +1 -2
- package/index137.mjs +42 -49
- package/index138.js +2 -1
- package/index138.mjs +48 -22
- package/index139.js +1 -2
- package/index139.mjs +22 -8
- package/index14.js +1 -1
- package/index14.mjs +2 -2
- package/index140.js +1 -1
- package/index140.mjs +7 -11
- package/index141.js +1 -1
- package/index141.mjs +11 -13
- package/index142.js +1 -1
- package/index142.mjs +240 -52
- package/index143.js +1 -1
- package/index143.mjs +52 -4
- package/index144.js +1 -1
- package/index144.mjs +4 -11
- package/index145.js +1 -1
- package/index145.mjs +11 -14
- package/index146.js +1 -2
- package/index146.mjs +13 -38
- package/index147.js +1 -1
- package/index147.mjs +35 -20
- package/index148.js +2 -1
- package/index148.mjs +23 -43
- package/index149.js +1 -1
- package/index149.mjs +42 -18
- package/index15.js +1 -1
- package/index15.mjs +1 -1
- package/index150.js +1 -1
- package/index150.mjs +18 -36
- package/index151.js +1 -1
- package/index151.mjs +35 -13
- package/index152.js +1 -1
- package/index152.mjs +13 -237
- package/index154.js +1 -1
- package/index154.mjs +2 -2
- package/index155.js +1 -1
- package/index155.mjs +2 -2
- package/index157.js +1 -1
- package/index157.mjs +2 -2
- package/index158.js +1 -1
- package/index158.mjs +1 -1
- package/index159.js +1 -1
- package/index159.mjs +2 -2
- package/index16.js +1 -1
- package/index16.mjs +1 -1
- package/index160.js +1 -1
- package/index160.mjs +6 -6
- package/index161.js +1 -1
- package/index161.mjs +3 -3
- package/index162.js +1 -1
- package/index162.mjs +9 -9
- package/index163.js +1 -1
- package/index163.mjs +3 -3
- package/index164.js +1 -1
- package/index164.mjs +2 -2
- package/index165.js +1 -1
- package/index165.mjs +1 -1
- package/index167.js +1 -1
- package/index167.mjs +1 -1
- package/index168.js +1 -1
- package/index168.mjs +2 -2
- package/index169.js +1 -1
- package/index169.mjs +1 -1
- package/index17.js +1 -1
- package/index17.mjs +3 -3
- package/index170.js +1 -1
- package/index170.mjs +3 -3
- package/index171.js +1 -1
- package/index171.mjs +1 -1
- package/index172.js +1 -1
- package/index172.mjs +4 -4
- package/index173.js +1 -1
- package/index173.mjs +1 -1
- package/index174.js +1 -1
- package/index174.mjs +2 -2
- package/index175.js +1 -1
- package/index175.mjs +4 -4
- package/index177.js +1 -1
- package/index177.mjs +3 -3
- package/index178.js +1 -1
- package/index178.mjs +23 -23
- package/index179.js +1 -1
- package/index179.mjs +1 -1
- package/index18.js +1 -1
- package/index18.mjs +1 -1
- package/index180.js +1 -1
- package/index180.mjs +2025 -5
- package/index181.js +1 -2
- package/index181.mjs +58 -48
- package/index182.js +1 -1
- package/index182.mjs +188 -11
- package/index183.js +1 -1
- package/index183.mjs +5 -203
- package/index184.js +2 -1
- package/index184.mjs +47 -62
- package/index185.js +1 -1
- package/index185.mjs +9 -141
- package/index186.js +1 -1
- package/index186.mjs +189 -110
- package/index187.js +1 -1
- package/index187.mjs +53 -213
- package/index188.js +1 -1
- package/index188.mjs +129 -176
- package/index189.js +1 -1
- package/index189.mjs +116 -61
- package/index19.js +1 -1
- package/index19.mjs +2 -2
- package/index190.js +1 -1
- package/index190.mjs +210 -265
- package/index191.js +1 -1
- package/index191.mjs +180 -88
- package/index192.js +1 -1
- package/index192.mjs +60 -179
- package/index193.js +1 -1
- package/index193.mjs +266 -71
- package/index194.js +1 -1
- package/index194.mjs +92 -52
- package/index195.js +1 -1
- package/index195.mjs +182 -120
- package/index196.js +1 -1
- package/index196.mjs +76 -108
- package/index197.js +1 -1
- package/index197.mjs +50 -114
- package/index198.js +1 -1
- package/index198.mjs +118 -64
- package/index199.js +1 -1
- package/index199.mjs +111 -105
- package/index2.js +1 -1
- package/index2.mjs +25 -25
- package/index20.js +1 -1
- package/index20.mjs +13 -47
- package/index200.js +1 -1
- package/index200.mjs +117 -47
- package/index201.js +1 -1
- package/index201.mjs +67 -88
- package/index202.js +1 -1
- package/index202.mjs +108 -68
- package/index203.js +1 -1
- package/index203.mjs +41 -45
- package/index204.js +1 -1
- package/index204.mjs +77 -83
- package/index205.js +1 -5
- package/index205.mjs +49 -59
- package/index206.js +1 -1
- package/index206.mjs +55 -123
- package/index207.js +1 -1
- package/index207.mjs +97 -132
- package/index208.js +5 -1
- package/index208.mjs +80 -44
- package/index209.js +1 -1
- package/index209.mjs +128 -12
- package/index21.js +1 -1
- package/index21.mjs +47 -18
- package/index210.js +1 -1
- package/index210.mjs +184 -89
- package/index211.js +1 -1
- package/index211.mjs +121 -103
- package/index212.js +1 -1
- package/index212.mjs +134 -4
- package/index213.js +1 -1
- package/index213.mjs +44 -3
- package/index214.js +1 -1
- package/index214.mjs +12 -123
- package/index215.js +1 -1
- package/index215.mjs +84 -18
- package/index216.js +1 -1
- package/index216.mjs +101 -46
- package/index217.js +1 -1
- package/index217.mjs +4 -44
- package/index218.js +1 -1
- package/index218.mjs +3 -37
- package/index219.js +1 -1
- package/index219.mjs +114 -102
- package/index22.js +1 -1
- package/index22.mjs +18 -17
- package/index220.js +1 -1
- package/index220.mjs +21 -69
- package/index221.js +1 -1
- package/index221.mjs +36 -86
- package/index222.js +1 -1
- package/index222.mjs +45 -98
- package/index223.js +1 -1
- package/index223.mjs +28 -2016
- package/index224.js +1 -1
- package/index224.mjs +114 -60
- package/index225.js +1 -1
- package/index225.mjs +70 -181
- package/index226.js +1 -1
- package/index226.mjs +95 -119
- package/index227.js +1 -1
- package/index227.mjs +98 -74
- package/index228.js +1 -1
- package/index228.mjs +113 -369
- package/index229.js +1 -1
- package/index229.mjs +27 -46
- package/index23.js +1 -1
- package/index23.mjs +16 -165
- package/index230.js +1 -1
- package/index230.mjs +141 -4
- package/index231.js +1 -1
- package/index231.mjs +197 -24
- package/index232.js +1 -1
- package/index232.mjs +22 -47
- package/index233.js +1 -1
- package/index233.mjs +4 -6
- package/index234.js +1 -1
- package/index234.mjs +27 -23
- package/index235.js +1 -1
- package/index235.mjs +49 -12
- package/index236.js +1 -1
- package/index236.mjs +54 -4
- package/index237.js +1 -1
- package/index237.mjs +47 -13
- package/index238.js +1 -1
- package/index238.mjs +93 -38
- package/index239.js +1 -1
- package/index239.mjs +4 -56
- package/index24.js +1 -1
- package/index24.mjs +148 -93
- package/index240.js +1 -1
- package/index240.mjs +6 -41
- package/index241.js +1 -1
- package/index241.mjs +40 -27
- package/index242.js +1 -1
- package/index242.mjs +72 -32
- package/index244.js +1 -1
- package/index244.mjs +68 -10
- package/index245.js +1 -1
- package/index245.mjs +7 -28
- package/index246.js +1 -1
- package/index246.mjs +11 -9
- package/index247.js +1 -1
- package/index247.mjs +47 -6
- package/index248.js +1 -1
- package/index248.mjs +73 -5
- package/index249.js +1 -1
- package/index249.mjs +381 -7
- package/index25.js +1 -1
- package/index25.mjs +110 -115
- package/index250.js +1 -1
- package/index250.mjs +45 -28
- package/index251.js +1 -1
- package/index251.mjs +23 -17
- package/index252.js +1 -1
- package/index252.mjs +24 -13
- package/index253.js +1 -1
- package/index253.mjs +11 -42
- package/index254.js +1 -1
- package/index254.mjs +4 -8
- package/index255.js +1 -1
- package/index255.mjs +14 -17
- package/index256.js +1 -1
- package/index256.mjs +43 -3
- package/index257.js +1 -1
- package/index257.mjs +57 -4
- package/index258.js +1 -1
- package/index258.mjs +28 -19
- package/index259.js +1 -1
- package/index259.mjs +28 -51
- package/index26.js +1 -1
- package/index26.mjs +116 -31
- package/index260.js +1 -1
- package/index260.mjs +10 -27
- package/index261.js +1 -1
- package/index261.mjs +8 -139
- package/index262.js +1 -1
- package/index262.mjs +5 -197
- package/index263.js +1 -1
- package/index263.mjs +7 -22
- package/index264.js +1 -1
- package/index264.mjs +27 -47
- package/index265.js +1 -1
- package/index265.mjs +14 -44
- package/index266.js +1 -1
- package/index266.mjs +12 -96
- package/index267.js +1 -1
- package/index267.mjs +44 -72
- package/index268.js +1 -1
- package/index268.mjs +7 -67
- package/index269.js +1 -1
- package/index269.mjs +17 -7
- package/index27.js +1 -1
- package/index27.mjs +27 -104
- package/index270.js +1 -1
- package/index270.mjs +3 -12
- package/index271.js +1 -1
- package/index271.mjs +4 -5
- package/index272.js +1 -1
- package/index272.mjs +19 -121
- package/index273.js +1 -1
- package/index273.mjs +5 -43
- package/index274.js +1 -1
- package/index274.mjs +111 -220
- package/index275.js +1 -1
- package/index275.mjs +43 -31
- package/index276.js +1 -1
- package/index276.mjs +225 -125
- package/index277.js +1 -1
- package/index277.mjs +28 -187
- package/index278.js +1 -1
- package/index278.mjs +1 -1
- package/index28.js +1 -1
- package/index28.mjs +84 -122
- package/index281.js +1 -1
- package/index281.mjs +1 -1
- package/index282.js +1 -1
- package/index282.mjs +1 -1
- package/index283.js +1 -1
- package/index283.mjs +1 -1
- package/index29.js +1 -1
- package/index29.mjs +110 -124
- package/index3.js +1 -1
- package/index3.mjs +1 -1
- package/index30.js +1 -1
- package/index30.mjs +151 -102
- package/index31.js +1 -1
- package/index31.mjs +110 -22
- package/index32.js +1 -1
- package/index32.mjs +21 -68
- package/index320.js +1 -1
- package/index320.mjs +7 -63
- package/index321.js +1 -1
- package/index321.mjs +28 -7
- package/index322.js +1 -1
- package/index322.mjs +89 -24
- package/index323.js +1 -1
- package/index323.mjs +58 -88
- package/index326.js +1 -1
- package/index326.mjs +3 -3
- package/index329.js +1 -1
- package/index329.mjs +6 -6
- package/index33.js +1 -1
- package/index33.mjs +69 -147
- package/index330.js +1 -1
- package/index330.mjs +3 -3
- package/index331.js +1 -1
- package/index331.mjs +5 -5
- package/index332.js +1 -1
- package/index332.mjs +1 -1
- package/index336.js +1 -1
- package/index336.mjs +2 -2
- package/index337.js +1 -1
- package/index337.mjs +1 -1
- package/index338.js +1 -1
- package/index338.mjs +1 -1
- package/index34.js +1 -1
- package/index34.mjs +149 -20
- package/index342.js +1 -1
- package/index342.mjs +4 -166
- package/index344.js +1 -1
- package/index344.mjs +166 -4
- package/index35.js +1 -1
- package/index35.mjs +20 -59
- package/index36.js +1 -1
- package/index36.mjs +42 -33
- package/index37.js +1 -1
- package/index37.mjs +49 -19
- package/index38.js +1 -1
- package/index38.mjs +19 -32
- package/index39.js +1 -1
- package/index39.mjs +32 -23
- package/index4.js +1 -1
- package/index4.mjs +4 -4
- package/index40.js +1 -1
- package/index40.mjs +22 -12
- package/index41.js +1 -1
- package/index41.mjs +13 -31
- package/index42.js +1 -1
- package/index42.mjs +30 -31
- package/index43.js +1 -1
- package/index43.mjs +28 -121
- package/index44.js +1 -1
- package/index44.mjs +125 -8
- package/index45.js +1 -1
- package/index45.mjs +8 -46
- package/index46.js +1 -1
- package/index46.mjs +46 -17
- package/index47.js +1 -1
- package/index47.mjs +17 -6
- package/index48.js +1 -1
- package/index48.mjs +6 -20
- package/index49.js +1 -1
- package/index49.mjs +18 -32
- package/index50.js +1 -1
- package/index50.mjs +34 -39
- package/index51.js +1 -1
- package/index51.mjs +39 -48
- package/index52.js +1 -1
- package/index52.mjs +48 -39
- package/index53.js +1 -1
- package/index53.mjs +38 -26
- package/index54.js +1 -1
- package/index54.mjs +27 -18
- package/index55.js +1 -1
- package/index55.mjs +18 -111
- package/index56.js +1 -1
- package/index56.mjs +107 -52
- package/index57.js +1 -1
- package/index57.mjs +54 -38
- package/index58.js +1 -1
- package/index58.mjs +37 -61
- package/index59.js +1 -1
- package/index59.mjs +64 -72
- package/index6.js +1 -1
- package/index6.mjs +1 -1
- package/index60.js +2 -1
- package/index60.mjs +74 -5
- package/index61.js +1 -1
- package/index61.mjs +4 -7
- package/index62.js +1 -1
- package/index62.mjs +5 -5
- package/index63.js +1 -1
- package/index63.mjs +8 -5
- package/index64.js +1 -1
- package/index64.mjs +2 -2
- package/index65.js +1 -1
- package/index65.mjs +1 -1
- package/index66.js +1 -1
- package/index66.mjs +4 -4
- package/index67.js +1 -1
- package/index67.mjs +3 -9
- package/index68.js +1 -1
- package/index68.mjs +7 -9
- package/index69.js +1 -1
- package/index69.mjs +9 -9
- package/index7.js +1 -1
- package/index7.mjs +2 -2
- package/index70.js +1 -1
- package/index70.mjs +13 -46
- package/index71.js +1 -1
- package/index71.mjs +46 -8
- package/index72.js +1 -1
- package/index72.mjs +6 -69
- package/index73.js +1 -1
- package/index73.mjs +71 -8
- package/index74.js +1 -1
- package/index74.mjs +7 -12
- package/index75.js +1 -1
- package/index75.mjs +12 -9
- package/index76.js +1 -1
- package/index76.mjs +10 -17
- package/index77.js +1 -1
- package/index77.mjs +17 -13
- package/index78.js +1 -1
- package/index78.mjs +5 -5
- package/index79.js +1 -1
- package/index79.mjs +6 -6
- package/index8.js +1 -1
- package/index8.mjs +5 -5
- package/index80.js +1 -1
- package/index80.mjs +10 -8
- package/index81.js +1 -1
- package/index81.mjs +5 -5
- package/index82.js +1 -1
- package/index82.mjs +6 -8
- package/index83.js +1 -1
- package/index83.mjs +13 -14
- package/index84.js +1 -2
- package/index84.mjs +14 -23
- package/index85.js +1 -1
- package/index85.mjs +21 -15
- package/index86.js +1 -1
- package/index86.mjs +16 -14
- package/index87.js +1 -1
- package/index87.mjs +13 -45
- package/index88.js +1 -1
- package/index88.mjs +44 -36
- package/index89.js +1 -1
- package/index89.mjs +37 -11
- package/index9.js +1 -1
- package/index9.mjs +4 -4
- package/index90.js +1 -1
- package/index90.mjs +11 -10
- package/index91.js +1 -1
- package/index91.mjs +10 -13
- package/index92.js +1 -1
- package/index92.mjs +12 -43
- package/index93.js +1 -1
- package/index93.mjs +43 -28
- package/index94.js +2 -1
- package/index94.mjs +31 -2
- package/index95.js +1 -2
- package/index95.mjs +2 -9
- package/index96.js +1 -1
- package/index96.mjs +7 -6
- package/index97.js +1 -1
- package/index97.mjs +6 -6
- package/index98.js +1 -1
- package/index98.mjs +6 -6
- package/index99.js +2 -1
- package/index99.mjs +8 -25
- package/package.json +1 -1
package/index186.mjs
CHANGED
|
@@ -1,127 +1,206 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
1
|
+
import { g as q } from "./index209.mjs";
|
|
2
|
+
import { s as J, e as K, c as I } from "./index210.mjs";
|
|
3
|
+
function X(U) {
|
|
4
4
|
let {
|
|
5
|
-
swiper:
|
|
6
|
-
extendParams:
|
|
7
|
-
on:
|
|
8
|
-
emit:
|
|
9
|
-
} =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
swiper: e,
|
|
6
|
+
extendParams: z,
|
|
7
|
+
on: M,
|
|
8
|
+
emit: T
|
|
9
|
+
} = U;
|
|
10
|
+
z({
|
|
11
|
+
virtual: {
|
|
12
|
+
enabled: !1,
|
|
13
|
+
slides: [],
|
|
14
|
+
cache: !0,
|
|
15
|
+
renderSlide: null,
|
|
16
|
+
renderExternal: null,
|
|
17
|
+
renderExternalUpdate: !0,
|
|
18
|
+
addSlidesBefore: 0,
|
|
19
|
+
addSlidesAfter: 0
|
|
19
20
|
}
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
});
|
|
22
|
+
let C;
|
|
23
|
+
const B = q();
|
|
24
|
+
e.virtual = {
|
|
25
|
+
cache: {},
|
|
26
|
+
from: void 0,
|
|
27
|
+
to: void 0,
|
|
28
|
+
slides: [],
|
|
29
|
+
offset: 0,
|
|
30
|
+
slidesGrid: []
|
|
23
31
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
e && (e.classList[n ? "add" : "remove"](...t.disabledClass.split(" ")), e.tagName === "BUTTON" && (e.disabled = n), a.params.watchOverflow && a.enabled && e.classList[a.isLocked ? "add" : "remove"](t.lockClass));
|
|
32
|
-
});
|
|
32
|
+
const $ = B.createElement("div");
|
|
33
|
+
function G(i, a) {
|
|
34
|
+
const r = e.params.virtual;
|
|
35
|
+
if (r.cache && e.virtual.cache[a])
|
|
36
|
+
return e.virtual.cache[a];
|
|
37
|
+
let s;
|
|
38
|
+
return r.renderSlide ? (s = r.renderSlide.call(e, i, a), typeof s == "string" && ($.innerHTML = s, s = $.children[0])) : e.isElement ? s = I("swiper-slide") : s = I("div", e.params.slideClass), s.setAttribute("data-swiper-slide-index", a), r.renderSlide || (s.innerHTML = i), r.cache && (e.virtual.cache[a] = s), s;
|
|
33
39
|
}
|
|
34
|
-
function
|
|
40
|
+
function o(i, a) {
|
|
41
|
+
const {
|
|
42
|
+
slidesPerView: r,
|
|
43
|
+
slidesPerGroup: s,
|
|
44
|
+
centeredSlides: d,
|
|
45
|
+
loop: n,
|
|
46
|
+
initialSlide: w
|
|
47
|
+
} = e.params;
|
|
48
|
+
if (a && !n && w > 0)
|
|
49
|
+
return;
|
|
35
50
|
const {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} =
|
|
39
|
-
|
|
40
|
-
|
|
51
|
+
addSlidesBefore: m,
|
|
52
|
+
addSlidesAfter: g
|
|
53
|
+
} = e.params.virtual, {
|
|
54
|
+
from: P,
|
|
55
|
+
to: E,
|
|
56
|
+
slides: c,
|
|
57
|
+
slidesGrid: F,
|
|
58
|
+
offset: N
|
|
59
|
+
} = e.virtual;
|
|
60
|
+
e.params.cssMode || e.updateActiveIndex();
|
|
61
|
+
const b = e.activeIndex || 0;
|
|
62
|
+
let A;
|
|
63
|
+
e.rtlTranslate ? A = "right" : A = e.isHorizontal() ? "left" : "top";
|
|
64
|
+
let x, f;
|
|
65
|
+
d ? (x = Math.floor(r / 2) + s + g, f = Math.floor(r / 2) + s + m) : (x = r + (s - 1) + g, f = (n ? r : s) + m);
|
|
66
|
+
let u = b - f, p = b + x;
|
|
67
|
+
n || (u = Math.max(u, 0), p = Math.min(p, c.length - 1));
|
|
68
|
+
let h = (e.slidesGrid[u] || 0) - (e.slidesGrid[0] || 0);
|
|
69
|
+
n && b >= f ? (u -= f, d || (h += e.slidesGrid[0])) : n && b < f && (u = -f, d && (h += e.slidesGrid[0])), Object.assign(e.virtual, {
|
|
70
|
+
from: u,
|
|
71
|
+
to: p,
|
|
72
|
+
offset: h,
|
|
73
|
+
slidesGrid: e.slidesGrid,
|
|
74
|
+
slidesBefore: f,
|
|
75
|
+
slidesAfter: x
|
|
76
|
+
});
|
|
77
|
+
function j() {
|
|
78
|
+
e.updateSlides(), e.updateProgress(), e.updateSlidesClasses(), T("virtualUpdate");
|
|
79
|
+
}
|
|
80
|
+
if (P === u && E === p && !i) {
|
|
81
|
+
e.slidesGrid !== F && h !== N && e.slides.forEach((t) => {
|
|
82
|
+
t.style[A] = `${h - Math.abs(e.cssOverflowAdjustment())}px`;
|
|
83
|
+
}), e.updateProgress(), T("virtualUpdate");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (e.params.virtual.renderExternal) {
|
|
87
|
+
e.params.virtual.renderExternal.call(e, {
|
|
88
|
+
offset: h,
|
|
89
|
+
from: u,
|
|
90
|
+
to: p,
|
|
91
|
+
slides: function() {
|
|
92
|
+
const l = [];
|
|
93
|
+
for (let v = u; v <= p; v += 1)
|
|
94
|
+
l.push(c[v]);
|
|
95
|
+
return l;
|
|
96
|
+
}()
|
|
97
|
+
}), e.params.virtual.renderExternalUpdate ? j() : T("virtualUpdate");
|
|
41
98
|
return;
|
|
42
99
|
}
|
|
43
|
-
|
|
100
|
+
const S = [], O = [], y = (t) => {
|
|
101
|
+
let l = t;
|
|
102
|
+
return t < 0 ? l = c.length + t : l >= c.length && (l = l - c.length), l;
|
|
103
|
+
};
|
|
104
|
+
if (i)
|
|
105
|
+
e.slides.filter((t) => t.matches(`.${e.params.slideClass}, swiper-slide`)).forEach((t) => {
|
|
106
|
+
t.remove();
|
|
107
|
+
});
|
|
108
|
+
else
|
|
109
|
+
for (let t = P; t <= E; t += 1)
|
|
110
|
+
if (t < u || t > p) {
|
|
111
|
+
const l = y(t);
|
|
112
|
+
e.slides.filter((v) => v.matches(`.${e.params.slideClass}[data-swiper-slide-index="${l}"], swiper-slide[data-swiper-slide-index="${l}"]`)).forEach((v) => {
|
|
113
|
+
v.remove();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const R = n ? -c.length : 0, _ = n ? c.length * 2 : c.length;
|
|
117
|
+
for (let t = R; t < _; t += 1)
|
|
118
|
+
if (t >= u && t <= p) {
|
|
119
|
+
const l = y(t);
|
|
120
|
+
typeof E > "u" || i ? O.push(l) : (t > E && O.push(l), t < P && S.push(l));
|
|
121
|
+
}
|
|
122
|
+
if (O.forEach((t) => {
|
|
123
|
+
e.slidesEl.append(G(c[t], t));
|
|
124
|
+
}), n)
|
|
125
|
+
for (let t = S.length - 1; t >= 0; t -= 1) {
|
|
126
|
+
const l = S[t];
|
|
127
|
+
e.slidesEl.prepend(G(c[l], l));
|
|
128
|
+
}
|
|
129
|
+
else
|
|
130
|
+
S.sort((t, l) => l - t), S.forEach((t) => {
|
|
131
|
+
e.slidesEl.prepend(G(c[t], t));
|
|
132
|
+
});
|
|
133
|
+
K(e.slidesEl, ".swiper-slide, swiper-slide").forEach((t) => {
|
|
134
|
+
t.style[A] = `${h - Math.abs(e.cssOverflowAdjustment())}px`;
|
|
135
|
+
}), j();
|
|
44
136
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
137
|
+
function H(i) {
|
|
138
|
+
if (typeof i == "object" && "length" in i)
|
|
139
|
+
for (let a = 0; a < i.length; a += 1)
|
|
140
|
+
i[a] && e.virtual.slides.push(i[a]);
|
|
141
|
+
else
|
|
142
|
+
e.virtual.slides.push(i);
|
|
143
|
+
o(!0);
|
|
47
144
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
145
|
+
function L(i) {
|
|
146
|
+
const a = e.activeIndex;
|
|
147
|
+
let r = a + 1, s = 1;
|
|
148
|
+
if (Array.isArray(i)) {
|
|
149
|
+
for (let d = 0; d < i.length; d += 1)
|
|
150
|
+
i[d] && e.virtual.slides.unshift(i[d]);
|
|
151
|
+
r = a + i.length, s = i.length;
|
|
152
|
+
} else
|
|
153
|
+
e.virtual.slides.unshift(i);
|
|
154
|
+
if (e.params.virtual.cache) {
|
|
155
|
+
const d = e.virtual.cache, n = {};
|
|
156
|
+
Object.keys(d).forEach((w) => {
|
|
157
|
+
const m = d[w], g = m.getAttribute("data-swiper-slide-index");
|
|
158
|
+
g && m.setAttribute("data-swiper-slide-index", parseInt(g, 10) + s), n[parseInt(w, 10) + s] = m;
|
|
159
|
+
}), e.virtual.cache = n;
|
|
160
|
+
}
|
|
161
|
+
o(!0), e.slideTo(r, 0);
|
|
50
162
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
n.forEach((s) => e(s, "next")), t.forEach((s) => e(s, "prev"));
|
|
163
|
+
function V(i) {
|
|
164
|
+
if (typeof i > "u" || i === null) return;
|
|
165
|
+
let a = e.activeIndex;
|
|
166
|
+
if (Array.isArray(i))
|
|
167
|
+
for (let r = i.length - 1; r >= 0; r -= 1)
|
|
168
|
+
e.params.virtual.cache && (delete e.virtual.cache[i[r]], Object.keys(e.virtual.cache).forEach((s) => {
|
|
169
|
+
s > i && (e.virtual.cache[s - 1] = e.virtual.cache[s], e.virtual.cache[s - 1].setAttribute("data-swiper-slide-index", s - 1), delete e.virtual.cache[s]);
|
|
170
|
+
})), e.virtual.slides.splice(i[r], 1), i[r] < a && (a -= 1), a = Math.max(a, 0);
|
|
171
|
+
else
|
|
172
|
+
e.params.virtual.cache && (delete e.virtual.cache[i], Object.keys(e.virtual.cache).forEach((r) => {
|
|
173
|
+
r > i && (e.virtual.cache[r - 1] = e.virtual.cache[r], e.virtual.cache[r - 1].setAttribute("data-swiper-slide-index", r - 1), delete e.virtual.cache[r]);
|
|
174
|
+
})), e.virtual.slides.splice(i, 1), i < a && (a -= 1), a = Math.max(a, 0);
|
|
175
|
+
o(!0), e.slideTo(a, 0);
|
|
66
176
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
nextEl: i,
|
|
70
|
-
prevEl: n
|
|
71
|
-
} = a.navigation;
|
|
72
|
-
i = l(i), n = l(n);
|
|
73
|
-
const t = (e, s) => {
|
|
74
|
-
e.removeEventListener("click", s === "next" ? h : E), e.classList.remove(...a.params.navigation.disabledClass.split(" "));
|
|
75
|
-
};
|
|
76
|
-
i.forEach((e) => t(e, "next")), n.forEach((e) => t(e, "prev"));
|
|
177
|
+
function D() {
|
|
178
|
+
e.virtual.slides = [], e.params.virtual.cache && (e.virtual.cache = {}), o(!0), e.slideTo(0, 0);
|
|
77
179
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
nextEl: i,
|
|
87
|
-
prevEl: n
|
|
88
|
-
} = a.navigation;
|
|
89
|
-
if (i = l(i), n = l(n), a.enabled) {
|
|
90
|
-
d();
|
|
91
|
-
return;
|
|
180
|
+
M("beforeInit", () => {
|
|
181
|
+
if (!e.params.virtual.enabled) return;
|
|
182
|
+
let i;
|
|
183
|
+
if (typeof e.passedParams.virtual.slides > "u") {
|
|
184
|
+
const a = [...e.slidesEl.children].filter((r) => r.matches(`.${e.params.slideClass}, swiper-slide`));
|
|
185
|
+
a && a.length && (e.virtual.slides = [...a], i = !0, a.forEach((r, s) => {
|
|
186
|
+
r.setAttribute("data-swiper-slide-index", s), e.virtual.cache[s] = r, r.remove();
|
|
187
|
+
}));
|
|
92
188
|
}
|
|
93
|
-
|
|
94
|
-
}),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (a.params.navigation.hideOnClick && !p) {
|
|
107
|
-
if (a.pagination && a.params.pagination && a.params.pagination.clickable && (a.pagination.el === s || a.pagination.el.contains(s))) return;
|
|
108
|
-
let o;
|
|
109
|
-
t.length ? o = t[0].classList.contains(a.params.navigation.hiddenClass) : e.length && (o = e[0].classList.contains(a.params.navigation.hiddenClass)), g(o === !0 ? "navigationShow" : "navigationHide"), [...t, ...e].filter((r) => !!r).forEach((r) => r.classList.toggle(a.params.navigation.hiddenClass));
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
const k = () => {
|
|
113
|
-
a.el.classList.remove(...a.params.navigation.navigationDisabledClass.split(" ")), v(), d();
|
|
114
|
-
}, b = () => {
|
|
115
|
-
a.el.classList.add(...a.params.navigation.navigationDisabledClass.split(" ")), m();
|
|
116
|
-
};
|
|
117
|
-
Object.assign(a.navigation, {
|
|
118
|
-
enable: k,
|
|
119
|
-
disable: b,
|
|
120
|
-
update: d,
|
|
121
|
-
init: v,
|
|
122
|
-
destroy: m
|
|
189
|
+
i || (e.virtual.slides = e.params.virtual.slides), e.classNames.push(`${e.params.containerModifierClass}virtual`), e.params.watchSlidesProgress = !0, e.originalParams.watchSlidesProgress = !0, o(!1, !0);
|
|
190
|
+
}), M("setTranslate", () => {
|
|
191
|
+
e.params.virtual.enabled && (e.params.cssMode && !e._immediateVirtual ? (clearTimeout(C), C = setTimeout(() => {
|
|
192
|
+
o();
|
|
193
|
+
}, 100)) : o());
|
|
194
|
+
}), M("init update resize", () => {
|
|
195
|
+
e.params.virtual.enabled && e.params.cssMode && J(e.wrapperEl, "--swiper-virtual-size", `${e.virtualSize}px`);
|
|
196
|
+
}), Object.assign(e.virtual, {
|
|
197
|
+
appendSlide: H,
|
|
198
|
+
prependSlide: L,
|
|
199
|
+
removeSlide: V,
|
|
200
|
+
removeAllSlides: D,
|
|
201
|
+
update: o
|
|
123
202
|
});
|
|
124
203
|
}
|
|
125
204
|
export {
|
|
126
|
-
|
|
205
|
+
X as default
|
|
127
206
|
};
|
package/index187.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const P=require("./index209.js"),b=require("./index210.js");function U(V){let{swiper:e,extendParams:x,on:y,emit:L}=V;const a=P.g(),m=P.a();e.keyboard={enabled:!1},x({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}});function g(N){if(!e.enabled)return;const{rtlTranslate:l}=e;let t=N;t.originalEvent&&(t=t.originalEvent);const i=t.keyCode||t.charCode,h=e.params.keyboard.pageUpDown,r=h&&i===33,o=h&&i===34,d=i===37,f=i===39,c=i===38,u=i===40;if(!e.allowSlideNext&&(e.isHorizontal()&&f||e.isVertical()&&u||o)||!e.allowSlidePrev&&(e.isHorizontal()&&d||e.isVertical()&&c||r))return!1;if(!(t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)&&!(a.activeElement&&a.activeElement.nodeName&&(a.activeElement.nodeName.toLowerCase()==="input"||a.activeElement.nodeName.toLowerCase()==="textarea"))){if(e.params.keyboard.onlyInViewport&&(r||o||d||f||c||u)){let D=!1;if(b.a(e.el,`.${e.params.slideClass}, swiper-slide`).length>0&&b.a(e.el,`.${e.params.slideActiveClass}`).length===0)return;const p=e.el,E=p.clientWidth,C=p.clientHeight,A=m.innerWidth,K=m.innerHeight,n=b.b(p);l&&(n.left-=p.scrollLeft);const H=[[n.left,n.top],[n.left+E,n.top],[n.left,n.top+C],[n.left+E,n.top+C]];for(let w=0;w<H.length;w+=1){const s=H[w];if(s[0]>=0&&s[0]<=A&&s[1]>=0&&s[1]<=K){if(s[0]===0&&s[1]===0)continue;D=!0}}if(!D)return}e.isHorizontal()?((r||o||d||f)&&(t.preventDefault?t.preventDefault():t.returnValue=!1),((o||f)&&!l||(r||d)&&l)&&e.slideNext(),((r||d)&&!l||(o||f)&&l)&&e.slidePrev()):((r||o||c||u)&&(t.preventDefault?t.preventDefault():t.returnValue=!1),(o||u)&&e.slideNext(),(r||c)&&e.slidePrev()),L("keyPress",i)}}function v(){e.keyboard.enabled||(a.addEventListener("keydown",g),e.keyboard.enabled=!0)}function k(){e.keyboard.enabled&&(a.removeEventListener("keydown",g),e.keyboard.enabled=!1)}y("init",()=>{e.params.keyboard.enabled&&v()}),y("destroy",()=>{e.keyboard.enabled&&k()}),Object.assign(e.keyboard,{enable:v,disable:k})}module.exports=U;
|
package/index187.mjs
CHANGED
|
@@ -1,227 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
function N(I) {
|
|
1
|
+
import { g as K, a as U } from "./index209.mjs";
|
|
2
|
+
import { a as C, b as W } from "./index210.mjs";
|
|
3
|
+
function I(H) {
|
|
5
4
|
let {
|
|
6
5
|
swiper: e,
|
|
7
|
-
extendParams:
|
|
8
|
-
on:
|
|
9
|
-
emit:
|
|
10
|
-
} =
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
renderProgressbar: null,
|
|
20
|
-
renderFraction: null,
|
|
21
|
-
renderCustom: null,
|
|
22
|
-
progressbarOpposite: !1,
|
|
23
|
-
type: "bullets",
|
|
24
|
-
// 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
|
25
|
-
dynamicBullets: !1,
|
|
26
|
-
dynamicMainBullets: 1,
|
|
27
|
-
formatFractionCurrent: (a) => a,
|
|
28
|
-
formatFractionTotal: (a) => a,
|
|
29
|
-
bulletClass: `${d}-bullet`,
|
|
30
|
-
bulletActiveClass: `${d}-bullet-active`,
|
|
31
|
-
modifierClass: `${d}-`,
|
|
32
|
-
currentClass: `${d}-current`,
|
|
33
|
-
totalClass: `${d}-total`,
|
|
34
|
-
hiddenClass: `${d}-hidden`,
|
|
35
|
-
progressbarFillClass: `${d}-progressbar-fill`,
|
|
36
|
-
progressbarOppositeClass: `${d}-progressbar-opposite`,
|
|
37
|
-
clickableClass: `${d}-clickable`,
|
|
38
|
-
lockClass: `${d}-lock`,
|
|
39
|
-
horizontalClass: `${d}-horizontal`,
|
|
40
|
-
verticalClass: `${d}-vertical`,
|
|
41
|
-
paginationDisabledClass: `${d}-disabled`
|
|
6
|
+
extendParams: V,
|
|
7
|
+
on: b,
|
|
8
|
+
emit: x
|
|
9
|
+
} = H;
|
|
10
|
+
const o = K(), m = U();
|
|
11
|
+
e.keyboard = {
|
|
12
|
+
enabled: !1
|
|
13
|
+
}, V({
|
|
14
|
+
keyboard: {
|
|
15
|
+
enabled: !1,
|
|
16
|
+
onlyInViewport: !0,
|
|
17
|
+
pageUpDown: !0
|
|
42
18
|
}
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
let b, u = 0;
|
|
48
|
-
function k() {
|
|
49
|
-
return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
|
|
50
|
-
}
|
|
51
|
-
function x(a, s) {
|
|
19
|
+
});
|
|
20
|
+
function y(L) {
|
|
21
|
+
if (!e.enabled) return;
|
|
52
22
|
const {
|
|
53
|
-
|
|
54
|
-
} = e
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (
|
|
59
|
-
return
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
e.slideTo(i);
|
|
75
|
-
}
|
|
76
|
-
function h() {
|
|
77
|
-
const a = e.rtl, s = e.params.pagination;
|
|
78
|
-
if (k()) return;
|
|
79
|
-
let i = e.pagination.el;
|
|
80
|
-
i = m(i);
|
|
81
|
-
let t, p;
|
|
82
|
-
const C = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, z = e.params.loop ? Math.ceil(C / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
83
|
-
if (e.params.loop ? (p = e.previousRealIndex || 0, t = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (t = e.snapIndex, p = e.previousSnapIndex) : (p = e.previousIndex || 0, t = e.activeIndex || 0), s.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
|
|
84
|
-
const l = e.pagination.bullets;
|
|
85
|
-
let f, c, L;
|
|
86
|
-
if (s.dynamicBullets && (b = E(l[0], e.isHorizontal() ? "width" : "height"), i.forEach((n) => {
|
|
87
|
-
n.style[e.isHorizontal() ? "width" : "height"] = `${b * (s.dynamicMainBullets + 4)}px`;
|
|
88
|
-
}), s.dynamicMainBullets > 1 && p !== void 0 && (u += t - (p || 0), u > s.dynamicMainBullets - 1 ? u = s.dynamicMainBullets - 1 : u < 0 && (u = 0)), f = Math.max(t - u, 0), c = f + (Math.min(l.length, s.dynamicMainBullets) - 1), L = (c + f) / 2), l.forEach((n) => {
|
|
89
|
-
const r = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((o) => `${s.bulletActiveClass}${o}`)].map((o) => typeof o == "string" && o.includes(" ") ? o.split(" ") : o).flat();
|
|
90
|
-
n.classList.remove(...r);
|
|
91
|
-
}), i.length > 1)
|
|
92
|
-
l.forEach((n) => {
|
|
93
|
-
const r = S(n);
|
|
94
|
-
r === t ? n.classList.add(...s.bulletActiveClass.split(" ")) : e.isElement && n.setAttribute("part", "bullet"), s.dynamicBullets && (r >= f && r <= c && n.classList.add(...`${s.bulletActiveClass}-main`.split(" ")), r === f && x(n, "prev"), r === c && x(n, "next"));
|
|
95
|
-
});
|
|
96
|
-
else {
|
|
97
|
-
const n = l[t];
|
|
98
|
-
if (n && n.classList.add(...s.bulletActiveClass.split(" ")), e.isElement && l.forEach((r, o) => {
|
|
99
|
-
r.setAttribute("part", o === t ? "bullet-active" : "bullet");
|
|
100
|
-
}), s.dynamicBullets) {
|
|
101
|
-
const r = l[f], o = l[c];
|
|
102
|
-
for (let y = f; y <= c; y += 1)
|
|
103
|
-
l[y] && l[y].classList.add(...`${s.bulletActiveClass}-main`.split(" "));
|
|
104
|
-
x(r, "prev"), x(o, "next");
|
|
23
|
+
rtlTranslate: s
|
|
24
|
+
} = e;
|
|
25
|
+
let t = L;
|
|
26
|
+
t.originalEvent && (t = t.originalEvent);
|
|
27
|
+
const i = t.keyCode || t.charCode, k = e.params.keyboard.pageUpDown, r = k && i === 33, a = k && i === 34, d = i === 37, f = i === 39, c = i === 38, u = i === 40;
|
|
28
|
+
if (!e.allowSlideNext && (e.isHorizontal() && f || e.isVertical() && u || a) || !e.allowSlidePrev && (e.isHorizontal() && d || e.isVertical() && c || r))
|
|
29
|
+
return !1;
|
|
30
|
+
if (!(t.shiftKey || t.altKey || t.ctrlKey || t.metaKey) && !(o.activeElement && o.activeElement.nodeName && (o.activeElement.nodeName.toLowerCase() === "input" || o.activeElement.nodeName.toLowerCase() === "textarea"))) {
|
|
31
|
+
if (e.params.keyboard.onlyInViewport && (r || a || d || f || c || u)) {
|
|
32
|
+
let h = !1;
|
|
33
|
+
if (C(e.el, `.${e.params.slideClass}, swiper-slide`).length > 0 && C(e.el, `.${e.params.slideActiveClass}`).length === 0)
|
|
34
|
+
return;
|
|
35
|
+
const p = e.el, D = p.clientWidth, E = p.clientHeight, N = m.innerWidth, A = m.innerHeight, n = W(p);
|
|
36
|
+
s && (n.left -= p.scrollLeft);
|
|
37
|
+
const P = [[n.left, n.top], [n.left + D, n.top], [n.left, n.top + E], [n.left + D, n.top + E]];
|
|
38
|
+
for (let w = 0; w < P.length; w += 1) {
|
|
39
|
+
const l = P[w];
|
|
40
|
+
if (l[0] >= 0 && l[0] <= N && l[1] >= 0 && l[1] <= A) {
|
|
41
|
+
if (l[0] === 0 && l[1] === 0) continue;
|
|
42
|
+
h = !0;
|
|
43
|
+
}
|
|
105
44
|
}
|
|
45
|
+
if (!h) return;
|
|
106
46
|
}
|
|
107
|
-
|
|
108
|
-
const n = Math.min(l.length, s.dynamicMainBullets + 4), r = (b * n - b) / 2 - L * b, o = a ? "right" : "left";
|
|
109
|
-
l.forEach((y) => {
|
|
110
|
-
y.style[e.isHorizontal() ? o : "top"] = `${r}px`;
|
|
111
|
-
});
|
|
112
|
-
}
|
|
47
|
+
e.isHorizontal() ? ((r || a || d || f) && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), ((a || f) && !s || (r || d) && s) && e.slideNext(), ((r || d) && !s || (a || f) && s) && e.slidePrev()) : ((r || a || c || u) && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), (a || u) && e.slideNext(), (r || c) && e.slidePrev()), x("keyPress", i);
|
|
113
48
|
}
|
|
114
|
-
i.forEach((l, f) => {
|
|
115
|
-
if (s.type === "fraction" && (l.querySelectorAll($(s.currentClass)).forEach((c) => {
|
|
116
|
-
c.textContent = s.formatFractionCurrent(t + 1);
|
|
117
|
-
}), l.querySelectorAll($(s.totalClass)).forEach((c) => {
|
|
118
|
-
c.textContent = s.formatFractionTotal(z);
|
|
119
|
-
})), s.type === "progressbar") {
|
|
120
|
-
let c;
|
|
121
|
-
s.progressbarOpposite ? c = e.isHorizontal() ? "vertical" : "horizontal" : c = e.isHorizontal() ? "horizontal" : "vertical";
|
|
122
|
-
const L = (t + 1) / z;
|
|
123
|
-
let n = 1, r = 1;
|
|
124
|
-
c === "horizontal" ? n = L : r = L, l.querySelectorAll($(s.progressbarFillClass)).forEach((o) => {
|
|
125
|
-
o.style.transform = `translate3d(0,0,0) scaleX(${n}) scaleY(${r})`, o.style.transitionDuration = `${e.params.speed}ms`;
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
s.type === "custom" && s.renderCustom ? (l.innerHTML = s.renderCustom(e, t + 1, z), f === 0 && v("paginationRender", l)) : (f === 0 && v("paginationRender", l), v("paginationUpdate", l)), e.params.watchOverflow && e.enabled && l.classList[e.isLocked ? "add" : "remove"](s.lockClass);
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
function B() {
|
|
132
|
-
const a = e.params.pagination;
|
|
133
|
-
if (k()) return;
|
|
134
|
-
const s = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
|
|
135
|
-
let i = e.pagination.el;
|
|
136
|
-
i = m(i);
|
|
137
|
-
let t = "";
|
|
138
|
-
if (a.type === "bullets") {
|
|
139
|
-
let p = e.params.loop ? Math.ceil(s / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
140
|
-
e.params.freeMode && e.params.freeMode.enabled && p > s && (p = s);
|
|
141
|
-
for (let C = 0; C < p; C += 1)
|
|
142
|
-
a.renderBullet ? t += a.renderBullet.call(e, C, a.bulletClass) : t += `<${a.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${a.bulletClass}"></${a.bulletElement}>`;
|
|
143
|
-
}
|
|
144
|
-
a.type === "fraction" && (a.renderFraction ? t = a.renderFraction.call(e, a.currentClass, a.totalClass) : t = `<span class="${a.currentClass}"></span> / <span class="${a.totalClass}"></span>`), a.type === "progressbar" && (a.renderProgressbar ? t = a.renderProgressbar.call(e, a.progressbarFillClass) : t = `<span class="${a.progressbarFillClass}"></span>`), e.pagination.bullets = [], i.forEach((p) => {
|
|
145
|
-
a.type !== "custom" && (p.innerHTML = t || ""), a.type === "bullets" && e.pagination.bullets.push(...p.querySelectorAll($(a.bulletClass)));
|
|
146
|
-
}), a.type !== "custom" && v("paginationRender", i[0]);
|
|
147
49
|
}
|
|
148
|
-
function
|
|
149
|
-
e.
|
|
150
|
-
el: "swiper-pagination"
|
|
151
|
-
});
|
|
152
|
-
const a = e.params.pagination;
|
|
153
|
-
if (!a.el) return;
|
|
154
|
-
let s;
|
|
155
|
-
typeof a.el == "string" && e.isElement && (s = e.el.querySelector(a.el)), !s && typeof a.el == "string" && (s = [...document.querySelectorAll(a.el)]), s || (s = a.el), !(!s || s.length === 0) && (e.params.uniqueNavElements && typeof a.el == "string" && Array.isArray(s) && s.length > 1 && (s = [...e.el.querySelectorAll(a.el)], s.length > 1 && (s = s.filter((i) => T(i, ".swiper")[0] === e.el)[0])), Array.isArray(s) && s.length === 1 && (s = s[0]), Object.assign(e.pagination, {
|
|
156
|
-
el: s
|
|
157
|
-
}), s = m(s), s.forEach((i) => {
|
|
158
|
-
a.type === "bullets" && a.clickable && i.classList.add(...(a.clickableClass || "").split(" ")), i.classList.add(a.modifierClass + a.type), i.classList.add(e.isHorizontal() ? a.horizontalClass : a.verticalClass), a.type === "bullets" && a.dynamicBullets && (i.classList.add(`${a.modifierClass}${a.type}-dynamic`), u = 0, a.dynamicMainBullets < 1 && (a.dynamicMainBullets = 1)), a.type === "progressbar" && a.progressbarOpposite && i.classList.add(a.progressbarOppositeClass), a.clickable && i.addEventListener("click", D), e.enabled || i.classList.add(a.lockClass);
|
|
159
|
-
}));
|
|
50
|
+
function g() {
|
|
51
|
+
e.keyboard.enabled || (o.addEventListener("keydown", y), e.keyboard.enabled = !0);
|
|
160
52
|
}
|
|
161
|
-
function
|
|
162
|
-
|
|
163
|
-
if (k()) return;
|
|
164
|
-
let s = e.pagination.el;
|
|
165
|
-
s && (s = m(s), s.forEach((i) => {
|
|
166
|
-
i.classList.remove(a.hiddenClass), i.classList.remove(a.modifierClass + a.type), i.classList.remove(e.isHorizontal() ? a.horizontalClass : a.verticalClass), a.clickable && (i.classList.remove(...(a.clickableClass || "").split(" ")), i.removeEventListener("click", D));
|
|
167
|
-
})), e.pagination.bullets && e.pagination.bullets.forEach((i) => i.classList.remove(...a.bulletActiveClass.split(" ")));
|
|
53
|
+
function v() {
|
|
54
|
+
e.keyboard.enabled && (o.removeEventListener("keydown", y), e.keyboard.enabled = !1);
|
|
168
55
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
i.classList.remove(a.horizontalClass, a.verticalClass), i.classList.add(e.isHorizontal() ? a.horizontalClass : a.verticalClass);
|
|
177
|
-
});
|
|
178
|
-
}), g("init", () => {
|
|
179
|
-
e.params.pagination.enabled === !1 ? P() : (A(), B(), h());
|
|
180
|
-
}), g("activeIndexChange", () => {
|
|
181
|
-
typeof e.snapIndex > "u" && h();
|
|
182
|
-
}), g("snapIndexChange", () => {
|
|
183
|
-
h();
|
|
184
|
-
}), g("snapGridLengthChange", () => {
|
|
185
|
-
B(), h();
|
|
186
|
-
}), g("destroy", () => {
|
|
187
|
-
M();
|
|
188
|
-
}), g("enable disable", () => {
|
|
189
|
-
let {
|
|
190
|
-
el: a
|
|
191
|
-
} = e.pagination;
|
|
192
|
-
a && (a = m(a), a.forEach((s) => s.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
|
|
193
|
-
}), g("lock unlock", () => {
|
|
194
|
-
h();
|
|
195
|
-
}), g("click", (a, s) => {
|
|
196
|
-
const i = s.target, t = m(e.pagination.el);
|
|
197
|
-
if (e.params.pagination.el && e.params.pagination.hideOnClick && t && t.length > 0 && !i.classList.contains(e.params.pagination.bulletClass)) {
|
|
198
|
-
if (e.navigation && (e.navigation.nextEl && i === e.navigation.nextEl || e.navigation.prevEl && i === e.navigation.prevEl)) return;
|
|
199
|
-
const p = t[0].classList.contains(e.params.pagination.hiddenClass);
|
|
200
|
-
v(p === !0 ? "paginationShow" : "paginationHide"), t.forEach((C) => C.classList.toggle(e.params.pagination.hiddenClass));
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
const w = () => {
|
|
204
|
-
e.el.classList.remove(e.params.pagination.paginationDisabledClass);
|
|
205
|
-
let {
|
|
206
|
-
el: a
|
|
207
|
-
} = e.pagination;
|
|
208
|
-
a && (a = m(a), a.forEach((s) => s.classList.remove(e.params.pagination.paginationDisabledClass))), A(), B(), h();
|
|
209
|
-
}, P = () => {
|
|
210
|
-
e.el.classList.add(e.params.pagination.paginationDisabledClass);
|
|
211
|
-
let {
|
|
212
|
-
el: a
|
|
213
|
-
} = e.pagination;
|
|
214
|
-
a && (a = m(a), a.forEach((s) => s.classList.add(e.params.pagination.paginationDisabledClass))), M();
|
|
215
|
-
};
|
|
216
|
-
Object.assign(e.pagination, {
|
|
217
|
-
enable: w,
|
|
218
|
-
disable: P,
|
|
219
|
-
render: B,
|
|
220
|
-
update: h,
|
|
221
|
-
init: A,
|
|
222
|
-
destroy: M
|
|
56
|
+
b("init", () => {
|
|
57
|
+
e.params.keyboard.enabled && g();
|
|
58
|
+
}), b("destroy", () => {
|
|
59
|
+
e.keyboard.enabled && v();
|
|
60
|
+
}), Object.assign(e.keyboard, {
|
|
61
|
+
enable: g,
|
|
62
|
+
disable: v
|
|
223
63
|
});
|
|
224
64
|
}
|
|
225
65
|
export {
|
|
226
|
-
|
|
66
|
+
I as default
|
|
227
67
|
};
|