aptechka 0.61.9 → 0.61.11
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/popover/index.cjs +1 -1
- package/lib/popover/index.js +31 -28
- package/lib/scroll/ScrollCounterElement.d.ts +11 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.d.ts +1 -0
- package/lib/scroll/index.js +451 -414
- package/package.json +1 -1
package/lib/scroll/index.js
CHANGED
|
@@ -1,104 +1,120 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
throw TypeError(p);
|
|
1
|
+
var Ye = Object.defineProperty;
|
|
2
|
+
var We = Object.getOwnPropertySymbols, ts = Object.getPrototypeOf, es = Object.prototype.hasOwnProperty, ss = Object.prototype.propertyIsEnumerable, is = Reflect.get;
|
|
3
|
+
var Ne = (u) => {
|
|
4
|
+
throw TypeError(u);
|
|
6
5
|
};
|
|
7
|
-
var
|
|
6
|
+
var Fe = (u, n, e) => n in u ? Ye(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, qe = (u, n) => {
|
|
8
7
|
for (var e in n || (n = {}))
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var e of
|
|
12
|
-
|
|
13
|
-
return
|
|
8
|
+
es.call(n, e) && Fe(u, e, n[e]);
|
|
9
|
+
if (We)
|
|
10
|
+
for (var e of We(n))
|
|
11
|
+
ss.call(n, e) && Fe(u, e, n[e]);
|
|
12
|
+
return u;
|
|
14
13
|
};
|
|
15
|
-
var
|
|
16
|
-
var t = (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
var ke = (u, n, e) => n.has(u) || Ne("Cannot " + e);
|
|
15
|
+
var t = (u, n, e) => (ke(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? Ne("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (ke(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), a = (u, n, e) => (ke(u, n, "access private method"), e);
|
|
16
|
+
var Ue = (u, n, e) => is(ts(u), e, n);
|
|
17
|
+
var Ge = (u, n, e) => new Promise((i, r) => {
|
|
18
|
+
var l = (g) => {
|
|
19
|
+
try {
|
|
20
|
+
S(e.next(g));
|
|
21
|
+
} catch (gt) {
|
|
22
|
+
r(gt);
|
|
23
|
+
}
|
|
24
|
+
}, b = (g) => {
|
|
25
|
+
try {
|
|
26
|
+
S(e.throw(g));
|
|
27
|
+
} catch (gt) {
|
|
28
|
+
r(gt);
|
|
29
|
+
}
|
|
30
|
+
}, S = (g) => g.done ? i(g.value) : Promise.resolve(g.value).then(l, b);
|
|
31
|
+
S((e = e.apply(u, n)).next());
|
|
32
|
+
});
|
|
33
|
+
import { S as rs } from "../Store-swP_0ymB.js";
|
|
34
|
+
import { i as T } from "../index-euf5anj6.js";
|
|
35
|
+
import { a as ns } from "../easings-Bni3YAAW.js";
|
|
36
|
+
import { d as he } from "../events-CsVF98U6.js";
|
|
37
|
+
import { d as Ie } from "../function-C10DGppn.js";
|
|
38
|
+
import { c as Ze } from "../jss-DtnXPEnq.js";
|
|
39
|
+
import { a as Ae, g as Me } from "../layout-DpZo-I0y.js";
|
|
40
|
+
import { c as _e } from "../math-BOBiC4TN.js";
|
|
41
|
+
import { p as hs, l as os } from "../number-CbdpfO3u.js";
|
|
26
42
|
import "../ticker/index.js";
|
|
27
|
-
import { TICK_ORDER as
|
|
28
|
-
import { D as
|
|
29
|
-
import { T as
|
|
30
|
-
import { WheelControls as
|
|
31
|
-
import { windowResizer as
|
|
32
|
-
import { scrollEntries as
|
|
33
|
-
import { cssUnitParser as
|
|
34
|
-
import { CSSProperty as
|
|
35
|
-
import { device as
|
|
36
|
-
import { elementResizer as
|
|
37
|
-
import { s as
|
|
38
|
-
import { b as
|
|
39
|
-
import { ScrollSegmentElement as
|
|
40
|
-
var f,
|
|
41
|
-
class
|
|
43
|
+
import { TICK_ORDER as ls, RESIZE_ORDER as Te } from "../order/index.js";
|
|
44
|
+
import { D as cs } from "../Damped-ByZFbNSt.js";
|
|
45
|
+
import { T as as } from "../Tweened-C4xgzPkR.js";
|
|
46
|
+
import { WheelControls as us, KeyboardControls as ds, DragControls as ps, AutoplayControls as fs } from "../controls/index.js";
|
|
47
|
+
import { windowResizer as Bt } from "../window-resizer/index.js";
|
|
48
|
+
import { scrollEntries as yt } from "../scroll-entries/index.js";
|
|
49
|
+
import { cssUnitParser as Ke } from "../css-unit-parser/index.js";
|
|
50
|
+
import { CSSProperty as p } from "../css-property/index.js";
|
|
51
|
+
import { device as ms } from "../device/index.js";
|
|
52
|
+
import { elementResizer as ae } from "../element-resizer/index.js";
|
|
53
|
+
import { s as bs } from "../gestures-CcXV6fCp.js";
|
|
54
|
+
import { b as je } from "../dom-CVWzyXPH.js";
|
|
55
|
+
import { ScrollSegmentElement as Ss } from "../scroll-segment/index.js";
|
|
56
|
+
var f, Ft, y, ue, de, Ct, $, et, wt, xt, oe;
|
|
57
|
+
class gs {
|
|
42
58
|
constructor(n, e, i) {
|
|
43
|
-
s(this,
|
|
59
|
+
s(this, xt);
|
|
44
60
|
s(this, f);
|
|
45
|
-
s(this,
|
|
46
|
-
s(this,
|
|
47
|
-
s(this, ae, 0);
|
|
61
|
+
s(this, Ft);
|
|
62
|
+
s(this, y);
|
|
48
63
|
s(this, ue, 0);
|
|
49
|
-
s(this,
|
|
64
|
+
s(this, de, 0);
|
|
65
|
+
s(this, Ct, 0);
|
|
50
66
|
s(this, $, 0);
|
|
51
67
|
s(this, et, null);
|
|
52
|
-
s(this,
|
|
53
|
-
h(this, f, n), h(this,
|
|
68
|
+
s(this, wt, 0);
|
|
69
|
+
h(this, f, n), h(this, Ft, e), h(this, y, i), yt.register(t(this, f)), this.setIndex(t(this, Ft));
|
|
54
70
|
}
|
|
55
71
|
get element() {
|
|
56
72
|
return t(this, f);
|
|
57
73
|
}
|
|
58
74
|
get index() {
|
|
59
|
-
return t(this,
|
|
75
|
+
return t(this, Ft);
|
|
60
76
|
}
|
|
61
77
|
get size() {
|
|
62
|
-
return t(this,
|
|
78
|
+
return t(this, Ct);
|
|
63
79
|
}
|
|
64
80
|
get width() {
|
|
65
|
-
return t(this,
|
|
81
|
+
return t(this, ue);
|
|
66
82
|
}
|
|
67
83
|
get height() {
|
|
68
|
-
return t(this,
|
|
84
|
+
return t(this, de);
|
|
69
85
|
}
|
|
70
86
|
get position() {
|
|
71
87
|
return t(this, $);
|
|
72
88
|
}
|
|
73
89
|
get transformPosition() {
|
|
74
|
-
return t(this,
|
|
90
|
+
return t(this, wt);
|
|
75
91
|
}
|
|
76
92
|
destroy() {
|
|
77
|
-
|
|
93
|
+
yt.unregister(t(this, f)), this.unsetTransform();
|
|
78
94
|
}
|
|
79
95
|
unsetTransform() {
|
|
80
96
|
t(this, f).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setCurrentIndexArcAbs(null), this.setMiddle(!1), this.setSize();
|
|
81
97
|
}
|
|
82
98
|
setSize(n) {
|
|
83
|
-
n ? (t(this, f).style.setProperty("--size", n + "px"), t(this,
|
|
99
|
+
n ? (t(this, f).style.setProperty("--size", n + "px"), t(this, y).axisCSSProperty.current === "x" ? (t(this, f).style.width = n + "px", t(this, f).style.height = "") : (t(this, f).style.height = n + "px", t(this, f).style.width = "")) : (t(this, f).style.width = "", t(this, f).style.height = "", t(this, f).style.removeProperty("--size"));
|
|
84
100
|
}
|
|
85
101
|
resize() {
|
|
86
|
-
h(this,
|
|
102
|
+
h(this, ue, t(this, f).offsetWidth), h(this, de, t(this, f).offsetHeight), h(this, Ct, t(this, y).vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth), h(this, $, t(this, y).vertical ? Ae(t(this, f)) : Me(t(this, f))), h(this, $, t(this, $) - t(this, y).contentPosition);
|
|
87
103
|
}
|
|
88
104
|
transform() {
|
|
89
|
-
const n = t(this,
|
|
105
|
+
const n = t(this, y).shiftSectionPositionCSSProperty.current;
|
|
90
106
|
let e = n;
|
|
91
|
-
const i = t(this,
|
|
92
|
-
t(this,
|
|
107
|
+
const i = t(this, y).viewportSize * t(this, y).sectionDistanceScaleCSSProperty.current;
|
|
108
|
+
t(this, y).loopCSSProperty.current && t(this, $) + t(this, Ct) <= t(this, y).currentScrollValue - n / 2 && (e = (t(this, y).distance - n) * -1 - t(this, y).gap), yt.update(
|
|
93
109
|
t(this, f),
|
|
94
|
-
t(this,
|
|
110
|
+
t(this, y).axisCSSProperty.current,
|
|
95
111
|
e
|
|
96
112
|
);
|
|
97
|
-
const r = t(this,
|
|
98
|
-
h(this,
|
|
113
|
+
const r = t(this, y).currentScrollValue + e, l = t(this, $) - t(this, y).viewportSize - i, b = t(this, $) + t(this, Ct) + i, S = hs(_e(r, l, b), 3);
|
|
114
|
+
h(this, wt, S * -1), t(this, y).vertical ? t(this, f).style.transform = `translate3d(0px, ${t(this, wt)}px, 0px)` : t(this, f).style.transform = `translate3d(${t(this, wt)}px, 0px, 0px)`;
|
|
99
115
|
}
|
|
100
116
|
setMark(n) {
|
|
101
|
-
t(this, et) !== n && (t(this, et) && t(this, f).classList.remove(t(this, et)), n && t(this, f).classList.add(n), h(this, et, n),
|
|
117
|
+
t(this, et) !== n && (t(this, et) && t(this, f).classList.remove(t(this, et)), n && t(this, f).classList.add(n), h(this, et, n), he(t(this, f), "scrollSectionMarkChange", {
|
|
102
118
|
composed: !0,
|
|
103
119
|
detail: {
|
|
104
120
|
mark: t(this, et)
|
|
@@ -110,22 +126,22 @@ class us {
|
|
|
110
126
|
t(this, f).classList.toggle("middle", n);
|
|
111
127
|
}
|
|
112
128
|
setIndex(n) {
|
|
113
|
-
|
|
129
|
+
a(this, xt, oe).call(this, "index", n);
|
|
114
130
|
}
|
|
115
131
|
setCurrentIndex(n) {
|
|
116
|
-
|
|
132
|
+
a(this, xt, oe).call(this, "current-index", n);
|
|
117
133
|
}
|
|
118
134
|
setCurrentIndexArc(n) {
|
|
119
|
-
|
|
135
|
+
a(this, xt, oe).call(this, "current-index-arc", n);
|
|
120
136
|
}
|
|
121
137
|
setCurrentIndexArcAbs(n) {
|
|
122
|
-
|
|
138
|
+
a(this, xt, oe).call(this, "current-index-arc-abs", n);
|
|
123
139
|
}
|
|
124
140
|
}
|
|
125
|
-
f = new WeakMap(),
|
|
141
|
+
f = new WeakMap(), Ft = new WeakMap(), y = new WeakMap(), ue = new WeakMap(), de = new WeakMap(), Ct = new WeakMap(), $ = new WeakMap(), et = new WeakMap(), wt = new WeakMap(), xt = new WeakSet(), oe = function(n, e) {
|
|
126
142
|
e !== null ? (t(this, f).style.setProperty(`--${n}`, e.toString()), t(this, f).setAttribute(`data-${n}`, e.toString())) : (t(this, f).style.removeProperty(`--${n}`), t(this, f).removeAttribute(`data-${n}`));
|
|
127
143
|
};
|
|
128
|
-
const
|
|
144
|
+
const vs = Ze({
|
|
129
145
|
":host": {
|
|
130
146
|
position: "relative",
|
|
131
147
|
width: "100%",
|
|
@@ -164,209 +180,209 @@ const ds = Ne({
|
|
|
164
180
|
flexShrink: "0"
|
|
165
181
|
}
|
|
166
182
|
});
|
|
167
|
-
var
|
|
168
|
-
class
|
|
183
|
+
var d, Et, P, st, B, W, F, D, it, rt, N, nt, Pt, R, w, Lt, zt, kt, It, Nt, At, A, Mt, ht, M, ot, q, Tt, lt, Dt, ct, at, ut, m, qt, c, pe, fe, C, v, I, V, dt, O, E, L, Ut, U, G, K, Z, Gt, pt, _, Rt, H, x, Kt, j, Vt, Zt, o, De, le, $t, Pe, Le, Re, Ve, z, me, Je, _t, be, Oe, He, vt, Qe, Se, ce, ge;
|
|
184
|
+
class Wt extends HTMLElement {
|
|
169
185
|
constructor() {
|
|
170
186
|
super();
|
|
171
187
|
s(this, o);
|
|
172
|
-
s(this,
|
|
173
|
-
s(this,
|
|
174
|
-
s(this,
|
|
175
|
-
s(this, st, new
|
|
176
|
-
s(this, B, new
|
|
177
|
-
s(this, W, new
|
|
188
|
+
s(this, d, null);
|
|
189
|
+
s(this, Et, new p(this, "--controls", !0));
|
|
190
|
+
s(this, P, new p(this, "--axis", "y"));
|
|
191
|
+
s(this, st, new p(this, "--reverse", !1));
|
|
192
|
+
s(this, B, new p(this, "--direction", 0));
|
|
193
|
+
s(this, W, new p(this, "--pages", 0, {
|
|
178
194
|
validate: (e) => Math.max(0, e - 1)
|
|
179
195
|
}));
|
|
180
|
-
s(this, F, new
|
|
181
|
-
s(this,
|
|
182
|
-
s(this, it, new
|
|
196
|
+
s(this, F, new p(this, "--split", !1));
|
|
197
|
+
s(this, D, new p(this, "--sectional", !1));
|
|
198
|
+
s(this, it, new p(
|
|
183
199
|
this,
|
|
184
200
|
"--tween-easing",
|
|
185
201
|
!1
|
|
186
202
|
));
|
|
187
|
-
s(this, rt, new
|
|
203
|
+
s(this, rt, new p(
|
|
188
204
|
this,
|
|
189
205
|
"--tween-duration",
|
|
190
206
|
!1
|
|
191
207
|
));
|
|
192
|
-
s(this, N, new
|
|
193
|
-
s(this, nt, new
|
|
208
|
+
s(this, N, new p(this, "--auto-size", !1));
|
|
209
|
+
s(this, nt, new p(
|
|
194
210
|
this,
|
|
195
211
|
"--wheel-max-delta",
|
|
196
212
|
!1
|
|
197
213
|
));
|
|
198
|
-
s(this,
|
|
199
|
-
s(this,
|
|
214
|
+
s(this, Pt, new p(this, "--drag-inertion", 1));
|
|
215
|
+
s(this, R, new p(
|
|
200
216
|
this,
|
|
201
217
|
"--sections-in-view",
|
|
202
218
|
1
|
|
203
219
|
));
|
|
204
|
-
s(this,
|
|
205
|
-
s(this,
|
|
206
|
-
s(this,
|
|
207
|
-
s(this,
|
|
208
|
-
s(this, It, new
|
|
209
|
-
s(this,
|
|
220
|
+
s(this, w, new p(this, "--loop", !1));
|
|
221
|
+
s(this, Lt, new p(this, "--damping", 20));
|
|
222
|
+
s(this, zt, new p(this, "--mass", 0));
|
|
223
|
+
s(this, kt, new p(this, "--stiffness", 0));
|
|
224
|
+
s(this, It, new p(this, "--mouse-drag", !1));
|
|
225
|
+
s(this, Nt, new p(
|
|
210
226
|
this,
|
|
211
227
|
"--section-distance-scale",
|
|
212
228
|
0.5
|
|
213
229
|
));
|
|
214
|
-
s(this,
|
|
215
|
-
s(this, A, new
|
|
216
|
-
s(this,
|
|
230
|
+
s(this, At, new p(this, "--start-section", 0));
|
|
231
|
+
s(this, A, new p(this, "--autoplay", 0));
|
|
232
|
+
s(this, Mt, new p(
|
|
217
233
|
this,
|
|
218
234
|
"--autoplay-pause-duration",
|
|
219
235
|
0
|
|
220
236
|
));
|
|
221
|
-
s(this, ht, new
|
|
237
|
+
s(this, ht, new p(
|
|
222
238
|
this,
|
|
223
239
|
"--autoplay-user-direction",
|
|
224
240
|
!1
|
|
225
241
|
));
|
|
226
|
-
s(this, M, new
|
|
227
|
-
s(this, ot, new
|
|
242
|
+
s(this, M, new p(this, "--classes", !1));
|
|
243
|
+
s(this, ot, new p(
|
|
228
244
|
this,
|
|
229
245
|
"--current-index-start-offset",
|
|
230
246
|
0
|
|
231
247
|
));
|
|
232
|
-
s(this, q, new
|
|
248
|
+
s(this, q, new p(
|
|
233
249
|
this,
|
|
234
250
|
"--current-index-end-offset",
|
|
235
251
|
0
|
|
236
252
|
));
|
|
237
|
-
s(this,
|
|
253
|
+
s(this, Tt, new p(
|
|
238
254
|
this,
|
|
239
255
|
"--shift-section-position",
|
|
240
256
|
0,
|
|
241
257
|
{ rawValueCheck: !1 }
|
|
242
258
|
));
|
|
243
|
-
s(this, lt, new
|
|
244
|
-
s(this,
|
|
259
|
+
s(this, lt, new p(this, "--focus-delay", 0));
|
|
260
|
+
s(this, Dt, new p(
|
|
245
261
|
this,
|
|
246
262
|
"--focus-duration",
|
|
247
263
|
3e3
|
|
248
264
|
));
|
|
249
|
-
s(this, ct, new
|
|
250
|
-
s(this, at, new
|
|
265
|
+
s(this, ct, new p(this, "--disabled", !1));
|
|
266
|
+
s(this, at, new p(this, "--hibernate", !1));
|
|
251
267
|
s(this, ut, null);
|
|
252
268
|
s(this, m, null);
|
|
253
|
-
s(this,
|
|
254
|
-
s(this,
|
|
255
|
-
s(this, de, 0);
|
|
269
|
+
s(this, qt, null);
|
|
270
|
+
s(this, c, []);
|
|
256
271
|
s(this, pe, 0);
|
|
257
|
-
s(this,
|
|
258
|
-
s(this,
|
|
259
|
-
s(this,
|
|
260
|
-
s(this,
|
|
261
|
-
s(this, dt, null);
|
|
272
|
+
s(this, fe, 0);
|
|
273
|
+
s(this, C, 0);
|
|
274
|
+
s(this, v, 0);
|
|
275
|
+
s(this, I, 0);
|
|
262
276
|
s(this, V, null);
|
|
263
|
-
s(this,
|
|
264
|
-
s(this,
|
|
265
|
-
s(this,
|
|
277
|
+
s(this, dt, null);
|
|
278
|
+
s(this, O, null);
|
|
279
|
+
s(this, E, null);
|
|
280
|
+
s(this, L, new rs(0));
|
|
281
|
+
s(this, Ut, 0);
|
|
266
282
|
s(this, U, 0);
|
|
267
283
|
s(this, G, !1);
|
|
268
284
|
s(this, K, !0);
|
|
269
|
-
s(this,
|
|
270
|
-
s(this,
|
|
285
|
+
s(this, Z, !0);
|
|
286
|
+
s(this, Gt);
|
|
271
287
|
s(this, pt);
|
|
272
|
-
s(this,
|
|
273
|
-
s(this, Dt, !1);
|
|
274
|
-
s(this, O, null);
|
|
275
|
-
s(this, w, !1);
|
|
276
|
-
s(this, Gt, null);
|
|
277
|
-
s(this, j, []);
|
|
288
|
+
s(this, _, new as());
|
|
278
289
|
s(this, Rt, !1);
|
|
279
|
-
s(this,
|
|
280
|
-
s(this,
|
|
281
|
-
|
|
282
|
-
|
|
290
|
+
s(this, H, null);
|
|
291
|
+
s(this, x, !1);
|
|
292
|
+
s(this, Kt, null);
|
|
293
|
+
s(this, j, []);
|
|
294
|
+
s(this, Vt, !1);
|
|
295
|
+
s(this, Zt);
|
|
296
|
+
s(this, z, (e) => {
|
|
297
|
+
if (e && t(this, Vt)) {
|
|
298
|
+
h(this, Vt, !1);
|
|
283
299
|
return;
|
|
284
300
|
}
|
|
285
301
|
this.resize();
|
|
286
302
|
});
|
|
287
|
-
s(this,
|
|
288
|
-
if (!t(this, G) || t(this,
|
|
303
|
+
s(this, me, () => {
|
|
304
|
+
if (!t(this, G) || t(this, Z) || t(this, K))
|
|
289
305
|
return;
|
|
290
306
|
const e = this.currentScrollValue;
|
|
291
|
-
if (h(this,
|
|
292
|
-
for (let i = 0; i < t(this,
|
|
293
|
-
t(this,
|
|
294
|
-
t(this,
|
|
307
|
+
if (h(this, Ut, Math.max(0, e - t(this, v))), t(this, c).length) {
|
|
308
|
+
for (let i = 0; i < t(this, c).length; i++)
|
|
309
|
+
t(this, c)[i].transform();
|
|
310
|
+
t(this, L).current = a(this, o, ce).call(this);
|
|
295
311
|
} else
|
|
296
312
|
this.vertical ? t(this, m).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, m).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
297
|
-
|
|
313
|
+
a(this, o, Qe).call(this), yt.update(
|
|
298
314
|
this,
|
|
299
|
-
t(this,
|
|
315
|
+
t(this, P).current,
|
|
300
316
|
e
|
|
301
317
|
);
|
|
302
318
|
});
|
|
303
319
|
s(this, _t, (e, i) => {
|
|
304
|
-
t(this,
|
|
320
|
+
t(this, Et).current && (a(this, o, Oe).call(this, Math.sign(i) || 1), t(this, be).call(this, e, i));
|
|
305
321
|
});
|
|
306
|
-
s(this,
|
|
322
|
+
s(this, be, (e, i) => {
|
|
307
323
|
if (t(this, B).current) {
|
|
308
324
|
if (t(this, B).current < 0 && i > 0)
|
|
309
325
|
return;
|
|
310
326
|
if (t(this, B).current > 0 && i < 0)
|
|
311
327
|
return;
|
|
312
328
|
}
|
|
313
|
-
if (t(this, pt) || t(this,
|
|
314
|
-
const r = t(this,
|
|
329
|
+
if (t(this, pt) || t(this, _).unlistenAnimationFrame(), !t(this, A).current && t(this, lt).current && (clearInterval(t(this, Gt)), h(this, Gt, setTimeout(() => {
|
|
330
|
+
const r = t(this, c)[a(this, o, ce).call(this)];
|
|
315
331
|
r && this.scrollToSection(r.index, {
|
|
316
332
|
tween: {
|
|
317
|
-
duration: t(this,
|
|
318
|
-
easing:
|
|
333
|
+
duration: t(this, Dt).current,
|
|
334
|
+
easing: ns
|
|
319
335
|
}
|
|
320
336
|
});
|
|
321
|
-
}, t(this, lt).current))), !(e.includes("drag") && !
|
|
322
|
-
if (t(this,
|
|
337
|
+
}, t(this, lt).current))), !(e.includes("drag") && !ms.isTouch && !t(this, It).current)) {
|
|
338
|
+
if (t(this, D).current && e !== "drag") {
|
|
323
339
|
const r = Math.sign(i);
|
|
324
|
-
if (t(this,
|
|
325
|
-
const
|
|
340
|
+
if (t(this, c).length) {
|
|
341
|
+
const l = {
|
|
326
342
|
tween: t(this, it).current || t(this, rt).current ? {
|
|
327
343
|
easing: t(this, it).current || "easeInOutCubic",
|
|
328
344
|
duration: t(this, rt).current || 500
|
|
329
345
|
} : void 0
|
|
330
346
|
};
|
|
331
|
-
t(this,
|
|
347
|
+
t(this, Rt) ? this.scrollToSection(a(this, o, ce).call(this, !0), l) : this.shiftSections(r, l);
|
|
332
348
|
} else
|
|
333
|
-
t(this,
|
|
349
|
+
t(this, d).shift(r * t(this, C));
|
|
334
350
|
} else
|
|
335
|
-
t(this,
|
|
336
|
-
h(this,
|
|
351
|
+
t(this, d).shift(i);
|
|
352
|
+
h(this, Rt, e === "drag");
|
|
337
353
|
}
|
|
338
354
|
});
|
|
339
|
-
s(this,
|
|
355
|
+
s(this, Se, Ie(() => {
|
|
340
356
|
const e = t(this, j).reduce((i, r) => {
|
|
341
|
-
const
|
|
342
|
-
return
|
|
357
|
+
const l = this.vertical ? r.width : r.height;
|
|
358
|
+
return l > i ? l : i;
|
|
343
359
|
}, 0);
|
|
344
|
-
clearTimeout(t(this,
|
|
345
|
-
h(this,
|
|
360
|
+
clearTimeout(t(this, Zt)), h(this, Vt, !0), this.style.setProperty("--max-section-size", ""), h(this, Zt, setTimeout(() => {
|
|
361
|
+
h(this, Vt, !0), this.style.setProperty("--max-section-size", e + "px");
|
|
346
362
|
}, 10));
|
|
347
363
|
}, 20));
|
|
348
|
-
s(this,
|
|
349
|
-
h(this,
|
|
364
|
+
s(this, ge, () => {
|
|
365
|
+
h(this, x, !0), this.hibernatedCSSProperty.current || a(this, o, Ve).call(this);
|
|
350
366
|
});
|
|
351
|
-
if (
|
|
367
|
+
if (T) {
|
|
352
368
|
const e = this.attachShadow({ mode: "open" });
|
|
353
|
-
e.adoptedStyleSheets = [
|
|
369
|
+
e.adoptedStyleSheets = [vs];
|
|
354
370
|
const i = document.createElement("div");
|
|
355
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, ut, document.createElement("div")), t(this, ut).className = "content-wrapper", h(this, m, document.createElement("div")), t(this, m).className = "content", h(this,
|
|
356
|
-
|
|
371
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, ut, document.createElement("div")), t(this, ut).className = "content-wrapper", h(this, m, document.createElement("div")), t(this, m).className = "content", h(this, qt, document.createElement("slot")), t(this, m).appendChild(t(this, qt)), t(this, ut).appendChild(t(this, m)), e.appendChild(t(this, ut)), h(this, Kt, new MutationObserver(
|
|
372
|
+
Ie(() => {
|
|
357
373
|
this.tryResplit();
|
|
358
374
|
}, 10)
|
|
359
375
|
));
|
|
360
376
|
}
|
|
361
377
|
}
|
|
362
378
|
get damped() {
|
|
363
|
-
return t(this,
|
|
379
|
+
return t(this, d);
|
|
364
380
|
}
|
|
365
381
|
get controlsCSSProperty() {
|
|
366
|
-
return t(this,
|
|
382
|
+
return t(this, Et);
|
|
367
383
|
}
|
|
368
384
|
get axisCSSProperty() {
|
|
369
|
-
return t(this,
|
|
385
|
+
return t(this, P);
|
|
370
386
|
}
|
|
371
387
|
get reverseCSSProperty() {
|
|
372
388
|
return t(this, st);
|
|
@@ -381,7 +397,7 @@ class Bt extends HTMLElement {
|
|
|
381
397
|
return t(this, F);
|
|
382
398
|
}
|
|
383
399
|
get sectionalCSSProperty() {
|
|
384
|
-
return t(this,
|
|
400
|
+
return t(this, D);
|
|
385
401
|
}
|
|
386
402
|
get easingCSSProperty() {
|
|
387
403
|
return t(this, it);
|
|
@@ -396,37 +412,37 @@ class Bt extends HTMLElement {
|
|
|
396
412
|
return t(this, nt);
|
|
397
413
|
}
|
|
398
414
|
get dragInertionCSSProperty() {
|
|
399
|
-
return t(this,
|
|
415
|
+
return t(this, Pt);
|
|
400
416
|
}
|
|
401
417
|
get sectionsInViewCSSProperty() {
|
|
402
|
-
return t(this,
|
|
418
|
+
return t(this, R);
|
|
403
419
|
}
|
|
404
420
|
get loopCSSProperty() {
|
|
405
|
-
return t(this,
|
|
421
|
+
return t(this, w);
|
|
406
422
|
}
|
|
407
423
|
get dampingCSSProperty() {
|
|
408
|
-
return t(this,
|
|
424
|
+
return t(this, Lt);
|
|
409
425
|
}
|
|
410
426
|
get massCSSProperty() {
|
|
411
|
-
return t(this,
|
|
427
|
+
return t(this, zt);
|
|
412
428
|
}
|
|
413
429
|
get stiffnessCSSProperty() {
|
|
414
|
-
return t(this,
|
|
430
|
+
return t(this, kt);
|
|
415
431
|
}
|
|
416
432
|
get mouseDragCSSProperty() {
|
|
417
433
|
return t(this, It);
|
|
418
434
|
}
|
|
419
435
|
get sectionDistanceScaleCSSProperty() {
|
|
420
|
-
return t(this,
|
|
436
|
+
return t(this, Nt);
|
|
421
437
|
}
|
|
422
438
|
get startSectionCSSProperty() {
|
|
423
|
-
return t(this,
|
|
439
|
+
return t(this, At);
|
|
424
440
|
}
|
|
425
441
|
get autoplayCSSProperty() {
|
|
426
442
|
return t(this, A);
|
|
427
443
|
}
|
|
428
444
|
get autoplayPauseDurationCSSProperty() {
|
|
429
|
-
return t(this,
|
|
445
|
+
return t(this, Mt);
|
|
430
446
|
}
|
|
431
447
|
get autoplayUserDirectionCSSProperty() {
|
|
432
448
|
return t(this, ht);
|
|
@@ -441,13 +457,13 @@ class Bt extends HTMLElement {
|
|
|
441
457
|
return t(this, q);
|
|
442
458
|
}
|
|
443
459
|
get shiftSectionPositionCSSProperty() {
|
|
444
|
-
return t(this,
|
|
460
|
+
return t(this, Tt);
|
|
445
461
|
}
|
|
446
462
|
get focusDelayCSSProperty() {
|
|
447
463
|
return t(this, lt);
|
|
448
464
|
}
|
|
449
465
|
get focusDurationCSSProperty() {
|
|
450
|
-
return t(this,
|
|
466
|
+
return t(this, Dt);
|
|
451
467
|
}
|
|
452
468
|
get disabledCSSProperty() {
|
|
453
469
|
return t(this, ct);
|
|
@@ -456,10 +472,10 @@ class Bt extends HTMLElement {
|
|
|
456
472
|
return t(this, at);
|
|
457
473
|
}
|
|
458
474
|
get currentScrollValue() {
|
|
459
|
-
return
|
|
475
|
+
return a(this, o, He).call(this, "current");
|
|
460
476
|
}
|
|
461
477
|
get targetScrollValue() {
|
|
462
|
-
return
|
|
478
|
+
return a(this, o, He).call(this, "target");
|
|
463
479
|
}
|
|
464
480
|
get contentWrapperElement() {
|
|
465
481
|
return t(this, ut);
|
|
@@ -468,48 +484,48 @@ class Bt extends HTMLElement {
|
|
|
468
484
|
return t(this, m);
|
|
469
485
|
}
|
|
470
486
|
get sections() {
|
|
471
|
-
return t(this,
|
|
487
|
+
return t(this, c);
|
|
472
488
|
}
|
|
473
489
|
get position() {
|
|
474
|
-
return t(this,
|
|
490
|
+
return t(this, pe);
|
|
475
491
|
}
|
|
476
492
|
get contentPosition() {
|
|
477
|
-
return t(this,
|
|
493
|
+
return t(this, fe);
|
|
478
494
|
}
|
|
479
495
|
get viewportSize() {
|
|
480
|
-
return t(this,
|
|
496
|
+
return t(this, C);
|
|
481
497
|
}
|
|
482
498
|
get scrollSize() {
|
|
483
|
-
return t(this,
|
|
499
|
+
return t(this, v);
|
|
484
500
|
}
|
|
485
501
|
get gap() {
|
|
486
|
-
return t(this,
|
|
502
|
+
return t(this, I);
|
|
487
503
|
}
|
|
488
504
|
get counter() {
|
|
489
|
-
return t(this,
|
|
505
|
+
return t(this, L);
|
|
490
506
|
}
|
|
491
507
|
get limit() {
|
|
492
508
|
return Math.ceil(
|
|
493
|
-
t(this,
|
|
509
|
+
t(this, c).length - t(this, R).current
|
|
494
510
|
);
|
|
495
511
|
}
|
|
496
512
|
get distance() {
|
|
497
513
|
return t(this, U);
|
|
498
514
|
}
|
|
499
515
|
get loopDistance() {
|
|
500
|
-
return t(this,
|
|
516
|
+
return t(this, w).current ? t(this, U) + t(this, I) : t(this, U);
|
|
501
517
|
}
|
|
502
518
|
get hasOverflow() {
|
|
503
519
|
return t(this, G);
|
|
504
520
|
}
|
|
505
521
|
get overscroll() {
|
|
506
|
-
return t(this,
|
|
522
|
+
return t(this, Ut);
|
|
507
523
|
}
|
|
508
524
|
get scrollLine() {
|
|
509
|
-
return t(this,
|
|
525
|
+
return t(this, H);
|
|
510
526
|
}
|
|
511
527
|
get vertical() {
|
|
512
|
-
return t(this,
|
|
528
|
+
return t(this, P).current === "y";
|
|
513
529
|
}
|
|
514
530
|
get currentProgress() {
|
|
515
531
|
return this.currentScrollValue / this.loopDistance || 0;
|
|
@@ -518,290 +534,290 @@ class Bt extends HTMLElement {
|
|
|
518
534
|
return this.targetScrollValue / this.loopDistance || 0;
|
|
519
535
|
}
|
|
520
536
|
get scrollWidth() {
|
|
521
|
-
return t(this,
|
|
537
|
+
return t(this, P).current === "y" ? 0 : t(this, d).distance;
|
|
522
538
|
}
|
|
523
539
|
get scrollHeight() {
|
|
524
|
-
return t(this,
|
|
540
|
+
return t(this, P).current === "x" ? 0 : t(this, d).distance;
|
|
525
541
|
}
|
|
526
542
|
tryResplit() {
|
|
527
|
-
!t(this,
|
|
543
|
+
!t(this, Z) && (t(this, w).current || t(this, F).current || t(this, w).current || t(this, N).current || t(this, D).current) && a(this, o, le).call(this);
|
|
528
544
|
}
|
|
529
545
|
onScroll(...e) {
|
|
530
|
-
return t(this,
|
|
546
|
+
return t(this, d).subscribe(...e);
|
|
531
547
|
}
|
|
532
548
|
offScroll(...e) {
|
|
533
|
-
t(this,
|
|
549
|
+
t(this, d).unsubscribe(...e);
|
|
534
550
|
}
|
|
535
551
|
//https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
|
|
536
552
|
range(e, i, r = 0) {
|
|
537
|
-
const
|
|
538
|
-
return this.currentProgress <
|
|
553
|
+
const l = e - r, b = l + i + r * 2;
|
|
554
|
+
return this.currentProgress < l ? 0 : this.currentProgress > b ? 1 : (this.currentProgress - l) / (b - l);
|
|
539
555
|
}
|
|
540
556
|
curve(e, i, r = 0) {
|
|
541
557
|
return Math.sin(this.range(e, i, r) * Math.PI);
|
|
542
558
|
}
|
|
543
559
|
visible(e, i, r = 0) {
|
|
544
|
-
const
|
|
545
|
-
return this.currentProgress >=
|
|
560
|
+
const l = e - r, b = l + i + r * 2;
|
|
561
|
+
return this.currentProgress >= l && this.currentProgress <= b;
|
|
546
562
|
}
|
|
547
563
|
scrollToSection(e, i) {
|
|
548
|
-
if (!t(this,
|
|
564
|
+
if (!t(this, c).length)
|
|
549
565
|
return;
|
|
550
|
-
const r = t(this,
|
|
551
|
-
if (b &&
|
|
552
|
-
let
|
|
553
|
-
const
|
|
554
|
-
let
|
|
555
|
-
t(this,
|
|
566
|
+
const r = t(this, L).current, l = a(this, o, Je).call(this, e), b = t(this, c)[r], S = t(this, c)[l];
|
|
567
|
+
if (b && S) {
|
|
568
|
+
let g = 0;
|
|
569
|
+
const gt = a(this, o, ce).call(this), Ht = t(this, c)[gt];
|
|
570
|
+
let ne = Ht ? this.targetScrollValue - Ht.position : 0;
|
|
571
|
+
t(this, w).current ? l === 0 && r === t(this, c).length - 1 ? (g = t(this, v) + t(this, C) - b.position + t(this, I), t(this, Rt) || (ne = 0)) : l === t(this, c).length - 1 && r === 0 ? g = S.position - (t(this, v) + t(this, C) + t(this, I)) : g = S.position - b.position : g = S.position - b.position, this.shiftPosition(g - ne, i);
|
|
556
572
|
}
|
|
557
573
|
}
|
|
558
574
|
shiftSections(e, i) {
|
|
559
|
-
t(this,
|
|
575
|
+
t(this, c).length && this.scrollToSection(t(this, L).current + e, i);
|
|
560
576
|
}
|
|
561
577
|
setPosition(e, i) {
|
|
562
|
-
|
|
578
|
+
a(this, o, Oe).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, pt) || (t(this, _).set(t(this, d).current, { equalize: !0 }), t(this, _).set(e, qe({}, i.tween)), h(this, pt, setTimeout(() => {
|
|
563
579
|
h(this, pt, void 0);
|
|
564
|
-
}, i.tween.duration || 0))) : t(this,
|
|
580
|
+
}, i.tween.duration || 0))) : t(this, d).set(e, {
|
|
565
581
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
566
582
|
});
|
|
567
583
|
}
|
|
568
584
|
shiftPosition(e, i) {
|
|
569
|
-
this.setPosition(t(this,
|
|
585
|
+
this.setPosition(t(this, d).target + e, i);
|
|
570
586
|
}
|
|
571
587
|
resize() {
|
|
572
588
|
if (t(this, at).current)
|
|
573
589
|
return;
|
|
574
|
-
t(this,
|
|
575
|
-
const e = this.currentScrollValue / t(this,
|
|
576
|
-
if (h(this,
|
|
590
|
+
t(this, d).unlistenAnimationFrame();
|
|
591
|
+
const e = this.currentScrollValue / t(this, v) || 0, i = t(this, L).current;
|
|
592
|
+
if (h(this, pe, this.vertical ? Ae(this) : Me(this)), h(this, fe, this.vertical ? Ae(t(this, m)) : Me(t(this, m))), h(this, C, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, I, Ke.parse(
|
|
577
593
|
getComputedStyle(t(this, m)).rowGap
|
|
578
|
-
)) : h(this,
|
|
594
|
+
)) : h(this, I, Ke.parse(
|
|
579
595
|
getComputedStyle(t(this, m)).columnGap
|
|
580
|
-
)), t(this, N).current && t(this,
|
|
581
|
-
const r = t(this,
|
|
582
|
-
t(this,
|
|
583
|
-
b.setSize(
|
|
596
|
+
)), t(this, N).current && t(this, c).length) {
|
|
597
|
+
const r = t(this, R).current, l = (t(this, C) - t(this, I) * (r - 1)) / r;
|
|
598
|
+
t(this, c).forEach((b) => {
|
|
599
|
+
b.setSize(l);
|
|
584
600
|
});
|
|
585
601
|
} else
|
|
586
|
-
t(this,
|
|
602
|
+
t(this, c).forEach((r) => {
|
|
587
603
|
r.setSize();
|
|
588
604
|
});
|
|
589
|
-
if (t(this,
|
|
605
|
+
if (t(this, c).forEach((r) => {
|
|
590
606
|
r.resize();
|
|
591
607
|
}), t(this, W).current) {
|
|
592
|
-
h(this,
|
|
593
|
-
const r = t(this,
|
|
608
|
+
h(this, v, t(this, C) * t(this, W).current);
|
|
609
|
+
const r = t(this, v) + t(this, C);
|
|
594
610
|
this.vertical ? (t(this, m).style.width = r + "px", t(this, m).style.height = "100%") : (t(this, m).style.height = r + "px", t(this, m).style.width = "100%");
|
|
595
611
|
} else
|
|
596
|
-
this.vertical ? (t(this, m).style.width = "100%", t(this, m).style.height = "max-content", h(this,
|
|
597
|
-
if (!t(this,
|
|
598
|
-
const r = getComputedStyle(this),
|
|
599
|
-
h(this,
|
|
612
|
+
this.vertical ? (t(this, m).style.width = "100%", t(this, m).style.height = "max-content", h(this, v, t(this, m).offsetHeight - t(this, C))) : (t(this, m).style.width = "max-content", t(this, m).style.height = "100%", h(this, v, t(this, m).offsetWidth - t(this, C)));
|
|
613
|
+
if (!t(this, w).current) {
|
|
614
|
+
const r = getComputedStyle(this), l = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
|
|
615
|
+
h(this, v, t(this, v) + l), t(this, d).max = t(this, v);
|
|
600
616
|
}
|
|
601
|
-
if (t(this,
|
|
602
|
-
const r = t(this,
|
|
617
|
+
if (t(this, w).current && t(this, c).length) {
|
|
618
|
+
const r = t(this, c)[t(this, c).length - 1], l = r.position + r.size - t(this, C), b = t(this, v) - l;
|
|
603
619
|
h(this, U, r.position + r.size + b);
|
|
604
620
|
} else
|
|
605
|
-
h(this, U, t(this,
|
|
606
|
-
if (t(this,
|
|
607
|
-
const r = t(this,
|
|
608
|
-
t(this,
|
|
621
|
+
h(this, U, t(this, v));
|
|
622
|
+
if (t(this, D).current && t(this, c).length) {
|
|
623
|
+
const r = t(this, c)[i];
|
|
624
|
+
t(this, d).set(r.position, {
|
|
609
625
|
equalize: !0
|
|
610
626
|
});
|
|
611
627
|
} else
|
|
612
|
-
t(this,
|
|
628
|
+
t(this, d).set(e * t(this, v), {
|
|
613
629
|
equalize: !0
|
|
614
630
|
});
|
|
615
|
-
h(this, G, (this.vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth) > t(this,
|
|
631
|
+
h(this, G, (this.vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth) > t(this, C)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, ct).current || a(this, o, Le).call(this) : a(this, o, Pe).call(this), t(this, Se).call(this), he(this, "scrollResize", { custom: !0 }), t(this, d).notify();
|
|
616
632
|
}
|
|
617
633
|
connectedCallback() {
|
|
618
|
-
|
|
634
|
+
yt.register(this), h(this, d, new cs(0, {
|
|
619
635
|
damping: 0.01,
|
|
620
636
|
min: 0,
|
|
621
|
-
order:
|
|
622
|
-
})), this.setAttribute("tabindex", "0"), h(this,
|
|
637
|
+
order: ls.SCROLL
|
|
638
|
+
})), this.setAttribute("tabindex", "0"), h(this, V, new us({ element: t(this, m) })), t(this, V).changeEvent.subscribe(t(this, _t)), h(this, dt, new ds({
|
|
623
639
|
element: this
|
|
624
640
|
})), t(this, dt).changeEvent.subscribe(
|
|
625
641
|
t(this, _t)
|
|
626
|
-
), h(this,
|
|
642
|
+
), h(this, O, new ps({
|
|
627
643
|
element: t(this, m),
|
|
628
644
|
rootElement: this
|
|
629
|
-
})), t(this,
|
|
645
|
+
})), t(this, O).changeEvent.subscribe(t(this, _t)), h(this, E, new fs({
|
|
630
646
|
culling: this
|
|
631
|
-
})), t(this,
|
|
632
|
-
|
|
647
|
+
})), t(this, E).changeEvent.subscribe(t(this, be)), t(this, P).subscribe(() => {
|
|
648
|
+
a(this, o, De).call(this);
|
|
633
649
|
}), t(this, st).subscribe(() => {
|
|
634
|
-
|
|
650
|
+
a(this, o, De).call(this);
|
|
635
651
|
}), t(this, nt).subscribe((e) => {
|
|
636
|
-
t(this,
|
|
637
|
-
}), t(this,
|
|
638
|
-
t(this,
|
|
652
|
+
t(this, V).axis = e.current ? "max" : t(this, P).current;
|
|
653
|
+
}), t(this, Pt).subscribe((e) => {
|
|
654
|
+
t(this, O).inertion = typeof e.current == "number" ? e.current : 1;
|
|
639
655
|
}), t(this, W).subscribe(() => {
|
|
640
|
-
t(this,
|
|
656
|
+
t(this, x) && t(this, z).call(this);
|
|
641
657
|
}), t(this, F).subscribe(({ current: e }) => {
|
|
642
|
-
t(this,
|
|
643
|
-
}), t(this, T).subscribe((e) => {
|
|
644
|
-
t(this, R).debounce = e.current, t(this, V).swipe = e.current, t(this, x).interval = e.current, t(this, w) && (e.current && !e.previous && !t(this, l).length ? c(this, o, oe).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Ht).call(this));
|
|
645
|
-
}), t(this, N).subscribe((e) => {
|
|
646
|
-
t(this, w) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, oe).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Ht).call(this));
|
|
658
|
+
t(this, x) && (e ? a(this, o, le).call(this) : a(this, o, $t).call(this));
|
|
647
659
|
}), t(this, D).subscribe((e) => {
|
|
648
|
-
t(this,
|
|
649
|
-
}), t(this,
|
|
650
|
-
|
|
651
|
-
}), t(this,
|
|
652
|
-
t(this,
|
|
660
|
+
t(this, V).debounce = e.current, t(this, O).swipe = e.current, t(this, E).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, c).length ? a(this, o, le).call(this) : !e.current && e.previous && t(this, c).length && a(this, o, $t).call(this));
|
|
661
|
+
}), t(this, N).subscribe((e) => {
|
|
662
|
+
t(this, x) && (t(this, z).call(this), e.current && !e.previous && !t(this, c).length ? a(this, o, le).call(this) : !e.current && e.previous && t(this, c).length && a(this, o, $t).call(this));
|
|
663
|
+
}), t(this, R).subscribe((e) => {
|
|
664
|
+
t(this, x) && (t(this, z).call(this), a(this, o, vt).call(this));
|
|
665
|
+
}), t(this, w).subscribe((e) => {
|
|
666
|
+
e.current ? (t(this, x) && (t(this, c).length || (t(this, F).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this, Ut, 0), t(this, d).max = t(this, v), t(this, d).min = 0);
|
|
653
667
|
}), t(this, Lt).subscribe((e) => {
|
|
654
|
-
t(this,
|
|
668
|
+
t(this, d).damping = e.current;
|
|
655
669
|
}), t(this, zt).subscribe((e) => {
|
|
656
|
-
t(this,
|
|
670
|
+
t(this, d).mass = e.current;
|
|
671
|
+
}), t(this, kt).subscribe((e) => {
|
|
672
|
+
t(this, d).stiffness = e.current;
|
|
657
673
|
}), t(this, A).subscribe((e) => {
|
|
658
|
-
t(this,
|
|
674
|
+
t(this, E).speed = e.current, !t(this, K) && e.current && !e.previous ? t(this, E).connect() : !e.current && e.previous && t(this, E).disconnect();
|
|
659
675
|
}), t(this, ht).subscribe((e) => {
|
|
660
|
-
e.current || (t(this,
|
|
676
|
+
e.current || (t(this, E).direction = 1);
|
|
661
677
|
}), t(this, M).subscribe((e) => {
|
|
662
|
-
t(this,
|
|
678
|
+
t(this, x) && a(this, o, vt).call(this);
|
|
663
679
|
}), t(this, ot).subscribe((e) => {
|
|
664
|
-
t(this,
|
|
680
|
+
t(this, x) && t(this, M).current && a(this, o, vt).call(this);
|
|
665
681
|
}), t(this, q).subscribe((e) => {
|
|
666
|
-
t(this,
|
|
667
|
-
}), t(this,
|
|
668
|
-
t(this,
|
|
669
|
-
}), t(this,
|
|
682
|
+
t(this, x) && t(this, M).current && a(this, o, vt).call(this);
|
|
683
|
+
}), t(this, Tt).subscribe((e) => {
|
|
684
|
+
t(this, x) && t(this, d).notify();
|
|
685
|
+
}), t(this, d).isRunning.subscribe((e) => {
|
|
670
686
|
this.classList.toggle("active", e.current);
|
|
671
|
-
}), t(this,
|
|
672
|
-
t(this,
|
|
673
|
-
}), t(this,
|
|
674
|
-
t(this,
|
|
687
|
+
}), t(this, L).subscribe((e) => {
|
|
688
|
+
t(this, c).length && a(this, o, vt).call(this), this.style.setProperty("--counter", e.current + "");
|
|
689
|
+
}), t(this, _).subscribe((e) => {
|
|
690
|
+
t(this, _).isRunning.current && t(this, d).set(e.current, { equalize: !0 });
|
|
675
691
|
}), t(this, ct).subscribe((e) => {
|
|
676
|
-
e.current && !e.previous ? (this.classList.add("disabled"),
|
|
692
|
+
e.current && !e.previous ? (this.classList.add("disabled"), a(this, o, Pe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), a(this, o, Le).call(this));
|
|
677
693
|
}), t(this, at).subscribe((e) => {
|
|
678
|
-
e.current && !e.previous ? (this.classList.add("hibernated"),
|
|
679
|
-
}), t(this,
|
|
694
|
+
e.current && !e.previous ? (this.classList.add("hibernated"), a(this, o, Re).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), a(this, o, Ve).call(this));
|
|
695
|
+
}), t(this, Et).observe(), t(this, P).observe(), t(this, st).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, D).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, N).observe(), t(this, nt).observe(), t(this, Pt).observe(), t(this, R).observe(), t(this, w).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, kt).observe(), t(this, It).observe(), t(this, Nt).observe(), t(this, At).observe(), t(this, A).observe(), t(this, A).observe(), t(this, Mt).observe(), t(this, ht).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, q).observe(), t(this, Tt).observe(), t(this, lt).observe(), t(this, Dt).observe(), t(this, ct).observe(), t(this, at).observe(), Bt.subscribe(t(this, ge), Te.LAST), ae.subscribe(this, t(this, z)), t(this, Kt).observe(this, { childList: !0 });
|
|
680
696
|
}
|
|
681
697
|
disconnectedCallback() {
|
|
682
|
-
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this,
|
|
698
|
+
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, Et).unobserve(), t(this, P).unobserve(), t(this, st).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, D).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, N).unobserve(), t(this, nt).unobserve(), t(this, Pt).unobserve(), t(this, R).unobserve(), t(this, w).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, kt).unobserve(), t(this, It).unobserve(), t(this, Nt).unobserve(), t(this, At).unobserve(), t(this, A).unobserve(), t(this, Mt).unobserve(), t(this, ht).unobserve(), t(this, M).unobserve(), t(this, ot).unobserve(), t(this, q).unobserve(), t(this, Tt).unobserve(), t(this, lt).unobserve(), t(this, Dt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), Bt.unsubscribe(t(this, ge)), ae.unsubscribe(t(this, z)), a(this, o, Re).call(this), t(this, Kt).disconnect();
|
|
683
699
|
}
|
|
684
700
|
}
|
|
685
|
-
|
|
686
|
-
const e = t(this,
|
|
687
|
-
t(this, m).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this,
|
|
688
|
-
},
|
|
689
|
-
|
|
690
|
-
e instanceof HTMLElement && t(this,
|
|
691
|
-
}), t(this, m).style.transform = "", this.style.setProperty("--sections", t(this,
|
|
701
|
+
d = new WeakMap(), Et = new WeakMap(), P = new WeakMap(), st = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), D = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), N = new WeakMap(), nt = new WeakMap(), Pt = new WeakMap(), R = new WeakMap(), w = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), A = new WeakMap(), Mt = new WeakMap(), ht = new WeakMap(), M = new WeakMap(), ot = new WeakMap(), q = new WeakMap(), Tt = new WeakMap(), lt = new WeakMap(), Dt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), m = new WeakMap(), qt = new WeakMap(), c = new WeakMap(), pe = new WeakMap(), fe = new WeakMap(), C = new WeakMap(), v = new WeakMap(), I = new WeakMap(), V = new WeakMap(), dt = new WeakMap(), O = new WeakMap(), E = new WeakMap(), L = new WeakMap(), Ut = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Gt = new WeakMap(), pt = new WeakMap(), _ = new WeakMap(), Rt = new WeakMap(), H = new WeakMap(), x = new WeakMap(), Kt = new WeakMap(), j = new WeakMap(), Vt = new WeakMap(), Zt = new WeakMap(), o = new WeakSet(), De = function() {
|
|
702
|
+
const e = t(this, P).current, i = t(this, st).current ? "-reverse" : "";
|
|
703
|
+
t(this, m).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, nt).current ? "max" : e, t(this, dt).dimension = e === "x" ? "width" : "height", t(this, O).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, x) && t(this, z).call(this);
|
|
704
|
+
}, le = function() {
|
|
705
|
+
a(this, o, $t).call(this), t(this, qt).assignedElements().forEach((e, i) => {
|
|
706
|
+
e instanceof HTMLElement && t(this, c).push(new gs(e, i, this));
|
|
707
|
+
}), t(this, m).style.transform = "", this.style.setProperty("--sections", t(this, c).length.toString()), he(this, "scrollSectionsChange", {
|
|
692
708
|
custom: !0,
|
|
693
709
|
composed: !0
|
|
694
|
-
}), t(this,
|
|
695
|
-
},
|
|
696
|
-
t(this,
|
|
710
|
+
}), t(this, z).call(this), a(this, o, vt).call(this);
|
|
711
|
+
}, $t = function() {
|
|
712
|
+
t(this, c).forEach((e) => {
|
|
697
713
|
e.destroy();
|
|
698
|
-
}), h(this,
|
|
714
|
+
}), h(this, c, []), t(this, L).reset(), t(this, d).reset(), this.style.removeProperty("--max-section-size"), he(this, "scrollSectionsChange", {
|
|
699
715
|
custom: !0,
|
|
700
716
|
composed: !0
|
|
701
717
|
});
|
|
702
|
-
},
|
|
703
|
-
t(this, K) || (h(this, K, !0), t(this,
|
|
718
|
+
}, Pe = function() {
|
|
719
|
+
t(this, K) || (h(this, K, !0), t(this, d).unsubscribe(t(this, me)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Gt)), clearInterval(t(this, pt)), t(this, _).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, dt).disconnect(), t(this, O).disconnect(), t(this, E).disconnect(), t(this, G) || (this.sections.forEach((e) => {
|
|
704
720
|
e.unsetTransform();
|
|
705
|
-
}), t(this,
|
|
706
|
-
},
|
|
707
|
-
t(this, K) && (h(this, K, !1), t(this,
|
|
708
|
-
},
|
|
709
|
-
t(this,
|
|
710
|
-
},
|
|
711
|
-
t(this,
|
|
721
|
+
}), t(this, z).call(this)));
|
|
722
|
+
}, Le = function() {
|
|
723
|
+
t(this, K) && (h(this, K, !1), t(this, d).subscribe(t(this, me), -1e4), t(this, d).notify(), t(this, V).connect(), t(this, dt).connect(), t(this, O).connect(), t(this, A).current && t(this, E).connect());
|
|
724
|
+
}, Re = function() {
|
|
725
|
+
t(this, Z) || (h(this, Z, !0), clearTimeout(t(this, Zt)), Bt.unsubscribe(t(this, z)), a(this, o, Pe).call(this), t(this, m).style.transform = "", t(this, m).style.height = "", t(this, m).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, c).length ? a(this, o, $t).call(this) : (t(this, L).reset(), t(this, d).reset()), yt.unregister(this));
|
|
726
|
+
}, Ve = function() {
|
|
727
|
+
t(this, Z) && (h(this, Z, !1), yt.register(this), this.tryResplit(), a(this, o, Le).call(this), this.scrollToSection(t(this, At).current, {
|
|
712
728
|
behaviour: "instant"
|
|
713
|
-
}),
|
|
714
|
-
},
|
|
715
|
-
let i = t(this,
|
|
716
|
-
return t(this,
|
|
717
|
-
}, _t = new WeakMap(),
|
|
718
|
-
t(this, ht).current && (t(this,
|
|
719
|
-
t(this,
|
|
729
|
+
}), Bt.subscribe(t(this, z), Te.SCROLL));
|
|
730
|
+
}, z = new WeakMap(), me = new WeakMap(), Je = function(e) {
|
|
731
|
+
let i = t(this, L).current;
|
|
732
|
+
return t(this, w).current ? i = os(e, t(this, c).length) : i = _e(e, 0, this.limit), i;
|
|
733
|
+
}, _t = new WeakMap(), be = new WeakMap(), Oe = function(e = 1) {
|
|
734
|
+
t(this, ht).current && (t(this, E).direction = e), t(this, A).current && t(this, E).pauseAndContinue(
|
|
735
|
+
t(this, Mt).current,
|
|
720
736
|
this.sectionalCSSProperty.current
|
|
721
737
|
);
|
|
722
|
-
},
|
|
723
|
-
if (t(this,
|
|
724
|
-
const i = t(this,
|
|
725
|
-
return i < 0 ? t(this,
|
|
738
|
+
}, He = function(e = "current") {
|
|
739
|
+
if (t(this, w).current && t(this, c).length) {
|
|
740
|
+
const i = t(this, d)[e] % Math.round(t(this, v) + t(this, C) + t(this, I));
|
|
741
|
+
return i < 0 ? t(this, v) + i + t(this, C) + t(this, I) : i;
|
|
726
742
|
} else
|
|
727
|
-
return t(this,
|
|
728
|
-
},
|
|
729
|
-
if (t(this,
|
|
730
|
-
const e = t(this,
|
|
731
|
-
if (e === 0 ? h(this,
|
|
732
|
-
detail: { line: t(this,
|
|
743
|
+
return t(this, d)[e];
|
|
744
|
+
}, vt = function() {
|
|
745
|
+
if (t(this, c).length) {
|
|
746
|
+
const e = t(this, L).current + t(this, ot).current;
|
|
747
|
+
if (e === 0 ? h(this, H, "start") : e === this.limit ? h(this, H, "end") : h(this, H, null), he(this, "scrollLine", {
|
|
748
|
+
detail: { line: t(this, H) }
|
|
733
749
|
}), t(this, M).current) {
|
|
734
|
-
this.classList.remove("end", "start"), t(this,
|
|
735
|
-
const i = t(this,
|
|
736
|
-
h(this, j, []), t(this,
|
|
750
|
+
this.classList.remove("end", "start"), t(this, H) && this.classList.add(t(this, H));
|
|
751
|
+
const i = t(this, R).current + t(this, q).current;
|
|
752
|
+
h(this, j, []), t(this, c).forEach((r, l) => {
|
|
737
753
|
r.setCurrentIndex(null), r.setCurrentIndexArc(null), r.setCurrentIndexArcAbs(null), r.setMiddle(!1);
|
|
738
|
-
const b = e - this.limit - 1 + t(this, q).current,
|
|
739
|
-
|
|
740
|
-
}), t(this,
|
|
754
|
+
const b = e - this.limit - 1 + t(this, q).current, S = e + i, g = this.sections.length - S;
|
|
755
|
+
l >= e && l < S || l <= b ? (r.setMark("current"), t(this, j).push(r)) : l >= S && l < S + g / 2 || l <= b + i ? r.setMark("next") : r.setMark("previous");
|
|
756
|
+
}), t(this, Se).call(this);
|
|
741
757
|
}
|
|
742
758
|
}
|
|
743
|
-
},
|
|
759
|
+
}, Qe = function() {
|
|
744
760
|
if (t(this, M).current) {
|
|
745
761
|
const e = Math.floor(t(this, j).length / 2);
|
|
746
762
|
t(this, j).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, j).forEach((i, r) => {
|
|
747
|
-
const
|
|
748
|
-
i.setCurrentIndex(r), i.setCurrentIndexArc(
|
|
763
|
+
const l = r - e;
|
|
764
|
+
i.setCurrentIndex(r), i.setCurrentIndexArc(l), i.setCurrentIndexArcAbs(Math.abs(l)), i.setMiddle(r === e);
|
|
749
765
|
});
|
|
750
766
|
}
|
|
751
|
-
},
|
|
752
|
-
let i = this.targetScrollValue, r = 1 / 0,
|
|
753
|
-
const b = t(this,
|
|
754
|
-
for (let
|
|
755
|
-
const
|
|
756
|
-
let
|
|
757
|
-
this.overscroll &&
|
|
758
|
-
let
|
|
759
|
-
|
|
760
|
-
}
|
|
761
|
-
return
|
|
762
|
-
},
|
|
763
|
-
|
|
764
|
-
var
|
|
765
|
-
class
|
|
767
|
+
}, Se = new WeakMap(), ce = function(e = !1) {
|
|
768
|
+
let i = this.targetScrollValue, r = 1 / 0, l = 0;
|
|
769
|
+
const b = t(this, d).direction;
|
|
770
|
+
for (let S = 0; S < t(this, c).length; S++) {
|
|
771
|
+
const g = t(this, c)[S];
|
|
772
|
+
let gt = t(this, Rt) ? g.size * b * -1 * 0.4 : 0, Ht = g.position;
|
|
773
|
+
this.overscroll && Ht === 0 && e && (Ht = t(this, U));
|
|
774
|
+
let ne = Math.abs(Ht + gt - i);
|
|
775
|
+
ne <= r && (r = ne, l = S);
|
|
776
|
+
}
|
|
777
|
+
return l;
|
|
778
|
+
}, ge = new WeakMap();
|
|
779
|
+
T && !customElements.get("e-scroll") && customElements.define("e-scroll", Wt);
|
|
780
|
+
var ve;
|
|
781
|
+
class ze extends HTMLElement {
|
|
766
782
|
constructor() {
|
|
767
783
|
super(...arguments);
|
|
768
|
-
s(this,
|
|
784
|
+
s(this, ve, null);
|
|
769
785
|
}
|
|
770
786
|
get scrollElement() {
|
|
771
|
-
return t(this,
|
|
787
|
+
return t(this, ve);
|
|
772
788
|
}
|
|
773
789
|
connectedCallback() {
|
|
774
|
-
const e =
|
|
775
|
-
e instanceof
|
|
790
|
+
const e = je(this, Wt);
|
|
791
|
+
e instanceof Wt ? h(this, ve, e) : console.error(this, "e-scroll not found");
|
|
776
792
|
}
|
|
777
793
|
}
|
|
778
|
-
|
|
779
|
-
var ft,
|
|
780
|
-
class
|
|
794
|
+
ve = new WeakMap();
|
|
795
|
+
var ft, k, J, Q, jt, Jt, mt, Qt, ye, Ce;
|
|
796
|
+
class ys extends ze {
|
|
781
797
|
constructor() {
|
|
782
798
|
super();
|
|
783
799
|
s(this, ft, null);
|
|
784
|
-
s(this,
|
|
800
|
+
s(this, k, null);
|
|
785
801
|
s(this, J, !1);
|
|
786
802
|
s(this, Q, 0);
|
|
787
|
-
s(this, Zt, 0);
|
|
788
803
|
s(this, jt, 0);
|
|
804
|
+
s(this, Jt, 0);
|
|
789
805
|
s(this, mt, () => {
|
|
790
806
|
h(this, J, this.offsetWidth > this.offsetHeight);
|
|
791
807
|
const e = t(this, J) ? this.offsetWidth : this.offsetHeight;
|
|
792
|
-
h(this, Q, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, Q, Math.max(t(this, Q), 30)), t(this, J) ? (t(this,
|
|
808
|
+
h(this, Q, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, Q, Math.max(t(this, Q), 30)), t(this, J) ? (t(this, k).style.width = t(this, Q) + "px", t(this, k).style.height = "100%") : (t(this, k).style.width = "100%", t(this, k).style.height = t(this, Q) + "px"), h(this, jt, e - t(this, Q)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Qt).call(this);
|
|
793
809
|
});
|
|
794
|
-
s(this,
|
|
795
|
-
h(this,
|
|
810
|
+
s(this, Qt, () => {
|
|
811
|
+
h(this, Jt, this.scrollElement.currentProgress * t(this, jt)), t(this, J) ? t(this, k).style.transform = `translate3d(${t(this, Jt)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Jt)}px, 0px)`;
|
|
796
812
|
});
|
|
797
|
-
s(this,
|
|
813
|
+
s(this, ye, () => {
|
|
798
814
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
799
815
|
});
|
|
800
|
-
s(this,
|
|
801
|
-
document.documentElement.classList.add("grabbing"),
|
|
802
|
-
(
|
|
803
|
-
const b = t(this, J) ?
|
|
804
|
-
this.scrollElement.setPosition(i +
|
|
816
|
+
s(this, Ce, (e) => {
|
|
817
|
+
document.documentElement.classList.add("grabbing"), bs(
|
|
818
|
+
(l) => {
|
|
819
|
+
const b = t(this, J) ? l.x : l.y, S = this.scrollElement.distance / t(this, jt), g = (b - r) * S;
|
|
820
|
+
this.scrollElement.setPosition(i + g);
|
|
805
821
|
},
|
|
806
822
|
() => {
|
|
807
823
|
document.documentElement.classList.remove("grabbing");
|
|
@@ -809,10 +825,10 @@ class ps extends Oe {
|
|
|
809
825
|
);
|
|
810
826
|
const i = this.scrollElement.damped.target, r = t(this, J) ? e.x : e.y;
|
|
811
827
|
});
|
|
812
|
-
if (
|
|
828
|
+
if (T) {
|
|
813
829
|
const e = this.attachShadow({ mode: "open" });
|
|
814
830
|
e.adoptedStyleSheets = [
|
|
815
|
-
|
|
831
|
+
Ze({
|
|
816
832
|
":host": {
|
|
817
833
|
display: "inline-block",
|
|
818
834
|
zIndex: "1",
|
|
@@ -845,32 +861,32 @@ class ps extends Oe {
|
|
|
845
861
|
}
|
|
846
862
|
}
|
|
847
863
|
get thumbElement() {
|
|
848
|
-
return t(this,
|
|
864
|
+
return t(this, k);
|
|
849
865
|
}
|
|
850
866
|
connectedCallback() {
|
|
851
867
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
852
868
|
const e = t(this, ft).assignedElements()[0] || t(this, ft).firstElementChild;
|
|
853
|
-
h(this,
|
|
869
|
+
h(this, k, e), t(this, k).addEventListener("pointerdown", t(this, Ce)), Bt.subscribe(t(this, mt), Te.SCROLL), ae.subscribe(this, t(this, mt)), ae.subscribe(this.scrollElement, t(this, mt)), this.scrollElement.onScroll(t(this, Qt)), this.scrollElement.axisCSSProperty.subscribe(t(this, ye));
|
|
854
870
|
}
|
|
855
871
|
disconnectedCallback() {
|
|
856
|
-
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this,
|
|
872
|
+
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, Ce)), Bt.unsubscribe(t(this, mt)), ae.unsubscribe(t(this, mt)), this.scrollElement.offScroll(t(this, Qt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, ye));
|
|
857
873
|
}
|
|
858
874
|
}
|
|
859
|
-
ft = new WeakMap(),
|
|
860
|
-
|
|
861
|
-
var
|
|
862
|
-
class
|
|
875
|
+
ft = new WeakMap(), k = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), jt = new WeakMap(), Jt = new WeakMap(), mt = new WeakMap(), Qt = new WeakMap(), ye = new WeakMap(), Ce = new WeakMap();
|
|
876
|
+
T && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", ys);
|
|
877
|
+
var Xt, Yt, te;
|
|
878
|
+
class Xe extends ze {
|
|
863
879
|
constructor() {
|
|
864
880
|
super();
|
|
865
|
-
s(this,
|
|
866
|
-
s(this,
|
|
881
|
+
s(this, Xt, new p(this, "--behaviour", "smooth"));
|
|
882
|
+
s(this, Yt, new p(
|
|
867
883
|
this,
|
|
868
884
|
"--tween-easing",
|
|
869
885
|
!1
|
|
870
886
|
));
|
|
871
|
-
s(this,
|
|
872
|
-
|
|
873
|
-
const e = t(this,
|
|
887
|
+
s(this, te, new p(this, "--tween-duration", 0));
|
|
888
|
+
T && this.addEventListener("click", () => {
|
|
889
|
+
const e = t(this, Xt).current, i = t(this, Yt).current, r = t(this, te).current;
|
|
874
890
|
this.handleClick({
|
|
875
891
|
behaviour: e,
|
|
876
892
|
tween: i || r ? { easing: i, duration: r } : void 0
|
|
@@ -878,37 +894,37 @@ class _e extends Oe {
|
|
|
878
894
|
});
|
|
879
895
|
}
|
|
880
896
|
connectedCallback() {
|
|
881
|
-
super.connectedCallback(), t(this,
|
|
897
|
+
super.connectedCallback(), t(this, Xt).observe(), t(this, Yt).observe(), t(this, te).observe();
|
|
882
898
|
}
|
|
883
899
|
disconnectedCallback() {
|
|
884
|
-
t(this,
|
|
900
|
+
t(this, Xt).close(), t(this, Yt).close(), t(this, te).close();
|
|
885
901
|
}
|
|
886
902
|
}
|
|
887
|
-
|
|
888
|
-
var
|
|
889
|
-
class
|
|
903
|
+
Xt = new WeakMap(), Yt = new WeakMap(), te = new WeakMap();
|
|
904
|
+
var ee;
|
|
905
|
+
class Cs extends Xe {
|
|
890
906
|
constructor() {
|
|
891
907
|
super(...arguments);
|
|
892
|
-
s(this,
|
|
908
|
+
s(this, ee, new p(this, "--set", 1));
|
|
893
909
|
}
|
|
894
910
|
handleClick(e) {
|
|
895
|
-
this.scrollElement.scrollToSection(t(this,
|
|
911
|
+
this.scrollElement.scrollToSection(t(this, ee).current, e);
|
|
896
912
|
}
|
|
897
913
|
connectedCallback() {
|
|
898
|
-
super.connectedCallback(), t(this,
|
|
914
|
+
super.connectedCallback(), t(this, ee).observe();
|
|
899
915
|
}
|
|
900
916
|
disconnectedCallback() {
|
|
901
|
-
super.disconnectedCallback(), t(this,
|
|
917
|
+
super.disconnectedCallback(), t(this, ee).close();
|
|
902
918
|
}
|
|
903
919
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
var X,
|
|
907
|
-
class
|
|
920
|
+
ee = new WeakMap();
|
|
921
|
+
T && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", Cs);
|
|
922
|
+
var X, se;
|
|
923
|
+
class ws extends Xe {
|
|
908
924
|
constructor() {
|
|
909
925
|
super(...arguments);
|
|
910
|
-
s(this, X, new
|
|
911
|
-
s(this,
|
|
926
|
+
s(this, X, new p(this, "--step", 1));
|
|
927
|
+
s(this, se, () => {
|
|
912
928
|
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, X).current > 0 && this.scrollElement.scrollLine === "end" || t(this, X).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
913
929
|
});
|
|
914
930
|
}
|
|
@@ -917,63 +933,63 @@ class ms extends _e {
|
|
|
917
933
|
}
|
|
918
934
|
connectedCallback() {
|
|
919
935
|
super.connectedCallback(), this.scrollElement && (t(this, X).subscribe(() => {
|
|
920
|
-
t(this,
|
|
936
|
+
t(this, se).call(this);
|
|
921
937
|
}), t(this, X).observe(), this.scrollElement.addEventListener(
|
|
922
938
|
"scrollLine",
|
|
923
|
-
t(this,
|
|
924
|
-
), t(this,
|
|
939
|
+
t(this, se)
|
|
940
|
+
), t(this, se).call(this));
|
|
925
941
|
}
|
|
926
942
|
disconnectedCallback() {
|
|
927
943
|
super.disconnectedCallback(), t(this, X).close(), this.removeAttribute("disabled");
|
|
928
944
|
}
|
|
929
945
|
}
|
|
930
|
-
X = new WeakMap(),
|
|
931
|
-
|
|
932
|
-
var Y, bt,
|
|
933
|
-
class
|
|
946
|
+
X = new WeakMap(), se = new WeakMap();
|
|
947
|
+
T && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ws);
|
|
948
|
+
var Y, bt, ie, we, xe, re;
|
|
949
|
+
class xs {
|
|
934
950
|
constructor(n, e, i) {
|
|
935
951
|
s(this, Y, null);
|
|
936
952
|
s(this, bt, null);
|
|
937
|
-
s(this,
|
|
938
|
-
s(this,
|
|
939
|
-
s(this,
|
|
940
|
-
t(this, bt).scrollToSection(t(this,
|
|
941
|
-
behaviour: t(this,
|
|
953
|
+
s(this, ie, null);
|
|
954
|
+
s(this, we, null);
|
|
955
|
+
s(this, xe, () => {
|
|
956
|
+
t(this, bt).scrollToSection(t(this, ie), {
|
|
957
|
+
behaviour: t(this, we)
|
|
942
958
|
});
|
|
943
959
|
});
|
|
944
|
-
s(this,
|
|
960
|
+
s(this, re, () => {
|
|
945
961
|
t(this, Y).classList.toggle(
|
|
946
962
|
"current",
|
|
947
|
-
t(this, bt).counter.current === t(this,
|
|
963
|
+
t(this, bt).counter.current === t(this, ie)
|
|
948
964
|
);
|
|
949
965
|
});
|
|
950
|
-
|
|
966
|
+
T && (h(this, Y, document.createElement("button")), h(this, bt, n), h(this, we, i), h(this, ie, e), t(this, Y).addEventListener("click", t(this, xe)), t(this, bt).counter.subscribe(t(this, re)), t(this, re).call(this));
|
|
951
967
|
}
|
|
952
968
|
get element() {
|
|
953
969
|
return t(this, Y);
|
|
954
970
|
}
|
|
955
971
|
destroy() {
|
|
956
|
-
t(this, Y).removeEventListener("click", t(this,
|
|
972
|
+
t(this, Y).removeEventListener("click", t(this, xe)), t(this, bt).counter.unsubscribe(t(this, re)), t(this, Y).remove();
|
|
957
973
|
}
|
|
958
974
|
}
|
|
959
|
-
Y = new WeakMap(), bt = new WeakMap(),
|
|
960
|
-
var
|
|
961
|
-
class
|
|
975
|
+
Y = new WeakMap(), bt = new WeakMap(), ie = new WeakMap(), we = new WeakMap(), xe = new WeakMap(), re = new WeakMap();
|
|
976
|
+
var Ot, St, tt;
|
|
977
|
+
class Es extends ze {
|
|
962
978
|
constructor() {
|
|
963
979
|
super(...arguments);
|
|
964
|
-
s(this,
|
|
980
|
+
s(this, Ot, null);
|
|
965
981
|
s(this, St, []);
|
|
966
|
-
s(this, tt,
|
|
982
|
+
s(this, tt, Ie(() => {
|
|
967
983
|
t(this, St).forEach((i) => i.destroy()), h(this, St, []);
|
|
968
984
|
let e = 0;
|
|
969
985
|
this.scrollElement.loopCSSProperty.current ? e = this.scrollElement.sections.length : e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
|
|
970
986
|
for (let i = 0; i < e; i++) {
|
|
971
|
-
const r = new
|
|
987
|
+
const r = new xs(
|
|
972
988
|
this.scrollElement,
|
|
973
989
|
i,
|
|
974
990
|
this.getAttribute("behaviour") || "smooth"
|
|
975
991
|
);
|
|
976
|
-
t(this,
|
|
992
|
+
t(this, Ot).appendChild(r.element), t(this, St).push(r);
|
|
977
993
|
}
|
|
978
994
|
}, 0));
|
|
979
995
|
}
|
|
@@ -983,7 +999,7 @@ class Ss extends Oe {
|
|
|
983
999
|
t(this, tt)
|
|
984
1000
|
), this.scrollElement.sectionsInViewCSSProperty.subscribe(
|
|
985
1001
|
t(this, tt)
|
|
986
|
-
), this.scrollElement.loopCSSProperty.subscribe(t(this, tt)), h(this,
|
|
1002
|
+
), this.scrollElement.loopCSSProperty.subscribe(t(this, tt)), h(this, Ot, document.createElement("div")), this.appendChild(t(this, Ot));
|
|
987
1003
|
}
|
|
988
1004
|
disconnectedCallback() {
|
|
989
1005
|
this.scrollElement.removeEventListener(
|
|
@@ -991,32 +1007,53 @@ class Ss extends Oe {
|
|
|
991
1007
|
t(this, tt)
|
|
992
1008
|
), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
|
|
993
1009
|
t(this, tt)
|
|
994
|
-
), this.scrollElement.loopCSSProperty.unsubscribe(t(this, tt)), t(this, St).forEach((e) => e.destroy()), h(this, St, []), t(this,
|
|
1010
|
+
), this.scrollElement.loopCSSProperty.unsubscribe(t(this, tt)), t(this, St).forEach((e) => e.destroy()), h(this, St, []), t(this, Ot).remove();
|
|
995
1011
|
}
|
|
996
1012
|
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
class
|
|
1013
|
+
Ot = new WeakMap(), St = new WeakMap(), tt = new WeakMap();
|
|
1014
|
+
T && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", Es);
|
|
1015
|
+
class Ps extends Ss {
|
|
1000
1016
|
connectedCallback() {
|
|
1001
|
-
const n =
|
|
1002
|
-
n instanceof
|
|
1017
|
+
const n = je(this, Wt);
|
|
1018
|
+
n instanceof Wt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
|
|
1003
1019
|
"scrollSectionsChange",
|
|
1004
1020
|
this.findAnotherScrollEntries
|
|
1005
1021
|
), this.scrollContainer.addEventListener("scrollResize", this.resize), this.resize()) : console.error(this, "e-scroll not found");
|
|
1006
1022
|
}
|
|
1007
1023
|
disconnectedCallback() {
|
|
1008
|
-
super.disconnectedCallback(), this.scrollContainer instanceof
|
|
1024
|
+
super.disconnectedCallback(), this.scrollContainer instanceof Wt && (this.scrollContainer.removeEventListener(
|
|
1009
1025
|
"scrollSectionsChange",
|
|
1010
1026
|
this.findAnotherScrollEntries
|
|
1011
1027
|
), this.scrollContainer.removeEventListener("scrollResize", this.resize));
|
|
1012
1028
|
}
|
|
1013
1029
|
}
|
|
1014
|
-
|
|
1030
|
+
T && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", Ps);
|
|
1031
|
+
var Ee;
|
|
1032
|
+
const Be = class Be extends ze {
|
|
1033
|
+
constructor() {
|
|
1034
|
+
super(...arguments);
|
|
1035
|
+
s(this, Ee, () => {
|
|
1036
|
+
this.textContent = `${this.scrollElement.counter.current + 1}`;
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
connectedCallback() {
|
|
1040
|
+
return Ge(this, null, function* () {
|
|
1041
|
+
Ue(Be.prototype, this, "connectedCallback").call(this), this.scrollElement.counter.subscribe(t(this, Ee));
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
disconnectedCallback() {
|
|
1045
|
+
this.scrollElement.counter.unsubscribe(t(this, Ee));
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
Ee = new WeakMap();
|
|
1049
|
+
let $e = Be;
|
|
1050
|
+
T && !customElements.get("e-scroll-counter") && customElements.define("e-scroll-counter", $e);
|
|
1015
1051
|
export {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1052
|
+
Es as ScrollBulletButtonsElement,
|
|
1053
|
+
$e as ScrollCounterElement,
|
|
1054
|
+
Wt as ScrollElement,
|
|
1055
|
+
Ps as ScrollSegmentElement,
|
|
1056
|
+
Cs as ScrollSetButtonElement,
|
|
1057
|
+
ws as ScrollStepButtonElement,
|
|
1058
|
+
ys as ScrollbarElement
|
|
1022
1059
|
};
|