aptechka 0.51.13 → 0.51.15
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/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +27 -27
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +39 -39
- package/lib/scroll-segment/ScrollSegmentElement.d.ts +2 -0
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +179 -169
- package/package.json +1 -1
package/lib/pointer/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=i=>{throw TypeError(i)};var _=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,T=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&_(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&_(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||M("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?M("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-GokLe_g-.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),B=require("../math-GDWEqu7y.cjs"),J=require("../index-Cqw2NKev.cjs");require("../ticker/index.cjs");const R=require("../Damped-DgAIjXp3.cjs"),H=require("../element-resizer/index.cjs"),j=require("../window-resizer/index.cjs"),P=require("../css-property/index.cjs");var o,a,
|
|
1
|
+
"use strict";var A=Object.defineProperty;var D=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=i=>{throw TypeError(i)};var _=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,T=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&_(i,t,s[t]);if(D)for(var t of D(s))G.call(s,t)&&_(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||M("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?M("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,m)=>(k(i,s,"write to private field"),m?m.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-GokLe_g-.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),B=require("../math-GDWEqu7y.cjs"),J=require("../index-Cqw2NKev.cjs");require("../ticker/index.cjs");const R=require("../Damped-DgAIjXp3.cjs"),H=require("../element-resizer/index.cjs"),j=require("../window-resizer/index.cjs"),P=require("../css-property/index.cjs");var o,a,l,p,u,y,b,x,f,w,C,d;class O{constructor(s){n(this,o);n(this,a);n(this,l);n(this,p);n(this,u);n(this,y);n(this,b,0);n(this,x,0);n(this,f,s=>{e(this,p).set(1)});n(this,w,s=>{e(this,p).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),m={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,u)){const g=q.screenToCartesian(h,m);h.x=g.x,h.y=g.y}if(e(this,y)){const g=q.normalize(h,m);e(this,u)?(h.x=B.clamp(g.x*2,-1,1),h.y=B.clamp(g.y*2,-1,1)):(h.x=g.x,h.y=g.y)}e(this,a).set(h.x),e(this,l).set(h.y)});n(this,d,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,m=0,h=0;e(this,u)?e(this,y)?(s=-1,t=1,m=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,m=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,y)?(s=0,t=1,m=0,h=1):(s=0,t=e(this,b),m=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=m,e(this,l).max=h});c(this,o,I.getElement(s.element)),c(this,a,new R.Damped(0,s.damped)),c(this,l,new R.Damped(0,s.damped)),c(this,p,new R.Damped(0,T({min:0,max:1},s.damped))),c(this,u,s.cartesian||!1),c(this,y,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,p)}get cartesian(){return e(this,u)}set cartesian(s){c(this,u,s),e(this,d).call(this)}get normalize(){return e(this,y)}set normalize(s){c(this,y,s),e(this,d).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),H.elementResizer.subscribe(e(this,o),e(this,d)),j.windowResizer.subscribe(e(this,d))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),H.elementResizer.unsubscribe(e(this,d)),j.windowResizer.unsubscribe(e(this,d)),e(this,a).reset(),e(this,l).reset(),e(this,p).reset()}}o=new WeakMap,a=new WeakMap,l=new WeakMap,p=new WeakMap,u=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,d=new WeakMap;var r,v,S,z,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,v,new P.CSSProperty(this,"--damping",20));n(this,S,new P.CSSProperty(this,"--mass",0));n(this,z,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,v).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,S).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,z).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,v).observe(),e(this,S).observe(),e(this,z).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,v).unobserve(),e(this,S).unobserve(),e(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,v=new WeakMap,S=new WeakMap,z=new WeakMap,E=new WeakMap,L=new WeakMap;J.isBrowser&&!customElements.get("e-pointer")&&customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
|
package/lib/pointer/index.js
CHANGED
|
@@ -24,22 +24,22 @@ import { D as R } from "../Damped-GyAS-U-z.js";
|
|
|
24
24
|
import { elementResizer as W } from "../element-resizer/index.js";
|
|
25
25
|
import { windowResizer as j } from "../window-resizer/index.js";
|
|
26
26
|
import { CSSProperty as P } from "../css-property/index.js";
|
|
27
|
-
var o, a, l,
|
|
27
|
+
var o, a, l, b, p, u, d, f, S, w, E, y;
|
|
28
28
|
class O {
|
|
29
29
|
constructor(s) {
|
|
30
30
|
n(this, o);
|
|
31
31
|
n(this, a);
|
|
32
32
|
n(this, l);
|
|
33
|
-
n(this, y);
|
|
34
33
|
n(this, b);
|
|
35
34
|
n(this, p);
|
|
35
|
+
n(this, u);
|
|
36
36
|
n(this, d, 0);
|
|
37
37
|
n(this, f, 0);
|
|
38
38
|
n(this, S, (s) => {
|
|
39
|
-
t(this,
|
|
39
|
+
t(this, b).set(1);
|
|
40
40
|
});
|
|
41
41
|
n(this, w, (s) => {
|
|
42
|
-
t(this,
|
|
42
|
+
t(this, b).set(0);
|
|
43
43
|
});
|
|
44
44
|
n(this, E, (s) => {
|
|
45
45
|
const e = G(s, t(this, o).getBoundingClientRect()), c = {
|
|
@@ -49,22 +49,22 @@ class O {
|
|
|
49
49
|
x: e.x,
|
|
50
50
|
y: e.y
|
|
51
51
|
};
|
|
52
|
-
if (t(this, b)) {
|
|
53
|
-
const z = I(h, c);
|
|
54
|
-
h.x = z.x, h.y = z.y;
|
|
55
|
-
}
|
|
56
52
|
if (t(this, p)) {
|
|
57
|
-
const
|
|
58
|
-
h.x =
|
|
53
|
+
const x = I(h, c);
|
|
54
|
+
h.x = x.x, h.y = x.y;
|
|
55
|
+
}
|
|
56
|
+
if (t(this, u)) {
|
|
57
|
+
const x = J(h, c);
|
|
58
|
+
t(this, p) ? (h.x = T(x.x * 2, -1, 1), h.y = T(x.y * 2, -1, 1)) : (h.x = x.x, h.y = x.y);
|
|
59
59
|
}
|
|
60
60
|
t(this, a).set(h.x), t(this, l).set(h.y);
|
|
61
61
|
});
|
|
62
|
-
n(this,
|
|
62
|
+
n(this, y, () => {
|
|
63
63
|
m(this, d, this.element.clientWidth), m(this, f, this.element.clientHeight);
|
|
64
64
|
let s = 0, e = 0, c = 0, h = 0;
|
|
65
|
-
t(this,
|
|
65
|
+
t(this, p) ? t(this, u) ? (s = -1, e = 1, c = -1, h = 1) : (s = t(this, d) / 2 * -1, e = t(this, d) / 2 * 1, c = t(this, f) / 2 * -1, h = t(this, f) / 2 * 1) : t(this, u) ? (s = 0, e = 1, c = 0, h = 1) : (s = 0, e = t(this, d), c = 0, h = t(this, f)), t(this, a).min = s, t(this, a).max = e, t(this, l).min = c, t(this, l).max = h;
|
|
66
66
|
});
|
|
67
|
-
m(this, o, K(s.element)), m(this, a, new R(0, s.damped)), m(this, l, new R(0, s.damped)), m(this,
|
|
67
|
+
m(this, o, K(s.element)), m(this, a, new R(0, s.damped)), m(this, l, new R(0, s.damped)), m(this, b, new R(0, H({ min: 0, max: 1 }, s.damped))), m(this, p, s.cartesian || !1), m(this, u, s.normalize || !1);
|
|
68
68
|
}
|
|
69
69
|
get element() {
|
|
70
70
|
return t(this, o);
|
|
@@ -76,22 +76,22 @@ class O {
|
|
|
76
76
|
return t(this, l);
|
|
77
77
|
}
|
|
78
78
|
get z() {
|
|
79
|
-
return t(this,
|
|
79
|
+
return t(this, b);
|
|
80
80
|
}
|
|
81
81
|
get cartesian() {
|
|
82
|
-
return t(this,
|
|
82
|
+
return t(this, p);
|
|
83
83
|
}
|
|
84
84
|
set cartesian(s) {
|
|
85
|
-
m(this,
|
|
85
|
+
m(this, p, s), t(this, y).call(this);
|
|
86
86
|
}
|
|
87
87
|
get normalize() {
|
|
88
|
-
return t(this,
|
|
88
|
+
return t(this, u);
|
|
89
89
|
}
|
|
90
90
|
set normalize(s) {
|
|
91
|
-
m(this,
|
|
91
|
+
m(this, u, s), t(this, y).call(this);
|
|
92
92
|
}
|
|
93
93
|
connect() {
|
|
94
|
-
t(this, o).addEventListener("pointerenter", t(this, S)), t(this, o).addEventListener("pointerleave", t(this, w)), t(this, o).addEventListener("pointermove", t(this, E)), W.subscribe(t(this, o), t(this,
|
|
94
|
+
t(this, o).addEventListener("pointerenter", t(this, S)), t(this, o).addEventListener("pointerleave", t(this, w)), t(this, o).addEventListener("pointermove", t(this, E)), W.subscribe(t(this, o), t(this, y)), j.subscribe(t(this, y));
|
|
95
95
|
}
|
|
96
96
|
disconnect() {
|
|
97
97
|
t(this, o).removeEventListener(
|
|
@@ -100,18 +100,18 @@ class O {
|
|
|
100
100
|
), t(this, o).removeEventListener(
|
|
101
101
|
"pointerleave",
|
|
102
102
|
t(this, w)
|
|
103
|
-
), t(this, o).removeEventListener("pointermove", t(this, E)), W.unsubscribe(t(this,
|
|
103
|
+
), t(this, o).removeEventListener("pointermove", t(this, E)), W.unsubscribe(t(this, y)), j.unsubscribe(t(this, y)), t(this, a).reset(), t(this, l).reset(), t(this, b).reset();
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
o = new WeakMap(), a = new WeakMap(), l = new WeakMap(),
|
|
107
|
-
var r, g, v,
|
|
106
|
+
o = new WeakMap(), a = new WeakMap(), l = new WeakMap(), b = new WeakMap(), p = new WeakMap(), u = new WeakMap(), d = new WeakMap(), f = new WeakMap(), S = new WeakMap(), w = new WeakMap(), E = new WeakMap(), y = new WeakMap();
|
|
107
|
+
var r, g, v, z, L, C;
|
|
108
108
|
class Q extends HTMLElement {
|
|
109
109
|
constructor() {
|
|
110
110
|
super();
|
|
111
111
|
n(this, r);
|
|
112
112
|
n(this, g, new P(this, "--damping", 20));
|
|
113
113
|
n(this, v, new P(this, "--mass", 0));
|
|
114
|
-
n(this,
|
|
114
|
+
n(this, z, new P(this, "--stiffness", 0));
|
|
115
115
|
n(this, L, new P(this, "--cartesian", !1));
|
|
116
116
|
n(this, C, new P(this, "--normalize", !1));
|
|
117
117
|
m(this, r, new O({
|
|
@@ -124,7 +124,7 @@ class Q extends HTMLElement {
|
|
|
124
124
|
t(this, r).normalize = e.current;
|
|
125
125
|
}), t(this, v).subscribe((e) => {
|
|
126
126
|
t(this, r).x.mass = e.current, t(this, r).y.mass = e.current, t(this, r).z.mass = e.current;
|
|
127
|
-
}), t(this,
|
|
127
|
+
}), t(this, z).subscribe((e) => {
|
|
128
128
|
t(this, r).x.stiffness = e.current, t(this, r).y.stiffness = e.current, t(this, r).z.stiffness = e.current;
|
|
129
129
|
}), t(this, r).x.subscribe((e) => {
|
|
130
130
|
this.style.setProperty("--x", e.current.toString());
|
|
@@ -138,13 +138,13 @@ class Q extends HTMLElement {
|
|
|
138
138
|
return t(this, r);
|
|
139
139
|
}
|
|
140
140
|
connectedCallback() {
|
|
141
|
-
t(this, r).connect(), t(this, g).observe(), t(this, v).observe(), t(this,
|
|
141
|
+
t(this, r).connect(), t(this, g).observe(), t(this, v).observe(), t(this, z).observe();
|
|
142
142
|
}
|
|
143
143
|
disconnectedCallback() {
|
|
144
|
-
t(this, r).disconnect(), t(this, g).unobserve(), t(this, v).unobserve(), t(this,
|
|
144
|
+
t(this, r).disconnect(), t(this, g).unobserve(), t(this, v).unobserve(), t(this, z).unobserve(), this.style.removeProperty("--x"), this.style.removeProperty("--y"), this.style.removeProperty("--z");
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
r = new WeakMap(), g = new WeakMap(), v = new WeakMap(),
|
|
147
|
+
r = new WeakMap(), g = new WeakMap(), v = new WeakMap(), z = new WeakMap(), L = new WeakMap(), C = new WeakMap();
|
|
148
148
|
N && !customElements.get("e-pointer") && customElements.define("e-pointer", Q);
|
|
149
149
|
export {
|
|
150
150
|
O as Pointer,
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ze=Object.defineProperty;var Ae=Object.getOwnPropertySymbols;var je=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable;var Me=d=>{throw TypeError(d)};var Re=(d,n,e)=>n in d?Ze(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e,Te=(d,n)=>{for(var e in n||(n={}))je.call(n,e)&&Re(d,e,n[e]);if(Ae)for(var e of Ae(n))Ke.call(n,e)&&Re(d,e,n[e]);return d};var Ee=(d,n,e)=>n.has(d)||Me("Cannot "+e);var t=(d,n,e)=>(Ee(d,n,"read from private field"),e?e.call(d):n.get(d)),s=(d,n,e)=>n.has(d)?Me("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(d):n.set(d,e),h=(d,n,e,i)=>(Ee(d,n,"write to private field"),i?i.call(d,e):n.set(d,e),e),c=(d,n,e)=>(Ee(d,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Je=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),Qe=require("../easings-GegIwET5.cjs"),se=require("../events-KVanG9sR.cjs"),De=require("../function-MthRj-GJ.cjs"),Be=require("../jss-CRBgdvJ3.cjs"),Bt=require("../layout-Ctc2p3uz.cjs"),Oe=require("../math-GDWEqu7y.cjs"),Xe=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ye=require("../order/index.cjs"),Ye=require("../Damped-DgAIjXp3.cjs"),ts=require("../Tweened-DpJDlbj9.cjs"),ge=require("../controls/index.cjs"),Ot=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),qe=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),es=require("../device/index.cjs"),he=require("../element-resizer/index.cjs"),ss=require("../gestures-C7gbKx11.cjs"),Ve=require("../dom-JBOkFLTh.cjs"),is=require("../scroll-segment/index.cjs");var b,Vt,g,Ct,V,tt,vt,Pt,ie;class rs{constructor(n,e,i){s(this,Pt);s(this,b);s(this,Vt);s(this,g);s(this,Ct,0);s(this,V,0);s(this,tt,null);s(this,vt,0);h(this,b,n),h(this,Vt,e),h(this,g,i),yt.scrollEntries.register(t(this,b)),this.setIndex(t(this,Vt))}get element(){return t(this,b)}get index(){return t(this,Vt)}get size(){return t(this,Ct)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,b)),this.unsetTransform()}unsetTransform(){t(this,b).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,b).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,b).style.width=n+"px",t(this,b).style.height=""):(t(this,b).style.height=n+"px",t(this,b).style.width="")):(t(this,b).style.width="",t(this,b).style.height="",t(this,b).style.removeProperty("--size"))}resize(){h(this,Ct,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?Bt.getCumulativeOffsetTop(t(this,b)):Bt.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,f=t(this,V)+t(this,Ct)+i,y=Oe.clamp(r,u,f);h(this,vt,y*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,tt)!==n&&(t(this,tt)&&t(this,b).classList.remove(t(this,tt)),n&&t(this,b).classList.add(n),h(this,tt,n),se.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,tt)},custom:!0}))}setMiddle(n){t(this,b).classList.toggle("middle",n)}setIndex(n){c(this,Pt,ie).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,ie).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,ie).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,ie).call(this,"current-index-arc-abs",n)}}b=new WeakMap,Vt=new WeakMap,g=new WeakMap,Ct=new WeakMap,V=new WeakMap,tt=new WeakMap,vt=new WeakMap,Pt=new WeakSet,ie=function(n,e){e!==null?(t(this,b).style.setProperty(`--${n}`,e.toString()),t(this,b).setAttribute(`data-${n}`,e.toString())):(t(this,b).style.removeProperty(`--${n}`),t(this,b).removeAttribute(`data-${n}`))};const ns=Be.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".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-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Et,w,et,_,H,$,M,st,it,W,rt,wt,T,v,xt,Lt,zt,It,_t,A,kt,nt,R,ht,F,At,ot,Rt,lt,ct,ut,p,Ht,l,oe,le,C,m,k,q,at,D,E,x,$t,N,U,G,Z,Wt,dt,j,Ft,B,P,Nt,St,o,we,re,Dt,Ce,ve,xe,Le,L,ce,_e,Ut,ue,ze,Ie,gt,He,ne,ae;class Tt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Et,new S.CSSProperty(this,"--controls",!0));s(this,w,new S.CSSProperty(this,"--axis","y"));s(this,et,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,st,new S.CSSProperty(this,"--tween-easing",!1));s(this,it,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,rt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,xt,new S.CSSProperty(this,"--damping",20));s(this,Lt,new S.CSSProperty(this,"--mass",0));s(this,zt,new S.CSSProperty(this,"--stiffness",0));s(this,It,new S.CSSProperty(this,"--mouse-drag",!1));s(this,_t,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,kt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,nt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ht,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,At,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ot,new S.CSSProperty(this,"--focus-delay",0));s(this,Rt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,lt,new S.CSSProperty(this,"--disabled",!1));s(this,ct,new S.CSSProperty(this,"--hibernate",!1));s(this,ut,null);s(this,p,null);s(this,Ht,null);s(this,l,[]);s(this,oe,0);s(this,le,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,at,null);s(this,D,null);s(this,E,null);s(this,x,new Je.Store(0));s(this,$t,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Wt);s(this,dt);s(this,j,new ts.Tweened);s(this,Ft,!1);s(this,B,null);s(this,P,!1);s(this,Nt,null);s(this,St,[]);s(this,L,()=>{this.resize()});s(this,ce,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,$t,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,ne).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,He).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,Ut,(e,i)=>{t(this,Et).current&&(c(this,o,ze).call(this,Math.sign(i)||1),t(this,ue).call(this,e,i))});s(this,ue,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,dt)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ot).current&&(clearInterval(t(this,Wt)),h(this,Wt,setTimeout(()=>{const r=t(this,l)[c(this,o,ne).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Rt).current,easing:Qe.easeInOutExpo}})},t(this,ot).current))),!(e.includes("drag")&&!es.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,st).current||t(this,it).current?{easing:t(this,st).current||"easeInOutCubic",duration:t(this,it).current||500}:void 0};t(this,Ft)?this.scrollToSection(c(this,o,ne).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ft,e==="drag")}});s(this,ae,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Le).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ns];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ut,document.createElement("div")),t(this,ut).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ht,document.createElement("slot")),t(this,p).appendChild(t(this,Ht)),t(this,ut).appendChild(t(this,p)),e.appendChild(t(this,ut)),h(this,Nt,new MutationObserver(De.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Et)}get axisCSSProperty(){return t(this,w)}get reverseCSSProperty(){return t(this,et)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,st)}get durationCSSProperty(){return t(this,it)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,rt)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,Lt)}get stiffnessCSSProperty(){return t(this,zt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,_t)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,kt)}get autoplayUserDirectionCSSProperty(){return t(this,nt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ht)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,At)}get focusDelayCSSProperty(){return t(this,ot)}get focusDurationCSSProperty(){return t(this,Rt)}get disabledCSSProperty(){return t(this,lt)}get hibernatedCSSProperty(){return t(this,ct)}get currentScrollValue(){return c(this,o,Ie).call(this,"current")}get targetScrollValue(){return c(this,o,Ie).call(this,"target")}get contentWrapperElement(){return t(this,ut)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,oe)}get contentPosition(){return t(this,le)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,$t)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,re).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>f?1:(this.currentProgress-u)/(f-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,_e).call(this,e),f=t(this,l)[r],y=t(this,l)[u];if(f&&y){let I=0;const Pe=c(this,o,ne).call(this),qt=t(this,l)[Pe],me=qt?this.targetScrollValue-qt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?I=t(this,m)+t(this,C)-f.position+t(this,k):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-f.position:I=y.position-f.position,this.shiftPosition(I-me,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,ze).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,dt)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,Te({},i.tween)),h(this,dt,setTimeout(()=>{h(this,dt,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ct).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,oe,this.vertical?Bt.getCumulativeOffsetTop(this):Bt.getCumulativeOffsetLeft(this)),h(this,le,this.vertical?Bt.getCumulativeOffsetTop(t(this,p)):Bt.getCumulativeOffsetLeft(t(this,p))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(f=>{f.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,C))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),f=t(this,m)-u;h(this,N,r.position+r.size+f)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,lt).current||c(this,o,ve).call(this):c(this,o,Ce).call(this),se.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new Ye.Damped(0,{damping:.01,min:0,order:ye.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new ge.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ut)),h(this,at,new ge.KeyboardControls({element:this})),t(this,at).changeEvent.subscribe(t(this,Ut)),h(this,D,new ge.DragControls({element:t(this,p),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,Ut)),h(this,E,new ge.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,ue)),t(this,w).subscribe(()=>{c(this,o,we).call(this)}),t(this,et).subscribe(()=>{c(this,o,we).call(this)}),t(this,rt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,w).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,re).call(this):c(this,o,Dt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,L).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,$t,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,Lt).subscribe(e=>{t(this,a).mass=e.current}),t(this,zt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,E).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,nt).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ht).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,At).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,Ce).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,ve).call(this))}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,xe).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Le).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,et).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,st).observe(),t(this,it).observe(),t(this,W).observe(),t(this,rt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,It).observe(),t(this,_t).observe(),t(this,A).observe(),t(this,A).observe(),t(this,kt).observe(),t(this,nt).observe(),t(this,R).observe(),t(this,ht).observe(),t(this,F).observe(),t(this,At).observe(),t(this,ot).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,ct).observe(),Ot.windowResizer.subscribe(t(this,ae),ye.RESIZE_ORDER.LAST),t(this,Nt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Et).unobserve(),t(this,w).unobserve(),t(this,et).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,st).unobserve(),t(this,it).unobserve(),t(this,W).unobserve(),t(this,rt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,It).unobserve(),t(this,_t).unobserve(),t(this,A).unobserve(),t(this,kt).unobserve(),t(this,nt).unobserve(),t(this,R).unobserve(),t(this,ht).unobserve(),t(this,F).unobserve(),t(this,At).unobserve(),t(this,ot).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),Ot.windowResizer.unsubscribe(t(this,ae)),c(this,o,xe).call(this),t(this,Nt).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,et=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,st=new WeakMap,it=new WeakMap,W=new WeakMap,rt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,It=new WeakMap,_t=new WeakMap,A=new WeakMap,kt=new WeakMap,nt=new WeakMap,R=new WeakMap,ht=new WeakMap,F=new WeakMap,At=new WeakMap,ot=new WeakMap,Rt=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,p=new WeakMap,Ht=new WeakMap,l=new WeakMap,oe=new WeakMap,le=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,at=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,$t=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Wt=new WeakMap,dt=new WeakMap,j=new WeakMap,Ft=new WeakMap,B=new WeakMap,P=new WeakMap,Nt=new WeakMap,St=new WeakMap,o=new WeakSet,we=function(){const e=t(this,w).current,i=t(this,et).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,rt).current?"max":e,t(this,at).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,L).call(this)},re=function(){c(this,o,Dt).call(this),t(this,Ht).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new rs(e,i,this))}),t(this,p).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,gt).call(this)},Dt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ce=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,ce)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Wt)),clearInterval(t(this,dt)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,at).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ve=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,ce),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,at).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},xe=function(){t(this,Z)||(h(this,Z,!0),Ot.windowResizer.unsubscribe(t(this,L)),he.elementResizer.unsubscribe(t(this,L)),c(this,o,Ce).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Dt).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Le=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,ve).call(this),Ot.windowResizer.subscribe(t(this,L),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,ce=new WeakMap,_e=function(e){let i=t(this,x).current;return t(this,v).current?i=Xe.loopNumber(e,t(this,l).length):i=Oe.clamp(e,0,this.limit),i},Ut=new WeakMap,ue=new WeakMap,ze=function(e=1){t(this,nt).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,kt).current,this.sectionalCSSProperty.current)},Ie=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ht).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),se.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,St,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=f?(r.setMark("current"),t(this,St).push(r)):u>=y&&u<y+I/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},He=function(){if(t(this,R).current){const e=Math.floor(t(this,St).length/2);t(this,St).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,St).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ne=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const f=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Pe=t(this,Ft)?I.size*f*-1*.4:0,qt=I.position;this.overscroll&&qt===0&&e&&(qt=t(this,N));let me=Math.abs(qt+Pe-i);me<=r&&(r=me,u=y)}return u},ae=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Tt);var de;class ke extends HTMLElement{constructor(){super(...arguments);s(this,de,null)}get scrollElement(){return t(this,de)}connectedCallback(){const e=Ve.findParentElement(this,Tt);e instanceof Tt?h(this,de,e):console.error(this,"e-scroll not found")}}de=new WeakMap;var pt,z,K,J,Gt,Zt,bt,jt,Se,pe;class $e extends ke{constructor(){super();s(this,pt,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Gt,0);s(this,Zt,0);s(this,bt,()=>{h(this,K,this.offsetWidth>this.offsetHeight);const e=t(this,K)?this.offsetWidth:this.offsetHeight;h(this,J,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,J,Math.max(t(this,J),30)),t(this,K)?(t(this,z).style.width=t(this,J)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,J)+"px"),h(this,Gt,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,jt).call(this)});s(this,jt,()=>{h(this,Zt,this.scrollElement.currentProgress*t(this,Gt)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Zt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Zt)}px, 0px)`});s(this,Se,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,pe,e=>{document.documentElement.classList.add("grabbing"),ss.setupDrag(u=>{const f=t(this,K)?u.x:u.y,y=this.scrollElement.distance/t(this,Gt),I=(f-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,K)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Be.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,pe)),Ot.windowResizer.subscribe(t(this,bt),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,bt)),he.elementResizer.subscribe(this.scrollElement,t(this,bt)),this.scrollElement.onScroll(t(this,jt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Se))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,pe)),Ot.windowResizer.unsubscribe(t(this,bt)),he.elementResizer.unsubscribe(t(this,bt)),this.scrollElement.offScroll(t(this,jt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Se))}}pt=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,bt=new WeakMap,jt=new WeakMap,Se=new WeakMap,pe=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",$e);var Kt,Jt,Qt;class We extends ke{constructor(){super();s(this,Kt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Jt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Qt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Kt).current,i=t(this,Jt).current,r=t(this,Qt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Kt).observe(),t(this,Jt).observe(),t(this,Qt).observe()}disconnectedCallback(){t(this,Kt).close(),t(this,Jt).close(),t(this,Qt).close()}}Kt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap;var Xt;class Fe extends We{constructor(){super(...arguments);s(this,Xt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xt).close()}}Xt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Fe);var Q,Yt;class Ne extends We{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Yt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Q).current>0&&this.scrollElement.scrollLine==="end"||t(this,Q).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Q).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Q).subscribe(()=>{t(this,Yt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Yt)),t(this,Yt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Yt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ne);var X,ft,te,be,fe,ee;class hs{constructor(n,e,i){s(this,X,null);s(this,ft,null);s(this,te,null);s(this,be,null);s(this,fe,()=>{t(this,ft).scrollToSection(t(this,te),{behaviour:t(this,be)})});s(this,ee,()=>{t(this,X).classList.toggle("current",t(this,ft).counter.current===t(this,te))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,ft,n),h(this,be,i),h(this,te,e),t(this,X).addEventListener("click",t(this,fe)),t(this,ft).counter.subscribe(t(this,ee)),t(this,ee).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,fe)),t(this,ft).counter.unsubscribe(t(this,ee)),t(this,X).remove()}}X=new WeakMap,ft=new WeakMap,te=new WeakMap,be=new WeakMap,fe=new WeakMap,ee=new WeakMap;var Mt,mt,Y;class Ue extends ke{constructor(){super(...arguments);s(this,Mt,null);s(this,mt,[]);s(this,Y,De.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new hs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Mt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Y)),this.scrollElement.loopCSSProperty.subscribe(t(this,Y)),h(this,Mt,document.createElement("div")),this.appendChild(t(this,Mt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Y)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,Y)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Mt).remove()}}Mt=new WeakMap,mt=new WeakMap,Y=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Ue);class Ge extends is.ScrollSegmentElement{connectedCallback(){const n=Ve.findParentElement(this,Tt);n instanceof Tt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Tt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ge);exports.ScrollBulletButtonsElement=Ue;exports.ScrollElement=Tt;exports.ScrollSegmentElement=Ge;exports.ScrollSetButtonElement=Fe;exports.ScrollStepButtonElement=Ne;exports.ScrollbarElement=$e;
|
|
1
|
+
"use strict";var je=Object.defineProperty;var Ae=Object.getOwnPropertySymbols;var Ke=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable;var Me=d=>{throw TypeError(d)};var Re=(d,n,e)=>n in d?je(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e,Te=(d,n)=>{for(var e in n||(n={}))Ke.call(n,e)&&Re(d,e,n[e]);if(Ae)for(var e of Ae(n))Je.call(n,e)&&Re(d,e,n[e]);return d};var Ee=(d,n,e)=>n.has(d)||Me("Cannot "+e);var t=(d,n,e)=>(Ee(d,n,"read from private field"),e?e.call(d):n.get(d)),s=(d,n,e)=>n.has(d)?Me("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(d):n.set(d,e),h=(d,n,e,i)=>(Ee(d,n,"write to private field"),i?i.call(d,e):n.set(d,e),e),c=(d,n,e)=>(Ee(d,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Qe=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),Xe=require("../easings-GegIwET5.cjs"),se=require("../events-KVanG9sR.cjs"),De=require("../function-MthRj-GJ.cjs"),Be=require("../jss-CRBgdvJ3.cjs"),Bt=require("../layout-Ctc2p3uz.cjs"),Oe=require("../math-GDWEqu7y.cjs"),Ve=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ye=require("../order/index.cjs"),Ye=require("../Damped-DgAIjXp3.cjs"),ts=require("../Tweened-DpJDlbj9.cjs"),ge=require("../controls/index.cjs"),Ot=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),qe=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),es=require("../device/index.cjs"),he=require("../element-resizer/index.cjs"),ss=require("../gestures-C7gbKx11.cjs"),_e=require("../dom-JBOkFLTh.cjs"),is=require("../scroll-segment/index.cjs");var b,Vt,g,Ct,V,tt,vt,Pt,ie;class rs{constructor(n,e,i){s(this,Pt);s(this,b);s(this,Vt);s(this,g);s(this,Ct,0);s(this,V,0);s(this,tt,null);s(this,vt,0);h(this,b,n),h(this,Vt,e),h(this,g,i),yt.scrollEntries.register(t(this,b)),this.setIndex(t(this,Vt))}get element(){return t(this,b)}get index(){return t(this,Vt)}get size(){return t(this,Ct)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,b)),this.unsetTransform()}unsetTransform(){t(this,b).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,b).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,b).style.width=n+"px",t(this,b).style.height=""):(t(this,b).style.height=n+"px",t(this,b).style.width="")):(t(this,b).style.width="",t(this,b).style.height="",t(this,b).style.removeProperty("--size"))}resize(){h(this,Ct,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?Bt.getCumulativeOffsetTop(t(this,b)):Bt.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,f=t(this,V)+t(this,Ct)+i,y=Ve.preciseNumber(Oe.clamp(r,u,f),3);h(this,vt,y*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,tt)!==n&&(t(this,tt)&&t(this,b).classList.remove(t(this,tt)),n&&t(this,b).classList.add(n),h(this,tt,n),se.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,tt)},custom:!0}))}setMiddle(n){t(this,b).classList.toggle("middle",n)}setIndex(n){c(this,Pt,ie).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,ie).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,ie).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,ie).call(this,"current-index-arc-abs",n)}}b=new WeakMap,Vt=new WeakMap,g=new WeakMap,Ct=new WeakMap,V=new WeakMap,tt=new WeakMap,vt=new WeakMap,Pt=new WeakSet,ie=function(n,e){e!==null?(t(this,b).style.setProperty(`--${n}`,e.toString()),t(this,b).setAttribute(`data-${n}`,e.toString())):(t(this,b).style.removeProperty(`--${n}`),t(this,b).removeAttribute(`data-${n}`))};const ns=Be.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".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-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Et,w,et,_,H,$,M,st,it,W,rt,wt,T,v,xt,Lt,zt,It,_t,A,kt,nt,R,ht,F,At,ot,Rt,lt,ct,ut,p,Ht,l,oe,le,C,m,k,q,at,D,E,x,$t,N,U,G,Z,Wt,dt,j,Ft,B,P,Nt,St,o,we,re,Dt,Ce,ve,xe,Le,L,ce,He,Ut,ue,ze,Ie,gt,$e,ne,ae;class Tt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Et,new S.CSSProperty(this,"--controls",!0));s(this,w,new S.CSSProperty(this,"--axis","y"));s(this,et,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,st,new S.CSSProperty(this,"--tween-easing",!1));s(this,it,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,rt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,xt,new S.CSSProperty(this,"--damping",20));s(this,Lt,new S.CSSProperty(this,"--mass",0));s(this,zt,new S.CSSProperty(this,"--stiffness",0));s(this,It,new S.CSSProperty(this,"--mouse-drag",!1));s(this,_t,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,kt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,nt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ht,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,At,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ot,new S.CSSProperty(this,"--focus-delay",0));s(this,Rt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,lt,new S.CSSProperty(this,"--disabled",!1));s(this,ct,new S.CSSProperty(this,"--hibernate",!1));s(this,ut,null);s(this,p,null);s(this,Ht,null);s(this,l,[]);s(this,oe,0);s(this,le,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,at,null);s(this,D,null);s(this,E,null);s(this,x,new Qe.Store(0));s(this,$t,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Wt);s(this,dt);s(this,j,new ts.Tweened);s(this,Ft,!1);s(this,B,null);s(this,P,!1);s(this,Nt,null);s(this,St,[]);s(this,L,()=>{this.resize()});s(this,ce,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,$t,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,ne).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,$e).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,Ut,(e,i)=>{t(this,Et).current&&(c(this,o,ze).call(this,Math.sign(i)||1),t(this,ue).call(this,e,i))});s(this,ue,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,dt)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ot).current&&(clearInterval(t(this,Wt)),h(this,Wt,setTimeout(()=>{const r=t(this,l)[c(this,o,ne).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Rt).current,easing:Xe.easeInOutExpo}})},t(this,ot).current))),!(e.includes("drag")&&!es.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,st).current||t(this,it).current?{easing:t(this,st).current||"easeInOutCubic",duration:t(this,it).current||500}:void 0};t(this,Ft)?this.scrollToSection(c(this,o,ne).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ft,e==="drag")}});s(this,ae,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Le).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ns];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ut,document.createElement("div")),t(this,ut).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ht,document.createElement("slot")),t(this,p).appendChild(t(this,Ht)),t(this,ut).appendChild(t(this,p)),e.appendChild(t(this,ut)),h(this,Nt,new MutationObserver(De.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Et)}get axisCSSProperty(){return t(this,w)}get reverseCSSProperty(){return t(this,et)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,st)}get durationCSSProperty(){return t(this,it)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,rt)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,Lt)}get stiffnessCSSProperty(){return t(this,zt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,_t)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,kt)}get autoplayUserDirectionCSSProperty(){return t(this,nt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ht)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,At)}get focusDelayCSSProperty(){return t(this,ot)}get focusDurationCSSProperty(){return t(this,Rt)}get disabledCSSProperty(){return t(this,lt)}get hibernatedCSSProperty(){return t(this,ct)}get currentScrollValue(){return c(this,o,Ie).call(this,"current")}get targetScrollValue(){return c(this,o,Ie).call(this,"target")}get contentWrapperElement(){return t(this,ut)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,oe)}get contentPosition(){return t(this,le)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,$t)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,re).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>f?1:(this.currentProgress-u)/(f-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,He).call(this,e),f=t(this,l)[r],y=t(this,l)[u];if(f&&y){let I=0;const Pe=c(this,o,ne).call(this),qt=t(this,l)[Pe],me=qt?this.targetScrollValue-qt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?I=t(this,m)+t(this,C)-f.position+t(this,k):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-f.position:I=y.position-f.position,this.shiftPosition(I-me,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,ze).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,dt)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,Te({},i.tween)),h(this,dt,setTimeout(()=>{h(this,dt,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ct).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,oe,this.vertical?Bt.getCumulativeOffsetTop(this):Bt.getCumulativeOffsetLeft(this)),h(this,le,this.vertical?Bt.getCumulativeOffsetTop(t(this,p)):Bt.getCumulativeOffsetLeft(t(this,p))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(f=>{f.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,C))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),f=t(this,m)-u;h(this,N,r.position+r.size+f)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,lt).current||c(this,o,ve).call(this):c(this,o,Ce).call(this),se.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new Ye.Damped(0,{damping:.01,min:0,order:ye.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new ge.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ut)),h(this,at,new ge.KeyboardControls({element:this})),t(this,at).changeEvent.subscribe(t(this,Ut)),h(this,D,new ge.DragControls({element:t(this,p),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,Ut)),h(this,E,new ge.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,ue)),t(this,w).subscribe(()=>{c(this,o,we).call(this)}),t(this,et).subscribe(()=>{c(this,o,we).call(this)}),t(this,rt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,w).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,re).call(this):c(this,o,Dt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,L).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,$t,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,Lt).subscribe(e=>{t(this,a).mass=e.current}),t(this,zt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,E).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,nt).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ht).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,At).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,Ce).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,ve).call(this))}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,xe).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Le).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,et).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,st).observe(),t(this,it).observe(),t(this,W).observe(),t(this,rt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,It).observe(),t(this,_t).observe(),t(this,A).observe(),t(this,A).observe(),t(this,kt).observe(),t(this,nt).observe(),t(this,R).observe(),t(this,ht).observe(),t(this,F).observe(),t(this,At).observe(),t(this,ot).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,ct).observe(),Ot.windowResizer.subscribe(t(this,ae),ye.RESIZE_ORDER.LAST),t(this,Nt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Et).unobserve(),t(this,w).unobserve(),t(this,et).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,st).unobserve(),t(this,it).unobserve(),t(this,W).unobserve(),t(this,rt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,It).unobserve(),t(this,_t).unobserve(),t(this,A).unobserve(),t(this,kt).unobserve(),t(this,nt).unobserve(),t(this,R).unobserve(),t(this,ht).unobserve(),t(this,F).unobserve(),t(this,At).unobserve(),t(this,ot).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),Ot.windowResizer.unsubscribe(t(this,ae)),c(this,o,xe).call(this),t(this,Nt).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,et=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,st=new WeakMap,it=new WeakMap,W=new WeakMap,rt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,It=new WeakMap,_t=new WeakMap,A=new WeakMap,kt=new WeakMap,nt=new WeakMap,R=new WeakMap,ht=new WeakMap,F=new WeakMap,At=new WeakMap,ot=new WeakMap,Rt=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,p=new WeakMap,Ht=new WeakMap,l=new WeakMap,oe=new WeakMap,le=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,at=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,$t=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Wt=new WeakMap,dt=new WeakMap,j=new WeakMap,Ft=new WeakMap,B=new WeakMap,P=new WeakMap,Nt=new WeakMap,St=new WeakMap,o=new WeakSet,we=function(){const e=t(this,w).current,i=t(this,et).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,rt).current?"max":e,t(this,at).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,L).call(this)},re=function(){c(this,o,Dt).call(this),t(this,Ht).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new rs(e,i,this))}),t(this,p).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,gt).call(this)},Dt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ce=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,ce)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Wt)),clearInterval(t(this,dt)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,at).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ve=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,ce),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,at).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},xe=function(){t(this,Z)||(h(this,Z,!0),Ot.windowResizer.unsubscribe(t(this,L)),he.elementResizer.unsubscribe(t(this,L)),c(this,o,Ce).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Dt).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Le=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,ve).call(this),Ot.windowResizer.subscribe(t(this,L),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,ce=new WeakMap,He=function(e){let i=t(this,x).current;return t(this,v).current?i=Ve.loopNumber(e,t(this,l).length):i=Oe.clamp(e,0,this.limit),i},Ut=new WeakMap,ue=new WeakMap,ze=function(e=1){t(this,nt).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,kt).current,this.sectionalCSSProperty.current)},Ie=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ht).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),se.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,St,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=f?(r.setMark("current"),t(this,St).push(r)):u>=y&&u<y+I/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},$e=function(){if(t(this,R).current){const e=Math.floor(t(this,St).length/2);t(this,St).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,St).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ne=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const f=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Pe=t(this,Ft)?I.size*f*-1*.4:0,qt=I.position;this.overscroll&&qt===0&&e&&(qt=t(this,N));let me=Math.abs(qt+Pe-i);me<=r&&(r=me,u=y)}return u},ae=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Tt);var de;class ke extends HTMLElement{constructor(){super(...arguments);s(this,de,null)}get scrollElement(){return t(this,de)}connectedCallback(){const e=_e.findParentElement(this,Tt);e instanceof Tt?h(this,de,e):console.error(this,"e-scroll not found")}}de=new WeakMap;var pt,z,K,J,Gt,Zt,bt,jt,Se,pe;class We extends ke{constructor(){super();s(this,pt,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Gt,0);s(this,Zt,0);s(this,bt,()=>{h(this,K,this.offsetWidth>this.offsetHeight);const e=t(this,K)?this.offsetWidth:this.offsetHeight;h(this,J,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,J,Math.max(t(this,J),30)),t(this,K)?(t(this,z).style.width=t(this,J)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,J)+"px"),h(this,Gt,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,jt).call(this)});s(this,jt,()=>{h(this,Zt,this.scrollElement.currentProgress*t(this,Gt)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Zt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Zt)}px, 0px)`});s(this,Se,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,pe,e=>{document.documentElement.classList.add("grabbing"),ss.setupDrag(u=>{const f=t(this,K)?u.x:u.y,y=this.scrollElement.distance/t(this,Gt),I=(f-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,K)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Be.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,pe)),Ot.windowResizer.subscribe(t(this,bt),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,bt)),he.elementResizer.subscribe(this.scrollElement,t(this,bt)),this.scrollElement.onScroll(t(this,jt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Se))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,pe)),Ot.windowResizer.unsubscribe(t(this,bt)),he.elementResizer.unsubscribe(t(this,bt)),this.scrollElement.offScroll(t(this,jt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Se))}}pt=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,bt=new WeakMap,jt=new WeakMap,Se=new WeakMap,pe=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",We);var Kt,Jt,Qt;class Fe extends ke{constructor(){super();s(this,Kt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Jt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Qt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Kt).current,i=t(this,Jt).current,r=t(this,Qt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Kt).observe(),t(this,Jt).observe(),t(this,Qt).observe()}disconnectedCallback(){t(this,Kt).close(),t(this,Jt).close(),t(this,Qt).close()}}Kt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap;var Xt;class Ne extends Fe{constructor(){super(...arguments);s(this,Xt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xt).close()}}Xt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Ne);var Q,Yt;class Ue extends Fe{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Yt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Q).current>0&&this.scrollElement.scrollLine==="end"||t(this,Q).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Q).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Q).subscribe(()=>{t(this,Yt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Yt)),t(this,Yt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Yt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ue);var X,ft,te,be,fe,ee;class hs{constructor(n,e,i){s(this,X,null);s(this,ft,null);s(this,te,null);s(this,be,null);s(this,fe,()=>{t(this,ft).scrollToSection(t(this,te),{behaviour:t(this,be)})});s(this,ee,()=>{t(this,X).classList.toggle("current",t(this,ft).counter.current===t(this,te))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,ft,n),h(this,be,i),h(this,te,e),t(this,X).addEventListener("click",t(this,fe)),t(this,ft).counter.subscribe(t(this,ee)),t(this,ee).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,fe)),t(this,ft).counter.unsubscribe(t(this,ee)),t(this,X).remove()}}X=new WeakMap,ft=new WeakMap,te=new WeakMap,be=new WeakMap,fe=new WeakMap,ee=new WeakMap;var Mt,mt,Y;class Ge extends ke{constructor(){super(...arguments);s(this,Mt,null);s(this,mt,[]);s(this,Y,De.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new hs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Mt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Y)),this.scrollElement.loopCSSProperty.subscribe(t(this,Y)),h(this,Mt,document.createElement("div")),this.appendChild(t(this,Mt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Y)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,Y)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Mt).remove()}}Mt=new WeakMap,mt=new WeakMap,Y=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Ge);class Ze extends is.ScrollSegmentElement{connectedCallback(){const n=_e.findParentElement(this,Tt);n instanceof Tt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Tt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ze);exports.ScrollBulletButtonsElement=Ge;exports.ScrollElement=Tt;exports.ScrollSegmentElement=Ze;exports.ScrollSetButtonElement=Ne;exports.ScrollStepButtonElement=Ue;exports.ScrollbarElement=We;
|
package/lib/scroll/index.js
CHANGED
|
@@ -22,23 +22,23 @@ import { d as Re } from "../function-C10DGppn.js";
|
|
|
22
22
|
import { c as Oe } from "../jss-DtnXPEnq.js";
|
|
23
23
|
import { a as Ce, g as Ee } from "../layout-DpZo-I0y.js";
|
|
24
24
|
import { c as He } from "../math-BOBiC4TN.js";
|
|
25
|
-
import {
|
|
25
|
+
import { p as _e, l as Ze } from "../number-DwCxt_Ck.js";
|
|
26
26
|
import "../ticker/index.js";
|
|
27
|
-
import { TICK_ORDER as
|
|
28
|
-
import { D as
|
|
29
|
-
import { T as
|
|
30
|
-
import { WheelControls as
|
|
27
|
+
import { TICK_ORDER as je, RESIZE_ORDER as we } from "../order/index.js";
|
|
28
|
+
import { D as Je } from "../Damped-GyAS-U-z.js";
|
|
29
|
+
import { T as Qe } from "../Tweened-BSC-evuL.js";
|
|
30
|
+
import { WheelControls as Xe, KeyboardControls as Ye, DragControls as ts, AutoplayControls as es } from "../controls/index.js";
|
|
31
31
|
import { windowResizer as Rt } from "../window-resizer/index.js";
|
|
32
32
|
import { scrollEntries as vt } from "../scroll-entries/index.js";
|
|
33
33
|
import { cssUnitParser as Ve } from "../css-unit-parser/index.js";
|
|
34
34
|
import { CSSProperty as p } from "../css-property/index.js";
|
|
35
|
-
import { device as
|
|
35
|
+
import { device as ss } from "../device/index.js";
|
|
36
36
|
import { elementResizer as ne } from "../element-resizer/index.js";
|
|
37
|
-
import { s as
|
|
37
|
+
import { s as is } from "../gestures-CcXV6fCp.js";
|
|
38
38
|
import { b as $e } from "../dom-CVWzyXPH.js";
|
|
39
|
-
import { ScrollSegmentElement as
|
|
39
|
+
import { ScrollSegmentElement as rs } from "../scroll-segment/index.js";
|
|
40
40
|
var b, Ht, g, yt, $, tt, Ct, Et, se;
|
|
41
|
-
class
|
|
41
|
+
class ns {
|
|
42
42
|
constructor(n, e, i) {
|
|
43
43
|
s(this, Et);
|
|
44
44
|
s(this, b);
|
|
@@ -86,7 +86,7 @@ class rs {
|
|
|
86
86
|
t(this, g).axisCSSProperty.current,
|
|
87
87
|
e
|
|
88
88
|
);
|
|
89
|
-
const r = t(this, g).currentScrollValue + e, a = t(this, $) - t(this, g).viewportSize - i, m = t(this, $) + t(this, yt) + i, v = He(r, a, m);
|
|
89
|
+
const r = t(this, g).currentScrollValue + e, a = t(this, $) - t(this, g).viewportSize - i, m = t(this, $) + t(this, yt) + i, v = _e(He(r, a, m), 3);
|
|
90
90
|
h(this, Ct, v * -1), t(this, g).vertical ? t(this, b).style.transform = `translate3d(0px, ${t(this, Ct)}px, 0px)` : t(this, b).style.transform = `translate3d(${t(this, Ct)}px, 0px, 0px)`;
|
|
91
91
|
}
|
|
92
92
|
setMark(n) {
|
|
@@ -117,7 +117,7 @@ class rs {
|
|
|
117
117
|
b = new WeakMap(), Ht = new WeakMap(), g = new WeakMap(), yt = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), Ct = new WeakMap(), Et = new WeakSet(), se = function(n, e) {
|
|
118
118
|
e !== null ? (t(this, b).style.setProperty(`--${n}`, e.toString()), t(this, b).setAttribute(`data-${n}`, e.toString())) : (t(this, b).style.removeProperty(`--${n}`), t(this, b).removeAttribute(`data-${n}`));
|
|
119
119
|
};
|
|
120
|
-
const
|
|
120
|
+
const hs = Oe({
|
|
121
121
|
":host": {
|
|
122
122
|
position: "relative",
|
|
123
123
|
width: "100%",
|
|
@@ -259,7 +259,7 @@ class Ot extends HTMLElement {
|
|
|
259
259
|
s(this, _, !0);
|
|
260
260
|
s(this, Ft);
|
|
261
261
|
s(this, dt);
|
|
262
|
-
s(this, Z, new
|
|
262
|
+
s(this, Z, new Qe());
|
|
263
263
|
s(this, Nt, !1);
|
|
264
264
|
s(this, O, null);
|
|
265
265
|
s(this, E, !1);
|
|
@@ -302,7 +302,7 @@ class Ot extends HTMLElement {
|
|
|
302
302
|
easing: Ke
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
|
-
}, t(this, ot).current))), !(e.includes("drag") && !
|
|
305
|
+
}, t(this, ot).current))), !(e.includes("drag") && !ss.isTouch && !t(this, It).current)) {
|
|
306
306
|
if (t(this, T).current && e !== "drag") {
|
|
307
307
|
const r = Math.sign(i);
|
|
308
308
|
if (t(this, l).length) {
|
|
@@ -325,7 +325,7 @@ class Ot extends HTMLElement {
|
|
|
325
325
|
});
|
|
326
326
|
if (H) {
|
|
327
327
|
const e = this.attachShadow({ mode: "open" });
|
|
328
|
-
e.adoptedStyleSheets = [
|
|
328
|
+
e.adoptedStyleSheets = [hs];
|
|
329
329
|
const i = document.createElement("div");
|
|
330
330
|
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, at, document.createElement("div")), t(this, at).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, Bt, document.createElement("slot")), t(this, f).appendChild(t(this, Bt)), t(this, at).appendChild(t(this, f)), e.appendChild(t(this, at)), h(this, qt, new MutationObserver(
|
|
331
331
|
Re(() => {
|
|
@@ -586,18 +586,18 @@ class Ot extends HTMLElement {
|
|
|
586
586
|
h(this, G, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, lt).current || c(this, o, ge).call(this) : c(this, o, Se).call(this), ee(this, "scrollResize", { custom: !0 }), t(this, u).notify();
|
|
587
587
|
}
|
|
588
588
|
connectedCallback() {
|
|
589
|
-
vt.register(this), h(this, u, new
|
|
589
|
+
vt.register(this), h(this, u, new Je(0, {
|
|
590
590
|
damping: 0.01,
|
|
591
591
|
min: 0,
|
|
592
|
-
order:
|
|
593
|
-
})), this.setAttribute("tabindex", "0"), h(this, V, new
|
|
592
|
+
order: je.SCROLL
|
|
593
|
+
})), this.setAttribute("tabindex", "0"), h(this, V, new Xe({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Ut)), h(this, ut, new Ye({
|
|
594
594
|
element: this
|
|
595
595
|
})), t(this, ut).changeEvent.subscribe(
|
|
596
596
|
t(this, Ut)
|
|
597
|
-
), h(this, R, new
|
|
597
|
+
), h(this, R, new ts({
|
|
598
598
|
element: t(this, f),
|
|
599
599
|
rootElement: this
|
|
600
|
-
})), t(this, R).changeEvent.subscribe(t(this, Ut)), h(this, w, new
|
|
600
|
+
})), t(this, R).changeEvent.subscribe(t(this, Ut)), h(this, w, new es({
|
|
601
601
|
culling: this
|
|
602
602
|
})), t(this, w).changeEvent.subscribe(t(this, ce)), t(this, x).subscribe(() => {
|
|
603
603
|
c(this, o, xe).call(this);
|
|
@@ -658,7 +658,7 @@ u = new WeakMap(), wt = new WeakMap(), x = new WeakMap(), et = new WeakMap(), B
|
|
|
658
658
|
t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, rt).current ? "max" : e, t(this, ut).dimension = e === "x" ? "width" : "height", t(this, R).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, E) && t(this, L).call(this);
|
|
659
659
|
}, ie = function() {
|
|
660
660
|
c(this, o, Vt).call(this), t(this, Bt).assignedElements().forEach((e, i) => {
|
|
661
|
-
e instanceof HTMLElement && t(this, l).push(new
|
|
661
|
+
e instanceof HTMLElement && t(this, l).push(new ns(e, i, this));
|
|
662
662
|
}), t(this, f).style.transform = "", this.style.setProperty("--sections", t(this, l).length.toString()), ee(this, "scrollSectionsChange", {
|
|
663
663
|
custom: !0,
|
|
664
664
|
composed: !0
|
|
@@ -682,7 +682,7 @@ u = new WeakMap(), wt = new WeakMap(), x = new WeakMap(), et = new WeakMap(), B
|
|
|
682
682
|
t(this, _) && (h(this, _, !1), vt.register(this), this.tryResplit(), c(this, o, ge).call(this), Rt.subscribe(t(this, L), we.SCROLL), ne.subscribe(this, t(this, L)));
|
|
683
683
|
}, L = new WeakMap(), le = new WeakMap(), Be = function(e) {
|
|
684
684
|
let i = t(this, P).current;
|
|
685
|
-
return t(this, C).current ? i =
|
|
685
|
+
return t(this, C).current ? i = Ze(e, t(this, l).length) : i = He(e, 0, this.limit), i;
|
|
686
686
|
}, Ut = new WeakMap(), ce = new WeakMap(), ze = function(e = 1) {
|
|
687
687
|
t(this, nt).current && (t(this, w).direction = e), t(this, A).current && t(this, w).pauseAndContinue(
|
|
688
688
|
t(this, kt).current,
|
|
@@ -746,7 +746,7 @@ class ke extends HTMLElement {
|
|
|
746
746
|
}
|
|
747
747
|
ue = new WeakMap();
|
|
748
748
|
var ft, z, j, J, Gt, Kt, bt, _t, de, pe;
|
|
749
|
-
class
|
|
749
|
+
class os extends ke {
|
|
750
750
|
constructor() {
|
|
751
751
|
super();
|
|
752
752
|
s(this, ft, null);
|
|
@@ -767,7 +767,7 @@ class hs extends ke {
|
|
|
767
767
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
768
768
|
});
|
|
769
769
|
s(this, pe, (e) => {
|
|
770
|
-
document.documentElement.classList.add("grabbing"),
|
|
770
|
+
document.documentElement.classList.add("grabbing"), is(
|
|
771
771
|
(a) => {
|
|
772
772
|
const m = t(this, j) ? a.x : a.y, v = this.scrollElement.distance / t(this, Gt), I = (m - r) * v;
|
|
773
773
|
this.scrollElement.setPosition(i + I);
|
|
@@ -826,7 +826,7 @@ class hs extends ke {
|
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
ft = new WeakMap(), z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), Gt = new WeakMap(), Kt = new WeakMap(), bt = new WeakMap(), _t = new WeakMap(), de = new WeakMap(), pe = new WeakMap();
|
|
829
|
-
H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar",
|
|
829
|
+
H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", os);
|
|
830
830
|
var Zt, jt, Jt;
|
|
831
831
|
class Fe extends ke {
|
|
832
832
|
constructor() {
|
|
@@ -855,7 +855,7 @@ class Fe extends ke {
|
|
|
855
855
|
}
|
|
856
856
|
Zt = new WeakMap(), jt = new WeakMap(), Jt = new WeakMap();
|
|
857
857
|
var Qt;
|
|
858
|
-
class
|
|
858
|
+
class ls extends Fe {
|
|
859
859
|
constructor() {
|
|
860
860
|
super(...arguments);
|
|
861
861
|
s(this, Qt, new p(this, "--set", 1));
|
|
@@ -871,9 +871,9 @@ class os extends Fe {
|
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
873
|
Qt = new WeakMap();
|
|
874
|
-
H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button",
|
|
874
|
+
H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ls);
|
|
875
875
|
var Q, Xt;
|
|
876
|
-
class
|
|
876
|
+
class cs extends Fe {
|
|
877
877
|
constructor() {
|
|
878
878
|
super(...arguments);
|
|
879
879
|
s(this, Q, new p(this, "--step", 1));
|
|
@@ -897,9 +897,9 @@ class ls extends Fe {
|
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
Q = new WeakMap(), Xt = new WeakMap();
|
|
900
|
-
H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button",
|
|
900
|
+
H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", cs);
|
|
901
901
|
var X, mt, Yt, fe, be, te;
|
|
902
|
-
class
|
|
902
|
+
class as {
|
|
903
903
|
constructor(n, e, i) {
|
|
904
904
|
s(this, X, null);
|
|
905
905
|
s(this, mt, null);
|
|
@@ -927,7 +927,7 @@ class cs {
|
|
|
927
927
|
}
|
|
928
928
|
X = new WeakMap(), mt = new WeakMap(), Yt = new WeakMap(), fe = new WeakMap(), be = new WeakMap(), te = new WeakMap();
|
|
929
929
|
var Tt, St, Y;
|
|
930
|
-
class
|
|
930
|
+
class us extends ke {
|
|
931
931
|
constructor() {
|
|
932
932
|
super(...arguments);
|
|
933
933
|
s(this, Tt, null);
|
|
@@ -937,7 +937,7 @@ class as extends ke {
|
|
|
937
937
|
let e = 0;
|
|
938
938
|
this.scrollElement.loopCSSProperty.current ? e = this.scrollElement.sections.length : e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
|
|
939
939
|
for (let i = 0; i < e; i++) {
|
|
940
|
-
const r = new
|
|
940
|
+
const r = new as(
|
|
941
941
|
this.scrollElement,
|
|
942
942
|
i,
|
|
943
943
|
this.getAttribute("behaviour") || "smooth"
|
|
@@ -964,8 +964,8 @@ class as extends ke {
|
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
966
|
Tt = new WeakMap(), St = new WeakMap(), Y = new WeakMap();
|
|
967
|
-
H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons",
|
|
968
|
-
class
|
|
967
|
+
H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", us);
|
|
968
|
+
class ds extends rs {
|
|
969
969
|
connectedCallback() {
|
|
970
970
|
const n = $e(this, Ot);
|
|
971
971
|
n instanceof Ot ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
|
|
@@ -980,12 +980,12 @@ class us extends is {
|
|
|
980
980
|
), this.scrollContainer.removeEventListener("scrollResize", this.resize));
|
|
981
981
|
}
|
|
982
982
|
}
|
|
983
|
-
H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment",
|
|
983
|
+
H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", ds);
|
|
984
984
|
export {
|
|
985
|
-
|
|
985
|
+
us as ScrollBulletButtonsElement,
|
|
986
986
|
Ot as ScrollElement,
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
987
|
+
ds as ScrollSegmentElement,
|
|
988
|
+
ls as ScrollSetButtonElement,
|
|
989
|
+
cs as ScrollStepButtonElement,
|
|
990
|
+
os as ScrollbarElement
|
|
991
991
|
};
|
|
@@ -34,6 +34,7 @@ export declare class ScrollSegmentElement extends HTMLElement {
|
|
|
34
34
|
get passedVarCSSProperty(): CSSProperty<string>;
|
|
35
35
|
get progressVarCSSProperty(): CSSProperty<string>;
|
|
36
36
|
get progressArcVarCSSProperty(): CSSProperty<string>;
|
|
37
|
+
get progressArcMultCSSProperty(): CSSProperty<number>;
|
|
37
38
|
get animationVarTypeCSSProperty(): CSSProperty<"target" | "current">;
|
|
38
39
|
get distanceVarCSSProperty(): CSSProperty<string>;
|
|
39
40
|
get startVarCSSProperty(): CSSProperty<string>;
|
|
@@ -53,6 +54,7 @@ export declare class ScrollSegmentElement extends HTMLElement {
|
|
|
53
54
|
get directionSize(): number;
|
|
54
55
|
get passed(): Damped;
|
|
55
56
|
get progress(): number;
|
|
57
|
+
get progressArc(): number;
|
|
56
58
|
get start(): number;
|
|
57
59
|
get finish(): number;
|
|
58
60
|
get distance(): number;
|