aptechka 0.4.20 → 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Damped-B0G_t-pw.cjs +1 -0
- package/lib/{Damped-ChjjwnrU.js → Damped-DpaKIZqv.js} +1 -1
- package/lib/accordion/index.js +9 -9
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +2 -2
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +2 -0
- package/lib/canvas/index.js +63 -48
- package/lib/canvas-CU5Xjahf.cjs +1 -0
- package/lib/canvas-DeZ0SLUJ.js +34 -0
- package/lib/class-linked-status/index.cjs +1 -0
- package/lib/class-linked-status/index.d.ts +10 -0
- package/lib/class-linked-status/index.js +51 -0
- package/lib/coordinates-CgdGoSYs.js +24 -0
- package/lib/coordinates-D8Np3cPD.cjs +1 -0
- package/lib/{index-Fasue6kv.js → index-DTe0hK7c.js} +28 -28
- package/lib/pointer/Pointer.d.ts +21 -0
- package/lib/pointer/PointerElement.d.ts +13 -0
- package/lib/pointer/index.cjs +1 -0
- package/lib/pointer/index.d.ts +2 -0
- package/lib/pointer/index.js +130 -0
- package/lib/popover/index.js +11 -11
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -0
- package/lib/sequence/index.d.ts +19 -0
- package/lib/sequence/index.js +151 -0
- package/lib/{style-j2TwriJ_.js → style-CklEF62D.js} +2 -2
- package/lib/tweaker/index.js +1 -1
- package/lib/utils/canvas.d.ts +1 -0
- package/lib/utils/coordinates.d.ts +2 -2
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +24 -24
- package/lib/utils/index.js +133 -168
- package/lib/utils/ts-shape.d.ts +2 -1
- package/package.json +25 -1
- package/lib/Damped-CbT5qqTP.cjs +0 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
var E = (e, t, s) => {
|
|
2
|
+
if (!t.has(e))
|
|
3
|
+
throw TypeError("Cannot " + s);
|
|
4
|
+
};
|
|
5
|
+
var r = (e, t, s) => (E(e, t, "read from private field"), s ? s.call(e) : t.get(e)), p = (e, t, s) => {
|
|
6
|
+
if (t.has(e))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
9
|
+
}, d = (e, t, s, h) => (E(e, t, "write to private field"), h ? h.call(e, s) : t.set(e, s), s);
|
|
10
|
+
import { D as b } from "../Damped-DpaKIZqv.js";
|
|
11
|
+
import { g as M, s as k, n as D } from "../coordinates-CgdGoSYs.js";
|
|
12
|
+
import { g as O } from "../dom-0S_WDL4g.js";
|
|
13
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
14
|
+
import "../Store-Cd-E5W1z.js";
|
|
15
|
+
import "../ticker/index.js";
|
|
16
|
+
import { CustomElement as T, define as A } from "../custom-element/index.js";
|
|
17
|
+
import { CSSProperty as u } from "../css-property/index.js";
|
|
18
|
+
var a, m, v, l, _, g, x;
|
|
19
|
+
class G {
|
|
20
|
+
constructor(t) {
|
|
21
|
+
p(this, a, void 0);
|
|
22
|
+
p(this, m, void 0);
|
|
23
|
+
p(this, v, void 0);
|
|
24
|
+
p(this, l, void 0);
|
|
25
|
+
p(this, _, (t) => {
|
|
26
|
+
r(this, l).set(1);
|
|
27
|
+
});
|
|
28
|
+
p(this, g, (t) => {
|
|
29
|
+
r(this, l).set(0);
|
|
30
|
+
});
|
|
31
|
+
p(this, x, (t) => {
|
|
32
|
+
const s = M(t), h = {
|
|
33
|
+
width: this.element.offsetWidth,
|
|
34
|
+
height: this.element.offsetHeight
|
|
35
|
+
}, o = {
|
|
36
|
+
x: s.x,
|
|
37
|
+
y: s.y
|
|
38
|
+
};
|
|
39
|
+
if (this.cartesian) {
|
|
40
|
+
const c = k(o, h);
|
|
41
|
+
o.x = c.x, o.y = c.y;
|
|
42
|
+
}
|
|
43
|
+
if (this.normalize) {
|
|
44
|
+
const c = D(o, h);
|
|
45
|
+
o.x = c.x * 2, o.y = c.y * 2;
|
|
46
|
+
}
|
|
47
|
+
r(this, m).set(o.x), r(this, v).set(o.y);
|
|
48
|
+
});
|
|
49
|
+
d(this, a, O(t.element)), d(this, m, new b(0, t.damped)), d(this, v, new b(0, t.damped)), d(this, l, new b(0, t.damped)), this.cartesian = t.cartesian || !1, this.normalize = t.normalize || !1;
|
|
50
|
+
}
|
|
51
|
+
get element() {
|
|
52
|
+
return r(this, a);
|
|
53
|
+
}
|
|
54
|
+
get x() {
|
|
55
|
+
return r(this, m);
|
|
56
|
+
}
|
|
57
|
+
get y() {
|
|
58
|
+
return r(this, v);
|
|
59
|
+
}
|
|
60
|
+
get z() {
|
|
61
|
+
return r(this, l);
|
|
62
|
+
}
|
|
63
|
+
connect() {
|
|
64
|
+
r(this, a).addEventListener("pointerenter", r(this, _)), r(this, a).addEventListener("pointerleave", r(this, g)), r(this, a).addEventListener("pointermove", r(this, x));
|
|
65
|
+
}
|
|
66
|
+
disconnect() {
|
|
67
|
+
r(this, a).removeEventListener(
|
|
68
|
+
"pointerenter",
|
|
69
|
+
r(this, _)
|
|
70
|
+
), r(this, a).removeEventListener(
|
|
71
|
+
"pointerleave",
|
|
72
|
+
r(this, g)
|
|
73
|
+
), r(this, a).removeEventListener("pointermove", r(this, x)), r(this, m).reset(), r(this, v).reset(), r(this, l).reset();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
a = new WeakMap(), m = new WeakMap(), v = new WeakMap(), l = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), x = new WeakMap();
|
|
77
|
+
var H = Object.defineProperty, q = Object.getOwnPropertyDescriptor, B = (e, t, s, h) => {
|
|
78
|
+
for (var o = h > 1 ? void 0 : h ? q(t, s) : t, c = e.length - 1, S; c >= 0; c--)
|
|
79
|
+
(S = e[c]) && (o = (h ? S(t, s, o) : S(o)) || o);
|
|
80
|
+
return h && o && H(t, s, o), o;
|
|
81
|
+
}, W = (e, t, s) => {
|
|
82
|
+
if (!t.has(e))
|
|
83
|
+
throw TypeError("Cannot " + s);
|
|
84
|
+
}, i = (e, t, s) => (W(e, t, "read from private field"), s ? s.call(e) : t.get(e)), f = (e, t, s) => {
|
|
85
|
+
if (t.has(e))
|
|
86
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
87
|
+
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
88
|
+
}, F = (e, t, s, h) => (W(e, t, "write to private field"), h ? h.call(e, s) : t.set(e, s), s), n, y, w, P, z, C;
|
|
89
|
+
let L = class extends T {
|
|
90
|
+
constructor() {
|
|
91
|
+
super(), f(this, n, void 0), f(this, y, new u(this, "--damping", 20)), f(this, w, new u(this, "--mass", 0)), f(this, P, new u(this, "--stiffness", 0)), f(this, z, new u(this, "--cartesian", !1)), f(this, C, new u(this, "--normalize", !1)), F(this, n, new G({
|
|
92
|
+
element: this
|
|
93
|
+
})), i(this, y).subscribe((e) => {
|
|
94
|
+
i(this, n).x.damping = e.current, i(this, n).y.damping = e.current, i(this, n).z.damping = e.current;
|
|
95
|
+
}), i(this, z).subscribe((e) => {
|
|
96
|
+
i(this, n).cartesian = e.current;
|
|
97
|
+
}), i(this, C).subscribe((e) => {
|
|
98
|
+
i(this, n).normalize = e.current;
|
|
99
|
+
}), i(this, w).subscribe((e) => {
|
|
100
|
+
i(this, n).x.mass = e.current, i(this, n).y.mass = e.current, i(this, n).z.mass = e.current;
|
|
101
|
+
}), i(this, P).subscribe((e) => {
|
|
102
|
+
i(this, n).x.stiffness = e.current, i(this, n).y.stiffness = e.current, i(this, n).z.stiffness = e.current;
|
|
103
|
+
}), i(this, n).x.subscribe((e) => {
|
|
104
|
+
this.style.setProperty("--x", e.current.toString());
|
|
105
|
+
}), i(this, n).y.subscribe((e) => {
|
|
106
|
+
this.style.setProperty("--y", e.current.toString());
|
|
107
|
+
}), i(this, n).z.subscribe((e) => {
|
|
108
|
+
this.style.setProperty("--z", e.current.toString());
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
connectedCallback() {
|
|
112
|
+
i(this, n).connect(), i(this, y).observe(), i(this, w).observe(), i(this, P).observe();
|
|
113
|
+
}
|
|
114
|
+
disconnectedCallback() {
|
|
115
|
+
i(this, n).disconnect(), i(this, y).unobserve(), i(this, w).unobserve(), i(this, P).unobserve(), this.style.removeProperty("--x"), this.style.removeProperty("--y"), this.style.removeProperty("--z");
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
n = /* @__PURE__ */ new WeakMap();
|
|
119
|
+
y = /* @__PURE__ */ new WeakMap();
|
|
120
|
+
w = /* @__PURE__ */ new WeakMap();
|
|
121
|
+
P = /* @__PURE__ */ new WeakMap();
|
|
122
|
+
z = /* @__PURE__ */ new WeakMap();
|
|
123
|
+
C = /* @__PURE__ */ new WeakMap();
|
|
124
|
+
L = B([
|
|
125
|
+
A("e-pointer")
|
|
126
|
+
], L);
|
|
127
|
+
export {
|
|
128
|
+
G as Pointer,
|
|
129
|
+
L as PointerElement
|
|
130
|
+
};
|
package/lib/popover/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Attribute as D } from "../attribute/index.js";
|
|
2
2
|
import { CustomElement as N, define as q } from "../custom-element/index.js";
|
|
3
3
|
import { S as H } from "../Store-Cd-E5W1z.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as R } from "../style-CklEF62D.js";
|
|
5
5
|
import "../path-data-polyfill-DgeDWYeI.js";
|
|
6
6
|
import { i as b } from "../browser-0zX67oeU.js";
|
|
7
7
|
import { e as U, p as z, ay as F } from "../tags-BoPv9fDr.js";
|
|
@@ -17,7 +17,7 @@ var K = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, V = (e, t, s
|
|
|
17
17
|
if (t.has(e))
|
|
18
18
|
throw TypeError("Cannot add the same private member more than once");
|
|
19
19
|
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
20
|
-
}, O = (e, t, s, o) => (A(e, t, "write to private field"), o ? o.call(e, s) : t.set(e, s), s), x = (e, t, s) => (A(e, t, "access private method"), s), T, c, E, l, u, m, $, B, _,
|
|
20
|
+
}, O = (e, t, s, o) => (A(e, t, "write to private field"), o ? o.call(e, s) : t.set(e, s), s), x = (e, t, s) => (A(e, t, "access private method"), s), T, c, E, l, u, m, $, B, _, g, y, L, C, P, w;
|
|
21
21
|
let p = class extends N {
|
|
22
22
|
constructor() {
|
|
23
23
|
super(...arguments), h(this, $), h(this, _), h(this, C), h(this, T, -1), h(this, c, new H(!1)), h(this, E, void 0), h(this, l, new D(this, "history", !1)), h(this, u, new D(this, "single", !1)), h(this, m, !1), this.open = () => {
|
|
@@ -28,7 +28,7 @@ let p = class extends N {
|
|
|
28
28
|
if (i(this, c).current) {
|
|
29
29
|
if (i(this, c).current = !1, p.__opened = p.__opened.filter((e) => e !== this), i(this, l).current) {
|
|
30
30
|
const e = new URL(location.href);
|
|
31
|
-
e.searchParams.delete(i(this, _,
|
|
31
|
+
e.searchParams.delete(i(this, _, g)), history.replaceState(null, "", e.href);
|
|
32
32
|
}
|
|
33
33
|
this.classList.remove("opened"), this.style.opacity = "0", this.dispatchEvent(new CustomEvent("popoverClosing")), removeEventListener("click", i(this, y)), removeEventListener("keydown", i(this, L)), setTimeout(() => {
|
|
34
34
|
this.classList.remove("triggered"), this.style.display = "none", this.dispatchEvent(new CustomEvent("popoverClosed"));
|
|
@@ -45,8 +45,8 @@ let p = class extends N {
|
|
|
45
45
|
x(this, C, P).call(this, () => {
|
|
46
46
|
e.code === "Escape" && this.close();
|
|
47
47
|
});
|
|
48
|
-
}), h(this,
|
|
49
|
-
O(this, m, !1), i(this, c).current && i(this, l).current && !location.search.includes(i(this, _,
|
|
48
|
+
}), h(this, w, () => {
|
|
49
|
+
O(this, m, !1), i(this, c).current && i(this, l).current && !location.search.includes(i(this, _, g)) ? this.close() : !i(this, c).current && i(this, l).current && location.search.includes(i(this, _, g)) && this.open(), O(this, m, !0);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
get history() {
|
|
@@ -59,12 +59,12 @@ let p = class extends N {
|
|
|
59
59
|
return i(this, c);
|
|
60
60
|
}
|
|
61
61
|
connectedCallback() {
|
|
62
|
-
i(this, l).observe(), i(this, u).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", i(this,
|
|
63
|
-
i(this,
|
|
62
|
+
i(this, l).observe(), i(this, u).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", i(this, w)), setTimeout(() => {
|
|
63
|
+
i(this, w).call(this);
|
|
64
64
|
}, 0);
|
|
65
65
|
}
|
|
66
66
|
disconnectedCallback() {
|
|
67
|
-
i(this, l).unobserve(), i(this, u).unobserve(), clearTimeout(i(this, E)), removeEventListener("popstate", i(this,
|
|
67
|
+
i(this, l).unobserve(), i(this, u).unobserve(), clearTimeout(i(this, E)), removeEventListener("popstate", i(this, w));
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
T = /* @__PURE__ */ new WeakMap();
|
|
@@ -75,10 +75,10 @@ u = /* @__PURE__ */ new WeakMap();
|
|
|
75
75
|
m = /* @__PURE__ */ new WeakMap();
|
|
76
76
|
$ = /* @__PURE__ */ new WeakSet();
|
|
77
77
|
B = function() {
|
|
78
|
-
return `${location.pathname}${location.search ? location.search + "&" : "?"}${i(this, _,
|
|
78
|
+
return `${location.pathname}${location.search ? location.search + "&" : "?"}${i(this, _, g)}`;
|
|
79
79
|
};
|
|
80
80
|
_ = /* @__PURE__ */ new WeakSet();
|
|
81
|
-
|
|
81
|
+
g = function() {
|
|
82
82
|
return `modal-${this.id}`;
|
|
83
83
|
};
|
|
84
84
|
y = /* @__PURE__ */ new WeakMap();
|
|
@@ -87,7 +87,7 @@ C = /* @__PURE__ */ new WeakSet();
|
|
|
87
87
|
P = function(e) {
|
|
88
88
|
(p.__opened[i(this, T) - 1] || p.__opened.length === 1) && e();
|
|
89
89
|
};
|
|
90
|
-
|
|
90
|
+
w = /* @__PURE__ */ new WeakMap();
|
|
91
91
|
p.__opened = [];
|
|
92
92
|
p = V([
|
|
93
93
|
q("e-popover")
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var rs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(rs(r,e,"read from private field"),i?i.call(r):e.get(r)),O=(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)},R=(r,e,i,h)=>(rs(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Es=require("../Damped-CbT5qqTP.cjs"),Ne=require("../browser-CpzFX2xg.cjs"),mt=require("../layout-8ryRAMGJ.cjs"),Ht=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const wt=require("../Store-BQGNOHlY.cjs"),ks=require("../Derived-BZtlW0bB.cjs");require("../ticker/index.cjs");const Fe=require("../DragControls-CV1YozSr.cjs"),vt=require("../custom-element/index.cjs"),Ve=require("../order/index.cjs"),Kt=require("../window-resizer/index.cjs"),Vt=require("../scroll-entries/index.cjs"),A=require("../tags-CueX-JLX.cjs"),Je=require("../createStylesheet-C8aQQ4hd.cjs"),hs=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ws=require("../Viewport-_WllZTJ0.cjs"),Ms=require("../gestures-DHLrn6Q8.cjs"),ns=require("../theme/index.cjs"),os=require("../element-resizer/index.cjs"),xs=require("../dom-JBOkFLTh.cjs"),cs=require("../function-MthRj-GJ.cjs");var Ls=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Vs=(r,e,i,h)=>{for(var n=h>1?void 0:h?zs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Ls(e,i,n),n},Qe=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(Qe(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)},g=(r,e,i,h)=>(Qe(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i),C=(r,e,i)=>(Qe(r,e,"access private method"),i),f,$,et,N,st,_t,it,Qt,D,$t,ue,pe,Ft,Dt,Rt,w,We,d,fe,Se,M,b,q,J,xt,ct,y,Xt,bt,Nt,Jt,ne,Me,Gt,oe,xe,Xe,Le,Ye,de,De,me,Re,tt,Oe,Te,us,Yt,ve,qe,ze,je,_,E,zt,Y;class Os{constructor(e,i){O(this,_,void 0);O(this,E,void 0);O(this,zt,0);O(this,Y,0);R(this,_,e),R(this,E,i),Vt.scrollEntries.register(o(this,_))}get size(){return o(this,zt)}get position(){return o(this,Y)}destroy(){Vt.scrollEntries.unregister(o(this,_)),o(this,_).style.transform=""}setSize(e){e?(o(this,_).style.setProperty("--size",e+"px"),o(this,E).axisCSSProperty.current==="x"?(o(this,_).style.width=e+"px",o(this,_).style.height=""):(o(this,_).style.height=e+"px",o(this,_).style.width="")):(o(this,_).style.width="",o(this,_).style.height="",o(this,_).style.removeProperty("--size"))}resize(){R(this,zt,o(this,E).vertical?o(this,_).offsetHeight:o(this,_).offsetWidth),R(this,Y,o(this,E).vertical?mt.getCumulativeOffsetTop(o(this,_)):mt.getCumulativeOffsetLeft(o(this,_))),R(this,Y,o(this,Y)-o(this,E).contentPosition)}transform(){let e=0;const i=o(this,E).viewportSize;o(this,E).infiniteCSSProperty.current&&o(this,E).overscroll&&o(this,Y)+o(this,zt)<o(this,E).currentScrollValue&&(e=o(this,E).distance*-1-o(this,E).gap),Vt.scrollEntries.update(o(this,_),o(this,E).axisCSSProperty.current,e);const h=o(this,E).currentScrollValue+e,n=o(this,Y)-o(this,E).viewportSize-i,c=o(this,Y)+o(this,zt)+i,u=Ht.clamp(h,n,c);o(this,E).vertical?o(this,_).style.transform=`translate3d(0px, ${u*-1}px, 0px)`:o(this,_).style.transform=`translate3d(${u*-1}px, 0px, 0px)`}}_=new WeakMap,E=new WeakMap,zt=new WeakMap,Y=new WeakMap;const $s=Je.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)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends vt.CustomElement{constructor(){super(),l(this,ne),l(this,Gt),l(this,xe),l(this,Le),l(this,de),l(this,me),l(this,Te),l(this,ve),l(this,ze),l(this,f,null),l(this,$,new S.CSSProperty(this,"--axis","y")),l(this,et,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),l(this,N,new S.CSSProperty(this,"--split",!1)),l(this,st,new S.CSSProperty(this,"--sectional",!1)),l(this,_t,new S.CSSProperty(this,"--wheel-max-delta",!1)),l(this,it,new S.CSSProperty(this,"--sections-in-view",1)),l(this,Qt,new S.CSSProperty(this,"--auto-size",!1)),l(this,D,new S.CSSProperty(this,"--infinite",!1)),l(this,$t,new S.CSSProperty(this,"--damping",20)),l(this,ue,new S.CSSProperty(this,"--mass",0)),l(this,pe,new S.CSSProperty(this,"--stiffness",0)),l(this,Ft,new S.CSSProperty(this,"--mouse-drag",!1)),l(this,Dt,new S.CSSProperty(this,"--disabled",!1)),l(this,Rt,new S.CSSProperty(this,"--hibernated",!1)),l(this,w,null),l(this,We,null),l(this,d,[]),l(this,fe,0),l(this,Se,0),l(this,M,0),l(this,b,0),l(this,q,0),l(this,J,null),l(this,xt,null),l(this,ct,null),l(this,y,new wt.Store(0)),l(this,Xt,0),l(this,bt,0),l(this,Nt,!0),l(this,Jt,!0),l(this,tt,()=>{const e=this.currentScrollValue/s(this,b)||0;if(g(this,fe,this.vertical?mt.getCumulativeOffsetTop(this):mt.getCumulativeOffsetLeft(this)),g(this,Se,this.vertical?mt.getCumulativeOffsetTop(s(this,w)):mt.getCumulativeOffsetLeft(s(this,w))),g(this,M,this.vertical?this.offsetHeight:this.offsetWidth),s(this,et).current){g(this,b,s(this,M)*s(this,et).current);const i=s(this,b)+s(this,M);this.vertical?(s(this,w).style.width=i+"px",s(this,w).style.height="100%"):(s(this,w).style.height=i+"px",s(this,w).style.width="100%")}else this.vertical?(s(this,w).style.width="100%",s(this,w).style.height="max-content",g(this,b,s(this,w).offsetHeight-s(this,M))):(s(this,w).style.width="max-content",s(this,w).style.height="100%",g(this,b,s(this,w).offsetWidth-s(this,M)));if(this.vertical?g(this,q,hs.cssUnitParser.parse(getComputedStyle(s(this,w)).rowGap)):g(this,q,hs.cssUnitParser.parse(getComputedStyle(s(this,w)).columnGap)),s(this,Qt).current&&s(this,d).length){const i=s(this,it).current,h=(s(this,M)-s(this,q)*(i-1))/i;s(this,d).forEach(n=>{n.setSize(h)})}else s(this,d).forEach(i=>{i.setSize()});if(!s(this,D).current){const i=getComputedStyle(this);g(this,b,s(this,b)+(this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd))),s(this,f).max=s(this,b)}if(s(this,d).forEach(i=>{i.resize(),i.transform()}),s(this,D).current&&s(this,d).length){const i=s(this,d)[s(this,d).length-1],h=i.position+i.size-s(this,M),n=s(this,b)-h;g(this,bt,i.position+i.size+n)}else g(this,bt,s(this,b));if(s(this,st).current&&s(this,d).length){const i=s(this,d)[s(this,y).current];s(this,f).set(i.position,!0)}else s(this,f).set(e*s(this,b),!0)}),l(this,Oe,()=>{const e=this.currentScrollValue;if(g(this,Xt,Math.max(0,e-s(this,b))),s(this,d).length){let i=0;for(let h=0;h<s(this,d).length;h++){const n=s(this,d)[h];n.transform(),this.targetScrollValue+n.size/2>=n.position&&(i=h)}s(this,y).current=i}else this.vertical?s(this,w).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:s(this,w).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Vt.scrollEntries.update(this,s(this,$).current,e)}),l(this,Yt,(e,i)=>{if(!(e==="drag"&&!Ws.device.isMobile&&!s(this,Ft).current))if(s(this,st).current){const h=Math.sign(i);s(this,d).length?this.shiftSections(h):s(this,f).shift(h*s(this,M))}else s(this,f).shift(i)}),Ne.isBrowser&&(g(this,f,new Es.Damped(0,{damping:.01,min:0,order:Ve.TICK_ORDER.SCROLL})),this.openShadow($s),A.element(this,{tabIndex:0,children:[A.div({class:"static",children:[A.slot({name:"static"})]}),A.div({class:"content",children:[A.slot({ref:e=>g(this,We,e)})],style:{flexDirection:new ks.Derived(s(this,$),e=>e==="x"?"row":"column")},ref:e=>g(this,w,e)})]}),g(this,J,new Fe.WheelControls({element:this})),s(this,J).changeEvent.subscribe(s(this,Yt)),g(this,xt,new Fe.KeyboardControls({element:this})),s(this,xt).changeEvent.subscribe(s(this,Yt)),g(this,ct,new Fe.DragControls({element:this})),s(this,ct).changeEvent.subscribe(s(this,Yt)),s(this,$).subscribe(({current:e})=>{s(this,w).style.flexDirection=e==="x"?"row":"column",s(this,J).axis=s(this,_t).current?"max":e,s(this,xt).dimension=e==="x"?"width":"height",s(this,ct).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&s(this,tt).call(this)}),s(this,_t).subscribe(e=>{s(this,J).axis=e.current?"max":s(this,$).current}),s(this,et).subscribe(()=>{this.isConnected&&s(this,tt).call(this)}),s(this,N).subscribe(({current:e})=>{this.isConnected&&(e?C(this,ne,Me).call(this):C(this,Gt,oe).call(this))}),s(this,st).subscribe(e=>{s(this,y).current=0,s(this,J).debounce=e.current,s(this,ct).swipe=e.current,s(this,f).reset(),this.isConnected&&(e.current&&!e.previous?C(this,ne,Me).call(this):!e.current&&e.previous&&C(this,Gt,oe).call(this))}),s(this,it).subscribe(e=>{this.isConnected&&s(this,tt).call(this)}),s(this,Qt).subscribe(e=>{this.isConnected&&s(this,tt).call(this)}),s(this,D).subscribe(e=>{e.current?(this.isConnected&&(s(this,d).length||(s(this,N).current=!0)),s(this,d).length&&(s(this,f).max=1/0,s(this,f).min=-1/0)):(g(this,Xt,0),s(this,f).max=s(this,b),s(this,f).min=0)}),s(this,$t).subscribe(e=>{s(this,f).damping=e.current}),s(this,ue).subscribe(e=>{s(this,f).mass=e.current}),s(this,pe).subscribe(e=>{s(this,f).stiffness=e.current}),s(this,Dt).subscribe(e=>{e.current&&!e.previous?C(this,xe,Xe).call(this):!e.current&&e.previous&&C(this,Le,Ye).call(this)}),s(this,Rt).subscribe(e=>{e.current&&!e.previous?C(this,de,De).call(this):!e.current&&e.previous&&C(this,me,Re).call(this)}),s(this,f).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),s(this,y).subscribe(e=>{s(this,d).length&&C(this,ze,je).call(this)}))}get axisCSSProperty(){return s(this,$)}get pagesCSSProperty(){return s(this,et)}get splitCSSProperty(){return s(this,N)}get sectionalCSSProperty(){return s(this,st)}get wheelMaxDeltaCSSProperty(){return s(this,_t)}get sectionsInViewCSSProperty(){return s(this,it)}get autoSizeCSSProperty(){return s(this,Qt)}get infiniteCSSProperty(){return s(this,D)}get dampingCSSProperty(){return s(this,$t)}get massCSSProperty(){return s(this,ue)}get stiffnessCSSProperty(){return s(this,pe)}get mouseDragCSSProperty(){return s(this,Ft)}get disabledCSSProperty(){return s(this,Dt)}get hibernatedCSSProperty(){return s(this,Rt)}get currentScrollValue(){return C(this,ve,qe).call(this,"current")}get targetScrollValue(){return C(this,ve,qe).call(this,"target")}get contentElement(){return s(this,w)}get sections(){return s(this,d)}get position(){return s(this,fe)}get contentPosition(){return s(this,Se)}get viewportSize(){return s(this,M)}get scrollSize(){return s(this,b)}get gap(){return s(this,q)}get counter(){return s(this,y)}get limit(){return s(this,d).length-s(this,it).current}get distance(){return s(this,bt)}get infiniteDistance(){return s(this,D).current?s(this,bt)+s(this,q):s(this,bt)}get overscroll(){return s(this,Xt)}get vertical(){return s(this,$).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return s(this,f).speed}get direction(){return s(this,f).direction}get isRunning(){return s(this,f).isRunning}get scrollWidth(){return s(this,$).current==="y"?0:s(this,f).length}get scrollHeight(){return s(this,$).current==="x"?0:s(this,f).length}onScroll(...e){return s(this,f).subscribe(...e)}offScroll(...e){s(this,f).unsubscribe(...e)}range(e,i,h=0){const n=e-h,c=n+i+h*2;return this.currentProgress<n?0:this.currentProgress>c?1:(this.currentProgress-n)/(c-n)}curve(e,i,h=0){return Math.sin(this.range(e,i,h)*Math.PI)}visible(e,i,h=0){const n=e-h,c=n+i+h*2;return this.currentProgress>=n&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!s(this,d).length)return;const h=s(this,y).current;C(this,Te,us).call(this,e);const n=s(this,d)[h],c=s(this,d)[s(this,y).current];if(n&&c){let u=0;s(this,D).current?s(this,y).current===0&&h===this.limit?u=s(this,b)+s(this,M)-n.position+s(this,q):s(this,y).current===this.limit&&h===0?u=c.position-(s(this,b)+s(this,M)+s(this,q)):u=c.position-n.position:u=c.position-n.position,s(this,f).shift(u,i==="instant")}}shiftSections(e,i="smooth"){s(this,d).length&&this.scrollToSection(s(this,y).current+e,i)}setPosition(e,i="smooth"){s(this,f).set(e,i==="instant")}connectedCallback(){s(this,$).observe(),s(this,et).observe(),s(this,N).observe(),s(this,st).observe(),s(this,_t).observe(),s(this,it).observe(),s(this,D).observe(),s(this,$t).observe(),s(this,Ft).observe(),s(this,Dt).observe(),s(this,Rt).observe(),C(this,me,Re).call(this)}disconnectedCallback(){s(this,$).unobserve(),s(this,et).unobserve(),s(this,N).unobserve(),s(this,st).unobserve(),s(this,_t).unobserve(),s(this,it).unobserve(),s(this,D).unobserve(),s(this,$t).unobserve(),s(this,Ft).unobserve(),s(this,Dt).unobserve(),s(this,Rt).unobserve(),C(this,de,De).call(this)}};f=new WeakMap;$=new WeakMap;et=new WeakMap;N=new WeakMap;st=new WeakMap;_t=new WeakMap;it=new WeakMap;Qt=new WeakMap;D=new WeakMap;$t=new WeakMap;ue=new WeakMap;pe=new WeakMap;Ft=new WeakMap;Dt=new WeakMap;Rt=new WeakMap;w=new WeakMap;We=new WeakMap;d=new WeakMap;fe=new WeakMap;Se=new WeakMap;M=new WeakMap;b=new WeakMap;q=new WeakMap;J=new WeakMap;xt=new WeakMap;ct=new WeakMap;y=new WeakMap;Xt=new WeakMap;bt=new WeakMap;Nt=new WeakMap;Jt=new WeakMap;ne=new WeakSet;Me=function(){C(this,Gt,oe).call(this),s(this,We).assignedElements().forEach(r=>{r instanceof HTMLElement&&s(this,d).push(new Os(r,this))}),s(this,w).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),s(this,tt).call(this),C(this,ze,je).call(this)};Gt=new WeakSet;oe=function(){s(this,d).forEach(r=>{r.destroy()}),g(this,d,[]),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};xe=new WeakSet;Xe=function(){s(this,Nt)||(g(this,Nt,!0),s(this,f).unsubscribe(s(this,Oe)),s(this,f).unlistenAnimationFrame(),s(this,J).disconnect(),s(this,xt).disconnect(),s(this,ct).disconnect())};Le=new WeakSet;Ye=function(){s(this,Nt)&&(g(this,Nt,!1),s(this,f).subscribe(s(this,Oe)),s(this,J).connect(),s(this,xt).connect(),s(this,ct).connect())};de=new WeakSet;De=function(){s(this,Jt)||(g(this,Jt,!0),Kt.windowResizer.unsubscribe(s(this,tt)),s(this,f).reset(),C(this,xe,Xe).call(this),s(this,w).style.transform="",s(this,N).current&&C(this,Gt,oe).call(this),Vt.scrollEntries.unregister(this))};me=new WeakSet;Re=function(){s(this,Jt)&&(g(this,Jt,!1),s(this,N).current&&C(this,ne,Me).call(this),Vt.scrollEntries.register(this),Kt.windowResizer.subscribe(s(this,tt),Ve.RESIZE_ORDER.SCROLL),C(this,Le,Ye).call(this))};tt=new WeakMap;Oe=new WeakMap;Te=new WeakSet;us=function(r){s(this,D).current?(s(this,y).current=r%s(this,d).length,s(this,y).current=s(this,y).current<0?s(this,d).length+s(this,y).current:s(this,y).current):s(this,y).current=Ht.clamp(r,0,this.limit)};Yt=new WeakMap;ve=new WeakSet;qe=function(r="current"){if(s(this,D).current&&s(this,d).length){const e=s(this,f)[r]%(s(this,b)+s(this,M)+s(this,q));return e<0?s(this,b)+e+s(this,M)+s(this,q):e}else return s(this,f)[r]};ze=new WeakSet;je=function(){s(this,d).length&&(s(this,y).current===0?this.classList.add("start"):this.classList.remove("start"),s(this,y).current===this.limit?this.classList.add("end"):this.classList.remove("end"))};exports.ScrollElement=Vs([vt.define("e-scroll")],exports.ScrollElement);var ae;class $e extends vt.CustomElement{constructor(){super(...arguments);O(this,ae,null)}get scrollElement(){return o(this,ae)}connectedCallback(){const i=xs.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?R(this,ae,i):console.error(this,"e-scroll not found")}}ae=new WeakMap;var Fs=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Rs=(r,e,i,h)=>{for(var n=h>1?void 0:h?Ds(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Fs(e,i,n),n},ps=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},p=(r,e,i)=>(ps(r,e,"read from private field"),i?i.call(r):e.get(r)),U=(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)},gt=(r,e,i,h)=>(ps(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i),jt,F,rt,ht,te,ee,Tt,ge,we,_e;const Ts=Je.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:ns.aptechkaTheme.colorLight.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:ns.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends $e{constructor(){super(),U(this,jt,null),U(this,F,null),U(this,rt,!1),U(this,ht,0),U(this,te,0),U(this,ee,0),U(this,Tt,()=>{gt(this,rt,this.offsetWidth>this.offsetHeight);const e=p(this,rt)?this.offsetWidth:this.offsetHeight;gt(this,ht,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),gt(this,ht,Math.max(p(this,ht),30)),p(this,rt)?(p(this,F).style.width=p(this,ht)+"px",p(this,F).style.height="100%"):(p(this,F).style.width="100%",p(this,F).style.height=p(this,ht)+"px"),gt(this,te,e-p(this,ht)),this.scrollElement.scrollSize||(this.style.display="none")}),U(this,ge,()=>{gt(this,ee,this.scrollElement.currentProgress*p(this,te)),p(this,rt)?p(this,F).style.transform=`translate3d(${p(this,ee)}px, 0px, 0px)`:p(this,F).style.transform=`translate3d(0px, ${p(this,ee)}px, 0px)`}),U(this,we,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),U(this,_e,e=>{document.documentElement.classList.add("grabbing"),Ms.setupDrag(n=>{const c=p(this,rt)?n.x:n.y,u=this.scrollElement.distance/p(this,te),Ps=(c-h)*u;this.scrollElement.setPosition(i+Ps)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,h=p(this,rt)?e.x:e.y}),Ne.isBrowser&&(this.openShadow(Ts),A.element(this,{slot:"static","drag-dead-zone":"",children:[A.slot({ref:e=>gt(this,jt,e),children:A.div({class:"default-thumb"})})]}))}get thumbElement(){return p(this,F)}connectedCallback(){super.connectedCallback();const e=p(this,jt).assignedElements()[0]||p(this,jt).firstElementChild;gt(this,F,e),p(this,F).addEventListener("pointerdown",p(this,_e)),Kt.windowResizer.subscribe(p(this,Tt),Ve.RESIZE_ORDER.SCROLL+1),os.elementResizer.subscribe(this,p(this,Tt)),this.scrollElement.onScroll(p(this,ge)),this.scrollElement.axisCSSProperty.subscribe(p(this,we))}disconnectedCallback(){p(this,F).removeEventListener("pointerdown",p(this,_e)),Kt.windowResizer.unsubscribe(p(this,Tt)),os.elementResizer.unsubscribe(p(this,Tt)),this.scrollElement.offScroll(p(this,ge)),this.scrollElement.axisCSSProperty.unsubscribe(p(this,we))}};jt=new WeakMap;F=new WeakMap;rt=new WeakMap;ht=new WeakMap;te=new WeakMap;ee=new WeakMap;Tt=new WeakMap;ge=new WeakMap;we=new WeakMap;_e=new WeakMap;exports.ScrollbarElement=Rs([vt.define("e-scrollbar")],exports.ScrollbarElement);const qs=Je.createStylesheet({button:{all:"inherit"}});class fs extends $e{constructor(){super(),this.openShadow(qs),Ne.isBrowser&&A.element(this,{children:[A.button({onClick:()=>{this.handleClick()},children:[A.slot()]})]})}}var Bs=Object.defineProperty,As=Object.getOwnPropertyDescriptor,Is=(r,e,i,h)=>{for(var n=h>1?void 0:h?As(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Bs(e,i,n),n};exports.ScrollSetButtonElement=class extends fs{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=Is([vt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var Hs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Us=(r,e,i,h)=>{for(var n=h>1?void 0:h?Gs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Hs(e,i,n),n};exports.ScrollStepButtonElement=class extends fs{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=Us([vt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var Zs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ns=(r,e,i,h)=>{for(var n=h>1?void 0:h?Ks(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Zs(e,i,n),n},Ss=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ot=(r,e,i)=>(Ss(r,e,"read from private field"),i?i.call(r):e.get(r)),as=(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,h)=>(Ss(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i),Ct,se,j,dt,Ut,le,ce,Zt;class Js{constructor(e,i,h){O(this,j,void 0);O(this,dt,void 0);O(this,Ut,void 0);O(this,le,void 0);O(this,ce,()=>{o(this,dt).scrollToSection(o(this,Ut),o(this,le))});O(this,Zt,()=>{o(this,j).classList.toggle("current",o(this,dt).counter.current===o(this,Ut))});R(this,j,document.createElement("button")),R(this,dt,e),R(this,le,h),R(this,Ut,i),o(this,j).addEventListener("click",o(this,ce)),o(this,dt).counter.subscribe(o(this,Zt)),o(this,Zt).call(this)}get element(){return o(this,j)}destroy(){o(this,j).removeEventListener("click",o(this,ce)),o(this,dt).counter.unsubscribe(o(this,Zt)),o(this,j).remove()}}j=new WeakMap,dt=new WeakMap,Ut=new WeakMap,le=new WeakMap,ce=new WeakMap,Zt=new WeakMap;exports.ScrollBulletButtonsElement=class extends $e{constructor(){super(...arguments),as(this,Ct,[]),as(this,se,cs.debounce(()=>{Ot(this,Ct).forEach(e=>e.destroy()),ls(this,Ct,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Js(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ot(this,Ct).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ot(this,se)),Ot(this,se).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ot(this,se)),Ot(this,Ct).forEach(e=>e.destroy()),ls(this,Ct,[])}};Ct=new WeakMap;se=new WeakMap;exports.ScrollBulletButtonsElement=Ns([vt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Qs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Ys=(r,e,i,h)=>{for(var n=h>1?void 0:h?Xs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Qs(e,i,n),n},ts=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(ts(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,h)=>(ts(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i),P=(r,e,i)=>(ts(r,e,"access private method"),i),qt,yt,Pt,Et,kt,V,I,H,G,Mt,L,ut,pt,ot,at,lt,Bt,ie,x,K,Z,ft,St,Q,be,v,At,It,Ce,B,X,z,W,T,re,Lt,k,ye,Be,es,ds,Ae,ms,Ie,vs,He,gs,Ge,ws,Ue,_s,Ze,bs,Pe,he,nt,Wt,ss,Cs,is,ys,Ee,Ke,ke;exports.ScrollSegmentElement=class extends $e{constructor(){super(...arguments),a(this,ye),a(this,es),a(this,Ae),a(this,Ie),a(this,He),a(this,Ge),a(this,Ue),a(this,Ze),a(this,nt),a(this,ss),a(this,is),a(this,Ee),a(this,qt,new S.CSSProperty(this,"--target","")),a(this,yt,new S.CSSProperty(this,"--disabled",!1)),a(this,Pt,new S.CSSProperty(this,"--distance-offset",0)),a(this,Et,new S.CSSProperty(this,"--start-offset",0)),a(this,kt,new S.CSSProperty(this,"--capture-once",!1)),a(this,V,new S.CSSProperty(this,"--captured","")),a(this,I,new S.CSSProperty(this,"--released","")),a(this,H,new S.CSSProperty(this,"--captured-from-start","")),a(this,G,new S.CSSProperty(this,"--captured-from-finish","")),a(this,Mt,new S.CSSProperty(this,"--released-from-start","")),a(this,L,new S.CSSProperty(this,"--released-from-finish","")),a(this,ut,new S.CSSProperty(this,"--passed-var","")),a(this,pt,new S.CSSProperty(this,"--progress-var","")),a(this,ot,new S.CSSProperty(this,"--distance-var","")),a(this,at,new S.CSSProperty(this,"--start-var","")),a(this,lt,new S.CSSProperty(this,"--finish-var","")),a(this,Bt,new S.CSSProperty(this,"--smoothstep",!1)),a(this,ie,new S.CSSProperty(this,"--smootherstep",!1)),a(this,x,new wt.Store(!1)),a(this,K,new wt.Store(!1)),a(this,Z,new wt.Store(!1)),a(this,ft,new wt.Store(!1)),a(this,St,new wt.Store(!1)),a(this,Q,new wt.Store(!1)),a(this,be,[]),a(this,v,this),a(this,At,0),a(this,It,0),a(this,Ce,0),a(this,B,0),a(this,X,0),a(this,z,0),a(this,W,0),a(this,T,0),a(this,re,!1),a(this,Lt,!1),a(this,k,!0),a(this,Pe,()=>{t(this,k)||(this.resize(),t(this,he).call(this))}),a(this,he,()=>{!t(this,k)&&t(this,re)&&this.tick()}),a(this,ke,cs.debounce(()=>{const e=Vt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((h,n)=>{h.element===this.scrollElement&&(i=n)}),m(this,be,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return t(this,Pt)}get startOffsetCSSProperty(){return t(this,Et)}get captureOnceCSSProperty(){return t(this,kt)}get capturedCSSProperty(){return t(this,V)}get releasedCSSProperty(){return t(this,I)}get capturedFromStartCSSProperty(){return t(this,H)}get capturedFromFinishCSSProperty(){return t(this,G)}get releasedFromStartCSSProperty(){return t(this,Mt)}get releasedFromFinishCSSProperty(){return t(this,L)}get passedVarCSSProperty(){return t(this,ut)}get progressVarCSSProperty(){return t(this,pt)}get distanceVarCSSProperty(){return t(this,ot)}get startVarCSSProperty(){return t(this,at)}get finishVarCSSProperty(){return t(this,lt)}get smoothstepCSSProperty(){return t(this,Bt)}get smootherstepCSSProperty(){return t(this,ie)}get disabledCSSProperty(){return t(this,yt)}get targetCSSProperty(){return t(this,qt)}get isCaptured(){return t(this,x)}get isReleased(){return t(this,K)}get isCapturedFromStart(){return t(this,Z)}get isReleasedFromStart(){return t(this,ft)}get isCapturedFromFinish(){return t(this,St)}get isReleasedFromFinish(){return t(this,Q)}get directionPosition(){return t(this,At)}get directionSize(){return t(this,It)}get passed(){return t(this,B)}get progress(){return t(this,X)}get start(){return t(this,z)}get finish(){return t(this,T)}get distance(){return t(this,W)}get isCapturedOnce(){return t(this,Lt)}get isDisabled(){return t(this,k)}resize(){m(this,It,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),m(this,At,this.scrollElement.vertical?mt.getCumulativeOffsetTop(this,this.scrollElement):mt.getCumulativeOffsetLeft(this,this.scrollElement)),m(this,z,this.getStart()),m(this,W,this.getDistance()),m(this,z,t(this,z)+t(this,Et).current),m(this,W,t(this,W)+t(this,Pt).current),m(this,T,t(this,z)+t(this,W)),this.scrollElement.currentScrollValue>t(this,T)&&!t(this,x).current&&!t(this,K).current&&(t(this,x).current=!0),this.setVar(t(this,at).current,t(this,z)),this.setVar(t(this,lt).current,t(this,T)),this.setVar(t(this,ot).current,t(this,W)),m(this,re,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,be).forEach(h=>{e+=h.value}),m(this,B,this.updateValue(e-t(this,z),0,t(this,W))||0),m(this,X,t(this,B)/t(this,W)||0);const i=Math.round(e);t(this,x).current&&(i>t(this,z)?t(this,Z).current||P(this,He,gs).call(this):t(this,Z).current&&!t(this,ft).current&&P(this,Ue,_s).call(this),i<t(this,T)?t(this,Q).current&&!t(this,St).current&&P(this,Ge,ws).call(this):t(this,Z).current&&!t(this,Q).current&&P(this,Ze,bs).call(this)),i>t(this,z)&&i<t(this,T)?(P(this,ye,Be).call(this),t(this,x).current||P(this,Ae,ms).call(this)):t(this,x).current&&(m(this,B,Ht.step(t(this,W)/2,t(this,B),0,t(this,W))),m(this,X,t(this,B)/t(this,W)),P(this,ye,Be).call(this),P(this,Ie,vs).call(this)),t(this,Lt)&&t(this,kt).current&&(t(this,V).current&&t(this,v).classList.add(t(this,V).current),m(this,k,!0))}disable(){this.style.cssText="",m(this,At,0),m(this,It,0),m(this,B,0),m(this,X,0),m(this,z,0),m(this,W,0),m(this,T,0),m(this,re,!1),t(this,x).current=!1,t(this,K).current=!1,t(this,Z).current=!1,t(this,ft).current=!1,t(this,St).current=!1,t(this,Q).current=!1,m(this,Lt,!1),m(this,k,!0),P(this,Ee,Ke).call(this)}enable(){m(this,k,!1)}connectedCallback(){super.connectedCallback(),t(this,qt).observe(),t(this,yt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,kt).observe(),t(this,V).observe(),t(this,I).observe(),t(this,H).observe(),t(this,G).observe(),t(this,Mt).observe(),t(this,L).observe(),t(this,ut).observe(),t(this,pt).observe(),t(this,ot).observe(),t(this,at).observe(),t(this,lt).observe(),t(this,Bt).observe(),t(this,ie).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,ke)),t(this,ke).call(this),t(this,yt).current||this.enable(),t(this,qt).subscribe(i=>{i.previous&&P(this,Ee,Ke).call(this),i.current?i.current==="parent"?m(this,v,this.parentElement||this):m(this,v,document.querySelector(i.current)||this):m(this,v,this)}),t(this,yt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,Et).subscribe(()=>{e&&!t(this,k)&&this.resize()}),t(this,Pt).subscribe(()=>{e&&!t(this,k)&&this.resize()}),t(this,V).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,H).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,G).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,I).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,Mt).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,L).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,kt).subscribe(i=>{t(this,k)||!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,ut).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),t(this,pt).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,t(this,X)))}),t(this,at).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,t(this,z)))}),t(this,lt).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,t(this,T)))}),t(this,ot).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,t(this,W)))}),Kt.windowResizer.subscribe(t(this,Pe),Ve.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,he)),e=!0}disconnectedCallback(){Kt.windowResizer.unsubscribe(t(this,Pe)),this.scrollElement.offScroll(t(this,he)),t(this,qt).close(),t(this,yt).close(),t(this,Pt).close(),t(this,Et).close(),t(this,kt).close(),t(this,V).close(),t(this,I).close(),t(this,H).close(),t(this,G).close(),t(this,Mt).close(),t(this,L).close(),t(this,ut).close(),t(this,pt).close(),t(this,ot).close(),t(this,at).close(),t(this,lt).close(),t(this,Bt).close(),t(this,ie).close(),t(this,x).close(),t(this,K).close(),t(this,Z).close(),t(this,ft).close(),t(this,St).close(),t(this,Q).close(),this.disable()}removeVar(e){e&&t(this,v).style.removeProperty(`--${e}`)}setVar(e,i){e&&t(this,v).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,h=1){return this.smootherstepCSSProperty.current?Ht.smootherstep(e,i,h)*h:t(this,Bt).current?Ht.smoothstep(e,i,h)*h:Ht.clamp(e,i,h)}getDistance(){return t(this,It)+t(this,Ce)}getStart(){return t(this,At)-t(this,Ce)}};qt=new WeakMap;yt=new WeakMap;Pt=new WeakMap;Et=new WeakMap;kt=new WeakMap;V=new WeakMap;I=new WeakMap;H=new WeakMap;G=new WeakMap;Mt=new WeakMap;L=new WeakMap;ut=new WeakMap;pt=new WeakMap;ot=new WeakMap;at=new WeakMap;lt=new WeakMap;Bt=new WeakMap;ie=new WeakMap;x=new WeakMap;K=new WeakMap;Z=new WeakMap;ft=new WeakMap;St=new WeakMap;Q=new WeakMap;be=new WeakMap;v=new WeakMap;At=new WeakMap;It=new WeakMap;Ce=new WeakMap;B=new WeakMap;X=new WeakMap;z=new WeakMap;W=new WeakMap;T=new WeakMap;re=new WeakMap;Lt=new WeakMap;k=new WeakMap;ye=new WeakSet;Be=function(){P(this,es,ds).call(this),this.setVar(t(this,ut).current,t(this,B)),this.setVar(t(this,pt).current,t(this,X))};es=new WeakSet;ds=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:t(this,W),start:t(this,z),finish:t(this,T),passed:t(this,B),progress:t(this,X)}}))};Ae=new WeakSet;ms=function(){t(this,x).current=!0,t(this,K).current=!1,m(this,Lt,!0),t(this,I).current&&t(this,v).classList.remove(t(this,I).current),t(this,L).current&&t(this,v).classList.remove(t(this,L).current),t(this,L).current&&t(this,v).classList.remove(t(this,L).current),t(this,V).current&&t(this,v).classList.add(t(this,V).current)};Ie=new WeakSet;vs=function(){t(this,K).current=!0,t(this,x).current=!1,m(this,Lt,!0),t(this,V).current&&t(this,v).classList.remove(t(this,V).current),t(this,H).current&&t(this,v).classList.remove(t(this,H).current),t(this,G).current&&t(this,v).classList.remove(t(this,G).current),t(this,I).current&&t(this,v).classList.add(t(this,I).current)};He=new WeakSet;gs=function(){t(this,x).current=!0,t(this,Z).current=!0,t(this,ft).current=!1,t(this,H).current&&t(this,v).classList.add(t(this,H).current)};Ge=new WeakSet;ws=function(){t(this,x).current=!0,t(this,St).current=!0,t(this,Q).current=!1,t(this,G).current&&t(this,v).classList.add(t(this,G).current)};Ue=new WeakSet;_s=function(){t(this,K).current=!0,t(this,ft).current=!0,t(this,Z).current=!1,t(this,L).current&&t(this,v).classList.add(t(this,L).current)};Ze=new WeakSet;bs=function(){t(this,K).current=!0,t(this,Q).current=!0,t(this,St).current=!1,t(this,L).current&&t(this,v).classList.add(t(this,L).current)};Pe=new WeakMap;he=new WeakMap;nt=new WeakSet;Wt=function(r){if(t(this,k)){r.previous&&t(this,v).classList.remove(r.previous),r.current&&t(this,v).classList.remove(r.current);return}r.current&&t(this,x).current?(r.previous&&t(this,v).classList.remove(r.previous),t(this,v).classList.add(r.current)):!r.current&&r.previous&&t(this,v).classList.remove(r.previous)};ss=new WeakSet;Cs=function(...r){r.forEach(e=>{e&&t(this,v).classList.remove(e)})};is=new WeakSet;ys=function(...r){r.forEach(e=>{e&&t(this,v).style.removeProperty(`--${e}`)})};Ee=new WeakSet;Ke=function(){P(this,ss,Cs).call(this,t(this,V).current,t(this,H).current,t(this,G).current,t(this,I).current,t(this,Mt).current,t(this,L).current),P(this,is,ys).call(this,t(this,ut).current,t(this,pt).current,t(this,ot).current,t(this,at).current,t(this,lt).current)};ke=new WeakMap;exports.ScrollSegmentElement=Ys([vt.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
|
1
|
+
"use strict";var rs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(rs(r,e,"read from private field"),i?i.call(r):e.get(r)),O=(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)},R=(r,e,i,h)=>(rs(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Es=require("../Damped-B0G_t-pw.cjs"),Ne=require("../browser-CpzFX2xg.cjs"),mt=require("../layout-8ryRAMGJ.cjs"),Ht=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const wt=require("../Store-BQGNOHlY.cjs"),ks=require("../Derived-BZtlW0bB.cjs");require("../ticker/index.cjs");const Fe=require("../DragControls-CV1YozSr.cjs"),vt=require("../custom-element/index.cjs"),Ve=require("../order/index.cjs"),Kt=require("../window-resizer/index.cjs"),Vt=require("../scroll-entries/index.cjs"),A=require("../tags-CueX-JLX.cjs"),Je=require("../createStylesheet-C8aQQ4hd.cjs"),hs=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ws=require("../Viewport-_WllZTJ0.cjs"),Ms=require("../gestures-DHLrn6Q8.cjs"),ns=require("../theme/index.cjs"),os=require("../element-resizer/index.cjs"),xs=require("../dom-JBOkFLTh.cjs"),cs=require("../function-MthRj-GJ.cjs");var Ls=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Vs=(r,e,i,h)=>{for(var n=h>1?void 0:h?zs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Ls(e,i,n),n},Qe=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(Qe(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)},g=(r,e,i,h)=>(Qe(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i),C=(r,e,i)=>(Qe(r,e,"access private method"),i),f,$,et,N,st,_t,it,Qt,D,$t,ue,pe,Ft,Dt,Rt,w,We,d,fe,Se,M,b,q,J,xt,ct,y,Xt,bt,Nt,Jt,ne,Me,Gt,oe,xe,Xe,Le,Ye,de,De,me,Re,tt,Oe,Te,us,Yt,ve,qe,ze,je,_,E,zt,Y;class Os{constructor(e,i){O(this,_,void 0);O(this,E,void 0);O(this,zt,0);O(this,Y,0);R(this,_,e),R(this,E,i),Vt.scrollEntries.register(o(this,_))}get size(){return o(this,zt)}get position(){return o(this,Y)}destroy(){Vt.scrollEntries.unregister(o(this,_)),o(this,_).style.transform=""}setSize(e){e?(o(this,_).style.setProperty("--size",e+"px"),o(this,E).axisCSSProperty.current==="x"?(o(this,_).style.width=e+"px",o(this,_).style.height=""):(o(this,_).style.height=e+"px",o(this,_).style.width="")):(o(this,_).style.width="",o(this,_).style.height="",o(this,_).style.removeProperty("--size"))}resize(){R(this,zt,o(this,E).vertical?o(this,_).offsetHeight:o(this,_).offsetWidth),R(this,Y,o(this,E).vertical?mt.getCumulativeOffsetTop(o(this,_)):mt.getCumulativeOffsetLeft(o(this,_))),R(this,Y,o(this,Y)-o(this,E).contentPosition)}transform(){let e=0;const i=o(this,E).viewportSize;o(this,E).infiniteCSSProperty.current&&o(this,E).overscroll&&o(this,Y)+o(this,zt)<o(this,E).currentScrollValue&&(e=o(this,E).distance*-1-o(this,E).gap),Vt.scrollEntries.update(o(this,_),o(this,E).axisCSSProperty.current,e);const h=o(this,E).currentScrollValue+e,n=o(this,Y)-o(this,E).viewportSize-i,c=o(this,Y)+o(this,zt)+i,u=Ht.clamp(h,n,c);o(this,E).vertical?o(this,_).style.transform=`translate3d(0px, ${u*-1}px, 0px)`:o(this,_).style.transform=`translate3d(${u*-1}px, 0px, 0px)`}}_=new WeakMap,E=new WeakMap,zt=new WeakMap,Y=new WeakMap;const $s=Je.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)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends vt.CustomElement{constructor(){super(),l(this,ne),l(this,Gt),l(this,xe),l(this,Le),l(this,de),l(this,me),l(this,Te),l(this,ve),l(this,ze),l(this,f,null),l(this,$,new S.CSSProperty(this,"--axis","y")),l(this,et,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),l(this,N,new S.CSSProperty(this,"--split",!1)),l(this,st,new S.CSSProperty(this,"--sectional",!1)),l(this,_t,new S.CSSProperty(this,"--wheel-max-delta",!1)),l(this,it,new S.CSSProperty(this,"--sections-in-view",1)),l(this,Qt,new S.CSSProperty(this,"--auto-size",!1)),l(this,D,new S.CSSProperty(this,"--infinite",!1)),l(this,$t,new S.CSSProperty(this,"--damping",20)),l(this,ue,new S.CSSProperty(this,"--mass",0)),l(this,pe,new S.CSSProperty(this,"--stiffness",0)),l(this,Ft,new S.CSSProperty(this,"--mouse-drag",!1)),l(this,Dt,new S.CSSProperty(this,"--disabled",!1)),l(this,Rt,new S.CSSProperty(this,"--hibernated",!1)),l(this,w,null),l(this,We,null),l(this,d,[]),l(this,fe,0),l(this,Se,0),l(this,M,0),l(this,b,0),l(this,q,0),l(this,J,null),l(this,xt,null),l(this,ct,null),l(this,y,new wt.Store(0)),l(this,Xt,0),l(this,bt,0),l(this,Nt,!0),l(this,Jt,!0),l(this,tt,()=>{const e=this.currentScrollValue/s(this,b)||0;if(g(this,fe,this.vertical?mt.getCumulativeOffsetTop(this):mt.getCumulativeOffsetLeft(this)),g(this,Se,this.vertical?mt.getCumulativeOffsetTop(s(this,w)):mt.getCumulativeOffsetLeft(s(this,w))),g(this,M,this.vertical?this.offsetHeight:this.offsetWidth),s(this,et).current){g(this,b,s(this,M)*s(this,et).current);const i=s(this,b)+s(this,M);this.vertical?(s(this,w).style.width=i+"px",s(this,w).style.height="100%"):(s(this,w).style.height=i+"px",s(this,w).style.width="100%")}else this.vertical?(s(this,w).style.width="100%",s(this,w).style.height="max-content",g(this,b,s(this,w).offsetHeight-s(this,M))):(s(this,w).style.width="max-content",s(this,w).style.height="100%",g(this,b,s(this,w).offsetWidth-s(this,M)));if(this.vertical?g(this,q,hs.cssUnitParser.parse(getComputedStyle(s(this,w)).rowGap)):g(this,q,hs.cssUnitParser.parse(getComputedStyle(s(this,w)).columnGap)),s(this,Qt).current&&s(this,d).length){const i=s(this,it).current,h=(s(this,M)-s(this,q)*(i-1))/i;s(this,d).forEach(n=>{n.setSize(h)})}else s(this,d).forEach(i=>{i.setSize()});if(!s(this,D).current){const i=getComputedStyle(this);g(this,b,s(this,b)+(this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd))),s(this,f).max=s(this,b)}if(s(this,d).forEach(i=>{i.resize(),i.transform()}),s(this,D).current&&s(this,d).length){const i=s(this,d)[s(this,d).length-1],h=i.position+i.size-s(this,M),n=s(this,b)-h;g(this,bt,i.position+i.size+n)}else g(this,bt,s(this,b));if(s(this,st).current&&s(this,d).length){const i=s(this,d)[s(this,y).current];s(this,f).set(i.position,!0)}else s(this,f).set(e*s(this,b),!0)}),l(this,Oe,()=>{const e=this.currentScrollValue;if(g(this,Xt,Math.max(0,e-s(this,b))),s(this,d).length){let i=0;for(let h=0;h<s(this,d).length;h++){const n=s(this,d)[h];n.transform(),this.targetScrollValue+n.size/2>=n.position&&(i=h)}s(this,y).current=i}else this.vertical?s(this,w).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:s(this,w).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Vt.scrollEntries.update(this,s(this,$).current,e)}),l(this,Yt,(e,i)=>{if(!(e==="drag"&&!Ws.device.isMobile&&!s(this,Ft).current))if(s(this,st).current){const h=Math.sign(i);s(this,d).length?this.shiftSections(h):s(this,f).shift(h*s(this,M))}else s(this,f).shift(i)}),Ne.isBrowser&&(g(this,f,new Es.Damped(0,{damping:.01,min:0,order:Ve.TICK_ORDER.SCROLL})),this.openShadow($s),A.element(this,{tabIndex:0,children:[A.div({class:"static",children:[A.slot({name:"static"})]}),A.div({class:"content",children:[A.slot({ref:e=>g(this,We,e)})],style:{flexDirection:new ks.Derived(s(this,$),e=>e==="x"?"row":"column")},ref:e=>g(this,w,e)})]}),g(this,J,new Fe.WheelControls({element:this})),s(this,J).changeEvent.subscribe(s(this,Yt)),g(this,xt,new Fe.KeyboardControls({element:this})),s(this,xt).changeEvent.subscribe(s(this,Yt)),g(this,ct,new Fe.DragControls({element:this})),s(this,ct).changeEvent.subscribe(s(this,Yt)),s(this,$).subscribe(({current:e})=>{s(this,w).style.flexDirection=e==="x"?"row":"column",s(this,J).axis=s(this,_t).current?"max":e,s(this,xt).dimension=e==="x"?"width":"height",s(this,ct).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&s(this,tt).call(this)}),s(this,_t).subscribe(e=>{s(this,J).axis=e.current?"max":s(this,$).current}),s(this,et).subscribe(()=>{this.isConnected&&s(this,tt).call(this)}),s(this,N).subscribe(({current:e})=>{this.isConnected&&(e?C(this,ne,Me).call(this):C(this,Gt,oe).call(this))}),s(this,st).subscribe(e=>{s(this,y).current=0,s(this,J).debounce=e.current,s(this,ct).swipe=e.current,s(this,f).reset(),this.isConnected&&(e.current&&!e.previous?C(this,ne,Me).call(this):!e.current&&e.previous&&C(this,Gt,oe).call(this))}),s(this,it).subscribe(e=>{this.isConnected&&s(this,tt).call(this)}),s(this,Qt).subscribe(e=>{this.isConnected&&s(this,tt).call(this)}),s(this,D).subscribe(e=>{e.current?(this.isConnected&&(s(this,d).length||(s(this,N).current=!0)),s(this,d).length&&(s(this,f).max=1/0,s(this,f).min=-1/0)):(g(this,Xt,0),s(this,f).max=s(this,b),s(this,f).min=0)}),s(this,$t).subscribe(e=>{s(this,f).damping=e.current}),s(this,ue).subscribe(e=>{s(this,f).mass=e.current}),s(this,pe).subscribe(e=>{s(this,f).stiffness=e.current}),s(this,Dt).subscribe(e=>{e.current&&!e.previous?C(this,xe,Xe).call(this):!e.current&&e.previous&&C(this,Le,Ye).call(this)}),s(this,Rt).subscribe(e=>{e.current&&!e.previous?C(this,de,De).call(this):!e.current&&e.previous&&C(this,me,Re).call(this)}),s(this,f).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),s(this,y).subscribe(e=>{s(this,d).length&&C(this,ze,je).call(this)}))}get axisCSSProperty(){return s(this,$)}get pagesCSSProperty(){return s(this,et)}get splitCSSProperty(){return s(this,N)}get sectionalCSSProperty(){return s(this,st)}get wheelMaxDeltaCSSProperty(){return s(this,_t)}get sectionsInViewCSSProperty(){return s(this,it)}get autoSizeCSSProperty(){return s(this,Qt)}get infiniteCSSProperty(){return s(this,D)}get dampingCSSProperty(){return s(this,$t)}get massCSSProperty(){return s(this,ue)}get stiffnessCSSProperty(){return s(this,pe)}get mouseDragCSSProperty(){return s(this,Ft)}get disabledCSSProperty(){return s(this,Dt)}get hibernatedCSSProperty(){return s(this,Rt)}get currentScrollValue(){return C(this,ve,qe).call(this,"current")}get targetScrollValue(){return C(this,ve,qe).call(this,"target")}get contentElement(){return s(this,w)}get sections(){return s(this,d)}get position(){return s(this,fe)}get contentPosition(){return s(this,Se)}get viewportSize(){return s(this,M)}get scrollSize(){return s(this,b)}get gap(){return s(this,q)}get counter(){return s(this,y)}get limit(){return s(this,d).length-s(this,it).current}get distance(){return s(this,bt)}get infiniteDistance(){return s(this,D).current?s(this,bt)+s(this,q):s(this,bt)}get overscroll(){return s(this,Xt)}get vertical(){return s(this,$).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return s(this,f).speed}get direction(){return s(this,f).direction}get isRunning(){return s(this,f).isRunning}get scrollWidth(){return s(this,$).current==="y"?0:s(this,f).length}get scrollHeight(){return s(this,$).current==="x"?0:s(this,f).length}onScroll(...e){return s(this,f).subscribe(...e)}offScroll(...e){s(this,f).unsubscribe(...e)}range(e,i,h=0){const n=e-h,c=n+i+h*2;return this.currentProgress<n?0:this.currentProgress>c?1:(this.currentProgress-n)/(c-n)}curve(e,i,h=0){return Math.sin(this.range(e,i,h)*Math.PI)}visible(e,i,h=0){const n=e-h,c=n+i+h*2;return this.currentProgress>=n&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!s(this,d).length)return;const h=s(this,y).current;C(this,Te,us).call(this,e);const n=s(this,d)[h],c=s(this,d)[s(this,y).current];if(n&&c){let u=0;s(this,D).current?s(this,y).current===0&&h===this.limit?u=s(this,b)+s(this,M)-n.position+s(this,q):s(this,y).current===this.limit&&h===0?u=c.position-(s(this,b)+s(this,M)+s(this,q)):u=c.position-n.position:u=c.position-n.position,s(this,f).shift(u,i==="instant")}}shiftSections(e,i="smooth"){s(this,d).length&&this.scrollToSection(s(this,y).current+e,i)}setPosition(e,i="smooth"){s(this,f).set(e,i==="instant")}connectedCallback(){s(this,$).observe(),s(this,et).observe(),s(this,N).observe(),s(this,st).observe(),s(this,_t).observe(),s(this,it).observe(),s(this,D).observe(),s(this,$t).observe(),s(this,Ft).observe(),s(this,Dt).observe(),s(this,Rt).observe(),C(this,me,Re).call(this)}disconnectedCallback(){s(this,$).unobserve(),s(this,et).unobserve(),s(this,N).unobserve(),s(this,st).unobserve(),s(this,_t).unobserve(),s(this,it).unobserve(),s(this,D).unobserve(),s(this,$t).unobserve(),s(this,Ft).unobserve(),s(this,Dt).unobserve(),s(this,Rt).unobserve(),C(this,de,De).call(this)}};f=new WeakMap;$=new WeakMap;et=new WeakMap;N=new WeakMap;st=new WeakMap;_t=new WeakMap;it=new WeakMap;Qt=new WeakMap;D=new WeakMap;$t=new WeakMap;ue=new WeakMap;pe=new WeakMap;Ft=new WeakMap;Dt=new WeakMap;Rt=new WeakMap;w=new WeakMap;We=new WeakMap;d=new WeakMap;fe=new WeakMap;Se=new WeakMap;M=new WeakMap;b=new WeakMap;q=new WeakMap;J=new WeakMap;xt=new WeakMap;ct=new WeakMap;y=new WeakMap;Xt=new WeakMap;bt=new WeakMap;Nt=new WeakMap;Jt=new WeakMap;ne=new WeakSet;Me=function(){C(this,Gt,oe).call(this),s(this,We).assignedElements().forEach(r=>{r instanceof HTMLElement&&s(this,d).push(new Os(r,this))}),s(this,w).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),s(this,tt).call(this),C(this,ze,je).call(this)};Gt=new WeakSet;oe=function(){s(this,d).forEach(r=>{r.destroy()}),g(this,d,[]),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};xe=new WeakSet;Xe=function(){s(this,Nt)||(g(this,Nt,!0),s(this,f).unsubscribe(s(this,Oe)),s(this,f).unlistenAnimationFrame(),s(this,J).disconnect(),s(this,xt).disconnect(),s(this,ct).disconnect())};Le=new WeakSet;Ye=function(){s(this,Nt)&&(g(this,Nt,!1),s(this,f).subscribe(s(this,Oe)),s(this,J).connect(),s(this,xt).connect(),s(this,ct).connect())};de=new WeakSet;De=function(){s(this,Jt)||(g(this,Jt,!0),Kt.windowResizer.unsubscribe(s(this,tt)),s(this,f).reset(),C(this,xe,Xe).call(this),s(this,w).style.transform="",s(this,N).current&&C(this,Gt,oe).call(this),Vt.scrollEntries.unregister(this))};me=new WeakSet;Re=function(){s(this,Jt)&&(g(this,Jt,!1),s(this,N).current&&C(this,ne,Me).call(this),Vt.scrollEntries.register(this),Kt.windowResizer.subscribe(s(this,tt),Ve.RESIZE_ORDER.SCROLL),C(this,Le,Ye).call(this))};tt=new WeakMap;Oe=new WeakMap;Te=new WeakSet;us=function(r){s(this,D).current?(s(this,y).current=r%s(this,d).length,s(this,y).current=s(this,y).current<0?s(this,d).length+s(this,y).current:s(this,y).current):s(this,y).current=Ht.clamp(r,0,this.limit)};Yt=new WeakMap;ve=new WeakSet;qe=function(r="current"){if(s(this,D).current&&s(this,d).length){const e=s(this,f)[r]%(s(this,b)+s(this,M)+s(this,q));return e<0?s(this,b)+e+s(this,M)+s(this,q):e}else return s(this,f)[r]};ze=new WeakSet;je=function(){s(this,d).length&&(s(this,y).current===0?this.classList.add("start"):this.classList.remove("start"),s(this,y).current===this.limit?this.classList.add("end"):this.classList.remove("end"))};exports.ScrollElement=Vs([vt.define("e-scroll")],exports.ScrollElement);var ae;class $e extends vt.CustomElement{constructor(){super(...arguments);O(this,ae,null)}get scrollElement(){return o(this,ae)}connectedCallback(){const i=xs.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?R(this,ae,i):console.error(this,"e-scroll not found")}}ae=new WeakMap;var Fs=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Rs=(r,e,i,h)=>{for(var n=h>1?void 0:h?Ds(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Fs(e,i,n),n},ps=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},p=(r,e,i)=>(ps(r,e,"read from private field"),i?i.call(r):e.get(r)),U=(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)},gt=(r,e,i,h)=>(ps(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i),jt,F,rt,ht,te,ee,Tt,ge,we,_e;const Ts=Je.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:ns.aptechkaTheme.colorLight.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:ns.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends $e{constructor(){super(),U(this,jt,null),U(this,F,null),U(this,rt,!1),U(this,ht,0),U(this,te,0),U(this,ee,0),U(this,Tt,()=>{gt(this,rt,this.offsetWidth>this.offsetHeight);const e=p(this,rt)?this.offsetWidth:this.offsetHeight;gt(this,ht,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),gt(this,ht,Math.max(p(this,ht),30)),p(this,rt)?(p(this,F).style.width=p(this,ht)+"px",p(this,F).style.height="100%"):(p(this,F).style.width="100%",p(this,F).style.height=p(this,ht)+"px"),gt(this,te,e-p(this,ht)),this.scrollElement.scrollSize||(this.style.display="none")}),U(this,ge,()=>{gt(this,ee,this.scrollElement.currentProgress*p(this,te)),p(this,rt)?p(this,F).style.transform=`translate3d(${p(this,ee)}px, 0px, 0px)`:p(this,F).style.transform=`translate3d(0px, ${p(this,ee)}px, 0px)`}),U(this,we,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),U(this,_e,e=>{document.documentElement.classList.add("grabbing"),Ms.setupDrag(n=>{const c=p(this,rt)?n.x:n.y,u=this.scrollElement.distance/p(this,te),Ps=(c-h)*u;this.scrollElement.setPosition(i+Ps)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,h=p(this,rt)?e.x:e.y}),Ne.isBrowser&&(this.openShadow(Ts),A.element(this,{slot:"static","drag-dead-zone":"",children:[A.slot({ref:e=>gt(this,jt,e),children:A.div({class:"default-thumb"})})]}))}get thumbElement(){return p(this,F)}connectedCallback(){super.connectedCallback();const e=p(this,jt).assignedElements()[0]||p(this,jt).firstElementChild;gt(this,F,e),p(this,F).addEventListener("pointerdown",p(this,_e)),Kt.windowResizer.subscribe(p(this,Tt),Ve.RESIZE_ORDER.SCROLL+1),os.elementResizer.subscribe(this,p(this,Tt)),this.scrollElement.onScroll(p(this,ge)),this.scrollElement.axisCSSProperty.subscribe(p(this,we))}disconnectedCallback(){p(this,F).removeEventListener("pointerdown",p(this,_e)),Kt.windowResizer.unsubscribe(p(this,Tt)),os.elementResizer.unsubscribe(p(this,Tt)),this.scrollElement.offScroll(p(this,ge)),this.scrollElement.axisCSSProperty.unsubscribe(p(this,we))}};jt=new WeakMap;F=new WeakMap;rt=new WeakMap;ht=new WeakMap;te=new WeakMap;ee=new WeakMap;Tt=new WeakMap;ge=new WeakMap;we=new WeakMap;_e=new WeakMap;exports.ScrollbarElement=Rs([vt.define("e-scrollbar")],exports.ScrollbarElement);const qs=Je.createStylesheet({button:{all:"inherit"}});class fs extends $e{constructor(){super(),this.openShadow(qs),Ne.isBrowser&&A.element(this,{children:[A.button({onClick:()=>{this.handleClick()},children:[A.slot()]})]})}}var Bs=Object.defineProperty,As=Object.getOwnPropertyDescriptor,Is=(r,e,i,h)=>{for(var n=h>1?void 0:h?As(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Bs(e,i,n),n};exports.ScrollSetButtonElement=class extends fs{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=Is([vt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var Hs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Us=(r,e,i,h)=>{for(var n=h>1?void 0:h?Gs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Hs(e,i,n),n};exports.ScrollStepButtonElement=class extends fs{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=Us([vt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var Zs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ns=(r,e,i,h)=>{for(var n=h>1?void 0:h?Ks(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Zs(e,i,n),n},Ss=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ot=(r,e,i)=>(Ss(r,e,"read from private field"),i?i.call(r):e.get(r)),as=(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,h)=>(Ss(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i),Ct,se,j,dt,Ut,le,ce,Zt;class Js{constructor(e,i,h){O(this,j,void 0);O(this,dt,void 0);O(this,Ut,void 0);O(this,le,void 0);O(this,ce,()=>{o(this,dt).scrollToSection(o(this,Ut),o(this,le))});O(this,Zt,()=>{o(this,j).classList.toggle("current",o(this,dt).counter.current===o(this,Ut))});R(this,j,document.createElement("button")),R(this,dt,e),R(this,le,h),R(this,Ut,i),o(this,j).addEventListener("click",o(this,ce)),o(this,dt).counter.subscribe(o(this,Zt)),o(this,Zt).call(this)}get element(){return o(this,j)}destroy(){o(this,j).removeEventListener("click",o(this,ce)),o(this,dt).counter.unsubscribe(o(this,Zt)),o(this,j).remove()}}j=new WeakMap,dt=new WeakMap,Ut=new WeakMap,le=new WeakMap,ce=new WeakMap,Zt=new WeakMap;exports.ScrollBulletButtonsElement=class extends $e{constructor(){super(...arguments),as(this,Ct,[]),as(this,se,cs.debounce(()=>{Ot(this,Ct).forEach(e=>e.destroy()),ls(this,Ct,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Js(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ot(this,Ct).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ot(this,se)),Ot(this,se).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ot(this,se)),Ot(this,Ct).forEach(e=>e.destroy()),ls(this,Ct,[])}};Ct=new WeakMap;se=new WeakMap;exports.ScrollBulletButtonsElement=Ns([vt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Qs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Ys=(r,e,i,h)=>{for(var n=h>1?void 0:h?Xs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(n=(h?u(e,i,n):u(n))||n);return h&&n&&Qs(e,i,n),n},ts=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(ts(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,h)=>(ts(r,e,"write to private field"),h?h.call(r,i):e.set(r,i),i),P=(r,e,i)=>(ts(r,e,"access private method"),i),qt,yt,Pt,Et,kt,V,I,H,G,Mt,L,ut,pt,ot,at,lt,Bt,ie,x,K,Z,ft,St,Q,be,v,At,It,Ce,B,X,z,W,T,re,Lt,k,ye,Be,es,ds,Ae,ms,Ie,vs,He,gs,Ge,ws,Ue,_s,Ze,bs,Pe,he,nt,Wt,ss,Cs,is,ys,Ee,Ke,ke;exports.ScrollSegmentElement=class extends $e{constructor(){super(...arguments),a(this,ye),a(this,es),a(this,Ae),a(this,Ie),a(this,He),a(this,Ge),a(this,Ue),a(this,Ze),a(this,nt),a(this,ss),a(this,is),a(this,Ee),a(this,qt,new S.CSSProperty(this,"--target","")),a(this,yt,new S.CSSProperty(this,"--disabled",!1)),a(this,Pt,new S.CSSProperty(this,"--distance-offset",0)),a(this,Et,new S.CSSProperty(this,"--start-offset",0)),a(this,kt,new S.CSSProperty(this,"--capture-once",!1)),a(this,V,new S.CSSProperty(this,"--captured","")),a(this,I,new S.CSSProperty(this,"--released","")),a(this,H,new S.CSSProperty(this,"--captured-from-start","")),a(this,G,new S.CSSProperty(this,"--captured-from-finish","")),a(this,Mt,new S.CSSProperty(this,"--released-from-start","")),a(this,L,new S.CSSProperty(this,"--released-from-finish","")),a(this,ut,new S.CSSProperty(this,"--passed-var","")),a(this,pt,new S.CSSProperty(this,"--progress-var","")),a(this,ot,new S.CSSProperty(this,"--distance-var","")),a(this,at,new S.CSSProperty(this,"--start-var","")),a(this,lt,new S.CSSProperty(this,"--finish-var","")),a(this,Bt,new S.CSSProperty(this,"--smoothstep",!1)),a(this,ie,new S.CSSProperty(this,"--smootherstep",!1)),a(this,x,new wt.Store(!1)),a(this,K,new wt.Store(!1)),a(this,Z,new wt.Store(!1)),a(this,ft,new wt.Store(!1)),a(this,St,new wt.Store(!1)),a(this,Q,new wt.Store(!1)),a(this,be,[]),a(this,v,this),a(this,At,0),a(this,It,0),a(this,Ce,0),a(this,B,0),a(this,X,0),a(this,z,0),a(this,W,0),a(this,T,0),a(this,re,!1),a(this,Lt,!1),a(this,k,!0),a(this,Pe,()=>{t(this,k)||(this.resize(),t(this,he).call(this))}),a(this,he,()=>{!t(this,k)&&t(this,re)&&this.tick()}),a(this,ke,cs.debounce(()=>{const e=Vt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((h,n)=>{h.element===this.scrollElement&&(i=n)}),m(this,be,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return t(this,Pt)}get startOffsetCSSProperty(){return t(this,Et)}get captureOnceCSSProperty(){return t(this,kt)}get capturedCSSProperty(){return t(this,V)}get releasedCSSProperty(){return t(this,I)}get capturedFromStartCSSProperty(){return t(this,H)}get capturedFromFinishCSSProperty(){return t(this,G)}get releasedFromStartCSSProperty(){return t(this,Mt)}get releasedFromFinishCSSProperty(){return t(this,L)}get passedVarCSSProperty(){return t(this,ut)}get progressVarCSSProperty(){return t(this,pt)}get distanceVarCSSProperty(){return t(this,ot)}get startVarCSSProperty(){return t(this,at)}get finishVarCSSProperty(){return t(this,lt)}get smoothstepCSSProperty(){return t(this,Bt)}get smootherstepCSSProperty(){return t(this,ie)}get disabledCSSProperty(){return t(this,yt)}get targetCSSProperty(){return t(this,qt)}get isCaptured(){return t(this,x)}get isReleased(){return t(this,K)}get isCapturedFromStart(){return t(this,Z)}get isReleasedFromStart(){return t(this,ft)}get isCapturedFromFinish(){return t(this,St)}get isReleasedFromFinish(){return t(this,Q)}get directionPosition(){return t(this,At)}get directionSize(){return t(this,It)}get passed(){return t(this,B)}get progress(){return t(this,X)}get start(){return t(this,z)}get finish(){return t(this,T)}get distance(){return t(this,W)}get isCapturedOnce(){return t(this,Lt)}get isDisabled(){return t(this,k)}resize(){m(this,It,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),m(this,At,this.scrollElement.vertical?mt.getCumulativeOffsetTop(this,this.scrollElement):mt.getCumulativeOffsetLeft(this,this.scrollElement)),m(this,z,this.getStart()),m(this,W,this.getDistance()),m(this,z,t(this,z)+t(this,Et).current),m(this,W,t(this,W)+t(this,Pt).current),m(this,T,t(this,z)+t(this,W)),this.scrollElement.currentScrollValue>t(this,T)&&!t(this,x).current&&!t(this,K).current&&(t(this,x).current=!0),this.setVar(t(this,at).current,t(this,z)),this.setVar(t(this,lt).current,t(this,T)),this.setVar(t(this,ot).current,t(this,W)),m(this,re,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,be).forEach(h=>{e+=h.value}),m(this,B,this.updateValue(e-t(this,z),0,t(this,W))||0),m(this,X,t(this,B)/t(this,W)||0);const i=Math.round(e);t(this,x).current&&(i>t(this,z)?t(this,Z).current||P(this,He,gs).call(this):t(this,Z).current&&!t(this,ft).current&&P(this,Ue,_s).call(this),i<t(this,T)?t(this,Q).current&&!t(this,St).current&&P(this,Ge,ws).call(this):t(this,Z).current&&!t(this,Q).current&&P(this,Ze,bs).call(this)),i>t(this,z)&&i<t(this,T)?(P(this,ye,Be).call(this),t(this,x).current||P(this,Ae,ms).call(this)):t(this,x).current&&(m(this,B,Ht.step(t(this,W)/2,t(this,B),0,t(this,W))),m(this,X,t(this,B)/t(this,W)),P(this,ye,Be).call(this),P(this,Ie,vs).call(this)),t(this,Lt)&&t(this,kt).current&&(t(this,V).current&&t(this,v).classList.add(t(this,V).current),m(this,k,!0))}disable(){this.style.cssText="",m(this,At,0),m(this,It,0),m(this,B,0),m(this,X,0),m(this,z,0),m(this,W,0),m(this,T,0),m(this,re,!1),t(this,x).current=!1,t(this,K).current=!1,t(this,Z).current=!1,t(this,ft).current=!1,t(this,St).current=!1,t(this,Q).current=!1,m(this,Lt,!1),m(this,k,!0),P(this,Ee,Ke).call(this)}enable(){m(this,k,!1)}connectedCallback(){super.connectedCallback(),t(this,qt).observe(),t(this,yt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,kt).observe(),t(this,V).observe(),t(this,I).observe(),t(this,H).observe(),t(this,G).observe(),t(this,Mt).observe(),t(this,L).observe(),t(this,ut).observe(),t(this,pt).observe(),t(this,ot).observe(),t(this,at).observe(),t(this,lt).observe(),t(this,Bt).observe(),t(this,ie).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,ke)),t(this,ke).call(this),t(this,yt).current||this.enable(),t(this,qt).subscribe(i=>{i.previous&&P(this,Ee,Ke).call(this),i.current?i.current==="parent"?m(this,v,this.parentElement||this):m(this,v,document.querySelector(i.current)||this):m(this,v,this)}),t(this,yt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,Et).subscribe(()=>{e&&!t(this,k)&&this.resize()}),t(this,Pt).subscribe(()=>{e&&!t(this,k)&&this.resize()}),t(this,V).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,H).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,G).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,I).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,Mt).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,L).subscribe(i=>{P(this,nt,Wt).call(this,i)}),t(this,kt).subscribe(i=>{t(this,k)||!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,ut).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),t(this,pt).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,t(this,X)))}),t(this,at).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,t(this,z)))}),t(this,lt).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,t(this,T)))}),t(this,ot).subscribe(i=>{t(this,k)||(this.removeVar(i.previous),this.setVar(i.current,t(this,W)))}),Kt.windowResizer.subscribe(t(this,Pe),Ve.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,he)),e=!0}disconnectedCallback(){Kt.windowResizer.unsubscribe(t(this,Pe)),this.scrollElement.offScroll(t(this,he)),t(this,qt).close(),t(this,yt).close(),t(this,Pt).close(),t(this,Et).close(),t(this,kt).close(),t(this,V).close(),t(this,I).close(),t(this,H).close(),t(this,G).close(),t(this,Mt).close(),t(this,L).close(),t(this,ut).close(),t(this,pt).close(),t(this,ot).close(),t(this,at).close(),t(this,lt).close(),t(this,Bt).close(),t(this,ie).close(),t(this,x).close(),t(this,K).close(),t(this,Z).close(),t(this,ft).close(),t(this,St).close(),t(this,Q).close(),this.disable()}removeVar(e){e&&t(this,v).style.removeProperty(`--${e}`)}setVar(e,i){e&&t(this,v).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,h=1){return this.smootherstepCSSProperty.current?Ht.smootherstep(e,i,h)*h:t(this,Bt).current?Ht.smoothstep(e,i,h)*h:Ht.clamp(e,i,h)}getDistance(){return t(this,It)+t(this,Ce)}getStart(){return t(this,At)-t(this,Ce)}};qt=new WeakMap;yt=new WeakMap;Pt=new WeakMap;Et=new WeakMap;kt=new WeakMap;V=new WeakMap;I=new WeakMap;H=new WeakMap;G=new WeakMap;Mt=new WeakMap;L=new WeakMap;ut=new WeakMap;pt=new WeakMap;ot=new WeakMap;at=new WeakMap;lt=new WeakMap;Bt=new WeakMap;ie=new WeakMap;x=new WeakMap;K=new WeakMap;Z=new WeakMap;ft=new WeakMap;St=new WeakMap;Q=new WeakMap;be=new WeakMap;v=new WeakMap;At=new WeakMap;It=new WeakMap;Ce=new WeakMap;B=new WeakMap;X=new WeakMap;z=new WeakMap;W=new WeakMap;T=new WeakMap;re=new WeakMap;Lt=new WeakMap;k=new WeakMap;ye=new WeakSet;Be=function(){P(this,es,ds).call(this),this.setVar(t(this,ut).current,t(this,B)),this.setVar(t(this,pt).current,t(this,X))};es=new WeakSet;ds=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:t(this,W),start:t(this,z),finish:t(this,T),passed:t(this,B),progress:t(this,X)}}))};Ae=new WeakSet;ms=function(){t(this,x).current=!0,t(this,K).current=!1,m(this,Lt,!0),t(this,I).current&&t(this,v).classList.remove(t(this,I).current),t(this,L).current&&t(this,v).classList.remove(t(this,L).current),t(this,L).current&&t(this,v).classList.remove(t(this,L).current),t(this,V).current&&t(this,v).classList.add(t(this,V).current)};Ie=new WeakSet;vs=function(){t(this,K).current=!0,t(this,x).current=!1,m(this,Lt,!0),t(this,V).current&&t(this,v).classList.remove(t(this,V).current),t(this,H).current&&t(this,v).classList.remove(t(this,H).current),t(this,G).current&&t(this,v).classList.remove(t(this,G).current),t(this,I).current&&t(this,v).classList.add(t(this,I).current)};He=new WeakSet;gs=function(){t(this,x).current=!0,t(this,Z).current=!0,t(this,ft).current=!1,t(this,H).current&&t(this,v).classList.add(t(this,H).current)};Ge=new WeakSet;ws=function(){t(this,x).current=!0,t(this,St).current=!0,t(this,Q).current=!1,t(this,G).current&&t(this,v).classList.add(t(this,G).current)};Ue=new WeakSet;_s=function(){t(this,K).current=!0,t(this,ft).current=!0,t(this,Z).current=!1,t(this,L).current&&t(this,v).classList.add(t(this,L).current)};Ze=new WeakSet;bs=function(){t(this,K).current=!0,t(this,Q).current=!0,t(this,St).current=!1,t(this,L).current&&t(this,v).classList.add(t(this,L).current)};Pe=new WeakMap;he=new WeakMap;nt=new WeakSet;Wt=function(r){if(t(this,k)){r.previous&&t(this,v).classList.remove(r.previous),r.current&&t(this,v).classList.remove(r.current);return}r.current&&t(this,x).current?(r.previous&&t(this,v).classList.remove(r.previous),t(this,v).classList.add(r.current)):!r.current&&r.previous&&t(this,v).classList.remove(r.previous)};ss=new WeakSet;Cs=function(...r){r.forEach(e=>{e&&t(this,v).classList.remove(e)})};is=new WeakSet;ys=function(...r){r.forEach(e=>{e&&t(this,v).style.removeProperty(`--${e}`)})};Ee=new WeakSet;Ke=function(){P(this,ss,Cs).call(this,t(this,V).current,t(this,H).current,t(this,G).current,t(this,I).current,t(this,Mt).current,t(this,L).current),P(this,is,ys).call(this,t(this,ut).current,t(this,pt).current,t(this,ot).current,t(this,at).current,t(this,lt).current)};ke=new WeakMap;exports.ScrollSegmentElement=Ys([vt.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
package/lib/scroll/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var a = (e, i, r) => (as(e, i, "read from private field"), r ? r.call(e) : i.get
|
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
i instanceof WeakSet ? i.add(e) : i.set(e, r);
|
|
9
9
|
}, R = (e, i, r, h) => (as(e, i, "write to private field"), h ? h.call(e, r) : i.set(e, r), r);
|
|
10
|
-
import { D as $s } from "../Damped-
|
|
10
|
+
import { D as $s } from "../Damped-DpaKIZqv.js";
|
|
11
11
|
import { i as Ze } from "../browser-0zX67oeU.js";
|
|
12
12
|
import { a as ke, g as Pe } from "../layout-HoBT_Da2.js";
|
|
13
13
|
import { c as Je, s as Fs, b as Os, a as Ds } from "../math-BOBiC4TN.js";
|
package/lib/select/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var P=(i,t,r)=>new Promise((a,s)=>{var c=o=>{try{n(r.next(o))}catch(f){s(f)}},d=o=>{try{n(r.throw(o))}catch(f){s(f)}},n=o=>o.done?a(o.value):Promise.resolve(o.value).then(c,d);n((r=r.apply(i,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../canvas/index.cjs"),I=require("../class-linked-status/index.cjs"),m=require("../css-property/index.cjs"),O=require("../custom-element/index.cjs"),M=require("../element-resizer/index.cjs"),R=require("../SourceManager-Bl_uduSS.cjs");require("../intersector/index.cjs");const q=require("../canvas-CU5Xjahf.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var z=Object.defineProperty,L=Object.getOwnPropertyDescriptor,A=(i,t,r,a)=>{for(var s=a>1?void 0:a?L(t,r):t,c=i.length-1,d;c>=0;c--)(d=i[c])&&(s=(a?d(t,r,s):d(s))||s);return a&&s&&z(t,r,s),s},k=(i,t,r)=>{if(!t.has(i))throw TypeError("Cannot "+r)},e=(i,t,r)=>(k(i,t,"read from private field"),r?r.call(i):t.get(i)),h=(i,t,r)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,r)},w=(i,t,r,a)=>(k(i,t,"write to private field"),a?a.call(i,r):t.set(i,r),r),v,l,_,C,g,S,u,b,y,W,p;function D(i){const t=i.match(/\{([\d-]+)\}/);if(t){const r=t[1].split("-");if(r.length===2){const a=parseInt(r[0],10),s=parseInt(r[1],10);return{start:a,end:s}}}return null}exports.SequenceElement=class extends E.CanvasElement{constructor(t){super(),h(this,v,void 0),h(this,l,[]),h(this,_,new m.CSSProperty(this,"--fit","contain")),h(this,C,new m.CSSProperty(this,"--autoplay",!1)),h(this,g,new m.CSSProperty(this,"--offset-x",.5)),h(this,S,new m.CSSProperty(this,"--offset-y",.5)),h(this,u,new I.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1})),h(this,b,null),h(this,y,0),h(this,W,1),h(this,p,()=>{if(e(this,l).length){const s=e(this,l)[0];e(this,_).current==="cover"?w(this,b,q.cover(s.naturalWidth,s.naturalHeight,this.width,this.height,e(this,g).current,e(this,S).current)):w(this,b,q.contain(s.naturalWidth,s.naturalHeight,this.width,this.height,e(this,g).current,e(this,S).current))}});const r=(t==null?void 0:t.srcset)||this.getAttribute("srcset"),a=parseInt(((t==null?void 0:t.pad)||this.getAttribute("pad")||"1").toString());if(!r)throw new Error("Sequence Element must have a srcset attribute");e(this,_).subscribe(e(this,p)),e(this,g).subscribe(e(this,p)),e(this,S).subscribe(e(this,p)),w(this,v,new R.SourceManager({srcset:r})),e(this,v).subscribe(s=>P(this,null,function*(){if(s.current){const c=[],d=D(s.current.name);if(d)for(let n=d.start;n<=d.end;n++){const o=s.current.url.replace(/\{([^}]+)\}/,n.toString().padStart(a,"0")),f=new Image;f.src=o,c.push(f)}else{const n=new Image;n.src=s.current.url,c.push(n)}e(this,u).set("loading",!0),e(this,u).set("error",!1),e(this,u).set("loaded",!1);try{yield Promise.all(c.map((n,o)=>new Promise((f,x)=>{n.onload=()=>{f()},n.onerror=T=>{x(`${n.src} Image not found`)}}))),w(this,l,c),e(this,p).call(this),e(this,u).set("loaded",!0)}catch(n){console.error(n),e(this,u).set("error",!0)}e(this,u).set("loading",!1)}})),this.addEventListener("canvasRender",s=>{if(e(this,u).isFalse("loaded")||!e(this,b))return;s.detail.context.clearRect(0,0,s.detail.width,s.detail.height);const c=e(this,l)[e(this,y)];c&&s.detail.context.drawImage(c,...e(this,b)),e(this,C).current&&w(this,y,(e(this,y)+1)%e(this,l).length)})}setProgress(t){e(this,l).length&&w(this,y,Math.floor((e(this,l).length-1)*t))}connectedCallback(){super.connectedCallback(),e(this,C).observe(),e(this,_).observe(),e(this,g).observe(),e(this,S).observe(),e(this,v).connect(),M.elementResizer.subscribe(this,e(this,p))}disconnectedCallback(){super.disconnectedCallback(),e(this,C).unobserve(),e(this,_).unobserve(),e(this,g).unobserve(),e(this,S).unobserve(),w(this,l,[]),e(this,u).reset(),e(this,v).disconnect(),M.elementResizer.unsubscribe(e(this,p))}};v=new WeakMap;l=new WeakMap;_=new WeakMap;C=new WeakMap;g=new WeakMap;S=new WeakMap;u=new WeakMap;b=new WeakMap;y=new WeakMap;W=new WeakMap;p=new WeakMap;exports.SequenceElement=A([O.define("e-sequence")],exports.SequenceElement);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SourceManagerSourceSet } from '../source';
|
|
2
|
+
import { CanvasElement } from '../canvas';
|
|
3
|
+
|
|
4
|
+
export interface SequenceElementParameters {
|
|
5
|
+
srcset: SourceManagerSourceSet;
|
|
6
|
+
pad?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class SequenceElement extends CanvasElement {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(parameters?: SequenceElementParameters);
|
|
11
|
+
setProgress(value: number): void;
|
|
12
|
+
protected connectedCallback(): void;
|
|
13
|
+
protected disconnectedCallback(): void;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'e-sequence': SequenceElement;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
var W = (e, r, i) => new Promise((s, n) => {
|
|
2
|
+
var u = (h) => {
|
|
3
|
+
try {
|
|
4
|
+
g(i.next(h));
|
|
5
|
+
} catch (S) {
|
|
6
|
+
n(S);
|
|
7
|
+
}
|
|
8
|
+
}, a = (h) => {
|
|
9
|
+
try {
|
|
10
|
+
g(i.throw(h));
|
|
11
|
+
} catch (S) {
|
|
12
|
+
n(S);
|
|
13
|
+
}
|
|
14
|
+
}, g = (h) => h.done ? s(h.value) : Promise.resolve(h.value).then(u, a);
|
|
15
|
+
g((i = i.apply(e, r)).next());
|
|
16
|
+
});
|
|
17
|
+
import { CanvasElement as x } from "../canvas/index.js";
|
|
18
|
+
import { ClassLinkedStatus as E } from "../class-linked-status/index.js";
|
|
19
|
+
import { CSSProperty as M } from "../css-property/index.js";
|
|
20
|
+
import { define as O } from "../custom-element/index.js";
|
|
21
|
+
import { elementResizer as k } from "../element-resizer/index.js";
|
|
22
|
+
import { S as q } from "../SourceManager-D_8MZ3bR.js";
|
|
23
|
+
import "../intersector/index.js";
|
|
24
|
+
import { c as A, a as D } from "../canvas-DeZ0SLUJ.js";
|
|
25
|
+
import "../path-data-polyfill-DgeDWYeI.js";
|
|
26
|
+
var L = Object.defineProperty, R = Object.getOwnPropertyDescriptor, z = (e, r, i, s) => {
|
|
27
|
+
for (var n = s > 1 ? void 0 : s ? R(r, i) : r, u = e.length - 1, a; u >= 0; u--)
|
|
28
|
+
(a = e[u]) && (n = (s ? a(r, i, n) : a(n)) || n);
|
|
29
|
+
return s && n && L(r, i, n), n;
|
|
30
|
+
}, P = (e, r, i) => {
|
|
31
|
+
if (!r.has(e))
|
|
32
|
+
throw TypeError("Cannot " + i);
|
|
33
|
+
}, t = (e, r, i) => (P(e, r, "read from private field"), i ? i.call(e) : r.get(e)), o = (e, r, i) => {
|
|
34
|
+
if (r.has(e))
|
|
35
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
36
|
+
r instanceof WeakSet ? r.add(e) : r.set(e, i);
|
|
37
|
+
}, f = (e, r, i, s) => (P(e, r, "write to private field"), s ? s.call(e, i) : r.set(e, i), i), v, c, m, C, p, w, l, _, b, I, d;
|
|
38
|
+
function B(e) {
|
|
39
|
+
const r = e.match(/\{([\d-]+)\}/);
|
|
40
|
+
if (r) {
|
|
41
|
+
const i = r[1].split("-");
|
|
42
|
+
if (i.length === 2) {
|
|
43
|
+
const s = parseInt(i[0], 10), n = parseInt(i[1], 10);
|
|
44
|
+
return { start: s, end: n };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
let y = class extends x {
|
|
50
|
+
constructor(e) {
|
|
51
|
+
super(), o(this, v, void 0), o(this, c, []), o(this, m, new M(
|
|
52
|
+
this,
|
|
53
|
+
"--fit",
|
|
54
|
+
"contain"
|
|
55
|
+
)), o(this, C, new M(this, "--autoplay", !1)), o(this, p, new M(this, "--offset-x", 0.5)), o(this, w, new M(this, "--offset-y", 0.5)), o(this, l, new E(this, {
|
|
56
|
+
loading: !1,
|
|
57
|
+
loaded: !1,
|
|
58
|
+
error: !1
|
|
59
|
+
})), o(this, _, null), o(this, b, 0), o(this, I, 1), o(this, d, () => {
|
|
60
|
+
if (t(this, c).length) {
|
|
61
|
+
const s = t(this, c)[0];
|
|
62
|
+
t(this, m).current === "cover" ? f(this, _, A(
|
|
63
|
+
s.naturalWidth,
|
|
64
|
+
s.naturalHeight,
|
|
65
|
+
this.width,
|
|
66
|
+
this.height,
|
|
67
|
+
t(this, p).current,
|
|
68
|
+
t(this, w).current
|
|
69
|
+
)) : f(this, _, D(
|
|
70
|
+
s.naturalWidth,
|
|
71
|
+
s.naturalHeight,
|
|
72
|
+
this.width,
|
|
73
|
+
this.height,
|
|
74
|
+
t(this, p).current,
|
|
75
|
+
t(this, w).current
|
|
76
|
+
));
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const r = (e == null ? void 0 : e.srcset) || this.getAttribute("srcset"), i = parseInt(
|
|
80
|
+
((e == null ? void 0 : e.pad) || this.getAttribute("pad") || "1").toString()
|
|
81
|
+
);
|
|
82
|
+
if (!r)
|
|
83
|
+
throw new Error("Sequence Element must have a srcset attribute");
|
|
84
|
+
t(this, m).subscribe(t(this, d)), t(this, p).subscribe(t(this, d)), t(this, w).subscribe(t(this, d)), f(this, v, new q({
|
|
85
|
+
srcset: r
|
|
86
|
+
})), t(this, v).subscribe((s) => W(this, null, function* () {
|
|
87
|
+
if (s.current) {
|
|
88
|
+
const n = [], u = B(s.current.name);
|
|
89
|
+
if (u)
|
|
90
|
+
for (let a = u.start; a <= u.end; a++) {
|
|
91
|
+
const g = s.current.url.replace(
|
|
92
|
+
/\{([^}]+)\}/,
|
|
93
|
+
a.toString().padStart(i, "0")
|
|
94
|
+
), h = new Image();
|
|
95
|
+
h.src = g, n.push(h);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
const a = new Image();
|
|
99
|
+
a.src = s.current.url, n.push(a);
|
|
100
|
+
}
|
|
101
|
+
t(this, l).set("loading", !0), t(this, l).set("error", !1), t(this, l).set("loaded", !1);
|
|
102
|
+
try {
|
|
103
|
+
yield Promise.all(
|
|
104
|
+
n.map((a, g) => new Promise((h, S) => {
|
|
105
|
+
a.onload = () => {
|
|
106
|
+
h();
|
|
107
|
+
}, a.onerror = (H) => {
|
|
108
|
+
S(`${a.src} Image not found`);
|
|
109
|
+
};
|
|
110
|
+
}))
|
|
111
|
+
), f(this, c, n), t(this, d).call(this), t(this, l).set("loaded", !0);
|
|
112
|
+
} catch (a) {
|
|
113
|
+
console.error(a), t(this, l).set("error", !0);
|
|
114
|
+
}
|
|
115
|
+
t(this, l).set("loading", !1);
|
|
116
|
+
}
|
|
117
|
+
})), this.addEventListener("canvasRender", (s) => {
|
|
118
|
+
if (t(this, l).isFalse("loaded") || !t(this, _))
|
|
119
|
+
return;
|
|
120
|
+
s.detail.context.clearRect(0, 0, s.detail.width, s.detail.height);
|
|
121
|
+
const n = t(this, c)[t(this, b)];
|
|
122
|
+
n && s.detail.context.drawImage(n, ...t(this, _)), t(this, C).current && f(this, b, (t(this, b) + 1) % t(this, c).length);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
setProgress(e) {
|
|
126
|
+
t(this, c).length && f(this, b, Math.floor((t(this, c).length - 1) * e));
|
|
127
|
+
}
|
|
128
|
+
connectedCallback() {
|
|
129
|
+
super.connectedCallback(), t(this, C).observe(), t(this, m).observe(), t(this, p).observe(), t(this, w).observe(), t(this, v).connect(), k.subscribe(this, t(this, d));
|
|
130
|
+
}
|
|
131
|
+
disconnectedCallback() {
|
|
132
|
+
super.disconnectedCallback(), t(this, C).unobserve(), t(this, m).unobserve(), t(this, p).unobserve(), t(this, w).unobserve(), f(this, c, []), t(this, l).reset(), t(this, v).disconnect(), k.unsubscribe(t(this, d));
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
v = /* @__PURE__ */ new WeakMap();
|
|
136
|
+
c = /* @__PURE__ */ new WeakMap();
|
|
137
|
+
m = /* @__PURE__ */ new WeakMap();
|
|
138
|
+
C = /* @__PURE__ */ new WeakMap();
|
|
139
|
+
p = /* @__PURE__ */ new WeakMap();
|
|
140
|
+
w = /* @__PURE__ */ new WeakMap();
|
|
141
|
+
l = /* @__PURE__ */ new WeakMap();
|
|
142
|
+
_ = /* @__PURE__ */ new WeakMap();
|
|
143
|
+
b = /* @__PURE__ */ new WeakMap();
|
|
144
|
+
I = /* @__PURE__ */ new WeakMap();
|
|
145
|
+
d = /* @__PURE__ */ new WeakMap();
|
|
146
|
+
y = z([
|
|
147
|
+
O("e-sequence")
|
|
148
|
+
], y);
|
|
149
|
+
export {
|
|
150
|
+
y as SequenceElement
|
|
151
|
+
};
|
package/lib/tweaker/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { c as m } from "../createStylesheet-KMRQhSa-.js";
|
|
|
18
18
|
import { a as Me } from "../Viewport-Bx-VImCe.js";
|
|
19
19
|
import { aptechkaTheme as s } from "../theme/index.js";
|
|
20
20
|
import { AccordionElement as Ee } from "../accordion/index.js";
|
|
21
|
-
import { a as Te } from "../index-
|
|
21
|
+
import { a as Te } from "../index-DTe0hK7c.js";
|
|
22
22
|
import { d as De } from "../events-_C2CztxR.js";
|
|
23
23
|
import "../checkbox/index.js";
|
|
24
24
|
import { c as Re } from "../math-BOBiC4TN.js";
|
package/lib/utils/canvas.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export declare function measureText(context: CanvasRenderingContext2D, text: str
|
|
|
4
4
|
};
|
|
5
5
|
export declare function fixPosition(position: number): number;
|
|
6
6
|
export declare function cover(contentWidth: number, contentHeight: number, containerWidth: number, containerHeight: number, offsetLeft?: number, offsetTop?: number): readonly [number, number, number, number];
|
|
7
|
+
export declare function contain(contentWidth: number, contentHeight: number, containerWidth: number, containerHeight: number, offsetLeft?: number, offsetTop?: number): readonly [number, number, number, number];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Dot2D, Rect2D } from './ts-shape.js';
|
|
1
|
+
import { Dimension2D, Dot2D, Rect2D } from './ts-shape.js';
|
|
2
2
|
|
|
3
3
|
export declare function screenToCartesian(screenCoordinate: Dot2D, container: Pick<Rect2D, 'width' | 'height'>, normalize?: boolean): {
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
6
|
};
|
|
7
|
-
export declare function normalize(coordinate: Dot2D, size:
|
|
7
|
+
export declare function normalize(coordinate: Dot2D, size: Dimension2D): {
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
10
|
};
|