@okam/stack-ui 1.35.2 → 1.35.4
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/components/TagGroup/components/Tag.d.ts +4 -0
- package/components/TagGroup/components/TagItem.d.ts +4 -0
- package/components/TagGroup/index.d.ts +4 -0
- package/components/TagGroup/interface.d.ts +32 -0
- package/index.d.ts +4 -0
- package/index.js +1 -1
- package/index.mjs +91 -87
- package/index10.js +1 -1
- package/index10.mjs +1 -1
- package/index100.js +13 -45
- package/index100.mjs +59 -90
- package/index101.js +1 -16
- package/index101.mjs +7 -25
- package/index102.js +47 -1
- package/index102.mjs +95 -35
- package/index103.js +16 -1
- package/index103.mjs +25 -48
- package/index104.js +1 -1
- package/index104.mjs +41 -22
- package/index105.js +1 -2
- package/index105.mjs +47 -21
- package/index106.js +1 -1
- package/index106.mjs +21 -61
- package/index107.js +2 -1
- package/index107.mjs +22 -29
- package/index108.js +1 -1
- package/index108.mjs +63 -52
- package/index109.js +1 -1
- package/index109.mjs +29 -4
- package/index11.js +1 -1
- package/index11.mjs +3 -3
- package/index110.js +1 -1
- package/index110.mjs +52 -11
- package/index111.js +1 -1
- package/index111.mjs +4 -14
- package/index112.js +1 -1
- package/index112.mjs +11 -38
- package/index113.js +1 -1
- package/index113.mjs +13 -22
- package/index114.js +1 -1
- package/index114.mjs +37 -43
- package/index115.js +1 -1
- package/index115.mjs +23 -20
- package/index116.js +1 -1
- package/index116.mjs +41 -35
- package/index117.js +1 -1
- package/index117.mjs +18 -14
- package/index118.js +1 -1
- package/index118.mjs +35 -36
- package/index119.js +1 -2
- package/index119.mjs +15 -12
- package/index12.js +1 -1
- package/index12.mjs +1 -1
- package/index120.js +1 -1
- package/index120.mjs +38 -8
- package/index121.js +1 -1
- package/index121.mjs +12 -38
- package/index122.js +1 -1
- package/index122.mjs +8 -22
- package/index123.js +2 -1
- package/index123.mjs +39 -43
- package/index124.js +1 -1
- package/index124.mjs +22 -25
- package/index125.js +1 -1
- package/index125.mjs +42 -40
- package/index126.js +1 -2
- package/index126.mjs +25 -57
- package/index127.js +1 -1
- package/index127.mjs +41 -39
- package/index128.js +2 -1
- package/index128.mjs +57 -30
- package/index129.js +1 -1
- package/index129.mjs +38 -19
- package/index13.js +1 -1
- package/index13.mjs +1 -1
- package/index130.js +1 -1
- package/index130.mjs +30 -8
- package/index131.js +1 -1
- package/index131.mjs +20 -30
- package/index132.js +1 -1
- package/index132.mjs +8 -14
- package/index133.js +1 -1
- package/index133.mjs +29 -16
- package/index134.js +1 -1
- package/index134.mjs +15 -21
- package/index135.js +1 -1
- package/index135.mjs +17 -11
- package/index136.js +1 -2
- package/index136.mjs +20 -21
- package/index137.js +1 -1
- package/index137.mjs +11 -21
- package/index138.js +2 -1
- package/index138.mjs +47 -5
- package/index139.js +2 -1
- package/index139.mjs +22 -12
- package/index14.js +1 -1
- package/index14.mjs +4 -4
- package/index140.js +1 -1
- package/index140.mjs +18 -54
- package/index141.js +1 -1
- package/index141.mjs +6 -46
- package/index142.js +1 -1
- package/index142.mjs +54 -238
- package/index143.js +1 -2
- package/index143.mjs +11 -12
- package/index144.js +1 -1
- package/index144.mjs +46 -30
- package/index145.js +1 -1
- package/index145.mjs +240 -11
- package/index146.js +2 -1
- package/index146.mjs +13 -6
- package/index147.js +1 -2
- package/index147.mjs +27 -47
- package/index148.js +1 -1
- package/index148.mjs +11 -21
- package/index149.js +1 -1
- package/index149.mjs +20 -124
- package/index15.js +1 -1
- package/index15.mjs +1 -1
- package/index150.js +1 -1
- package/index150.mjs +5 -27
- package/index151.js +2 -1
- package/index151.mjs +48 -72
- package/index152.js +1 -1
- package/index152.mjs +113 -369
- package/index153.js +1 -1
- package/index153.mjs +27 -46
- package/index154.js +1 -1
- package/index154.mjs +74 -4
- package/index155.js +1 -1
- package/index155.mjs +380 -23
- package/index156.js +1 -1
- package/index156.mjs +45 -46
- package/index157.js +1 -1
- package/index157.mjs +4 -6
- package/index158.js +1 -1
- package/index158.mjs +24 -24
- package/index159.js +1 -1
- package/index159.mjs +46 -11
- package/index16.js +1 -1
- package/index16.mjs +3 -3
- package/index160.js +1 -1
- package/index160.mjs +5 -4
- package/index161.js +1 -1
- package/index161.mjs +23 -13
- package/index162.js +1 -1
- package/index162.mjs +12 -21
- package/index163.js +1 -1
- package/index163.mjs +4 -42
- package/index164.js +1 -1
- package/index164.mjs +14 -24
- package/index165.js +1 -1
- package/index165.mjs +21 -42
- package/index166.js +1 -1
- package/index166.mjs +39 -25
- package/index167.js +1 -1
- package/index167.mjs +24 -31
- package/index168.js +1 -1
- package/index168.mjs +42 -14
- package/index169.js +1 -1
- package/index169.mjs +27 -27
- package/index17.js +1 -1
- package/index17.mjs +6 -6
- package/index170.js +1 -1
- package/index170.mjs +31 -9
- package/index171.js +1 -1
- package/index171.mjs +14 -6
- package/index172.js +1 -1
- package/index172.mjs +28 -5
- package/index173.js +1 -1
- package/index173.mjs +9 -13
- package/index174.js +1 -1
- package/index174.mjs +6 -8
- package/index175.js +1 -1
- package/index175.mjs +5 -17
- package/index176.js +1 -1
- package/index176.mjs +13 -19
- package/index177.js +1 -1
- package/index177.mjs +8 -54
- package/index178.js +1 -1
- package/index178.mjs +16 -123
- package/index179.js +1 -1
- package/index179.mjs +19 -134
- package/index18.js +1 -1
- package/index18.mjs +4 -4
- package/index180.js +1 -1
- package/index180.mjs +54 -44
- package/index181.js +1 -1
- package/index181.mjs +122 -12
- package/index182.js +1 -1
- package/index182.mjs +131 -92
- package/index183.js +1 -1
- package/index183.mjs +36 -98
- package/index184.js +1 -1
- package/index184.mjs +14 -4
- package/index185.js +1 -1
- package/index185.mjs +95 -3
- package/index186.js +1 -1
- package/index186.mjs +100 -119
- package/index187.js +1 -1
- package/index187.mjs +4 -29
- package/index188.js +1 -1
- package/index188.mjs +3 -51
- package/index189.js +1 -1
- package/index189.mjs +116 -35
- package/index19.js +1 -1
- package/index19.mjs +2 -2
- package/index190.js +1 -1
- package/index190.mjs +17 -25
- package/index191.js +1 -1
- package/index191.mjs +37 -99
- package/index192.js +1 -1
- package/index192.mjs +36 -69
- package/index193.js +1 -1
- package/index193.mjs +28 -92
- package/index194.js +1 -1
- package/index194.mjs +114 -98
- package/index195.js +1 -1
- package/index195.mjs +71 -197
- package/index196.js +1 -1
- package/index196.mjs +101 -64
- package/index197.js +1 -1
- package/index197.mjs +98 -144
- package/index198.js +1 -1
- package/index198.mjs +133 -117
- package/index199.js +1 -1
- package/index199.mjs +193 -220
- package/index2.js +1 -1
- package/index2.mjs +21 -21
- package/index20.js +1 -1
- package/index20.mjs +3 -3
- package/index200.js +1 -1
- package/index200.mjs +22 -190
- package/index201.js +1 -1
- package/index201.mjs +44 -64
- package/index202.js +1 -1
- package/index202.mjs +46 -277
- package/index203.js +1 -1
- package/index203.mjs +93 -94
- package/index204.js +1 -1
- package/index204.mjs +72 -189
- package/index205.js +1 -1
- package/index205.mjs +64 -80
- package/index206.js +1 -1
- package/index206.mjs +7 -58
- package/index207.js +1 -1
- package/index207.mjs +11 -126
- package/index208.js +1 -1
- package/index208.mjs +188 -101
- package/index209.js +1 -1
- package/index209.mjs +52 -110
- package/index21.js +1 -1
- package/index21.mjs +2 -2
- package/index210.js +1 -1
- package/index210.mjs +138 -67
- package/index211.js +1 -1
- package/index211.mjs +119 -105
- package/index212.js +1 -1
- package/index212.mjs +219 -47
- package/index213.js +1 -1
- package/index213.mjs +185 -88
- package/index214.js +1 -1
- package/index214.mjs +62 -63
- package/index215.js +1 -1
- package/index215.mjs +275 -52
- package/index216.js +1 -1
- package/index216.mjs +93 -94
- package/index217.js +1 -5
- package/index217.mjs +183 -75
- package/index218.js +1 -1
- package/index218.mjs +73 -2014
- package/index219.js +1 -1
- package/index219.mjs +56 -57
- package/index22.js +1 -1
- package/index22.mjs +2 -2
- package/index220.js +1 -1
- package/index220.mjs +123 -185
- package/index221.js +1 -1
- package/index221.mjs +112 -136
- package/index222.js +1 -1
- package/index222.mjs +119 -194
- package/index223.js +1 -1
- package/index223.mjs +72 -22
- package/index224.js +1 -1
- package/index224.mjs +108 -47
- package/index225.js +1 -1
- package/index225.mjs +51 -47
- package/index226.js +1 -1
- package/index226.mjs +91 -95
- package/index227.js +1 -1
- package/index227.mjs +71 -72
- package/index228.js +1 -1
- package/index228.mjs +52 -64
- package/index229.js +1 -1
- package/index229.mjs +99 -7
- package/index23.js +1 -1
- package/index23.mjs +2 -2
- package/index230.js +5 -1
- package/index230.mjs +79 -10
- package/index231.js +1 -1
- package/index231.mjs +2025 -3
- package/index232.js +1 -1
- package/index232.mjs +59 -4
- package/index233.js +1 -1
- package/index233.mjs +183 -125
- package/index234.js +1 -1
- package/index234.mjs +3 -190
- package/index235.js +1 -1
- package/index235.mjs +4 -9
- package/index236.js +1 -1
- package/index236.mjs +5 -4
- package/index237.js +1 -1
- package/index237.mjs +5 -37
- package/index238.js +1 -1
- package/index238.mjs +5 -6
- package/index239.js +1 -1
- package/index239.mjs +5 -30
- package/index24.js +1 -1
- package/index24.mjs +3 -3
- package/index240.js +1 -1
- package/index240.mjs +5 -7
- package/index241.js +1 -1
- package/index241.mjs +1 -1
- package/index242.js +1 -1
- package/index242.mjs +4 -4
- package/index243.js +1 -1
- package/index243.mjs +4 -4
- package/index244.js +1 -1
- package/index244.mjs +4 -4
- package/index245.js +1 -1
- package/index245.mjs +1 -1
- package/index246.js +1 -1
- package/index246.mjs +4 -4
- package/index247.js +1 -1
- package/index247.mjs +4 -4
- package/index248.js +1 -1
- package/index248.mjs +1 -1
- package/index249.js +1 -1
- package/index249.mjs +4 -4
- package/index25.js +1 -1
- package/index25.mjs +2 -2
- package/index250.js +1 -1
- package/index250.mjs +4 -4
- package/index251.js +1 -1
- package/index251.mjs +4 -4
- package/index252.js +1 -1
- package/index252.mjs +4 -4
- package/index253.js +1 -1
- package/index253.mjs +1 -1
- package/index254.js +1 -1
- package/index254.mjs +4 -4
- package/index255.js +1 -1
- package/index255.mjs +1 -1
- package/index256.js +1 -1
- package/index256.mjs +4 -4
- package/index257.js +1 -1
- package/index257.mjs +4 -4
- package/index258.js +1 -1
- package/index258.mjs +4 -4
- package/index259.js +1 -1
- package/index259.mjs +4 -4
- package/index26.js +1 -1
- package/index26.mjs +2 -2
- package/index260.js +1 -1
- package/index260.mjs +4 -4
- package/index261.js +1 -1
- package/index261.mjs +4 -4
- package/index262.js +1 -1
- package/index262.mjs +4 -4
- package/index263.js +1 -1
- package/index263.mjs +4 -4
- package/index264.js +1 -1
- package/index264.mjs +1 -1
- package/index265.js +1 -1
- package/index265.mjs +4 -4
- package/index266.js +1 -1
- package/index266.mjs +4 -4
- package/index267.js +1 -1
- package/index267.mjs +4 -4
- package/index268.js +1 -1
- package/index268.mjs +4 -4
- package/index269.js +1 -1
- package/index269.mjs +1 -1
- package/index27.js +1 -1
- package/index27.mjs +1 -1
- package/index270.js +1 -1
- package/index270.mjs +130 -4
- package/index271.js +1 -1
- package/index271.mjs +191 -5
- package/index272.js +1 -1
- package/index272.mjs +10 -5
- package/index273.js +1 -1
- package/index273.mjs +4 -5
- package/index274.js +1 -1
- package/index274.mjs +37 -5
- package/index275.js +1 -1
- package/index275.mjs +5 -62
- package/index276.js +1 -1
- package/index276.mjs +29 -6
- package/index277.js +1 -1
- package/index277.mjs +6 -27
- package/index278.js +1 -1
- package/index278.mjs +58 -88
- package/index279.js +1 -1
- package/index279.mjs +7 -10
- package/index28.js +1 -1
- package/index28.mjs +3 -3
- package/index280.js +1 -1
- package/index280.mjs +26 -24
- package/index281.js +1 -1
- package/index281.mjs +89 -30
- package/index282.js +1 -1
- package/index282.mjs +9 -6
- package/index283.js +1 -1
- package/index283.mjs +25 -6
- package/index284.js +1 -1
- package/index284.mjs +32 -28
- package/index285.js +1 -1
- package/index285.mjs +6 -14
- package/index286.js +1 -1
- package/index286.mjs +6 -5
- package/index287.js +1 -1
- package/index287.mjs +29 -3
- package/index288.js +1 -1
- package/index288.mjs +14 -4
- package/index289.js +1 -1
- package/index289.mjs +5 -8
- package/index29.js +1 -1
- package/index29.mjs +3 -3
- package/index290.js +1 -0
- package/index290.mjs +6 -0
- package/index291.js +1 -0
- package/index291.mjs +7 -0
- package/index292.js +1 -0
- package/index292.mjs +11 -0
- package/index3.js +1 -1
- package/index3.mjs +1 -1
- package/index30.js +1 -1
- package/index30.mjs +3 -3
- package/index31.js +1 -1
- package/index31.mjs +3 -3
- package/index32.js +1 -1
- package/index32.mjs +2 -2
- package/index33.js +1 -1
- package/index33.mjs +1 -1
- package/index34.js +1 -1
- package/index34.mjs +4 -4
- package/index35.js +1 -1
- package/index35.mjs +2 -2
- package/index36.js +1 -1
- package/index36.mjs +1 -1
- package/index37.js +1 -1
- package/index37.mjs +2 -2
- package/index38.js +1 -1
- package/index38.mjs +3 -3
- package/index39.js +1 -1
- package/index39.mjs +1 -1
- package/index4.js +1 -1
- package/index4.mjs +3 -3
- package/index41.js +1 -1
- package/index41.mjs +1 -1
- package/index42.js +2 -1
- package/index42.mjs +36 -5
- package/index43.js +2 -1
- package/index43.mjs +41 -8
- package/index44.js +1 -1
- package/index44.mjs +4 -7
- package/index45.js +1 -1
- package/index45.mjs +8 -5
- package/index46.js +1 -1
- package/index46.mjs +8 -5
- package/index47.js +1 -1
- package/index47.mjs +2 -2
- package/index48.js +1 -1
- package/index48.mjs +4 -4
- package/index49.js +1 -1
- package/index49.mjs +3 -9
- package/index50.js +1 -1
- package/index50.mjs +4 -12
- package/index51.js +1 -1
- package/index51.mjs +6 -8
- package/index52.js +1 -1
- package/index52.mjs +12 -45
- package/index53.js +1 -1
- package/index53.mjs +13 -8
- package/index54.js +1 -1
- package/index54.mjs +31 -56
- package/index55.js +1 -1
- package/index55.mjs +7 -7
- package/index56.js +1 -1
- package/index56.mjs +71 -13
- package/index57.js +1 -1
- package/index57.mjs +7 -9
- package/index58.js +1 -1
- package/index58.mjs +13 -17
- package/index59.js +1 -1
- package/index59.mjs +10 -13
- package/index6.js +1 -1
- package/index6.mjs +1 -1
- package/index60.js +1 -1
- package/index60.mjs +16 -12
- package/index61.js +1 -1
- package/index61.mjs +7 -7
- package/index62.js +1 -1
- package/index62.mjs +9 -7
- package/index63.js +1 -1
- package/index63.mjs +10 -8
- package/index64.js +1 -1
- package/index64.mjs +6 -8
- package/index65.js +1 -1
- package/index65.mjs +11 -14
- package/index66.js +1 -2
- package/index66.mjs +12 -22
- package/index67.js +1 -2
- package/index67.mjs +13 -16
- package/index68.js +1 -1
- package/index68.mjs +21 -13
- package/index69.js +1 -1
- package/index69.mjs +15 -40
- package/index7.js +1 -1
- package/index7.mjs +1 -1
- package/index70.js +1 -1
- package/index70.mjs +13 -37
- package/index71.js +1 -1
- package/index71.mjs +40 -11
- package/index72.js +1 -1
- package/index72.mjs +37 -10
- package/index73.js +1 -1
- package/index73.mjs +11 -13
- package/index74.js +1 -1
- package/index74.mjs +10 -10
- package/index75.js +1 -1
- package/index75.mjs +12 -28
- package/index76.js +2 -1
- package/index76.mjs +12 -2
- package/index77.js +1 -1
- package/index77.mjs +30 -8
- package/index78.js +1 -2
- package/index78.mjs +1 -7
- package/index79.js +1 -1
- package/index79.mjs +7 -6
- package/index8.js +1 -1
- package/index8.mjs +3 -3
- package/index80.js +1 -1
- package/index80.mjs +6 -6
- package/index81.js +2 -1
- package/index81.mjs +8 -25
- package/index82.js +2 -1
- package/index82.mjs +8 -5
- package/index83.js +1 -1
- package/index83.mjs +25 -2
- package/index84.js +1 -6
- package/index84.mjs +5 -94
- package/index85.js +1 -1
- package/index85.mjs +2 -69
- package/index86.js +6 -1
- package/index86.mjs +82 -29
- package/index87.js +1 -42
- package/index87.mjs +64 -69
- package/index88.js +1 -64
- package/index88.mjs +33 -220
- package/index89.js +42 -9
- package/index89.mjs +69 -52
- package/index9.js +1 -1
- package/index9.mjs +1 -1
- package/index90.js +64 -1
- package/index90.mjs +214 -31
- package/index91.js +9 -1
- package/index91.mjs +54 -10
- package/index92.js +1 -5
- package/index92.mjs +31 -74
- package/index93.js +1 -1
- package/index93.mjs +12 -5
- package/index94.js +4 -11
- package/index94.mjs +78 -30
- package/index95.js +1 -1
- package/index95.mjs +6 -29
- package/index96.js +12 -1
- package/index96.mjs +39 -12
- package/index97.js +1 -7
- package/index97.mjs +23 -13
- package/index98.js +1 -15
- package/index98.mjs +9 -67
- package/index99.js +7 -1
- package/index99.mjs +17 -5
- package/package.json +29 -2
package/index221.mjs
CHANGED
|
@@ -1,143 +1,119 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
L,
|
|
17
|
-
$,
|
|
18
|
-
C,
|
|
19
|
-
B,
|
|
20
|
-
v,
|
|
21
|
-
y,
|
|
22
|
-
b,
|
|
23
|
-
T,
|
|
24
|
-
w
|
|
25
|
-
], N = U(e == null ? void 0 : e.scale);
|
|
26
|
-
K(() => {
|
|
27
|
-
v && (N.current = e == null ? void 0 : e.scale);
|
|
28
|
-
}, [
|
|
29
|
-
v
|
|
30
|
-
]);
|
|
31
|
-
let a = j(() => {
|
|
32
|
-
if (S === !1 || !v || !i.current || !c.current || !$ || (e == null ? void 0 : e.scale) !== N.current) return;
|
|
33
|
-
let o = null;
|
|
34
|
-
if (s.current && s.current.contains(document.activeElement)) {
|
|
35
|
-
var d;
|
|
36
|
-
let r = (d = document.activeElement) === null || d === void 0 ? void 0 : d.getBoundingClientRect(), g = s.current.getBoundingClientRect();
|
|
37
|
-
var u;
|
|
38
|
-
if (o = {
|
|
39
|
-
type: "top",
|
|
40
|
-
offset: ((u = r == null ? void 0 : r.top) !== null && u !== void 0 ? u : 0) - g.top
|
|
41
|
-
}, o.offset > g.height / 2) {
|
|
42
|
-
o.type = "bottom";
|
|
43
|
-
var R;
|
|
44
|
-
o.offset = ((R = r == null ? void 0 : r.bottom) !== null && R !== void 0 ? R : 0) - g.bottom;
|
|
45
|
-
}
|
|
1
|
+
import { g as T } from "./index270.mjs";
|
|
2
|
+
import { l as I, e as g } from "./index271.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"
|
|
46
16
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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);
|
|
29
|
+
}
|
|
30
|
+
function p() {
|
|
31
|
+
const {
|
|
32
|
+
thumbs: t
|
|
33
|
+
} = e.params;
|
|
34
|
+
if (f) return !1;
|
|
35
|
+
f = !0;
|
|
36
|
+
const s = e.constructor;
|
|
37
|
+
if (t.swiper instanceof s)
|
|
38
|
+
e.thumbs.swiper = t.swiper, Object.assign(e.thumbs.swiper.originalParams, {
|
|
39
|
+
watchSlidesProgress: !0,
|
|
40
|
+
slideToClickedSlide: !1
|
|
41
|
+
}), Object.assign(e.thumbs.swiper.params, {
|
|
42
|
+
watchSlidesProgress: !0,
|
|
43
|
+
slideToClickedSlide: !1
|
|
44
|
+
}), e.thumbs.swiper.update();
|
|
45
|
+
else if (I(t.swiper)) {
|
|
46
|
+
const r = Object.assign({}, t.swiper);
|
|
47
|
+
Object.assign(r, {
|
|
48
|
+
watchSlidesProgress: !0,
|
|
49
|
+
slideToClickedSlide: !1
|
|
50
|
+
}), e.thumbs.swiper = new s(r), b = !0;
|
|
53
51
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
52
|
+
return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass), e.thumbs.swiper.on("tap", x), !0;
|
|
53
|
+
}
|
|
54
|
+
function o(t) {
|
|
55
|
+
const s = e.thumbs.swiper;
|
|
56
|
+
if (!s || s.destroyed) return;
|
|
57
|
+
const r = s.params.slidesPerView === "auto" ? s.slidesPerViewDynamic() : s.params.slidesPerView;
|
|
58
|
+
let a = 1;
|
|
59
|
+
const n = e.params.thumbs.slideThumbActiveClass;
|
|
60
|
+
if (e.params.slidesPerView > 1 && !e.params.centeredSlides && (a = e.params.slidesPerView), e.params.thumbs.multipleActiveThumbs || (a = 1), a = Math.floor(a), s.slides.forEach((i) => i.classList.remove(n)), s.params.loop || s.params.virtual && s.params.virtual.enabled)
|
|
61
|
+
for (let i = 0; i < a; i += 1)
|
|
62
|
+
g(s.slidesEl, `[data-swiper-slide-index="${e.realIndex + i}"]`).forEach((l) => {
|
|
63
|
+
l.classList.add(n);
|
|
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));
|
|
74
78
|
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
79
|
+
}
|
|
80
|
+
m("beforeInit", () => {
|
|
81
|
+
const {
|
|
82
|
+
thumbs: t
|
|
83
|
+
} = e.params;
|
|
84
|
+
if (!(!t || !t.swiper))
|
|
85
|
+
if (typeof t.swiper == "string" || t.swiper instanceof HTMLElement) {
|
|
86
|
+
const s = T(), r = () => {
|
|
87
|
+
const n = typeof t.swiper == "string" ? s.querySelector(t.swiper) : t.swiper;
|
|
88
|
+
if (n && n.swiper)
|
|
89
|
+
t.swiper = n.swiper, p(), o(!0);
|
|
90
|
+
else if (n) {
|
|
91
|
+
const d = `${e.params.eventsPrefix}init`, u = (i) => {
|
|
92
|
+
t.swiper = i.detail[0], n.removeEventListener(d, u), p(), o(!0), t.swiper.update(), e.update();
|
|
93
|
+
};
|
|
94
|
+
n.addEventListener(d, u);
|
|
95
|
+
}
|
|
96
|
+
return n;
|
|
97
|
+
}, a = () => {
|
|
98
|
+
if (e.destroyed) return;
|
|
99
|
+
r() || requestAnimationFrame(a);
|
|
100
|
+
};
|
|
101
|
+
requestAnimationFrame(a);
|
|
102
|
+
} else
|
|
103
|
+
p(), o(!0);
|
|
104
|
+
}), m("slideChange update resize observerUpdate", () => {
|
|
105
|
+
o();
|
|
106
|
+
}), m("setTransition", (t, s) => {
|
|
107
|
+
const r = e.thumbs.swiper;
|
|
108
|
+
!r || r.destroyed || r.setTransition(s);
|
|
109
|
+
}), m("beforeDestroy", () => {
|
|
110
|
+
const t = e.thumbs.swiper;
|
|
111
|
+
!t || t.destroyed || b && t.destroy();
|
|
112
|
+
}), Object.assign(e.thumbs, {
|
|
113
|
+
init: p,
|
|
114
|
+
update: o
|
|
108
115
|
});
|
|
109
|
-
var h, x;
|
|
110
|
-
return {
|
|
111
|
-
overlayProps: {
|
|
112
|
-
style: {
|
|
113
|
-
position: "absolute",
|
|
114
|
-
zIndex: 1e5,
|
|
115
|
-
...t == null ? void 0 : t.position,
|
|
116
|
-
maxHeight: (h = t == null ? void 0 : t.maxHeight) !== null && h !== void 0 ? h : "100vh"
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
placement: (x = t == null ? void 0 : t.placement) !== null && x !== void 0 ? x : null,
|
|
120
|
-
arrowProps: {
|
|
121
|
-
"aria-hidden": "true",
|
|
122
|
-
role: "presentation",
|
|
123
|
-
style: {
|
|
124
|
-
left: t == null ? void 0 : t.arrowOffsetLeft,
|
|
125
|
-
top: t == null ? void 0 : t.arrowOffsetTop
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
updatePosition: a
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
function Q(n) {
|
|
132
|
-
z(() => (window.addEventListener("resize", n, !1), () => {
|
|
133
|
-
window.removeEventListener("resize", n, !1);
|
|
134
|
-
}), [
|
|
135
|
-
n
|
|
136
|
-
]);
|
|
137
|
-
}
|
|
138
|
-
function W(n, y) {
|
|
139
|
-
return y === "rtl" ? n.replace("start", "right").replace("end", "left") : n.replace("start", "left").replace("end", "right");
|
|
140
116
|
}
|
|
141
117
|
export {
|
|
142
|
-
|
|
118
|
+
A as default
|
|
143
119
|
};
|
package/index222.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const m=require("./index271.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;
|
package/index222.mjs
CHANGED
|
@@ -1,200 +1,125 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
let p = (($ = u == null ? void 0 : u.scale) !== null && $ !== void 0 ? $ : 1) > 1;
|
|
28
|
-
if (e.tagName === "BODY") {
|
|
29
|
-
let h = document.documentElement;
|
|
30
|
-
c = h.clientWidth, i = h.clientHeight;
|
|
31
|
-
var s;
|
|
32
|
-
t = (s = u == null ? void 0 : u.width) !== null && s !== void 0 ? s : c;
|
|
33
|
-
var g;
|
|
34
|
-
o = (g = u == null ? void 0 : u.height) !== null && g !== void 0 ? g : i, l.top = h.scrollTop || e.scrollTop, l.left = h.scrollLeft || e.scrollLeft, u && (a = u.offsetTop, f = u.offsetLeft);
|
|
35
|
-
} else
|
|
36
|
-
({ width: t, height: o, top: a, left: f } = M(e)), l.top = e.scrollTop, l.left = e.scrollLeft, c = t, i = o;
|
|
37
|
-
if (ot() && (e.tagName === "BODY" || e.tagName === "HTML") && p) {
|
|
38
|
-
l.top = 0, l.left = 0;
|
|
39
|
-
var d;
|
|
40
|
-
a = (d = u == null ? void 0 : u.pageTop) !== null && d !== void 0 ? d : 0;
|
|
41
|
-
var r;
|
|
42
|
-
f = (r = u == null ? void 0 : u.pageLeft) !== null && r !== void 0 ? r : 0;
|
|
1
|
+
import { d as v, k as h } from "./index271.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
|
+
});
|
|
43
27
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
left: e.scrollLeft,
|
|
58
|
-
width: e.scrollWidth,
|
|
59
|
-
height: e.scrollHeight
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function q(e, t, o, c, i, a, f) {
|
|
63
|
-
var l;
|
|
64
|
-
let $ = (l = i.scroll[e]) !== null && l !== void 0 ? l : 0, p = c[K[e]], s = c.scroll[P[e]] + a, g = p + c.scroll[P[e]] - a, d = t - $ + f[e] - c[P[e]], r = t - $ + o + f[e] - c[P[e]];
|
|
65
|
-
return d < s ? s - d : r > g ? Math.max(g - r, s - d) : 0;
|
|
66
|
-
}
|
|
67
|
-
function rt(e) {
|
|
68
|
-
let t = window.getComputedStyle(e);
|
|
69
|
-
return {
|
|
70
|
-
top: parseInt(t.marginTop, 10) || 0,
|
|
71
|
-
bottom: parseInt(t.marginBottom, 10) || 0,
|
|
72
|
-
left: parseInt(t.marginLeft, 10) || 0,
|
|
73
|
-
right: parseInt(t.marginRight, 10) || 0
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function J(e) {
|
|
77
|
-
if (H[e]) return H[e];
|
|
78
|
-
let [t, o] = e.split(" "), c = P[t] || "right", i = it[c];
|
|
79
|
-
P[o] || (o = "center");
|
|
80
|
-
let a = K[c], f = K[i];
|
|
81
|
-
return H[e] = {
|
|
82
|
-
placement: t,
|
|
83
|
-
crossPlacement: o,
|
|
84
|
-
axis: c,
|
|
85
|
-
crossAxis: i,
|
|
86
|
-
size: a,
|
|
87
|
-
crossSize: f
|
|
88
|
-
}, H[e];
|
|
89
|
-
}
|
|
90
|
-
function Z(e, t, o, c, i, a, f, l, $, p) {
|
|
91
|
-
let { placement: s, crossPlacement: g, axis: d, crossAxis: r, size: h, crossSize: v } = c, n = {};
|
|
92
|
-
var w;
|
|
93
|
-
n[r] = (w = e[r]) !== null && w !== void 0 ? w : 0;
|
|
94
|
-
var m, x, E, T;
|
|
95
|
-
g === "center" ? n[r] += (((m = e[v]) !== null && m !== void 0 ? m : 0) - ((x = o[v]) !== null && x !== void 0 ? x : 0)) / 2 : g !== r && (n[r] += ((E = e[v]) !== null && E !== void 0 ? E : 0) - ((T = o[v]) !== null && T !== void 0 ? T : 0)), n[r] += a;
|
|
96
|
-
const _ = e[r] - o[v] + $ + p, I = e[r] + e[v] - $ - p;
|
|
97
|
-
if (n[r] = G(n[r], _, I), s === d) {
|
|
98
|
-
const b = l ? f[h] : t[B[h]];
|
|
99
|
-
n[z[d]] = Math.floor(b - e[d] + i);
|
|
100
|
-
} else n[d] = Math.floor(e[d] + e[h] + i);
|
|
101
|
-
return n;
|
|
102
|
-
}
|
|
103
|
-
function at(e, t, o, c, i, a, f, l) {
|
|
104
|
-
const $ = c ? o.height : t[B.height];
|
|
105
|
-
var p;
|
|
106
|
-
let s = e.top != null ? o.top + e.top : o.top + ($ - ((p = e.bottom) !== null && p !== void 0 ? p : 0) - f);
|
|
107
|
-
var g, d, r, h, v, n;
|
|
108
|
-
let w = l !== "top" ? (
|
|
109
|
-
// We want the distance between the top of the overlay to the bottom of the boundary
|
|
110
|
-
Math.max(0, t.height + t.top + ((g = t.scroll.top) !== null && g !== void 0 ? g : 0) - s - (((d = i.top) !== null && d !== void 0 ? d : 0) + ((r = i.bottom) !== null && r !== void 0 ? r : 0) + a))
|
|
111
|
-
) : Math.max(0, s + f - (t.top + ((h = t.scroll.top) !== null && h !== void 0 ? h : 0)) - (((v = i.top) !== null && v !== void 0 ? v : 0) + ((n = i.bottom) !== null && n !== void 0 ? n : 0) + a));
|
|
112
|
-
return Math.min(t.height - a * 2, w);
|
|
113
|
-
}
|
|
114
|
-
function Q(e, t, o, c, i, a) {
|
|
115
|
-
let { placement: f, axis: l, size: $ } = a;
|
|
116
|
-
var p, s;
|
|
117
|
-
if (f === l) return Math.max(0, o[l] - e[l] - ((p = e.scroll[l]) !== null && p !== void 0 ? p : 0) + t[l] - ((s = c[l]) !== null && s !== void 0 ? s : 0) - c[z[l]] - i);
|
|
118
|
-
var g;
|
|
119
|
-
return Math.max(0, e[$] + e[l] + e.scroll[l] - t[l] - o[l] - o[$] - ((g = c[l]) !== null && g !== void 0 ? g : 0) - c[z[l]] - i);
|
|
120
|
-
}
|
|
121
|
-
function nt(e, t, o, c, i, a, f, l, $, p, s, g, d, r, h, v) {
|
|
122
|
-
let n = J(e), { size: w, crossAxis: m, crossSize: x, placement: E, crossPlacement: T } = n, _ = Z(t, l, o, n, s, g, p, d, h, v), I = s, b = Q(l, p, t, i, a + s, n);
|
|
123
|
-
if (f && c[w] > b) {
|
|
124
|
-
let X = J(`${z[E]} ${T}`), lt = Z(t, l, o, X, s, g, p, d, h, v);
|
|
125
|
-
Q(l, p, t, i, a + s, X) > b && (n = X, _ = lt, I = s);
|
|
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
|
+
});
|
|
126
41
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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());
|
|
152
114
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
function M(e) {
|
|
162
|
-
let { top: t, left: o, width: c, height: i } = e.getBoundingClientRect(), { scrollTop: a, scrollLeft: f, clientTop: l, clientLeft: $ } = document.documentElement;
|
|
163
|
-
return {
|
|
164
|
-
top: t + a - l,
|
|
165
|
-
left: o + f - $,
|
|
166
|
-
width: c,
|
|
167
|
-
height: i
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
function U(e, t) {
|
|
171
|
-
let o = window.getComputedStyle(e), c;
|
|
172
|
-
if (o.position === "fixed") {
|
|
173
|
-
let { top: i, left: a, width: f, height: l } = e.getBoundingClientRect();
|
|
174
|
-
c = {
|
|
175
|
-
top: i,
|
|
176
|
-
left: a,
|
|
177
|
-
width: f,
|
|
178
|
-
height: l
|
|
179
|
-
};
|
|
180
|
-
} else {
|
|
181
|
-
c = M(e);
|
|
182
|
-
let i = M(t), a = window.getComputedStyle(t);
|
|
183
|
-
i.top += (parseInt(a.borderTopWidth, 10) || 0) - t.scrollTop, i.left += (parseInt(a.borderLeftWidth, 10) || 0) - t.scrollLeft, c.top -= i.top, c.left -= i.left;
|
|
184
|
-
}
|
|
185
|
-
return c.top -= parseInt(o.marginTop, 10) || 0, c.left -= parseInt(o.marginLeft, 10) || 0, c;
|
|
186
|
-
}
|
|
187
|
-
function pt(e) {
|
|
188
|
-
let t = e.offsetParent;
|
|
189
|
-
if (t && t === document.body && window.getComputedStyle(t).position === "static" && !W(t) && (t = document.documentElement), t == null)
|
|
190
|
-
for (t = e.parentElement; t && !W(t); ) t = t.parentElement;
|
|
191
|
-
return t || document.documentElement;
|
|
192
|
-
}
|
|
193
|
-
function W(e) {
|
|
194
|
-
let t = window.getComputedStyle(e);
|
|
195
|
-
return t.transform !== "none" || /transform|perspective/.test(t.willChange) || t.filter !== "none" || t.contain === "paint" || "backdropFilter" in t && t.backdropFilter !== "none" || "WebkitBackdropFilter" in t && t.WebkitBackdropFilter !== "none";
|
|
115
|
+
Object.assign(e, {
|
|
116
|
+
freeMode: {
|
|
117
|
+
onTouchStart: E,
|
|
118
|
+
onTouchMove: B,
|
|
119
|
+
onTouchEnd: b
|
|
120
|
+
}
|
|
121
|
+
});
|
|
196
122
|
}
|
|
197
123
|
export {
|
|
198
|
-
|
|
199
|
-
nt as calculatePositionInternal
|
|
124
|
+
z as default
|
|
200
125
|
};
|
package/index223.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|