aptechka 0.8.4 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ElementConstructor-OK-6OPjh.cjs +1 -0
- package/lib/ElementConstructor-rValMo8f.js +372 -0
- package/lib/_createStore-C75y9luu.cjs +1 -0
- package/lib/_createStore-D3qHYaSz.js +12 -0
- package/lib/accordion/AccordionElement.d.ts +1 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +110 -122
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +4 -5
- package/lib/canvas/index.js +69 -75
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.d.ts +1 -3
- package/lib/checkbox/index.js +42 -45
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.d.ts +2 -2
- package/lib/connector/index.js +39 -34
- package/lib/counter/index.d.ts +1 -3
- package/lib/{createStylesheet-BsMSWX0q.cjs → createStylesheet-9nksoWW0.cjs} +1 -1
- package/lib/{createStylesheet-BxKITIVV.js → createStylesheet-BrFGJ8Q7.js} +1 -1
- package/lib/element-constructor/ElementConstructor.d.ts +6 -5
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +114 -113
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -2
- package/lib/globals-DMjysUXI.js +8 -0
- package/lib/globals-bYKki-b9.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +7 -15
- package/lib/index-3R8YL-P3.js +266 -0
- package/lib/index-CyQAdqFu.cjs +9 -0
- package/lib/instantiate-BuVJ8pIJ.cjs +1 -0
- package/lib/instantiate-TYteKsII.js +134 -0
- package/lib/jsx/ComponentElement.d.ts +18 -0
- package/lib/jsx/globals.d.ts +13 -0
- package/lib/jsx/h.d.ts +6 -0
- package/lib/jsx/hooks/animation/createDamped.d.ts +3 -0
- package/lib/jsx/hooks/animation/createTweened.d.ts +3 -0
- package/lib/jsx/hooks/animation/index.cjs +1 -0
- package/lib/jsx/hooks/animation/index.d.ts +2 -0
- package/lib/jsx/hooks/animation/index.js +15 -0
- package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
- package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
- package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
- package/lib/jsx/hooks/basic/createRef.d.ts +3 -0
- package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onStoreChange.d.ts +3 -0
- package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
- package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
- package/lib/jsx/hooks/onAnimationFrame.js +22 -0
- package/lib/jsx/hooks/onElementResize.cjs +1 -0
- package/lib/jsx/hooks/onElementResize.d.ts +5 -0
- package/lib/jsx/hooks/onElementResize.js +11 -0
- package/lib/jsx/hooks/onIntersection.cjs +1 -0
- package/lib/jsx/hooks/onIntersection.d.ts +5 -0
- package/lib/jsx/hooks/onIntersection.js +11 -0
- package/lib/jsx/hooks/onWindowResize.cjs +1 -0
- package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
- package/lib/jsx/hooks/onWindowResize.js +8 -0
- package/lib/jsx/hooks/store/createCached.d.ts +3 -0
- package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
- package/lib/jsx/hooks/store/createResource.d.ts +3 -0
- package/lib/jsx/hooks/store/createStore.d.ts +3 -0
- package/lib/jsx/hooks/store/index.cjs +1 -0
- package/lib/jsx/hooks/store/index.d.ts +6 -0
- package/lib/jsx/hooks/store/index.js +31 -0
- package/lib/jsx/hooks/watchAttribute.cjs +1 -0
- package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
- package/lib/jsx/hooks/watchAttribute.js +17 -0
- package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
- package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
- package/lib/jsx/hooks/watchCSSProperty.js +17 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +15 -0
- package/lib/jsx/index.js +106 -0
- package/lib/jsx/instantiate.d.ts +5 -0
- package/lib/jsx/register.d.ts +1 -0
- package/lib/jsx/render.d.ts +6 -0
- package/lib/jsx/type.d.ts +198 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +34 -36
- package/lib/onConnect-DGP866cj.cjs +1 -0
- package/lib/onConnect-y5DrxJ9P.js +7 -0
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +5 -4
- package/lib/order/index.js +1 -1
- package/lib/pointer/PointerElement.d.ts +1 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +105 -117
- package/lib/popover/PopoverButtonElement.d.ts +1 -2
- package/lib/popover/PopoverElement.d.ts +1 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +109 -124
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +76 -73
- package/lib/scroll/ScrollElement.d.ts +1 -2
- package/lib/scroll/ScrollUserElement.d.ts +1 -2
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +674 -753
- package/lib/select/SelectElement.d.ts +1 -3
- package/lib/select/SelectUserElement.d.ts +1 -2
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +104 -107
- package/lib/slicer/SlicerElement.d.ts +1 -2
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +88 -106
- package/lib/source/SourceElement.d.ts +1 -2
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +19 -20
- package/lib/store/Cached.d.ts +13 -0
- package/lib/store/Derived.d.ts +3 -3
- package/lib/store/DerivedArray.d.ts +8 -0
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.js +65 -31
- package/lib/tags-BosXYPYv.cjs +1 -0
- package/lib/tags-D0kLlFdQ.js +485 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -1
- package/lib/tweaker/TweakerFieldElement.d.ts +1 -2
- package/lib/tweaker/TweakerFolderElement.d.ts +1 -2
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -2
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +393 -472
- package/lib/utils/bytes.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +122 -105
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +25 -29
- package/package.json +73 -9
- package/lib/custom-element/index.cjs +0 -1
- package/lib/custom-element/index.d.ts +0 -8
- package/lib/custom-element/index.js +0 -30
- package/lib/index-CzpP1Tg6.cjs +0 -9
- package/lib/index-Dwd_62sm.js +0 -301
- package/lib/tags-CAfasCGV.cjs +0 -1
- package/lib/tags-D9lNDPX8.js +0 -848
package/lib/router/index.js
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
var X = (
|
|
2
|
-
var W = (
|
|
3
|
-
if (!e.has(
|
|
1
|
+
var X = (n, e) => (e = Symbol[n]) ? e : Symbol.for("Symbol." + n);
|
|
2
|
+
var W = (n, e, s) => {
|
|
3
|
+
if (!e.has(n))
|
|
4
4
|
throw TypeError("Cannot " + s);
|
|
5
5
|
};
|
|
6
|
-
var t = (
|
|
7
|
-
if (e.has(
|
|
6
|
+
var t = (n, e, s) => (W(n, e, "read from private field"), s ? s.call(n) : e.get(n)), h = (n, e, s) => {
|
|
7
|
+
if (e.has(n))
|
|
8
8
|
throw TypeError("Cannot add the same private member more than once");
|
|
9
|
-
e instanceof WeakSet ? e.add(
|
|
10
|
-
},
|
|
11
|
-
var Y = (
|
|
12
|
-
var I = (
|
|
13
|
-
var o = (
|
|
9
|
+
e instanceof WeakSet ? e.add(n) : e.set(n, s);
|
|
10
|
+
}, a = (n, e, s, i) => (W(n, e, "write to private field"), i ? i.call(n, s) : e.set(n, s), s);
|
|
11
|
+
var Y = (n, e, s) => (W(n, e, "access private method"), s);
|
|
12
|
+
var I = (n, e, s) => new Promise((i, r) => {
|
|
13
|
+
var o = (u) => {
|
|
14
14
|
try {
|
|
15
|
-
f(s.next(
|
|
15
|
+
f(s.next(u));
|
|
16
16
|
} catch (w) {
|
|
17
17
|
r(w);
|
|
18
18
|
}
|
|
19
|
-
}, c = (
|
|
19
|
+
}, c = (u) => {
|
|
20
20
|
try {
|
|
21
|
-
f(s.throw(
|
|
21
|
+
f(s.throw(u));
|
|
22
22
|
} catch (w) {
|
|
23
23
|
r(w);
|
|
24
24
|
}
|
|
25
|
-
}, f = (
|
|
26
|
-
f((s = s.apply(
|
|
25
|
+
}, f = (u) => u.done ? i(u.value) : Promise.resolve(u.value).then(o, c);
|
|
26
|
+
f((s = s.apply(n, e)).next());
|
|
27
27
|
});
|
|
28
|
-
var $ = (
|
|
29
|
-
import { URLPattern as
|
|
30
|
-
import { Notifier as
|
|
31
|
-
import { i as
|
|
32
|
-
import { d as
|
|
33
|
-
import { n as
|
|
34
|
-
import { i as
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
var $ = (n, e, s) => (e = n[X("asyncIterator")]) ? e.call(n) : (n = n[X("iterator")](), e = {}, s = (i, r) => (r = n[i]) && (e[i] = (o) => new Promise((c, f, u) => (o = r.call(n, o), u = o.done, Promise.resolve(o.value).then((w) => c({ value: w, done: u }), f)))), s("next"), s("return"), e);
|
|
29
|
+
import { URLPattern as at } from "urlpattern-polyfill";
|
|
30
|
+
import { Notifier as nt } from "../notifier/index.js";
|
|
31
|
+
import { i as _ } from "../browser-0zX67oeU.js";
|
|
32
|
+
import { d as ht } from "../function-C10DGppn.js";
|
|
33
|
+
import { n as rt, c as ot, s as ct } from "../url-DMNfW7uN.js";
|
|
34
|
+
import { i as lt } from "../instantiate-TYteKsII.js";
|
|
35
|
+
import { i as Z } from "../object-D6MVWB4l.js";
|
|
36
|
+
var y, U, A, p, m, L, k, v, E, R, M, tt;
|
|
37
|
+
class ut {
|
|
37
38
|
constructor(e, s) {
|
|
38
39
|
h(this, M);
|
|
39
40
|
h(this, y, void 0);
|
|
40
41
|
h(this, U, void 0);
|
|
41
42
|
h(this, A, void 0);
|
|
42
43
|
h(this, p, void 0);
|
|
43
|
-
h(this,
|
|
44
|
+
h(this, m, void 0);
|
|
44
45
|
h(this, L, void 0);
|
|
45
46
|
h(this, k, void 0);
|
|
46
47
|
h(this, v, null);
|
|
47
48
|
h(this, E, []);
|
|
48
49
|
h(this, R, []);
|
|
49
|
-
|
|
50
|
+
a(this, y, e), a(this, U, s), a(this, A, new URLPattern({ pathname: t(this, y) })), a(this, p, null), a(this, m, null), a(this, L, !1), a(this, k, null), _ && a(this, v, new MutationObserver((i) => {
|
|
50
51
|
i[0].addedNodes.forEach((o) => {
|
|
51
52
|
t(this, p) ? t(this, R).push(o) : t(this, E).push(o);
|
|
52
53
|
});
|
|
@@ -62,7 +63,7 @@ class lt {
|
|
|
62
63
|
return t(this, L);
|
|
63
64
|
}
|
|
64
65
|
get element() {
|
|
65
|
-
return t(this,
|
|
66
|
+
return t(this, m);
|
|
66
67
|
}
|
|
67
68
|
get nest() {
|
|
68
69
|
return t(this, k);
|
|
@@ -82,37 +83,39 @@ class lt {
|
|
|
82
83
|
});
|
|
83
84
|
else {
|
|
84
85
|
const o = yield t(this, U).call(this);
|
|
85
|
-
if (
|
|
86
|
+
if (a(this, R, [...t(this, E)]), typeof o.default == "function" && (a(this, p, o.default), Z(o.default))) {
|
|
86
87
|
const c = "e-" + ((i = t(this, p)) == null ? void 0 : i.name.toLowerCase());
|
|
87
88
|
customElements.get(c) || customElements.define(c, o.default);
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
|
-
if (yield Y(this, M,
|
|
91
|
+
if (yield Y(this, M, tt).call(this), t(this, p)) {
|
|
91
92
|
const o = t(this, A).exec({ pathname: s }), c = (o == null ? void 0 : o.pathname.groups) || {}, f = Object.fromEntries(
|
|
92
93
|
new URLSearchParams(location.search)
|
|
93
|
-
),
|
|
94
|
+
), u = {
|
|
94
95
|
pathnameParams: c,
|
|
95
96
|
searchParams: f
|
|
96
97
|
};
|
|
97
|
-
|
|
98
|
+
Z(t(this, p)) ? a(this, m, new (t(this, p))(u)) : a(this, m, lt(t(this, p), {
|
|
99
|
+
attributes: u
|
|
100
|
+
})), e.appendChild(t(this, m)), a(this, k, t(this, m).querySelector("[data-nest]") || ((r = t(this, m).shadowRoot) == null ? void 0 : r.querySelector("[data-nest]")) || t(this, m).shadowRoot || t(this, m)), a(this, L, !0);
|
|
98
101
|
}
|
|
99
102
|
t(this, v).disconnect();
|
|
100
103
|
});
|
|
101
104
|
}
|
|
102
105
|
close() {
|
|
103
106
|
var e;
|
|
104
|
-
t(this, v).disconnect(), (e = t(this,
|
|
107
|
+
t(this, v).disconnect(), (e = t(this, m)) == null || e.remove(), a(this, L, !1), t(this, R).forEach((s) => document.head.removeChild(s)), a(this, R, []);
|
|
105
108
|
}
|
|
106
109
|
getAnchorElements() {
|
|
107
110
|
var s;
|
|
108
111
|
let e = [];
|
|
109
|
-
return t(this,
|
|
112
|
+
return t(this, m) && (e = [...t(this, m).querySelectorAll("a")]), (s = t(this, m)) != null && s.shadowRoot && (e = [
|
|
110
113
|
...e,
|
|
111
|
-
...t(this,
|
|
114
|
+
...t(this, m).shadowRoot.querySelectorAll("a")
|
|
112
115
|
]), e;
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
|
-
y = new WeakMap(), U = new WeakMap(), A = new WeakMap(), p = new WeakMap(),
|
|
118
|
+
y = new WeakMap(), U = new WeakMap(), A = new WeakMap(), p = new WeakMap(), m = new WeakMap(), L = new WeakMap(), k = new WeakMap(), v = new WeakMap(), E = new WeakMap(), R = new WeakMap(), M = new WeakSet(), tt = function() {
|
|
116
119
|
return I(this, null, function* () {
|
|
117
120
|
const e = t(this, E).filter((c) => c instanceof HTMLElement ? c.tagName === "STYLE" || c.tagName === "SCRIPT" || c.tagName === "LINK" : !1);
|
|
118
121
|
try {
|
|
@@ -136,35 +139,35 @@ y = new WeakMap(), U = new WeakMap(), A = new WeakMap(), p = new WeakMap(), d =
|
|
|
136
139
|
}
|
|
137
140
|
});
|
|
138
141
|
};
|
|
139
|
-
var S,
|
|
140
|
-
class
|
|
142
|
+
var S, d, P, O, N, x;
|
|
143
|
+
class mt {
|
|
141
144
|
constructor(e, s) {
|
|
142
145
|
h(this, S, void 0);
|
|
143
|
-
h(this,
|
|
146
|
+
h(this, d, void 0);
|
|
144
147
|
h(this, P, void 0);
|
|
145
148
|
h(this, O, void 0);
|
|
146
149
|
h(this, N, void 0);
|
|
147
150
|
h(this, x, (e) => {
|
|
148
151
|
e.preventDefault(), t(this, S).links.forEach((s) => {
|
|
149
152
|
var i;
|
|
150
|
-
t(this, P) === t(s, P) || (i = t(s, N)) != null && i.includes(t(this, P)) ? t(s,
|
|
153
|
+
t(this, P) === t(s, P) || (i = t(s, N)) != null && i.includes(t(this, P)) ? t(s, d).classList.add("clicked") : t(s, d).classList.remove("clicked");
|
|
151
154
|
}), t(this, S).navigate(t(this, P), t(this, O));
|
|
152
155
|
});
|
|
153
156
|
var o, c;
|
|
154
|
-
|
|
157
|
+
a(this, S, e), a(this, d, s), a(this, P, t(this, d).getAttribute("href") || "/"), a(this, O, t(this, d).getAttribute(
|
|
155
158
|
"data-history-action"
|
|
156
|
-
) || "push"), t(this,
|
|
159
|
+
) || "push"), t(this, d).addEventListener("click", t(this, x));
|
|
157
160
|
const i = e.normalizePath(t(this, P)), r = e.normalizePath(location.pathname);
|
|
158
|
-
|
|
161
|
+
a(this, N, (o = t(this, d).getAttribute("data-match-paths")) == null ? void 0 : o.split(",").map((f) => e.normalizePath(f.trim()).pathname)), t(this, d).hasAttribute("data-include") ? r.pathname.includes(i.pathname) && t(this, d).classList.add("current") : i.pathname === r.pathname || (c = t(this, N)) != null && c.includes(r.pathname) ? (t(this, d).classList.add("current"), t(this, d).classList.add("clicked")) : t(this, d).classList.remove("clicked");
|
|
159
162
|
}
|
|
160
163
|
destroy() {
|
|
161
|
-
t(this,
|
|
164
|
+
t(this, d).removeEventListener("click", t(this, x)), t(this, d).classList.remove("current");
|
|
162
165
|
}
|
|
163
166
|
}
|
|
164
|
-
S = new WeakMap(),
|
|
165
|
-
globalThis.URLPattern =
|
|
166
|
-
var C, z, g, q, H, b, T, B, j, D,
|
|
167
|
-
class
|
|
167
|
+
S = new WeakMap(), d = new WeakMap(), P = new WeakMap(), O = new WeakMap(), N = new WeakMap(), x = new WeakMap();
|
|
168
|
+
globalThis.URLPattern = at;
|
|
169
|
+
var C, z, g, q, H, b, T, B, j, D, et, K;
|
|
170
|
+
class Et {
|
|
168
171
|
constructor(e) {
|
|
169
172
|
h(this, D);
|
|
170
173
|
h(this, C, null);
|
|
@@ -174,15 +177,15 @@ class Lt {
|
|
|
174
177
|
h(this, H, []);
|
|
175
178
|
h(this, b, void 0);
|
|
176
179
|
h(this, T, null);
|
|
177
|
-
h(this, B, new
|
|
178
|
-
h(this, j,
|
|
180
|
+
h(this, B, new nt());
|
|
181
|
+
h(this, j, ht(() => {
|
|
179
182
|
const e = (s) => s.split("/").length;
|
|
180
|
-
|
|
183
|
+
a(this, g, t(this, g).sort((s, i) => e(s.pattern) - e(i.pattern))), this.navigate(location.pathname);
|
|
181
184
|
}, 0));
|
|
182
185
|
h(this, K, (e) => {
|
|
183
186
|
e.state && this.navigate(e.state, "none");
|
|
184
187
|
});
|
|
185
|
-
|
|
188
|
+
_ && (e != null && e.base ? a(this, z, rt(e.base)) : a(this, z, "/"), a(this, C, (e == null ? void 0 : e.rootElement) || document.body), addEventListener("popstate", t(this, K)));
|
|
186
189
|
}
|
|
187
190
|
get currentPathname() {
|
|
188
191
|
return t(this, T);
|
|
@@ -200,7 +203,7 @@ class Lt {
|
|
|
200
203
|
return t(this, B).subscribe(e);
|
|
201
204
|
}
|
|
202
205
|
defineRoute(e, s) {
|
|
203
|
-
const i = new
|
|
206
|
+
const i = new ut(e, s);
|
|
204
207
|
t(this, g).push(i), t(this, j).call(this);
|
|
205
208
|
}
|
|
206
209
|
navigate(e, s = "push") {
|
|
@@ -210,48 +213,48 @@ class Lt {
|
|
|
210
213
|
let { pathname: r, hash: o, parameters: c, leaf: f } = i;
|
|
211
214
|
if (t(this, b) === r || t(this, T) === r)
|
|
212
215
|
return;
|
|
213
|
-
|
|
214
|
-
const
|
|
215
|
-
(l) => !
|
|
216
|
-
),
|
|
216
|
+
a(this, b, r);
|
|
217
|
+
const u = t(this, g).filter((l) => l.isActive), w = t(this, g).filter(
|
|
218
|
+
(l) => !u.includes(l) && l.testPathname(f)
|
|
219
|
+
), st = u.filter((l) => !l.testPathname(f)), F = u.filter((l) => l.testPathname(f));
|
|
217
220
|
let G = !0;
|
|
218
221
|
if (this.preprocessor)
|
|
219
222
|
try {
|
|
220
|
-
yield new Promise((l,
|
|
223
|
+
yield new Promise((l, it) => {
|
|
221
224
|
var V;
|
|
222
|
-
(V = this.preprocessor) == null || V.call(this, { path: i, resolve: l, reject:
|
|
225
|
+
(V = this.preprocessor) == null || V.call(this, { path: i, resolve: l, reject: it });
|
|
223
226
|
});
|
|
224
227
|
} catch (l) {
|
|
225
228
|
l ? console.error(l) : console.log("Route change canceled"), G = !1;
|
|
226
229
|
}
|
|
227
230
|
if (G && t(this, b) === r) {
|
|
228
|
-
|
|
231
|
+
a(this, q, F[F.length - 1]), st.forEach((l) => {
|
|
229
232
|
l.close();
|
|
230
|
-
}),
|
|
233
|
+
}), a(this, T, r), ot(s, r, c, o);
|
|
231
234
|
try {
|
|
232
|
-
for (var
|
|
233
|
-
const l =
|
|
234
|
-
yield l.render(((J = t(this, q)) == null ? void 0 : J.nest) || t(this, C), r),
|
|
235
|
+
for (var yt = $(w), At, kt, St; At = !(kt = yield yt.next()).done; At = !1) {
|
|
236
|
+
const l = kt.value;
|
|
237
|
+
yield l.render(((J = t(this, q)) == null ? void 0 : J.nest) || t(this, C), r), a(this, q, l);
|
|
235
238
|
}
|
|
236
|
-
} catch (
|
|
237
|
-
|
|
239
|
+
} catch (kt) {
|
|
240
|
+
St = [kt];
|
|
238
241
|
} finally {
|
|
239
242
|
try {
|
|
240
|
-
|
|
243
|
+
At && (kt = yt.return) && (yield kt.call(yt));
|
|
241
244
|
} finally {
|
|
242
|
-
if (
|
|
243
|
-
throw
|
|
245
|
+
if (St)
|
|
246
|
+
throw St[0];
|
|
244
247
|
}
|
|
245
248
|
}
|
|
246
|
-
Y(this, D,
|
|
249
|
+
Y(this, D, et).call(this), (Q = this.postprocessor) == null || Q.call(this, { pathname: r }), t(this, B).notify({ pathname: r });
|
|
247
250
|
}
|
|
248
251
|
});
|
|
249
252
|
}
|
|
250
253
|
normalizePath(e) {
|
|
251
|
-
return
|
|
254
|
+
return ct(e, t(this, z));
|
|
252
255
|
}
|
|
253
256
|
}
|
|
254
|
-
C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H = new WeakMap(), b = new WeakMap(), T = new WeakMap(), B = new WeakMap(), j = new WeakMap(), D = new WeakSet(),
|
|
257
|
+
C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H = new WeakMap(), b = new WeakMap(), T = new WeakMap(), B = new WeakMap(), j = new WeakMap(), D = new WeakSet(), et = function() {
|
|
255
258
|
const e = t(this, g).filter((i) => i.isActive), s = Array.from(
|
|
256
259
|
new Set(
|
|
257
260
|
[
|
|
@@ -265,8 +268,8 @@ C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H =
|
|
|
265
268
|
);
|
|
266
269
|
t(this, H).forEach((i) => {
|
|
267
270
|
i.destroy();
|
|
268
|
-
}),
|
|
271
|
+
}), a(this, H, s.map((i) => new mt(this, i)));
|
|
269
272
|
}, K = new WeakMap();
|
|
270
273
|
export {
|
|
271
|
-
|
|
274
|
+
Et as Router
|
|
272
275
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Damped } from '../animation';
|
|
2
|
-
import { CustomElement } from '../custom-element';
|
|
3
2
|
import { Store } from '../store';
|
|
4
3
|
import { Axes2D, EasingFunction } from '../utils';
|
|
5
4
|
import { CSSProperty } from '../css-property';
|
|
@@ -13,7 +12,7 @@ export interface ScrollSetOptions {
|
|
|
13
12
|
duration: number;
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
|
-
export declare class ScrollElement extends
|
|
15
|
+
export declare class ScrollElement extends HTMLElement {
|
|
17
16
|
#private;
|
|
18
17
|
constructor();
|
|
19
18
|
get damped(): Damped;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { CustomElement } from '../custom-element';
|
|
2
1
|
import { ScrollElement } from './ScrollElement';
|
|
3
2
|
|
|
4
|
-
export declare class ScrollUserElement extends
|
|
3
|
+
export declare class ScrollUserElement extends HTMLElement {
|
|
5
4
|
#private;
|
|
6
5
|
get scrollElement(): ScrollElement;
|
|
7
6
|
protected connectedCallback(): void;
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ns=Object.defineProperty;var _s=Object.getOwnPropertySymbols;var Ks=Object.prototype.hasOwnProperty,Zs=Object.prototype.propertyIsEnumerable;var Ps=(r,e,i)=>e in r?Ns(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i,ks=(r,e)=>{for(var i in e||(e={}))Ks.call(e,i)&&Ps(r,i,e[i]);if(_s)for(var i of _s(e))Zs.call(e,i)&&Ps(r,i,e[i]);return r};var Es=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(Es(r,e,"read from private field"),i?i.call(r):e.get(r)),L=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},O=(r,e,i,n)=>(Es(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Et=require("../Store-Cr3VaD9G.cjs"),Js=require("../Derived-D9VrDuf9.cjs"),fs=require("../browser-CpzFX2xg.cjs"),Qs=require("../easings-DsS5-Kqc.cjs"),_t=require("../layout-8ryRAMGJ.cjs"),ds=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Me=require("../order/index.cjs"),zs=require("../Damped-Da3EnNN4.cjs"),Xs=require("../Tweened-DksN-Rz6.cjs"),De=require("../controls/index.cjs"),Pt=require("../custom-element/index.cjs"),fe=require("../window-resizer/index.cjs"),Nt=require("../scroll-entries/index.cjs"),A=require("../tags-CAfasCGV.cjs"),vs=require("../createStylesheet-BsMSWX0q.cjs"),Ws=require("../css-unit-parser/index.cjs"),u=require("../css-property/index.cjs"),Ys=require("../Viewport-BBYt1Ivy.cjs"),Qe=require("../element-resizer/index.cjs"),js=require("../gestures-DHLrn6Q8.cjs"),Ms=require("../theme/index.cjs"),ti=require("../dom-JBOkFLTh.cjs"),Vs=require("../function-MthRj-GJ.cjs");var C,xe,_,Ut,st,Ct;class ei{constructor(e,i,n){L(this,C,void 0);L(this,xe,void 0);L(this,_,void 0);L(this,Ut,0);L(this,st,0);L(this,Ct,null);O(this,C,e),O(this,xe,i),O(this,_,n),Nt.scrollEntries.register(o(this,C))}get index(){return o(this,xe)}get size(){return o(this,Ut)}get position(){return o(this,st)}destroy(){Nt.scrollEntries.unregister(o(this,C)),o(this,C).style.transform="",this.mark(null)}setSize(e){e?(o(this,C).style.setProperty("--size",e+"px"),o(this,_).axisCSSProperty.current==="x"?(o(this,C).style.width=e+"px",o(this,C).style.height=""):(o(this,C).style.height=e+"px",o(this,C).style.width="")):(o(this,C).style.width="",o(this,C).style.height="",o(this,C).style.removeProperty("--size"))}resize(){O(this,Ut,o(this,_).vertical?o(this,C).offsetHeight:o(this,C).offsetWidth),O(this,st,o(this,_).vertical?_t.getCumulativeOffsetTop(o(this,C)):_t.getCumulativeOffsetLeft(o(this,C))),O(this,st,o(this,st)-o(this,_).contentPosition)}transform(){let e=0;const i=o(this,_).viewportSize*o(this,_).sectionDistanceScaleCSSProperty.current;o(this,_).loopCSSProperty.current&&o(this,_).overscroll&&o(this,st)+o(this,Ut)<o(this,_).currentScrollValue&&(e=o(this,_).distance*-1-o(this,_).gap),Nt.scrollEntries.update(o(this,C),o(this,_).axisCSSProperty.current,e);const n=o(this,_).currentScrollValue+e,h=o(this,st)-o(this,_).viewportSize-i,c=o(this,st)+o(this,Ut)+i,S=ds.clamp(n,h,c);o(this,_).vertical?o(this,C).style.transform=`translate3d(0px, ${S*-1}px, 0px)`:o(this,C).style.transform=`translate3d(${S*-1}px, 0px, 0px)`}mark(e){o(this,Ct)!==e&&(o(this,Ct)&&o(this,C).classList.remove(o(this,Ct)),e&&o(this,C).classList.add(e),O(this,Ct,e),o(this,C).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,Ct)}})))}}C=new WeakMap,xe=new WeakMap,_=new WeakMap,Ut=new WeakMap,st=new WeakMap,Ct=new WeakMap;var si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(r,e,i,n)=>{for(var h=n>1?void 0:n?ii(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&si(e,i,h),h},ws=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(ws(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},m=(r,e,i,n)=>(ws(r,e,"write to private field"),e.set(r,i),i),v=(r,e,i)=>(ws(r,e,"access private method"),i),d,Zt,R,rt,nt,j,ht,Wt,Mt,Q,q,Jt,Qt,Xt,Yt,we,X,jt,xt,Y,qt,wt,Lt,te,ee,se,g,Xe,p,$e,Fe,W,y,I,tt,Bt,bt,$,P,be,zt,de,ve,Ee,ct,ce,We,Ht,ue,Ye,bs,je,ms,Re,ss,Te,is,B,ts,rs,Os,me,qe,Ie,ns,ut,It,Ae,hs;const ni=vs.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends Pt.CustomElement{constructor(){super(),a(this,ce),a(this,Ht),a(this,Ye),a(this,je),a(this,Re),a(this,Te),a(this,rs),a(this,Ie),a(this,ut),a(this,Ae),a(this,d,null),a(this,Zt,new u.CSSProperty(this,"--controls",!0)),a(this,R,new u.CSSProperty(this,"--axis","y")),a(this,rt,new u.CSSProperty(this,"--direction",0)),a(this,nt,new u.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,j,new u.CSSProperty(this,"--split",!1)),a(this,ht,new u.CSSProperty(this,"--sectional",!1)),a(this,Wt,new u.CSSProperty(this,"--auto-size",!1)),a(this,Mt,new u.CSSProperty(this,"--wheel-max-delta",!1)),a(this,Q,new u.CSSProperty(this,"--sections-in-view",1)),a(this,q,new u.CSSProperty(this,"--loop",!1)),a(this,Jt,new u.CSSProperty(this,"--damping",20)),a(this,Qt,new u.CSSProperty(this,"--mass",0)),a(this,Xt,new u.CSSProperty(this,"--stiffness",0)),a(this,Yt,new u.CSSProperty(this,"--mouse-drag",!1)),a(this,we,new u.CSSProperty(this,"--section-distance-scale",.5)),a(this,X,new u.CSSProperty(this,"--autoplay",0)),a(this,jt,new u.CSSProperty(this,"--autoplay-pause-duration",0)),a(this,xt,new u.CSSProperty(this,"--autoplay-user-direction",!1)),a(this,Y,new u.CSSProperty(this,"--classes",0)),a(this,qt,new u.CSSProperty(this,"--current-index-start-offset",0)),a(this,wt,new u.CSSProperty(this,"--current-index-end-offset",0)),a(this,Lt,new u.CSSProperty(this,"--focus-delay",0)),a(this,te,new u.CSSProperty(this,"--focus-duration",3e3)),a(this,ee,new u.CSSProperty(this,"--disabled",!1)),a(this,se,new u.CSSProperty(this,"--hibernated",!1)),a(this,g,null),a(this,Xe,null),a(this,p,[]),a(this,$e,0),a(this,Fe,0),a(this,W,0),a(this,y,0),a(this,I,0),a(this,tt,null),a(this,Bt,null),a(this,bt,null),a(this,$,null),a(this,P,new Et.Store(0)),a(this,be,0),a(this,zt,0),a(this,de,!0),a(this,ve,!0),a(this,Ee,void 0),a(this,ct,new Xs.Tweened),a(this,B,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,P).current;if(m(this,$e,this.vertical?_t.getCumulativeOffsetTop(this):_t.getCumulativeOffsetLeft(this)),m(this,Fe,this.vertical?_t.getCumulativeOffsetTop(t(this,g)):_t.getCumulativeOffsetLeft(t(this,g))),m(this,W,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?m(this,I,Ws.cssUnitParser.parse(getComputedStyle(t(this,g)).rowGap)):m(this,I,Ws.cssUnitParser.parse(getComputedStyle(t(this,g)).columnGap)),t(this,Wt).current&&t(this,p).length){const n=t(this,Q).current,h=(t(this,W)-t(this,I)*(n-1))/n;t(this,p).forEach(c=>{c.setSize(h)})}else t(this,p).forEach(n=>{n.setSize()});if(t(this,p).forEach(n=>{n.resize()}),t(this,nt).current){m(this,y,t(this,W)*t(this,nt).current);const n=t(this,y)+t(this,W);this.vertical?(t(this,g).style.width=n+"px",t(this,g).style.height="100%"):(t(this,g).style.height=n+"px",t(this,g).style.width="100%")}else this.vertical?(t(this,g).style.width="100%",t(this,g).style.height="max-content",m(this,y,t(this,g).offsetHeight-t(this,W))):(t(this,g).style.width="max-content",t(this,g).style.height="100%",m(this,y,t(this,g).offsetWidth-t(this,W)));if(!t(this,q).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);m(this,y,t(this,y)+h),t(this,d).max=t(this,y)}if(t(this,q).current&&t(this,p).length){const n=t(this,p)[t(this,p).length-1],h=n.position+n.size-t(this,W),c=t(this,y)-h;m(this,zt,n.position+n.size+c)}else m(this,zt,t(this,y));if(t(this,ht).current&&t(this,p).length){const n=t(this,p)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0})}),a(this,ts,()=>{const e=this.currentScrollValue;if(m(this,be,Math.max(0,e-t(this,y))),t(this,p).length){let i=0;for(let n=0;n<t(this,p).length;n++){const h=t(this,p)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,P).current=i}else this.vertical?t(this,g).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,g).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Nt.scrollEntries.update(this,t(this,R).current,e)}),a(this,me,(e,i)=>{t(this,Zt).current&&(t(this,xt).current&&(t(this,$).pauseAndContinue(t(this,jt).current),t(this,$).direction=Math.sign(i)||1),t(this,qe).call(this,e,i))}),a(this,qe,(e,i)=>{if(t(this,rt).current){if(t(this,rt).current<0&&i>0)return;if(t(this,rt).current>0&&i<0)return}if(t(this,ct).unlistenAnimationFrame(),!t(this,X).current&&t(this,Lt).current&&(clearInterval(t(this,Ee)),m(this,Ee,setTimeout(()=>{const n=v(this,Ae,hs).call(this);n&&this.scrollToSection(n.index,{tween:{duration:t(this,te).current,easing:Qs.easeInOutExpo}})},t(this,Lt).current))),!(e==="drag"&&!Ys.device.isMobile&&!t(this,Yt).current))if(t(this,ht).current){const n=Math.sign(i);t(this,p).length?this.shiftSections(n):t(this,d).shift(n*t(this,W))}else t(this,d).shift(i)}),fs.isBrowser&&(m(this,d,new zs.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.openShadow(ni),A.element(this,{tabIndex:0,children:[A.div({class:"static",children:[A.slot({name:"static"})]}),A.div({class:"content",children:[A.slot({ref:e=>m(this,Xe,e)})],style:{flexDirection:new Js.Derived(t(this,R),e=>e==="x"?"row":"column")},ref:e=>m(this,g,e)})]}),m(this,tt,new De.WheelControls({element:t(this,g)})),t(this,tt).changeEvent.subscribe(t(this,me)),m(this,Bt,new De.KeyboardControls({element:this})),t(this,Bt).changeEvent.subscribe(t(this,me)),m(this,bt,new De.DragControls({element:t(this,g)})),t(this,bt).changeEvent.subscribe(t(this,me)),m(this,$,new De.AutoplayControls({culling:this})),t(this,$).changeEvent.subscribe(t(this,qe)),t(this,R).subscribe(({current:e})=>{t(this,g).style.flexDirection=e==="x"?"row":"column",t(this,tt).axis=t(this,Mt).current?"max":e,t(this,Bt).dimension=e==="x"?"width":"height",t(this,bt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,B).call(this)}),t(this,Mt).subscribe(e=>{t(this,tt).axis=e.current?"max":t(this,R).current}),t(this,nt).subscribe(()=>{this.isConnected&&t(this,B).call(this)}),t(this,j).subscribe(({current:e})=>{this.isConnected&&(e?v(this,ce,We).call(this):v(this,Ht,ue).call(this))}),t(this,ht).subscribe(e=>{t(this,tt).debounce=e.current,t(this,bt).swipe=e.current,t(this,$).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,p).length?v(this,ce,We).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,Ht,ue).call(this))}),t(this,Wt).subscribe(e=>{this.isConnected&&(t(this,B).call(this),e.current&&!e.previous&&!t(this,p).length?v(this,ce,We).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,Ht,ue).call(this))}),t(this,Q).subscribe(e=>{this.isConnected&&(t(this,B).call(this),v(this,ut,It).call(this))}),t(this,q).subscribe(e=>{e.current?(this.isConnected&&(t(this,p).length||(t(this,j).current=!0)),t(this,p).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(m(this,be,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Jt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Qt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Xt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,ee).subscribe(e=>{e.current&&!e.previous?v(this,Ye,bs).call(this):!e.current&&e.previous&&v(this,je,ms).call(this)}),t(this,se).subscribe(e=>{e.current&&!e.previous?v(this,Re,ss).call(this):!e.current&&e.previous&&v(this,Te,is).call(this)}),t(this,X).subscribe(e=>{t(this,$).speed=e.current,e.current&&!e.previous?t(this,$).connect():!e.current&&e.previous&&t(this,$).disconnect()}),t(this,xt).subscribe(e=>{e.current||(t(this,$).direction=1)}),t(this,Y).subscribe(e=>{this.isConnected&&v(this,ut,It).call(this)}),t(this,qt).subscribe(e=>{this.isConnected&&t(this,Y).current&&v(this,ut,It).call(this)}),t(this,wt).subscribe(e=>{this.isConnected&&t(this,Y).current&&v(this,ut,It).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,p).length&&v(this,ut,It).call(this)}),t(this,ct).subscribe(e=>{t(this,ct).isRunning.current&&t(this,d).set(e.current)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Zt)}get axisCSSProperty(){return t(this,R)}get directionCSSProperty(){return t(this,rt)}get pagesCSSProperty(){return t(this,nt)}get splitCSSProperty(){return t(this,j)}get sectionalCSSProperty(){return t(this,ht)}get autoSizeCSSProperty(){return t(this,Wt)}get wheelMaxDeltaCSSProperty(){return t(this,Mt)}get sectionsInViewCSSProperty(){return t(this,Q)}get loopCSSProperty(){return t(this,q)}get dampingCSSProperty(){return t(this,Jt)}get massCSSProperty(){return t(this,Qt)}get stiffnessCSSProperty(){return t(this,Xt)}get mouseDragCSSProperty(){return t(this,Yt)}get sectionDistanceScaleCSSProperty(){return t(this,we)}get autoplayCSSProperty(){return t(this,X)}get autoplayPauseDurationCSSProperty(){return t(this,jt)}get autoplayUserDirectionCSSProperty(){return t(this,xt)}get classesCSSProperty(){return t(this,Y)}get currentIndexStartOffsetCSSProperty(){return t(this,qt)}get currentIndexEndOffsetCSSProperty(){return t(this,wt)}get focusDelayCSSProperty(){return t(this,Lt)}get focusDurationCSSProperty(){return t(this,te)}get disabledCSSProperty(){return t(this,ee)}get hibernatedCSSProperty(){return t(this,se)}get currentScrollValue(){return v(this,Ie,ns).call(this,"current")}get targetScrollValue(){return v(this,Ie,ns).call(this,"target")}get contentElement(){return t(this,g)}get sections(){return t(this,p)}get position(){return t(this,$e)}get contentPosition(){return t(this,Fe)}get viewportSize(){return t(this,W)}get scrollSize(){return t(this,y)}get gap(){return t(this,I)}get counter(){return t(this,P)}get limit(){return t(this,p).length-t(this,Q).current}get distance(){return t(this,zt)}get loopDistance(){return t(this,q).current?t(this,zt)+t(this,I):t(this,zt)}get overscroll(){return t(this,be)}get vertical(){return t(this,R).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,R).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,R).current==="x"?0:t(this,d).distance}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i){if(!t(this,p).length)return;const n=t(this,P).current;v(this,rs,Os).call(this,e);const h=t(this,p)[n],c=t(this,p)[t(this,P).current];if(h&&c){let S=0;const Oe=v(this,Ae,hs).call(this),Us=Oe?this.targetScrollValue-Oe.position:0;t(this,q).current?t(this,P).current===0&&n===t(this,p).length-1?S=t(this,y)+t(this,W)-h.position+t(this,I):t(this,P).current===t(this,p).length-1&&n===0?S=c.position-(t(this,y)+t(this,W)+t(this,I)):S=c.position-h.position:S=c.position-h.position,this.shiftPosition(S-Us,i)}}shiftSections(e,i){t(this,p).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){i!=null&&i.tween?(t(this,ct).set(t(this,d).current,{equalize:!0}),t(this,ct).set(e,ks({},i.tween))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}connectedCallback(){t(this,Zt).observe(),t(this,R).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,j).observe(),t(this,ht).observe(),t(this,Wt).observe(),t(this,Mt).observe(),t(this,Q).observe(),t(this,q).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,Xt).observe(),t(this,Yt).observe(),t(this,we).observe(),t(this,X).observe(),t(this,X).observe(),t(this,jt).observe(),t(this,xt).observe(),t(this,Y).observe(),t(this,qt).observe(),t(this,wt).observe(),t(this,Lt).observe(),t(this,te).observe(),t(this,ee).observe(),t(this,se).observe(),v(this,Te,is).call(this)}disconnectedCallback(){t(this,Zt).unobserve(),t(this,R).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,j).unobserve(),t(this,ht).unobserve(),t(this,Wt).unobserve(),t(this,Mt).unobserve(),t(this,Q).unobserve(),t(this,q).unobserve(),t(this,Jt).unobserve(),t(this,Qt).unobserve(),t(this,Xt).unobserve(),t(this,Yt).unobserve(),t(this,we).unobserve(),t(this,X).unobserve(),t(this,jt).unobserve(),t(this,xt).unobserve(),t(this,Y).unobserve(),t(this,qt).unobserve(),t(this,wt).unobserve(),t(this,Lt).unobserve(),t(this,te).unobserve(),t(this,ee).unobserve(),t(this,se).unobserve(),v(this,Re,ss).call(this)}};d=new WeakMap;Zt=new WeakMap;R=new WeakMap;rt=new WeakMap;nt=new WeakMap;j=new WeakMap;ht=new WeakMap;Wt=new WeakMap;Mt=new WeakMap;Q=new WeakMap;q=new WeakMap;Jt=new WeakMap;Qt=new WeakMap;Xt=new WeakMap;Yt=new WeakMap;we=new WeakMap;X=new WeakMap;jt=new WeakMap;xt=new WeakMap;Y=new WeakMap;qt=new WeakMap;wt=new WeakMap;Lt=new WeakMap;te=new WeakMap;ee=new WeakMap;se=new WeakMap;g=new WeakMap;Xe=new WeakMap;p=new WeakMap;$e=new WeakMap;Fe=new WeakMap;W=new WeakMap;y=new WeakMap;I=new WeakMap;tt=new WeakMap;Bt=new WeakMap;bt=new WeakMap;$=new WeakMap;P=new WeakMap;be=new WeakMap;zt=new WeakMap;de=new WeakMap;ve=new WeakMap;Ee=new WeakMap;ct=new WeakMap;ce=new WeakSet;We=function(){v(this,Ht,ue).call(this),t(this,Xe).assignedElements().forEach((r,e)=>{r instanceof HTMLElement&&t(this,p).push(new ei(r,e,this))}),t(this,g).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,B).call(this),v(this,ut,It).call(this)};Ht=new WeakSet;ue=function(){t(this,p).forEach(r=>{r.destroy()}),m(this,p,[]),t(this,P).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Ye=new WeakSet;bs=function(){t(this,de)||(m(this,de,!0),t(this,d).unsubscribe(t(this,ts)),t(this,d).unlistenAnimationFrame(),t(this,tt).disconnect(),t(this,Bt).disconnect(),t(this,bt).disconnect(),t(this,$).disconnect(),clearInterval(t(this,Ee)),t(this,ct).unlistenAnimationFrame())};je=new WeakSet;ms=function(){t(this,de)&&(m(this,de,!1),t(this,d).subscribe(t(this,ts)),t(this,tt).connect(),t(this,Bt).connect(),t(this,bt).connect(),t(this,X).current&&t(this,$).connect())};Re=new WeakSet;ss=function(){t(this,ve)||(m(this,ve,!0),fe.windowResizer.unsubscribe(t(this,B)),Qe.elementResizer.unsubscribe(t(this,B)),t(this,d).reset(),v(this,Ye,bs).call(this),t(this,g).style.transform="",t(this,j).current&&v(this,Ht,ue).call(this),Nt.scrollEntries.unregister(this))};Te=new WeakSet;is=function(){t(this,ve)&&(m(this,ve,!1),t(this,j).current&&v(this,ce,We).call(this),Nt.scrollEntries.register(this),fe.windowResizer.subscribe(t(this,B),Me.RESIZE_ORDER.SCROLL),Qe.elementResizer.subscribe(this,t(this,B)),v(this,je,ms).call(this))};B=new WeakMap;ts=new WeakMap;rs=new WeakSet;Os=function(r){t(this,q).current?(t(this,P).current=r%t(this,p).length,t(this,P).current=t(this,P).current<0?t(this,p).length+t(this,P).current:t(this,P).current):t(this,P).current=ds.clamp(r,0,this.limit)};me=new WeakMap;qe=new WeakMap;Ie=new WeakSet;ns=function(r="current"){if(t(this,q).current&&t(this,p).length){const e=t(this,d)[r]%(t(this,y)+t(this,W)+t(this,I));return e<0?t(this,y)+e+t(this,W)+t(this,I):e}else return t(this,d)[r]};ut=new WeakSet;It=function(){if(t(this,Y).current&&t(this,p).length){const r=t(this,P).current+t(this,qt).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,Q).current+t(this,wt).current;t(this,p).forEach((i,n)=>{const h=r-this.limit-1+t(this,wt).current,c=r+e,S=this.sections.length-c;n>=r&&n<c||n<=h?i.mark("current"):n>=c&&n<c+S/2||n<=h+e?i.mark("next"):i.mark("previous")})}};Ae=new WeakSet;hs=function(){let r=null,e=1/0;for(let i=0;i<t(this,p).length;i++){const n=Math.abs(t(this,p)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,p)[r]:null};exports.ScrollElement=ri([Pt.define("e-scroll")],exports.ScrollElement);var Le;class es extends Pt.CustomElement{constructor(){super(...arguments);L(this,Le,null)}get scrollElement(){return o(this,Le)}connectedCallback(){const i=ti.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?O(this,Le,i):console.error(this,"e-scroll not found")}}Le=new WeakMap;var hi=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ai=(r,e,i,n)=>{for(var h=n>1?void 0:n?oi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&hi(e,i,h),h},Ds=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},f=(r,e,i)=>(Ds(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},kt=(r,e,i,n)=>(Ds(r,e,"write to private field"),e.set(r,i),i),ge,T,ot,at,Ce,ye,ie,Be,He,Ge;const li=vs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:Ms.aptechkaTheme.colorFont.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:Ms.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends es{constructor(){super(),N(this,ge,null),N(this,T,null),N(this,ot,!1),N(this,at,0),N(this,Ce,0),N(this,ye,0),N(this,ie,()=>{kt(this,ot,this.offsetWidth>this.offsetHeight);const e=f(this,ot)?this.offsetWidth:this.offsetHeight;kt(this,at,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),kt(this,at,Math.max(f(this,at),30)),f(this,ot)?(f(this,T).style.width=f(this,at)+"px",f(this,T).style.height="100%"):(f(this,T).style.width="100%",f(this,T).style.height=f(this,at)+"px"),kt(this,Ce,e-f(this,at)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,Be,()=>{kt(this,ye,this.scrollElement.currentProgress*f(this,Ce)),f(this,ot)?f(this,T).style.transform=`translate3d(${f(this,ye)}px, 0px, 0px)`:f(this,T).style.transform=`translate3d(0px, ${f(this,ye)}px, 0px)`}),N(this,He,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,Ge,e=>{document.documentElement.classList.add("grabbing"),js.setupDrag(h=>{const c=f(this,ot)?h.x:h.y,S=this.scrollElement.distance/f(this,Ce),Oe=(c-n)*S;this.scrollElement.setPosition(i+Oe)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=f(this,ot)?e.x:e.y}),fs.isBrowser&&(this.openShadow(li),A.element(this,{slot:"static","drag-dead-zone":"",children:[A.slot({ref:e=>kt(this,ge,e),children:A.div({class:"default-thumb"})})]}))}get thumbElement(){return f(this,T)}connectedCallback(){super.connectedCallback();const e=f(this,ge).assignedElements()[0]||f(this,ge).firstElementChild;kt(this,T,e),f(this,T).addEventListener("pointerdown",f(this,Ge)),fe.windowResizer.subscribe(f(this,ie),Me.RESIZE_ORDER.SCROLL+1),Qe.elementResizer.subscribe(this,f(this,ie)),this.scrollElement.onScroll(f(this,Be)),this.scrollElement.axisCSSProperty.subscribe(f(this,He))}disconnectedCallback(){f(this,T).removeEventListener("pointerdown",f(this,Ge)),fe.windowResizer.unsubscribe(f(this,ie)),Qe.elementResizer.unsubscribe(f(this,ie)),this.scrollElement.offScroll(f(this,Be)),this.scrollElement.axisCSSProperty.unsubscribe(f(this,He))}};ge=new WeakMap;T=new WeakMap;ot=new WeakMap;at=new WeakMap;Ce=new WeakMap;ye=new WeakMap;ie=new WeakMap;Be=new WeakMap;He=new WeakMap;Ge=new WeakMap;exports.ScrollbarElement=ai([Pt.define("e-scrollbar")],exports.ScrollbarElement);const ci=vs.createStylesheet({button:{all:"inherit"}});class $s extends es{constructor(){super(),this.openShadow(ci),fs.isBrowser&&A.element(this,{children:[A.button({onClick:()=>{this.handleClick()},children:[A.slot()]})]})}}var ui=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,Si=(r,e,i,n)=>{for(var h=n>1?void 0:n?pi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ui(e,i,h),h};exports.ScrollSetButtonElement=class extends $s{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),{behaviour:i})}};exports.ScrollSetButtonElement=Si([Pt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var fi=Object.defineProperty,di=Object.getOwnPropertyDescriptor,vi=(r,e,i,n)=>{for(var h=n>1?void 0:n?di(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&fi(e,i,h),h};exports.ScrollStepButtonElement=class extends $s{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),{behaviour:i})}};exports.ScrollStepButtonElement=vi([Pt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var wi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,mi=(r,e,i,n)=>{for(var h=n>1?void 0:n?bi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&wi(e,i,h),h},Fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Kt=(r,e,i)=>(Fs(r,e,"read from private field"),i?i.call(r):e.get(r)),xs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Ls=(r,e,i,n)=>(Fs(r,e,"write to private field"),e.set(r,i),i),Vt,_e,it,yt,pe,ze,Ve,Se;class gi{constructor(e,i,n){L(this,it,void 0);L(this,yt,void 0);L(this,pe,void 0);L(this,ze,void 0);L(this,Ve,()=>{o(this,yt).scrollToSection(o(this,pe),{behaviour:o(this,ze)})});L(this,Se,()=>{o(this,it).classList.toggle("current",o(this,yt).counter.current===o(this,pe))});O(this,it,document.createElement("button")),O(this,yt,e),O(this,ze,n),O(this,pe,i),o(this,it).addEventListener("click",o(this,Ve)),o(this,yt).counter.subscribe(o(this,Se)),o(this,Se).call(this)}get element(){return o(this,it)}destroy(){o(this,it).removeEventListener("click",o(this,Ve)),o(this,yt).counter.unsubscribe(o(this,Se)),o(this,it).remove()}}it=new WeakMap,yt=new WeakMap,pe=new WeakMap,ze=new WeakMap,Ve=new WeakMap,Se=new WeakMap;exports.ScrollBulletButtonsElement=class extends es{constructor(){super(...arguments),xs(this,Vt,[]),xs(this,_e,Vs.debounce(()=>{Kt(this,Vt).forEach(e=>e.destroy()),Ls(this,Vt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new gi(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Kt(this,Vt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Kt(this,_e)),Kt(this,_e).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Kt(this,_e)),Kt(this,Vt).forEach(e=>e.destroy()),Ls(this,Vt,[])}};Vt=new WeakMap;_e=new WeakMap;exports.ScrollBulletButtonsElement=mi([Pt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Ci=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,_i=(r,e,i,n)=>{for(var h=n>1?void 0:n?yi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ci(e,i,h),h},gs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(gs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},b=(r,e,i,n)=>(gs(r,e,"write to private field"),e.set(r,i),i),E=(r,e,i)=>(gs(r,e,"access private method"),i),re,ne,he,oe,Ot,Dt,$t,Ft,F,H,G,U,At,x,pt,St,ft,dt,vt,M,J,Z,mt,gt,et,Ue,w,ae,le,Ne,z,Rt,D,V,K,Pe,Gt,k,os,Rs,as,Ts,ls,qs,cs,Is,us,As,ps,Bs,Ke,ke,lt,Tt,Cs,Hs,ys,Gs,Ze,Ss,Je;exports.ScrollSegmentElement=class extends es{constructor(){super(),l(this,os),l(this,as),l(this,ls),l(this,cs),l(this,us),l(this,ps),l(this,lt),l(this,Cs),l(this,ys),l(this,Ze),l(this,re,new u.CSSProperty(this,"--damping",20)),l(this,ne,new u.CSSProperty(this,"--mass",0)),l(this,he,new u.CSSProperty(this,"--stiffness",0)),l(this,oe,new u.CSSProperty(this,"--target","")),l(this,Ot,new u.CSSProperty(this,"--disabled",!1)),l(this,Dt,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),l(this,$t,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),l(this,Ft,new u.CSSProperty(this,"--capture-once",!1)),l(this,F,new u.CSSProperty(this,"--captured","")),l(this,H,new u.CSSProperty(this,"--released","")),l(this,G,new u.CSSProperty(this,"--captured-from-start","")),l(this,U,new u.CSSProperty(this,"--captured-from-finish","")),l(this,At,new u.CSSProperty(this,"--released-from-start","")),l(this,x,new u.CSSProperty(this,"--released-from-finish","")),l(this,pt,new u.CSSProperty(this,"--passed-var","")),l(this,St,new u.CSSProperty(this,"--progress-var","")),l(this,ft,new u.CSSProperty(this,"--distance-var","")),l(this,dt,new u.CSSProperty(this,"--start-var","")),l(this,vt,new u.CSSProperty(this,"--finish-var","")),l(this,M,new Et.Store(!1)),l(this,J,new Et.Store(!1)),l(this,Z,new Et.Store(!1)),l(this,mt,new Et.Store(!1)),l(this,gt,new Et.Store(!1)),l(this,et,new Et.Store(!1)),l(this,Ue,[]),l(this,w,this),l(this,ae,0),l(this,le,0),l(this,Ne,0),l(this,z,new zs.Damped(0,{order:Me.TICK_ORDER.SCROLL-1,min:0,max:1})),l(this,Rt,0),l(this,D,0),l(this,V,0),l(this,K,0),l(this,Pe,!1),l(this,Gt,!1),l(this,k,!0),l(this,Ke,()=>{s(this,k)||(this.resize(),s(this,ke).call(this))}),l(this,ke,()=>{!s(this,k)&&s(this,Pe)&&this.tick()}),l(this,Je,Vs.debounce(()=>{const e=Nt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),b(this,Ue,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,Dt)}get startOffsetCSSProperty(){return s(this,$t)}get captureOnceCSSProperty(){return s(this,Ft)}get capturedCSSProperty(){return s(this,F)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,At)}get releasedFromFinishCSSProperty(){return s(this,x)}get passedVarCSSProperty(){return s(this,pt)}get progressVarCSSProperty(){return s(this,St)}get distanceVarCSSProperty(){return s(this,ft)}get startVarCSSProperty(){return s(this,dt)}get finishVarCSSProperty(){return s(this,vt)}get disabledCSSProperty(){return s(this,Ot)}get dampingCSSProperty(){return s(this,re)}get massCSSProperty(){return s(this,ne)}get stiffnessCSSProperty(){return s(this,he)}get targetCSSProperty(){return s(this,oe)}get isCaptured(){return s(this,M)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,Z)}get isReleasedFromStart(){return s(this,mt)}get isCapturedFromFinish(){return s(this,gt)}get isReleasedFromFinish(){return s(this,et)}get directionPosition(){return s(this,ae)}get directionSize(){return s(this,le)}get passed(){return s(this,z)}get progress(){return s(this,Rt)}get start(){return s(this,D)}get finish(){return s(this,K)}get distance(){return s(this,V)}get isCapturedOnce(){return s(this,Gt)}get isDisabled(){return s(this,k)}resize(){b(this,le,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),b(this,ae,this.scrollElement.vertical?_t.getCumulativeOffsetTop(this,this.scrollElement):_t.getCumulativeOffsetLeft(this,this.scrollElement)),b(this,D,this.getStart()),b(this,V,this.getDistance()),b(this,D,s(this,D)+s(this,$t).current),b(this,V,s(this,V)+s(this,Dt).current),b(this,K,s(this,D)+s(this,V)),this.scrollElement.currentScrollValue>s(this,K)&&!s(this,M).current&&!s(this,J).current&&(s(this,M).current=!0),this.setVar(s(this,dt).current,s(this,D)),this.setVar(s(this,vt).current,s(this,K)),this.setVar(s(this,ft).current,s(this,V)),s(this,z).max=s(this,V),b(this,Pe,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,Ue).forEach(n=>{e+=n.value}),s(this,z).set(e-s(this,D));const i=Math.round(e);s(this,M).current&&(i>s(this,D)?s(this,Z).current||E(this,ls,qs).call(this):s(this,Z).current&&!s(this,mt).current&&E(this,us,As).call(this),i<s(this,K)?s(this,et).current&&!s(this,gt).current&&E(this,cs,Is).call(this):s(this,Z).current&&!s(this,et).current&&E(this,ps,Bs).call(this)),i>s(this,D)&&i<s(this,K)?s(this,M).current||E(this,os,Rs).call(this):s(this,M).current&&(s(this,z).set(ds.step(s(this,V)/2,s(this,z).current,0,s(this,V))),E(this,as,Ts).call(this)),s(this,Gt)&&s(this,Ft).current&&(s(this,F).current&&s(this,w).classList.add(s(this,F).current),b(this,k,!0))}disable(){this.style.cssText="",b(this,ae,0),b(this,le,0),s(this,z).reset(),b(this,Rt,0),b(this,D,0),b(this,V,0),b(this,K,0),b(this,Pe,!1),s(this,M).current=!1,s(this,J).current=!1,s(this,Z).current=!1,s(this,mt).current=!1,s(this,gt).current=!1,s(this,et).current=!1,b(this,Gt,!1),b(this,k,!0),E(this,Ze,Ss).call(this)}enable(){b(this,k,!1)}connectedCallback(){super.connectedCallback(),s(this,re).observe(),s(this,ne).observe(),s(this,he).observe(),s(this,oe).observe(),s(this,Ot).observe(),s(this,Dt).observe(),s(this,$t).observe(),s(this,Ft).observe(),s(this,F).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,At).observe(),s(this,x).observe(),s(this,pt).observe(),s(this,St).observe(),s(this,ft).observe(),s(this,dt).observe(),s(this,vt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,Je)),s(this,Je).call(this),s(this,Ot).current||this.enable(),s(this,re).subscribe(i=>{s(this,z).damping=i.current}),s(this,ne).subscribe(i=>{s(this,z).mass=i.current}),s(this,he).subscribe(i=>{s(this,z).stiffness=i.current}),s(this,oe).subscribe(i=>{i.previous&&E(this,Ze,Ss).call(this),i.current?i.current==="parent"?b(this,w,this.parentElement||this):b(this,w,document.querySelector(i.current)||this):b(this,w,this)}),s(this,Ot).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,$t).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,Dt).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,F).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,G).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,U).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,H).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,At).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,x).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,Ft).subscribe(i=>{s(this,k)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,pt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,this.passed.current))}),s(this,St).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,Rt)))}),s(this,dt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,D)))}),s(this,vt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,K)))}),s(this,ft).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,V)))}),s(this,z).subscribe(i=>{b(this,Rt,s(this,z).current/s(this,V)||0),this.setVar(s(this,pt).current,s(this,z).current.toFixed(6)),this.setVar(s(this,St).current,s(this,Rt).toFixed(6))}),fe.windowResizer.subscribe(s(this,Ke),Me.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,ke)),e=!0}disconnectedCallback(){fe.windowResizer.unsubscribe(s(this,Ke)),this.scrollElement.offScroll(s(this,ke)),s(this,re).close(),s(this,ne).close(),s(this,he).close(),s(this,oe).close(),s(this,Ot).close(),s(this,Dt).close(),s(this,$t).close(),s(this,Ft).close(),s(this,F).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,At).close(),s(this,x).close(),s(this,pt).close(),s(this,St).close(),s(this,ft).close(),s(this,dt).close(),s(this,vt).close(),s(this,M).close(),s(this,J).close(),s(this,Z).close(),s(this,mt).close(),s(this,gt).close(),s(this,et).close(),this.disable()}removeVar(e){e&&s(this,w).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,w).style.setProperty(`--${e}`,i.toString())}getDistance(){return s(this,le)+s(this,Ne)}getStart(){return s(this,ae)-s(this,Ne)}};re=new WeakMap;ne=new WeakMap;he=new WeakMap;oe=new WeakMap;Ot=new WeakMap;Dt=new WeakMap;$t=new WeakMap;Ft=new WeakMap;F=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;At=new WeakMap;x=new WeakMap;pt=new WeakMap;St=new WeakMap;ft=new WeakMap;dt=new WeakMap;vt=new WeakMap;M=new WeakMap;J=new WeakMap;Z=new WeakMap;mt=new WeakMap;gt=new WeakMap;et=new WeakMap;Ue=new WeakMap;w=new WeakMap;ae=new WeakMap;le=new WeakMap;Ne=new WeakMap;z=new WeakMap;Rt=new WeakMap;D=new WeakMap;V=new WeakMap;K=new WeakMap;Pe=new WeakMap;Gt=new WeakMap;k=new WeakMap;os=new WeakSet;Rs=function(){s(this,M).current=!0,s(this,J).current=!1,b(this,Gt,!0),s(this,H).current&&s(this,w).classList.remove(s(this,H).current),s(this,x).current&&s(this,w).classList.remove(s(this,x).current),s(this,x).current&&s(this,w).classList.remove(s(this,x).current),s(this,F).current&&s(this,w).classList.add(s(this,F).current)};as=new WeakSet;Ts=function(){s(this,J).current=!0,s(this,M).current=!1,b(this,Gt,!0),s(this,F).current&&s(this,w).classList.remove(s(this,F).current),s(this,G).current&&s(this,w).classList.remove(s(this,G).current),s(this,U).current&&s(this,w).classList.remove(s(this,U).current),s(this,H).current&&s(this,w).classList.add(s(this,H).current)};ls=new WeakSet;qs=function(){s(this,M).current=!0,s(this,Z).current=!0,s(this,mt).current=!1,s(this,G).current&&s(this,w).classList.add(s(this,G).current)};cs=new WeakSet;Is=function(){s(this,M).current=!0,s(this,gt).current=!0,s(this,et).current=!1,s(this,U).current&&s(this,w).classList.add(s(this,U).current)};us=new WeakSet;As=function(){s(this,J).current=!0,s(this,mt).current=!0,s(this,Z).current=!1,s(this,x).current&&s(this,w).classList.add(s(this,x).current)};ps=new WeakSet;Bs=function(){s(this,J).current=!0,s(this,et).current=!0,s(this,gt).current=!1,s(this,x).current&&s(this,w).classList.add(s(this,x).current)};Ke=new WeakMap;ke=new WeakMap;lt=new WeakSet;Tt=function(r){if(s(this,k)){r.previous&&s(this,w).classList.remove(r.previous),r.current&&s(this,w).classList.remove(r.current);return}r.current&&s(this,M).current?(r.previous&&s(this,w).classList.remove(r.previous),s(this,w).classList.add(r.current)):!r.current&&r.previous&&s(this,w).classList.remove(r.previous)};Cs=new WeakSet;Hs=function(...r){r.forEach(e=>{e&&s(this,w).classList.remove(e)})};ys=new WeakSet;Gs=function(...r){r.forEach(e=>{e&&s(this,w).style.removeProperty(`--${e}`)})};Ze=new WeakSet;Ss=function(){E(this,Cs,Hs).call(this,s(this,F).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,At).current,s(this,x).current),E(this,ys,Gs).call(this,s(this,pt).current,s(this,St).current,s(this,ft).current,s(this,dt).current,s(this,vt).current)};Je=new WeakMap;exports.ScrollSegmentElement=_i([Pt.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
|
1
|
+
"use strict";var Is=Object.defineProperty;var Ss=Object.getOwnPropertySymbols;var Ts=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable;var ds=(S,n,s)=>n in S?Is(S,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):S[n]=s,ps=(S,n)=>{for(var s in n||(n={}))Ts.call(n,s)&&ds(S,s,n[s]);if(Ss)for(var s of Ss(n))Ms.call(n,s)&&ds(S,s,n[s]);return S};var es=(S,n,s)=>{if(!n.has(S))throw TypeError("Cannot "+s)};var t=(S,n,s)=>(es(S,n,"read from private field"),s?s.call(S):n.get(S)),i=(S,n,s)=>{if(n.has(S))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(S):n.set(S,s)},r=(S,n,s,e)=>(es(S,n,"write to private field"),e?e.call(S,s):n.set(S,s),s);var o=(S,n,s)=>(es(S,n,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Dt=require("../Store-Cr3VaD9G.cjs"),As=require("../Derived-D9VrDuf9.cjs"),ls=require("../browser-CpzFX2xg.cjs"),Bs=require("../easings-DsS5-Kqc.cjs"),Rt=require("../layout-8ryRAMGJ.cjs"),us=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const ge=require("../order/index.cjs"),ms=require("../Damped-Da3EnNN4.cjs"),_s=require("../Tweened-DksN-Rz6.cjs"),$e=require("../controls/index.cjs"),be=require("../window-resizer/index.cjs"),ee=require("../scroll-entries/index.cjs"),H=require("../tags-BosXYPYv.cjs"),as=require("../createStylesheet-9nksoWW0.cjs"),fs=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),Hs=require("../Viewport-BBYt1Ivy.cjs"),We=require("../element-resizer/index.cjs"),$s=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Ws=require("../dom-JBOkFLTh.cjs"),gs=require("../function-MthRj-GJ.cjs");var f,ye,y,It,Z,dt;class Us{constructor(n,s,e){i(this,f,void 0);i(this,ye,void 0);i(this,y,void 0);i(this,It,0);i(this,Z,0);i(this,dt,null);r(this,f,n),r(this,ye,s),r(this,y,e),ee.scrollEntries.register(t(this,f))}get index(){return t(this,ye)}get size(){return t(this,It)}get position(){return t(this,Z)}destroy(){ee.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,It,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,Z,t(this,y).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),r(this,Z,t(this,Z)-t(this,y).contentPosition)}transform(){let n=0;const s=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,Z)+t(this,It)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),ee.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const e=t(this,y).currentScrollValue+n,h=t(this,Z)-t(this,y).viewportSize-s,u=t(this,Z)+t(this,It)+s,b=us.clamp(e,h,u);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(n){t(this,dt)!==n&&(t(this,dt)&&t(this,f).classList.remove(t(this,dt)),n&&t(this,f).classList.add(n),r(this,dt,n),t(this,f).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,dt)}})))}}f=new WeakMap,ye=new WeakMap,y=new WeakMap,It=new WeakMap,Z=new WeakMap,dt=new WeakMap;const Gs=as.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Tt,V,j,J,$,Q,pt,ft,W,F,Mt,At,Bt,_t,re,U,Ht,bt,G,mt,X,gt,$t,Wt,Ut,p,Ce,l,ve,Pe,v,m,O,K,yt,Y,x,g,he,Ct,Gt,Kt,ne,tt,Nt,me,vt,ie,we,ss,Ee,is,xe,rs,Le,hs,q,ze,Ge,ys,oe,Ve,Fe,ns,et,Ot,ke,os;class Ue extends HTMLElement{constructor(){super();i(this,Nt);i(this,vt);i(this,we);i(this,Ee);i(this,xe);i(this,Le);i(this,Ge);i(this,Fe);i(this,et);i(this,ke);i(this,a,null);i(this,Tt,new c.CSSProperty(this,"--controls",!0));i(this,V,new c.CSSProperty(this,"--axis","y"));i(this,j,new c.CSSProperty(this,"--direction",0));i(this,J,new c.CSSProperty(this,"--pages",0,{validate:s=>Math.max(0,s-1)}));i(this,$,new c.CSSProperty(this,"--split",!1));i(this,Q,new c.CSSProperty(this,"--sectional",!1));i(this,pt,new c.CSSProperty(this,"--auto-size",!1));i(this,ft,new c.CSSProperty(this,"--wheel-max-delta",!1));i(this,W,new c.CSSProperty(this,"--sections-in-view",1));i(this,F,new c.CSSProperty(this,"--loop",!1));i(this,Mt,new c.CSSProperty(this,"--damping",20));i(this,At,new c.CSSProperty(this,"--mass",0));i(this,Bt,new c.CSSProperty(this,"--stiffness",0));i(this,_t,new c.CSSProperty(this,"--mouse-drag",!1));i(this,re,new c.CSSProperty(this,"--section-distance-scale",.5));i(this,U,new c.CSSProperty(this,"--autoplay",0));i(this,Ht,new c.CSSProperty(this,"--autoplay-pause-duration",0));i(this,bt,new c.CSSProperty(this,"--autoplay-user-direction",!1));i(this,G,new c.CSSProperty(this,"--classes",0));i(this,mt,new c.CSSProperty(this,"--current-index-start-offset",0));i(this,X,new c.CSSProperty(this,"--current-index-end-offset",0));i(this,gt,new c.CSSProperty(this,"--focus-delay",0));i(this,$t,new c.CSSProperty(this,"--focus-duration",3e3));i(this,Wt,new c.CSSProperty(this,"--disabled",!1));i(this,Ut,new c.CSSProperty(this,"--hibernated",!1));i(this,p,null);i(this,Ce,null);i(this,l,[]);i(this,ve,0);i(this,Pe,0);i(this,v,0);i(this,m,0);i(this,O,0);i(this,K,null);i(this,yt,null);i(this,Y,null);i(this,x,null);i(this,g,new Dt.Store(0));i(this,he,0);i(this,Ct,0);i(this,Gt,!0);i(this,Kt,!0);i(this,ne,void 0);i(this,tt,new _s.Tweened);i(this,q,()=>{t(this,a).unlistenAnimationFrame();const s=this.currentScrollValue/t(this,m)||0,e=t(this,g).current;if(r(this,ve,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),r(this,Pe,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),r(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,pt).current&&t(this,l).length){const h=t(this,W).current,u=(t(this,v)-t(this,O)*(h-1))/h;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(h=>{h.setSize()});if(t(this,l).forEach(h=>{h.resize()}),t(this,J).current){r(this,m,t(this,v)*t(this,J).current);const h=t(this,m)+t(this,v);this.vertical?(t(this,p).style.width=h+"px",t(this,p).style.height="100%"):(t(this,p).style.height=h+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,v)));if(!t(this,F).current){const h=getComputedStyle(this),u=this.vertical?parseFloat(h.paddingBlockStart)+parseFloat(h.paddingBlockEnd):parseFloat(h.paddingInlineStart)+parseFloat(h.paddingInlineEnd);r(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,F).current&&t(this,l).length){const h=t(this,l)[t(this,l).length-1],u=h.position+h.size-t(this,v),b=t(this,m)-u;r(this,Ct,h.position+h.size+b)}else r(this,Ct,t(this,m));if(t(this,Q).current&&t(this,l).length){const h=t(this,l)[e];t(this,a).set(h.position,{equalize:!0})}else t(this,a).set(s*t(this,m),{equalize:!0})});i(this,ze,()=>{const s=this.currentScrollValue;if(r(this,he,Math.max(0,s-t(this,m))),t(this,l).length){let e=0;for(let h=0;h<t(this,l).length;h++){const u=t(this,l)[h];u.transform(),this.targetScrollValue+u.size/2>=u.position&&(e=h)}t(this,g).current=e}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;ee.scrollEntries.update(this,t(this,V).current,s)});i(this,oe,(s,e)=>{t(this,Tt).current&&(t(this,bt).current&&(t(this,x).pauseAndContinue(t(this,Ht).current),t(this,x).direction=Math.sign(e)||1),t(this,Ve).call(this,s,e))});i(this,Ve,(s,e)=>{if(t(this,j).current){if(t(this,j).current<0&&e>0)return;if(t(this,j).current>0&&e<0)return}if(t(this,tt).unlistenAnimationFrame(),!t(this,U).current&&t(this,gt).current&&(clearInterval(t(this,ne)),r(this,ne,setTimeout(()=>{const h=o(this,ke,os).call(this);h&&this.scrollToSection(h.index,{tween:{duration:t(this,$t).current,easing:Bs.easeInOutExpo}})},t(this,gt).current))),!(s==="drag"&&!Hs.device.isMobile&&!t(this,_t).current))if(t(this,Q).current){const h=Math.sign(e);t(this,l).length?this.shiftSections(h):t(this,a).shift(h*t(this,v))}else t(this,a).shift(e)});ls.isBrowser&&(r(this,a,new ms.Damped(0,{damping:.01,min:0,order:ge.TICK_ORDER.SCROLL})),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Gs),H.element(this,{tabIndex:0,children:[H.div({class:"static",children:[H.slot({name:"static"})]}),H.div({class:"content",children:[H.slot({ref:e=>r(this,Ce,e)})],style:{flexDirection:new As.Derived(t(this,V),e=>e==="x"?"row":"column")},ref:e=>r(this,p,e)})]}),r(this,K,new $e.WheelControls({element:t(this,p)})),t(this,K).changeEvent.subscribe(t(this,oe)),r(this,yt,new $e.KeyboardControls({element:this})),t(this,yt).changeEvent.subscribe(t(this,oe)),r(this,Y,new $e.DragControls({element:t(this,p)})),t(this,Y).changeEvent.subscribe(t(this,oe)),r(this,x,new $e.AutoplayControls({culling:this})),t(this,x).changeEvent.subscribe(t(this,Ve)),t(this,V).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,K).axis=t(this,ft).current?"max":e,t(this,yt).dimension=e==="x"?"width":"height",t(this,Y).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,q).call(this)}),t(this,ft).subscribe(e=>{t(this,K).axis=e.current?"max":t(this,V).current}),t(this,J).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:e})=>{this.isConnected&&(e?o(this,Nt,me).call(this):o(this,vt,ie).call(this))}),t(this,Q).subscribe(e=>{t(this,K).debounce=e.current,t(this,Y).swipe=e.current,t(this,x).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,pt).subscribe(e=>{this.isConnected&&(t(this,q).call(this),e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,W).subscribe(e=>{this.isConnected&&(t(this,q).call(this),o(this,et,Ot).call(this))}),t(this,F).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,$).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(r(this,he,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Mt).subscribe(e=>{t(this,a).damping=e.current}),t(this,At).subscribe(e=>{t(this,a).mass=e.current}),t(this,Bt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,Wt).subscribe(e=>{e.current&&!e.previous?o(this,we,ss).call(this):!e.current&&e.previous&&o(this,Ee,is).call(this)}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?o(this,xe,rs).call(this):!e.current&&e.previous&&o(this,Le,hs).call(this)}),t(this,U).subscribe(e=>{t(this,x).speed=e.current,e.current&&!e.previous?t(this,x).connect():!e.current&&e.previous&&t(this,x).disconnect()}),t(this,bt).subscribe(e=>{e.current||(t(this,x).direction=1)}),t(this,G).subscribe(e=>{this.isConnected&&o(this,et,Ot).call(this)}),t(this,mt).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,X).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,l).length&&o(this,et,Ot).call(this)}),t(this,tt).subscribe(e=>{t(this,tt).isRunning.current&&t(this,a).set(e.current)}))}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Tt)}get axisCSSProperty(){return t(this,V)}get directionCSSProperty(){return t(this,j)}get pagesCSSProperty(){return t(this,J)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,Q)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,W)}get loopCSSProperty(){return t(this,F)}get dampingCSSProperty(){return t(this,Mt)}get massCSSProperty(){return t(this,At)}get stiffnessCSSProperty(){return t(this,Bt)}get mouseDragCSSProperty(){return t(this,_t)}get sectionDistanceScaleCSSProperty(){return t(this,re)}get autoplayCSSProperty(){return t(this,U)}get autoplayPauseDurationCSSProperty(){return t(this,Ht)}get autoplayUserDirectionCSSProperty(){return t(this,bt)}get classesCSSProperty(){return t(this,G)}get currentIndexStartOffsetCSSProperty(){return t(this,mt)}get currentIndexEndOffsetCSSProperty(){return t(this,X)}get focusDelayCSSProperty(){return t(this,gt)}get focusDurationCSSProperty(){return t(this,$t)}get disabledCSSProperty(){return t(this,Wt)}get hibernatedCSSProperty(){return t(this,Ut)}get currentScrollValue(){return o(this,Fe,ns).call(this,"current")}get targetScrollValue(){return o(this,Fe,ns).call(this,"target")}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,ve)}get contentPosition(){return t(this,Pe)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,m)}get gap(){return t(this,O)}get counter(){return t(this,g)}get limit(){return t(this,l).length-t(this,W).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,F).current?t(this,Ct)+t(this,O):t(this,Ct)}get overscroll(){return t(this,he)}get vertical(){return t(this,V).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,V).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,V).current==="x"?0:t(this,a).distance}onScroll(...s){return t(this,a).subscribe(...s)}offScroll(...s){t(this,a).unsubscribe(...s)}range(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(s,e,h=0){return Math.sin(this.range(s,e,h)*Math.PI)}visible(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(s,e){if(!t(this,l).length)return;const h=t(this,g).current;o(this,Ge,ys).call(this,s);const u=t(this,l)[h],b=t(this,l)[t(this,g).current];if(u&&b){let D=0;const se=o(this,ke,os).call(this),qs=se?this.targetScrollValue-se.position:0;t(this,F).current?t(this,g).current===0&&h===t(this,l).length-1?D=t(this,m)+t(this,v)-u.position+t(this,O):t(this,g).current===t(this,l).length-1&&h===0?D=b.position-(t(this,m)+t(this,v)+t(this,O)):D=b.position-u.position:D=b.position-u.position,this.shiftPosition(D-qs,e)}}shiftSections(s,e){t(this,l).length&&this.scrollToSection(t(this,g).current+s,e)}setPosition(s,e){e!=null&&e.tween?(t(this,tt).set(t(this,a).current,{equalize:!0}),t(this,tt).set(s,ps({},e.tween))):t(this,a).set(s,{equalize:(e==null?void 0:e.behaviour)==="instant"})}shiftPosition(s,e){this.setPosition(t(this,a).target+s,e)}connectedCallback(){t(this,Tt).observe(),t(this,V).observe(),t(this,j).observe(),t(this,J).observe(),t(this,$).observe(),t(this,Q).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,W).observe(),t(this,F).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,_t).observe(),t(this,re).observe(),t(this,U).observe(),t(this,U).observe(),t(this,Ht).observe(),t(this,bt).observe(),t(this,G).observe(),t(this,mt).observe(),t(this,X).observe(),t(this,gt).observe(),t(this,$t).observe(),t(this,Wt).observe(),t(this,Ut).observe(),o(this,Le,hs).call(this)}disconnectedCallback(){t(this,Tt).unobserve(),t(this,V).unobserve(),t(this,j).unobserve(),t(this,J).unobserve(),t(this,$).unobserve(),t(this,Q).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,W).unobserve(),t(this,F).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,_t).unobserve(),t(this,re).unobserve(),t(this,U).unobserve(),t(this,Ht).unobserve(),t(this,bt).unobserve(),t(this,G).unobserve(),t(this,mt).unobserve(),t(this,X).unobserve(),t(this,gt).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),t(this,Ut).unobserve(),o(this,xe,rs).call(this)}}a=new WeakMap,Tt=new WeakMap,V=new WeakMap,j=new WeakMap,J=new WeakMap,$=new WeakMap,Q=new WeakMap,pt=new WeakMap,ft=new WeakMap,W=new WeakMap,F=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,_t=new WeakMap,re=new WeakMap,U=new WeakMap,Ht=new WeakMap,bt=new WeakMap,G=new WeakMap,mt=new WeakMap,X=new WeakMap,gt=new WeakMap,$t=new WeakMap,Wt=new WeakMap,Ut=new WeakMap,p=new WeakMap,Ce=new WeakMap,l=new WeakMap,ve=new WeakMap,Pe=new WeakMap,v=new WeakMap,m=new WeakMap,O=new WeakMap,K=new WeakMap,yt=new WeakMap,Y=new WeakMap,x=new WeakMap,g=new WeakMap,he=new WeakMap,Ct=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,ne=new WeakMap,tt=new WeakMap,Nt=new WeakSet,me=function(){o(this,vt,ie).call(this),t(this,Ce).assignedElements().forEach((s,e)=>{s instanceof HTMLElement&&t(this,l).push(new Us(s,e,this))}),t(this,p).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,q).call(this),o(this,et,Ot).call(this)},vt=new WeakSet,ie=function(){t(this,l).forEach(s=>{s.destroy()}),r(this,l,[]),t(this,g).current=0,t(this,a).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},we=new WeakSet,ss=function(){t(this,Gt)||(r(this,Gt,!0),t(this,a).unsubscribe(t(this,ze)),t(this,a).unlistenAnimationFrame(),t(this,K).disconnect(),t(this,yt).disconnect(),t(this,Y).disconnect(),t(this,x).disconnect(),clearInterval(t(this,ne)),t(this,tt).unlistenAnimationFrame())},Ee=new WeakSet,is=function(){t(this,Gt)&&(r(this,Gt,!1),t(this,a).subscribe(t(this,ze)),t(this,K).connect(),t(this,yt).connect(),t(this,Y).connect(),t(this,U).current&&t(this,x).connect())},xe=new WeakSet,rs=function(){t(this,Kt)||(r(this,Kt,!0),be.windowResizer.unsubscribe(t(this,q)),We.elementResizer.unsubscribe(t(this,q)),t(this,a).reset(),o(this,we,ss).call(this),t(this,p).style.transform="",t(this,$).current&&o(this,vt,ie).call(this),ee.scrollEntries.unregister(this))},Le=new WeakSet,hs=function(){t(this,Kt)&&(r(this,Kt,!1),t(this,$).current&&o(this,Nt,me).call(this),ee.scrollEntries.register(this),be.windowResizer.subscribe(t(this,q),ge.RESIZE_ORDER.SCROLL),We.elementResizer.subscribe(this,t(this,q)),o(this,Ee,is).call(this))},q=new WeakMap,ze=new WeakMap,Ge=new WeakSet,ys=function(s){t(this,F).current?(t(this,g).current=s%t(this,l).length,t(this,g).current=t(this,g).current<0?t(this,l).length+t(this,g).current:t(this,g).current):t(this,g).current=us.clamp(s,0,this.limit)},oe=new WeakMap,Ve=new WeakMap,Fe=new WeakSet,ns=function(s="current"){if(t(this,F).current&&t(this,l).length){const e=t(this,a)[s]%(t(this,m)+t(this,v)+t(this,O));return e<0?t(this,m)+e+t(this,v)+t(this,O):e}else return t(this,a)[s]},et=new WeakSet,Ot=function(){if(t(this,G).current&&t(this,l).length){const s=t(this,g).current+t(this,mt).current;s===0?this.classList.add("start"):this.classList.remove("start"),s===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,W).current+t(this,X).current;t(this,l).forEach((h,u)=>{const b=s-this.limit-1+t(this,X).current,D=s+e,se=this.sections.length-D;u>=s&&u<D||u<=b?h.mark("current"):u>=D&&u<D+se/2||u<=b+e?h.mark("next"):h.mark("previous")})}},ke=new WeakSet,os=function(){let s=null,e=1/0;for(let h=0;h<t(this,l).length;h++){const u=Math.abs(t(this,l)[h].position-this.targetScrollValue);u<e&&(e=u,s=h)}return s!==null?t(this,l)[s]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ue);var Re;class ts extends HTMLElement{constructor(){super(...arguments);i(this,Re,null)}get scrollElement(){return t(this,Re)}connectedCallback(){const s=Ws.findParentElement(this,Ue);s instanceof Ue?r(this,Re,s):console.error(this,"e-scroll not found")}}Re=new WeakMap;const Ks=as.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorFont.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:bs.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});var ce,k,st,it,le,ue,Zt,De,Oe,qe;class Cs extends ts{constructor(){super();i(this,ce,null);i(this,k,null);i(this,st,!1);i(this,it,0);i(this,le,0);i(this,ue,0);i(this,Zt,()=>{r(this,st,this.offsetWidth>this.offsetHeight);const s=t(this,st)?this.offsetWidth:this.offsetHeight;r(this,it,s/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/s)),r(this,it,Math.max(t(this,it),30)),t(this,st)?(t(this,k).style.width=t(this,it)+"px",t(this,k).style.height="100%"):(t(this,k).style.width="100%",t(this,k).style.height=t(this,it)+"px"),r(this,le,s-t(this,it)),this.scrollElement.scrollSize||(this.style.display="none")});i(this,De,()=>{r(this,ue,this.scrollElement.currentProgress*t(this,le)),t(this,st)?t(this,k).style.transform=`translate3d(${t(this,ue)}px, 0px, 0px)`:t(this,k).style.transform=`translate3d(0px, ${t(this,ue)}px, 0px)`});i(this,Oe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,qe,s=>{document.documentElement.classList.add("grabbing"),$s.setupDrag(u=>{const b=t(this,st)?u.x:u.y,D=this.scrollElement.distance/t(this,le),se=(b-h)*D;this.scrollElement.setPosition(e+se)},()=>{document.documentElement.classList.remove("grabbing")});const e=this.scrollElement.targetScrollValue,h=t(this,st)?s.x:s.y});ls.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ks),H.element(this,{slot:"static","drag-dead-zone":"",children:[H.slot({ref:e=>r(this,ce,e),children:H.div({class:"default-thumb"})})]}))}get thumbElement(){return t(this,k)}connectedCallback(){super.connectedCallback();const s=t(this,ce).assignedElements()[0]||t(this,ce).firstElementChild;r(this,k,s),t(this,k).addEventListener("pointerdown",t(this,qe)),be.windowResizer.subscribe(t(this,Zt),ge.RESIZE_ORDER.SCROLL+1),We.elementResizer.subscribe(this,t(this,Zt)),this.scrollElement.onScroll(t(this,De)),this.scrollElement.axisCSSProperty.subscribe(t(this,Oe))}disconnectedCallback(){t(this,k).removeEventListener("pointerdown",t(this,qe)),be.windowResizer.unsubscribe(t(this,Zt)),We.elementResizer.unsubscribe(t(this,Zt)),this.scrollElement.offScroll(t(this,De)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Oe))}}ce=new WeakMap,k=new WeakMap,st=new WeakMap,it=new WeakMap,le=new WeakMap,ue=new WeakMap,Zt=new WeakMap,De=new WeakMap,Oe=new WeakMap,qe=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Cs);const Ns=as.createStylesheet({button:{all:"inherit"}});class vs extends ts{constructor(){super(),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ns),ls.isBrowser&&H.element(this,{children:[H.button({onClick:()=>{this.handleClick()},children:[H.slot()]})]})}}class Ps extends vs{handleClick(){const n=this.getAttribute("index"),s=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:s})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",Ps);class ws extends vs{handleClick(){const n=this.getAttribute("step"),s=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:s})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",ws);var rt,Pt,ae,Ie,Te,Se;class Zs{constructor(n,s,e){i(this,rt,void 0);i(this,Pt,void 0);i(this,ae,void 0);i(this,Ie,void 0);i(this,Te,()=>{t(this,Pt).scrollToSection(t(this,ae),{behaviour:t(this,Ie)})});i(this,Se,()=>{t(this,rt).classList.toggle("current",t(this,Pt).counter.current===t(this,ae))});r(this,rt,document.createElement("button")),r(this,Pt,n),r(this,Ie,e),r(this,ae,s),t(this,rt).addEventListener("click",t(this,Te)),t(this,Pt).counter.subscribe(t(this,Se)),t(this,Se).call(this)}get element(){return t(this,rt)}destroy(){t(this,rt).removeEventListener("click",t(this,Te)),t(this,Pt).counter.unsubscribe(t(this,Se)),t(this,rt).remove()}}rt=new WeakMap,Pt=new WeakMap,ae=new WeakMap,Ie=new WeakMap,Te=new WeakMap,Se=new WeakMap;var wt,de;class Es extends ts{constructor(){super(...arguments);i(this,wt,[]);i(this,de,gs.debounce(()=>{t(this,wt).forEach(s=>s.destroy()),r(this,wt,[]);for(let s=0;s<this.scrollElement.sections.length;s++){const e=new Zs(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");this.appendChild(e.element),t(this,wt).push(e)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,de)),t(this,de).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,de)),t(this,wt).forEach(s=>s.destroy()),r(this,wt,[])}}wt=new WeakMap,de=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Es);var jt,Jt,Qt,Xt,Et,xt,Lt,zt,L,I,T,M,Vt,P,ht,nt,ot,ct,lt,w,A,B,ut,at,N,Me,d,Yt,te,Ae,E,Ft,R,z,_,pe,kt,C,Ke,Ls,Ne,zs,Ze,Vs,je,Fs,Je,ks,Qe,Rs,Be,fe,St,qt,Xe,Ds,Ye,Os,_e,cs,He;class xs extends ts{constructor(){super();i(this,Ke);i(this,Ne);i(this,Ze);i(this,je);i(this,Je);i(this,Qe);i(this,St);i(this,Xe);i(this,Ye);i(this,_e);i(this,jt,new c.CSSProperty(this,"--damping",20));i(this,Jt,new c.CSSProperty(this,"--mass",0));i(this,Qt,new c.CSSProperty(this,"--stiffness",0));i(this,Xt,new c.CSSProperty(this,"--target",""));i(this,Et,new c.CSSProperty(this,"--disabled",!1));i(this,xt,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));i(this,Lt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));i(this,zt,new c.CSSProperty(this,"--capture-once",!1));i(this,L,new c.CSSProperty(this,"--captured",""));i(this,I,new c.CSSProperty(this,"--released",""));i(this,T,new c.CSSProperty(this,"--captured-from-start",""));i(this,M,new c.CSSProperty(this,"--captured-from-finish",""));i(this,Vt,new c.CSSProperty(this,"--released-from-start",""));i(this,P,new c.CSSProperty(this,"--released-from-finish",""));i(this,ht,new c.CSSProperty(this,"--passed-var",""));i(this,nt,new c.CSSProperty(this,"--progress-var",""));i(this,ot,new c.CSSProperty(this,"--distance-var",""));i(this,ct,new c.CSSProperty(this,"--start-var",""));i(this,lt,new c.CSSProperty(this,"--finish-var",""));i(this,w,new Dt.Store(!1));i(this,A,new Dt.Store(!1));i(this,B,new Dt.Store(!1));i(this,ut,new Dt.Store(!1));i(this,at,new Dt.Store(!1));i(this,N,new Dt.Store(!1));i(this,Me,[]);i(this,d,this);i(this,Yt,0);i(this,te,0);i(this,Ae,0);i(this,E,new ms.Damped(0,{order:ge.TICK_ORDER.SCROLL-1,min:0,max:1}));i(this,Ft,0);i(this,R,0);i(this,z,0);i(this,_,0);i(this,pe,!1);i(this,kt,!1);i(this,C,!0);i(this,Be,()=>{t(this,C)||(this.resize(),t(this,fe).call(this))});i(this,fe,()=>{!t(this,C)&&t(this,pe)&&this.tick()});i(this,He,gs.debounce(()=>{const s=ee.scrollEntries.getAll(this).reverse();let e=0;s.forEach((h,u)=>{h.element===this.scrollElement&&(e=u)}),r(this,Me,s.slice(e+1))},0))}get distanceOffsetCSSProperty(){return t(this,xt)}get startOffsetCSSProperty(){return t(this,Lt)}get captureOnceCSSProperty(){return t(this,zt)}get capturedCSSProperty(){return t(this,L)}get releasedCSSProperty(){return t(this,I)}get capturedFromStartCSSProperty(){return t(this,T)}get capturedFromFinishCSSProperty(){return t(this,M)}get releasedFromStartCSSProperty(){return t(this,Vt)}get releasedFromFinishCSSProperty(){return t(this,P)}get passedVarCSSProperty(){return t(this,ht)}get progressVarCSSProperty(){return t(this,nt)}get distanceVarCSSProperty(){return t(this,ot)}get startVarCSSProperty(){return t(this,ct)}get finishVarCSSProperty(){return t(this,lt)}get disabledCSSProperty(){return t(this,Et)}get dampingCSSProperty(){return t(this,jt)}get massCSSProperty(){return t(this,Jt)}get stiffnessCSSProperty(){return t(this,Qt)}get targetCSSProperty(){return t(this,Xt)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,A)}get isCapturedFromStart(){return t(this,B)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,at)}get isReleasedFromFinish(){return t(this,N)}get directionPosition(){return t(this,Yt)}get directionSize(){return t(this,te)}get passed(){return t(this,E)}get progress(){return t(this,Ft)}get start(){return t(this,R)}get finish(){return t(this,_)}get distance(){return t(this,z)}get isCapturedOnce(){return t(this,kt)}get isDisabled(){return t(this,C)}resize(){r(this,te,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Yt,this.scrollElement.vertical?Rt.getCumulativeOffsetTop(this,this.scrollElement):Rt.getCumulativeOffsetLeft(this,this.scrollElement)),r(this,R,this.getStart()),r(this,z,this.getDistance()),r(this,R,t(this,R)+t(this,Lt).current),r(this,z,t(this,z)+t(this,xt).current),r(this,_,t(this,R)+t(this,z)),this.scrollElement.currentScrollValue>t(this,_)&&!t(this,w).current&&!t(this,A).current&&(t(this,w).current=!0),this.setVar(t(this,ct).current,t(this,R)),this.setVar(t(this,lt).current,t(this,_)),this.setVar(t(this,ot).current,t(this,z)),t(this,E).max=t(this,z),r(this,pe,!0)}tick(){let s=this.scrollElement.currentScrollValue;t(this,Me).forEach(h=>{s+=h.value}),t(this,E).set(s-t(this,R));const e=Math.round(s);t(this,w).current&&(e>t(this,R)?t(this,B).current||o(this,Ze,Vs).call(this):t(this,B).current&&!t(this,ut).current&&o(this,Je,ks).call(this),e<t(this,_)?t(this,N).current&&!t(this,at).current&&o(this,je,Fs).call(this):t(this,B).current&&!t(this,N).current&&o(this,Qe,Rs).call(this)),e>t(this,R)&&e<t(this,_)?t(this,w).current||o(this,Ke,Ls).call(this):t(this,w).current&&(t(this,E).set(us.step(t(this,z)/2,t(this,E).current,0,t(this,z))),o(this,Ne,zs).call(this)),t(this,kt)&&t(this,zt).current&&(t(this,L).current&&t(this,d).classList.add(t(this,L).current),r(this,C,!0))}disable(){this.style.cssText="",r(this,Yt,0),r(this,te,0),t(this,E).reset(),r(this,Ft,0),r(this,R,0),r(this,z,0),r(this,_,0),r(this,pe,!1),t(this,w).current=!1,t(this,A).current=!1,t(this,B).current=!1,t(this,ut).current=!1,t(this,at).current=!1,t(this,N).current=!1,r(this,kt,!1),r(this,C,!0),o(this,_e,cs).call(this)}enable(){r(this,C,!1)}connectedCallback(){super.connectedCallback(),t(this,jt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,Xt).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,L).observe(),t(this,I).observe(),t(this,T).observe(),t(this,M).observe(),t(this,Vt).observe(),t(this,P).observe(),t(this,ht).observe(),t(this,nt).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe();let s=!1;this.scrollElement.addEventListener("sectionsChange",t(this,He)),t(this,He).call(this),t(this,Et).current||this.enable(),t(this,jt).subscribe(e=>{t(this,E).damping=e.current}),t(this,Jt).subscribe(e=>{t(this,E).mass=e.current}),t(this,Qt).subscribe(e=>{t(this,E).stiffness=e.current}),t(this,Xt).subscribe(e=>{e.previous&&o(this,_e,cs).call(this),e.current?e.current==="parent"?r(this,d,this.parentElement||this):r(this,d,document.querySelector(e.current)||this):r(this,d,this)}),t(this,Et).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,Lt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,xt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,L).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,T).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,M).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,I).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,Vt).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,P).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,zt).subscribe(e=>{t(this,C)||!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,ht).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,this.passed.current))}),t(this,nt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,Ft)))}),t(this,ct).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,R)))}),t(this,lt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,_)))}),t(this,ot).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,z)))}),t(this,E).subscribe(e=>{r(this,Ft,t(this,E).current/t(this,z)||0),this.setVar(t(this,ht).current,t(this,E).current.toFixed(6)),this.setVar(t(this,nt).current,t(this,Ft).toFixed(6))}),be.windowResizer.subscribe(t(this,Be),ge.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,fe)),s=!0}disconnectedCallback(){be.windowResizer.unsubscribe(t(this,Be)),this.scrollElement.offScroll(t(this,fe)),t(this,jt).close(),t(this,Jt).close(),t(this,Qt).close(),t(this,Xt).close(),t(this,Et).close(),t(this,xt).close(),t(this,Lt).close(),t(this,zt).close(),t(this,L).close(),t(this,I).close(),t(this,T).close(),t(this,M).close(),t(this,Vt).close(),t(this,P).close(),t(this,ht).close(),t(this,nt).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,w).close(),t(this,A).close(),t(this,B).close(),t(this,ut).close(),t(this,at).close(),t(this,N).close(),this.disable()}removeVar(s){s&&t(this,d).style.removeProperty(`--${s}`)}setVar(s,e){s&&t(this,d).style.setProperty(`--${s}`,e.toString())}getDistance(){return t(this,te)+t(this,Ae)}getStart(){return t(this,Yt)-t(this,Ae)}}jt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,L=new WeakMap,I=new WeakMap,T=new WeakMap,M=new WeakMap,Vt=new WeakMap,P=new WeakMap,ht=new WeakMap,nt=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,w=new WeakMap,A=new WeakMap,B=new WeakMap,ut=new WeakMap,at=new WeakMap,N=new WeakMap,Me=new WeakMap,d=new WeakMap,Yt=new WeakMap,te=new WeakMap,Ae=new WeakMap,E=new WeakMap,Ft=new WeakMap,R=new WeakMap,z=new WeakMap,_=new WeakMap,pe=new WeakMap,kt=new WeakMap,C=new WeakMap,Ke=new WeakSet,Ls=function(){t(this,w).current=!0,t(this,A).current=!1,r(this,kt,!0),t(this,I).current&&t(this,d).classList.remove(t(this,I).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,L).current&&t(this,d).classList.add(t(this,L).current)},Ne=new WeakSet,zs=function(){t(this,A).current=!0,t(this,w).current=!1,r(this,kt,!0),t(this,L).current&&t(this,d).classList.remove(t(this,L).current),t(this,T).current&&t(this,d).classList.remove(t(this,T).current),t(this,M).current&&t(this,d).classList.remove(t(this,M).current),t(this,I).current&&t(this,d).classList.add(t(this,I).current)},Ze=new WeakSet,Vs=function(){t(this,w).current=!0,t(this,B).current=!0,t(this,ut).current=!1,t(this,T).current&&t(this,d).classList.add(t(this,T).current)},je=new WeakSet,Fs=function(){t(this,w).current=!0,t(this,at).current=!0,t(this,N).current=!1,t(this,M).current&&t(this,d).classList.add(t(this,M).current)},Je=new WeakSet,ks=function(){t(this,A).current=!0,t(this,ut).current=!0,t(this,B).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Qe=new WeakSet,Rs=function(){t(this,A).current=!0,t(this,N).current=!0,t(this,at).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Be=new WeakMap,fe=new WeakMap,St=new WeakSet,qt=function(s){if(t(this,C)){s.previous&&t(this,d).classList.remove(s.previous),s.current&&t(this,d).classList.remove(s.current);return}s.current&&t(this,w).current?(s.previous&&t(this,d).classList.remove(s.previous),t(this,d).classList.add(s.current)):!s.current&&s.previous&&t(this,d).classList.remove(s.previous)},Xe=new WeakSet,Ds=function(...s){s.forEach(e=>{e&&t(this,d).classList.remove(e)})},Ye=new WeakSet,Os=function(...s){s.forEach(e=>{e&&t(this,d).style.removeProperty(`--${e}`)})},_e=new WeakSet,cs=function(){o(this,Xe,Ds).call(this,t(this,L).current,t(this,T).current,t(this,M).current,t(this,I).current,t(this,Vt).current,t(this,P).current),o(this,Ye,Os).call(this,t(this,ht).current,t(this,nt).current,t(this,ot).current,t(this,ct).current,t(this,lt).current)},He=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",xs);exports.ScrollBulletButtonsElement=Es;exports.ScrollElement=Ue;exports.ScrollSegmentElement=xs;exports.ScrollSetButtonElement=Ps;exports.ScrollStepButtonElement=ws;exports.ScrollbarElement=Cs;
|