aptechka 0.4.14 → 0.4.15
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/lib/{Damped-BZujMwuv.js → Damped-B91XlC1a.js} +6 -7
- package/lib/Damped-D2k3SbmP.cjs +1 -0
- package/lib/animation/Animation.d.ts +2 -2
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +21 -20
- package/lib/morph/Morph.d.ts +1 -1
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +140 -121
- package/lib/scroll/ScrollElement.d.ts +13 -9
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +527 -491
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +38 -36
- package/package.json +1 -1
- package/lib/Damped-DK3CSBXb.cjs +0 -1
package/lib/scroll/index.js
CHANGED
|
@@ -1,81 +1,84 @@
|
|
|
1
|
-
var
|
|
1
|
+
var as = (e, i, r) => {
|
|
2
2
|
if (!i.has(e))
|
|
3
3
|
throw TypeError("Cannot " + r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
5
|
+
var a = (e, i, r) => (as(e, i, "read from private field"), r ? r.call(e) : i.get(e)), $ = (e, i, r) => {
|
|
6
6
|
if (i.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
i instanceof WeakSet ? i.add(e) : i.set(e, r);
|
|
9
|
-
},
|
|
10
|
-
import { D as
|
|
11
|
-
import { i as
|
|
12
|
-
import { a as
|
|
13
|
-
import { c as
|
|
9
|
+
}, R = (e, i, r, h) => (as(e, i, "write to private field"), h ? h.call(e, r) : i.set(e, r), r);
|
|
10
|
+
import { D as $s } from "../Damped-B91XlC1a.js";
|
|
11
|
+
import { i as Ze } from "../browser-0zX67oeU.js";
|
|
12
|
+
import { a as ke, g as Pe } from "../layout-HoBT_Da2.js";
|
|
13
|
+
import { c as Je, s as Fs, b as Os, a as Ds } from "../math-BOBiC4TN.js";
|
|
14
14
|
import "../path-data-polyfill-DgeDWYeI.js";
|
|
15
15
|
import { S as mt } from "../Store-Cd-E5W1z.js";
|
|
16
|
-
import { D as
|
|
16
|
+
import { D as Rs } from "../Derived-DH-ouLBq.js";
|
|
17
17
|
import "../ticker/index.js";
|
|
18
|
-
import { W as
|
|
19
|
-
import { CustomElement as
|
|
20
|
-
import { TICK_ORDER as
|
|
21
|
-
import { windowResizer as
|
|
22
|
-
import { scrollEntries as
|
|
23
|
-
import { e as
|
|
24
|
-
import { c as
|
|
25
|
-
import { cssUnitParser as
|
|
26
|
-
import { CSSProperty as
|
|
27
|
-
import { d as
|
|
28
|
-
import { s as
|
|
29
|
-
import { f as
|
|
30
|
-
import { aptechkaTheme as
|
|
31
|
-
import { elementResizer as
|
|
32
|
-
import { d as
|
|
33
|
-
var
|
|
34
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
35
|
-
(
|
|
36
|
-
return h && n &&
|
|
37
|
-
},
|
|
18
|
+
import { W as Ts, K as As, D as Is } from "../DragControls-Ch_JO2ML.js";
|
|
19
|
+
import { CustomElement as gs, define as qt } from "../custom-element/index.js";
|
|
20
|
+
import { TICK_ORDER as Bs, RESIZE_ORDER as Qe } from "../order/index.js";
|
|
21
|
+
import { windowResizer as Gt } from "../window-resizer/index.js";
|
|
22
|
+
import { scrollEntries as xt } from "../scroll-entries/index.js";
|
|
23
|
+
import { e as Xe, D as Oe, ay as We, p as Hs } from "../tags-BoPv9fDr.js";
|
|
24
|
+
import { c as Ye } from "../createStylesheet-KMRQhSa-.js";
|
|
25
|
+
import { cssUnitParser as os } from "../css-unit-parser/index.js";
|
|
26
|
+
import { CSSProperty as f } from "../css-property/index.js";
|
|
27
|
+
import { d as Gs } from "../Viewport-Bx-VImCe.js";
|
|
28
|
+
import { s as Ks } from "../gestures-D2Fdra_G.js";
|
|
29
|
+
import { f as Us } from "../dom-0S_WDL4g.js";
|
|
30
|
+
import { aptechkaTheme as ls } from "../theme/index.js";
|
|
31
|
+
import { elementResizer as cs } from "../element-resizer/index.js";
|
|
32
|
+
import { d as ws } from "../function-C10DGppn.js";
|
|
33
|
+
var qs = Object.defineProperty, Ns = Object.getOwnPropertyDescriptor, Zs = (e, i, r, h) => {
|
|
34
|
+
for (var n = h > 1 ? void 0 : h ? Ns(i, r) : i, u = e.length - 1, m; u >= 0; u--)
|
|
35
|
+
(m = e[u]) && (n = (h ? m(i, r, n) : m(n)) || n);
|
|
36
|
+
return h && n && qs(i, r, n), n;
|
|
37
|
+
}, je = (e, i, r) => {
|
|
38
38
|
if (!i.has(e))
|
|
39
39
|
throw TypeError("Cannot " + r);
|
|
40
|
-
}, s = (e, i, r) => (
|
|
40
|
+
}, s = (e, i, r) => (je(e, i, "read from private field"), r ? r.call(e) : i.get(e)), l = (e, i, r) => {
|
|
41
41
|
if (i.has(e))
|
|
42
42
|
throw TypeError("Cannot add the same private member more than once");
|
|
43
43
|
i instanceof WeakSet ? i.add(e) : i.set(e, r);
|
|
44
|
-
}, g = (e, i, r, h) => (
|
|
45
|
-
class
|
|
44
|
+
}, g = (e, i, r, h) => (je(e, i, "write to private field"), h ? h.call(e, r) : i.set(e, r), r), C = (e, i, r) => (je(e, i, "access private method"), r), p, F, tt, N, et, vt, st, Nt, D, Vt, oe, le, zt, $t, Ft, w, Me, d, ce, ue, E, _, A, Z, Wt, lt, y, Zt, gt, Kt, Ut, ie, Ee, It, re, xe, ts, Le, es, pe, De, fe, Re, j, $e, Te, bs, Jt, de, Ae, Ve, ss, b, P, Et, X;
|
|
45
|
+
class Js {
|
|
46
46
|
constructor(i, r) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
$(this, b, void 0);
|
|
48
|
+
$(this, P, void 0);
|
|
49
|
+
$(this, Et, 0);
|
|
50
|
+
$(this, X, 0);
|
|
51
|
+
R(this, b, i), R(this, P, r), xt.register(a(this, b));
|
|
52
52
|
}
|
|
53
53
|
get size() {
|
|
54
|
-
return
|
|
54
|
+
return a(this, Et);
|
|
55
55
|
}
|
|
56
56
|
get position() {
|
|
57
|
-
return
|
|
57
|
+
return a(this, X);
|
|
58
58
|
}
|
|
59
59
|
destroy() {
|
|
60
|
-
|
|
60
|
+
xt.unregister(a(this, b)), a(this, b).style.transform = "";
|
|
61
|
+
}
|
|
62
|
+
setSize(i) {
|
|
63
|
+
i ? (a(this, b).style.setProperty("--size", i + "px"), a(this, P).axisCSSProperty.current === "x" ? (a(this, b).style.width = i + "px", a(this, b).style.height = "") : (a(this, b).style.height = i + "px", a(this, b).style.width = "")) : (a(this, b).style.width = "", a(this, b).style.height = "", a(this, b).style.removeProperty("--size"));
|
|
61
64
|
}
|
|
62
65
|
resize() {
|
|
63
|
-
|
|
66
|
+
R(this, Et, a(this, P).vertical ? a(this, b).offsetHeight : a(this, b).offsetWidth), R(this, X, a(this, P).vertical ? ke(a(this, b)) : Pe(a(this, b))), R(this, X, a(this, X) - a(this, P).contentPosition);
|
|
64
67
|
}
|
|
65
68
|
transform() {
|
|
66
69
|
let i = 0;
|
|
67
|
-
const r =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
const r = a(this, P).viewportSize;
|
|
71
|
+
a(this, P).infiniteCSSProperty.current && a(this, P).overscroll && a(this, X) + a(this, Et) < a(this, P).currentScrollValue && (i = a(this, P).distance * -1 - a(this, P).gap), xt.update(
|
|
72
|
+
a(this, b),
|
|
73
|
+
a(this, P).axisCSSProperty.current,
|
|
71
74
|
i
|
|
72
75
|
);
|
|
73
|
-
const h =
|
|
74
|
-
|
|
76
|
+
const h = a(this, P).currentScrollValue + i, n = a(this, X) - a(this, P).viewportSize - r, u = a(this, X) + a(this, Et) + r, m = Je(h, n, u);
|
|
77
|
+
a(this, P).vertical ? a(this, b).style.transform = `translate3d(0px, ${m * -1}px, 0px)` : a(this, b).style.transform = `translate3d(${m * -1}px, 0px, 0px)`;
|
|
75
78
|
}
|
|
76
79
|
}
|
|
77
|
-
|
|
78
|
-
const
|
|
80
|
+
b = new WeakMap(), P = new WeakMap(), Et = new WeakMap(), X = new WeakMap();
|
|
81
|
+
const Qs = Ye({
|
|
79
82
|
":host": {
|
|
80
83
|
position: "relative",
|
|
81
84
|
width: "100%",
|
|
@@ -87,11 +90,11 @@ const qs = Je({
|
|
|
87
90
|
display: "contents"
|
|
88
91
|
},
|
|
89
92
|
".static": {
|
|
90
|
-
position: "absolute",
|
|
91
|
-
top: "0",
|
|
92
|
-
left: "0",
|
|
93
|
-
width: "100%",
|
|
94
|
-
height: "100%"
|
|
93
|
+
position: "var(--static-position, absolute)",
|
|
94
|
+
top: "var(--static-top, 0)",
|
|
95
|
+
left: "var(--static-left, 0)",
|
|
96
|
+
width: "var(--static-width, 100%)",
|
|
97
|
+
height: "var(--static-height, 100%)"
|
|
95
98
|
},
|
|
96
99
|
".content": {
|
|
97
100
|
position: "relative",
|
|
@@ -107,191 +110,219 @@ const qs = Je({
|
|
|
107
110
|
flexShrink: "0"
|
|
108
111
|
}
|
|
109
112
|
});
|
|
110
|
-
let
|
|
113
|
+
let ze = class extends gs {
|
|
111
114
|
constructor() {
|
|
112
|
-
super(), l(this,
|
|
115
|
+
super(), l(this, ie), l(this, It), l(this, xe), l(this, Le), l(this, pe), l(this, fe), l(this, Te), l(this, de), l(this, Ve), l(this, p, null), l(this, F, new f(this, "--axis", "y")), l(this, tt, new f(this, "--pages", 0, {
|
|
113
116
|
validate: (e) => Math.max(0, e - 1)
|
|
114
|
-
})), l(this, N, new
|
|
117
|
+
})), l(this, N, new f(this, "--split", !1)), l(this, et, new f(this, "--sectional", !1)), l(this, vt, new f(
|
|
115
118
|
this,
|
|
116
119
|
"--wheel-max-delta",
|
|
117
120
|
!1
|
|
118
|
-
)), l(this,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
)), l(this, st, new f(
|
|
122
|
+
this,
|
|
123
|
+
"--sections-in-view",
|
|
124
|
+
1
|
|
125
|
+
)), l(this, Nt, new f(this, "--auto-size", !1)), l(this, D, new f(this, "--infinite", !1)), l(this, Vt, new f(this, "--damping", 20)), l(this, oe, new f(this, "--mass", 0)), l(this, le, new f(this, "--stiffness", 0)), l(this, zt, new f(this, "--mouse-drag", !1)), l(this, $t, new f(this, "--disabled", !1)), l(this, Ft, new f(this, "--hibernated", !1)), l(this, w, null), l(this, Me, null), l(this, d, []), l(this, ce, 0), l(this, ue, 0), l(this, E, 0), l(this, _, 0), l(this, A, 0), l(this, Z, null), l(this, Wt, null), l(this, lt, null), l(this, y, new mt(0)), l(this, Zt, 0), l(this, gt, 0), l(this, Kt, !0), l(this, Ut, !0), l(this, j, () => {
|
|
126
|
+
const e = this.currentScrollValue / s(this, _) || 0;
|
|
127
|
+
if (g(this, ce, this.vertical ? ke(this) : Pe(this)), g(this, ue, this.vertical ? ke(s(this, w)) : Pe(s(this, w))), g(this, E, this.vertical ? this.offsetHeight : this.offsetWidth), s(this, tt).current) {
|
|
128
|
+
g(this, _, s(this, E) * s(this, tt).current);
|
|
129
|
+
const i = s(this, _) + s(this, E);
|
|
123
130
|
this.vertical ? (s(this, w).style.width = i + "px", s(this, w).style.height = "100%") : (s(this, w).style.height = i + "px", s(this, w).style.width = "100%");
|
|
124
131
|
} else
|
|
125
|
-
this.vertical ? (s(this, w).style.width = "100%", s(this, w).style.height = "max-content", g(this,
|
|
126
|
-
if (this.vertical ? g(this,
|
|
132
|
+
this.vertical ? (s(this, w).style.width = "100%", s(this, w).style.height = "max-content", g(this, _, s(this, w).offsetHeight - s(this, E))) : (s(this, w).style.width = "max-content", s(this, w).style.height = "100%", g(this, _, s(this, w).offsetWidth - s(this, E)));
|
|
133
|
+
if (this.vertical ? g(this, A, os.parse(
|
|
127
134
|
getComputedStyle(s(this, w)).rowGap
|
|
128
|
-
)) : g(this,
|
|
135
|
+
)) : g(this, A, os.parse(
|
|
129
136
|
getComputedStyle(s(this, w)).columnGap
|
|
130
|
-
)),
|
|
137
|
+
)), s(this, Nt).current && s(this, d).length) {
|
|
138
|
+
const i = s(this, st).current, r = (s(this, E) - s(this, A) * (i - 1)) / i;
|
|
139
|
+
s(this, d).forEach((h) => {
|
|
140
|
+
h.setSize(r);
|
|
141
|
+
});
|
|
142
|
+
} else
|
|
143
|
+
s(this, d).forEach((i) => {
|
|
144
|
+
i.setSize();
|
|
145
|
+
});
|
|
146
|
+
if (!s(this, D).current) {
|
|
131
147
|
const i = getComputedStyle(this);
|
|
132
|
-
g(this,
|
|
148
|
+
g(this, _, s(this, _) + (this.vertical ? parseFloat(i.paddingBlockStart) + parseFloat(i.paddingBlockEnd) : parseFloat(i.paddingInlineStart) + parseFloat(i.paddingInlineEnd))), s(this, p).max = s(this, _);
|
|
133
149
|
}
|
|
134
|
-
if (s(this,
|
|
150
|
+
if (s(this, d).forEach((i) => {
|
|
135
151
|
i.resize(), i.transform();
|
|
136
|
-
}), s(this, D).current && s(this,
|
|
137
|
-
const i = s(this,
|
|
138
|
-
g(this,
|
|
152
|
+
}), s(this, D).current && s(this, d).length) {
|
|
153
|
+
const i = s(this, d)[s(this, d).length - 1], r = i.position + i.size - s(this, E), h = s(this, _) - r;
|
|
154
|
+
g(this, gt, i.position + i.size + h);
|
|
139
155
|
} else
|
|
140
|
-
g(this,
|
|
141
|
-
if (s(this,
|
|
142
|
-
const i = s(this,
|
|
156
|
+
g(this, gt, s(this, _));
|
|
157
|
+
if (s(this, et).current && s(this, d).length) {
|
|
158
|
+
const i = s(this, d)[s(this, y).current];
|
|
143
159
|
s(this, p).set(i.position, !0);
|
|
144
160
|
} else
|
|
145
|
-
s(this, p).set(e * s(this,
|
|
146
|
-
}), l(this,
|
|
161
|
+
s(this, p).set(e * s(this, _), !0);
|
|
162
|
+
}), l(this, $e, () => {
|
|
147
163
|
const e = this.currentScrollValue;
|
|
148
|
-
if (g(this,
|
|
164
|
+
if (g(this, Zt, Math.max(0, e - s(this, _))), s(this, d).length) {
|
|
149
165
|
let i = 0;
|
|
150
|
-
for (let r = 0; r < s(this,
|
|
151
|
-
const h = s(this,
|
|
152
|
-
h.transform(), this.targetScrollValue +
|
|
166
|
+
for (let r = 0; r < s(this, d).length; r++) {
|
|
167
|
+
const h = s(this, d)[r];
|
|
168
|
+
h.transform(), this.targetScrollValue + h.size / 2 >= h.position && (i = r);
|
|
153
169
|
}
|
|
154
|
-
s(this,
|
|
170
|
+
s(this, y).current = i;
|
|
155
171
|
} else
|
|
156
172
|
this.vertical ? s(this, w).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : s(this, w).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
157
|
-
|
|
173
|
+
xt.update(
|
|
158
174
|
this,
|
|
159
|
-
s(this,
|
|
175
|
+
s(this, F).current,
|
|
160
176
|
e
|
|
161
177
|
);
|
|
162
|
-
}), l(this,
|
|
163
|
-
if (!(e === "drag" && !
|
|
164
|
-
if (s(this,
|
|
178
|
+
}), l(this, Jt, (e, i) => {
|
|
179
|
+
if (!(e === "drag" && !Gs.isMobile && !s(this, zt).current))
|
|
180
|
+
if (s(this, et).current) {
|
|
165
181
|
const r = Math.sign(i);
|
|
166
|
-
s(this,
|
|
182
|
+
s(this, d).length ? this.shiftSections(r) : s(this, p).shift(r * s(this, E));
|
|
167
183
|
} else
|
|
168
184
|
s(this, p).shift(i);
|
|
169
|
-
}),
|
|
185
|
+
}), Ze && (g(this, p, new $s(0, {
|
|
170
186
|
damping: 0.01,
|
|
171
187
|
min: 0,
|
|
172
|
-
order:
|
|
173
|
-
})), this.openShadow(
|
|
188
|
+
order: Bs.SCROLL
|
|
189
|
+
})), this.openShadow(Qs), Xe(this, {
|
|
174
190
|
tabIndex: 0,
|
|
175
191
|
children: [
|
|
176
|
-
|
|
192
|
+
Oe({
|
|
177
193
|
class: "static",
|
|
178
|
-
children: [
|
|
194
|
+
children: [We({ name: "static" })]
|
|
179
195
|
}),
|
|
180
|
-
|
|
196
|
+
Oe({
|
|
181
197
|
class: "content",
|
|
182
|
-
children: [
|
|
198
|
+
children: [We({ ref: (e) => g(this, Me, e) })],
|
|
183
199
|
style: {
|
|
184
|
-
flexDirection: new
|
|
185
|
-
s(this,
|
|
200
|
+
flexDirection: new Rs(
|
|
201
|
+
s(this, F),
|
|
186
202
|
(e) => e === "x" ? "row" : "column"
|
|
187
203
|
)
|
|
188
204
|
},
|
|
189
205
|
ref: (e) => g(this, w, e)
|
|
190
206
|
})
|
|
191
207
|
]
|
|
192
|
-
}), g(this, Z, new
|
|
193
|
-
s(this, w).style.flexDirection = e === "x" ? "row" : "column", s(this, Z).axis = s(this,
|
|
194
|
-
}), s(this,
|
|
195
|
-
s(this, Z).axis = e.current ? "max" : s(this,
|
|
196
|
-
}), s(this,
|
|
197
|
-
this.isConnected && s(this,
|
|
208
|
+
}), g(this, Z, new Ts({ element: this })), s(this, Z).changeEvent.subscribe(s(this, Jt)), g(this, Wt, new As({ element: this })), s(this, Wt).changeEvent.subscribe(s(this, Jt)), g(this, lt, new Is({ element: this })), s(this, lt).changeEvent.subscribe(s(this, Jt)), s(this, F).subscribe(({ current: e }) => {
|
|
209
|
+
s(this, w).style.flexDirection = e === "x" ? "row" : "column", s(this, Z).axis = s(this, vt).current ? "max" : e, s(this, Wt).dimension = e === "x" ? "width" : "height", s(this, lt).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && s(this, j).call(this);
|
|
210
|
+
}), s(this, vt).subscribe((e) => {
|
|
211
|
+
s(this, Z).axis = e.current ? "max" : s(this, F).current;
|
|
212
|
+
}), s(this, tt).subscribe(() => {
|
|
213
|
+
this.isConnected && s(this, j).call(this);
|
|
198
214
|
}), s(this, N).subscribe(({ current: e }) => {
|
|
199
|
-
this.isConnected && (e ? C(this,
|
|
200
|
-
}), s(this,
|
|
201
|
-
s(this,
|
|
215
|
+
this.isConnected && (e ? C(this, ie, Ee).call(this) : C(this, It, re).call(this));
|
|
216
|
+
}), s(this, et).subscribe((e) => {
|
|
217
|
+
s(this, y).current = 0, s(this, Z).debounce = e.current, s(this, lt).swipe = e.current, s(this, p).reset(), this.isConnected && (e.current && !e.previous ? C(this, ie, Ee).call(this) : !e.current && e.previous && C(this, It, re).call(this));
|
|
218
|
+
}), s(this, st).subscribe((e) => {
|
|
219
|
+
this.isConnected && s(this, j).call(this);
|
|
220
|
+
}), s(this, Nt).subscribe((e) => {
|
|
221
|
+
this.isConnected && s(this, j).call(this);
|
|
202
222
|
}), s(this, D).subscribe((e) => {
|
|
203
|
-
e.current ? (this.isConnected && (s(this,
|
|
204
|
-
}), s(this,
|
|
223
|
+
e.current ? (this.isConnected && (s(this, d).length || (s(this, N).current = !0)), s(this, d).length && (s(this, p).max = 1 / 0, s(this, p).min = -1 / 0)) : (g(this, Zt, 0), s(this, p).max = s(this, _), s(this, p).min = 0);
|
|
224
|
+
}), s(this, Vt).subscribe((e) => {
|
|
205
225
|
s(this, p).damping = e.current;
|
|
206
|
-
}), s(this,
|
|
226
|
+
}), s(this, oe).subscribe((e) => {
|
|
207
227
|
s(this, p).mass = e.current;
|
|
208
|
-
}), s(this,
|
|
228
|
+
}), s(this, le).subscribe((e) => {
|
|
209
229
|
s(this, p).stiffness = e.current;
|
|
210
230
|
}), s(this, $t).subscribe((e) => {
|
|
211
|
-
e.current && !e.previous ? C(this,
|
|
231
|
+
e.current && !e.previous ? C(this, xe, ts).call(this) : !e.current && e.previous && C(this, Le, es).call(this);
|
|
212
232
|
}), s(this, Ft).subscribe((e) => {
|
|
213
|
-
e.current && !e.previous ? C(this,
|
|
233
|
+
e.current && !e.previous ? C(this, pe, De).call(this) : !e.current && e.previous && C(this, fe, Re).call(this);
|
|
214
234
|
}), s(this, p).isRunning.subscribe((e) => {
|
|
215
235
|
this.classList.toggle("active", e.current);
|
|
236
|
+
}), s(this, y).subscribe((e) => {
|
|
237
|
+
s(this, d).length && C(this, Ve, ss).call(this);
|
|
216
238
|
}));
|
|
217
239
|
}
|
|
218
|
-
get
|
|
219
|
-
return s(this,
|
|
220
|
-
}
|
|
221
|
-
get maxxCSSProperty() {
|
|
222
|
-
return s(this, ne);
|
|
240
|
+
get axisCSSProperty() {
|
|
241
|
+
return s(this, F);
|
|
223
242
|
}
|
|
224
|
-
get
|
|
225
|
-
return s(this,
|
|
243
|
+
get pagesCSSProperty() {
|
|
244
|
+
return s(this, tt);
|
|
226
245
|
}
|
|
227
|
-
get
|
|
228
|
-
return s(this,
|
|
246
|
+
get splitCSSProperty() {
|
|
247
|
+
return s(this, N);
|
|
229
248
|
}
|
|
230
|
-
get
|
|
231
|
-
return s(this,
|
|
249
|
+
get sectionalCSSProperty() {
|
|
250
|
+
return s(this, et);
|
|
232
251
|
}
|
|
233
|
-
get
|
|
234
|
-
return s(this,
|
|
252
|
+
get wheelMaxDeltaCSSProperty() {
|
|
253
|
+
return s(this, vt);
|
|
235
254
|
}
|
|
236
|
-
get
|
|
237
|
-
return s(this,
|
|
255
|
+
get sectionsInViewCSSProperty() {
|
|
256
|
+
return s(this, st);
|
|
238
257
|
}
|
|
239
|
-
get
|
|
240
|
-
return s(this,
|
|
258
|
+
get autoSizeCSSProperty() {
|
|
259
|
+
return s(this, Nt);
|
|
241
260
|
}
|
|
242
261
|
get infiniteCSSProperty() {
|
|
243
262
|
return s(this, D);
|
|
244
263
|
}
|
|
245
|
-
get
|
|
246
|
-
return s(this,
|
|
264
|
+
get dampingCSSProperty() {
|
|
265
|
+
return s(this, Vt);
|
|
266
|
+
}
|
|
267
|
+
get massCSSProperty() {
|
|
268
|
+
return s(this, oe);
|
|
269
|
+
}
|
|
270
|
+
get stiffnessCSSProperty() {
|
|
271
|
+
return s(this, le);
|
|
272
|
+
}
|
|
273
|
+
get mouseDragCSSProperty() {
|
|
274
|
+
return s(this, zt);
|
|
247
275
|
}
|
|
248
|
-
get
|
|
276
|
+
get disabledCSSProperty() {
|
|
249
277
|
return s(this, $t);
|
|
250
278
|
}
|
|
251
|
-
get
|
|
279
|
+
get hibernatedCSSProperty() {
|
|
252
280
|
return s(this, Ft);
|
|
253
281
|
}
|
|
254
282
|
get currentScrollValue() {
|
|
255
|
-
return C(this,
|
|
283
|
+
return C(this, de, Ae).call(this, "current");
|
|
256
284
|
}
|
|
257
285
|
get targetScrollValue() {
|
|
258
|
-
return C(this,
|
|
286
|
+
return C(this, de, Ae).call(this, "target");
|
|
259
287
|
}
|
|
260
288
|
get contentElement() {
|
|
261
289
|
return s(this, w);
|
|
262
290
|
}
|
|
263
291
|
get sections() {
|
|
264
|
-
return s(this,
|
|
292
|
+
return s(this, d);
|
|
265
293
|
}
|
|
266
294
|
get position() {
|
|
267
|
-
return s(this,
|
|
295
|
+
return s(this, ce);
|
|
268
296
|
}
|
|
269
297
|
get contentPosition() {
|
|
270
|
-
return s(this,
|
|
298
|
+
return s(this, ue);
|
|
271
299
|
}
|
|
272
300
|
get viewportSize() {
|
|
273
|
-
return s(this,
|
|
301
|
+
return s(this, E);
|
|
274
302
|
}
|
|
275
303
|
get scrollSize() {
|
|
276
|
-
return s(this,
|
|
304
|
+
return s(this, _);
|
|
277
305
|
}
|
|
278
306
|
get gap() {
|
|
279
|
-
return s(this,
|
|
307
|
+
return s(this, A);
|
|
280
308
|
}
|
|
281
309
|
get counter() {
|
|
282
|
-
return s(this,
|
|
310
|
+
return s(this, y);
|
|
311
|
+
}
|
|
312
|
+
get limit() {
|
|
313
|
+
return s(this, d).length - s(this, st).current;
|
|
283
314
|
}
|
|
284
315
|
get distance() {
|
|
285
|
-
return s(this,
|
|
316
|
+
return s(this, gt);
|
|
286
317
|
}
|
|
287
318
|
get infiniteDistance() {
|
|
288
|
-
return s(this, D).current ? s(this,
|
|
319
|
+
return s(this, D).current ? s(this, gt) + s(this, A) : s(this, gt);
|
|
289
320
|
}
|
|
290
321
|
get overscroll() {
|
|
291
|
-
return s(this,
|
|
322
|
+
return s(this, Zt);
|
|
292
323
|
}
|
|
293
324
|
get vertical() {
|
|
294
|
-
return s(this,
|
|
325
|
+
return s(this, F).current === "y";
|
|
295
326
|
}
|
|
296
327
|
get currentProgress() {
|
|
297
328
|
return this.currentScrollValue / this.infiniteDistance || 0;
|
|
@@ -309,10 +340,10 @@ let xe = class extends ds {
|
|
|
309
340
|
return s(this, p).isRunning;
|
|
310
341
|
}
|
|
311
342
|
get scrollWidth() {
|
|
312
|
-
return s(this,
|
|
343
|
+
return s(this, F).current === "y" ? 0 : s(this, p).length;
|
|
313
344
|
}
|
|
314
345
|
get scrollHeight() {
|
|
315
|
-
return s(this,
|
|
346
|
+
return s(this, F).current === "x" ? 0 : s(this, p).length;
|
|
316
347
|
}
|
|
317
348
|
onScroll(...e) {
|
|
318
349
|
return s(this, p).subscribe(...e);
|
|
@@ -334,145 +365,150 @@ let xe = class extends ds {
|
|
|
334
365
|
}
|
|
335
366
|
// TODO: Поправить значение когда скролл не секционный ??
|
|
336
367
|
scrollToSection(e, i = "smooth") {
|
|
337
|
-
if (!s(this,
|
|
368
|
+
if (!s(this, d).length)
|
|
338
369
|
return;
|
|
339
|
-
const r = s(this,
|
|
340
|
-
C(this,
|
|
341
|
-
const h = s(this,
|
|
370
|
+
const r = s(this, y).current;
|
|
371
|
+
C(this, Te, bs).call(this, e);
|
|
372
|
+
const h = s(this, d)[r], n = s(this, d)[s(this, y).current];
|
|
342
373
|
if (h && n) {
|
|
343
374
|
let u = 0;
|
|
344
|
-
|
|
345
|
-
s(this, D).current ? s(this, W).current === 0 && r === f ? u = s(this, b) + s(this, L) - h.position + s(this, K) : s(this, W).current === f && r === 0 ? u = n.position - (s(this, b) + s(this, L) + s(this, K)) : u = n.position - h.position : u = n.position - h.position, s(this, p).shift(u, i === "instant");
|
|
375
|
+
s(this, D).current ? s(this, y).current === 0 && r === this.limit ? u = s(this, _) + s(this, E) - h.position + s(this, A) : s(this, y).current === this.limit && r === 0 ? u = n.position - (s(this, _) + s(this, E) + s(this, A)) : u = n.position - h.position : u = n.position - h.position, s(this, p).shift(u, i === "instant");
|
|
346
376
|
}
|
|
347
377
|
}
|
|
348
378
|
shiftSections(e, i = "smooth") {
|
|
349
|
-
s(this,
|
|
379
|
+
s(this, d).length && this.scrollToSection(s(this, y).current + e, i);
|
|
350
380
|
}
|
|
351
381
|
setPosition(e, i = "smooth") {
|
|
352
382
|
s(this, p).set(e, i === "instant");
|
|
353
383
|
}
|
|
354
384
|
connectedCallback() {
|
|
355
|
-
s(this,
|
|
385
|
+
s(this, F).observe(), s(this, tt).observe(), s(this, N).observe(), s(this, et).observe(), s(this, vt).observe(), s(this, st).observe(), s(this, D).observe(), s(this, Vt).observe(), s(this, zt).observe(), s(this, $t).observe(), s(this, Ft).observe(), C(this, fe, Re).call(this);
|
|
356
386
|
}
|
|
357
387
|
disconnectedCallback() {
|
|
358
|
-
s(this,
|
|
388
|
+
s(this, F).unobserve(), s(this, tt).unobserve(), s(this, N).unobserve(), s(this, et).unobserve(), s(this, vt).unobserve(), s(this, st).unobserve(), s(this, D).unobserve(), s(this, Vt).unobserve(), s(this, zt).unobserve(), s(this, $t).unobserve(), s(this, Ft).unobserve(), C(this, pe, De).call(this);
|
|
359
389
|
}
|
|
360
390
|
};
|
|
361
391
|
p = /* @__PURE__ */ new WeakMap();
|
|
362
|
-
|
|
363
|
-
j = /* @__PURE__ */ new WeakMap();
|
|
364
|
-
N = /* @__PURE__ */ new WeakMap();
|
|
392
|
+
F = /* @__PURE__ */ new WeakMap();
|
|
365
393
|
tt = /* @__PURE__ */ new WeakMap();
|
|
366
|
-
|
|
394
|
+
N = /* @__PURE__ */ new WeakMap();
|
|
395
|
+
et = /* @__PURE__ */ new WeakMap();
|
|
396
|
+
vt = /* @__PURE__ */ new WeakMap();
|
|
397
|
+
st = /* @__PURE__ */ new WeakMap();
|
|
398
|
+
Nt = /* @__PURE__ */ new WeakMap();
|
|
367
399
|
D = /* @__PURE__ */ new WeakMap();
|
|
368
|
-
St = /* @__PURE__ */ new WeakMap();
|
|
369
|
-
ne = /* @__PURE__ */ new WeakMap();
|
|
370
|
-
ae = /* @__PURE__ */ new WeakMap();
|
|
371
400
|
Vt = /* @__PURE__ */ new WeakMap();
|
|
401
|
+
oe = /* @__PURE__ */ new WeakMap();
|
|
402
|
+
le = /* @__PURE__ */ new WeakMap();
|
|
403
|
+
zt = /* @__PURE__ */ new WeakMap();
|
|
372
404
|
$t = /* @__PURE__ */ new WeakMap();
|
|
373
405
|
Ft = /* @__PURE__ */ new WeakMap();
|
|
374
406
|
w = /* @__PURE__ */ new WeakMap();
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
407
|
+
Me = /* @__PURE__ */ new WeakMap();
|
|
408
|
+
d = /* @__PURE__ */ new WeakMap();
|
|
409
|
+
ce = /* @__PURE__ */ new WeakMap();
|
|
410
|
+
ue = /* @__PURE__ */ new WeakMap();
|
|
411
|
+
E = /* @__PURE__ */ new WeakMap();
|
|
412
|
+
_ = /* @__PURE__ */ new WeakMap();
|
|
413
|
+
A = /* @__PURE__ */ new WeakMap();
|
|
382
414
|
Z = /* @__PURE__ */ new WeakMap();
|
|
383
415
|
Wt = /* @__PURE__ */ new WeakMap();
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
Gt = /* @__PURE__ */ new WeakMap();
|
|
416
|
+
lt = /* @__PURE__ */ new WeakMap();
|
|
417
|
+
y = /* @__PURE__ */ new WeakMap();
|
|
418
|
+
Zt = /* @__PURE__ */ new WeakMap();
|
|
419
|
+
gt = /* @__PURE__ */ new WeakMap();
|
|
389
420
|
Kt = /* @__PURE__ */ new WeakMap();
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
421
|
+
Ut = /* @__PURE__ */ new WeakMap();
|
|
422
|
+
ie = /* @__PURE__ */ new WeakSet();
|
|
423
|
+
Ee = function() {
|
|
424
|
+
C(this, It, re).call(this), s(this, Me).assignedElements().forEach((e) => {
|
|
425
|
+
e instanceof HTMLElement && s(this, d).push(new Js(e, this));
|
|
394
426
|
}), s(this, w).style.transform = "", this.dispatchEvent(
|
|
395
427
|
new CustomEvent("sectionsChange", {
|
|
396
428
|
composed: !0
|
|
397
429
|
})
|
|
398
|
-
), s(this,
|
|
430
|
+
), s(this, j).call(this), C(this, Ve, ss).call(this);
|
|
399
431
|
};
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
s(this,
|
|
432
|
+
It = /* @__PURE__ */ new WeakSet();
|
|
433
|
+
re = function() {
|
|
434
|
+
s(this, d).forEach((e) => {
|
|
403
435
|
e.destroy();
|
|
404
|
-
}), g(this,
|
|
436
|
+
}), g(this, d, []), this.dispatchEvent(
|
|
405
437
|
new CustomEvent("sectionsChange", {
|
|
406
438
|
composed: !0
|
|
407
439
|
})
|
|
408
440
|
);
|
|
409
441
|
};
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
s(this,
|
|
442
|
+
xe = /* @__PURE__ */ new WeakSet();
|
|
443
|
+
ts = function() {
|
|
444
|
+
s(this, Kt) || (g(this, Kt, !0), s(this, p).unsubscribe(s(this, $e)), s(this, p).unlistenAnimationFrame(), s(this, Z).disconnect(), s(this, Wt).disconnect(), s(this, lt).disconnect());
|
|
413
445
|
};
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
s(this,
|
|
446
|
+
Le = /* @__PURE__ */ new WeakSet();
|
|
447
|
+
es = function() {
|
|
448
|
+
s(this, Kt) && (g(this, Kt, !1), s(this, p).subscribe(s(this, $e)), s(this, Z).connect(), s(this, Wt).connect(), s(this, lt).connect());
|
|
417
449
|
};
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
s(this,
|
|
450
|
+
pe = /* @__PURE__ */ new WeakSet();
|
|
451
|
+
De = function() {
|
|
452
|
+
s(this, Ut) || (g(this, Ut, !0), Gt.unsubscribe(s(this, j)), s(this, p).reset(), C(this, xe, ts).call(this), s(this, w).style.transform = "", s(this, N).current && C(this, It, re).call(this), xt.unregister(this));
|
|
421
453
|
};
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
s(this,
|
|
454
|
+
fe = /* @__PURE__ */ new WeakSet();
|
|
455
|
+
Re = function() {
|
|
456
|
+
s(this, Ut) && (g(this, Ut, !1), s(this, N).current && C(this, ie, Ee).call(this), xt.register(this), Gt.subscribe(s(this, j), Qe.SCROLL), C(this, Le, es).call(this));
|
|
425
457
|
};
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
s(this, D).current ? (s(this,
|
|
458
|
+
j = /* @__PURE__ */ new WeakMap();
|
|
459
|
+
$e = /* @__PURE__ */ new WeakMap();
|
|
460
|
+
Te = /* @__PURE__ */ new WeakSet();
|
|
461
|
+
bs = function(e) {
|
|
462
|
+
s(this, D).current ? (s(this, y).current = e % s(this, d).length, s(this, y).current = s(this, y).current < 0 ? s(this, d).length + s(this, y).current : s(this, y).current) : s(this, y).current = Je(e, 0, this.limit);
|
|
431
463
|
};
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
if (s(this, D).current && s(this,
|
|
436
|
-
const i = s(this, p)[e] % (s(this,
|
|
437
|
-
return i < 0 ? s(this,
|
|
464
|
+
Jt = /* @__PURE__ */ new WeakMap();
|
|
465
|
+
de = /* @__PURE__ */ new WeakSet();
|
|
466
|
+
Ae = function(e = "current") {
|
|
467
|
+
if (s(this, D).current && s(this, d).length) {
|
|
468
|
+
const i = s(this, p)[e] % (s(this, _) + s(this, E) + s(this, A));
|
|
469
|
+
return i < 0 ? s(this, _) + i + s(this, E) + s(this, A) : i;
|
|
438
470
|
} else
|
|
439
471
|
return s(this, p)[e];
|
|
440
472
|
};
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
473
|
+
Ve = /* @__PURE__ */ new WeakSet();
|
|
474
|
+
ss = function() {
|
|
475
|
+
s(this, d).length && (s(this, y).current === 0 ? this.classList.add("start") : this.classList.remove("start"), s(this, y).current === this.limit ? this.classList.add("end") : this.classList.remove("end"));
|
|
476
|
+
};
|
|
477
|
+
ze = Zs([
|
|
478
|
+
qt("e-scroll")
|
|
479
|
+
], ze);
|
|
480
|
+
var he;
|
|
481
|
+
class Fe extends gs {
|
|
446
482
|
constructor() {
|
|
447
483
|
super(...arguments);
|
|
448
|
-
|
|
484
|
+
$(this, he, null);
|
|
449
485
|
}
|
|
450
486
|
get scrollElement() {
|
|
451
|
-
return
|
|
487
|
+
return a(this, he);
|
|
452
488
|
}
|
|
453
489
|
connectedCallback() {
|
|
454
|
-
const r =
|
|
455
|
-
r instanceof
|
|
490
|
+
const r = Us(this, ze);
|
|
491
|
+
r instanceof ze ? R(this, he, r) : console.error(this, "e-scroll not found");
|
|
456
492
|
}
|
|
457
493
|
}
|
|
458
|
-
|
|
459
|
-
var
|
|
460
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
461
|
-
(
|
|
462
|
-
return h && n &&
|
|
463
|
-
},
|
|
494
|
+
he = new WeakMap();
|
|
495
|
+
var Xs = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, js = (e, i, r, h) => {
|
|
496
|
+
for (var n = h > 1 ? void 0 : h ? Ys(i, r) : i, u = e.length - 1, m; u >= 0; u--)
|
|
497
|
+
(m = e[u]) && (n = (h ? m(i, r, n) : m(n)) || n);
|
|
498
|
+
return h && n && Xs(i, r, n), n;
|
|
499
|
+
}, _s = (e, i, r) => {
|
|
464
500
|
if (!i.has(e))
|
|
465
501
|
throw TypeError("Cannot " + r);
|
|
466
|
-
}, c = (e, i, r) => (
|
|
502
|
+
}, c = (e, i, r) => (_s(e, i, "read from private field"), r ? r.call(e) : i.get(e)), K = (e, i, r) => {
|
|
467
503
|
if (i.has(e))
|
|
468
504
|
throw TypeError("Cannot add the same private member more than once");
|
|
469
505
|
i instanceof WeakSet ? i.add(e) : i.set(e, r);
|
|
470
|
-
},
|
|
471
|
-
const
|
|
506
|
+
}, St = (e, i, r, h) => (_s(e, i, "write to private field"), h ? h.call(e, r) : i.set(e, r), r), Qt, O, it, rt, Xt, Yt, Ot, Se, me, ve;
|
|
507
|
+
const ti = Ye({
|
|
472
508
|
":host": {
|
|
473
509
|
display: "inline-block",
|
|
474
510
|
zIndex: "1",
|
|
475
|
-
backgroundColor:
|
|
511
|
+
backgroundColor: ls.colorLight.var
|
|
476
512
|
},
|
|
477
513
|
':host([axis="y"])': {
|
|
478
514
|
position: "absolute",
|
|
@@ -489,7 +525,7 @@ const Qs = Je({
|
|
|
489
525
|
height: "1vmin"
|
|
490
526
|
},
|
|
491
527
|
".default-thumb": {
|
|
492
|
-
backgroundColor:
|
|
528
|
+
backgroundColor: ls.colorDark.var,
|
|
493
529
|
borderRadius: "1vmin",
|
|
494
530
|
touchAction: "none"
|
|
495
531
|
},
|
|
@@ -497,289 +533,289 @@ const Qs = Je({
|
|
|
497
533
|
touchAction: "none"
|
|
498
534
|
}
|
|
499
535
|
});
|
|
500
|
-
let
|
|
536
|
+
let us = class extends Fe {
|
|
501
537
|
constructor() {
|
|
502
|
-
super(),
|
|
503
|
-
|
|
504
|
-
const e = c(this,
|
|
505
|
-
|
|
506
|
-
}),
|
|
507
|
-
|
|
508
|
-
}),
|
|
509
|
-
this.setAttribute("axis", this.scrollElement.
|
|
510
|
-
}),
|
|
511
|
-
document.documentElement.classList.add("grabbing"),
|
|
538
|
+
super(), K(this, Qt, null), K(this, O, null), K(this, it, !1), K(this, rt, 0), K(this, Xt, 0), K(this, Yt, 0), K(this, Ot, () => {
|
|
539
|
+
St(this, it, this.offsetWidth > this.offsetHeight);
|
|
540
|
+
const e = c(this, it) ? this.offsetWidth : this.offsetHeight;
|
|
541
|
+
St(this, rt, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), St(this, rt, Math.max(c(this, rt), 30)), c(this, it) ? (c(this, O).style.width = c(this, rt) + "px", c(this, O).style.height = "100%") : (c(this, O).style.width = "100%", c(this, O).style.height = c(this, rt) + "px"), St(this, Xt, e - c(this, rt)), this.scrollElement.scrollSize || (this.style.display = "none");
|
|
542
|
+
}), K(this, Se, () => {
|
|
543
|
+
St(this, Yt, this.scrollElement.currentProgress * c(this, Xt)), c(this, it) ? c(this, O).style.transform = `translate3d(${c(this, Yt)}px, 0px, 0px)` : c(this, O).style.transform = `translate3d(0px, ${c(this, Yt)}px, 0px)`;
|
|
544
|
+
}), K(this, me, () => {
|
|
545
|
+
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
546
|
+
}), K(this, ve, (e) => {
|
|
547
|
+
document.documentElement.classList.add("grabbing"), Ks(
|
|
512
548
|
(h) => {
|
|
513
|
-
const n = c(this,
|
|
514
|
-
this.scrollElement.setPosition(i +
|
|
549
|
+
const n = c(this, it) ? h.x : h.y, u = this.scrollElement.distance / c(this, Xt), m = (n - r) * u;
|
|
550
|
+
this.scrollElement.setPosition(i + m);
|
|
515
551
|
},
|
|
516
552
|
() => {
|
|
517
553
|
document.documentElement.classList.remove("grabbing");
|
|
518
554
|
}
|
|
519
555
|
);
|
|
520
|
-
const i = this.scrollElement.targetScrollValue, r = c(this,
|
|
521
|
-
}),
|
|
556
|
+
const i = this.scrollElement.targetScrollValue, r = c(this, it) ? e.x : e.y;
|
|
557
|
+
}), Ze && (this.openShadow(ti), Xe(this, {
|
|
522
558
|
slot: "static",
|
|
523
559
|
"drag-dead-zone": "",
|
|
524
560
|
children: [
|
|
525
|
-
|
|
526
|
-
ref: (e) =>
|
|
527
|
-
children:
|
|
561
|
+
We({
|
|
562
|
+
ref: (e) => St(this, Qt, e),
|
|
563
|
+
children: Oe({ class: "default-thumb" })
|
|
528
564
|
})
|
|
529
565
|
]
|
|
530
566
|
}));
|
|
531
567
|
}
|
|
532
568
|
get thumbElement() {
|
|
533
|
-
return c(this,
|
|
569
|
+
return c(this, O);
|
|
534
570
|
}
|
|
535
571
|
connectedCallback() {
|
|
536
572
|
super.connectedCallback();
|
|
537
|
-
const e = c(this,
|
|
538
|
-
|
|
573
|
+
const e = c(this, Qt).assignedElements()[0] || c(this, Qt).firstElementChild;
|
|
574
|
+
St(this, O, e), c(this, O).addEventListener("pointerdown", c(this, ve)), Gt.subscribe(c(this, Ot), Qe.SCROLL + 1), cs.subscribe(this, c(this, Ot)), this.scrollElement.onScroll(c(this, Se)), this.scrollElement.axisCSSProperty.subscribe(c(this, me));
|
|
539
575
|
}
|
|
540
576
|
disconnectedCallback() {
|
|
541
|
-
c(this,
|
|
577
|
+
c(this, O).removeEventListener("pointerdown", c(this, ve)), Gt.unsubscribe(c(this, Ot)), cs.unsubscribe(c(this, Ot)), this.scrollElement.offScroll(c(this, Se)), this.scrollElement.axisCSSProperty.unsubscribe(c(this, me));
|
|
542
578
|
}
|
|
543
579
|
};
|
|
544
|
-
Zt = /* @__PURE__ */ new WeakMap();
|
|
545
|
-
z = /* @__PURE__ */ new WeakMap();
|
|
546
|
-
et = /* @__PURE__ */ new WeakMap();
|
|
547
|
-
st = /* @__PURE__ */ new WeakMap();
|
|
548
|
-
Jt = /* @__PURE__ */ new WeakMap();
|
|
549
580
|
Qt = /* @__PURE__ */ new WeakMap();
|
|
581
|
+
O = /* @__PURE__ */ new WeakMap();
|
|
582
|
+
it = /* @__PURE__ */ new WeakMap();
|
|
583
|
+
rt = /* @__PURE__ */ new WeakMap();
|
|
584
|
+
Xt = /* @__PURE__ */ new WeakMap();
|
|
585
|
+
Yt = /* @__PURE__ */ new WeakMap();
|
|
550
586
|
Ot = /* @__PURE__ */ new WeakMap();
|
|
551
|
-
|
|
552
|
-
de = /* @__PURE__ */ new WeakMap();
|
|
587
|
+
Se = /* @__PURE__ */ new WeakMap();
|
|
553
588
|
me = /* @__PURE__ */ new WeakMap();
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
589
|
+
ve = /* @__PURE__ */ new WeakMap();
|
|
590
|
+
us = js([
|
|
591
|
+
qt("e-scrollbar")
|
|
592
|
+
], us);
|
|
593
|
+
const ei = Ye({
|
|
558
594
|
button: {
|
|
559
595
|
all: "inherit"
|
|
560
596
|
}
|
|
561
597
|
});
|
|
562
|
-
class
|
|
598
|
+
class Cs extends Fe {
|
|
563
599
|
constructor() {
|
|
564
|
-
super(), this.openShadow(
|
|
600
|
+
super(), this.openShadow(ei), Ze && Xe(this, {
|
|
565
601
|
children: [
|
|
566
|
-
|
|
602
|
+
Hs({
|
|
567
603
|
onClick: () => {
|
|
568
604
|
this.handleClick();
|
|
569
605
|
},
|
|
570
|
-
children: [
|
|
606
|
+
children: [We()]
|
|
571
607
|
})
|
|
572
608
|
]
|
|
573
609
|
});
|
|
574
610
|
}
|
|
575
611
|
}
|
|
576
|
-
var
|
|
577
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
578
|
-
(
|
|
579
|
-
return h && n &&
|
|
612
|
+
var si = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, ri = (e, i, r, h) => {
|
|
613
|
+
for (var n = h > 1 ? void 0 : h ? ii(i, r) : i, u = e.length - 1, m; u >= 0; u--)
|
|
614
|
+
(m = e[u]) && (n = (h ? m(i, r, n) : m(n)) || n);
|
|
615
|
+
return h && n && si(i, r, n), n;
|
|
580
616
|
};
|
|
581
|
-
let
|
|
617
|
+
let ps = class extends Cs {
|
|
582
618
|
handleClick() {
|
|
583
619
|
const e = this.getAttribute("index"), i = this.getAttribute("behaviour");
|
|
584
620
|
this.scrollElement.scrollToSection(parseInt(e || "0"), i);
|
|
585
621
|
}
|
|
586
622
|
};
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
],
|
|
590
|
-
var
|
|
591
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
592
|
-
(
|
|
593
|
-
return h && n &&
|
|
623
|
+
ps = ri([
|
|
624
|
+
qt("e-scroll-set-button")
|
|
625
|
+
], ps);
|
|
626
|
+
var hi = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ai = (e, i, r, h) => {
|
|
627
|
+
for (var n = h > 1 ? void 0 : h ? ni(i, r) : i, u = e.length - 1, m; u >= 0; u--)
|
|
628
|
+
(m = e[u]) && (n = (h ? m(i, r, n) : m(n)) || n);
|
|
629
|
+
return h && n && hi(i, r, n), n;
|
|
594
630
|
};
|
|
595
|
-
let
|
|
631
|
+
let fs = class extends Cs {
|
|
596
632
|
handleClick() {
|
|
597
633
|
const e = this.getAttribute("step"), i = this.getAttribute("behaviour");
|
|
598
634
|
this.scrollElement.shiftSections(parseInt(e || "1"), i);
|
|
599
635
|
}
|
|
600
636
|
};
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
],
|
|
604
|
-
var
|
|
605
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
606
|
-
(
|
|
607
|
-
return h && n &&
|
|
608
|
-
},
|
|
637
|
+
fs = ai([
|
|
638
|
+
qt("e-scroll-step-button")
|
|
639
|
+
], fs);
|
|
640
|
+
var oi = Object.defineProperty, li = Object.getOwnPropertyDescriptor, ci = (e, i, r, h) => {
|
|
641
|
+
for (var n = h > 1 ? void 0 : h ? li(i, r) : i, u = e.length - 1, m; u >= 0; u--)
|
|
642
|
+
(m = e[u]) && (n = (h ? m(i, r, n) : m(n)) || n);
|
|
643
|
+
return h && n && oi(i, r, n), n;
|
|
644
|
+
}, ys = (e, i, r) => {
|
|
609
645
|
if (!i.has(e))
|
|
610
646
|
throw TypeError("Cannot " + r);
|
|
611
|
-
},
|
|
647
|
+
}, Lt = (e, i, r) => (ys(e, i, "read from private field"), r ? r.call(e) : i.get(e)), ds = (e, i, r) => {
|
|
612
648
|
if (i.has(e))
|
|
613
649
|
throw TypeError("Cannot add the same private member more than once");
|
|
614
650
|
i instanceof WeakSet ? i.add(e) : i.set(e, r);
|
|
615
|
-
},
|
|
616
|
-
class
|
|
651
|
+
}, Ss = (e, i, r, h) => (ys(e, i, "write to private field"), h ? h.call(e, r) : i.set(e, r), r), wt, jt, Y, dt, Bt, ne, ae, Ht;
|
|
652
|
+
class ui {
|
|
617
653
|
constructor(i, r, h) {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
654
|
+
$(this, Y, void 0);
|
|
655
|
+
$(this, dt, void 0);
|
|
656
|
+
$(this, Bt, void 0);
|
|
657
|
+
$(this, ne, void 0);
|
|
658
|
+
$(this, ae, () => {
|
|
659
|
+
a(this, dt).scrollToSection(a(this, Bt), a(this, ne));
|
|
624
660
|
});
|
|
625
|
-
|
|
626
|
-
|
|
661
|
+
$(this, Ht, () => {
|
|
662
|
+
a(this, Y).classList.toggle(
|
|
627
663
|
"current",
|
|
628
|
-
|
|
664
|
+
a(this, dt).counter.current === a(this, Bt)
|
|
629
665
|
);
|
|
630
666
|
});
|
|
631
|
-
|
|
667
|
+
R(this, Y, document.createElement("button")), R(this, dt, i), R(this, ne, h), R(this, Bt, r), a(this, Y).addEventListener("click", a(this, ae)), a(this, dt).counter.subscribe(a(this, Ht)), a(this, Ht).call(this);
|
|
632
668
|
}
|
|
633
669
|
get element() {
|
|
634
|
-
return
|
|
670
|
+
return a(this, Y);
|
|
635
671
|
}
|
|
636
672
|
destroy() {
|
|
637
|
-
|
|
673
|
+
a(this, Y).removeEventListener("click", a(this, ae)), a(this, dt).counter.unsubscribe(a(this, Ht)), a(this, Y).remove();
|
|
638
674
|
}
|
|
639
675
|
}
|
|
640
|
-
Y = new WeakMap(),
|
|
641
|
-
let
|
|
676
|
+
Y = new WeakMap(), dt = new WeakMap(), Bt = new WeakMap(), ne = new WeakMap(), ae = new WeakMap(), Ht = new WeakMap();
|
|
677
|
+
let ms = class extends Fe {
|
|
642
678
|
constructor() {
|
|
643
|
-
super(...arguments),
|
|
644
|
-
|
|
679
|
+
super(...arguments), ds(this, wt, []), ds(this, jt, ws(() => {
|
|
680
|
+
Lt(this, wt).forEach((e) => e.destroy()), Ss(this, wt, []);
|
|
645
681
|
for (let e = 0; e < this.scrollElement.sections.length; e++) {
|
|
646
|
-
const i = new
|
|
682
|
+
const i = new ui(
|
|
647
683
|
this.scrollElement,
|
|
648
684
|
e,
|
|
649
685
|
this.getAttribute("behaviour") || "smooth"
|
|
650
686
|
);
|
|
651
|
-
this.appendChild(i.element),
|
|
687
|
+
this.appendChild(i.element), Lt(this, wt).push(i);
|
|
652
688
|
}
|
|
653
689
|
}, 0));
|
|
654
690
|
}
|
|
655
691
|
connectedCallback() {
|
|
656
692
|
super.connectedCallback(), this.scrollElement.addEventListener(
|
|
657
693
|
"sectionsChange",
|
|
658
|
-
|
|
659
|
-
),
|
|
694
|
+
Lt(this, jt)
|
|
695
|
+
), Lt(this, jt).call(this);
|
|
660
696
|
}
|
|
661
697
|
disconnectedCallback() {
|
|
662
698
|
this.scrollElement.removeEventListener(
|
|
663
699
|
"sectionsChange",
|
|
664
|
-
|
|
665
|
-
),
|
|
700
|
+
Lt(this, jt)
|
|
701
|
+
), Lt(this, wt).forEach((e) => e.destroy()), Ss(this, wt, []);
|
|
666
702
|
}
|
|
667
703
|
};
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
],
|
|
673
|
-
var
|
|
674
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
675
|
-
(
|
|
676
|
-
return h && n &&
|
|
677
|
-
},
|
|
704
|
+
wt = /* @__PURE__ */ new WeakMap();
|
|
705
|
+
jt = /* @__PURE__ */ new WeakMap();
|
|
706
|
+
ms = ci([
|
|
707
|
+
qt("e-scroll-bullet-buttons")
|
|
708
|
+
], ms);
|
|
709
|
+
var pi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, di = (e, i, r, h) => {
|
|
710
|
+
for (var n = h > 1 ? void 0 : h ? fi(i, r) : i, u = e.length - 1, m; u >= 0; u--)
|
|
711
|
+
(m = e[u]) && (n = (h ? m(i, r, n) : m(n)) || n);
|
|
712
|
+
return h && n && pi(i, r, n), n;
|
|
713
|
+
}, is = (e, i, r) => {
|
|
678
714
|
if (!i.has(e))
|
|
679
715
|
throw TypeError("Cannot " + r);
|
|
680
|
-
}, t = (e, i, r) => (
|
|
716
|
+
}, t = (e, i, r) => (is(e, i, "read from private field"), r ? r.call(e) : i.get(e)), o = (e, i, r) => {
|
|
681
717
|
if (i.has(e))
|
|
682
718
|
throw TypeError("Cannot add the same private member more than once");
|
|
683
719
|
i instanceof WeakSet ? i.add(e) : i.set(e, r);
|
|
684
|
-
},
|
|
685
|
-
let
|
|
720
|
+
}, S = (e, i, r, h) => (is(e, i, "write to private field"), h ? h.call(e, r) : i.set(e, r), r), k = (e, i, r) => (is(e, i, "access private method"), r), Dt, bt, _t, Ct, yt, z, B, H, G, Pt, L, ct, ut, nt, at, ot, Rt, te, x, q, U, pt, ft, J, ge, v, Tt, At, we, I, Q, V, M, T, ee, Mt, W, be, Ie, rs, ks, Be, Ps, He, Ws, Ge, Ms, Ke, Es, Ue, xs, qe, Ls, _e, se, ht, kt, hs, Vs, ns, zs, Ce, Ne, ye;
|
|
721
|
+
let vs = class extends Fe {
|
|
686
722
|
constructor() {
|
|
687
|
-
super(...arguments),
|
|
723
|
+
super(...arguments), o(this, be), o(this, rs), o(this, Be), o(this, He), o(this, Ge), o(this, Ke), o(this, Ue), o(this, qe), o(this, ht), o(this, hs), o(this, ns), o(this, Ce), o(this, Dt, new f(this, "--target", "")), o(this, bt, new f(this, "--disabled", !1)), o(this, _t, new f(
|
|
688
724
|
this,
|
|
689
725
|
"--distance-offset",
|
|
690
726
|
0
|
|
691
|
-
)),
|
|
727
|
+
)), o(this, Ct, new f(this, "--start-offset", 0)), o(this, yt, new f(
|
|
692
728
|
this,
|
|
693
729
|
"--capture-once",
|
|
694
730
|
!1
|
|
695
|
-
)),
|
|
731
|
+
)), o(this, z, new f(this, "--captured", "")), o(this, B, new f(this, "--released", "")), o(this, H, new f(
|
|
696
732
|
this,
|
|
697
733
|
"--captured-from-start",
|
|
698
734
|
""
|
|
699
|
-
)),
|
|
735
|
+
)), o(this, G, new f(
|
|
700
736
|
this,
|
|
701
737
|
"--captured-from-finish",
|
|
702
738
|
""
|
|
703
|
-
)),
|
|
739
|
+
)), o(this, Pt, new f(
|
|
704
740
|
this,
|
|
705
741
|
"--released-from-start",
|
|
706
742
|
""
|
|
707
|
-
)),
|
|
743
|
+
)), o(this, L, new f(
|
|
708
744
|
this,
|
|
709
745
|
"--released-from-finish",
|
|
710
746
|
""
|
|
711
|
-
)),
|
|
747
|
+
)), o(this, ct, new f(this, "--passed-var", "")), o(this, ut, new f(this, "--progress-var", "")), o(this, nt, new f(this, "--distance-var", "")), o(this, at, new f(this, "--start-var", "")), o(this, ot, new f(this, "--finish-var", "")), o(this, Rt, new f(this, "--smoothstep", !1)), o(this, te, new f(
|
|
712
748
|
this,
|
|
713
749
|
"--smootherstep",
|
|
714
750
|
!1
|
|
715
|
-
)),
|
|
716
|
-
t(this,
|
|
717
|
-
}),
|
|
718
|
-
!t(this,
|
|
719
|
-
}),
|
|
720
|
-
const e =
|
|
751
|
+
)), o(this, x, new mt(!1)), o(this, q, new mt(!1)), o(this, U, new mt(!1)), o(this, pt, new mt(!1)), o(this, ft, new mt(!1)), o(this, J, new mt(!1)), o(this, ge, []), o(this, v, this), o(this, Tt, 0), o(this, At, 0), o(this, we, 0), o(this, I, 0), o(this, Q, 0), o(this, V, 0), o(this, M, 0), o(this, T, 0), o(this, ee, !1), o(this, Mt, !1), o(this, W, !0), o(this, _e, () => {
|
|
752
|
+
t(this, W) || (this.resize(), t(this, se).call(this));
|
|
753
|
+
}), o(this, se, () => {
|
|
754
|
+
!t(this, W) && t(this, ee) && this.tick();
|
|
755
|
+
}), o(this, ye, ws(() => {
|
|
756
|
+
const e = xt.getAll(this).reverse();
|
|
721
757
|
let i = 0;
|
|
722
758
|
e.forEach((r, h) => {
|
|
723
759
|
r.element === this.scrollElement && (i = h);
|
|
724
|
-
}),
|
|
760
|
+
}), S(this, ge, e.slice(i + 1));
|
|
725
761
|
}, 0));
|
|
726
762
|
}
|
|
727
763
|
get distanceOffsetCSSProperty() {
|
|
728
|
-
return t(this,
|
|
764
|
+
return t(this, _t);
|
|
729
765
|
}
|
|
730
766
|
get startOffsetCSSProperty() {
|
|
731
|
-
return t(this,
|
|
767
|
+
return t(this, Ct);
|
|
732
768
|
}
|
|
733
769
|
get captureOnceCSSProperty() {
|
|
734
|
-
return t(this,
|
|
770
|
+
return t(this, yt);
|
|
735
771
|
}
|
|
736
772
|
get capturedCSSProperty() {
|
|
737
|
-
return t(this,
|
|
773
|
+
return t(this, z);
|
|
738
774
|
}
|
|
739
775
|
get releasedCSSProperty() {
|
|
740
|
-
return t(this,
|
|
776
|
+
return t(this, B);
|
|
741
777
|
}
|
|
742
778
|
get capturedFromStartCSSProperty() {
|
|
743
|
-
return t(this,
|
|
779
|
+
return t(this, H);
|
|
744
780
|
}
|
|
745
781
|
get capturedFromFinishCSSProperty() {
|
|
746
|
-
return t(this,
|
|
782
|
+
return t(this, G);
|
|
747
783
|
}
|
|
748
784
|
get releasedFromStartCSSProperty() {
|
|
749
|
-
return t(this,
|
|
785
|
+
return t(this, Pt);
|
|
750
786
|
}
|
|
751
787
|
get releasedFromFinishCSSProperty() {
|
|
752
|
-
return t(this,
|
|
788
|
+
return t(this, L);
|
|
753
789
|
}
|
|
754
790
|
get passedVarCSSProperty() {
|
|
755
|
-
return t(this,
|
|
791
|
+
return t(this, ct);
|
|
756
792
|
}
|
|
757
793
|
get progressVarCSSProperty() {
|
|
758
|
-
return t(this,
|
|
794
|
+
return t(this, ut);
|
|
759
795
|
}
|
|
760
796
|
get distanceVarCSSProperty() {
|
|
761
|
-
return t(this,
|
|
797
|
+
return t(this, nt);
|
|
762
798
|
}
|
|
763
799
|
get startVarCSSProperty() {
|
|
764
|
-
return t(this,
|
|
800
|
+
return t(this, at);
|
|
765
801
|
}
|
|
766
802
|
get finishVarCSSProperty() {
|
|
767
|
-
return t(this,
|
|
803
|
+
return t(this, ot);
|
|
768
804
|
}
|
|
769
805
|
get smoothstepCSSProperty() {
|
|
770
|
-
return t(this,
|
|
806
|
+
return t(this, Rt);
|
|
771
807
|
}
|
|
772
808
|
get smootherstepCSSProperty() {
|
|
773
|
-
return t(this,
|
|
809
|
+
return t(this, te);
|
|
774
810
|
}
|
|
775
811
|
get disabledCSSProperty() {
|
|
776
|
-
return t(this,
|
|
812
|
+
return t(this, bt);
|
|
777
813
|
}
|
|
778
814
|
get targetCSSProperty() {
|
|
779
|
-
return t(this,
|
|
815
|
+
return t(this, Dt);
|
|
780
816
|
}
|
|
781
817
|
get isCaptured() {
|
|
782
|
-
return t(this,
|
|
818
|
+
return t(this, x);
|
|
783
819
|
}
|
|
784
820
|
get isReleased() {
|
|
785
821
|
return t(this, q);
|
|
@@ -788,100 +824,100 @@ let fs = class extends Ve {
|
|
|
788
824
|
return t(this, U);
|
|
789
825
|
}
|
|
790
826
|
get isReleasedFromStart() {
|
|
791
|
-
return t(this,
|
|
827
|
+
return t(this, pt);
|
|
792
828
|
}
|
|
793
829
|
get isCapturedFromFinish() {
|
|
794
|
-
return t(this,
|
|
830
|
+
return t(this, ft);
|
|
795
831
|
}
|
|
796
832
|
get isReleasedFromFinish() {
|
|
797
833
|
return t(this, J);
|
|
798
834
|
}
|
|
799
835
|
get directionPosition() {
|
|
800
|
-
return t(this,
|
|
836
|
+
return t(this, Tt);
|
|
801
837
|
}
|
|
802
838
|
get directionSize() {
|
|
803
|
-
return t(this,
|
|
839
|
+
return t(this, At);
|
|
804
840
|
}
|
|
805
841
|
get passed() {
|
|
806
|
-
return t(this,
|
|
842
|
+
return t(this, I);
|
|
807
843
|
}
|
|
808
844
|
get progress() {
|
|
809
845
|
return t(this, Q);
|
|
810
846
|
}
|
|
811
847
|
get start() {
|
|
812
|
-
return t(this,
|
|
848
|
+
return t(this, V);
|
|
813
849
|
}
|
|
814
850
|
get finish() {
|
|
815
|
-
return t(this,
|
|
851
|
+
return t(this, T);
|
|
816
852
|
}
|
|
817
853
|
get distance() {
|
|
818
|
-
return t(this,
|
|
854
|
+
return t(this, M);
|
|
819
855
|
}
|
|
820
856
|
get isCapturedOnce() {
|
|
821
|
-
return t(this,
|
|
857
|
+
return t(this, Mt);
|
|
822
858
|
}
|
|
823
859
|
get isDisabled() {
|
|
824
|
-
return t(this,
|
|
860
|
+
return t(this, W);
|
|
825
861
|
}
|
|
826
862
|
resize() {
|
|
827
|
-
|
|
863
|
+
S(this, At, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), S(this, Tt, this.scrollElement.vertical ? ke(this, this.scrollElement) : Pe(this, this.scrollElement)), S(this, V, this.getStart()), S(this, M, this.getDistance()), S(this, V, t(this, V) + t(this, Ct).current), S(this, M, t(this, M) + t(this, _t).current), S(this, T, t(this, V) + t(this, M)), this.scrollElement.currentScrollValue > t(this, T) && !t(this, x).current && !t(this, q).current && (t(this, x).current = !0), this.setVar(t(this, at).current, t(this, V)), this.setVar(t(this, ot).current, t(this, T)), this.setVar(t(this, nt).current, t(this, M)), S(this, ee, !0);
|
|
828
864
|
}
|
|
829
865
|
tick() {
|
|
830
866
|
let e = this.scrollElement.currentScrollValue;
|
|
831
|
-
t(this,
|
|
867
|
+
t(this, ge).forEach((r) => {
|
|
832
868
|
e += r.value;
|
|
833
|
-
}),
|
|
869
|
+
}), S(this, I, this.updateValue(e - t(this, V), 0, t(this, M)) || 0), S(this, Q, t(this, I) / t(this, M) || 0);
|
|
834
870
|
const i = Math.round(e);
|
|
835
|
-
t(this,
|
|
871
|
+
t(this, x).current && (i > t(this, V) ? t(this, U).current || k(this, Ge, Ms).call(this) : t(this, U).current && !t(this, pt).current && k(this, Ue, xs).call(this), i < t(this, T) ? t(this, J).current && !t(this, ft).current && k(this, Ke, Es).call(this) : t(this, U).current && !t(this, J).current && k(this, qe, Ls).call(this)), i > t(this, V) && i < t(this, T) ? (k(this, be, Ie).call(this), t(this, x).current || k(this, Be, Ps).call(this)) : t(this, x).current && (S(this, I, Fs(t(this, M) / 2, t(this, I), 0, t(this, M))), S(this, Q, t(this, I) / t(this, M)), k(this, be, Ie).call(this), k(this, He, Ws).call(this)), t(this, Mt) && t(this, yt).current && (t(this, z).current && t(this, v).classList.add(t(this, z).current), S(this, W, !0));
|
|
836
872
|
}
|
|
837
873
|
disable() {
|
|
838
|
-
this.style.cssText = "",
|
|
874
|
+
this.style.cssText = "", S(this, Tt, 0), S(this, At, 0), S(this, I, 0), S(this, Q, 0), S(this, V, 0), S(this, M, 0), S(this, T, 0), S(this, ee, !1), t(this, x).current = !1, t(this, q).current = !1, t(this, U).current = !1, t(this, pt).current = !1, t(this, ft).current = !1, t(this, J).current = !1, S(this, Mt, !1), S(this, W, !0), k(this, Ce, Ne).call(this);
|
|
839
875
|
}
|
|
840
876
|
enable() {
|
|
841
|
-
|
|
877
|
+
S(this, W, !1);
|
|
842
878
|
}
|
|
843
879
|
connectedCallback() {
|
|
844
|
-
super.connectedCallback(), t(this,
|
|
880
|
+
super.connectedCallback(), t(this, Dt).observe(), t(this, bt).observe(), t(this, _t).observe(), t(this, Ct).observe(), t(this, yt).observe(), t(this, z).observe(), t(this, B).observe(), t(this, H).observe(), t(this, G).observe(), t(this, Pt).observe(), t(this, L).observe(), t(this, ct).observe(), t(this, ut).observe(), t(this, nt).observe(), t(this, at).observe(), t(this, ot).observe(), t(this, Rt).observe(), t(this, te).observe();
|
|
845
881
|
let e = !1;
|
|
846
882
|
this.scrollElement.addEventListener(
|
|
847
883
|
"sectionsChange",
|
|
848
|
-
t(this,
|
|
849
|
-
), t(this,
|
|
850
|
-
i.previous &&
|
|
851
|
-
}), t(this,
|
|
884
|
+
t(this, ye)
|
|
885
|
+
), t(this, ye).call(this), t(this, bt).current || this.enable(), t(this, Dt).subscribe((i) => {
|
|
886
|
+
i.previous && k(this, Ce, Ne).call(this), i.current ? i.current === "parent" ? S(this, v, this.parentElement || this) : S(this, v, document.querySelector(i.current) || this) : S(this, v, this);
|
|
887
|
+
}), t(this, bt).subscribe((i) => {
|
|
852
888
|
i.current && !i.previous ? this.disable() : !i.current && i.previous && (this.resize(), this.enable());
|
|
889
|
+
}), t(this, Ct).subscribe(() => {
|
|
890
|
+
e && !t(this, W) && this.resize();
|
|
853
891
|
}), t(this, _t).subscribe(() => {
|
|
854
|
-
e && !t(this,
|
|
855
|
-
}), t(this,
|
|
856
|
-
|
|
857
|
-
}), t(this, $).subscribe((i) => {
|
|
858
|
-
_(this, it, yt).call(this, i);
|
|
859
|
-
}), t(this, B).subscribe((i) => {
|
|
860
|
-
_(this, it, yt).call(this, i);
|
|
892
|
+
e && !t(this, W) && this.resize();
|
|
893
|
+
}), t(this, z).subscribe((i) => {
|
|
894
|
+
k(this, ht, kt).call(this, i);
|
|
861
895
|
}), t(this, H).subscribe((i) => {
|
|
862
|
-
|
|
863
|
-
}), t(this,
|
|
864
|
-
|
|
865
|
-
}), t(this,
|
|
866
|
-
|
|
867
|
-
}), t(this,
|
|
868
|
-
|
|
869
|
-
}), t(this,
|
|
870
|
-
|
|
896
|
+
k(this, ht, kt).call(this, i);
|
|
897
|
+
}), t(this, G).subscribe((i) => {
|
|
898
|
+
k(this, ht, kt).call(this, i);
|
|
899
|
+
}), t(this, B).subscribe((i) => {
|
|
900
|
+
k(this, ht, kt).call(this, i);
|
|
901
|
+
}), t(this, Pt).subscribe((i) => {
|
|
902
|
+
k(this, ht, kt).call(this, i);
|
|
903
|
+
}), t(this, L).subscribe((i) => {
|
|
904
|
+
k(this, ht, kt).call(this, i);
|
|
905
|
+
}), t(this, yt).subscribe((i) => {
|
|
906
|
+
t(this, W) || !i.current && i.previous && (this.resize(), this.enable());
|
|
907
|
+
}), t(this, ct).subscribe((i) => {
|
|
908
|
+
t(this, W) || (this.removeVar(i.previous), this.setVar(i.current, this.passed));
|
|
909
|
+
}), t(this, ut).subscribe((i) => {
|
|
910
|
+
t(this, W) || (this.removeVar(i.previous), this.setVar(i.current, t(this, Q)));
|
|
911
|
+
}), t(this, at).subscribe((i) => {
|
|
912
|
+
t(this, W) || (this.removeVar(i.previous), this.setVar(i.current, t(this, V)));
|
|
871
913
|
}), t(this, ot).subscribe((i) => {
|
|
872
|
-
t(this,
|
|
873
|
-
}), t(this, lt).subscribe((i) => {
|
|
874
|
-
t(this, y) || (this.removeVar(i.previous), this.setVar(i.current, t(this, Q)));
|
|
875
|
-
}), t(this, ht).subscribe((i) => {
|
|
876
|
-
t(this, y) || (this.removeVar(i.previous), this.setVar(i.current, t(this, x)));
|
|
914
|
+
t(this, W) || (this.removeVar(i.previous), this.setVar(i.current, t(this, T)));
|
|
877
915
|
}), t(this, nt).subscribe((i) => {
|
|
878
|
-
t(this,
|
|
879
|
-
}), t(this,
|
|
880
|
-
t(this, y) || (this.removeVar(i.previous), this.setVar(i.current, t(this, P)));
|
|
881
|
-
}), Ht.subscribe(t(this, we), Ne.SEGMENT), this.scrollElement.onScroll(t(this, te)), e = !0;
|
|
916
|
+
t(this, W) || (this.removeVar(i.previous), this.setVar(i.current, t(this, M)));
|
|
917
|
+
}), Gt.subscribe(t(this, _e), Qe.SEGMENT), this.scrollElement.onScroll(t(this, se)), e = !0;
|
|
882
918
|
}
|
|
883
919
|
disconnectedCallback() {
|
|
884
|
-
|
|
920
|
+
Gt.unsubscribe(t(this, _e)), this.scrollElement.offScroll(t(this, se)), t(this, Dt).close(), t(this, bt).close(), t(this, _t).close(), t(this, Ct).close(), t(this, yt).close(), t(this, z).close(), t(this, B).close(), t(this, H).close(), t(this, G).close(), t(this, Pt).close(), t(this, L).close(), t(this, ct).close(), t(this, ut).close(), t(this, nt).close(), t(this, at).close(), t(this, ot).close(), t(this, Rt).close(), t(this, te).close(), t(this, x).close(), t(this, q).close(), t(this, U).close(), t(this, pt).close(), t(this, ft).close(), t(this, J).close(), this.disable();
|
|
885
921
|
}
|
|
886
922
|
removeVar(e) {
|
|
887
923
|
e && t(this, v).style.removeProperty(`--${e}`);
|
|
@@ -890,145 +926,145 @@ let fs = class extends Ve {
|
|
|
890
926
|
e && t(this, v).style.setProperty(`--${e}`, i.toString());
|
|
891
927
|
}
|
|
892
928
|
updateValue(e, i = 0, r = 1) {
|
|
893
|
-
return this.smootherstepCSSProperty.current ?
|
|
929
|
+
return this.smootherstepCSSProperty.current ? Os(e, i, r) * r : t(this, Rt).current ? Ds(e, i, r) * r : Je(e, i, r);
|
|
894
930
|
}
|
|
895
931
|
getDistance() {
|
|
896
|
-
return t(this,
|
|
932
|
+
return t(this, At) + t(this, we);
|
|
897
933
|
}
|
|
898
934
|
getStart() {
|
|
899
|
-
return t(this,
|
|
935
|
+
return t(this, Tt) - t(this, we);
|
|
900
936
|
}
|
|
901
937
|
};
|
|
902
|
-
|
|
903
|
-
wt = /* @__PURE__ */ new WeakMap();
|
|
938
|
+
Dt = /* @__PURE__ */ new WeakMap();
|
|
904
939
|
bt = /* @__PURE__ */ new WeakMap();
|
|
905
940
|
_t = /* @__PURE__ */ new WeakMap();
|
|
906
941
|
Ct = /* @__PURE__ */ new WeakMap();
|
|
907
|
-
|
|
908
|
-
|
|
942
|
+
yt = /* @__PURE__ */ new WeakMap();
|
|
943
|
+
z = /* @__PURE__ */ new WeakMap();
|
|
909
944
|
B = /* @__PURE__ */ new WeakMap();
|
|
910
945
|
H = /* @__PURE__ */ new WeakMap();
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
ht = /* @__PURE__ */ new WeakMap();
|
|
946
|
+
G = /* @__PURE__ */ new WeakMap();
|
|
947
|
+
Pt = /* @__PURE__ */ new WeakMap();
|
|
948
|
+
L = /* @__PURE__ */ new WeakMap();
|
|
949
|
+
ct = /* @__PURE__ */ new WeakMap();
|
|
950
|
+
ut = /* @__PURE__ */ new WeakMap();
|
|
917
951
|
nt = /* @__PURE__ */ new WeakMap();
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
952
|
+
at = /* @__PURE__ */ new WeakMap();
|
|
953
|
+
ot = /* @__PURE__ */ new WeakMap();
|
|
954
|
+
Rt = /* @__PURE__ */ new WeakMap();
|
|
955
|
+
te = /* @__PURE__ */ new WeakMap();
|
|
956
|
+
x = /* @__PURE__ */ new WeakMap();
|
|
921
957
|
q = /* @__PURE__ */ new WeakMap();
|
|
922
958
|
U = /* @__PURE__ */ new WeakMap();
|
|
923
|
-
|
|
924
|
-
|
|
959
|
+
pt = /* @__PURE__ */ new WeakMap();
|
|
960
|
+
ft = /* @__PURE__ */ new WeakMap();
|
|
925
961
|
J = /* @__PURE__ */ new WeakMap();
|
|
926
|
-
|
|
962
|
+
ge = /* @__PURE__ */ new WeakMap();
|
|
927
963
|
v = /* @__PURE__ */ new WeakMap();
|
|
964
|
+
Tt = /* @__PURE__ */ new WeakMap();
|
|
928
965
|
At = /* @__PURE__ */ new WeakMap();
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
T = /* @__PURE__ */ new WeakMap();
|
|
966
|
+
we = /* @__PURE__ */ new WeakMap();
|
|
967
|
+
I = /* @__PURE__ */ new WeakMap();
|
|
932
968
|
Q = /* @__PURE__ */ new WeakMap();
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
969
|
+
V = /* @__PURE__ */ new WeakMap();
|
|
970
|
+
M = /* @__PURE__ */ new WeakMap();
|
|
971
|
+
T = /* @__PURE__ */ new WeakMap();
|
|
972
|
+
ee = /* @__PURE__ */ new WeakMap();
|
|
973
|
+
Mt = /* @__PURE__ */ new WeakMap();
|
|
974
|
+
W = /* @__PURE__ */ new WeakMap();
|
|
975
|
+
be = /* @__PURE__ */ new WeakSet();
|
|
976
|
+
Ie = function() {
|
|
977
|
+
k(this, rs, ks).call(this), this.setVar(t(this, ct).current, t(this, I)), this.setVar(t(this, ut).current, t(this, Q));
|
|
942
978
|
};
|
|
943
|
-
|
|
944
|
-
|
|
979
|
+
rs = /* @__PURE__ */ new WeakSet();
|
|
980
|
+
ks = function() {
|
|
945
981
|
this.dispatchEvent(
|
|
946
982
|
new CustomEvent("segmentPass", {
|
|
947
983
|
detail: {
|
|
948
|
-
distance: t(this,
|
|
949
|
-
start: t(this,
|
|
950
|
-
finish: t(this,
|
|
951
|
-
passed: t(this,
|
|
984
|
+
distance: t(this, M),
|
|
985
|
+
start: t(this, V),
|
|
986
|
+
finish: t(this, T),
|
|
987
|
+
passed: t(this, I),
|
|
952
988
|
progress: t(this, Q)
|
|
953
989
|
}
|
|
954
990
|
})
|
|
955
991
|
);
|
|
956
992
|
};
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
t(this,
|
|
960
|
-
t(this,
|
|
961
|
-
), t(this,
|
|
962
|
-
t(this,
|
|
963
|
-
), t(this,
|
|
993
|
+
Be = /* @__PURE__ */ new WeakSet();
|
|
994
|
+
Ps = function() {
|
|
995
|
+
t(this, x).current = !0, t(this, q).current = !1, S(this, Mt, !0), t(this, B).current && t(this, v).classList.remove(t(this, B).current), t(this, L).current && t(this, v).classList.remove(
|
|
996
|
+
t(this, L).current
|
|
997
|
+
), t(this, L).current && t(this, v).classList.remove(
|
|
998
|
+
t(this, L).current
|
|
999
|
+
), t(this, z).current && t(this, v).classList.add(t(this, z).current);
|
|
964
1000
|
};
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
t(this, q).current = !0, t(this,
|
|
968
|
-
t(this, B).current
|
|
969
|
-
), t(this, H).current && t(this, v).classList.remove(
|
|
1001
|
+
He = /* @__PURE__ */ new WeakSet();
|
|
1002
|
+
Ws = function() {
|
|
1003
|
+
t(this, q).current = !0, t(this, x).current = !1, S(this, Mt, !0), t(this, z).current && t(this, v).classList.remove(t(this, z).current), t(this, H).current && t(this, v).classList.remove(
|
|
970
1004
|
t(this, H).current
|
|
971
|
-
), t(this,
|
|
1005
|
+
), t(this, G).current && t(this, v).classList.remove(
|
|
1006
|
+
t(this, G).current
|
|
1007
|
+
), t(this, B).current && t(this, v).classList.add(t(this, B).current);
|
|
972
1008
|
};
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
t(this,
|
|
976
|
-
t(this,
|
|
1009
|
+
Ge = /* @__PURE__ */ new WeakSet();
|
|
1010
|
+
Ms = function() {
|
|
1011
|
+
t(this, x).current = !0, t(this, U).current = !0, t(this, pt).current = !1, t(this, H).current && t(this, v).classList.add(
|
|
1012
|
+
t(this, H).current
|
|
977
1013
|
);
|
|
978
1014
|
};
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
t(this,
|
|
982
|
-
t(this,
|
|
1015
|
+
Ke = /* @__PURE__ */ new WeakSet();
|
|
1016
|
+
Es = function() {
|
|
1017
|
+
t(this, x).current = !0, t(this, ft).current = !0, t(this, J).current = !1, t(this, G).current && t(this, v).classList.add(
|
|
1018
|
+
t(this, G).current
|
|
983
1019
|
);
|
|
984
1020
|
};
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
t(this, q).current = !0, t(this,
|
|
988
|
-
t(this,
|
|
1021
|
+
Ue = /* @__PURE__ */ new WeakSet();
|
|
1022
|
+
xs = function() {
|
|
1023
|
+
t(this, q).current = !0, t(this, pt).current = !0, t(this, U).current = !1, t(this, L).current && t(this, v).classList.add(
|
|
1024
|
+
t(this, L).current
|
|
989
1025
|
);
|
|
990
1026
|
};
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
t(this, q).current = !0, t(this, J).current = !0, t(this,
|
|
994
|
-
t(this,
|
|
1027
|
+
qe = /* @__PURE__ */ new WeakSet();
|
|
1028
|
+
Ls = function() {
|
|
1029
|
+
t(this, q).current = !0, t(this, J).current = !0, t(this, ft).current = !1, t(this, L).current && t(this, v).classList.add(
|
|
1030
|
+
t(this, L).current
|
|
995
1031
|
);
|
|
996
1032
|
};
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
if (t(this,
|
|
1033
|
+
_e = /* @__PURE__ */ new WeakMap();
|
|
1034
|
+
se = /* @__PURE__ */ new WeakMap();
|
|
1035
|
+
ht = /* @__PURE__ */ new WeakSet();
|
|
1036
|
+
kt = function(e) {
|
|
1037
|
+
if (t(this, W)) {
|
|
1002
1038
|
e.previous && t(this, v).classList.remove(e.previous), e.current && t(this, v).classList.remove(e.current);
|
|
1003
1039
|
return;
|
|
1004
1040
|
}
|
|
1005
|
-
e.current && t(this,
|
|
1041
|
+
e.current && t(this, x).current ? (e.previous && t(this, v).classList.remove(e.previous), t(this, v).classList.add(e.current)) : !e.current && e.previous && t(this, v).classList.remove(e.previous);
|
|
1006
1042
|
};
|
|
1007
|
-
|
|
1008
|
-
|
|
1043
|
+
hs = /* @__PURE__ */ new WeakSet();
|
|
1044
|
+
Vs = function(...e) {
|
|
1009
1045
|
e.forEach((i) => {
|
|
1010
1046
|
i && t(this, v).classList.remove(i);
|
|
1011
1047
|
});
|
|
1012
1048
|
};
|
|
1013
|
-
|
|
1014
|
-
|
|
1049
|
+
ns = /* @__PURE__ */ new WeakSet();
|
|
1050
|
+
zs = function(...e) {
|
|
1015
1051
|
e.forEach((i) => {
|
|
1016
1052
|
i && t(this, v).style.removeProperty(`--${i}`);
|
|
1017
1053
|
});
|
|
1018
1054
|
};
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1055
|
+
Ce = /* @__PURE__ */ new WeakSet();
|
|
1056
|
+
Ne = function() {
|
|
1057
|
+
k(this, hs, Vs).call(this, t(this, z).current, t(this, H).current, t(this, G).current, t(this, B).current, t(this, Pt).current, t(this, L).current), k(this, ns, zs).call(this, t(this, ct).current, t(this, ut).current, t(this, nt).current, t(this, at).current, t(this, ot).current);
|
|
1022
1058
|
};
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
],
|
|
1059
|
+
ye = /* @__PURE__ */ new WeakMap();
|
|
1060
|
+
vs = di([
|
|
1061
|
+
qt("e-scroll-segment")
|
|
1062
|
+
], vs);
|
|
1027
1063
|
export {
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1064
|
+
ms as ScrollBulletButtonsElement,
|
|
1065
|
+
ze as ScrollElement,
|
|
1066
|
+
vs as ScrollSegmentElement,
|
|
1067
|
+
ps as ScrollSetButtonElement,
|
|
1068
|
+
fs as ScrollStepButtonElement,
|
|
1069
|
+
us as ScrollbarElement
|
|
1034
1070
|
};
|