aptechka 0.4.9 → 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/DragControls-C7P6P5HO.cjs +1 -0
- package/lib/DragControls-CZhJHO0_.js +146 -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/controls/index.cjs +1 -1
- package/lib/controls/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 +424 -411
- 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/DragControls-CuGSxr1d.js +0 -137
- package/lib/DragControls-Dfbbq8Wb.cjs +0 -1
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,
|
|
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,82 +296,84 @@ 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();
|
|
351
361
|
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,118 +493,119 @@ 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,
|
|
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
|
-
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,
|
|
490
|
-
}), G(this,
|
|
491
|
-
dt(this, Jt, this.scrollElement.currentProgress * u(this, Zt)), u(this, et) ? u(this,
|
|
492
|
-
}), G(this,
|
|
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");
|
|
502
|
+
}), G(this, fe, () => {
|
|
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)`;
|
|
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",
|
|
514
|
+
"drag-dead-zone": "",
|
|
502
515
|
children: [
|
|
503
|
-
|
|
516
|
+
ke({
|
|
504
517
|
ref: (e) => dt(this, Nt, e),
|
|
505
|
-
children:
|
|
518
|
+
children: $e({ class: "default-thumb" })
|
|
506
519
|
})
|
|
507
520
|
]
|
|
508
521
|
}));
|
|
509
522
|
}
|
|
510
523
|
get thumbElement() {
|
|
511
|
-
return u(this,
|
|
524
|
+
return u(this, z);
|
|
512
525
|
}
|
|
513
526
|
connectedCallback() {
|
|
514
527
|
super.connectedCallback();
|
|
515
528
|
const e = u(this, Nt).assignedElements()[0] || u(this, Nt).firstElementChild;
|
|
516
|
-
dt(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));
|
|
517
530
|
}
|
|
518
531
|
disconnectedCallback() {
|
|
519
|
-
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));
|
|
520
533
|
}
|
|
521
534
|
};
|
|
522
535
|
Nt = /* @__PURE__ */ new WeakMap();
|
|
523
|
-
|
|
536
|
+
z = /* @__PURE__ */ new WeakMap();
|
|
524
537
|
et = /* @__PURE__ */ new WeakMap();
|
|
525
538
|
st = /* @__PURE__ */ new WeakMap();
|
|
526
539
|
Zt = /* @__PURE__ */ new WeakMap();
|
|
527
540
|
Jt = /* @__PURE__ */ new WeakMap();
|
|
528
|
-
ce = /* @__PURE__ */ new WeakMap();
|
|
529
|
-
ue = /* @__PURE__ */ new WeakMap();
|
|
530
541
|
pe = /* @__PURE__ */ new WeakMap();
|
|
531
542
|
fe = /* @__PURE__ */ new WeakMap();
|
|
532
|
-
|
|
543
|
+
de = /* @__PURE__ */ new WeakMap();
|
|
544
|
+
Se = /* @__PURE__ */ new WeakMap();
|
|
545
|
+
ns = Zs([
|
|
533
546
|
Kt("e-scrollbar")
|
|
534
|
-
],
|
|
535
|
-
const
|
|
547
|
+
], ns);
|
|
548
|
+
const Qs = Je({
|
|
536
549
|
button: {
|
|
537
550
|
all: "inherit"
|
|
538
551
|
}
|
|
539
552
|
});
|
|
540
|
-
class
|
|
553
|
+
class vs extends Ve {
|
|
541
554
|
constructor() {
|
|
542
|
-
super(), this.openShadow(
|
|
555
|
+
super(), this.openShadow(Qs), Ue && Ze(this, {
|
|
543
556
|
children: [
|
|
544
|
-
|
|
557
|
+
As({
|
|
545
558
|
onClick: () => {
|
|
546
559
|
this.handleClick();
|
|
547
560
|
},
|
|
548
|
-
children: [
|
|
561
|
+
children: [ke()]
|
|
549
562
|
})
|
|
550
563
|
]
|
|
551
564
|
});
|
|
552
565
|
}
|
|
553
566
|
}
|
|
554
|
-
var
|
|
555
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
556
|
-
(p = e[c]) && (n = (h ? p(
|
|
557
|
-
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;
|
|
558
571
|
};
|
|
559
|
-
let
|
|
572
|
+
let as = class extends vs {
|
|
560
573
|
handleClick() {
|
|
561
|
-
const e = this.getAttribute("index"),
|
|
562
|
-
this.scrollElement.scrollToSection(parseInt(e || "0"),
|
|
574
|
+
const e = this.getAttribute("index"), i = this.getAttribute("behaviour");
|
|
575
|
+
this.scrollElement.scrollToSection(parseInt(e || "0"), i);
|
|
563
576
|
}
|
|
564
577
|
};
|
|
565
|
-
|
|
578
|
+
as = js([
|
|
566
579
|
Kt("e-scroll-set-button")
|
|
567
|
-
],
|
|
568
|
-
var
|
|
569
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
570
|
-
(p = e[c]) && (n = (h ? p(
|
|
571
|
-
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;
|
|
572
585
|
};
|
|
573
|
-
let
|
|
586
|
+
let os = class extends vs {
|
|
574
587
|
handleClick() {
|
|
575
|
-
const e = this.getAttribute("step"),
|
|
576
|
-
this.scrollElement.shiftSections(parseInt(e || "1"),
|
|
588
|
+
const e = this.getAttribute("step"), i = this.getAttribute("behaviour");
|
|
589
|
+
this.scrollElement.shiftSections(parseInt(e || "1"), i);
|
|
577
590
|
}
|
|
578
591
|
};
|
|
579
|
-
|
|
592
|
+
os = si([
|
|
580
593
|
Kt("e-scroll-step-button")
|
|
581
|
-
],
|
|
582
|
-
var
|
|
583
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
584
|
-
(p = e[c]) && (n = (h ? p(
|
|
585
|
-
return h && n &&
|
|
586
|
-
},
|
|
587
|
-
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))
|
|
588
601
|
throw TypeError("Cannot " + r);
|
|
589
|
-
}, xt = (e,
|
|
590
|
-
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))
|
|
591
604
|
throw TypeError("Cannot add the same private member more than once");
|
|
592
|
-
|
|
593
|
-
},
|
|
594
|
-
class
|
|
595
|
-
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) {
|
|
596
609
|
F(this, Y, void 0);
|
|
597
610
|
F(this, ft, void 0);
|
|
598
611
|
F(this, Rt, void 0);
|
|
@@ -606,7 +619,7 @@ class ri {
|
|
|
606
619
|
o(this, ft).counter.current === o(this, Rt)
|
|
607
620
|
);
|
|
608
621
|
});
|
|
609
|
-
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);
|
|
610
623
|
}
|
|
611
624
|
get element() {
|
|
612
625
|
return o(this, Y);
|
|
@@ -616,17 +629,17 @@ class ri {
|
|
|
616
629
|
}
|
|
617
630
|
}
|
|
618
631
|
Y = new WeakMap(), ft = new WeakMap(), Rt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), It = new WeakMap();
|
|
619
|
-
let
|
|
632
|
+
let us = class extends Ve {
|
|
620
633
|
constructor() {
|
|
621
|
-
super(...arguments),
|
|
622
|
-
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, []);
|
|
623
636
|
for (let e = 0; e < this.scrollElement.sections.length; e++) {
|
|
624
|
-
const
|
|
637
|
+
const i = new ni(
|
|
625
638
|
this.scrollElement,
|
|
626
639
|
e,
|
|
627
640
|
this.getAttribute("behaviour") || "smooth"
|
|
628
641
|
);
|
|
629
|
-
this.appendChild(
|
|
642
|
+
this.appendChild(i.element), xt(this, gt).push(i);
|
|
630
643
|
}
|
|
631
644
|
}, 0));
|
|
632
645
|
}
|
|
@@ -640,33 +653,33 @@ let ls = class extends xe {
|
|
|
640
653
|
this.scrollElement.removeEventListener(
|
|
641
654
|
"sectionsChange",
|
|
642
655
|
xt(this, Qt)
|
|
643
|
-
), xt(this, gt).forEach((e) => e.destroy()),
|
|
656
|
+
), xt(this, gt).forEach((e) => e.destroy()), cs(this, gt, []);
|
|
644
657
|
}
|
|
645
658
|
};
|
|
646
659
|
gt = /* @__PURE__ */ new WeakMap();
|
|
647
660
|
Qt = /* @__PURE__ */ new WeakMap();
|
|
648
|
-
|
|
661
|
+
us = hi([
|
|
649
662
|
Kt("e-scroll-bullet-buttons")
|
|
650
|
-
],
|
|
651
|
-
var
|
|
652
|
-
for (var n = h > 1 ? void 0 : h ?
|
|
653
|
-
(p = e[c]) && (n = (h ? p(
|
|
654
|
-
return h && n &&
|
|
655
|
-
},
|
|
656
|
-
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))
|
|
657
670
|
throw TypeError("Cannot " + r);
|
|
658
|
-
}, t = (e,
|
|
659
|
-
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))
|
|
660
673
|
throw TypeError("Cannot add the same private member more than once");
|
|
661
|
-
|
|
662
|
-
},
|
|
663
|
-
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 {
|
|
664
677
|
constructor() {
|
|
665
|
-
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(
|
|
666
679
|
this,
|
|
667
680
|
"--distance-offset",
|
|
668
681
|
0
|
|
669
|
-
)), a(this,
|
|
682
|
+
)), a(this, _t, new S(this, "--start-offset", 0)), a(this, Ct, new S(
|
|
670
683
|
this,
|
|
671
684
|
"--capture-once",
|
|
672
685
|
!1
|
|
@@ -682,31 +695,31 @@ let cs = class extends xe {
|
|
|
682
695
|
this,
|
|
683
696
|
"--released-from-start",
|
|
684
697
|
""
|
|
685
|
-
)), a(this,
|
|
698
|
+
)), a(this, E, new S(
|
|
686
699
|
this,
|
|
687
700
|
"--released-from-finish",
|
|
688
701
|
""
|
|
689
|
-
)), a(this, ot, new S(this, "--passed-var", "")), a(this, lt, new S(this, "--progress-var", "")), a(this, rt, new S(this, "--distance-var", "")), a(this, ht, new S(this, "--start-var", "")), a(this, nt, new S(this, "--finish-var", "")), a(this,
|
|
702
|
+
)), a(this, ot, new S(this, "--passed-var", "")), a(this, lt, new S(this, "--progress-var", "")), a(this, rt, new S(this, "--distance-var", "")), a(this, ht, new S(this, "--start-var", "")), a(this, nt, new S(this, "--finish-var", "")), a(this, zt, new S(this, "--smoothstep", !1)), a(this, Xt, new S(
|
|
690
703
|
this,
|
|
691
704
|
"--smootherstep",
|
|
692
705
|
!1
|
|
693
|
-
)), 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, () => {
|
|
694
707
|
t(this, y) || (this.resize(), t(this, jt).call(this));
|
|
695
708
|
}), a(this, jt, () => {
|
|
696
709
|
!t(this, y) && t(this, Yt) && this.tick();
|
|
697
|
-
}), a(this,
|
|
698
|
-
const e =
|
|
699
|
-
let
|
|
710
|
+
}), a(this, _e, ds(() => {
|
|
711
|
+
const e = Mt.getAll(this).reverse();
|
|
712
|
+
let i = 0;
|
|
700
713
|
e.forEach((r, h) => {
|
|
701
|
-
r.element === this.scrollElement && (
|
|
702
|
-
}),
|
|
714
|
+
r.element === this.scrollElement && (i = h);
|
|
715
|
+
}), d(this, me, e.slice(i + 1));
|
|
703
716
|
}, 0));
|
|
704
717
|
}
|
|
705
718
|
get distanceOffsetCSSProperty() {
|
|
706
|
-
return t(this,
|
|
719
|
+
return t(this, bt);
|
|
707
720
|
}
|
|
708
721
|
get startOffsetCSSProperty() {
|
|
709
|
-
return t(this,
|
|
722
|
+
return t(this, _t);
|
|
710
723
|
}
|
|
711
724
|
get captureOnceCSSProperty() {
|
|
712
725
|
return t(this, Ct);
|
|
@@ -727,7 +740,7 @@ let cs = class extends xe {
|
|
|
727
740
|
return t(this, kt);
|
|
728
741
|
}
|
|
729
742
|
get releasedFromFinishCSSProperty() {
|
|
730
|
-
return t(this,
|
|
743
|
+
return t(this, E);
|
|
731
744
|
}
|
|
732
745
|
get passedVarCSSProperty() {
|
|
733
746
|
return t(this, ot);
|
|
@@ -745,7 +758,7 @@ let cs = class extends xe {
|
|
|
745
758
|
return t(this, nt);
|
|
746
759
|
}
|
|
747
760
|
get smoothstepCSSProperty() {
|
|
748
|
-
return t(this,
|
|
761
|
+
return t(this, zt);
|
|
749
762
|
}
|
|
750
763
|
get smootherstepCSSProperty() {
|
|
751
764
|
return t(this, Xt);
|
|
@@ -757,7 +770,7 @@ let cs = class extends xe {
|
|
|
757
770
|
return t(this, Ot);
|
|
758
771
|
}
|
|
759
772
|
get isCaptured() {
|
|
760
|
-
return t(this,
|
|
773
|
+
return t(this, M);
|
|
761
774
|
}
|
|
762
775
|
get isReleased() {
|
|
763
776
|
return t(this, q);
|
|
@@ -775,7 +788,7 @@ let cs = class extends xe {
|
|
|
775
788
|
return t(this, J);
|
|
776
789
|
}
|
|
777
790
|
get directionPosition() {
|
|
778
|
-
return t(this,
|
|
791
|
+
return t(this, Dt);
|
|
779
792
|
}
|
|
780
793
|
get directionSize() {
|
|
781
794
|
return t(this, At);
|
|
@@ -802,110 +815,110 @@ let cs = class extends xe {
|
|
|
802
815
|
return t(this, y);
|
|
803
816
|
}
|
|
804
817
|
resize() {
|
|
805
|
-
|
|
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);
|
|
806
819
|
}
|
|
807
820
|
tick() {
|
|
808
821
|
let e = this.scrollElement.currentScrollValue;
|
|
809
|
-
t(this,
|
|
822
|
+
t(this, me).forEach((r) => {
|
|
810
823
|
e += r.value;
|
|
811
|
-
}),
|
|
812
|
-
const
|
|
813
|
-
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));
|
|
814
827
|
}
|
|
815
828
|
disable() {
|
|
816
|
-
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);
|
|
817
830
|
}
|
|
818
831
|
enable() {
|
|
819
|
-
|
|
832
|
+
d(this, y, !1);
|
|
820
833
|
}
|
|
821
834
|
connectedCallback() {
|
|
822
|
-
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();
|
|
823
836
|
let e = !1;
|
|
824
837
|
this.scrollElement.addEventListener(
|
|
825
838
|
"sectionsChange",
|
|
826
|
-
t(this,
|
|
827
|
-
), t(this,
|
|
828
|
-
|
|
829
|
-
}), t(this, wt).subscribe((
|
|
830
|
-
|
|
831
|
-
}), t(this, bt).subscribe(() => {
|
|
832
|
-
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());
|
|
833
844
|
}), t(this, _t).subscribe(() => {
|
|
834
845
|
e && !t(this, y) && this.resize();
|
|
835
|
-
}), t(this,
|
|
836
|
-
|
|
837
|
-
}), t(this,
|
|
838
|
-
|
|
839
|
-
}), t(this,
|
|
840
|
-
|
|
841
|
-
}), t(this,
|
|
842
|
-
|
|
843
|
-
}), t(this,
|
|
844
|
-
|
|
845
|
-
}), t(this,
|
|
846
|
-
|
|
847
|
-
}), t(this,
|
|
848
|
-
|
|
849
|
-
}), t(this,
|
|
850
|
-
t(this, y) ||
|
|
851
|
-
}), t(this,
|
|
852
|
-
t(this, y) || (this.removeVar(
|
|
853
|
-
}), t(this,
|
|
854
|
-
t(this, y) || (this.removeVar(
|
|
855
|
-
}), t(this,
|
|
856
|
-
t(this, y) || (this.removeVar(
|
|
857
|
-
}), t(this,
|
|
858
|
-
t(this, y) || (this.removeVar(
|
|
859
|
-
}),
|
|
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;
|
|
860
873
|
}
|
|
861
874
|
disconnectedCallback() {
|
|
862
|
-
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();
|
|
863
876
|
}
|
|
864
877
|
removeVar(e) {
|
|
865
878
|
e && t(this, v).style.removeProperty(`--${e}`);
|
|
866
879
|
}
|
|
867
|
-
setVar(e,
|
|
868
|
-
e && t(this, v).style.setProperty(`--${e}`,
|
|
880
|
+
setVar(e, i) {
|
|
881
|
+
e && t(this, v).style.setProperty(`--${e}`, i.toString());
|
|
869
882
|
}
|
|
870
|
-
updateValue(e,
|
|
871
|
-
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);
|
|
872
885
|
}
|
|
873
886
|
getDistance() {
|
|
874
|
-
return t(this, At) + t(this,
|
|
887
|
+
return t(this, At) + t(this, ve);
|
|
875
888
|
}
|
|
876
889
|
getStart() {
|
|
877
|
-
return t(this,
|
|
890
|
+
return t(this, Dt) - t(this, ve);
|
|
878
891
|
}
|
|
879
892
|
};
|
|
880
893
|
Ot = /* @__PURE__ */ new WeakMap();
|
|
881
894
|
wt = /* @__PURE__ */ new WeakMap();
|
|
882
|
-
_t = /* @__PURE__ */ new WeakMap();
|
|
883
895
|
bt = /* @__PURE__ */ new WeakMap();
|
|
896
|
+
_t = /* @__PURE__ */ new WeakMap();
|
|
884
897
|
Ct = /* @__PURE__ */ new WeakMap();
|
|
885
898
|
$ = /* @__PURE__ */ new WeakMap();
|
|
886
899
|
I = /* @__PURE__ */ new WeakMap();
|
|
887
900
|
B = /* @__PURE__ */ new WeakMap();
|
|
888
901
|
H = /* @__PURE__ */ new WeakMap();
|
|
889
902
|
kt = /* @__PURE__ */ new WeakMap();
|
|
890
|
-
|
|
903
|
+
E = /* @__PURE__ */ new WeakMap();
|
|
891
904
|
ot = /* @__PURE__ */ new WeakMap();
|
|
892
905
|
lt = /* @__PURE__ */ new WeakMap();
|
|
893
906
|
rt = /* @__PURE__ */ new WeakMap();
|
|
894
907
|
ht = /* @__PURE__ */ new WeakMap();
|
|
895
908
|
nt = /* @__PURE__ */ new WeakMap();
|
|
896
|
-
|
|
909
|
+
zt = /* @__PURE__ */ new WeakMap();
|
|
897
910
|
Xt = /* @__PURE__ */ new WeakMap();
|
|
898
|
-
|
|
911
|
+
M = /* @__PURE__ */ new WeakMap();
|
|
899
912
|
q = /* @__PURE__ */ new WeakMap();
|
|
900
913
|
U = /* @__PURE__ */ new WeakMap();
|
|
901
914
|
ct = /* @__PURE__ */ new WeakMap();
|
|
902
915
|
ut = /* @__PURE__ */ new WeakMap();
|
|
903
916
|
J = /* @__PURE__ */ new WeakMap();
|
|
904
|
-
|
|
917
|
+
me = /* @__PURE__ */ new WeakMap();
|
|
905
918
|
v = /* @__PURE__ */ new WeakMap();
|
|
906
|
-
|
|
919
|
+
Dt = /* @__PURE__ */ new WeakMap();
|
|
907
920
|
At = /* @__PURE__ */ new WeakMap();
|
|
908
|
-
|
|
921
|
+
ve = /* @__PURE__ */ new WeakMap();
|
|
909
922
|
R = /* @__PURE__ */ new WeakMap();
|
|
910
923
|
Q = /* @__PURE__ */ new WeakMap();
|
|
911
924
|
x = /* @__PURE__ */ new WeakMap();
|
|
@@ -914,12 +927,12 @@ T = /* @__PURE__ */ new WeakMap();
|
|
|
914
927
|
Yt = /* @__PURE__ */ new WeakMap();
|
|
915
928
|
Pt = /* @__PURE__ */ new WeakMap();
|
|
916
929
|
y = /* @__PURE__ */ new WeakMap();
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
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));
|
|
920
933
|
};
|
|
921
|
-
|
|
922
|
-
|
|
934
|
+
ts = /* @__PURE__ */ new WeakSet();
|
|
935
|
+
ws = function() {
|
|
923
936
|
this.dispatchEvent(
|
|
924
937
|
new CustomEvent("segmentPass", {
|
|
925
938
|
detail: {
|
|
@@ -932,47 +945,47 @@ vs = function() {
|
|
|
932
945
|
})
|
|
933
946
|
);
|
|
934
947
|
};
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
t(this,
|
|
938
|
-
t(this,
|
|
939
|
-
), t(this,
|
|
940
|
-
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
|
|
941
954
|
), t(this, $).current && t(this, v).classList.add(t(this, $).current);
|
|
942
955
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
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(
|
|
946
959
|
t(this, B).current
|
|
947
960
|
), t(this, H).current && t(this, v).classList.remove(
|
|
948
961
|
t(this, H).current
|
|
949
962
|
), t(this, I).current && t(this, v).classList.add(t(this, I).current);
|
|
950
963
|
};
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
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(
|
|
954
967
|
t(this, B).current
|
|
955
968
|
);
|
|
956
969
|
};
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
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(
|
|
960
973
|
t(this, H).current
|
|
961
974
|
);
|
|
962
975
|
};
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
t(this, q).current = !0, t(this, ct).current = !0, t(this, U).current = !1, t(this,
|
|
966
|
-
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
|
|
967
980
|
);
|
|
968
981
|
};
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
t(this, q).current = !0, t(this, J).current = !0, t(this, ut).current = !1, t(this,
|
|
972
|
-
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
|
|
973
986
|
);
|
|
974
987
|
};
|
|
975
|
-
|
|
988
|
+
we = /* @__PURE__ */ new WeakMap();
|
|
976
989
|
jt = /* @__PURE__ */ new WeakMap();
|
|
977
990
|
it = /* @__PURE__ */ new WeakSet();
|
|
978
991
|
yt = function(e) {
|
|
@@ -980,33 +993,33 @@ yt = function(e) {
|
|
|
980
993
|
e.previous && t(this, v).classList.remove(e.previous), e.current && t(this, v).classList.remove(e.current);
|
|
981
994
|
return;
|
|
982
995
|
}
|
|
983
|
-
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);
|
|
984
997
|
};
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
e.forEach((
|
|
988
|
-
|
|
998
|
+
es = /* @__PURE__ */ new WeakSet();
|
|
999
|
+
Ps = function(...e) {
|
|
1000
|
+
e.forEach((i) => {
|
|
1001
|
+
i && t(this, v).classList.remove(i);
|
|
989
1002
|
});
|
|
990
1003
|
};
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
e.forEach((
|
|
994
|
-
|
|
1004
|
+
ss = /* @__PURE__ */ new WeakSet();
|
|
1005
|
+
Ms = function(...e) {
|
|
1006
|
+
e.forEach((i) => {
|
|
1007
|
+
i && t(this, v).style.removeProperty(`--${i}`);
|
|
995
1008
|
});
|
|
996
1009
|
};
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
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);
|
|
1000
1013
|
};
|
|
1001
|
-
|
|
1002
|
-
|
|
1014
|
+
_e = /* @__PURE__ */ new WeakMap();
|
|
1015
|
+
ps = li([
|
|
1003
1016
|
Kt("e-scroll-segment")
|
|
1004
|
-
],
|
|
1017
|
+
], ps);
|
|
1005
1018
|
export {
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1019
|
+
us as ScrollBulletButtonsElement,
|
|
1020
|
+
xe as ScrollElement,
|
|
1021
|
+
ps as ScrollSegmentElement,
|
|
1022
|
+
as as ScrollSetButtonElement,
|
|
1023
|
+
os as ScrollStepButtonElement,
|
|
1024
|
+
ns as ScrollbarElement
|
|
1012
1025
|
};
|