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