aptechka 0.34.2 → 0.35.0
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/scroll/vanilla/index.cjs +1 -1
- package/lib/scroll/vanilla/index.js +385 -379
- package/package.json +1 -1
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var Ie = Object.defineProperty;
|
|
2
|
+
var ve = Object.getOwnPropertySymbols;
|
|
3
|
+
var Te = Object.prototype.hasOwnProperty, Ae = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var Ce = (a) => {
|
|
5
5
|
throw TypeError(a);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
7
|
+
var ye = (a, h, e) => h in a ? Ie(a, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[h] = e, we = (a, h) => {
|
|
8
8
|
for (var e in h || (h = {}))
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var e of
|
|
12
|
-
|
|
9
|
+
Te.call(h, e) && ye(a, e, h[e]);
|
|
10
|
+
if (ve)
|
|
11
|
+
for (var e of ve(h))
|
|
12
|
+
Ae.call(h, e) && ye(a, e, h[e]);
|
|
13
13
|
return a;
|
|
14
14
|
};
|
|
15
|
-
var
|
|
16
|
-
var t = (a, h, e) => (
|
|
17
|
-
import { S as
|
|
18
|
-
import { i as
|
|
19
|
-
import { q as
|
|
20
|
-
import { d as
|
|
21
|
-
import { c as
|
|
22
|
-
import { a as
|
|
23
|
-
import { c as
|
|
15
|
+
var le = (a, h, e) => h.has(a) || Ce("Cannot " + e);
|
|
16
|
+
var t = (a, h, e) => (le(a, h, "read from private field"), e ? e.call(a) : h.get(a)), s = (a, h, e) => h.has(a) ? Ce("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(a) : h.set(a, e), n = (a, h, e, i) => (le(a, h, "write to private field"), i ? i.call(a, e) : h.set(a, e), e), d = (a, h, e) => (le(a, h, "access private method"), e);
|
|
17
|
+
import { S as Me } from "../../Store-OTdcl6SX.js";
|
|
18
|
+
import { i as oe } from "../../browser-0zX67oeU.js";
|
|
19
|
+
import { q as Ve } from "../../easings-BEmRlrDd.js";
|
|
20
|
+
import { d as re } from "../../events-CsVF98U6.js";
|
|
21
|
+
import { c as xe } from "../../jss-CjccJC-K.js";
|
|
22
|
+
import { a as ce, g as ae } from "../../layout-HoBT_Da2.js";
|
|
23
|
+
import { c as Pe } from "../../math-BOBiC4TN.js";
|
|
24
24
|
import "../../ticker/vanilla/index.js";
|
|
25
|
-
import { TICK_ORDER as
|
|
26
|
-
import { D as
|
|
27
|
-
import { T as
|
|
28
|
-
import { WheelControls as
|
|
29
|
-
import { windowResizer as
|
|
30
|
-
import { scrollEntries as
|
|
31
|
-
import { cssUnitParser as
|
|
32
|
-
import { CSSProperty as
|
|
33
|
-
import { device as
|
|
34
|
-
import { elementResizer as
|
|
35
|
-
import { s as
|
|
36
|
-
import { f as
|
|
37
|
-
import { d as
|
|
38
|
-
import { ScrollSegmentElement as
|
|
39
|
-
var m,
|
|
40
|
-
class
|
|
25
|
+
import { TICK_ORDER as Oe, RESIZE_ORDER as ue } from "../../order/index.js";
|
|
26
|
+
import { D as Re } from "../../Damped-Chu29wn-.js";
|
|
27
|
+
import { T as He } from "../../Tweened-DJzAFsVZ.js";
|
|
28
|
+
import { WheelControls as Be, KeyboardControls as We, DragControls as Fe, AutoplayControls as $e } from "../../controls/index.js";
|
|
29
|
+
import { windowResizer as Lt } from "../../window-resizer/vanilla/index.js";
|
|
30
|
+
import { scrollEntries as pt } from "../../scroll-entries/index.js";
|
|
31
|
+
import { cssUnitParser as Ee } from "../../css-unit-parser/index.js";
|
|
32
|
+
import { CSSProperty as p } from "../../css-property/index.js";
|
|
33
|
+
import { device as qe } from "../../device/index.js";
|
|
34
|
+
import { elementResizer as Gt } from "../../element-resizer/vanilla/index.js";
|
|
35
|
+
import { s as Ne } from "../../gestures-D2Fdra_G.js";
|
|
36
|
+
import { f as Le } from "../../dom-0S_WDL4g.js";
|
|
37
|
+
import { d as Ue } from "../../function-C10DGppn.js";
|
|
38
|
+
import { ScrollSegmentElement as Ge } from "../../scroll-segment/index.js";
|
|
39
|
+
var m, _t, g, mt, H, Q;
|
|
40
|
+
class Ke {
|
|
41
41
|
constructor(h, e, i) {
|
|
42
42
|
s(this, m);
|
|
43
|
-
s(this,
|
|
43
|
+
s(this, _t);
|
|
44
44
|
s(this, g);
|
|
45
|
-
s(this,
|
|
46
|
-
s(this,
|
|
47
|
-
s(this,
|
|
48
|
-
n(this, m, h), n(this,
|
|
45
|
+
s(this, mt, 0);
|
|
46
|
+
s(this, H, 0);
|
|
47
|
+
s(this, Q, null);
|
|
48
|
+
n(this, m, h), n(this, _t, e), n(this, g, i), pt.register(t(this, m));
|
|
49
49
|
}
|
|
50
50
|
get index() {
|
|
51
|
-
return t(this,
|
|
51
|
+
return t(this, _t);
|
|
52
52
|
}
|
|
53
53
|
get size() {
|
|
54
|
-
return t(this,
|
|
54
|
+
return t(this, mt);
|
|
55
55
|
}
|
|
56
56
|
get position() {
|
|
57
|
-
return t(this,
|
|
57
|
+
return t(this, H);
|
|
58
58
|
}
|
|
59
59
|
destroy() {
|
|
60
|
-
|
|
60
|
+
pt.unregister(t(this, m)), this.unsetTransform();
|
|
61
61
|
}
|
|
62
62
|
unsetTransform() {
|
|
63
|
-
t(this, m).style.transform = "", this.mark(null);
|
|
63
|
+
t(this, m).style.transform = "", this.mark(null), this.setSize();
|
|
64
64
|
}
|
|
65
65
|
setSize(h) {
|
|
66
66
|
h ? (t(this, m).style.setProperty("--size", h + "px"), t(this, g).axisCSSProperty.current === "x" ? (t(this, m).style.width = h + "px", t(this, m).style.height = "") : (t(this, m).style.height = h + "px", t(this, m).style.width = "")) : (t(this, m).style.width = "", t(this, m).style.height = "", t(this, m).style.removeProperty("--size"));
|
|
67
67
|
}
|
|
68
68
|
resize() {
|
|
69
|
-
n(this,
|
|
69
|
+
n(this, mt, t(this, g).vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth), n(this, H, t(this, g).vertical ? ce(t(this, m)) : ae(t(this, m))), n(this, H, t(this, H) - t(this, g).contentPosition);
|
|
70
70
|
}
|
|
71
71
|
transform() {
|
|
72
72
|
let h = 0;
|
|
73
73
|
const e = t(this, g).viewportSize * t(this, g).sectionDistanceScaleCSSProperty.current;
|
|
74
|
-
t(this, g).loopCSSProperty.current && t(this, g).overscroll && t(this,
|
|
74
|
+
t(this, g).loopCSSProperty.current && t(this, g).overscroll && t(this, H) + t(this, mt) < t(this, g).currentScrollValue && (h = t(this, g).distance * -1 - t(this, g).gap), pt.update(
|
|
75
75
|
t(this, m),
|
|
76
76
|
t(this, g).axisCSSProperty.current,
|
|
77
77
|
h
|
|
78
78
|
);
|
|
79
|
-
const i = t(this, g).currentScrollValue + h, r = t(this,
|
|
79
|
+
const i = t(this, g).currentScrollValue + h, r = t(this, H) - t(this, g).viewportSize - e, c = t(this, H) + t(this, mt) + e, b = Pe(i, r, c);
|
|
80
80
|
t(this, g).vertical ? t(this, m).style.transform = `translate3d(0px, ${b * -1}px, 0px)` : t(this, m).style.transform = `translate3d(${b * -1}px, 0px, 0px)`;
|
|
81
81
|
}
|
|
82
82
|
mark(h) {
|
|
83
|
-
t(this,
|
|
83
|
+
t(this, Q) !== h && (t(this, Q) && t(this, m).classList.remove(t(this, Q)), h && t(this, m).classList.add(h), n(this, Q, h), re(t(this, m), "scrollSectionMarkChange", {
|
|
84
84
|
composed: !0,
|
|
85
85
|
detail: {
|
|
86
|
-
mark: t(this,
|
|
86
|
+
mark: t(this, Q)
|
|
87
87
|
},
|
|
88
88
|
custom: !0
|
|
89
89
|
}));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
m = new WeakMap(),
|
|
93
|
-
const
|
|
92
|
+
m = new WeakMap(), _t = new WeakMap(), g = new WeakMap(), mt = new WeakMap(), H = new WeakMap(), Q = new WeakMap();
|
|
93
|
+
const _e = xe({
|
|
94
94
|
":host": {
|
|
95
95
|
position: "relative",
|
|
96
96
|
width: "100%",
|
|
@@ -98,9 +98,6 @@ const Ge = Ce({
|
|
|
98
98
|
display: "block",
|
|
99
99
|
outline: "none"
|
|
100
100
|
},
|
|
101
|
-
':host([hibernated="true"])': {
|
|
102
|
-
display: "contents"
|
|
103
|
-
},
|
|
104
101
|
".static": {
|
|
105
102
|
position: "var(--static-position, absolute)",
|
|
106
103
|
top: "var(--static-top, 0)",
|
|
@@ -121,122 +118,128 @@ const Ge = Ce({
|
|
|
121
118
|
gap: "var(--gap, 0px)",
|
|
122
119
|
willChange: "var(--will-change, transform)"
|
|
123
120
|
},
|
|
124
|
-
|
|
121
|
+
":host(.hibernated) .content-wrapper": {
|
|
122
|
+
display: "contents"
|
|
123
|
+
},
|
|
124
|
+
":host(.hibernated) .content": {
|
|
125
125
|
display: "contents"
|
|
126
126
|
},
|
|
127
127
|
"::slotted(*)": {
|
|
128
128
|
flexShrink: "0"
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
var u,
|
|
132
|
-
class
|
|
131
|
+
var u, bt, P, B, W, F, I, X, Y, $, tt, St, T, y, gt, vt, yt, Ct, kt, D, wt, et, A, st, q, it, Et, N, U, rt, f, zt, l, Zt, jt, v, S, L, M, nt, V, C, w, Dt, ht, G, ot, xt, It, lt, K, Jt, O, E, o, Ut, Pt, ne, he, de, fe, k, Tt, ke, At, Qt, pe, me, ft, be, Xt;
|
|
132
|
+
class Kt extends HTMLElement {
|
|
133
133
|
constructor() {
|
|
134
134
|
super();
|
|
135
135
|
s(this, o);
|
|
136
136
|
s(this, u, null);
|
|
137
|
-
s(this,
|
|
138
|
-
s(this,
|
|
139
|
-
s(this,
|
|
140
|
-
s(this,
|
|
137
|
+
s(this, bt, new p(this, "--controls", !0));
|
|
138
|
+
s(this, P, new p(this, "--axis", "y"));
|
|
139
|
+
s(this, B, new p(this, "--direction", 0));
|
|
140
|
+
s(this, W, new p(this, "--pages", 0, {
|
|
141
141
|
validate: (e) => Math.max(0, e - 1)
|
|
142
142
|
}));
|
|
143
|
-
s(this,
|
|
144
|
-
s(this,
|
|
145
|
-
s(this,
|
|
143
|
+
s(this, F, new p(this, "--split", !1));
|
|
144
|
+
s(this, I, new p(this, "--sectional", !1));
|
|
145
|
+
s(this, X, new p(
|
|
146
146
|
this,
|
|
147
147
|
"--tween-easing",
|
|
148
148
|
!1
|
|
149
149
|
));
|
|
150
|
-
s(this,
|
|
150
|
+
s(this, Y, new p(
|
|
151
151
|
this,
|
|
152
152
|
"--tween-duration",
|
|
153
153
|
!1
|
|
154
154
|
));
|
|
155
|
-
s(this,
|
|
156
|
-
s(this,
|
|
155
|
+
s(this, $, new p(this, "--auto-size", !1));
|
|
156
|
+
s(this, tt, new p(
|
|
157
157
|
this,
|
|
158
158
|
"--wheel-max-delta",
|
|
159
159
|
!1
|
|
160
160
|
));
|
|
161
|
-
s(this,
|
|
162
|
-
s(this,
|
|
161
|
+
s(this, St, new p(this, "--drag-inertion", 1));
|
|
162
|
+
s(this, T, new p(
|
|
163
163
|
this,
|
|
164
164
|
"--sections-in-view",
|
|
165
165
|
1
|
|
166
166
|
));
|
|
167
|
-
s(this, y, new
|
|
168
|
-
s(this,
|
|
169
|
-
s(this,
|
|
170
|
-
s(this,
|
|
171
|
-
s(this,
|
|
172
|
-
s(this,
|
|
167
|
+
s(this, y, new p(this, "--loop", !1));
|
|
168
|
+
s(this, gt, new p(this, "--damping", 20));
|
|
169
|
+
s(this, vt, new p(this, "--mass", 0));
|
|
170
|
+
s(this, yt, new p(this, "--stiffness", 0));
|
|
171
|
+
s(this, Ct, new p(this, "--mouse-drag", !1));
|
|
172
|
+
s(this, kt, new p(
|
|
173
173
|
this,
|
|
174
174
|
"--section-distance-scale",
|
|
175
175
|
0.5
|
|
176
176
|
));
|
|
177
|
-
s(this,
|
|
178
|
-
s(this,
|
|
177
|
+
s(this, D, new p(this, "--autoplay", 0));
|
|
178
|
+
s(this, wt, new p(
|
|
179
179
|
this,
|
|
180
180
|
"--autoplay-pause-duration",
|
|
181
181
|
0
|
|
182
182
|
));
|
|
183
|
-
s(this,
|
|
183
|
+
s(this, et, new p(
|
|
184
184
|
this,
|
|
185
185
|
"--autoplay-user-direction",
|
|
186
186
|
!1
|
|
187
187
|
));
|
|
188
|
-
s(this,
|
|
189
|
-
s(this,
|
|
188
|
+
s(this, A, new p(this, "--classes", !1));
|
|
189
|
+
s(this, st, new p(
|
|
190
190
|
this,
|
|
191
191
|
"--current-index-start-offset",
|
|
192
192
|
0
|
|
193
193
|
));
|
|
194
|
-
s(this,
|
|
194
|
+
s(this, q, new p(
|
|
195
195
|
this,
|
|
196
196
|
"--current-index-end-offset",
|
|
197
197
|
0
|
|
198
198
|
));
|
|
199
|
-
s(this,
|
|
200
|
-
s(this,
|
|
199
|
+
s(this, it, new p(this, "--focus-delay", 0));
|
|
200
|
+
s(this, Et, new p(
|
|
201
201
|
this,
|
|
202
202
|
"--focus-duration",
|
|
203
203
|
3e3
|
|
204
204
|
));
|
|
205
|
-
s(this,
|
|
206
|
-
s(this,
|
|
207
|
-
s(this,
|
|
208
|
-
s(this,
|
|
209
|
-
s(this,
|
|
205
|
+
s(this, N, new p(this, "--disabled", !1));
|
|
206
|
+
s(this, U, new p(this, "--hibernate", !1));
|
|
207
|
+
s(this, rt, null);
|
|
208
|
+
s(this, f, null);
|
|
209
|
+
s(this, zt, null);
|
|
210
210
|
s(this, l, []);
|
|
211
|
-
s(this,
|
|
212
|
-
s(this,
|
|
211
|
+
s(this, Zt, 0);
|
|
212
|
+
s(this, jt, 0);
|
|
213
213
|
s(this, v, 0);
|
|
214
214
|
s(this, S, 0);
|
|
215
|
-
s(this,
|
|
216
|
-
s(this, A, null);
|
|
217
|
-
s(this, it, null);
|
|
215
|
+
s(this, L, 0);
|
|
218
216
|
s(this, M, null);
|
|
219
|
-
s(this,
|
|
220
|
-
s(this, w, new Te(0));
|
|
221
|
-
s(this, kt, 0);
|
|
222
|
-
s(this, rt, 0);
|
|
223
|
-
s(this, q, !1);
|
|
224
|
-
s(this, nt, !0);
|
|
225
|
-
s(this, Et, !0);
|
|
226
|
-
s(this, zt);
|
|
227
|
-
s(this, ht);
|
|
228
|
-
s(this, N, new Oe());
|
|
229
|
-
s(this, Zt, !1);
|
|
217
|
+
s(this, nt, null);
|
|
230
218
|
s(this, V, null);
|
|
231
|
-
s(this,
|
|
219
|
+
s(this, C, null);
|
|
220
|
+
s(this, w, new Me(0));
|
|
221
|
+
s(this, Dt, 0);
|
|
222
|
+
s(this, ht, 0);
|
|
223
|
+
s(this, G, !1);
|
|
224
|
+
s(this, ot, !0);
|
|
225
|
+
s(this, xt, !0);
|
|
226
|
+
s(this, It);
|
|
227
|
+
s(this, lt);
|
|
228
|
+
s(this, K, new He());
|
|
229
|
+
s(this, Jt, !1);
|
|
230
|
+
s(this, O, null);
|
|
231
|
+
s(this, E, !1);
|
|
232
|
+
s(this, k, () => {
|
|
233
|
+
if (t(this, U).current)
|
|
234
|
+
return;
|
|
232
235
|
t(this, u).unlistenAnimationFrame();
|
|
233
236
|
const e = this.currentScrollValue / t(this, S) || 0, i = t(this, w).current;
|
|
234
|
-
if (n(this,
|
|
235
|
-
getComputedStyle(t(this,
|
|
236
|
-
)) : n(this,
|
|
237
|
-
getComputedStyle(t(this,
|
|
238
|
-
)), t(this,
|
|
239
|
-
const r = t(this,
|
|
237
|
+
if (n(this, Zt, this.vertical ? ce(this) : ae(this)), n(this, jt, this.vertical ? ce(t(this, f)) : ae(t(this, f))), n(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? n(this, L, Ee.parse(
|
|
238
|
+
getComputedStyle(t(this, f)).rowGap
|
|
239
|
+
)) : n(this, L, Ee.parse(
|
|
240
|
+
getComputedStyle(t(this, f)).columnGap
|
|
241
|
+
)), t(this, $).current && t(this, l).length) {
|
|
242
|
+
const r = t(this, T).current, c = (t(this, v) - t(this, L) * (r - 1)) / r;
|
|
240
243
|
t(this, l).forEach((b) => {
|
|
241
244
|
b.setSize(c);
|
|
242
245
|
});
|
|
@@ -246,22 +249,22 @@ class Ut extends HTMLElement {
|
|
|
246
249
|
});
|
|
247
250
|
if (t(this, l).forEach((r) => {
|
|
248
251
|
r.resize();
|
|
249
|
-
}), t(this,
|
|
250
|
-
n(this, S, t(this, v) * t(this,
|
|
252
|
+
}), t(this, W).current) {
|
|
253
|
+
n(this, S, t(this, v) * t(this, W).current);
|
|
251
254
|
const r = t(this, S) + t(this, v);
|
|
252
|
-
this.vertical ? (t(this,
|
|
255
|
+
this.vertical ? (t(this, f).style.width = r + "px", t(this, f).style.height = "100%") : (t(this, f).style.height = r + "px", t(this, f).style.width = "100%");
|
|
253
256
|
} else
|
|
254
|
-
this.vertical ? (t(this,
|
|
257
|
+
this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", n(this, S, t(this, f).offsetHeight - t(this, v))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", n(this, S, t(this, f).offsetWidth - t(this, v)));
|
|
255
258
|
if (!t(this, y).current) {
|
|
256
259
|
const r = getComputedStyle(this), c = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
|
|
257
260
|
n(this, S, t(this, S) + c), t(this, u).max = t(this, S);
|
|
258
261
|
}
|
|
259
262
|
if (t(this, y).current && t(this, l).length) {
|
|
260
263
|
const r = t(this, l)[t(this, l).length - 1], c = r.position + r.size - t(this, v), b = t(this, S) - c;
|
|
261
|
-
n(this,
|
|
264
|
+
n(this, ht, r.position + r.size + b);
|
|
262
265
|
} else
|
|
263
|
-
n(this,
|
|
264
|
-
if (t(this,
|
|
266
|
+
n(this, ht, t(this, S));
|
|
267
|
+
if (t(this, I).current && t(this, l).length) {
|
|
265
268
|
const r = t(this, l)[i];
|
|
266
269
|
t(this, u).set(r.position, {
|
|
267
270
|
equalize: !0
|
|
@@ -270,13 +273,13 @@ class Ut extends HTMLElement {
|
|
|
270
273
|
t(this, u).set(e * t(this, S), {
|
|
271
274
|
equalize: !0
|
|
272
275
|
});
|
|
273
|
-
n(this,
|
|
276
|
+
n(this, G, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, N).current || d(this, o, he).call(this) : d(this, o, ne).call(this), t(this, Tt).call(this);
|
|
274
277
|
});
|
|
275
|
-
s(this,
|
|
276
|
-
if (!t(this,
|
|
278
|
+
s(this, Tt, () => {
|
|
279
|
+
if (!t(this, G) || t(this, U).current || t(this, N).current)
|
|
277
280
|
return;
|
|
278
281
|
const e = this.currentScrollValue;
|
|
279
|
-
if (n(this,
|
|
282
|
+
if (n(this, Dt, Math.max(0, e - t(this, S))), t(this, l).length) {
|
|
280
283
|
let i = 0;
|
|
281
284
|
for (let r = 0; r < t(this, l).length; r++) {
|
|
282
285
|
const c = t(this, l)[r];
|
|
@@ -284,163 +287,166 @@ class Ut extends HTMLElement {
|
|
|
284
287
|
}
|
|
285
288
|
t(this, w).current = i;
|
|
286
289
|
} else
|
|
287
|
-
this.vertical ? t(this,
|
|
288
|
-
|
|
290
|
+
this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
291
|
+
pt.update(
|
|
289
292
|
this,
|
|
290
|
-
t(this,
|
|
293
|
+
t(this, P).current,
|
|
291
294
|
e
|
|
292
295
|
);
|
|
293
296
|
});
|
|
294
|
-
s(this,
|
|
295
|
-
t(this,
|
|
297
|
+
s(this, At, (e, i) => {
|
|
298
|
+
t(this, bt).current && (d(this, o, pe).call(this, Math.sign(i) || 1), t(this, Qt).call(this, e, i));
|
|
296
299
|
});
|
|
297
|
-
s(this,
|
|
298
|
-
if (t(this,
|
|
299
|
-
if (t(this,
|
|
300
|
+
s(this, Qt, (e, i) => {
|
|
301
|
+
if (t(this, B).current) {
|
|
302
|
+
if (t(this, B).current < 0 && i > 0)
|
|
300
303
|
return;
|
|
301
|
-
if (t(this,
|
|
304
|
+
if (t(this, B).current > 0 && i < 0)
|
|
302
305
|
return;
|
|
303
306
|
}
|
|
304
|
-
if (t(this,
|
|
305
|
-
const r = d(this, o,
|
|
307
|
+
if (t(this, lt) || t(this, K).unlistenAnimationFrame(), !t(this, D).current && t(this, it).current && (clearInterval(t(this, It)), n(this, It, setTimeout(() => {
|
|
308
|
+
const r = d(this, o, be).call(this);
|
|
306
309
|
r && this.scrollToSection(r.index, {
|
|
307
310
|
tween: {
|
|
308
|
-
duration: t(this,
|
|
309
|
-
easing:
|
|
311
|
+
duration: t(this, Et).current,
|
|
312
|
+
easing: Ve
|
|
310
313
|
}
|
|
311
314
|
});
|
|
312
|
-
}, t(this,
|
|
313
|
-
if (t(this,
|
|
315
|
+
}, t(this, it).current))), !(e.includes("drag") && !qe.isMobile && !t(this, Ct).current)) {
|
|
316
|
+
if (t(this, I).current && e !== "drag") {
|
|
314
317
|
const r = Math.sign(i);
|
|
315
318
|
if (t(this, l).length) {
|
|
316
319
|
const c = {
|
|
317
|
-
tween: t(this,
|
|
318
|
-
easing: t(this,
|
|
319
|
-
duration: t(this,
|
|
320
|
+
tween: t(this, X).current || t(this, Y).current ? {
|
|
321
|
+
easing: t(this, X).current || "easeInOutCubic",
|
|
322
|
+
duration: t(this, Y).current || 500
|
|
320
323
|
} : void 0
|
|
321
324
|
};
|
|
322
|
-
t(this,
|
|
325
|
+
t(this, Jt) ? this.scrollToSection(t(this, w).current, c) : this.shiftSections(r, c);
|
|
323
326
|
} else
|
|
324
327
|
t(this, u).shift(r * t(this, v));
|
|
325
328
|
} else
|
|
326
329
|
t(this, u).shift(i);
|
|
327
|
-
n(this,
|
|
330
|
+
n(this, Jt, e === "drag");
|
|
328
331
|
}
|
|
329
332
|
});
|
|
330
|
-
|
|
333
|
+
s(this, Xt, () => {
|
|
334
|
+
n(this, E, !0), this.hibernatedCSSProperty.current || d(this, o, fe).call(this);
|
|
335
|
+
});
|
|
336
|
+
if (oe) {
|
|
331
337
|
const e = this.attachShadow({ mode: "open" });
|
|
332
|
-
e.adoptedStyleSheets = [
|
|
338
|
+
e.adoptedStyleSheets = [_e];
|
|
333
339
|
const i = document.createElement("div");
|
|
334
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), n(this,
|
|
340
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), n(this, rt, document.createElement("div")), t(this, rt).className = "content-wrapper", n(this, f, document.createElement("div")), t(this, f).className = "content", n(this, zt, document.createElement("slot")), t(this, f).appendChild(t(this, zt)), t(this, rt).appendChild(t(this, f)), e.appendChild(t(this, rt));
|
|
335
341
|
}
|
|
336
342
|
}
|
|
337
343
|
get damped() {
|
|
338
344
|
return t(this, u);
|
|
339
345
|
}
|
|
340
346
|
get controlsCSSProperty() {
|
|
341
|
-
return t(this,
|
|
347
|
+
return t(this, bt);
|
|
342
348
|
}
|
|
343
349
|
get axisCSSProperty() {
|
|
344
|
-
return t(this,
|
|
350
|
+
return t(this, P);
|
|
345
351
|
}
|
|
346
352
|
get directionCSSProperty() {
|
|
347
|
-
return t(this,
|
|
353
|
+
return t(this, B);
|
|
348
354
|
}
|
|
349
355
|
get pagesCSSProperty() {
|
|
350
|
-
return t(this,
|
|
356
|
+
return t(this, W);
|
|
351
357
|
}
|
|
352
358
|
get splitCSSProperty() {
|
|
353
|
-
return t(this,
|
|
359
|
+
return t(this, F);
|
|
354
360
|
}
|
|
355
361
|
get sectionalCSSProperty() {
|
|
356
|
-
return t(this,
|
|
362
|
+
return t(this, I);
|
|
357
363
|
}
|
|
358
364
|
get easingCSSProperty() {
|
|
359
|
-
return t(this,
|
|
365
|
+
return t(this, X);
|
|
360
366
|
}
|
|
361
367
|
get durationCSSProperty() {
|
|
362
|
-
return t(this,
|
|
368
|
+
return t(this, Y);
|
|
363
369
|
}
|
|
364
370
|
get autoSizeCSSProperty() {
|
|
365
|
-
return t(this,
|
|
371
|
+
return t(this, $);
|
|
366
372
|
}
|
|
367
373
|
get wheelMaxDeltaCSSProperty() {
|
|
368
|
-
return t(this,
|
|
374
|
+
return t(this, tt);
|
|
369
375
|
}
|
|
370
376
|
get dragInertionCSSProperty() {
|
|
371
|
-
return t(this,
|
|
377
|
+
return t(this, St);
|
|
372
378
|
}
|
|
373
379
|
get sectionsInViewCSSProperty() {
|
|
374
|
-
return t(this,
|
|
380
|
+
return t(this, T);
|
|
375
381
|
}
|
|
376
382
|
get loopCSSProperty() {
|
|
377
383
|
return t(this, y);
|
|
378
384
|
}
|
|
379
385
|
get dampingCSSProperty() {
|
|
380
|
-
return t(this,
|
|
386
|
+
return t(this, gt);
|
|
381
387
|
}
|
|
382
388
|
get massCSSProperty() {
|
|
383
|
-
return t(this,
|
|
389
|
+
return t(this, vt);
|
|
384
390
|
}
|
|
385
391
|
get stiffnessCSSProperty() {
|
|
386
|
-
return t(this,
|
|
392
|
+
return t(this, yt);
|
|
387
393
|
}
|
|
388
394
|
get mouseDragCSSProperty() {
|
|
389
|
-
return t(this,
|
|
395
|
+
return t(this, Ct);
|
|
390
396
|
}
|
|
391
397
|
get sectionDistanceScaleCSSProperty() {
|
|
392
|
-
return t(this,
|
|
398
|
+
return t(this, kt);
|
|
393
399
|
}
|
|
394
400
|
get autoplayCSSProperty() {
|
|
395
|
-
return t(this,
|
|
401
|
+
return t(this, D);
|
|
396
402
|
}
|
|
397
403
|
get autoplayPauseDurationCSSProperty() {
|
|
398
|
-
return t(this,
|
|
404
|
+
return t(this, wt);
|
|
399
405
|
}
|
|
400
406
|
get autoplayUserDirectionCSSProperty() {
|
|
401
|
-
return t(this,
|
|
407
|
+
return t(this, et);
|
|
402
408
|
}
|
|
403
409
|
get classesCSSProperty() {
|
|
404
|
-
return t(this,
|
|
410
|
+
return t(this, A);
|
|
405
411
|
}
|
|
406
412
|
get currentIndexStartOffsetCSSProperty() {
|
|
407
|
-
return t(this,
|
|
413
|
+
return t(this, st);
|
|
408
414
|
}
|
|
409
415
|
get currentIndexEndOffsetCSSProperty() {
|
|
410
|
-
return t(this,
|
|
416
|
+
return t(this, q);
|
|
411
417
|
}
|
|
412
418
|
get focusDelayCSSProperty() {
|
|
413
|
-
return t(this,
|
|
419
|
+
return t(this, it);
|
|
414
420
|
}
|
|
415
421
|
get focusDurationCSSProperty() {
|
|
416
|
-
return t(this,
|
|
422
|
+
return t(this, Et);
|
|
417
423
|
}
|
|
418
424
|
get disabledCSSProperty() {
|
|
419
|
-
return t(this,
|
|
425
|
+
return t(this, N);
|
|
420
426
|
}
|
|
421
427
|
get hibernatedCSSProperty() {
|
|
422
|
-
return t(this,
|
|
428
|
+
return t(this, U);
|
|
423
429
|
}
|
|
424
430
|
get currentScrollValue() {
|
|
425
|
-
return d(this, o,
|
|
431
|
+
return d(this, o, me).call(this, "current");
|
|
426
432
|
}
|
|
427
433
|
get targetScrollValue() {
|
|
428
|
-
return d(this, o,
|
|
434
|
+
return d(this, o, me).call(this, "target");
|
|
429
435
|
}
|
|
430
436
|
get contentWrapperElement() {
|
|
431
|
-
return t(this,
|
|
437
|
+
return t(this, rt);
|
|
432
438
|
}
|
|
433
439
|
get contentElement() {
|
|
434
|
-
return t(this,
|
|
440
|
+
return t(this, f);
|
|
435
441
|
}
|
|
436
442
|
get sections() {
|
|
437
443
|
return t(this, l);
|
|
438
444
|
}
|
|
439
445
|
get position() {
|
|
440
|
-
return t(this,
|
|
446
|
+
return t(this, Zt);
|
|
441
447
|
}
|
|
442
448
|
get contentPosition() {
|
|
443
|
-
return t(this,
|
|
449
|
+
return t(this, jt);
|
|
444
450
|
}
|
|
445
451
|
get viewportSize() {
|
|
446
452
|
return t(this, v);
|
|
@@ -449,33 +455,33 @@ class Ut extends HTMLElement {
|
|
|
449
455
|
return t(this, S);
|
|
450
456
|
}
|
|
451
457
|
get gap() {
|
|
452
|
-
return t(this,
|
|
458
|
+
return t(this, L);
|
|
453
459
|
}
|
|
454
460
|
get counter() {
|
|
455
461
|
return t(this, w);
|
|
456
462
|
}
|
|
457
463
|
get limit() {
|
|
458
464
|
return Math.ceil(
|
|
459
|
-
t(this, l).length - t(this,
|
|
465
|
+
t(this, l).length - t(this, T).current
|
|
460
466
|
);
|
|
461
467
|
}
|
|
462
468
|
get distance() {
|
|
463
|
-
return t(this,
|
|
469
|
+
return t(this, ht);
|
|
464
470
|
}
|
|
465
471
|
get loopDistance() {
|
|
466
|
-
return t(this, y).current ? t(this,
|
|
472
|
+
return t(this, y).current ? t(this, ht) + t(this, L) : t(this, ht);
|
|
467
473
|
}
|
|
468
474
|
get hasOverflow() {
|
|
469
|
-
return t(this,
|
|
475
|
+
return t(this, G);
|
|
470
476
|
}
|
|
471
477
|
get overscroll() {
|
|
472
|
-
return t(this,
|
|
478
|
+
return t(this, Dt);
|
|
473
479
|
}
|
|
474
480
|
get scrollLine() {
|
|
475
|
-
return t(this,
|
|
481
|
+
return t(this, O);
|
|
476
482
|
}
|
|
477
483
|
get vertical() {
|
|
478
|
-
return t(this,
|
|
484
|
+
return t(this, P).current === "y";
|
|
479
485
|
}
|
|
480
486
|
get currentProgress() {
|
|
481
487
|
return this.currentScrollValue / this.loopDistance || 0;
|
|
@@ -484,10 +490,10 @@ class Ut extends HTMLElement {
|
|
|
484
490
|
return this.targetScrollValue / this.loopDistance || 0;
|
|
485
491
|
}
|
|
486
492
|
get scrollWidth() {
|
|
487
|
-
return t(this,
|
|
493
|
+
return t(this, P).current === "y" ? 0 : t(this, u).distance;
|
|
488
494
|
}
|
|
489
495
|
get scrollHeight() {
|
|
490
|
-
return t(this,
|
|
496
|
+
return t(this, P).current === "x" ? 0 : t(this, u).distance;
|
|
491
497
|
}
|
|
492
498
|
onScroll(...e) {
|
|
493
499
|
return t(this, u).subscribe(...e);
|
|
@@ -510,19 +516,19 @@ class Ut extends HTMLElement {
|
|
|
510
516
|
scrollToSection(e, i) {
|
|
511
517
|
if (!t(this, l).length)
|
|
512
518
|
return;
|
|
513
|
-
const r = t(this, w).current, c = d(this, o,
|
|
514
|
-
if (b &&
|
|
515
|
-
let
|
|
516
|
-
const
|
|
517
|
-
t(this, y).current ? c === 0 && r === t(this, l).length - 1 ?
|
|
519
|
+
const r = t(this, w).current, c = d(this, o, ke).call(this, e), b = t(this, l)[r], z = t(this, l)[c];
|
|
520
|
+
if (b && z) {
|
|
521
|
+
let R = 0;
|
|
522
|
+
const ge = d(this, o, be).call(this), De = ge ? this.targetScrollValue - ge.position : 0;
|
|
523
|
+
t(this, y).current ? c === 0 && r === t(this, l).length - 1 ? R = t(this, S) + t(this, v) - b.position + t(this, L) : c === t(this, l).length - 1 && r === 0 ? R = z.position - (t(this, S) + t(this, v) + t(this, L)) : R = z.position - b.position : R = z.position - b.position, this.shiftPosition(R - De, i);
|
|
518
524
|
}
|
|
519
525
|
}
|
|
520
526
|
shiftSections(e, i) {
|
|
521
527
|
t(this, l).length && this.scrollToSection(t(this, w).current + e, i);
|
|
522
528
|
}
|
|
523
529
|
setPosition(e, i) {
|
|
524
|
-
d(this, o,
|
|
525
|
-
n(this,
|
|
530
|
+
d(this, o, pe).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, lt) || (t(this, K).set(t(this, u).current, { equalize: !0 }), t(this, K).set(e, we({}, i.tween)), n(this, lt, setTimeout(() => {
|
|
531
|
+
n(this, lt, void 0);
|
|
526
532
|
}, i.tween.duration || 0))) : t(this, u).set(e, {
|
|
527
533
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
528
534
|
});
|
|
@@ -531,179 +537,179 @@ class Ut extends HTMLElement {
|
|
|
531
537
|
this.setPosition(t(this, u).target + e, i);
|
|
532
538
|
}
|
|
533
539
|
connectedCallback() {
|
|
534
|
-
|
|
540
|
+
pt.register(this), n(this, u, new Re(0, {
|
|
535
541
|
damping: 0.01,
|
|
536
542
|
min: 0,
|
|
537
|
-
order:
|
|
538
|
-
})), this.setAttribute("tabindex", "0"), n(this,
|
|
543
|
+
order: Oe.SCROLL
|
|
544
|
+
})), this.setAttribute("tabindex", "0"), n(this, M, new Be({ element: t(this, f) })), t(this, M).changeEvent.subscribe(t(this, At)), n(this, nt, new We({
|
|
539
545
|
element: this
|
|
540
|
-
})), t(this,
|
|
541
|
-
t(this,
|
|
542
|
-
), n(this,
|
|
546
|
+
})), t(this, nt).changeEvent.subscribe(
|
|
547
|
+
t(this, At)
|
|
548
|
+
), n(this, V, new Fe({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, At)), n(this, C, new $e({
|
|
543
549
|
culling: this
|
|
544
|
-
})), t(this, C).changeEvent.subscribe(t(this,
|
|
545
|
-
t(this,
|
|
546
|
-
}), t(this,
|
|
547
|
-
t(this,
|
|
548
|
-
}), t(this,
|
|
549
|
-
t(this,
|
|
550
|
-
}), t(this,
|
|
551
|
-
this
|
|
552
|
-
}), t(this,
|
|
553
|
-
this
|
|
554
|
-
}), t(this, D).subscribe((e) => {
|
|
555
|
-
t(this, A).debounce = e.current, t(this, M).swipe = e.current, t(this, C).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, l).length ? d(this, o, qt).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, xt).call(this));
|
|
556
|
-
}), t(this, F).subscribe((e) => {
|
|
557
|
-
this.isConnected && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? d(this, o, qt).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, xt).call(this));
|
|
550
|
+
})), t(this, C).changeEvent.subscribe(t(this, Qt)), t(this, P).subscribe(({ current: e }) => {
|
|
551
|
+
t(this, f).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, tt).current ? "max" : e, t(this, nt).dimension = e === "x" ? "width" : "height", t(this, V).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, E) && t(this, k).call(this);
|
|
552
|
+
}), t(this, tt).subscribe((e) => {
|
|
553
|
+
t(this, M).axis = e.current ? "max" : t(this, P).current;
|
|
554
|
+
}), t(this, St).subscribe((e) => {
|
|
555
|
+
t(this, V).inertion = typeof e.current == "number" ? e.current : 1;
|
|
556
|
+
}), t(this, W).subscribe(() => {
|
|
557
|
+
t(this, E) && t(this, k).call(this);
|
|
558
|
+
}), t(this, F).subscribe(({ current: e }) => {
|
|
559
|
+
t(this, E) && (e ? d(this, o, Ut).call(this) : d(this, o, Pt).call(this));
|
|
558
560
|
}), t(this, I).subscribe((e) => {
|
|
559
|
-
this.
|
|
561
|
+
t(this, M).debounce = e.current, t(this, V).swipe = e.current, t(this, C).interval = e.current, t(this, E) && (e.current && !e.previous && !t(this, l).length ? d(this, o, Ut).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, Pt).call(this));
|
|
562
|
+
}), t(this, $).subscribe((e) => {
|
|
563
|
+
t(this, E) && (t(this, k).call(this), e.current && !e.previous && !t(this, l).length ? d(this, o, Ut).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, Pt).call(this));
|
|
564
|
+
}), t(this, T).subscribe((e) => {
|
|
565
|
+
t(this, E) && (t(this, k).call(this), d(this, o, ft).call(this));
|
|
560
566
|
}), t(this, y).subscribe((e) => {
|
|
561
|
-
e.current ? (this
|
|
562
|
-
}), t(this,
|
|
567
|
+
e.current ? (t(this, E) && (t(this, l).length || (t(this, F).current = !0)), t(this, l).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (n(this, Dt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
|
|
568
|
+
}), t(this, gt).subscribe((e) => {
|
|
563
569
|
t(this, u).damping = e.current;
|
|
564
|
-
}), t(this,
|
|
570
|
+
}), t(this, vt).subscribe((e) => {
|
|
565
571
|
t(this, u).mass = e.current;
|
|
566
|
-
}), t(this,
|
|
572
|
+
}), t(this, yt).subscribe((e) => {
|
|
567
573
|
t(this, u).stiffness = e.current;
|
|
568
|
-
}), t(this,
|
|
569
|
-
t(this, C).speed = e.current, !t(this,
|
|
570
|
-
}), t(this,
|
|
574
|
+
}), t(this, D).subscribe((e) => {
|
|
575
|
+
t(this, C).speed = e.current, !t(this, ot) && e.current && !e.previous ? t(this, C).connect() : !e.current && e.previous && t(this, C).disconnect();
|
|
576
|
+
}), t(this, et).subscribe((e) => {
|
|
571
577
|
e.current || (t(this, C).direction = 1);
|
|
572
|
-
}), t(this,
|
|
573
|
-
this
|
|
574
|
-
}), t(this,
|
|
575
|
-
this
|
|
576
|
-
}), t(this,
|
|
577
|
-
this
|
|
578
|
+
}), t(this, A).subscribe((e) => {
|
|
579
|
+
t(this, E) && d(this, o, ft).call(this);
|
|
580
|
+
}), t(this, st).subscribe((e) => {
|
|
581
|
+
t(this, E) && t(this, A).current && d(this, o, ft).call(this);
|
|
582
|
+
}), t(this, q).subscribe((e) => {
|
|
583
|
+
t(this, E) && t(this, A).current && d(this, o, ft).call(this);
|
|
578
584
|
}), t(this, u).isRunning.subscribe((e) => {
|
|
579
585
|
this.classList.toggle("active", e.current);
|
|
580
586
|
}), t(this, w).subscribe((e) => {
|
|
581
|
-
t(this, l).length && d(this, o,
|
|
587
|
+
t(this, l).length && d(this, o, ft).call(this);
|
|
588
|
+
}), t(this, K).subscribe((e) => {
|
|
589
|
+
t(this, K).isRunning.current && t(this, u).set(e.current, { equalize: !0 });
|
|
582
590
|
}), t(this, N).subscribe((e) => {
|
|
583
|
-
|
|
584
|
-
}), t(this,
|
|
585
|
-
e.current && !e.previous ? d(this, o,
|
|
586
|
-
}), t(this, et).subscribe((
|
|
587
|
-
e.current && !e.previous ? d(this, o, ce).call(this) : !e.current && e.previous && d(this, o, ae).call(this);
|
|
588
|
-
}), t(this, pt).observe(), t(this, x).observe(), t(this, H).observe(), t(this, B).observe(), t(this, W).observe(), t(this, D).observe(), t(this, j).observe(), t(this, J).observe(), t(this, F).observe(), t(this, Q).observe(), t(this, mt).observe(), t(this, I).observe(), t(this, y).observe(), t(this, bt).observe(), t(this, St).observe(), t(this, gt).observe(), t(this, vt).observe(), t(this, Pt).observe(), t(this, z).observe(), t(this, z).observe(), t(this, yt).observe(), t(this, X).observe(), t(this, T).observe(), t(this, Y).observe(), t(this, $).observe(), t(this, tt).observe(), t(this, Ct).observe(), t(this, wt).observe(), t(this, et).observe(), t(this, et).current || d(this, o, ae).call(this);
|
|
591
|
+
e.current && !e.previous ? (this.classList.add("disabled"), d(this, o, ne).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), d(this, o, he).call(this));
|
|
592
|
+
}), t(this, U).subscribe((e) => {
|
|
593
|
+
e.current && !e.previous ? (this.classList.add("hibernated"), d(this, o, de).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), d(this, o, fe).call(this));
|
|
594
|
+
}), t(this, bt).observe(), t(this, P).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, I).observe(), t(this, X).observe(), t(this, Y).observe(), t(this, $).observe(), t(this, tt).observe(), t(this, St).observe(), t(this, T).observe(), t(this, y).observe(), t(this, gt).observe(), t(this, vt).observe(), t(this, yt).observe(), t(this, Ct).observe(), t(this, kt).observe(), t(this, D).observe(), t(this, D).observe(), t(this, wt).observe(), t(this, et).observe(), t(this, A).observe(), t(this, st).observe(), t(this, q).observe(), t(this, it).observe(), t(this, Et).observe(), t(this, N).observe(), t(this, U).observe(), Lt.subscribe(t(this, Xt), ue.LAST);
|
|
589
595
|
}
|
|
590
596
|
disconnectedCallback() {
|
|
591
|
-
this.removeAttribute("tabindex"), this.classList.remove("
|
|
597
|
+
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, bt).unobserve(), t(this, P).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, I).unobserve(), t(this, X).unobserve(), t(this, Y).unobserve(), t(this, $).unobserve(), t(this, tt).unobserve(), t(this, St).unobserve(), t(this, T).unobserve(), t(this, y).unobserve(), t(this, gt).unobserve(), t(this, vt).unobserve(), t(this, yt).unobserve(), t(this, Ct).unobserve(), t(this, kt).unobserve(), t(this, D).unobserve(), t(this, wt).unobserve(), t(this, et).unobserve(), t(this, A).unobserve(), t(this, st).unobserve(), t(this, q).unobserve(), t(this, it).unobserve(), t(this, Et).unobserve(), t(this, N).unobserve(), t(this, U).unobserve(), Lt.unsubscribe(t(this, Xt)), d(this, o, de).call(this);
|
|
592
598
|
}
|
|
593
599
|
}
|
|
594
|
-
u = new WeakMap(),
|
|
595
|
-
d(this, o,
|
|
596
|
-
e instanceof HTMLElement && t(this, l).push(new
|
|
597
|
-
}), t(this,
|
|
600
|
+
u = new WeakMap(), bt = new WeakMap(), P = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), I = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), St = new WeakMap(), T = new WeakMap(), y = new WeakMap(), gt = new WeakMap(), vt = new WeakMap(), yt = new WeakMap(), Ct = new WeakMap(), kt = new WeakMap(), D = new WeakMap(), wt = new WeakMap(), et = new WeakMap(), A = new WeakMap(), st = new WeakMap(), q = new WeakMap(), it = new WeakMap(), Et = new WeakMap(), N = new WeakMap(), U = new WeakMap(), rt = new WeakMap(), f = new WeakMap(), zt = new WeakMap(), l = new WeakMap(), Zt = new WeakMap(), jt = new WeakMap(), v = new WeakMap(), S = new WeakMap(), L = new WeakMap(), M = new WeakMap(), nt = new WeakMap(), V = new WeakMap(), C = new WeakMap(), w = new WeakMap(), Dt = new WeakMap(), ht = new WeakMap(), G = new WeakMap(), ot = new WeakMap(), xt = new WeakMap(), It = new WeakMap(), lt = new WeakMap(), K = new WeakMap(), Jt = new WeakMap(), O = new WeakMap(), E = new WeakMap(), o = new WeakSet(), Ut = function() {
|
|
601
|
+
d(this, o, Pt).call(this), t(this, zt).assignedElements().forEach((e, i) => {
|
|
602
|
+
e instanceof HTMLElement && t(this, l).push(new Ke(e, i, this));
|
|
603
|
+
}), t(this, f).style.transform = "", re(this, "scrollSectionsChange", {
|
|
598
604
|
custom: !0,
|
|
599
605
|
composed: !0
|
|
600
|
-
}), t(this,
|
|
601
|
-
},
|
|
606
|
+
}), t(this, k).call(this), d(this, o, ft).call(this);
|
|
607
|
+
}, Pt = function() {
|
|
602
608
|
t(this, l).forEach((e) => {
|
|
603
609
|
e.destroy();
|
|
604
|
-
}), n(this, l, []), t(this, w).reset(), t(this, u).reset(),
|
|
610
|
+
}), n(this, l, []), t(this, w).reset(), t(this, u).reset(), re(this, "scrollSectionsChange", {
|
|
605
611
|
custom: !0,
|
|
606
612
|
composed: !0
|
|
607
613
|
});
|
|
608
|
-
},
|
|
609
|
-
t(this,
|
|
614
|
+
}, ne = function() {
|
|
615
|
+
t(this, ot) || (n(this, ot, !0), t(this, u).unsubscribe(t(this, Tt)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, It)), clearInterval(t(this, lt)), t(this, K).unlistenAnimationFrame(), t(this, M).disconnect(), t(this, nt).disconnect(), t(this, V).disconnect(), t(this, C).disconnect(), t(this, G) || this.sections.forEach((e) => {
|
|
610
616
|
e.unsetTransform();
|
|
611
617
|
}));
|
|
612
|
-
},
|
|
613
|
-
t(this,
|
|
614
|
-
},
|
|
615
|
-
t(this,
|
|
616
|
-
},
|
|
617
|
-
t(this,
|
|
618
|
-
},
|
|
618
|
+
}, he = function() {
|
|
619
|
+
t(this, ot) && (n(this, ot, !1), t(this, u).subscribe(t(this, Tt)), t(this, M).connect(), t(this, nt).connect(), t(this, V).connect(), t(this, D).current && t(this, C).connect());
|
|
620
|
+
}, de = function() {
|
|
621
|
+
t(this, xt) || (n(this, xt, !0), Lt.unsubscribe(t(this, k)), Gt.unsubscribe(t(this, k)), d(this, o, ne).call(this), t(this, f).style.transform = "", t(this, f).style.height = "", t(this, f).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? d(this, o, Pt).call(this) : (t(this, w).reset(), t(this, u).reset()), pt.unregister(this));
|
|
622
|
+
}, fe = function() {
|
|
623
|
+
t(this, xt) && (n(this, xt, !1), pt.register(this), (t(this, y).current || t(this, F).current || t(this, y).current || t(this, $).current || t(this, I).current) && d(this, o, Ut).call(this), d(this, o, he).call(this), Lt.subscribe(t(this, k), ue.SCROLL), Gt.subscribe(this, t(this, k)));
|
|
624
|
+
}, k = new WeakMap(), Tt = new WeakMap(), ke = function(e) {
|
|
619
625
|
let i = t(this, w).current;
|
|
620
|
-
return t(this, y).current ? (i = e % t(this, l).length, i = i < 0 ? t(this, l).length + i : i) : i =
|
|
621
|
-
},
|
|
622
|
-
t(this,
|
|
623
|
-
t(this,
|
|
626
|
+
return t(this, y).current ? (i = e % t(this, l).length, i = i < 0 ? t(this, l).length + i : i) : i = Pe(e, 0, this.limit), i;
|
|
627
|
+
}, At = new WeakMap(), Qt = new WeakMap(), pe = function(e = 1) {
|
|
628
|
+
t(this, et).current && (t(this, C).direction = e), t(this, D).current && t(this, C).pauseAndContinue(
|
|
629
|
+
t(this, wt).current,
|
|
624
630
|
this.sectionalCSSProperty.current
|
|
625
631
|
);
|
|
626
|
-
},
|
|
632
|
+
}, me = function(e = "current") {
|
|
627
633
|
if (t(this, y).current && t(this, l).length) {
|
|
628
|
-
const i = t(this, u)[e] % (t(this, S) + t(this, v) + t(this,
|
|
629
|
-
return i < 0 ? t(this, S) + i + t(this, v) + t(this,
|
|
634
|
+
const i = t(this, u)[e] % (t(this, S) + t(this, v) + t(this, L));
|
|
635
|
+
return i < 0 ? t(this, S) + i + t(this, v) + t(this, L) : i;
|
|
630
636
|
} else
|
|
631
637
|
return t(this, u)[e];
|
|
632
|
-
},
|
|
638
|
+
}, ft = function() {
|
|
633
639
|
if (t(this, l).length) {
|
|
634
|
-
const e = t(this, w).current + t(this,
|
|
635
|
-
if (e === 0 ? n(this,
|
|
636
|
-
detail: { line: t(this,
|
|
637
|
-
}), t(this,
|
|
638
|
-
this.classList.remove("end", "start"), t(this,
|
|
639
|
-
const i = t(this,
|
|
640
|
+
const e = t(this, w).current + t(this, st).current;
|
|
641
|
+
if (e === 0 ? n(this, O, "start") : e === this.limit ? n(this, O, "end") : n(this, O, null), re(this, "scrollLine", {
|
|
642
|
+
detail: { line: t(this, O) }
|
|
643
|
+
}), t(this, A).current) {
|
|
644
|
+
this.classList.remove("end", "start"), t(this, O) && this.classList.add(t(this, O));
|
|
645
|
+
const i = t(this, T).current + t(this, q).current;
|
|
640
646
|
t(this, l).forEach((r, c) => {
|
|
641
|
-
const b = e - this.limit - 1 + t(this,
|
|
642
|
-
c >= e && c <
|
|
647
|
+
const b = e - this.limit - 1 + t(this, q).current, z = e + i, R = this.sections.length - z;
|
|
648
|
+
c >= e && c < z || c <= b ? r.mark("current") : c >= z && c < z + R / 2 || c <= b + i ? r.mark("next") : r.mark("previous");
|
|
643
649
|
});
|
|
644
650
|
}
|
|
645
651
|
}
|
|
646
|
-
},
|
|
652
|
+
}, be = function(e = this.targetScrollValue) {
|
|
647
653
|
let i = null, r = 1 / 0;
|
|
648
654
|
for (let c = 0; c < t(this, l).length; c++) {
|
|
649
655
|
const b = Math.abs(t(this, l)[c].position - e);
|
|
650
656
|
b < r && (r = b, i = c);
|
|
651
657
|
}
|
|
652
658
|
return i !== null ? t(this, l)[i] : null;
|
|
653
|
-
};
|
|
654
|
-
customElements.get("e-scroll") || customElements.define("e-scroll",
|
|
655
|
-
var
|
|
656
|
-
class
|
|
659
|
+
}, Xt = new WeakMap();
|
|
660
|
+
customElements.get("e-scroll") || customElements.define("e-scroll", Kt);
|
|
661
|
+
var Yt;
|
|
662
|
+
class Se extends HTMLElement {
|
|
657
663
|
constructor() {
|
|
658
664
|
super(...arguments);
|
|
659
|
-
s(this,
|
|
665
|
+
s(this, Yt, null);
|
|
660
666
|
}
|
|
661
667
|
get scrollElement() {
|
|
662
|
-
return t(this,
|
|
668
|
+
return t(this, Yt);
|
|
663
669
|
}
|
|
664
670
|
connectedCallback() {
|
|
665
|
-
const e =
|
|
666
|
-
e instanceof
|
|
671
|
+
const e = Le(this, Kt);
|
|
672
|
+
e instanceof Kt ? n(this, Yt, e) : console.error(this, "e-scroll not found");
|
|
667
673
|
}
|
|
668
674
|
}
|
|
669
|
-
|
|
670
|
-
var
|
|
671
|
-
class
|
|
675
|
+
Yt = new WeakMap();
|
|
676
|
+
var ct, x, _, Z, Mt, Vt, at, Ot, te, ee;
|
|
677
|
+
class Ze extends Se {
|
|
672
678
|
constructor() {
|
|
673
679
|
super();
|
|
674
|
-
s(this,
|
|
675
|
-
s(this,
|
|
676
|
-
s(this,
|
|
677
|
-
s(this,
|
|
678
|
-
s(this,
|
|
679
|
-
s(this,
|
|
680
|
-
s(this,
|
|
681
|
-
n(this,
|
|
682
|
-
const e = t(this,
|
|
683
|
-
n(this,
|
|
680
|
+
s(this, ct, null);
|
|
681
|
+
s(this, x, null);
|
|
682
|
+
s(this, _, !1);
|
|
683
|
+
s(this, Z, 0);
|
|
684
|
+
s(this, Mt, 0);
|
|
685
|
+
s(this, Vt, 0);
|
|
686
|
+
s(this, at, () => {
|
|
687
|
+
n(this, _, this.offsetWidth > this.offsetHeight);
|
|
688
|
+
const e = t(this, _) ? this.offsetWidth : this.offsetHeight;
|
|
689
|
+
n(this, Z, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), n(this, Z, Math.max(t(this, Z), 30)), t(this, _) ? (t(this, x).style.width = t(this, Z) + "px", t(this, x).style.height = "100%") : (t(this, x).style.width = "100%", t(this, x).style.height = t(this, Z) + "px"), n(this, Mt, e - t(this, Z)), this.scrollElement.scrollSize ? this.style.display = "" : this.style.display = "none", t(this, Ot).call(this);
|
|
684
690
|
});
|
|
685
|
-
s(this,
|
|
686
|
-
n(this,
|
|
691
|
+
s(this, Ot, () => {
|
|
692
|
+
n(this, Vt, this.scrollElement.currentProgress * t(this, Mt)), t(this, _) ? t(this, x).style.transform = `translate3d(${t(this, Vt)}px, 0px, 0px)` : t(this, x).style.transform = `translate3d(0px, ${t(this, Vt)}px, 0px)`;
|
|
687
693
|
});
|
|
688
|
-
s(this,
|
|
694
|
+
s(this, te, () => {
|
|
689
695
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
690
696
|
});
|
|
691
|
-
s(this,
|
|
692
|
-
document.documentElement.classList.add("grabbing"),
|
|
697
|
+
s(this, ee, (e) => {
|
|
698
|
+
document.documentElement.classList.add("grabbing"), Ne(
|
|
693
699
|
(c) => {
|
|
694
|
-
const b = t(this,
|
|
695
|
-
this.scrollElement.setPosition(i +
|
|
700
|
+
const b = t(this, _) ? c.x : c.y, z = this.scrollElement.distance / t(this, Mt), R = (b - r) * z;
|
|
701
|
+
this.scrollElement.setPosition(i + R);
|
|
696
702
|
},
|
|
697
703
|
() => {
|
|
698
704
|
document.documentElement.classList.remove("grabbing");
|
|
699
705
|
}
|
|
700
706
|
);
|
|
701
|
-
const i = this.scrollElement.damped.target, r = t(this,
|
|
707
|
+
const i = this.scrollElement.damped.target, r = t(this, _) ? e.x : e.y;
|
|
702
708
|
});
|
|
703
|
-
if (
|
|
709
|
+
if (oe) {
|
|
704
710
|
const e = this.attachShadow({ mode: "open" });
|
|
705
711
|
e.adoptedStyleSheets = [
|
|
706
|
-
|
|
712
|
+
xe({
|
|
707
713
|
":host": {
|
|
708
714
|
display: "inline-block",
|
|
709
715
|
zIndex: "1",
|
|
@@ -732,36 +738,36 @@ class Ke extends pe {
|
|
|
732
738
|
touchAction: "none"
|
|
733
739
|
}
|
|
734
740
|
})
|
|
735
|
-
], n(this,
|
|
741
|
+
], n(this, ct, document.createElement("slot")), t(this, ct).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, ct));
|
|
736
742
|
}
|
|
737
743
|
}
|
|
738
744
|
get thumbElement() {
|
|
739
|
-
return t(this,
|
|
745
|
+
return t(this, x);
|
|
740
746
|
}
|
|
741
747
|
connectedCallback() {
|
|
742
748
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
743
|
-
const e = t(this,
|
|
744
|
-
n(this,
|
|
749
|
+
const e = t(this, ct).assignedElements()[0] || t(this, ct).firstElementChild;
|
|
750
|
+
n(this, x, e), t(this, x).addEventListener("pointerdown", t(this, ee)), Lt.subscribe(t(this, at), ue.SCROLL), Gt.subscribe(this, t(this, at)), Gt.subscribe(this.scrollElement, t(this, at)), this.scrollElement.onScroll(t(this, Ot)), this.scrollElement.axisCSSProperty.subscribe(t(this, te));
|
|
745
751
|
}
|
|
746
752
|
disconnectedCallback() {
|
|
747
|
-
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this,
|
|
753
|
+
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, x).removeEventListener("pointerdown", t(this, ee)), Lt.unsubscribe(t(this, at)), Gt.unsubscribe(t(this, at)), this.scrollElement.offScroll(t(this, Ot)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, te));
|
|
748
754
|
}
|
|
749
755
|
}
|
|
750
|
-
|
|
751
|
-
customElements.get("e-scrollbar") || customElements.define("e-scrollbar",
|
|
752
|
-
var
|
|
753
|
-
class
|
|
756
|
+
ct = new WeakMap(), x = new WeakMap(), _ = new WeakMap(), Z = new WeakMap(), Mt = new WeakMap(), Vt = new WeakMap(), at = new WeakMap(), Ot = new WeakMap(), te = new WeakMap(), ee = new WeakMap();
|
|
757
|
+
customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Ze);
|
|
758
|
+
var Rt, Ht, Bt;
|
|
759
|
+
class ze extends Se {
|
|
754
760
|
constructor() {
|
|
755
761
|
super();
|
|
756
|
-
s(this,
|
|
757
|
-
s(this,
|
|
762
|
+
s(this, Rt, new p(this, "--behaviour", "smooth"));
|
|
763
|
+
s(this, Ht, new p(
|
|
758
764
|
this,
|
|
759
765
|
"--tween-easing",
|
|
760
766
|
!1
|
|
761
767
|
));
|
|
762
|
-
s(this,
|
|
763
|
-
|
|
764
|
-
const e = t(this,
|
|
768
|
+
s(this, Bt, new p(this, "--tween-duration", 0));
|
|
769
|
+
oe && this.addEventListener("click", () => {
|
|
770
|
+
const e = t(this, Rt).current, i = t(this, Ht).current, r = t(this, Bt).current;
|
|
765
771
|
this.handleClick({
|
|
766
772
|
behaviour: e,
|
|
767
773
|
tween: i || r ? { easing: i, duration: r } : void 0
|
|
@@ -769,132 +775,132 @@ class Le extends pe {
|
|
|
769
775
|
});
|
|
770
776
|
}
|
|
771
777
|
connectedCallback() {
|
|
772
|
-
super.connectedCallback(), t(this,
|
|
778
|
+
super.connectedCallback(), t(this, Rt).observe(), t(this, Ht).observe(), t(this, Bt).observe();
|
|
773
779
|
}
|
|
774
780
|
disconnectedCallback() {
|
|
775
|
-
t(this,
|
|
781
|
+
t(this, Rt).close(), t(this, Ht).close(), t(this, Bt).close();
|
|
776
782
|
}
|
|
777
783
|
}
|
|
778
|
-
|
|
779
|
-
var
|
|
780
|
-
class
|
|
784
|
+
Rt = new WeakMap(), Ht = new WeakMap(), Bt = new WeakMap();
|
|
785
|
+
var Wt;
|
|
786
|
+
class je extends ze {
|
|
781
787
|
constructor() {
|
|
782
788
|
super(...arguments);
|
|
783
|
-
s(this,
|
|
789
|
+
s(this, Wt, new p(this, "--set", 1));
|
|
784
790
|
}
|
|
785
791
|
handleClick(e) {
|
|
786
|
-
this.scrollElement.scrollToSection(t(this,
|
|
792
|
+
this.scrollElement.scrollToSection(t(this, Wt).current, e);
|
|
787
793
|
}
|
|
788
794
|
connectedCallback() {
|
|
789
|
-
super.connectedCallback(), t(this,
|
|
795
|
+
super.connectedCallback(), t(this, Wt).observe();
|
|
790
796
|
}
|
|
791
797
|
disconnectedCallback() {
|
|
792
|
-
super.disconnectedCallback(), t(this,
|
|
798
|
+
super.disconnectedCallback(), t(this, Wt).close();
|
|
793
799
|
}
|
|
794
800
|
}
|
|
795
|
-
|
|
796
|
-
customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button",
|
|
797
|
-
var
|
|
798
|
-
class
|
|
801
|
+
Wt = new WeakMap();
|
|
802
|
+
customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", je);
|
|
803
|
+
var j, Ft;
|
|
804
|
+
class Je extends ze {
|
|
799
805
|
constructor() {
|
|
800
806
|
super(...arguments);
|
|
801
|
-
s(this,
|
|
802
|
-
s(this,
|
|
803
|
-
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this,
|
|
807
|
+
s(this, j, new p(this, "--step", 1));
|
|
808
|
+
s(this, Ft, () => {
|
|
809
|
+
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, j).current > 0 && this.scrollElement.scrollLine === "end" || t(this, j).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
804
810
|
});
|
|
805
811
|
}
|
|
806
812
|
handleClick(e) {
|
|
807
|
-
this.scrollElement.shiftSections(t(this,
|
|
813
|
+
this.scrollElement.shiftSections(t(this, j).current, e);
|
|
808
814
|
}
|
|
809
815
|
connectedCallback() {
|
|
810
|
-
super.connectedCallback(), this.scrollElement && (t(this,
|
|
811
|
-
t(this,
|
|
812
|
-
}), t(this,
|
|
816
|
+
super.connectedCallback(), this.scrollElement && (t(this, j).subscribe(() => {
|
|
817
|
+
t(this, Ft).call(this);
|
|
818
|
+
}), t(this, j).observe(), this.scrollElement.addEventListener(
|
|
813
819
|
"scrollLine",
|
|
814
|
-
t(this,
|
|
815
|
-
), t(this,
|
|
820
|
+
t(this, Ft)
|
|
821
|
+
), t(this, Ft).call(this));
|
|
816
822
|
}
|
|
817
823
|
disconnectedCallback() {
|
|
818
|
-
super.disconnectedCallback(), t(this,
|
|
824
|
+
super.disconnectedCallback(), t(this, j).close(), this.removeAttribute("disabled");
|
|
819
825
|
}
|
|
820
826
|
}
|
|
821
|
-
|
|
822
|
-
customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button",
|
|
823
|
-
var
|
|
824
|
-
class
|
|
827
|
+
j = new WeakMap(), Ft = new WeakMap();
|
|
828
|
+
customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", Je);
|
|
829
|
+
var J, ut, $t, se, ie, qt;
|
|
830
|
+
class Qe {
|
|
825
831
|
constructor(h, e, i) {
|
|
826
|
-
s(this,
|
|
827
|
-
s(this,
|
|
828
|
-
s(this,
|
|
829
|
-
s(this,
|
|
830
|
-
s(this,
|
|
831
|
-
t(this,
|
|
832
|
-
behaviour: t(this,
|
|
832
|
+
s(this, J, null);
|
|
833
|
+
s(this, ut, null);
|
|
834
|
+
s(this, $t, null);
|
|
835
|
+
s(this, se, null);
|
|
836
|
+
s(this, ie, () => {
|
|
837
|
+
t(this, ut).scrollToSection(t(this, $t), {
|
|
838
|
+
behaviour: t(this, se)
|
|
833
839
|
});
|
|
834
840
|
});
|
|
835
|
-
s(this,
|
|
836
|
-
t(this,
|
|
841
|
+
s(this, qt, () => {
|
|
842
|
+
t(this, J).classList.toggle(
|
|
837
843
|
"current",
|
|
838
|
-
t(this,
|
|
844
|
+
t(this, ut).counter.current === t(this, $t)
|
|
839
845
|
);
|
|
840
846
|
});
|
|
841
|
-
|
|
847
|
+
oe && (n(this, J, document.createElement("button")), n(this, ut, h), n(this, se, i), n(this, $t, e), t(this, J).addEventListener("click", t(this, ie)), t(this, ut).counter.subscribe(t(this, qt)), t(this, qt).call(this));
|
|
842
848
|
}
|
|
843
849
|
get element() {
|
|
844
|
-
return t(this,
|
|
850
|
+
return t(this, J);
|
|
845
851
|
}
|
|
846
852
|
destroy() {
|
|
847
|
-
t(this,
|
|
853
|
+
t(this, J).removeEventListener("click", t(this, ie)), t(this, ut).counter.unsubscribe(t(this, qt)), t(this, J).remove();
|
|
848
854
|
}
|
|
849
855
|
}
|
|
850
|
-
|
|
851
|
-
var
|
|
852
|
-
class
|
|
856
|
+
J = new WeakMap(), ut = new WeakMap(), $t = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), qt = new WeakMap();
|
|
857
|
+
var dt, Nt;
|
|
858
|
+
class Xe extends Se {
|
|
853
859
|
constructor() {
|
|
854
860
|
super(...arguments);
|
|
855
|
-
s(this,
|
|
856
|
-
s(this,
|
|
857
|
-
t(this,
|
|
861
|
+
s(this, dt, []);
|
|
862
|
+
s(this, Nt, Ue(() => {
|
|
863
|
+
t(this, dt).forEach((e) => e.destroy()), n(this, dt, []);
|
|
858
864
|
for (let e = 0; e < this.scrollElement.sections.length; e++) {
|
|
859
|
-
const i = new
|
|
865
|
+
const i = new Qe(
|
|
860
866
|
this.scrollElement,
|
|
861
867
|
e,
|
|
862
868
|
this.getAttribute("behaviour") || "smooth"
|
|
863
869
|
);
|
|
864
|
-
this.appendChild(i.element), t(this,
|
|
870
|
+
this.appendChild(i.element), t(this, dt).push(i);
|
|
865
871
|
}
|
|
866
872
|
}, 0));
|
|
867
873
|
}
|
|
868
874
|
connectedCallback() {
|
|
869
875
|
super.connectedCallback(), this.scrollElement.addEventListener(
|
|
870
876
|
"sectionsChange",
|
|
871
|
-
t(this,
|
|
872
|
-
), t(this,
|
|
877
|
+
t(this, Nt)
|
|
878
|
+
), t(this, Nt).call(this);
|
|
873
879
|
}
|
|
874
880
|
disconnectedCallback() {
|
|
875
881
|
this.scrollElement.removeEventListener(
|
|
876
882
|
"sectionsChange",
|
|
877
|
-
t(this,
|
|
878
|
-
), t(this,
|
|
883
|
+
t(this, Nt)
|
|
884
|
+
), t(this, dt).forEach((e) => e.destroy()), n(this, dt, []);
|
|
879
885
|
}
|
|
880
886
|
}
|
|
881
|
-
|
|
882
|
-
customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons",
|
|
883
|
-
class
|
|
887
|
+
dt = new WeakMap(), Nt = new WeakMap();
|
|
888
|
+
customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", Xe);
|
|
889
|
+
class Ye extends Ge {
|
|
884
890
|
connectedCallback() {
|
|
885
|
-
const h =
|
|
886
|
-
h instanceof
|
|
891
|
+
const h = Le(this, Kt);
|
|
892
|
+
h instanceof Kt ? (this.scrollContainer = h, this.scrollContainer.addEventListener(
|
|
887
893
|
"scrollSectionsChange",
|
|
888
894
|
this.findAnotherScrollEntries
|
|
889
895
|
)) : console.error(this, "e-scroll not found");
|
|
890
896
|
}
|
|
891
897
|
}
|
|
892
|
-
customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment",
|
|
898
|
+
customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", Ye);
|
|
893
899
|
export {
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
+
Xe as ScrollBulletButtonsElement,
|
|
901
|
+
Kt as ScrollElement,
|
|
902
|
+
Ye as ScrollSegmentElement,
|
|
903
|
+
je as ScrollSetButtonElement,
|
|
904
|
+
Je as ScrollStepButtonElement,
|
|
905
|
+
Ze as ScrollbarElement
|
|
900
906
|
};
|