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