@okam/stack-ui 1.35.0 → 1.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/fields/SearchField/interface.d.ts +1 -0
- package/components/fields/Select/Select.d.ts +1 -1
- package/index125.js +1 -1
- package/index125.mjs +9 -9
- package/index141.js +1 -1
- package/index141.mjs +23 -23
- package/index142.js +1 -1
- package/index142.mjs +3 -3
- package/index147.js +1 -1
- package/index147.mjs +1 -1
- package/index152.js +1 -1
- package/index152.mjs +1 -1
- package/index16.js +1 -1
- package/index16.mjs +133 -131
- package/index178.js +1 -1
- package/index178.mjs +122 -201
- package/index179.js +1 -1
- package/index179.mjs +130 -60
- package/index18.js +1 -1
- package/index18.mjs +22 -22
- package/index180.js +1 -1
- package/index180.mjs +44 -143
- package/index181.js +1 -1
- package/index181.mjs +14 -124
- package/index182.js +1 -1
- package/index182.mjs +87 -216
- package/index183.js +1 -1
- package/index183.mjs +102 -186
- package/index184.js +1 -1
- package/index184.mjs +4 -69
- package/index185.js +1 -1
- package/index185.mjs +3 -279
- package/index186.js +1 -1
- package/index186.mjs +119 -92
- package/index187.js +1 -1
- package/index187.mjs +23 -182
- package/index188.js +1 -1
- package/index188.mjs +51 -84
- package/index189.js +1 -1
- package/index189.mjs +44 -58
- package/index190.js +1 -1
- package/index190.mjs +35 -124
- package/index191.js +1 -1
- package/index191.mjs +110 -113
- package/index192.js +1 -1
- package/index192.mjs +74 -119
- package/index193.js +1 -1
- package/index193.mjs +101 -72
- package/index194.js +1 -1
- package/index194.mjs +98 -111
- package/index195.js +1 -1
- package/index195.mjs +197 -46
- package/index196.js +1 -1
- package/index196.mjs +57 -86
- package/index197.js +1 -1
- package/index197.mjs +138 -65
- package/index198.js +1 -1
- package/index198.mjs +121 -53
- package/index199.js +1 -1
- package/index199.mjs +218 -93
- package/index200.js +1 -5
- package/index200.mjs +187 -77
- package/index201.js +1 -1
- package/index201.mjs +60 -2016
- package/index202.js +1 -1
- package/index202.mjs +277 -57
- package/index203.js +1 -1
- package/index203.mjs +95 -185
- package/index204.js +1 -1
- package/index204.mjs +179 -115
- package/index205.js +1 -1
- package/index205.mjs +81 -131
- package/index206.js +1 -1
- package/index206.mjs +58 -44
- package/index207.js +1 -1
- package/index207.mjs +126 -14
- package/index208.js +1 -1
- package/index208.mjs +113 -92
- package/index209.js +1 -1
- package/index209.mjs +119 -103
- package/index210.js +1 -1
- package/index210.mjs +72 -4
- package/index211.js +1 -1
- package/index211.mjs +110 -3
- package/index212.js +1 -1
- package/index212.mjs +51 -124
- package/index213.js +1 -1
- package/index213.mjs +93 -29
- package/index214.js +1 -1
- package/index214.mjs +70 -51
- package/index215.js +1 -1
- package/index215.mjs +56 -44
- package/index216.js +1 -1
- package/index216.mjs +98 -36
- package/index217.js +5 -1
- package/index217.mjs +78 -111
- package/index218.js +1 -1
- package/index218.mjs +2021 -73
- package/index219.js +1 -1
- package/index219.mjs +57 -99
- package/index220.js +1 -1
- package/index220.mjs +189 -98
- package/index232.js +1 -1
- package/index232.mjs +4 -130
- package/index233.js +1 -1
- package/index233.mjs +123 -183
- package/index234.js +1 -1
- package/index234.mjs +189 -8
- package/index235.js +1 -1
- package/index235.mjs +9 -3
- package/index236.js +1 -1
- package/index236.mjs +3 -36
- package/index237.js +1 -1
- package/index237.mjs +36 -5
- package/index238.js +1 -1
- package/index238.mjs +5 -29
- package/index239.js +1 -1
- package/index239.mjs +29 -6
- package/index240.js +1 -1
- package/index240.mjs +6 -4
- package/package.json +2 -29
package/index205.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const h=require("./index233.js");function $(w){let{swiper:e,extendParams:S,on:c}=w;S({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let d=!1,l={};const y=t=>t.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f=t=>{const o=h.a();let r;t?r=new URL(t):r=o.location;const a=r.pathname.slice(1).split("/").filter(i=>i!==""),n=a.length,s=a[n-2],p=a[n-1];return{key:s,value:p}},m=(t,o)=>{const r=h.a();if(!d||!e.params.history.enabled)return;let a;e.params.url?a=new URL(e.params.url):a=r.location;const n=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${o}"]`):e.slides[o];let s=y(n.getAttribute("data-history"));if(e.params.history.root.length>0){let i=e.params.history.root;i[i.length-1]==="/"&&(i=i.slice(0,i.length-1)),s=`${i}/${t?`${t}/`:""}${s}`}else a.pathname.includes(t)||(s=`${t?`${t}/`:""}${s}`);e.params.history.keepQuery&&(s+=a.search);const p=r.history.state;p&&p.value===s||(e.params.history.replaceState?r.history.replaceState({value:s},null,s):r.history.pushState({value:s},null,s))},g=(t,o,r)=>{if(o)for(let a=0,n=e.slides.length;a<n;a+=1){const s=e.slides[a];if(y(s.getAttribute("data-history"))===o){const i=e.getSlideIndex(s);e.slideTo(i,t,r)}}else e.slideTo(0,t,r)},u=()=>{l=f(e.params.url),g(e.params.speed,l.value,!1)},v=()=>{const t=h.a();if(e.params.history){if(!t.history||!t.history.pushState){e.params.history.enabled=!1,e.params.hashNavigation.enabled=!0;return}if(d=!0,l=f(e.params.url),!l.key&&!l.value){e.params.history.replaceState||t.addEventListener("popstate",u);return}g(0,l.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",u)}},b=()=>{const t=h.a();e.params.history.replaceState||t.removeEventListener("popstate",u)};c("init",()=>{e.params.history.enabled&&v()}),c("destroy",()=>{e.params.history.enabled&&b()}),c("transitionEnd _freeModeNoMomentumRelease",()=>{d&&m(e.params.history.key,e.activeIndex)}),c("slideChange",()=>{d&&e.params.cssMode&&m(e.params.history.key,e.activeIndex)})}module.exports=$;
|
package/index205.mjs
CHANGED
|
@@ -1,137 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var r, e;
|
|
16
|
-
!((r = (e = n.calendar).isInverseEra) === null || r === void 0) && r.call(e, n) && (a = -a), n.year += a;
|
|
17
|
-
}
|
|
18
|
-
function s(n) {
|
|
19
|
-
for (; n.month < 1; )
|
|
20
|
-
y(n, -1), n.month += n.calendar.getMonthsInYear(n);
|
|
21
|
-
let a = 0;
|
|
22
|
-
for (; n.month > (a = n.calendar.getMonthsInYear(n)); )
|
|
23
|
-
n.month -= a, y(n, 1);
|
|
24
|
-
}
|
|
25
|
-
function u(n) {
|
|
26
|
-
for (; n.day < 1; )
|
|
27
|
-
n.month--, s(n), n.day += n.calendar.getDaysInMonth(n);
|
|
28
|
-
for (; n.day > n.calendar.getDaysInMonth(n); )
|
|
29
|
-
n.day -= n.calendar.getDaysInMonth(n), n.month++, s(n);
|
|
30
|
-
}
|
|
31
|
-
function $(n) {
|
|
32
|
-
n.month = Math.max(1, Math.min(n.calendar.getMonthsInYear(n), n.month)), n.day = Math.max(1, Math.min(n.calendar.getDaysInMonth(n), n.day));
|
|
33
|
-
}
|
|
34
|
-
function f(n) {
|
|
35
|
-
n.calendar.constrainDate && n.calendar.constrainDate(n), n.year = Math.max(1, Math.min(n.calendar.getYearsInEra(n), n.year)), $(n);
|
|
36
|
-
}
|
|
37
|
-
function m(n) {
|
|
38
|
-
let a = {};
|
|
39
|
-
for (let r in n) typeof n[r] == "number" && (a[r] = -n[r]);
|
|
40
|
-
return a;
|
|
41
|
-
}
|
|
42
|
-
function x(n, a) {
|
|
43
|
-
return M(n, m(a));
|
|
44
|
-
}
|
|
45
|
-
function D(n, a) {
|
|
46
|
-
let r = n.copy();
|
|
47
|
-
return a.era != null && (r.era = a.era), a.year != null && (r.year = a.year), a.month != null && (r.month = a.month), a.day != null && (r.day = a.day), f(r), r;
|
|
48
|
-
}
|
|
49
|
-
function Y(n, a) {
|
|
50
|
-
let r = n.copy();
|
|
51
|
-
return a.hour != null && (r.hour = a.hour), a.minute != null && (r.minute = a.minute), a.second != null && (r.second = a.second), a.millisecond != null && (r.millisecond = a.millisecond), I(r), r;
|
|
52
|
-
}
|
|
53
|
-
function b(n) {
|
|
54
|
-
n.second += Math.floor(n.millisecond / 1e3), n.millisecond = i(n.millisecond, 1e3), n.minute += Math.floor(n.second / 60), n.second = i(n.second, 60), n.hour += Math.floor(n.minute / 60), n.minute = i(n.minute, 60);
|
|
55
|
-
let a = Math.floor(n.hour / 24);
|
|
56
|
-
return n.hour = i(n.hour, 24), a;
|
|
57
|
-
}
|
|
58
|
-
function I(n) {
|
|
59
|
-
n.millisecond = Math.max(0, Math.min(n.millisecond, 1e3)), n.second = Math.max(0, Math.min(n.second, 59)), n.minute = Math.max(0, Math.min(n.minute, 59)), n.hour = Math.max(0, Math.min(n.hour, 23));
|
|
60
|
-
}
|
|
61
|
-
function i(n, a) {
|
|
62
|
-
let r = n % a;
|
|
63
|
-
return r < 0 && (r += a), r;
|
|
64
|
-
}
|
|
65
|
-
function g(n, a) {
|
|
66
|
-
return n.hour += a.hours || 0, n.minute += a.minutes || 0, n.second += a.seconds || 0, n.millisecond += a.milliseconds || 0, b(n);
|
|
67
|
-
}
|
|
68
|
-
function w(n, a, r, e) {
|
|
69
|
-
let c = n.copy();
|
|
70
|
-
switch (a) {
|
|
71
|
-
case "era": {
|
|
72
|
-
let l = n.calendar.getEras(), o = l.indexOf(n.era);
|
|
73
|
-
if (o < 0) throw new Error("Invalid era: " + n.era);
|
|
74
|
-
o = t(o, r, 0, l.length - 1, e == null ? void 0 : e.round), c.era = l[o], f(c);
|
|
75
|
-
break;
|
|
1
|
+
import { a as h } from "./index233.mjs";
|
|
2
|
+
function x(w) {
|
|
3
|
+
let {
|
|
4
|
+
swiper: e,
|
|
5
|
+
extendParams: S,
|
|
6
|
+
on: c
|
|
7
|
+
} = w;
|
|
8
|
+
S({
|
|
9
|
+
history: {
|
|
10
|
+
enabled: !1,
|
|
11
|
+
root: "",
|
|
12
|
+
replaceState: !1,
|
|
13
|
+
key: "slides",
|
|
14
|
+
keepQuery: !1
|
|
76
15
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
let
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
16
|
+
});
|
|
17
|
+
let d = !1, l = {};
|
|
18
|
+
const y = (t) => t.toString().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, ""), f = (t) => {
|
|
19
|
+
const o = h();
|
|
20
|
+
let r;
|
|
21
|
+
t ? r = new URL(t) : r = o.location;
|
|
22
|
+
const a = r.pathname.slice(1).split("/").filter((i) => i !== ""), n = a.length, s = a[n - 2], p = a[n - 1];
|
|
23
|
+
return {
|
|
24
|
+
key: s,
|
|
25
|
+
value: p
|
|
26
|
+
};
|
|
27
|
+
}, m = (t, o) => {
|
|
28
|
+
const r = h();
|
|
29
|
+
if (!d || !e.params.history.enabled) return;
|
|
30
|
+
let a;
|
|
31
|
+
e.params.url ? a = new URL(e.params.url) : a = r.location;
|
|
32
|
+
const n = e.virtual && e.params.virtual.enabled ? e.slidesEl.querySelector(`[data-swiper-slide-index="${o}"]`) : e.slides[o];
|
|
33
|
+
let s = y(n.getAttribute("data-history"));
|
|
34
|
+
if (e.params.history.root.length > 0) {
|
|
35
|
+
let i = e.params.history.root;
|
|
36
|
+
i[i.length - 1] === "/" && (i = i.slice(0, i.length - 1)), s = `${i}/${t ? `${t}/` : ""}${s}`;
|
|
37
|
+
} else a.pathname.includes(t) || (s = `${t ? `${t}/` : ""}${s}`);
|
|
38
|
+
e.params.history.keepQuery && (s += a.search);
|
|
39
|
+
const p = r.history.state;
|
|
40
|
+
p && p.value === s || (e.params.history.replaceState ? r.history.replaceState({
|
|
41
|
+
value: s
|
|
42
|
+
}, null, s) : r.history.pushState({
|
|
43
|
+
value: s
|
|
44
|
+
}, null, s));
|
|
45
|
+
}, g = (t, o, r) => {
|
|
46
|
+
if (o)
|
|
47
|
+
for (let a = 0, n = e.slides.length; a < n; a += 1) {
|
|
48
|
+
const s = e.slides[a];
|
|
49
|
+
if (y(s.getAttribute("data-history")) === o) {
|
|
50
|
+
const i = e.getSlideIndex(s);
|
|
51
|
+
e.slideTo(i, t, r);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else
|
|
55
|
+
e.slideTo(0, t, r);
|
|
56
|
+
}, u = () => {
|
|
57
|
+
l = f(e.params.url), g(e.params.speed, l.value, !1);
|
|
58
|
+
}, v = () => {
|
|
59
|
+
const t = h();
|
|
60
|
+
if (e.params.history) {
|
|
61
|
+
if (!t.history || !t.history.pushState) {
|
|
62
|
+
e.params.history.enabled = !1, e.params.hashNavigation.enabled = !0;
|
|
63
|
+
return;
|
|
100
64
|
}
|
|
101
|
-
|
|
102
|
-
|
|
65
|
+
if (d = !0, l = f(e.params.url), !l.key && !l.value) {
|
|
66
|
+
e.params.history.replaceState || t.addEventListener("popstate", u);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
g(0, l.value, e.params.runCallbacksOnInit), e.params.history.replaceState || t.addEventListener("popstate", u);
|
|
103
70
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
function t(n, a, r, e, c = !1) {
|
|
119
|
-
if (c) {
|
|
120
|
-
n += Math.sign(a), n < r && (n = e);
|
|
121
|
-
let d = Math.abs(a);
|
|
122
|
-
a > 0 ? n = Math.ceil(n / d) * d : n = Math.floor(n / d) * d, n > e && (n = r);
|
|
123
|
-
} else
|
|
124
|
-
n += a, n < r ? n = e - (r - n - 1) : n > e && (n = r + (n - e - 1));
|
|
125
|
-
return n;
|
|
71
|
+
}, b = () => {
|
|
72
|
+
const t = h();
|
|
73
|
+
e.params.history.replaceState || t.removeEventListener("popstate", u);
|
|
74
|
+
};
|
|
75
|
+
c("init", () => {
|
|
76
|
+
e.params.history.enabled && v();
|
|
77
|
+
}), c("destroy", () => {
|
|
78
|
+
e.params.history.enabled && b();
|
|
79
|
+
}), c("transitionEnd _freeModeNoMomentumRelease", () => {
|
|
80
|
+
d && m(e.params.history.key, e.activeIndex);
|
|
81
|
+
}), c("slideChange", () => {
|
|
82
|
+
d && e.params.cssMode && m(e.params.history.key, e.activeIndex);
|
|
83
|
+
});
|
|
126
84
|
}
|
|
127
85
|
export {
|
|
128
|
-
|
|
129
|
-
f as constrain,
|
|
130
|
-
I as constrainTime,
|
|
131
|
-
w as cycleDate,
|
|
132
|
-
k as cycleTime,
|
|
133
|
-
m as invertDuration,
|
|
134
|
-
D as set,
|
|
135
|
-
Y as setTime,
|
|
136
|
-
x as subtract
|
|
86
|
+
x as default
|
|
137
87
|
};
|
package/index206.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const p=require("./index233.js"),S=require("./index234.js");function x(u){let{swiper:e,extendParams:v,emit:l,on:n}=u,r=!1;const h=p.g(),i=p.a();v({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(a,t){if(e.virtual&&e.params.virtual.enabled){const s=e.slides.filter(f=>f.getAttribute("data-hash")===t)[0];return s?parseInt(s.getAttribute("data-swiper-slide-index"),10):0}return e.getSlideIndex(S.e(e.slidesEl,`.${e.params.slideClass}[data-hash="${t}"], swiper-slide[data-hash="${t}"]`)[0])}}});const o=()=>{l("hashChange");const a=h.location.hash.replace("#",""),t=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],s=t?t.getAttribute("data-hash"):"";if(a!==s){const d=e.params.hashNavigation.getSlideIndex(e,a);if(typeof d>"u"||Number.isNaN(d))return;e.slideTo(d)}},c=()=>{if(!r||!e.params.hashNavigation.enabled)return;const a=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],t=a?a.getAttribute("data-hash")||a.getAttribute("data-history"):"";e.params.hashNavigation.replaceState&&i.history&&i.history.replaceState?(i.history.replaceState(null,null,`#${t}`||""),l("hashSet")):(h.location.hash=t||"",l("hashSet"))},g=()=>{if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;r=!0;const a=h.location.hash.replace("#","");if(a){const s=e.params.hashNavigation.getSlideIndex(e,a);e.slideTo(s||0,0,e.params.runCallbacksOnInit,!0)}e.params.hashNavigation.watchState&&i.addEventListener("hashchange",o)},m=()=>{e.params.hashNavigation.watchState&&i.removeEventListener("hashchange",o)};n("init",()=>{e.params.hashNavigation.enabled&&g()}),n("destroy",()=>{e.params.hashNavigation.enabled&&m()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{r&&c()}),n("slideChange",()=>{r&&e.params.cssMode&&c()})}module.exports=x;
|
package/index206.mjs
CHANGED
|
@@ -1,47 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function p
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import { g as f, a as S } from "./index233.mjs";
|
|
2
|
+
import { e as x } from "./index234.mjs";
|
|
3
|
+
function w(p) {
|
|
4
|
+
let {
|
|
5
|
+
swiper: e,
|
|
6
|
+
extendParams: u,
|
|
7
|
+
emit: l,
|
|
8
|
+
on: n
|
|
9
|
+
} = p, r = !1;
|
|
10
|
+
const h = f(), s = S();
|
|
11
|
+
u({
|
|
12
|
+
hashNavigation: {
|
|
13
|
+
enabled: !1,
|
|
14
|
+
replaceState: !1,
|
|
15
|
+
watchState: !1,
|
|
16
|
+
getSlideIndex(a, t) {
|
|
17
|
+
if (e.virtual && e.params.virtual.enabled) {
|
|
18
|
+
const i = e.slides.filter((v) => v.getAttribute("data-hash") === t)[0];
|
|
19
|
+
return i ? parseInt(i.getAttribute("data-swiper-slide-index"), 10) : 0;
|
|
20
|
+
}
|
|
21
|
+
return e.getSlideIndex(x(e.slidesEl, `.${e.params.slideClass}[data-hash="${t}"], swiper-slide[data-hash="${t}"]`)[0]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const o = () => {
|
|
26
|
+
l("hashChange");
|
|
27
|
+
const a = h.location.hash.replace("#", ""), t = e.virtual && e.params.virtual.enabled ? e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`) : e.slides[e.activeIndex], i = t ? t.getAttribute("data-hash") : "";
|
|
28
|
+
if (a !== i) {
|
|
29
|
+
const d = e.params.hashNavigation.getSlideIndex(e, a);
|
|
30
|
+
if (typeof d > "u" || Number.isNaN(d)) return;
|
|
31
|
+
e.slideTo(d);
|
|
32
|
+
}
|
|
33
|
+
}, c = () => {
|
|
34
|
+
if (!r || !e.params.hashNavigation.enabled) return;
|
|
35
|
+
const a = e.virtual && e.params.virtual.enabled ? e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`) : e.slides[e.activeIndex], t = a ? a.getAttribute("data-hash") || a.getAttribute("data-history") : "";
|
|
36
|
+
e.params.hashNavigation.replaceState && s.history && s.history.replaceState ? (s.history.replaceState(null, null, `#${t}` || ""), l("hashSet")) : (h.location.hash = t || "", l("hashSet"));
|
|
37
|
+
}, m = () => {
|
|
38
|
+
if (!e.params.hashNavigation.enabled || e.params.history && e.params.history.enabled) return;
|
|
39
|
+
r = !0;
|
|
40
|
+
const a = h.location.hash.replace("#", "");
|
|
41
|
+
if (a) {
|
|
42
|
+
const i = e.params.hashNavigation.getSlideIndex(e, a);
|
|
43
|
+
e.slideTo(i || 0, 0, e.params.runCallbacksOnInit, !0);
|
|
44
|
+
}
|
|
45
|
+
e.params.hashNavigation.watchState && s.addEventListener("hashchange", o);
|
|
46
|
+
}, g = () => {
|
|
47
|
+
e.params.hashNavigation.watchState && s.removeEventListener("hashchange", o);
|
|
48
|
+
};
|
|
49
|
+
n("init", () => {
|
|
50
|
+
e.params.hashNavigation.enabled && m();
|
|
51
|
+
}), n("destroy", () => {
|
|
52
|
+
e.params.hashNavigation.enabled && g();
|
|
53
|
+
}), n("transitionEnd _freeModeNoMomentumRelease", () => {
|
|
54
|
+
r && c();
|
|
55
|
+
}), n("slideChange", () => {
|
|
56
|
+
r && e.params.cssMode && c();
|
|
57
|
+
});
|
|
39
58
|
}
|
|
40
59
|
export {
|
|
41
|
-
|
|
42
|
-
x as compareTime,
|
|
43
|
-
y as getDayOfWeek,
|
|
44
|
-
D as getLocalTimeZone,
|
|
45
|
-
v as isEqualCalendar,
|
|
46
|
-
p as isSameDay
|
|
60
|
+
w as default
|
|
47
61
|
};
|
package/index207.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const h=require("./index233.js");function V(q){let{swiper:e,extendParams:x,on:s,emit:r,params:u}=q;e.autoplay={running:!1,paused:!1,timeLeft:0},x({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let y,E,w=u&&u.autoplay?u.autoplay.delay:3e3,g=u&&u.autoplay?u.autoplay.delay:3e3,n,f=new Date().getTime(),b,v,p,D,L,o,S;function M(t){!e||e.destroyed||!e.wrapperEl||t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",M),!(S||t.detail&&t.detail.bySwiperTouchMove)&&l())}const O=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?b=!0:b&&(g=n,b=!1);const t=e.autoplay.paused?n:f+g-new Date().getTime();e.autoplay.timeLeft=t,r("autoplayTimeLeft",t,t/w),E=requestAnimationFrame(()=>{O()})},B=()=>{let t;return e.virtual&&e.params.virtual.enabled?t=e.slides.filter(a=>a.classList.contains("swiper-slide-active"))[0]:t=e.slides[e.activeIndex],t?parseInt(t.getAttribute("data-swiper-autoplay"),10):void 0},T=t=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(E),O();let i=typeof t>"u"?e.params.autoplay.delay:t;w=e.params.autoplay.delay,g=e.params.autoplay.delay;const a=B();!Number.isNaN(a)&&a>0&&typeof t>"u"&&(i=a,w=a,g=a),n=i;const c=e.params.speed,N=()=>{!e||e.destroyed||(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(c,!0,!0),r("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,c,!0,!0),r("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(c,!0,!0),r("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,c,!0,!0),r("autoplay")),e.params.cssMode&&(f=new Date().getTime(),requestAnimationFrame(()=>{T()})))};return i>0?(clearTimeout(y),y=setTimeout(()=>{N()},i)):requestAnimationFrame(()=>{N()}),i},I=()=>{f=new Date().getTime(),e.autoplay.running=!0,T(),r("autoplayStart")},m=()=>{e.autoplay.running=!1,clearTimeout(y),cancelAnimationFrame(E),r("autoplayStop")},d=(t,i)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(y),t||(o=!0);const a=()=>{r("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",M):l()};if(e.autoplay.paused=!0,i){L&&(n=e.params.autoplay.delay),L=!1,a();return}n=(n||e.params.autoplay.delay)-(new Date().getTime()-f),!(e.isEnd&&n<0&&!e.params.loop)&&(n<0&&(n=0),a())},l=()=>{e.isEnd&&n<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(f=new Date().getTime(),o?(o=!1,T(n)):T(),e.autoplay.paused=!1,r("autoplayResume"))},A=()=>{if(e.destroyed||!e.autoplay.running)return;const t=h.g();t.visibilityState==="hidden"&&(o=!0,d(!0)),t.visibilityState==="visible"&&l()},P=t=>{t.pointerType==="mouse"&&(o=!0,S=!0,!(e.animating||e.autoplay.paused)&&d(!0))},F=t=>{t.pointerType==="mouse"&&(S=!1,e.autoplay.paused&&l())},C=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",P),e.el.addEventListener("pointerleave",F))},_=()=>{e.el&&typeof e.el!="string"&&(e.el.removeEventListener("pointerenter",P),e.el.removeEventListener("pointerleave",F))},R=()=>{h.g().addEventListener("visibilitychange",A)},j=()=>{h.g().removeEventListener("visibilitychange",A)};s("init",()=>{e.params.autoplay.enabled&&(C(),R(),I())}),s("destroy",()=>{_(),j(),e.autoplay.running&&m()}),s("_freeModeStaticRelease",()=>{(p||o)&&l()}),s("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?m():d(!0,!0)}),s("beforeTransitionStart",(t,i,a)=>{e.destroyed||!e.autoplay.running||(a||!e.params.autoplay.disableOnInteraction?d(!0,!0):m())}),s("sliderFirstMove",()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){m();return}v=!0,p=!1,o=!1,D=setTimeout(()=>{o=!0,p=!0,d(!0)},200)}}),s("touchEnd",()=>{if(!(e.destroyed||!e.autoplay.running||!v)){if(clearTimeout(D),clearTimeout(y),e.params.autoplay.disableOnInteraction){p=!1,v=!1;return}p&&e.params.cssMode&&l(),p=!1,v=!1}}),s("slideChange",()=>{e.destroyed||!e.autoplay.running||(L=!0)}),Object.assign(e.autoplay,{start:I,stop:m,pause:d,resume:l})}module.exports=V;
|
package/index207.mjs
CHANGED
|
@@ -1,17 +1,129 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { g as S } from "./index233.mjs";
|
|
2
|
+
function k(x) {
|
|
3
|
+
let {
|
|
4
|
+
swiper: e,
|
|
5
|
+
extendParams: B,
|
|
6
|
+
on: s,
|
|
7
|
+
emit: r,
|
|
8
|
+
params: u
|
|
9
|
+
} = x;
|
|
10
|
+
e.autoplay = {
|
|
11
|
+
running: !1,
|
|
12
|
+
paused: !1,
|
|
13
|
+
timeLeft: 0
|
|
14
|
+
}, B({
|
|
15
|
+
autoplay: {
|
|
16
|
+
enabled: !1,
|
|
17
|
+
delay: 3e3,
|
|
18
|
+
waitForTransition: !0,
|
|
19
|
+
disableOnInteraction: !1,
|
|
20
|
+
stopOnLastSlide: !1,
|
|
21
|
+
reverseDirection: !1,
|
|
22
|
+
pauseOnMouseEnter: !1
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
let y, E, b = u && u.autoplay ? u.autoplay.delay : 3e3, g = u && u.autoplay ? u.autoplay.delay : 3e3, n, f = (/* @__PURE__ */ new Date()).getTime(), w, v, p, h, L, o, D;
|
|
26
|
+
function M(t) {
|
|
27
|
+
!e || e.destroyed || !e.wrapperEl || t.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", M), !(D || t.detail && t.detail.bySwiperTouchMove) && l());
|
|
28
|
+
}
|
|
29
|
+
const O = () => {
|
|
30
|
+
if (e.destroyed || !e.autoplay.running) return;
|
|
31
|
+
e.autoplay.paused ? w = !0 : w && (g = n, w = !1);
|
|
32
|
+
const t = e.autoplay.paused ? n : f + g - (/* @__PURE__ */ new Date()).getTime();
|
|
33
|
+
e.autoplay.timeLeft = t, r("autoplayTimeLeft", t, t / b), E = requestAnimationFrame(() => {
|
|
34
|
+
O();
|
|
35
|
+
});
|
|
36
|
+
}, C = () => {
|
|
37
|
+
let t;
|
|
38
|
+
return e.virtual && e.params.virtual.enabled ? t = e.slides.filter((a) => a.classList.contains("swiper-slide-active"))[0] : t = e.slides[e.activeIndex], t ? parseInt(t.getAttribute("data-swiper-autoplay"), 10) : void 0;
|
|
39
|
+
}, T = (t) => {
|
|
40
|
+
if (e.destroyed || !e.autoplay.running) return;
|
|
41
|
+
cancelAnimationFrame(E), O();
|
|
42
|
+
let i = typeof t > "u" ? e.params.autoplay.delay : t;
|
|
43
|
+
b = e.params.autoplay.delay, g = e.params.autoplay.delay;
|
|
44
|
+
const a = C();
|
|
45
|
+
!Number.isNaN(a) && a > 0 && typeof t > "u" && (i = a, b = a, g = a), n = i;
|
|
46
|
+
const c = e.params.speed, N = () => {
|
|
47
|
+
!e || e.destroyed || (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(c, !0, !0), r("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, c, !0, !0), r("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(c, !0, !0), r("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, c, !0, !0), r("autoplay")), e.params.cssMode && (f = (/* @__PURE__ */ new Date()).getTime(), requestAnimationFrame(() => {
|
|
48
|
+
T();
|
|
49
|
+
})));
|
|
50
|
+
};
|
|
51
|
+
return i > 0 ? (clearTimeout(y), y = setTimeout(() => {
|
|
52
|
+
N();
|
|
53
|
+
}, i)) : requestAnimationFrame(() => {
|
|
54
|
+
N();
|
|
55
|
+
}), i;
|
|
56
|
+
}, I = () => {
|
|
57
|
+
f = (/* @__PURE__ */ new Date()).getTime(), e.autoplay.running = !0, T(), r("autoplayStart");
|
|
58
|
+
}, m = () => {
|
|
59
|
+
e.autoplay.running = !1, clearTimeout(y), cancelAnimationFrame(E), r("autoplayStop");
|
|
60
|
+
}, d = (t, i) => {
|
|
61
|
+
if (e.destroyed || !e.autoplay.running) return;
|
|
62
|
+
clearTimeout(y), t || (o = !0);
|
|
63
|
+
const a = () => {
|
|
64
|
+
r("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", M) : l();
|
|
65
|
+
};
|
|
66
|
+
if (e.autoplay.paused = !0, i) {
|
|
67
|
+
L && (n = e.params.autoplay.delay), L = !1, a();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
n = (n || e.params.autoplay.delay) - ((/* @__PURE__ */ new Date()).getTime() - f), !(e.isEnd && n < 0 && !e.params.loop) && (n < 0 && (n = 0), a());
|
|
71
|
+
}, l = () => {
|
|
72
|
+
e.isEnd && n < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (f = (/* @__PURE__ */ new Date()).getTime(), o ? (o = !1, T(n)) : T(), e.autoplay.paused = !1, r("autoplayResume"));
|
|
73
|
+
}, A = () => {
|
|
74
|
+
if (e.destroyed || !e.autoplay.running) return;
|
|
75
|
+
const t = S();
|
|
76
|
+
t.visibilityState === "hidden" && (o = !0, d(!0)), t.visibilityState === "visible" && l();
|
|
77
|
+
}, P = (t) => {
|
|
78
|
+
t.pointerType === "mouse" && (o = !0, D = !0, !(e.animating || e.autoplay.paused) && d(!0));
|
|
79
|
+
}, F = (t) => {
|
|
80
|
+
t.pointerType === "mouse" && (D = !1, e.autoplay.paused && l());
|
|
81
|
+
}, q = () => {
|
|
82
|
+
e.params.autoplay.pauseOnMouseEnter && (e.el.addEventListener("pointerenter", P), e.el.addEventListener("pointerleave", F));
|
|
83
|
+
}, R = () => {
|
|
84
|
+
e.el && typeof e.el != "string" && (e.el.removeEventListener("pointerenter", P), e.el.removeEventListener("pointerleave", F));
|
|
85
|
+
}, _ = () => {
|
|
86
|
+
S().addEventListener("visibilitychange", A);
|
|
87
|
+
}, j = () => {
|
|
88
|
+
S().removeEventListener("visibilitychange", A);
|
|
89
|
+
};
|
|
90
|
+
s("init", () => {
|
|
91
|
+
e.params.autoplay.enabled && (q(), _(), I());
|
|
92
|
+
}), s("destroy", () => {
|
|
93
|
+
R(), j(), e.autoplay.running && m();
|
|
94
|
+
}), s("_freeModeStaticRelease", () => {
|
|
95
|
+
(p || o) && l();
|
|
96
|
+
}), s("_freeModeNoMomentumRelease", () => {
|
|
97
|
+
e.params.autoplay.disableOnInteraction ? m() : d(!0, !0);
|
|
98
|
+
}), s("beforeTransitionStart", (t, i, a) => {
|
|
99
|
+
e.destroyed || !e.autoplay.running || (a || !e.params.autoplay.disableOnInteraction ? d(!0, !0) : m());
|
|
100
|
+
}), s("sliderFirstMove", () => {
|
|
101
|
+
if (!(e.destroyed || !e.autoplay.running)) {
|
|
102
|
+
if (e.params.autoplay.disableOnInteraction) {
|
|
103
|
+
m();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
v = !0, p = !1, o = !1, h = setTimeout(() => {
|
|
107
|
+
o = !0, p = !0, d(!0);
|
|
108
|
+
}, 200);
|
|
109
|
+
}
|
|
110
|
+
}), s("touchEnd", () => {
|
|
111
|
+
if (!(e.destroyed || !e.autoplay.running || !v)) {
|
|
112
|
+
if (clearTimeout(h), clearTimeout(y), e.params.autoplay.disableOnInteraction) {
|
|
113
|
+
p = !1, v = !1;
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
p && e.params.cssMode && l(), p = !1, v = !1;
|
|
117
|
+
}
|
|
118
|
+
}), s("slideChange", () => {
|
|
119
|
+
e.destroyed || !e.autoplay.running || (L = !0);
|
|
120
|
+
}), Object.assign(e.autoplay, {
|
|
121
|
+
start: I,
|
|
122
|
+
stop: m,
|
|
123
|
+
pause: d,
|
|
124
|
+
resume: l
|
|
125
|
+
});
|
|
12
126
|
}
|
|
13
127
|
export {
|
|
14
|
-
|
|
15
|
-
$ as dateToString,
|
|
16
|
-
o as timeToString
|
|
128
|
+
k as default
|
|
17
129
|
};
|
package/index208.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const I=require("./index233.js"),h=require("./index234.js");function g(w){let{swiper:e,extendParams:x,on:m}=w;x({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let f=!1,b=!1;e.thumbs={swiper:null};function v(){const t=e.thumbs.swiper;if(!t||t.destroyed)return;const s=t.clickedIndex,r=t.clickedSlide;if(r&&r.classList.contains(e.params.thumbs.slideThumbActiveClass)||typeof s>"u"||s===null)return;let a;t.params.loop?a=parseInt(t.clickedSlide.getAttribute("data-swiper-slide-index"),10):a=s,e.params.loop?e.slideToLoop(a):e.slideTo(a)}function p(){const{thumbs:t}=e.params;if(f)return!1;f=!0;const s=e.constructor;if(t.swiper instanceof s)e.thumbs.swiper=t.swiper,Object.assign(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper.update();else if(h.l(t.swiper)){const r=Object.assign({},t.swiper);Object.assign(r,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper=new s(r),b=!0}return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",v),!0}function o(t){const s=e.thumbs.swiper;if(!s||s.destroyed)return;const r=s.params.slidesPerView==="auto"?s.slidesPerViewDynamic():s.params.slidesPerView;let a=1;const l=e.params.thumbs.slideThumbActiveClass;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(l)),s.params.loop||s.params.virtual&&s.params.virtual.enabled)for(let i=0;i<a;i+=1)h.e(s.slidesEl,`[data-swiper-slide-index="${e.realIndex+i}"]`).forEach(n=>{n.classList.add(l)});else for(let i=0;i<a;i+=1)s.slides[e.realIndex+i]&&s.slides[e.realIndex+i].classList.add(l);const d=e.params.thumbs.autoScrollOffset,u=d&&!s.params.loop;if(e.realIndex!==s.realIndex||u){const i=s.activeIndex;let n,c;if(s.params.loop){const S=s.slides.filter(T=>T.getAttribute("data-swiper-slide-index")===`${e.realIndex}`)[0];n=s.slides.indexOf(S),c=e.activeIndex>e.previousIndex?"next":"prev"}else n=e.realIndex,c=n>e.previousIndex?"next":"prev";u&&(n+=c==="next"?d:-1*d),s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(n)<0&&(s.params.centeredSlides?n>i?n=n-Math.floor(r/2)+1:n=n+Math.floor(r/2)-1:n>i&&s.params.slidesPerGroup,s.slideTo(n,t?0:void 0))}}m("beforeInit",()=>{const{thumbs:t}=e.params;if(!(!t||!t.swiper))if(typeof t.swiper=="string"||t.swiper instanceof HTMLElement){const s=I.g(),r=()=>{const l=typeof t.swiper=="string"?s.querySelector(t.swiper):t.swiper;if(l&&l.swiper)t.swiper=l.swiper,p(),o(!0);else if(l){const d=`${e.params.eventsPrefix}init`,u=i=>{t.swiper=i.detail[0],l.removeEventListener(d,u),p(),o(!0),t.swiper.update(),e.update()};l.addEventListener(d,u)}return l},a=()=>{if(e.destroyed)return;r()||requestAnimationFrame(a)};requestAnimationFrame(a)}else p(),o(!0)}),m("slideChange update resize observerUpdate",()=>{o()}),m("setTransition",(t,s)=>{const r=e.thumbs.swiper;!r||r.destroyed||r.setTransition(s)}),m("beforeDestroy",()=>{const t=e.thumbs.swiper;!t||t.destroyed||b&&t.destroy()}),Object.assign(e.thumbs,{init:p,update:o})}module.exports=g;
|