aptechka 0.78.7 → 0.78.8
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/{DragControls-B7q22wzw.js → DragControls-DyIrD3GV.js} +36 -36
- package/lib/DragControls-K67-diF5.cjs +1 -0
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +1 -1
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +5 -10
- package/lib/scroll-kit/index.cjs +1 -1
- package/lib/scroll-kit/index.js +32 -38
- package/package.json +1 -1
- package/lib/DragControls-tVaq-vIe.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var _ = (
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var _ = (n) => {
|
|
2
|
+
throw TypeError(n);
|
|
3
3
|
};
|
|
4
|
-
var G = (
|
|
5
|
-
var t = (
|
|
4
|
+
var G = (n, r, e) => r.has(n) || _("Cannot " + e);
|
|
5
|
+
var t = (n, r, e) => (G(n, r, "read from private field"), e ? e.call(n) : r.get(n)), s = (n, r, e) => r.has(n) ? _("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(n) : r.set(n, e), i = (n, r, e, h) => (G(n, r, "write to private field"), h ? h.call(n, e) : r.set(n, e), e), A = (n, r, e) => (G(n, r, "access private method"), e);
|
|
6
6
|
import { i as b } from "./index-Bv9zgfdb.js";
|
|
7
7
|
import { g as Z } from "./dom-CVWzyXPH.js";
|
|
8
8
|
import "construct-style-sheets-polyfill";
|
|
@@ -13,49 +13,49 @@ import { T as te } from "./Tweened-BlZB0vl4.js";
|
|
|
13
13
|
import { s as ie } from "./gestures-CcXV6fCp.js";
|
|
14
14
|
import { p as se } from "./number-CumqY64S.js";
|
|
15
15
|
import { TICK_ORDER as he } from "./order/index.js";
|
|
16
|
-
import { Notifier as
|
|
16
|
+
import { Notifier as ne } from "./notifier/index.js";
|
|
17
17
|
var V;
|
|
18
18
|
class j {
|
|
19
19
|
constructor() {
|
|
20
|
-
s(this, V, new
|
|
20
|
+
s(this, V, new ne());
|
|
21
21
|
}
|
|
22
22
|
get changeEvent() {
|
|
23
23
|
return t(this, V);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
V = new WeakMap();
|
|
27
|
-
var
|
|
28
|
-
class
|
|
27
|
+
var y, c, u, X;
|
|
28
|
+
class ye extends j {
|
|
29
29
|
constructor(e) {
|
|
30
30
|
super();
|
|
31
|
-
s(this,
|
|
31
|
+
s(this, y, null);
|
|
32
32
|
s(this, c, null);
|
|
33
33
|
s(this, u, "offsetHeight");
|
|
34
34
|
s(this, X, (e) => {
|
|
35
35
|
const h = e.shiftKey ? -1 : 1;
|
|
36
|
-
let
|
|
37
|
-
e.code === "Space" ?
|
|
36
|
+
let a;
|
|
37
|
+
e.code === "Space" ? a = h * t(this, c)[t(this, u)] * 0.4 : e.code === "ArrowLeft" ? a = -1 * t(this, c)[t(this, u)] * 0.2 : e.code === "ArrowRight" ? a = 1 * t(this, c)[t(this, u)] * 0.2 : e.code === "ArrowUp" ? a = -1 * t(this, c)[t(this, u)] * 0.2 : e.code === "ArrowDown" ? a = 1 * t(this, c)[t(this, u)] * 0.2 : e.code === "PageUp" ? a = -1 * t(this, c)[t(this, u)] : e.code === "PageDown" ? a = 1 * t(this, c)[t(this, u)] : e.code === "Home" ? a = 0 : e.code === "End" && (a = t(this, u) === "offsetWidth" ? t(this, c).scrollWidth : t(this, c).scrollHeight), a && (e.stopPropagation(), this.changeEvent.notify("keyboard", a, e));
|
|
38
38
|
});
|
|
39
|
-
b && (i(this,
|
|
39
|
+
b && (i(this, y, e != null && e.element && Z(e.element) || window), i(this, c, t(this, y) instanceof HTMLElement ? t(this, y) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
|
|
40
40
|
}
|
|
41
41
|
set dimension(e) {
|
|
42
42
|
i(this, u, e === "width" ? "offsetWidth" : "offsetHeight");
|
|
43
43
|
}
|
|
44
44
|
connect() {
|
|
45
|
-
b && t(this,
|
|
45
|
+
b && t(this, y).addEventListener(
|
|
46
46
|
"keydown",
|
|
47
47
|
t(this, X)
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
disconnect() {
|
|
51
|
-
b && t(this,
|
|
51
|
+
b && t(this, y).removeEventListener(
|
|
52
52
|
"keydown",
|
|
53
53
|
t(this, X)
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
var E, M, Y, O, d, I,
|
|
57
|
+
y = new WeakMap(), c = new WeakMap(), u = new WeakMap(), X = new WeakMap();
|
|
58
|
+
var E, M, Y, O, d, I, f, w, Q, J, H, S, q;
|
|
59
59
|
class Ee extends j {
|
|
60
60
|
constructor(e) {
|
|
61
61
|
super();
|
|
@@ -66,11 +66,11 @@ class Ee extends j {
|
|
|
66
66
|
s(this, O);
|
|
67
67
|
s(this, d);
|
|
68
68
|
s(this, I);
|
|
69
|
-
s(this,
|
|
69
|
+
s(this, f);
|
|
70
70
|
s(this, H);
|
|
71
71
|
s(this, S);
|
|
72
72
|
s(this, q);
|
|
73
|
-
this.direction = 1, i(this, d, new te(0, { easing: ee })), i(this,
|
|
73
|
+
this.direction = 1, i(this, d, new te(0, { easing: ee })), i(this, f, !1), i(this, H, (h) => {
|
|
74
74
|
t(this, d).current !== 1 && this.changeEvent.notify(
|
|
75
75
|
"autoplay",
|
|
76
76
|
h.timeBetweenFrames * t(this, E) * this.direction * (1 - t(this, d).current),
|
|
@@ -87,19 +87,19 @@ class Ee extends j {
|
|
|
87
87
|
}), i(this, E, (e == null ? void 0 : e.speed) || 1), i(this, M, (e == null ? void 0 : e.interval) || !1), i(this, Y, e);
|
|
88
88
|
}
|
|
89
89
|
set interval(e) {
|
|
90
|
-
i(this, M, e), t(this,
|
|
90
|
+
i(this, M, e), t(this, f) && A(this, w, Q).call(this);
|
|
91
91
|
}
|
|
92
92
|
set speed(e) {
|
|
93
|
-
i(this, E, e), t(this,
|
|
93
|
+
i(this, E, e), t(this, f) && A(this, w, Q).call(this);
|
|
94
94
|
}
|
|
95
95
|
connect() {
|
|
96
|
-
t(this,
|
|
96
|
+
t(this, f) || (i(this, f, !0), A(this, w, Q).call(this));
|
|
97
97
|
}
|
|
98
98
|
disconnect() {
|
|
99
|
-
t(this,
|
|
99
|
+
t(this, f) && (i(this, f, !1), A(this, w, J).call(this));
|
|
100
100
|
}
|
|
101
101
|
pauseAndContinue(e, h) {
|
|
102
|
-
t(this,
|
|
102
|
+
t(this, f) && e && (clearTimeout(t(this, I)), t(this, d).set(1, {
|
|
103
103
|
duration: Math.min(e, 1e3),
|
|
104
104
|
equalize: h
|
|
105
105
|
}), i(this, I, setTimeout(() => {
|
|
@@ -110,7 +110,7 @@ class Ee extends j {
|
|
|
110
110
|
}, e)));
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
E = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), d = new WeakMap(), I = new WeakMap(),
|
|
113
|
+
E = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), d = new WeakMap(), I = new WeakMap(), f = new WeakMap(), w = new WeakSet(), Q = function() {
|
|
114
114
|
A(this, w, J).call(this), t(this, M) ? i(this, O, setInterval(
|
|
115
115
|
t(this, S),
|
|
116
116
|
Math.abs(t(this, E))
|
|
@@ -133,9 +133,9 @@ class xe extends j {
|
|
|
133
133
|
s(this, P);
|
|
134
134
|
s(this, B, (e) => {
|
|
135
135
|
let h = 0;
|
|
136
|
-
const
|
|
137
|
-
if (!(this.axis === "x" &&
|
|
138
|
-
if (h = (this.axis === "max" ?
|
|
136
|
+
const a = Math.abs(e.deltaY), g = Math.abs(e.deltaX);
|
|
137
|
+
if (!(this.axis === "x" && a > g || this.axis === "y" && g > a) && (e.preventDefault(), !(this.debounce && this.axis === "x" && g < 5 || this.debounce && this.axis === "y" && a < 5)))
|
|
138
|
+
if (h = (this.axis === "max" ? g > a ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
|
|
139
139
|
const R = Date.now();
|
|
140
140
|
if (R - t(this, P) > 40 && (h = 100 * Math.sign(h)), i(this, P, R), Math.abs(h) < 100 || t(this, k))
|
|
141
141
|
return;
|
|
@@ -180,22 +180,22 @@ const v = class v extends j {
|
|
|
180
180
|
Math.abs(t(this, x)) > 2 && h.preventDefault();
|
|
181
181
|
}), i(this, N, (h) => {
|
|
182
182
|
if (i(this, x, 0), i(this, l, 0), h.button !== 0 || h.composedPath().find(
|
|
183
|
-
(
|
|
183
|
+
(m) => m instanceof HTMLElement && m.hasAttribute("drag-dead-zone")
|
|
184
184
|
))
|
|
185
185
|
return;
|
|
186
186
|
this.swipe || D.unsubscribe(t(this, L));
|
|
187
|
-
let
|
|
187
|
+
let a = h, g = !1;
|
|
188
188
|
document.documentElement.classList.add("grabbing");
|
|
189
189
|
let R = 0, $ = 0, F = 0, U = 0;
|
|
190
190
|
ie(
|
|
191
|
-
(
|
|
192
|
-
t(v, T) && t(v, T) !== t(this, o) || (R =
|
|
191
|
+
(m) => {
|
|
192
|
+
t(v, T) && t(v, T) !== t(this, o) || (R = a.x - m.x, $ = a.y - m.y, F = m.x - h.x, U = m.y - h.y, this.axis === "x" ? (i(this, x, F), i(this, l, R)) : (i(this, x, U), i(this, l, $)), a = m, g = this.axis === "x" && Math.abs(F) > Math.abs(U) || this.axis === "y" && Math.abs(U) > Math.abs(F), g && (document.documentElement.classList.add("dragging"), document.documentElement.classList.add("click-disabled"), i(v, T, t(this, o)), this.changeEvent.notify("drag", t(this, l), m)));
|
|
193
193
|
},
|
|
194
|
-
(
|
|
195
|
-
i(v, T, null),
|
|
194
|
+
(m) => {
|
|
195
|
+
i(v, T, null), g && (!this.swipe && this.inertion ? (i(this, l, t(this, l) * this.inertion), D.subscribe(t(this, L), {
|
|
196
196
|
order: he.CONTROLS - 1
|
|
197
|
-
})) : this.swipe && this.changeEvent.notify("drag-end", t(this, l),
|
|
198
|
-
document.documentElement.classList.remove("click-disabled");
|
|
197
|
+
})) : this.swipe && this.changeEvent.notify("drag-end", t(this, l), m)), setTimeout(() => {
|
|
198
|
+
document.documentElement.classList.remove("grabbing"), document.documentElement.classList.remove("dragging"), document.documentElement.classList.remove("click-disabled");
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
);
|
|
@@ -223,6 +223,6 @@ export {
|
|
|
223
223
|
Ee as A,
|
|
224
224
|
j as C,
|
|
225
225
|
p as D,
|
|
226
|
-
|
|
226
|
+
ye as K,
|
|
227
227
|
xe as W
|
|
228
228
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var p=n=>{throw TypeError(n)};var G=(n,a,e)=>a.has(n)||p("Cannot "+e);var t=(n,a,e)=>(G(n,a,"read from private field"),e?e.call(n):a.get(n)),s=(n,a,e)=>a.has(n)?p("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,e),i=(n,a,e,h)=>(G(n,a,"write to private field"),h?h.call(n,e):a.set(n,e),e),T=(n,a,e)=>(G(n,a,"access private method"),e);const w=require("./index-DekP7OZe.cjs"),_=require("./dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const B=require("./ticker/index.cjs");require("./Store-Cd1GlEmZ.cjs");const ee=require("./easings-GegIwET5.cjs"),te=require("./Tweened-mvHucL4Y.cjs"),ie=require("./gestures-C7gbKx11.cjs"),se=require("./number-ChAm68cm.cjs"),he=require("./order/index.cjs"),ne=require("./notifier/index.cjs");var j;class F{constructor(){s(this,j,new ne.Notifier)}get changeEvent(){return t(this,j)}}j=new WeakMap;var y,c,u,R;class re extends F{constructor(e){super();s(this,y,null);s(this,c,null);s(this,u,"offsetHeight");s(this,R,e=>{const h=e.shiftKey?-1:1;let r;e.code==="Space"?r=h*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?r=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?r=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?r=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?r=1*t(this,c)[t(this,u)]:e.code==="Home"?r=0:e.code==="End"&&(r=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),r&&(e.stopPropagation(),this.changeEvent.notify("keyboard",r,e))});w.isBrowser&&(i(this,y,e!=null&&e.element&&_.getElement(e.element)||window),i(this,c,t(this,y)instanceof HTMLElement?t(this,y):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){w.isBrowser&&t(this,y).addEventListener("keydown",t(this,R))}disconnect(){w.isBrowser&&t(this,y).removeEventListener("keydown",t(this,R))}}y=new WeakMap,c=new WeakMap,u=new WeakMap,R=new WeakMap;var E,v,X,Y,d,A,m,b,V,J,D,O,I;class ae extends F{constructor(e){super();s(this,b);s(this,E);s(this,v);s(this,X);s(this,Y);s(this,d);s(this,A);s(this,m);s(this,D);s(this,O);s(this,I);this.direction=1,i(this,d,new te.Tweened(0,{easing:ee.easeInQuad})),i(this,m,!1),i(this,D,h=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",h.timeBetweenFrames*t(this,E)*this.direction*(1-t(this,d).current),h)}),i(this,O,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,E))*this.direction*(1-t(this,d).current),null)}),i(this,I,()=>{t(this,v)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,E,(e==null?void 0:e.speed)||1),i(this,v,(e==null?void 0:e.interval)||!1),i(this,X,e)}set interval(e){i(this,v,e),t(this,m)&&T(this,b,V).call(this)}set speed(e){i(this,E,e),t(this,m)&&T(this,b,V).call(this)}connect(){t(this,m)||(i(this,m,!0),T(this,b,V).call(this))}disconnect(){t(this,m)&&(i(this,m,!1),T(this,b,J).call(this))}pauseAndContinue(e,h){t(this,m)&&e&&(clearTimeout(t(this,A)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:h}),i(this,A,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:h})},e)))}}E=new WeakMap,v=new WeakMap,X=new WeakMap,Y=new WeakMap,d=new WeakMap,A=new WeakMap,m=new WeakMap,b=new WeakSet,V=function(){T(this,b,J).call(this),t(this,v)?i(this,Y,setInterval(t(this,O),Math.abs(t(this,E)))):B.ticker.subscribe(t(this,D),t(this,X)),document.addEventListener("visibilitychange",t(this,I))},J=function(){clearInterval(t(this,Y)),B.ticker.unsubscribe(t(this,D)),clearTimeout(t(this,A)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,I))},D=new WeakMap,O=new WeakMap,I=new WeakMap;var H,M,z,S;class le extends F{constructor(e){super();s(this,H,null);s(this,M);s(this,z);s(this,S,e=>{let h=0;const r=Math.abs(e.deltaY),g=Math.abs(e.deltaX);if(!(this.axis==="x"&&r>g||this.axis==="y"&&g>r)&&(e.preventDefault(),!(this.debounce&&this.axis==="x"&&g<5||this.debounce&&this.axis==="y"&&r<5)))if(h=(this.axis==="max"?g>r?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const N=Date.now();if(N-t(this,z)>40&&(h=100*Math.sign(h)),i(this,z,N),Math.abs(h)<100||t(this,M))return;this.changeEvent.notify("wheel",h,e),i(this,M,setTimeout(()=>{i(this,M,void 0)},80))}else this.changeEvent.notify("wheel",h,e)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,z,Date.now()),w.isBrowser&&i(this,H,e!=null&&e.element&&_.getElement(e.element)||window)}connect(){w.isBrowser&&t(this,H).addEventListener("wheel",t(this,S),{passive:!1})}disconnect(){w.isBrowser&&(t(this,H).removeEventListener("wheel",t(this,S)),clearTimeout(t(this,M)))}}H=new WeakMap,M=new WeakMap,z=new WeakMap,S=new WeakMap;var q,P,o,l,C,x,W,K,L;const k=class k extends F{constructor(e){super();s(this,P);s(this,o);s(this,l);s(this,C);s(this,x);s(this,W);s(this,K);s(this,L);this.inertion=1,i(this,P,null),i(this,o,null),i(this,l,0),i(this,C,[]),i(this,x,0),i(this,W,h=>{Math.abs(t(this,x))>2&&h.preventDefault()}),i(this,K,h=>{if(i(this,x,0),i(this,l,0),h.button!==0||h.composedPath().find(f=>f instanceof HTMLElement&&f.hasAttribute("drag-dead-zone")))return;this.swipe||B.ticker.unsubscribe(t(this,L));let r=h,g=!1;document.documentElement.classList.add("grabbing");let N=0,$=0,U=0,Q=0;ie.setupDrag(f=>{t(k,q)&&t(k,q)!==t(this,o)||(N=r.x-f.x,$=r.y-f.y,U=f.x-h.x,Q=f.y-h.y,this.axis==="x"?(i(this,x,U),i(this,l,N)):(i(this,x,Q),i(this,l,$)),r=f,g=this.axis==="x"&&Math.abs(U)>Math.abs(Q)||this.axis==="y"&&Math.abs(Q)>Math.abs(U),g&&(document.documentElement.classList.add("dragging"),document.documentElement.classList.add("click-disabled"),i(k,q,t(this,o)),this.changeEvent.notify("drag",t(this,l),f)))},f=>{i(k,q,null),g&&(!this.swipe&&this.inertion?(i(this,l,t(this,l)*this.inertion),B.ticker.subscribe(t(this,L),{order:he.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",t(this,l),f)),setTimeout(()=>{document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging"),document.documentElement.classList.remove("click-disabled")})})}),i(this,L,()=>{Math.floor(Math.abs(t(this,l)))||B.ticker.unsubscribe(t(this,L)),i(this,l,t(this,l)*.95),i(this,l,se.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l),null)}),this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,w.isBrowser&&(i(this,o,e!=null&&e.element&&_.getElement(e.element)||document.documentElement),i(this,P,(e==null?void 0:e.rootElement)||t(this,o)))}connect(){w.isBrowser&&(i(this,C,[...t(this,P).querySelectorAll("a")]),t(this,C).forEach(e=>{e.addEventListener("click",t(this,W))}),t(this,o).addEventListener("pointerdown",t(this,K)))}disconnect(){w.isBrowser&&(t(this,C).forEach(e=>{e.removeEventListener("click",t(this,W))}),t(this,o).removeEventListener("pointerdown",t(this,K)),B.ticker.unsubscribe(t(this,L)))}};q=new WeakMap,P=new WeakMap,o=new WeakMap,l=new WeakMap,C=new WeakMap,x=new WeakMap,W=new WeakMap,K=new WeakMap,L=new WeakMap,s(k,q,null);let Z=k;exports.AutoplayControls=ae;exports.Controls=F;exports.DragControls=Z;exports.KeyboardControls=re;exports.WheelControls=le;
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-K67-diF5.cjs");exports.AutoplayControls=o.AutoplayControls;exports.Controls=o.Controls;exports.DragControls=o.DragControls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;
|
package/lib/controls/index.js
CHANGED
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var pi=Object.defineProperty;var Ns=Object.getOwnPropertySymbols,fi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,gi=Reflect.get;var Gs=d=>{throw TypeError(d)};var Us=(d,h,e)=>h in d?pi(d,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[h]=e,Zs=(d,h)=>{for(var e in h||(h={}))bi.call(h,e)&&Us(d,e,h[e]);if(Ns)for(var e of Ns(h))mi.call(h,e)&&Us(d,e,h[e]);return d};var Is=(d,h,e)=>h.has(d)||Gs("Cannot "+e);var t=(d,h,e)=>(Is(d,h,"read from private field"),e?e.call(d):h.get(d)),i=(d,h,e)=>h.has(d)?Gs("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(d):h.set(d,e),r=(d,h,e,s)=>(Is(d,h,"write to private field"),s?s.call(d,e):h.set(d,e),e),o=(d,h,e)=>(Is(d,h,"access private method"),e);var Rs=(d,h,e)=>gi(fi(d),e,h);var As=(d,h,e)=>new Promise((s,n)=>{var u=v=>{try{C(e.next(v))}catch(ae){n(ae)}},g=v=>{try{C(e.throw(v))}catch(ae){n(ae)}},C=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);C((e=e.apply(d,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const de=require("../Store-Cd1GlEmZ.cjs"),_=require("../index-DekP7OZe.cjs"),Ci=require("../easings-GegIwET5.cjs"),yi=require("../element-yhcBhsho.cjs"),st=require("../events-KVanG9sR.cjs"),Ls=require("../function-MthRj-GJ.cjs"),it=require("../layout-Ctc2p3uz.cjs"),$s=require("../math-GDWEqu7y.cjs"),js=require("../number-ChAm68cm.cjs"),Js=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Te=require("../order/index.cjs"),Qs=require("../Damped-z9Uaw2MJ.cjs"),vi=require("../Tweened-mvHucL4Y.cjs"),Es=require("../DragControls-tVaq-vIe.cjs"),ft=require("../window-resizer/index.cjs"),ue=require("../scroll-entries/index.cjs"),Ks=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),Pi=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const cs=require("../element-resizer/index.cjs"),Ei=require("../gestures-C7gbKx11.cjs"),wi=require("../dom-JBOkFLTh.cjs");var p,De,E,us,as,fe,bt,$t,be,Ht,Fe;class xi{constructor(h,e,s){i(this,Ht);i(this,p);i(this,De);i(this,E);i(this,us,0);i(this,as,0);i(this,fe,0);i(this,bt,0);i(this,$t,null);i(this,be,0);r(this,p,h),r(this,De,e),r(this,E,s),ue.scrollEntries.register(t(this,p)),this.setIndex(t(this,De))}get element(){return t(this,p)}get index(){return t(this,De)}get size(){return t(this,fe)}get width(){return t(this,us)}get height(){return t(this,as)}get position(){return t(this,bt)}get transformPosition(){return t(this,be)}destroy(){ue.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setOffsetIndex(null),this.setMiddle(!1),this.setSize()}setSize(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,us,t(this,p).offsetWidth),r(this,as,t(this,p).offsetHeight),r(this,fe,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,bt,t(this,E).vertical?it.getCumulativeOffsetTop(t(this,p)):it.getCumulativeOffsetLeft(t(this,p))),r(this,bt,t(this,bt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,bt)+t(this,fe)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),ue.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,bt)-t(this,E).viewportSize-s,g=t(this,bt)+t(this,fe)+s,C=js.preciseNumber($s.clamp(n,u,g),3);r(this,be,C*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,be)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,be)}px, 0px, 0px)`}setMark(h){t(this,$t)!==h&&(t(this,$t)&&t(this,p).classList.remove(t(this,$t)),h&&t(this,p).classList.add(h),r(this,$t,h),st.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,$t)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,Ht,Fe).call(this,"index",h)}setCurrentIndex(h){o(this,Ht,Fe).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,Ht,Fe).call(this,"current-index-arc",h)}setOffsetIndex(h){o(this,Ht,Fe).call(this,"offset-index",h)}setCurrentIndexArcAbs(h){o(this,Ht,Fe).call(this,"current-index-arc-abs",h)}}p=new WeakMap,De=new WeakMap,E=new WeakMap,us=new WeakMap,as=new WeakMap,fe=new WeakMap,bt=new WeakMap,$t=new WeakMap,be=new WeakMap,Ht=new WeakSet,Fe=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const Li=Js.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:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".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 S,me,T,Wt,mt,gt,Ct,j,_t,Nt,yt,Ut,ge,J,V,Ce,ye,ve,Pe,qe,Ee,Q,we,Gt,X,vt,Pt,xe,Zt,Le,ze,Kt,jt,Jt,f,Be,N,a,ds,Ss,L,P,U,rt,Qt,nt,M,k,$e,Et,wt,xt,G,He,Lt,Xt,zt,ht,I,We,Vt,Ve,_e,c,Ms,os,Oe,ws,xs,Fs,Os,F,ps,Xs,Ne,fs,Ts,Ds,Se,Ys,bs,ls,Ue;class zs extends HTMLElement{constructor(){super();i(this,c);i(this,S,null);i(this,me,new l.CSSProperty(this,"--controls",!0));i(this,T,new l.CSSProperty(this,"--axis","y"));i(this,Wt,new l.CSSProperty(this,"--reverse",!1));i(this,mt,new l.CSSProperty(this,"--direction",0));i(this,gt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,Ct,new l.CSSProperty(this,"--split",!1));i(this,j,new l.CSSProperty(this,"--sectional",!1));i(this,_t,new l.CSSProperty(this,"--tween-easing",!1));i(this,Nt,new l.CSSProperty(this,"--tween-duration",!1));i(this,yt,new l.CSSProperty(this,"--auto-size",!1));i(this,Ut,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,ge,new l.CSSProperty(this,"--drag-inertion",1));i(this,J,new l.CSSProperty(this,"--sections-in-view",1));i(this,V,new l.CSSProperty(this,"--loop",!1));i(this,Ce,new l.CSSProperty(this,"--damping",20));i(this,ye,new l.CSSProperty(this,"--mass",0));i(this,ve,new l.CSSProperty(this,"--stiffness",0));i(this,Pe,new l.CSSProperty(this,"--mouse-drag",!1));i(this,qe,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,Ee,new l.CSSProperty(this,"--start-section",0));i(this,Q,new l.CSSProperty(this,"--autoplay",0));i(this,we,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,Gt,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,X,new l.CSSProperty(this,"--classes",!1));i(this,vt,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,Pt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,xe,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Zt,new l.CSSProperty(this,"--focus-delay",0));i(this,Le,new l.CSSProperty(this,"--focus-duration",3e3));i(this,ze,new l.CSSProperty(this,"--shift-limit",0));i(this,Kt,new l.CSSProperty(this,"--disabled",!1));i(this,jt,new l.CSSProperty(this,"--hibernate",!1));i(this,Jt,null);i(this,f,null);i(this,Be,null);i(this,N,[]);i(this,a,[]);i(this,ds,0);i(this,Ss,0);i(this,L,0);i(this,P,0);i(this,U,0);i(this,rt,null);i(this,Qt,null);i(this,nt,null);i(this,M,null);i(this,k,new de.Store(0));i(this,$e,0);i(this,Et,0);i(this,wt,!1);i(this,xt,!0);i(this,G,!0);i(this,He);i(this,Lt);i(this,Xt,new vi.Tweened);i(this,zt,!1);i(this,ht,null);i(this,I,!1);i(this,We,null);i(this,Vt,[]);i(this,Ve,!1);i(this,_e);i(this,F,e=>{if(e&&t(this,Ve)){r(this,Ve,!1);return}this.resize()});i(this,ps,()=>{if(!t(this,wt)||t(this,G)||t(this,xt))return;const e=this.currentScrollValue;if(r(this,$e,Math.max(0,e-t(this,P))),t(this,a).length){for(let s=0;s<t(this,N).length;s++)t(this,N)[s].transform();(t(this,zt)||!t(this,j).current)&&(t(this,k).current=o(this,c,ls).call(this))}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,Ys).call(this),ue.scrollEntries.update(this,t(this,T).current,e)});i(this,Ne,(e,s)=>{t(this,me).current&&(o(this,c,Ts).call(this,Math.sign(s)||1),t(this,fs).call(this,e,s))});i(this,fs,(e,s)=>{if(!t(this,Lt)){if(t(this,mt).current){if(t(this,mt).current<0&&s>0)return;if(t(this,mt).current>0&&s<0)return}if(!t(this,Q).current&&t(this,Zt).current&&(clearInterval(t(this,He)),r(this,He,setTimeout(()=>{const n=t(this,a)[o(this,c,ls).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Le).current,easing:Ci.easeInOutExpo}})},t(this,Zt).current))),!(e.includes("drag")&&!Pi.device.isTouch&&!t(this,Pe).current)){if(t(this,j).current&&e!=="drag"){const n=Math.sign(s);t(this,a).length?t(this,zt)?this.scrollToSection(o(this,c,ls).call(this,!0)):this.shiftSections(n,{tween:t(this,_t).current||t(this,Nt).current?{easing:t(this,_t).current||"easeInOutCubic",duration:t(this,Nt).current||500}:void 0}):t(this,S).shift(n*t(this,L))}else t(this,S).shift(s);r(this,zt,e==="drag")}}});i(this,bs,Ls.debounce(()=>{const e=t(this,Vt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,_e)),r(this,Ve,!0),this.style.setProperty("--max-section-size",""),r(this,_e,setTimeout(()=>{r(this,Ve,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,Ue,()=>{r(this,I,!0),this.hibernatedCSSProperty.current||o(this,c,Os).call(this),cs.elementResizer.subscribe(this,t(this,F)),ft.windowResizer.unsubscribe(t(this,Ue))});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Li];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Jt,document.createElement("div")),t(this,Jt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Be,document.createElement("slot")),t(this,f).appendChild(t(this,Be)),t(this,Jt).appendChild(t(this,f)),e.appendChild(t(this,Jt)),r(this,We,new MutationObserver(Ls.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,S)}get controlsCSSProperty(){return t(this,me)}get axisCSSProperty(){return t(this,T)}get reverseCSSProperty(){return t(this,Wt)}get directionCSSProperty(){return t(this,mt)}get pagesCSSProperty(){return t(this,gt)}get splitCSSProperty(){return t(this,Ct)}get sectionalCSSProperty(){return t(this,j)}get easingCSSProperty(){return t(this,_t)}get durationCSSProperty(){return t(this,Nt)}get autoSizeCSSProperty(){return t(this,yt)}get wheelMaxDeltaCSSProperty(){return t(this,Ut)}get dragInertionCSSProperty(){return t(this,ge)}get sectionsInViewCSSProperty(){return t(this,J)}get loopCSSProperty(){return t(this,V)}get dampingCSSProperty(){return t(this,Ce)}get massCSSProperty(){return t(this,ye)}get stiffnessCSSProperty(){return t(this,ve)}get mouseDragCSSProperty(){return t(this,Pe)}get sectionDistanceScaleCSSProperty(){return t(this,qe)}get startSectionCSSProperty(){return t(this,Ee)}get autoplayCSSProperty(){return t(this,Q)}get autoplayPauseDurationCSSProperty(){return t(this,we)}get autoplayUserDirectionCSSProperty(){return t(this,Gt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,vt)}get currentIndexEndOffsetCSSProperty(){return t(this,Pt)}get shiftSectionPositionCSSProperty(){return t(this,xe)}get focusDelayCSSProperty(){return t(this,Zt)}get focusDurationCSSProperty(){return t(this,Le)}get shiftLimitCSSProperty(){return t(this,ze)}get disabledCSSProperty(){return t(this,Kt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return o(this,c,Ds).call(this,"current")}get targetScrollValue(){return o(this,c,Ds).call(this,"target")}get contentWrapperElement(){return t(this,Jt)}get contentElement(){return t(this,f)}get sections(){return t(this,N)}get visibleSections(){return t(this,a)}get position(){return t(this,ds)}get contentPosition(){return t(this,Ss)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,U)}get counter(){return t(this,k)}get limit(){return Math.ceil(t(this,a).length-t(this,J).current+t(this,ze).current)}get distance(){return t(this,Et)}get loopDistance(){return t(this,V).current?t(this,Et)+t(this,U):t(this,Et)}get hasOverflow(){return t(this,wt)}get overscroll(){return t(this,$e)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,T).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,T).current==="y"?0:t(this,S).distance}get scrollHeight(){return t(this,T).current==="x"?0:t(this,S).distance}tryResplit(){!t(this,G)&&(t(this,V).current||t(this,Ct).current||t(this,V).current||t(this,yt).current||t(this,j).current)&&o(this,c,os).call(this)}onScroll(...e){return t(this,S).subscribe(...e)}offScroll(...e){t(this,S).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,a).length||t(this,G)||t(this,Lt))return;const n=t(this,k).current,u=o(this,c,Xs).call(this,e);t(this,zt)||(t(this,k).current=u);const g=t(this,a)[n],C=t(this,a)[u];if(g&&C){let v=0;const ae=o(this,c,ls).call(this),Me=t(this,a)[ae];let hs=Me?this.targetScrollValue-Me.position:0;t(this,V).current?u===0&&n===t(this,a).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,U),t(this,zt)||(hs=0)):u===t(this,a).length-1&&n===0?v=C.position-(t(this,P)+t(this,L)+t(this,U)):v=C.position-g.position:v=C.position-g.position,this.shiftPosition(v-hs,s)}}shiftSections(e,s){t(this,a).length&&this.scrollToSection(t(this,k).current+e,s)}setPosition(e,s){t(this,G)||(o(this,c,Ts).call(this,Math.sign(e)||1),s!=null&&s.tween?(clearTimeout(t(this,Lt)),t(this,Xt).set(t(this,S).current,{equalize:!0}),t(this,Xt).set(e,Zs({},s.tween)),r(this,Lt,setTimeout(()=>{r(this,Lt,void 0)},s.tween.duration||0))):t(this,S).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,S).target+e,s)}resize(){if(t(this,jt).current)return;r(this,a,t(this,N).filter(n=>yi.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,a).length.toString()),t(this,S).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,k).current;if(r(this,ds,this.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this)),r(this,Ss,this.vertical?it.getCumulativeOffsetTop(t(this,f)):it.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,yt).current&&t(this,a).length){const n=t(this,J).current,u=(t(this,L)-t(this,U)*(n-1))/n;t(this,a).forEach(g=>{g.setSize(u)})}else t(this,a).forEach(n=>{n.setSize()});if(t(this,a).forEach(n=>{n.resize()}),t(this,gt).current){r(this,P,t(this,L)*t(this,gt).current);const n=t(this,P)+t(this,L);this.vertical?(t(this,f).style.width=n+"px",t(this,f).style.height="100%"):(t(this,f).style.height=n+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,V).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,S).max=t(this,P)}if(t(this,V).current&&t(this,a).length){const n=t(this,a)[t(this,a).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Et,n.position+n.size+g)}else r(this,Et,t(this,P));if(t(this,j).current&&t(this,a).length){const n=t(this,a)[s];t(this,S).set(n.position,{equalize:!0})}else t(this,S).set(e*t(this,P),{equalize:!0});r(this,wt,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,wt)),t(this,wt)?t(this,Kt).current||o(this,c,xs).call(this):o(this,c,ws).call(this),t(this,bs).call(this),st.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,S).notify()}connectedCallback(){ue.scrollEntries.register(this),r(this,S,new Qs.Damped(0,{damping:.01,min:0,order:Te.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new Es.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,Ne)),r(this,Qt,new Es.KeyboardControls({element:this})),t(this,Qt).changeEvent.subscribe(t(this,Ne)),r(this,nt,new Es.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,Ne)),r(this,M,new Es.AutoplayControls({culling:this})),t(this,M).changeEvent.subscribe(t(this,fs)),t(this,T).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Wt).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Ut).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,T).current}),t(this,ge).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,gt).subscribe(()=>{t(this,I)&&t(this,F).call(this)}),t(this,Ct).subscribe(({current:e})=>{t(this,I)&&(e?o(this,c,os).call(this):o(this,c,Oe).call(this))}),t(this,j).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,M).interval=e.current,t(this,I)&&(e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,yt).subscribe(e=>{t(this,I)&&(t(this,F).call(this),e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,J).subscribe(e=>{t(this,I)&&(t(this,F).call(this),o(this,c,Se).call(this))}),t(this,V).subscribe(e=>{e.current?(t(this,I)&&(t(this,a).length||(t(this,Ct).current=!0)),t(this,S).max=1/0,t(this,S).min=-1/0):(r(this,$e,0),t(this,S).max=t(this,P),t(this,S).min=0),this.classList.toggle("loop",!!e.current)}),t(this,Ce).subscribe(e=>{t(this,S).damping=e.current}),t(this,ye).subscribe(e=>{t(this,S).mass=e.current}),t(this,ve).subscribe(e=>{t(this,S).stiffness=e.current}),t(this,Q).subscribe(e=>{t(this,M).speed=e.current,!t(this,xt)&&e.current&&!e.previous?t(this,M).connect():!e.current&&e.previous&&t(this,M).disconnect()}),t(this,Gt).subscribe(e=>{e.current||(t(this,M).direction=1)}),t(this,X).subscribe(e=>{t(this,I)&&o(this,c,Se).call(this)}),t(this,vt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,Se).call(this)}),t(this,Pt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,Se).call(this)}),t(this,xe).subscribe(e=>{t(this,I)&&t(this,S).notify()}),t(this,S).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,k).subscribe(e=>{t(this,G)||(t(this,a).length&&o(this,c,Se).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,Xt).subscribe(e=>{t(this,Xt).isRunning.current&&t(this,S).set(e.current,{equalize:!0})}),t(this,Kt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,ws).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,xs).call(this))}),t(this,jt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,Fs).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Os).call(this))}),t(this,me).observe(),t(this,T).observe(),t(this,Wt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,Ct).observe(),t(this,j).observe(),t(this,_t).observe(),t(this,Nt).observe(),t(this,yt).observe(),t(this,Ut).observe(),t(this,ge).observe(),t(this,J).observe(),t(this,V).observe(),t(this,Ce).observe(),t(this,ye).observe(),t(this,ve).observe(),t(this,Pe).observe(),t(this,qe).observe(),t(this,Ee).observe(),t(this,Q).observe(),t(this,Q).observe(),t(this,we).observe(),t(this,Gt).observe(),t(this,X).observe(),t(this,vt).observe(),t(this,Pt).observe(),t(this,xe).observe(),t(this,Zt).observe(),t(this,Le).observe(),t(this,ze).observe(),t(this,Kt).observe(),t(this,jt).observe(),ft.windowResizer.subscribe(t(this,Ue),Te.RESIZE_ORDER.LAST),t(this,We).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,me).unobserve(),t(this,T).unobserve(),t(this,Wt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,Ct).unobserve(),t(this,j).unobserve(),t(this,_t).unobserve(),t(this,Nt).unobserve(),t(this,yt).unobserve(),t(this,Ut).unobserve(),t(this,ge).unobserve(),t(this,J).unobserve(),t(this,V).unobserve(),t(this,Ce).unobserve(),t(this,ye).unobserve(),t(this,ve).unobserve(),t(this,Pe).unobserve(),t(this,qe).unobserve(),t(this,Ee).unobserve(),t(this,Q).unobserve(),t(this,we).unobserve(),t(this,Gt).unobserve(),t(this,X).unobserve(),t(this,vt).unobserve(),t(this,Pt).unobserve(),t(this,xe).unobserve(),t(this,Zt).unobserve(),t(this,Le).unobserve(),t(this,ze).unobserve(),t(this,Kt).unobserve(),t(this,jt).unobserve(),ft.windowResizer.unsubscribe(t(this,Ue)),ft.windowResizer.unsubscribe(t(this,F)),cs.elementResizer.unsubscribe(t(this,F)),o(this,c,Fs).call(this),t(this,We).disconnect()}}S=new WeakMap,me=new WeakMap,T=new WeakMap,Wt=new WeakMap,mt=new WeakMap,gt=new WeakMap,Ct=new WeakMap,j=new WeakMap,_t=new WeakMap,Nt=new WeakMap,yt=new WeakMap,Ut=new WeakMap,ge=new WeakMap,J=new WeakMap,V=new WeakMap,Ce=new WeakMap,ye=new WeakMap,ve=new WeakMap,Pe=new WeakMap,qe=new WeakMap,Ee=new WeakMap,Q=new WeakMap,we=new WeakMap,Gt=new WeakMap,X=new WeakMap,vt=new WeakMap,Pt=new WeakMap,xe=new WeakMap,Zt=new WeakMap,Le=new WeakMap,ze=new WeakMap,Kt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,f=new WeakMap,Be=new WeakMap,N=new WeakMap,a=new WeakMap,ds=new WeakMap,Ss=new WeakMap,L=new WeakMap,P=new WeakMap,U=new WeakMap,rt=new WeakMap,Qt=new WeakMap,nt=new WeakMap,M=new WeakMap,k=new WeakMap,$e=new WeakMap,Et=new WeakMap,wt=new WeakMap,xt=new WeakMap,G=new WeakMap,He=new WeakMap,Lt=new WeakMap,Xt=new WeakMap,zt=new WeakMap,ht=new WeakMap,I=new WeakMap,We=new WeakMap,Vt=new WeakMap,Ve=new WeakMap,_e=new WeakMap,c=new WeakSet,Ms=function(){const e=t(this,T).current,s=t(this,Wt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,Ut).current?"max":e,t(this,Qt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,I)&&t(this,F).call(this)},os=function(){o(this,c,Oe).call(this),t(this,Be).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,N).push(new xi(e,s,this))}),r(this,a,[...t(this,N)]),t(this,f).style.transform="",st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,F).call(this),o(this,c,Se).call(this)},Oe=function(){t(this,N).forEach(e=>{e.destroy()}),r(this,N,[]),r(this,a,[]),t(this,k).reset(),t(this,S).reset(),this.style.removeProperty("--max-section-size"),st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ws=function(){t(this,xt)||(r(this,xt,!0),t(this,S).unsubscribe(t(this,ps)),t(this,S).unlistenAnimationFrame(),clearInterval(t(this,He)),clearInterval(t(this,Lt)),t(this,Xt).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Qt).disconnect(),t(this,nt).disconnect(),t(this,M).disconnect(),t(this,wt)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,F).call(this)))},xs=function(){t(this,xt)&&(r(this,xt,!1),t(this,S).subscribe(t(this,ps),-1e4),t(this,S).notify(),t(this,rt).connect(),t(this,Qt).connect(),t(this,nt).connect(),t(this,Q).current&&t(this,M).connect())},Fs=function(){t(this,G)||(r(this,G,!0),clearTimeout(t(this,_e)),ft.windowResizer.unsubscribe(t(this,F)),o(this,c,ws).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,N).length?o(this,c,Oe).call(this):(t(this,k).reset(),t(this,S).reset()),ue.scrollEntries.unregister(this))},Os=function(){t(this,G)&&(r(this,G,!1),ue.scrollEntries.register(this),this.tryResplit(),o(this,c,xs).call(this),this.scrollToSection(t(this,Ee).current,{behaviour:"instant"}),ft.windowResizer.subscribe(t(this,F),Te.RESIZE_ORDER.SCROLL))},F=new WeakMap,ps=new WeakMap,Xs=function(e){let s=t(this,k).current;return t(this,V).current?s=js.loopNumber(e,t(this,a).length):s=$s.clamp(e,0,this.limit),s},Ne=new WeakMap,fs=new WeakMap,Ts=function(e=1){t(this,Gt).current&&(t(this,M).direction=e),t(this,Q).current&&t(this,M).pauseAndContinue(t(this,we).current,this.sectionalCSSProperty.current)},Ds=function(e="current"){if(t(this,V).current&&t(this,a).length){const s=Math.floor(t(this,S)[e])%Math.floor(t(this,P)+t(this,L)+t(this,U));return s<0?t(this,P)+s+t(this,L)+t(this,U):s}else return t(this,S)[e]},Se=function(){if(t(this,a).length){const e=t(this,k).current+t(this,vt).current;if(e===t(this,vt).current?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),st.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,X).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,J).current+t(this,Pt).current;r(this,Vt,[]),t(this,a).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,Pt).current,C=e+s,v=this.sections.length-C;u>=e&&u<C||u<=g?(n.setMark("current"),t(this,Vt).push(n)):u>=C&&u<C+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,bs).call(this)}}},Ys=function(){if(t(this,X).current){const e=Math.floor(t(this,Vt).length/2);t(this,Vt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,Vt).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)}),t(this,a).forEach((s,n)=>{s.setOffsetIndex(n-(t(this,k).current+t(this,J).current))})}},bs=new WeakMap,ls=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,S).direction;for(let C=0;C<t(this,a).length;C++){const v=t(this,a)[C];let ae=t(this,zt)?v.size*g*-1*.4:0,Me=v.position;this.overscroll&&Me===0&&e&&(Me=t(this,Et));let hs=Math.abs(Me+ae-s);hs<=n&&(n=hs,u=C)}return u},Ue=new WeakMap;_.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",zs);var ms;class ns extends HTMLElement{constructor(){super(...arguments);i(this,ms,null)}get scrollElement(){return t(this,ms)}connectedCallback(){const e=wi.findParentElement(this,zs);e instanceof zs?r(this,ms,e):console.error(this,"e-scroll not found")}}ms=new WeakMap;var Yt,D,kt,It,Ge,Ze,te,Ke,gs,Cs;class ti extends ns{constructor(){super();i(this,Yt,null);i(this,D,null);i(this,kt,!1);i(this,It,0);i(this,Ge,0);i(this,Ze,0);i(this,te,()=>{r(this,kt,this.offsetWidth>this.offsetHeight);const e=t(this,kt)?this.offsetWidth:this.offsetHeight;r(this,It,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,It,Math.max(t(this,It),30)),t(this,kt)?(t(this,D).style.width=t(this,It)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,It)+"px"),r(this,Ge,e-t(this,It)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ke).call(this)});i(this,Ke,()=>{r(this,Ze,this.scrollElement.currentProgress*t(this,Ge)),t(this,kt)?t(this,D).style.transform=`translate3d(${t(this,Ze)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,Ze)}px, 0px)`});i(this,gs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,Cs,e=>{document.documentElement.classList.add("grabbing"),Ei.setupDrag(u=>{const g=t(this,kt)?u.x:u.y,C=this.scrollElement.distance/t(this,Ge),v=(g-n)*C;this.scrollElement.setPosition(s+v)},()=>{document.documentElement.classList.remove("grabbing")});const s=this.scrollElement.damped.target,n=t(this,kt)?e.x:e.y});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Js.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"}})],r(this,Yt,document.createElement("slot")),t(this,Yt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Yt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Yt).assignedElements()[0]||t(this,Yt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,Cs)),ft.windowResizer.subscribe(t(this,te),Te.RESIZE_ORDER.SCROLL),cs.elementResizer.subscribe(this,t(this,te)),cs.elementResizer.subscribe(this.scrollElement,t(this,te)),this.scrollElement.onScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.subscribe(t(this,gs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,Cs)),ft.windowResizer.unsubscribe(t(this,te)),cs.elementResizer.unsubscribe(t(this,te)),this.scrollElement.offScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,gs))}}Yt=new WeakMap,D=new WeakMap,kt=new WeakMap,It=new WeakMap,Ge=new WeakMap,Ze=new WeakMap,te=new WeakMap,Ke=new WeakMap,gs=new WeakMap,Cs=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-scrollbar")&&customElements.define("e-scroll-scrollbar",ti);var je,Je,Qe;class Hs extends ns{constructor(){super();i(this,je,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Je,new l.CSSProperty(this,"--tween-easing",!1));i(this,Qe,new l.CSSProperty(this,"--tween-duration",0));_.isBrowser&&this.addEventListener("click",()=>{const e=t(this,je).current,s=t(this,Je).current,n=t(this,Qe).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,je).observe(),t(this,Je).observe(),t(this,Qe).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,je).close(),t(this,Je).close(),t(this,Qe).close()}}je=new WeakMap,Je=new WeakMap,Qe=new WeakMap;var Xe;class ei extends Hs{constructor(){super(...arguments);i(this,Xe,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xe).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xe).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xe).close()}}Xe=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ei);var Rt,Ye;class si extends Hs{constructor(){super(...arguments);i(this,Rt,new l.CSSProperty(this,"--step",1));i(this,Ye,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Rt).current>0&&this.scrollElement.scrollLine==="end"||t(this,Rt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Rt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Rt).subscribe(()=>{t(this,Ye).call(this)}),t(this,Rt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ye)),t(this,Ye).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Rt).close(),this.removeAttribute("disabled")}}Rt=new WeakMap,Ye=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",si);var ot,ee,ts,ys,vs,es;class zi{constructor(h,e,s){i(this,ot,null);i(this,ee,null);i(this,ts,null);i(this,ys,null);i(this,vs,()=>{t(this,ee).scrollToSection(t(this,ts),{behaviour:t(this,ys)})});i(this,es,()=>{t(this,ot).classList.toggle("current",t(this,ee).counter.current===t(this,ts))});_.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,ee,h),r(this,ys,s),r(this,ts,e),t(this,ot).addEventListener("click",t(this,vs)),t(this,ee).counter.subscribe(t(this,es)),t(this,es).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,vs)),t(this,ee).counter.unsubscribe(t(this,es)),t(this,ot).remove()}}ot=new WeakMap,ee=new WeakMap,ts=new WeakMap,ys=new WeakMap,vs=new WeakMap,es=new WeakMap;var ke,se,lt;class ii extends ns{constructor(){super(...arguments);i(this,ke,null);i(this,se,[]);i(this,lt,Ls.debounce(()=>{t(this,se).forEach(s=>s.destroy()),r(this,se,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new zi(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ke).appendChild(n.element),t(this,se).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",r(this,ke,document.createElement("div")),this.appendChild(t(this,ke)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,lt)),this.scrollElement.loopCSSProperty.subscribe(t(this,lt)),t(this,lt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,lt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,lt)),t(this,se).forEach(e=>e.destroy()),r(this,se,[]),t(this,ke).remove()}}ke=new WeakMap,se=new WeakMap,lt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",ii);var ie,re,ne,he,At,Mt,Ft,Ot,R,q,B,$,Tt,z,ct,ut,Y,Dt,Ie,at,dt,St,w,H,W,tt,et,Z,ss,m,qt,oe,is,x,pt,O,A,K,Re,Bt,y,le,b,ni,hi,oi,li,ci,ui,rs,Ae,qs,pe,ai,di,Bs;class ri extends ns{constructor(){super(...arguments);i(this,b);i(this,ie);i(this,re);i(this,ne);i(this,he);i(this,At);i(this,Mt);i(this,Ft);i(this,Ot);i(this,R);i(this,q);i(this,B);i(this,$);i(this,Tt);i(this,z);i(this,ct);i(this,ut);i(this,Y);i(this,Dt);i(this,Ie);i(this,at);i(this,dt);i(this,St);i(this,w);i(this,H);i(this,W);i(this,tt);i(this,et);i(this,Z);i(this,ss);i(this,m);i(this,qt);i(this,oe);i(this,is);i(this,x);i(this,pt);i(this,O);i(this,A);i(this,K);i(this,Re);i(this,Bt);i(this,y);i(this,le);i(this,rs);i(this,Ae);r(this,ie,new l.CSSProperty(this,"--damping",20)),r(this,re,new l.CSSProperty(this,"--mass",0)),r(this,ne,new l.CSSProperty(this,"--stiffness",0)),r(this,he,new l.CSSProperty(this,"--target","")),r(this,At,new l.CSSProperty(this,"--disabled",!1)),r(this,Mt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,Ft,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,Ot,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,Tt,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,ct,new l.CSSProperty(this,"--passed-var","")),r(this,ut,new l.CSSProperty(this,"--progress-var","")),r(this,Y,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Dt,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,Ie,new l.CSSProperty(this,"--animation-var-type","target")),r(this,at,new l.CSSProperty(this,"--distance-var","")),r(this,dt,new l.CSSProperty(this,"--start-var","")),r(this,St,new l.CSSProperty(this,"--finish-var","")),r(this,w,new de.Store(!1)),r(this,H,new de.Store(!1)),r(this,W,new de.Store(!1)),r(this,tt,new de.Store(!1)),r(this,et,new de.Store(!1)),r(this,Z,new de.Store(!1)),r(this,ss,[]),r(this,m,this),r(this,qt,0),r(this,oe,0),r(this,is,0),r(this,x,new Qs.Damped(0,{order:Te.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),r(this,Bt,!1),r(this,y,!0),r(this,le,!1),this.resize=()=>{r(this,oe,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,qt,this.scrollElement.vertical?it.getCumulativeOffsetTop(this,this.scrollElement):it.getCumulativeOffsetLeft(this,this.scrollElement));const e=it.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,qt,t(this,qt)-e),r(this,O,this.getStart()),r(this,A,this.getDistance()),r(this,O,t(this,O)+t(this,Ft).current),r(this,A,t(this,A)+t(this,Mt).current),r(this,K,t(this,O)+t(this,A)),this.scrollElement.currentScrollValue>t(this,K)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,dt).current,t(this,O)),this.setVar(t(this,St).current,t(this,K)),this.setVar(t(this,at).current,t(this,A)),t(this,x).max=t(this,A),r(this,Re,!0),t(this,Ae).call(this)},this.findAnotherScrollEntries=Ls.debounce(()=>{const e=ue.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,ss,e.slice(s+1)),this.tick()},0),r(this,rs,()=>{t(this,y)||this.resize()}),r(this,Ae,()=>{!t(this,y)&&t(this,Re)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,Mt)}get startOffsetCSSProperty(){return t(this,Ft)}get captureOnceCSSProperty(){return t(this,Ot)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,Tt)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,ct)}get progressVarCSSProperty(){return t(this,ut)}get progressArcVarCSSProperty(){return t(this,Y)}get progressArcMultCSSProperty(){return t(this,Dt)}get animationVarTypeCSSProperty(){return t(this,Ie)}get distanceVarCSSProperty(){return t(this,at)}get startVarCSSProperty(){return t(this,dt)}get finishVarCSSProperty(){return t(this,St)}get disabledCSSProperty(){return t(this,At)}get dampingCSSProperty(){return t(this,ie)}get massCSSProperty(){return t(this,re)}get stiffnessCSSProperty(){return t(this,ne)}get targetCSSProperty(){return t(this,he)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,W)}get isReleasedFromStart(){return t(this,tt)}get isCapturedFromFinish(){return t(this,et)}get isReleasedFromFinish(){return t(this,Z)}get directionPosition(){return t(this,qt)}get directionSize(){return t(this,oe)}get passed(){return t(this,x)}get progress(){return t(this,pt)}get progressArc(){return Math.abs(Math.cos(t(this,pt)*Math.PI))*t(this,Dt).current}get start(){return t(this,O)}get finish(){return t(this,K)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Bt)}get isDisabled(){return t(this,y)}tick(){let e=this.scrollElement.currentScrollValue;t(this,ss).forEach(u=>{e+=u.value});const s=e-t(this,O);t(this,le)||r(this,le,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,O)?t(this,W).current||o(this,b,oi).call(this):t(this,W).current&&!t(this,tt).current&&o(this,b,ci).call(this),n<t(this,K)?t(this,Z).current&&!t(this,et).current&&o(this,b,li).call(this):t(this,W).current&&!t(this,Z).current&&o(this,b,ui).call(this)),n>=t(this,O)&&n<t(this,K)?t(this,w).current||o(this,b,ni).call(this):t(this,w).current&&(t(this,x).set($s.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,hi).call(this)),t(this,Bt)&&t(this,Ot).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,y,!0))}disable(){this.style.cssText="",r(this,qt,0),r(this,oe,0),t(this,x).reset(),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,W).current=!1,t(this,tt).current=!1,t(this,et).current=!1,t(this,Z).current=!1,r(this,Bt,!1),r(this,y,!0),o(this,b,Bs).call(this)}enable(){r(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,W).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,et).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,tt).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,Z).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,ie).observe(),t(this,re).observe(),t(this,ne).observe(),t(this,he).observe(),t(this,At).observe(),t(this,Mt).observe(),t(this,Ft).observe(),t(this,Ot).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,Tt).observe(),t(this,z).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,Y).observe(),t(this,Dt).observe(),t(this,Ie).observe(),t(this,at).observe(),t(this,dt).observe(),t(this,St).observe();let e=!1;this.findAnotherScrollEntries(),t(this,At).current||this.enable(),t(this,ie).subscribe(s=>{t(this,x).damping=s.current}),t(this,re).subscribe(s=>{t(this,x).mass=s.current}),t(this,ne).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,he).subscribe(s=>{s.previous&&o(this,b,Bs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,At).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,Ft).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,Mt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Tt).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Ot).subscribe(s=>{t(this,y)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,ct).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ut).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,pt)))}),t(this,Y).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Dt).subscribe(s=>{t(this,y)||o(this,b,qs).call(this)}),t(this,dt).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,O)))}),t(this,St).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,K)))}),t(this,at).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,le)){r(this,le,!1);return}o(this,b,qs).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),ft.windowResizer.subscribe(t(this,rs),Te.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Ae)),e=!0}disconnectedCallback(){ft.windowResizer.unsubscribe(t(this,rs)),this.scrollElement.offScroll(t(this,Ae)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,ie).close(),t(this,re).close(),t(this,ne).close(),t(this,he).close(),t(this,At).close(),t(this,Mt).close(),t(this,Ft).close(),t(this,Ot).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,Tt).close(),t(this,z).close(),t(this,ct).close(),t(this,ut).close(),t(this,Y).close(),t(this,Dt).close(),t(this,at).close(),t(this,dt).close(),t(this,St).close(),t(this,w).close(),t(this,H).close(),t(this,W).close(),t(this,tt).close(),t(this,et).close(),t(this,Z).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,oe)+t(this,is)}getStart(){return t(this,qt)-t(this,is)}}ie=new WeakMap,re=new WeakMap,ne=new WeakMap,he=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,Tt=new WeakMap,z=new WeakMap,ct=new WeakMap,ut=new WeakMap,Y=new WeakMap,Dt=new WeakMap,Ie=new WeakMap,at=new WeakMap,dt=new WeakMap,St=new WeakMap,w=new WeakMap,H=new WeakMap,W=new WeakMap,tt=new WeakMap,et=new WeakMap,Z=new WeakMap,ss=new WeakMap,m=new WeakMap,qt=new WeakMap,oe=new WeakMap,is=new WeakMap,x=new WeakMap,pt=new WeakMap,O=new WeakMap,A=new WeakMap,K=new WeakMap,Re=new WeakMap,Bt=new WeakMap,y=new WeakMap,le=new WeakMap,b=new WeakSet,ni=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Bt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},hi=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Bt,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},oi=function(){t(this,w).current=!0,t(this,W).current=!0,t(this,tt).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},li=function(){t(this,w).current=!0,t(this,et).current=!0,t(this,Z).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},ci=function(){t(this,H).current=!0,t(this,tt).current=!0,t(this,W).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},ui=function(){t(this,H).current=!0,t(this,Z).current=!0,t(this,et).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},rs=new WeakMap,Ae=new WeakMap,qs=function(){const e=t(this,x)[t(this,Ie).current];this.setVar(t(this,ct).current,e),r(this,pt,e/t(this,A)||0),this.setVar(t(this,ut).current,t(this,pt)),t(this,Y).current&&this.setVar(t(this,Y).current,this.progressArc)},pe=function(e){if(t(this,y)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},ai=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},di=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Bs=function(){o(this,b,ai).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,Tt).current,t(this,z).current),o(this,b,di).call(this,t(this,ct).current,t(this,ut).current,t(this,Y).current,t(this,at).current,t(this,dt).current,t(this,St).current)};_.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ri);class Si extends Hs{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}_.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",Si);var Ps;const Ws=class Ws extends ns{constructor(){super(...arguments);i(this,Ps,()=>{const e=this.scrollElement.counter.current+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(Ws.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,Ps))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,Ps))}};Ps=new WeakMap;let Vs=Ws;_.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Vs);var ce;const _s=class _s extends ns{constructor(){super(...arguments);i(this,ce,()=>{const e=this.scrollElement.limit+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(_s.prototype,this,"connectedCallback").call(this),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,ce)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,ce)),t(this,ce).call(this)})}disconnectedCallback(){this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,ce)),this.scrollElement.removeEventListener("scrollSectionsChange",t(this,ce))}};ce=new WeakMap;let ks=_s;_.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",ks);exports.ScrollBulletButtonsElement=ii;exports.ScrollCounterElement=Vs;exports.ScrollElement=zs;exports.ScrollScrollbarElement=ti;exports.ScrollSectionButtonElement=Si;exports.ScrollSegmentElement=ri;exports.ScrollSetButtonElement=ei;exports.ScrollStepButtonElement=si;exports.ScrollTotalElement=ks;
|
|
1
|
+
"use strict";var pi=Object.defineProperty;var Ns=Object.getOwnPropertySymbols,fi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,gi=Reflect.get;var Gs=S=>{throw TypeError(S)};var Us=(S,h,e)=>h in S?pi(S,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[h]=e,Zs=(S,h)=>{for(var e in h||(h={}))bi.call(h,e)&&Us(S,e,h[e]);if(Ns)for(var e of Ns(h))mi.call(h,e)&&Us(S,e,h[e]);return S};var Is=(S,h,e)=>h.has(S)||Gs("Cannot "+e);var t=(S,h,e)=>(Is(S,h,"read from private field"),e?e.call(S):h.get(S)),i=(S,h,e)=>h.has(S)?Gs("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(S):h.set(S,e),r=(S,h,e,s)=>(Is(S,h,"write to private field"),s?s.call(S,e):h.set(S,e),e),o=(S,h,e)=>(Is(S,h,"access private method"),e);var Rs=(S,h,e)=>gi(fi(S),e,h);var As=(S,h,e)=>new Promise((s,n)=>{var u=v=>{try{C(e.next(v))}catch(ae){n(ae)}},g=v=>{try{C(e.throw(v))}catch(ae){n(ae)}},C=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);C((e=e.apply(S,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Se=require("../Store-Cd1GlEmZ.cjs"),_=require("../index-DekP7OZe.cjs"),Ci=require("../easings-GegIwET5.cjs"),yi=require("../element-yhcBhsho.cjs"),st=require("../events-KVanG9sR.cjs"),Ls=require("../function-MthRj-GJ.cjs"),it=require("../layout-Ctc2p3uz.cjs"),$s=require("../math-GDWEqu7y.cjs"),js=require("../number-ChAm68cm.cjs"),Js=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Te=require("../order/index.cjs"),Qs=require("../Damped-z9Uaw2MJ.cjs"),vi=require("../Tweened-mvHucL4Y.cjs"),Es=require("../DragControls-K67-diF5.cjs"),ft=require("../window-resizer/index.cjs"),ue=require("../scroll-entries/index.cjs"),Ks=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),Pi=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const cs=require("../element-resizer/index.cjs"),Ei=require("../gestures-C7gbKx11.cjs"),wi=require("../dom-JBOkFLTh.cjs");var p,De,E,us,as,fe,bt,$t,be,Ht,Fe;class xi{constructor(h,e,s){i(this,Ht);i(this,p);i(this,De);i(this,E);i(this,us,0);i(this,as,0);i(this,fe,0);i(this,bt,0);i(this,$t,null);i(this,be,0);r(this,p,h),r(this,De,e),r(this,E,s),ue.scrollEntries.register(t(this,p)),this.setIndex(t(this,De))}get element(){return t(this,p)}get index(){return t(this,De)}get size(){return t(this,fe)}get width(){return t(this,us)}get height(){return t(this,as)}get position(){return t(this,bt)}get transformPosition(){return t(this,be)}destroy(){ue.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setOffsetIndex(null),this.setMiddle(!1),this.setSize()}setSize(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,us,t(this,p).offsetWidth),r(this,as,t(this,p).offsetHeight),r(this,fe,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,bt,t(this,E).vertical?it.getCumulativeOffsetTop(t(this,p)):it.getCumulativeOffsetLeft(t(this,p))),r(this,bt,t(this,bt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,bt)+t(this,fe)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),ue.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,bt)-t(this,E).viewportSize-s,g=t(this,bt)+t(this,fe)+s,C=js.preciseNumber($s.clamp(n,u,g),3);r(this,be,C*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,be)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,be)}px, 0px, 0px)`}setMark(h){t(this,$t)!==h&&(t(this,$t)&&t(this,p).classList.remove(t(this,$t)),h&&t(this,p).classList.add(h),r(this,$t,h),st.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,$t)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,Ht,Fe).call(this,"index",h)}setCurrentIndex(h){o(this,Ht,Fe).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,Ht,Fe).call(this,"current-index-arc",h)}setOffsetIndex(h){o(this,Ht,Fe).call(this,"offset-index",h)}setCurrentIndexArcAbs(h){o(this,Ht,Fe).call(this,"current-index-arc-abs",h)}}p=new WeakMap,De=new WeakMap,E=new WeakMap,us=new WeakMap,as=new WeakMap,fe=new WeakMap,bt=new WeakMap,$t=new WeakMap,be=new WeakMap,Ht=new WeakSet,Fe=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const Li=Js.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:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".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 d,me,T,Wt,mt,gt,Ct,j,_t,Nt,yt,Ut,ge,J,V,Ce,ye,ve,Pe,qe,Ee,Q,we,Gt,X,vt,Pt,xe,Zt,Le,ze,Kt,jt,Jt,f,Be,N,a,Ss,ds,L,P,U,rt,Qt,nt,M,k,$e,Et,wt,xt,G,He,Lt,Xt,zt,ht,I,We,Vt,Ve,_e,c,Ms,os,Oe,ws,xs,Fs,Os,F,ps,Xs,Ne,fs,Ts,Ds,de,Ys,bs,ls,Ue;class zs extends HTMLElement{constructor(){super();i(this,c);i(this,d,null);i(this,me,new l.CSSProperty(this,"--controls",!0));i(this,T,new l.CSSProperty(this,"--axis","y"));i(this,Wt,new l.CSSProperty(this,"--reverse",!1));i(this,mt,new l.CSSProperty(this,"--direction",0));i(this,gt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,Ct,new l.CSSProperty(this,"--split",!1));i(this,j,new l.CSSProperty(this,"--sectional",!1));i(this,_t,new l.CSSProperty(this,"--tween-easing",!1));i(this,Nt,new l.CSSProperty(this,"--tween-duration",!1));i(this,yt,new l.CSSProperty(this,"--auto-size",!1));i(this,Ut,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,ge,new l.CSSProperty(this,"--drag-inertion",1));i(this,J,new l.CSSProperty(this,"--sections-in-view",1));i(this,V,new l.CSSProperty(this,"--loop",!1));i(this,Ce,new l.CSSProperty(this,"--damping",20));i(this,ye,new l.CSSProperty(this,"--mass",0));i(this,ve,new l.CSSProperty(this,"--stiffness",0));i(this,Pe,new l.CSSProperty(this,"--mouse-drag",!1));i(this,qe,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,Ee,new l.CSSProperty(this,"--start-section",0));i(this,Q,new l.CSSProperty(this,"--autoplay",0));i(this,we,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,Gt,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,X,new l.CSSProperty(this,"--classes",!1));i(this,vt,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,Pt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,xe,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Zt,new l.CSSProperty(this,"--focus-delay",0));i(this,Le,new l.CSSProperty(this,"--focus-duration",3e3));i(this,ze,new l.CSSProperty(this,"--shift-limit",0));i(this,Kt,new l.CSSProperty(this,"--disabled",!1));i(this,jt,new l.CSSProperty(this,"--hibernate",!1));i(this,Jt,null);i(this,f,null);i(this,Be,null);i(this,N,[]);i(this,a,[]);i(this,Ss,0);i(this,ds,0);i(this,L,0);i(this,P,0);i(this,U,0);i(this,rt,null);i(this,Qt,null);i(this,nt,null);i(this,M,null);i(this,k,new Se.Store(0));i(this,$e,0);i(this,Et,0);i(this,wt,!1);i(this,xt,!0);i(this,G,!0);i(this,He);i(this,Lt);i(this,Xt,new vi.Tweened);i(this,zt,!1);i(this,ht,null);i(this,I,!1);i(this,We,null);i(this,Vt,[]);i(this,Ve,!1);i(this,_e);i(this,F,e=>{if(e&&t(this,Ve)){r(this,Ve,!1);return}this.resize()});i(this,ps,()=>{if(!t(this,wt)||t(this,G)||t(this,xt))return;const e=this.currentScrollValue;if(r(this,$e,Math.max(0,e-t(this,P))),t(this,a).length){for(let s=0;s<t(this,N).length;s++)t(this,N)[s].transform();(t(this,zt)||!t(this,j).current)&&(t(this,k).current=o(this,c,ls).call(this))}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,Ys).call(this),ue.scrollEntries.update(this,t(this,T).current,e)});i(this,Ne,(e,s)=>{t(this,me).current&&(o(this,c,Ts).call(this,Math.sign(s)||1),t(this,fs).call(this,e,s))});i(this,fs,(e,s)=>{if(!t(this,Lt)){if(t(this,mt).current){if(t(this,mt).current<0&&s>0)return;if(t(this,mt).current>0&&s<0)return}if(!t(this,Q).current&&t(this,Zt).current&&(clearInterval(t(this,He)),r(this,He,setTimeout(()=>{const n=t(this,a)[o(this,c,ls).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,Le).current,easing:Ci.easeInOutExpo}})},t(this,Zt).current))),!(e.includes("drag")&&!Pi.device.isTouch&&!t(this,Pe).current)){if(t(this,j).current&&e!=="drag"){const n=Math.sign(s);t(this,a).length?t(this,zt)?this.scrollToSection(o(this,c,ls).call(this,!0)):this.shiftSections(n,{tween:t(this,_t).current||t(this,Nt).current?{easing:t(this,_t).current||"easeInOutCubic",duration:t(this,Nt).current||500}:void 0}):t(this,d).shift(n*t(this,L))}else t(this,d).shift(s);r(this,zt,e==="drag")}}});i(this,bs,Ls.debounce(()=>{const e=t(this,Vt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,_e)),r(this,Ve,!0),this.style.setProperty("--max-section-size",""),r(this,_e,setTimeout(()=>{r(this,Ve,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,Ue,()=>{r(this,I,!0),this.hibernatedCSSProperty.current||o(this,c,Os).call(this),cs.elementResizer.subscribe(this,t(this,F)),ft.windowResizer.unsubscribe(t(this,Ue))});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Li];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Jt,document.createElement("div")),t(this,Jt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Be,document.createElement("slot")),t(this,f).appendChild(t(this,Be)),t(this,Jt).appendChild(t(this,f)),e.appendChild(t(this,Jt)),r(this,We,new MutationObserver(Ls.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,me)}get axisCSSProperty(){return t(this,T)}get reverseCSSProperty(){return t(this,Wt)}get directionCSSProperty(){return t(this,mt)}get pagesCSSProperty(){return t(this,gt)}get splitCSSProperty(){return t(this,Ct)}get sectionalCSSProperty(){return t(this,j)}get easingCSSProperty(){return t(this,_t)}get durationCSSProperty(){return t(this,Nt)}get autoSizeCSSProperty(){return t(this,yt)}get wheelMaxDeltaCSSProperty(){return t(this,Ut)}get dragInertionCSSProperty(){return t(this,ge)}get sectionsInViewCSSProperty(){return t(this,J)}get loopCSSProperty(){return t(this,V)}get dampingCSSProperty(){return t(this,Ce)}get massCSSProperty(){return t(this,ye)}get stiffnessCSSProperty(){return t(this,ve)}get mouseDragCSSProperty(){return t(this,Pe)}get sectionDistanceScaleCSSProperty(){return t(this,qe)}get startSectionCSSProperty(){return t(this,Ee)}get autoplayCSSProperty(){return t(this,Q)}get autoplayPauseDurationCSSProperty(){return t(this,we)}get autoplayUserDirectionCSSProperty(){return t(this,Gt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,vt)}get currentIndexEndOffsetCSSProperty(){return t(this,Pt)}get shiftSectionPositionCSSProperty(){return t(this,xe)}get focusDelayCSSProperty(){return t(this,Zt)}get focusDurationCSSProperty(){return t(this,Le)}get shiftLimitCSSProperty(){return t(this,ze)}get disabledCSSProperty(){return t(this,Kt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return o(this,c,Ds).call(this,"current")}get targetScrollValue(){return o(this,c,Ds).call(this,"target")}get contentWrapperElement(){return t(this,Jt)}get contentElement(){return t(this,f)}get sections(){return t(this,N)}get visibleSections(){return t(this,a)}get position(){return t(this,Ss)}get contentPosition(){return t(this,ds)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,U)}get counter(){return t(this,k)}get limit(){return Math.ceil(t(this,a).length-t(this,J).current+t(this,ze).current)}get distance(){return t(this,Et)}get loopDistance(){return t(this,V).current?t(this,Et)+t(this,U):t(this,Et)}get hasOverflow(){return t(this,wt)}get overscroll(){return t(this,$e)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,T).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,T).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,T).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,G)&&(t(this,V).current||t(this,Ct).current||t(this,V).current||t(this,yt).current||t(this,j).current)&&o(this,c,os).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,a).length||t(this,G)||t(this,Lt))return;const n=t(this,k).current,u=o(this,c,Xs).call(this,e);t(this,zt)||(t(this,k).current=u);const g=t(this,a)[n],C=t(this,a)[u];if(g&&C){let v=0;const ae=o(this,c,ls).call(this),Me=t(this,a)[ae];let hs=Me?this.targetScrollValue-Me.position:0;t(this,V).current?u===0&&n===t(this,a).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,U),t(this,zt)||(hs=0)):u===t(this,a).length-1&&n===0?v=C.position-(t(this,P)+t(this,L)+t(this,U)):v=C.position-g.position:v=C.position-g.position,this.shiftPosition(v-hs,s)}}shiftSections(e,s){t(this,a).length&&this.scrollToSection(t(this,k).current+e,s)}setPosition(e,s){t(this,G)||(o(this,c,Ts).call(this,Math.sign(e)||1),s!=null&&s.tween?(clearTimeout(t(this,Lt)),t(this,Xt).set(t(this,d).current,{equalize:!0}),t(this,Xt).set(e,Zs({},s.tween)),r(this,Lt,setTimeout(()=>{r(this,Lt,void 0)},s.tween.duration||0))):t(this,d).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,d).target+e,s)}resize(){if(t(this,jt).current)return;r(this,a,t(this,N).filter(n=>yi.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,a).length.toString()),t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,k).current;if(r(this,Ss,this.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this)),r(this,ds,this.vertical?it.getCumulativeOffsetTop(t(this,f)):it.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,U,Ks.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,yt).current&&t(this,a).length){const n=t(this,J).current,u=(t(this,L)-t(this,U)*(n-1))/n;t(this,a).forEach(g=>{g.setSize(u)})}else t(this,a).forEach(n=>{n.setSize()});if(t(this,a).forEach(n=>{n.resize()}),t(this,gt).current){r(this,P,t(this,L)*t(this,gt).current);const n=t(this,P)+t(this,L);this.vertical?(t(this,f).style.width=n+"px",t(this,f).style.height="100%"):(t(this,f).style.height=n+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,V).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,d).max=t(this,P)}if(t(this,V).current&&t(this,a).length){const n=t(this,a)[t(this,a).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Et,n.position+n.size+g)}else r(this,Et,t(this,P));if(t(this,j).current&&t(this,a).length){const n=t(this,a)[s];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,P),{equalize:!0});r(this,wt,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,wt)),t(this,wt)?t(this,Kt).current||o(this,c,xs).call(this):o(this,c,ws).call(this),t(this,bs).call(this),st.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,d).notify()}connectedCallback(){ue.scrollEntries.register(this),r(this,d,new Qs.Damped(0,{damping:.01,min:0,order:Te.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new Es.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,Ne)),r(this,Qt,new Es.KeyboardControls({element:this})),t(this,Qt).changeEvent.subscribe(t(this,Ne)),r(this,nt,new Es.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,Ne)),r(this,M,new Es.AutoplayControls({culling:this})),t(this,M).changeEvent.subscribe(t(this,fs)),t(this,T).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Wt).subscribe(()=>{o(this,c,Ms).call(this)}),t(this,Ut).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,T).current}),t(this,ge).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,gt).subscribe(()=>{t(this,I)&&t(this,F).call(this)}),t(this,Ct).subscribe(({current:e})=>{t(this,I)&&(e?o(this,c,os).call(this):o(this,c,Oe).call(this))}),t(this,j).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,M).interval=e.current,t(this,I)&&(e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,yt).subscribe(e=>{t(this,I)&&(t(this,F).call(this),e.current&&!e.previous&&!t(this,a).length?o(this,c,os).call(this):!e.current&&e.previous&&t(this,a).length&&o(this,c,Oe).call(this))}),t(this,J).subscribe(e=>{t(this,I)&&(t(this,F).call(this),o(this,c,de).call(this))}),t(this,V).subscribe(e=>{e.current?(t(this,I)&&(t(this,a).length||(t(this,Ct).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(r(this,$e,0),t(this,d).max=t(this,P),t(this,d).min=0),this.classList.toggle("loop",!!e.current)}),t(this,Ce).subscribe(e=>{t(this,d).damping=e.current}),t(this,ye).subscribe(e=>{t(this,d).mass=e.current}),t(this,ve).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Q).subscribe(e=>{t(this,M).speed=e.current,!t(this,xt)&&e.current&&!e.previous?t(this,M).connect():!e.current&&e.previous&&t(this,M).disconnect()}),t(this,Gt).subscribe(e=>{e.current||(t(this,M).direction=1)}),t(this,X).subscribe(e=>{t(this,I)&&o(this,c,de).call(this)}),t(this,vt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,de).call(this)}),t(this,Pt).subscribe(e=>{t(this,I)&&t(this,X).current&&o(this,c,de).call(this)}),t(this,xe).subscribe(e=>{t(this,I)&&t(this,d).notify()}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,k).subscribe(e=>{t(this,G)||(t(this,a).length&&o(this,c,de).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,Xt).subscribe(e=>{t(this,Xt).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,Kt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,ws).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,xs).call(this))}),t(this,jt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,Fs).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Os).call(this))}),t(this,me).observe(),t(this,T).observe(),t(this,Wt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,Ct).observe(),t(this,j).observe(),t(this,_t).observe(),t(this,Nt).observe(),t(this,yt).observe(),t(this,Ut).observe(),t(this,ge).observe(),t(this,J).observe(),t(this,V).observe(),t(this,Ce).observe(),t(this,ye).observe(),t(this,ve).observe(),t(this,Pe).observe(),t(this,qe).observe(),t(this,Ee).observe(),t(this,Q).observe(),t(this,Q).observe(),t(this,we).observe(),t(this,Gt).observe(),t(this,X).observe(),t(this,vt).observe(),t(this,Pt).observe(),t(this,xe).observe(),t(this,Zt).observe(),t(this,Le).observe(),t(this,ze).observe(),t(this,Kt).observe(),t(this,jt).observe(),ft.windowResizer.subscribe(t(this,Ue),Te.RESIZE_ORDER.LAST),t(this,We).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,me).unobserve(),t(this,T).unobserve(),t(this,Wt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,Ct).unobserve(),t(this,j).unobserve(),t(this,_t).unobserve(),t(this,Nt).unobserve(),t(this,yt).unobserve(),t(this,Ut).unobserve(),t(this,ge).unobserve(),t(this,J).unobserve(),t(this,V).unobserve(),t(this,Ce).unobserve(),t(this,ye).unobserve(),t(this,ve).unobserve(),t(this,Pe).unobserve(),t(this,qe).unobserve(),t(this,Ee).unobserve(),t(this,Q).unobserve(),t(this,we).unobserve(),t(this,Gt).unobserve(),t(this,X).unobserve(),t(this,vt).unobserve(),t(this,Pt).unobserve(),t(this,xe).unobserve(),t(this,Zt).unobserve(),t(this,Le).unobserve(),t(this,ze).unobserve(),t(this,Kt).unobserve(),t(this,jt).unobserve(),ft.windowResizer.unsubscribe(t(this,Ue)),ft.windowResizer.unsubscribe(t(this,F)),cs.elementResizer.unsubscribe(t(this,F)),o(this,c,Fs).call(this),t(this,We).disconnect()}}d=new WeakMap,me=new WeakMap,T=new WeakMap,Wt=new WeakMap,mt=new WeakMap,gt=new WeakMap,Ct=new WeakMap,j=new WeakMap,_t=new WeakMap,Nt=new WeakMap,yt=new WeakMap,Ut=new WeakMap,ge=new WeakMap,J=new WeakMap,V=new WeakMap,Ce=new WeakMap,ye=new WeakMap,ve=new WeakMap,Pe=new WeakMap,qe=new WeakMap,Ee=new WeakMap,Q=new WeakMap,we=new WeakMap,Gt=new WeakMap,X=new WeakMap,vt=new WeakMap,Pt=new WeakMap,xe=new WeakMap,Zt=new WeakMap,Le=new WeakMap,ze=new WeakMap,Kt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,f=new WeakMap,Be=new WeakMap,N=new WeakMap,a=new WeakMap,Ss=new WeakMap,ds=new WeakMap,L=new WeakMap,P=new WeakMap,U=new WeakMap,rt=new WeakMap,Qt=new WeakMap,nt=new WeakMap,M=new WeakMap,k=new WeakMap,$e=new WeakMap,Et=new WeakMap,wt=new WeakMap,xt=new WeakMap,G=new WeakMap,He=new WeakMap,Lt=new WeakMap,Xt=new WeakMap,zt=new WeakMap,ht=new WeakMap,I=new WeakMap,We=new WeakMap,Vt=new WeakMap,Ve=new WeakMap,_e=new WeakMap,c=new WeakSet,Ms=function(){const e=t(this,T).current,s=t(this,Wt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,Ut).current?"max":e,t(this,Qt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,I)&&t(this,F).call(this)},os=function(){o(this,c,Oe).call(this),t(this,Be).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,N).push(new xi(e,s,this))}),r(this,a,[...t(this,N)]),t(this,f).style.transform="",st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,F).call(this),o(this,c,de).call(this)},Oe=function(){t(this,N).forEach(e=>{e.destroy()}),r(this,N,[]),r(this,a,[]),t(this,k).reset(),t(this,d).reset(),this.style.removeProperty("--max-section-size"),st.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ws=function(){t(this,xt)||(r(this,xt,!0),t(this,d).unsubscribe(t(this,ps)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,He)),clearInterval(t(this,Lt)),t(this,Xt).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Qt).disconnect(),t(this,nt).disconnect(),t(this,M).disconnect(),t(this,wt)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,F).call(this)))},xs=function(){t(this,xt)&&(r(this,xt,!1),t(this,d).subscribe(t(this,ps),-1e4),t(this,d).notify(),t(this,rt).connect(),t(this,Qt).connect(),t(this,nt).connect(),t(this,Q).current&&t(this,M).connect())},Fs=function(){t(this,G)||(r(this,G,!0),clearTimeout(t(this,_e)),ft.windowResizer.unsubscribe(t(this,F)),o(this,c,ws).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,N).length?o(this,c,Oe).call(this):(t(this,k).reset(),t(this,d).reset()),ue.scrollEntries.unregister(this))},Os=function(){t(this,G)&&(r(this,G,!1),ue.scrollEntries.register(this),this.tryResplit(),o(this,c,xs).call(this),this.scrollToSection(t(this,Ee).current,{behaviour:"instant"}),ft.windowResizer.subscribe(t(this,F),Te.RESIZE_ORDER.SCROLL))},F=new WeakMap,ps=new WeakMap,Xs=function(e){let s=t(this,k).current;return t(this,V).current?s=js.loopNumber(e,t(this,a).length):s=$s.clamp(e,0,this.limit),s},Ne=new WeakMap,fs=new WeakMap,Ts=function(e=1){t(this,Gt).current&&(t(this,M).direction=e),t(this,Q).current&&t(this,M).pauseAndContinue(t(this,we).current,this.sectionalCSSProperty.current)},Ds=function(e="current"){if(t(this,V).current&&t(this,a).length){const s=Math.floor(t(this,d)[e])%Math.floor(t(this,P)+t(this,L)+t(this,U));return s<0?t(this,P)+s+t(this,L)+t(this,U):s}else return t(this,d)[e]},de=function(){if(t(this,a).length){const e=t(this,k).current+t(this,vt).current;if(e===t(this,vt).current?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),st.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,X).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,J).current+t(this,Pt).current;r(this,Vt,[]),t(this,a).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,Pt).current,C=e+s,v=this.sections.length-C;u>=e&&u<C||u<=g?(n.setMark("current"),t(this,Vt).push(n)):u>=C&&u<C+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,bs).call(this)}}},Ys=function(){if(t(this,X).current){const e=Math.floor(t(this,Vt).length/2);t(this,Vt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,Vt).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)}),t(this,a).forEach((s,n)=>{s.setOffsetIndex(n-(t(this,k).current+t(this,J).current))})}},bs=new WeakMap,ls=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,d).direction;for(let C=0;C<t(this,a).length;C++){const v=t(this,a)[C];let ae=t(this,zt)?v.size*g*-1*.4:0,Me=v.position;this.overscroll&&Me===0&&e&&(Me=t(this,Et));let hs=Math.abs(Me+ae-s);hs<=n&&(n=hs,u=C)}return u},Ue=new WeakMap;_.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",zs);var ms;class ns extends HTMLElement{constructor(){super(...arguments);i(this,ms,null)}get scrollElement(){return t(this,ms)}connectedCallback(){const e=wi.findParentElement(this,zs);e instanceof zs?r(this,ms,e):console.error(this,"e-scroll not found")}}ms=new WeakMap;var Yt,D,kt,It,Ge,Ze,te,Ke,gs,Cs;class ti extends ns{constructor(){super();i(this,Yt,null);i(this,D,null);i(this,kt,!1);i(this,It,0);i(this,Ge,0);i(this,Ze,0);i(this,te,()=>{r(this,kt,this.offsetWidth>this.offsetHeight);const e=t(this,kt)?this.offsetWidth:this.offsetHeight;r(this,It,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,It,Math.max(t(this,It),30)),t(this,kt)?(t(this,D).style.width=t(this,It)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,It)+"px"),r(this,Ge,e-t(this,It)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ke).call(this)});i(this,Ke,()=>{r(this,Ze,this.scrollElement.currentProgress*t(this,Ge)),t(this,kt)?t(this,D).style.transform=`translate3d(${t(this,Ze)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,Ze)}px, 0px)`});i(this,gs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,Cs,e=>{Ei.setupDrag(u=>{const g=t(this,kt)?u.x:u.y,C=this.scrollElement.distance/t(this,Ge),v=(g-n)*C;this.scrollElement.setPosition(s+v)});const s=this.scrollElement.damped.target,n=t(this,kt)?e.x:e.y});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Js.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"}})],r(this,Yt,document.createElement("slot")),t(this,Yt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Yt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Yt).assignedElements()[0]||t(this,Yt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,Cs)),ft.windowResizer.subscribe(t(this,te),Te.RESIZE_ORDER.SCROLL),cs.elementResizer.subscribe(this,t(this,te)),cs.elementResizer.subscribe(this.scrollElement,t(this,te)),this.scrollElement.onScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.subscribe(t(this,gs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,Cs)),ft.windowResizer.unsubscribe(t(this,te)),cs.elementResizer.unsubscribe(t(this,te)),this.scrollElement.offScroll(t(this,Ke)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,gs))}}Yt=new WeakMap,D=new WeakMap,kt=new WeakMap,It=new WeakMap,Ge=new WeakMap,Ze=new WeakMap,te=new WeakMap,Ke=new WeakMap,gs=new WeakMap,Cs=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-scrollbar")&&customElements.define("e-scroll-scrollbar",ti);var je,Je,Qe;class Hs extends ns{constructor(){super();i(this,je,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Je,new l.CSSProperty(this,"--tween-easing",!1));i(this,Qe,new l.CSSProperty(this,"--tween-duration",0));_.isBrowser&&this.addEventListener("click",()=>{const e=t(this,je).current,s=t(this,Je).current,n=t(this,Qe).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,je).observe(),t(this,Je).observe(),t(this,Qe).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,je).close(),t(this,Je).close(),t(this,Qe).close()}}je=new WeakMap,Je=new WeakMap,Qe=new WeakMap;var Xe;class ei extends Hs{constructor(){super(...arguments);i(this,Xe,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xe).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xe).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xe).close()}}Xe=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ei);var Rt,Ye;class si extends Hs{constructor(){super(...arguments);i(this,Rt,new l.CSSProperty(this,"--step",1));i(this,Ye,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Rt).current>0&&this.scrollElement.scrollLine==="end"||t(this,Rt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Rt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Rt).subscribe(()=>{t(this,Ye).call(this)}),t(this,Rt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ye)),t(this,Ye).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Rt).close(),this.removeAttribute("disabled")}}Rt=new WeakMap,Ye=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",si);var ot,ee,ts,ys,vs,es;class zi{constructor(h,e,s){i(this,ot,null);i(this,ee,null);i(this,ts,null);i(this,ys,null);i(this,vs,()=>{t(this,ee).scrollToSection(t(this,ts),{behaviour:t(this,ys)})});i(this,es,()=>{t(this,ot).classList.toggle("current",t(this,ee).counter.current===t(this,ts))});_.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,ee,h),r(this,ys,s),r(this,ts,e),t(this,ot).addEventListener("click",t(this,vs)),t(this,ee).counter.subscribe(t(this,es)),t(this,es).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,vs)),t(this,ee).counter.unsubscribe(t(this,es)),t(this,ot).remove()}}ot=new WeakMap,ee=new WeakMap,ts=new WeakMap,ys=new WeakMap,vs=new WeakMap,es=new WeakMap;var ke,se,lt;class ii extends ns{constructor(){super(...arguments);i(this,ke,null);i(this,se,[]);i(this,lt,Ls.debounce(()=>{t(this,se).forEach(s=>s.destroy()),r(this,se,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new zi(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ke).appendChild(n.element),t(this,se).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",r(this,ke,document.createElement("div")),this.appendChild(t(this,ke)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,lt)),this.scrollElement.loopCSSProperty.subscribe(t(this,lt)),t(this,lt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,lt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,lt)),t(this,se).forEach(e=>e.destroy()),r(this,se,[]),t(this,ke).remove()}}ke=new WeakMap,se=new WeakMap,lt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",ii);var ie,re,ne,he,At,Mt,Ft,Ot,R,q,B,$,Tt,z,ct,ut,Y,Dt,Ie,at,St,dt,w,H,W,tt,et,Z,ss,m,qt,oe,is,x,pt,O,A,K,Re,Bt,y,le,b,ni,hi,oi,li,ci,ui,rs,Ae,qs,pe,ai,Si,Bs;class ri extends ns{constructor(){super(...arguments);i(this,b);i(this,ie);i(this,re);i(this,ne);i(this,he);i(this,At);i(this,Mt);i(this,Ft);i(this,Ot);i(this,R);i(this,q);i(this,B);i(this,$);i(this,Tt);i(this,z);i(this,ct);i(this,ut);i(this,Y);i(this,Dt);i(this,Ie);i(this,at);i(this,St);i(this,dt);i(this,w);i(this,H);i(this,W);i(this,tt);i(this,et);i(this,Z);i(this,ss);i(this,m);i(this,qt);i(this,oe);i(this,is);i(this,x);i(this,pt);i(this,O);i(this,A);i(this,K);i(this,Re);i(this,Bt);i(this,y);i(this,le);i(this,rs);i(this,Ae);r(this,ie,new l.CSSProperty(this,"--damping",20)),r(this,re,new l.CSSProperty(this,"--mass",0)),r(this,ne,new l.CSSProperty(this,"--stiffness",0)),r(this,he,new l.CSSProperty(this,"--target","")),r(this,At,new l.CSSProperty(this,"--disabled",!1)),r(this,Mt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,Ft,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,Ot,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,Tt,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,ct,new l.CSSProperty(this,"--passed-var","")),r(this,ut,new l.CSSProperty(this,"--progress-var","")),r(this,Y,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Dt,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,Ie,new l.CSSProperty(this,"--animation-var-type","target")),r(this,at,new l.CSSProperty(this,"--distance-var","")),r(this,St,new l.CSSProperty(this,"--start-var","")),r(this,dt,new l.CSSProperty(this,"--finish-var","")),r(this,w,new Se.Store(!1)),r(this,H,new Se.Store(!1)),r(this,W,new Se.Store(!1)),r(this,tt,new Se.Store(!1)),r(this,et,new Se.Store(!1)),r(this,Z,new Se.Store(!1)),r(this,ss,[]),r(this,m,this),r(this,qt,0),r(this,oe,0),r(this,is,0),r(this,x,new Qs.Damped(0,{order:Te.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),r(this,Bt,!1),r(this,y,!0),r(this,le,!1),this.resize=()=>{r(this,oe,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,qt,this.scrollElement.vertical?it.getCumulativeOffsetTop(this,this.scrollElement):it.getCumulativeOffsetLeft(this,this.scrollElement));const e=it.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,qt,t(this,qt)-e),r(this,O,this.getStart()),r(this,A,this.getDistance()),r(this,O,t(this,O)+t(this,Ft).current),r(this,A,t(this,A)+t(this,Mt).current),r(this,K,t(this,O)+t(this,A)),this.scrollElement.currentScrollValue>t(this,K)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,St).current,t(this,O)),this.setVar(t(this,dt).current,t(this,K)),this.setVar(t(this,at).current,t(this,A)),t(this,x).max=t(this,A),r(this,Re,!0),t(this,Ae).call(this)},this.findAnotherScrollEntries=Ls.debounce(()=>{const e=ue.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,ss,e.slice(s+1)),this.tick()},0),r(this,rs,()=>{t(this,y)||this.resize()}),r(this,Ae,()=>{!t(this,y)&&t(this,Re)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,Mt)}get startOffsetCSSProperty(){return t(this,Ft)}get captureOnceCSSProperty(){return t(this,Ot)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,Tt)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,ct)}get progressVarCSSProperty(){return t(this,ut)}get progressArcVarCSSProperty(){return t(this,Y)}get progressArcMultCSSProperty(){return t(this,Dt)}get animationVarTypeCSSProperty(){return t(this,Ie)}get distanceVarCSSProperty(){return t(this,at)}get startVarCSSProperty(){return t(this,St)}get finishVarCSSProperty(){return t(this,dt)}get disabledCSSProperty(){return t(this,At)}get dampingCSSProperty(){return t(this,ie)}get massCSSProperty(){return t(this,re)}get stiffnessCSSProperty(){return t(this,ne)}get targetCSSProperty(){return t(this,he)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,W)}get isReleasedFromStart(){return t(this,tt)}get isCapturedFromFinish(){return t(this,et)}get isReleasedFromFinish(){return t(this,Z)}get directionPosition(){return t(this,qt)}get directionSize(){return t(this,oe)}get passed(){return t(this,x)}get progress(){return t(this,pt)}get progressArc(){return Math.abs(Math.cos(t(this,pt)*Math.PI))*t(this,Dt).current}get start(){return t(this,O)}get finish(){return t(this,K)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Bt)}get isDisabled(){return t(this,y)}tick(){let e=this.scrollElement.currentScrollValue;t(this,ss).forEach(u=>{e+=u.value});const s=e-t(this,O);t(this,le)||r(this,le,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,O)?t(this,W).current||o(this,b,oi).call(this):t(this,W).current&&!t(this,tt).current&&o(this,b,ci).call(this),n<t(this,K)?t(this,Z).current&&!t(this,et).current&&o(this,b,li).call(this):t(this,W).current&&!t(this,Z).current&&o(this,b,ui).call(this)),n>=t(this,O)&&n<t(this,K)?t(this,w).current||o(this,b,ni).call(this):t(this,w).current&&(t(this,x).set($s.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,hi).call(this)),t(this,Bt)&&t(this,Ot).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,y,!0))}disable(){this.style.cssText="",r(this,qt,0),r(this,oe,0),t(this,x).reset(),r(this,pt,0),r(this,O,0),r(this,A,0),r(this,K,0),r(this,Re,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,W).current=!1,t(this,tt).current=!1,t(this,et).current=!1,t(this,Z).current=!1,r(this,Bt,!1),r(this,y,!0),o(this,b,Bs).call(this)}enable(){r(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,W).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,et).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,tt).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,Z).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,ie).observe(),t(this,re).observe(),t(this,ne).observe(),t(this,he).observe(),t(this,At).observe(),t(this,Mt).observe(),t(this,Ft).observe(),t(this,Ot).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,Tt).observe(),t(this,z).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,Y).observe(),t(this,Dt).observe(),t(this,Ie).observe(),t(this,at).observe(),t(this,St).observe(),t(this,dt).observe();let e=!1;this.findAnotherScrollEntries(),t(this,At).current||this.enable(),t(this,ie).subscribe(s=>{t(this,x).damping=s.current}),t(this,re).subscribe(s=>{t(this,x).mass=s.current}),t(this,ne).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,he).subscribe(s=>{s.previous&&o(this,b,Bs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,At).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,Ft).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,Mt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Tt).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,pe).call(this,s)}),t(this,Ot).subscribe(s=>{t(this,y)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,ct).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ut).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,pt)))}),t(this,Y).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Dt).subscribe(s=>{t(this,y)||o(this,b,qs).call(this)}),t(this,St).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,O)))}),t(this,dt).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,K)))}),t(this,at).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,le)){r(this,le,!1);return}o(this,b,qs).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),ft.windowResizer.subscribe(t(this,rs),Te.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Ae)),e=!0}disconnectedCallback(){ft.windowResizer.unsubscribe(t(this,rs)),this.scrollElement.offScroll(t(this,Ae)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,ie).close(),t(this,re).close(),t(this,ne).close(),t(this,he).close(),t(this,At).close(),t(this,Mt).close(),t(this,Ft).close(),t(this,Ot).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,Tt).close(),t(this,z).close(),t(this,ct).close(),t(this,ut).close(),t(this,Y).close(),t(this,Dt).close(),t(this,at).close(),t(this,St).close(),t(this,dt).close(),t(this,w).close(),t(this,H).close(),t(this,W).close(),t(this,tt).close(),t(this,et).close(),t(this,Z).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,oe)+t(this,is)}getStart(){return t(this,qt)-t(this,is)}}ie=new WeakMap,re=new WeakMap,ne=new WeakMap,he=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,Tt=new WeakMap,z=new WeakMap,ct=new WeakMap,ut=new WeakMap,Y=new WeakMap,Dt=new WeakMap,Ie=new WeakMap,at=new WeakMap,St=new WeakMap,dt=new WeakMap,w=new WeakMap,H=new WeakMap,W=new WeakMap,tt=new WeakMap,et=new WeakMap,Z=new WeakMap,ss=new WeakMap,m=new WeakMap,qt=new WeakMap,oe=new WeakMap,is=new WeakMap,x=new WeakMap,pt=new WeakMap,O=new WeakMap,A=new WeakMap,K=new WeakMap,Re=new WeakMap,Bt=new WeakMap,y=new WeakMap,le=new WeakMap,b=new WeakSet,ni=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Bt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},hi=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Bt,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},oi=function(){t(this,w).current=!0,t(this,W).current=!0,t(this,tt).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},li=function(){t(this,w).current=!0,t(this,et).current=!0,t(this,Z).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},ci=function(){t(this,H).current=!0,t(this,tt).current=!0,t(this,W).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},ui=function(){t(this,H).current=!0,t(this,Z).current=!0,t(this,et).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},rs=new WeakMap,Ae=new WeakMap,qs=function(){const e=t(this,x)[t(this,Ie).current];this.setVar(t(this,ct).current,e),r(this,pt,e/t(this,A)||0),this.setVar(t(this,ut).current,t(this,pt)),t(this,Y).current&&this.setVar(t(this,Y).current,this.progressArc)},pe=function(e){if(t(this,y)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},ai=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},Si=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Bs=function(){o(this,b,ai).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,Tt).current,t(this,z).current),o(this,b,Si).call(this,t(this,ct).current,t(this,ut).current,t(this,Y).current,t(this,at).current,t(this,St).current,t(this,dt).current)};_.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ri);class di extends Hs{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?it.getCumulativeOffsetTop(this):it.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}_.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",di);var Ps;const Ws=class Ws extends ns{constructor(){super(...arguments);i(this,Ps,()=>{const e=this.scrollElement.counter.current+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(Ws.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,Ps))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,Ps))}};Ps=new WeakMap;let Vs=Ws;_.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Vs);var ce;const _s=class _s extends ns{constructor(){super(...arguments);i(this,ce,()=>{const e=this.scrollElement.limit+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(_s.prototype,this,"connectedCallback").call(this),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,ce)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,ce)),t(this,ce).call(this)})}disconnectedCallback(){this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,ce)),this.scrollElement.removeEventListener("scrollSectionsChange",t(this,ce))}};ce=new WeakMap;let ks=_s;_.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",ks);exports.ScrollBulletButtonsElement=ii;exports.ScrollCounterElement=Vs;exports.ScrollElement=zs;exports.ScrollScrollbarElement=ti;exports.ScrollSectionButtonElement=di;exports.ScrollSegmentElement=ri;exports.ScrollSetButtonElement=ei;exports.ScrollStepButtonElement=si;exports.ScrollTotalElement=ks;
|
package/lib/scroll/index.js
CHANGED
|
@@ -44,7 +44,7 @@ import "../ticker/index.js";
|
|
|
44
44
|
import { TICK_ORDER as Qs, RESIZE_ORDER as Ls } from "../order/index.js";
|
|
45
45
|
import { D as Xs } from "../Damped-CtQmJ52v.js";
|
|
46
46
|
import { T as vi } from "../Tweened-BlZB0vl4.js";
|
|
47
|
-
import { W as yi, K as Ci, D as Pi, A as Ei } from "../DragControls-
|
|
47
|
+
import { W as yi, K as Ci, D as Pi, A as Ei } from "../DragControls-DyIrD3GV.js";
|
|
48
48
|
import { windowResizer as pt } from "../window-resizer/index.js";
|
|
49
49
|
import { scrollEntries as ce } from "../scroll-entries/index.js";
|
|
50
50
|
import { cssUnitParser as Zs } from "../css-unit-parser/index.js";
|
|
@@ -835,15 +835,10 @@ class zi extends is {
|
|
|
835
835
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
836
836
|
});
|
|
837
837
|
i(this, vs, (e) => {
|
|
838
|
-
|
|
839
|
-
(u)
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
},
|
|
843
|
-
() => {
|
|
844
|
-
document.documentElement.classList.remove("grabbing");
|
|
845
|
-
}
|
|
846
|
-
);
|
|
838
|
+
xi((u) => {
|
|
839
|
+
const g = t(this, Vt) ? u.x : u.y, v = this.scrollElement.distance / t(this, Ge), C = (g - h) * v;
|
|
840
|
+
this.scrollElement.setPosition(s + C);
|
|
841
|
+
});
|
|
847
842
|
const s = this.scrollElement.damped.target, h = t(this, Vt) ? e.x : e.y;
|
|
848
843
|
});
|
|
849
844
|
if (q) {
|
package/lib/scroll-kit/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var gt=n=>{throw TypeError(n)};var lt=(n,c,e)=>c.has(n)||gt("Cannot "+e);var t=(n,c,e)=>(lt(n,c,"read from private field"),e?e.call(n):c.get(n)),s=(n,c,e)=>c.has(n)?gt("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(n):c.set(n,e),r=(n,c,e,i)=>(lt(n,c,"write to private field"),i?i.call(n,e):c.set(n,e),e),d=(n,c,e)=>(lt(n,c,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const dt=require("../index-DekP7OZe.cjs"),Ht=require("../dom-JBOkFLTh.cjs"),qt=require("../gestures-C7gbKx11.cjs");require("construct-style-sheets-polyfill");const K=require("../ticker/index.cjs"),ct=require("../scroll-entries/index.cjs");require("../Store-Cd1GlEmZ.cjs");const Mt=require("../Damped-z9Uaw2MJ.cjs"),f=require("../css-property/index.cjs"),Vt=require("../element-linked-store/index.cjs"),pt=require("../element-resizer/index.cjs"),at=require("../events-KVanG9sR.cjs"),St=require("../layout-Ctc2p3uz.cjs"),Tt=require("../math-GDWEqu7y.cjs"),yt=require("../window-resizer/index.cjs");var o,b,O,x,a,D,y,ut,vt,wt,J,ht,N,k,Q;class Et extends HTMLElement{constructor(){super(...arguments);s(this,y);s(this,o,null);s(this,b,null);s(this,O,0);s(this,x,0);s(this,a,!1);s(this,D);s(this,J,()=>{this.classList.add("active"),clearTimeout(t(this,D));const i=t(this,y,ut)/t(this,x)*t(this,O);t(this,a)?t(this,b).style.transform=`translate3d(${i}px, 0px, 0px)`:t(this,b).style.transform=`translate3d(0px, ${i}px, 0px)`,r(this,D,setTimeout(()=>{this.classList.remove("active")},1e3))});s(this,ht,()=>{const e=t(this,a)?this.offsetWidth:this.offsetHeight,i=t(this,y,vt),g=t(this,y,wt);r(this,x,i-g);let E=e*e/(t(this,x)+e);E=Math.max(E,30),t(this,a)?(t(this,b).style.width=E+"px",t(this,b).style.height="100%"):(t(this,b).style.width="100%",t(this,b).style.height=E+"px"),r(this,O,e-E),i<=g?this.style.display="none":this.style.display="block"});s(this,N,e=>{document.documentElement.classList.add("grabbing");const i=t(this,y,ut),g=t(this,a)?e.x:e.y;qt.setupDrag(E=>{const zt=t(this,x)/t(this,O),bt=(t(this,a)?E.x-g:E.y-g)*zt;t(this,a)?t(this,o).scroll({left:i+bt,behavior:"instant"}):t(this,o).scroll({top:i+bt,behavior:"instant"})},()=>{document.documentElement.classList.remove("grabbing")})});s(this,k,()=>{t(this,ht).call(this)});s(this,Q,e=>{e.isIntersecting?(K.ticker.subscribe(t(this,k),{maxFPS:5}),t(this,k).call(this)):K.ticker.unsubscribe(t(this,k))})}connectedCallback(){const e=this.getAttribute("data-scroll");let i=null;e&&(e==="parent"?i=this.parentElement:i=document.querySelector(e)),i||(i=Ht.findScrollParentElement(this),i===document.body&&(i=window)),r(this,a,this.hasAttribute("horisontal"));const g=this.querySelector("[data-thumb]");i&&g&&(r(this,o,i),r(this,b,g),t(this,o).addEventListener("scroll",t(this,J)),t(this,b).addEventListener("pointerdown",t(this,N)),dt.intersector.subscribe(this.parentElement===document.body?this:this.parentElement,t(this,Q)))}disconnectedCallback(){t(this,o).removeEventListener("scroll",t(this,J)),t(this,b).removeEventListener("pointerdown",t(this,N)),clearTimeout(t(this,D)),dt.intersector.unsubscribe(t(this,Q)),K.ticker.unsubscribe(t(this,k))}}o=new WeakMap,b=new WeakMap,O=new WeakMap,x=new WeakMap,a=new WeakMap,D=new WeakMap,y=new WeakSet,ut=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollLeft:t(this,o).scrollTop:t(this,a)?t(this,o).scrollX:t(this,o).scrollY},vt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollWidth:t(this,o).scrollHeight:t(this,a)?Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth):Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},wt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).offsetWidth:t(this,o).offsetHeight:t(this,a)?innerWidth:innerHeight},J=new WeakMap,ht=new WeakMap,N=new WeakMap,k=new WeakMap,Q=new WeakMap;dt.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Et);const At=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End","Space"]);var _,Y,h,Z,F,z,B,tt,et,st,it,rt;class Lt extends HTMLElement{constructor(){super(...arguments);s(this,z);s(this,_,new f.CSSProperty(this,"--smooth-scroll-disabled",!1));s(this,Y,new f.CSSProperty(this,"--smooth-scroll-damping",10));s(this,h,new Mt.Damped(0));s(this,Z,0);s(this,F,!1);s(this,tt,e=>{if(!d(this,z,B).call(this)){if(Math.sign(e.deltaY)<0&&t(this,h).target===0&&t(this,h).direction<0||Math.sign(e.deltaY)>0&&t(this,h).target===t(this,h).max&&t(this,h).direction>0||e.stopPropagation(),e.target instanceof Element){const i=e.target.closest("[data-prevent-smooth-scroll]");if(i){const g=i.getAttribute("data-prevent-smooth-scroll");if(g){if(matchMedia(g).matches)return}else return}}Math.abs(e.deltaX)>Math.abs(e.deltaY)||(e.preventDefault(),this.shiftPosition(e.deltaY))}});s(this,et,()=>{d(this,z,B).call(this)||this.stop()});s(this,st,e=>{d(this,z,B).call(this)||e.target instanceof Element&&e.target.closest("a")&&this.stop()});s(this,it,()=>{this.resize()});s(this,rt,e=>{d(this,z,B).call(this)||At.has(e.code)&&this.stop()})}resize(){t(this,h).min=0,t(this,h).max=this.scrollHeight-this.offsetHeight}stop(){t(this,h).unlistenAnimationFrame(),r(this,F,!0)}sync(){const e=this.scrollTop;(t(this,F)||Math.abs(e-t(this,h).current)>100)&&(r(this,F,!1),t(this,h).set(e,{equalize:!0}))}shiftPosition(e){this.resize(),this.sync(),t(this,h).shift(e)}setPosition(e,i){this.resize(),this.sync(),t(this,h).set(e,i)}connectedCallback(){window.addEventListener("resize",t(this,it)),this.addEventListener("keydown",t(this,rt)),this.addEventListener("pointerdown",t(this,st)),this.addEventListener("touchstart",t(this,et)),this.addEventListener("wheel",t(this,tt),{passive:!1}),t(this,h).subscribe(e=>{const i=Math.round(e.current);ct.scrollEntries.update(this,"y",e.current),i!==t(this,Z)&&this.scroll({top:i,behavior:"instant"}),r(this,Z,i)}),t(this,Y).observe(),t(this,_).observe(),t(this,Y).subscribe(e=>{t(this,h).damping=e.current}),ct.scrollEntries.register(this),this.resize()}disconnectedCallback(){t(this,h).close(),t(this,Y).close(),t(this,_).close(),ct.scrollEntries.unregister(this),window.removeEventListener("resize",t(this,it)),this.removeEventListener("keydown",t(this,rt)),this.removeEventListener("pointerdown",t(this,st)),this.removeEventListener("touchstart",t(this,et)),this.removeEventListener("wheel",t(this,tt))}}_=new WeakMap,Y=new WeakMap,h=new WeakMap,Z=new WeakMap,F=new WeakMap,z=new WeakSet,B=function(){return t(this,_).current||getComputedStyle(this).getPropertyValue("overflow")==="hidden"},tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,rt=new WeakMap;customElements.get("e-smooth-scroll")||customElements.define("e-smooth-scroll",Lt);var H,v,q,$,G,w,M,V,I,L,U,S,T,u,nt,m,p,A,R,P,X,l,Ct,mt,xt,C,W,ft,kt,ot,j;class Pt extends HTMLElement{constructor(){super(...arguments);s(this,l);s(this,H,this);s(this,v,this);s(this,q,null);s(this,$,new f.CSSProperty(this,"--scroll-region-status-holder",!1));s(this,G,new f.CSSProperty(this,"--scroll-region-progress-holder",!1));s(this,w,new f.CSSProperty(this,"--scroll-region-disabled",!1));s(this,M,new f.CSSProperty(this,"--scroll-region-start-offset",0,{rawValueCheck:!1}));s(this,V,new f.CSSProperty(this,"--scroll-region-start-offset-min",!1,{rawValueCheck:!1}));s(this,I,new f.CSSProperty(this,"--scroll-region-start-extra-offset",0,{rawValueCheck:!1}));s(this,L,new f.CSSProperty(this,"--scroll-region-distance",0,{rawValueCheck:!1}));s(this,U,new f.CSSProperty(this,"--scroll-region-distance-offset",0,{rawValueCheck:!1}));s(this,S,new f.CSSProperty(this,"--scroll-region-progress-var",""));s(this,T,new f.CSSProperty(this,"--scroll-region-enter-once",!1));s(this,u,new Vt.ElementLinkedStore(this,{enabled:!1,entered:!1,enteredOnLoad:!1,activated:!1}));s(this,nt,0);s(this,m,0);s(this,p,0);s(this,A,0);s(this,R,0);s(this,P,0);s(this,X,!1);s(this,C,()=>{this.resize()});s(this,W,()=>{this.tick()});s(this,j,()=>{document.readyState==="complete"&&d(this,l,xt).call(this)})}get start(){return t(this,m)}get finish(){return t(this,p)}get distance(){return t(this,A)}get scrolled(){return t(this,R)}get progress(){return t(this,P)}get status(){return t(this,u)}get scrollValue(){return t(this,q)instanceof HTMLElement?t(this,q).scrollTop:t(this,q).scrollY}resize(){t(this,w).current||(r(this,nt,St.getCumulativeOffsetTop(this)),r(this,m,t(this,nt)),typeof t(this,V).current=="number"?r(this,m,t(this,m)+Math.max(t(this,M).current,t(this,V).current)):r(this,m,t(this,m)+t(this,M).current),r(this,m,t(this,m)+t(this,I).current),r(this,m,t(this,m)-St.getStickyOffset(this,"top")),r(this,p,t(this,m)),t(this,L).current?r(this,p,t(this,p)+t(this,L).current):r(this,p,t(this,p)+this.offsetHeight),r(this,p,t(this,p)+t(this,U).current),r(this,A,t(this,p)-t(this,m)),r(this,X,this.offsetWidth!==0&&this.offsetHeight!==0),this.tick())}tick(){if(t(this,w).current)return;const e=this.scrollValue;r(this,R,Tt.clamp(e-t(this,m),0,t(this,A))),r(this,P,t(this,R)/t(this,A)||0),t(this,S).current&&t(this,v).style.setProperty(d(this,l,ot).call(this,t(this,S).current),t(this,P).toFixed(6)),t(this,u).set("activated",e>=t(this,m)),t(this,X)&&t(this,u).isFalse("entered")&&e>=t(this,m)&&e<=t(this,p)?d(this,l,ft).call(this):t(this,X)&&!t(this,T).current&&t(this,u).isTrue("entered")&&(e<t(this,m)||e>t(this,p))&&d(this,l,kt).call(this),t(this,T).current&&t(this,P)===1&&(t(this,u).current.entered||d(this,l,ft).call(this),this.destroy()),at.dispatchEvent(this,"scrollRegionProgress",{detail:{progress:t(this,P),scrolled:t(this,R)}})}destroy(){document.removeEventListener("readystatechange",t(this,j)),this.disable(!1),t(this,$).close(),t(this,G).close(),t(this,w).close(),t(this,M).close(),t(this,V).close(),t(this,I).close(),t(this,L).close(),t(this,U).close(),t(this,S).close(),t(this,T).close()}enable(){K.ticker.subscribe(t(this,W),{culling:this}),pt.elementResizer.subscribe(this,t(this,C)),yt.windowResizer.subscribe(t(this,C)),t(this,W).call(this),t(this,u).set("enabled",!0)}disable(e=!0){K.ticker.unsubscribe(t(this,W)),pt.elementResizer.unsubscribe(t(this,C)),yt.windowResizer.unsubscribe(t(this,C)),e&&t(this,u).reset(),d(this,l,mt).call(this)}connectedCallback(){const e=this.getAttribute("data-scroll")||".page-scroll";r(this,q,document.querySelector(e)),document.readyState==="complete"?t(this,j).call(this):document.addEventListener("readystatechange",t(this,j))}disconnectedCallback(){this.destroy()}}H=new WeakMap,v=new WeakMap,q=new WeakMap,$=new WeakMap,G=new WeakMap,w=new WeakMap,M=new WeakMap,V=new WeakMap,I=new WeakMap,L=new WeakMap,U=new WeakMap,S=new WeakMap,T=new WeakMap,u=new WeakMap,nt=new WeakMap,m=new WeakMap,p=new WeakMap,A=new WeakMap,R=new WeakMap,P=new WeakMap,X=new WeakMap,l=new WeakSet,Ct=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.add(this.getAttribute("data-global-class"))},mt=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.remove(this.getAttribute("data-global-class"))},xt=function(){t(this,$).subscribe(e=>{t(this,H)&&t(this,u).removeElement(t(this,H)),r(this,H,e.current?document.querySelector(e.current)||this:this),t(this,u).addElement(t(this,H))}),t(this,G).subscribe(e=>{t(this,v)&&t(this,v).style.removeProperty(d(this,l,ot).call(this,t(this,S).current)),r(this,v,e.current?document.querySelector(e.current)||this:this)}),t(this,w).subscribe(e=>{e.current&&!e.previous?this.disable():this.enable()}),t(this,S).subscribe(e=>{e.current?t(this,W).call(this):e.previous&&t(this,v).style.removeProperty(d(this,l,ot).call(this,e.previous))}),t(this,L).subscribe(()=>{t(this,C).call(this)}),t(this,$).observe(),t(this,G).observe(),t(this,w).observe(),t(this,M).observe(),t(this,V).observe(),t(this,I).observe(),t(this,L).observe(),t(this,U).observe(),t(this,S).observe(),t(this,T).observe()},C=new WeakMap,W=new WeakMap,ft=function(){const e=this.scrollValue;t(this,u).set("entered",!0),e===0&&t(this,u).set("enteredOnLoad",!0),d(this,l,Ct).call(this),at.dispatchEvent(this,"scrollRegionEnter")},kt=function(){t(this,u).set("entered",!1),d(this,l,mt).call(this),at.dispatchEvent(this,"scrollRegionExit")},ot=function(e){return`--${e}`},j=new WeakMap;customElements.get("e-scroll-region")||customElements.define("e-scroll-region",Pt);exports.ScrollRegionElement=Pt;exports.ScrollbarElement=Et;exports.SmoothScrollElement=Lt;
|
|
1
|
+
"use strict";var pt=n=>{throw TypeError(n)};var lt=(n,c,e)=>c.has(n)||pt("Cannot "+e);var t=(n,c,e)=>(lt(n,c,"read from private field"),e?e.call(n):c.get(n)),s=(n,c,e)=>c.has(n)?pt("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(n):c.set(n,e),r=(n,c,e,i)=>(lt(n,c,"write to private field"),i?i.call(n,e):c.set(n,e),e),u=(n,c,e)=>(lt(n,c,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ut=require("../index-DekP7OZe.cjs"),Ht=require("../dom-JBOkFLTh.cjs"),qt=require("../gestures-C7gbKx11.cjs");require("construct-style-sheets-polyfill");const K=require("../ticker/index.cjs"),ct=require("../scroll-entries/index.cjs");require("../Store-Cd1GlEmZ.cjs");const Mt=require("../Damped-z9Uaw2MJ.cjs"),f=require("../css-property/index.cjs"),Vt=require("../element-linked-store/index.cjs"),gt=require("../element-resizer/index.cjs"),at=require("../events-KVanG9sR.cjs"),St=require("../layout-Ctc2p3uz.cjs"),Tt=require("../math-GDWEqu7y.cjs"),yt=require("../window-resizer/index.cjs");var o,b,O,x,a,D,y,dt,vt,wt,J,ht,N,k,Q;class Et extends HTMLElement{constructor(){super(...arguments);s(this,y);s(this,o,null);s(this,b,null);s(this,O,0);s(this,x,0);s(this,a,!1);s(this,D);s(this,J,()=>{this.classList.add("active"),clearTimeout(t(this,D));const i=t(this,y,dt)/t(this,x)*t(this,O);t(this,a)?t(this,b).style.transform=`translate3d(${i}px, 0px, 0px)`:t(this,b).style.transform=`translate3d(0px, ${i}px, 0px)`,r(this,D,setTimeout(()=>{this.classList.remove("active")},1e3))});s(this,ht,()=>{const e=t(this,a)?this.offsetWidth:this.offsetHeight,i=t(this,y,vt),p=t(this,y,wt);r(this,x,i-p);let E=e*e/(t(this,x)+e);E=Math.max(E,30),t(this,a)?(t(this,b).style.width=E+"px",t(this,b).style.height="100%"):(t(this,b).style.width="100%",t(this,b).style.height=E+"px"),r(this,O,e-E),i<=p?this.style.display="none":this.style.display="block"});s(this,N,e=>{const i=t(this,y,dt),p=t(this,a)?e.x:e.y;qt.setupDrag(E=>{const zt=t(this,x)/t(this,O),bt=(t(this,a)?E.x-p:E.y-p)*zt;t(this,a)?t(this,o).scroll({left:i+bt,behavior:"instant"}):t(this,o).scroll({top:i+bt,behavior:"instant"})})});s(this,k,()=>{t(this,ht).call(this)});s(this,Q,e=>{e.isIntersecting?(K.ticker.subscribe(t(this,k),{maxFPS:5}),t(this,k).call(this)):K.ticker.unsubscribe(t(this,k))})}connectedCallback(){const e=this.getAttribute("data-scroll");let i=null;e&&(e==="parent"?i=this.parentElement:i=document.querySelector(e)),i||(i=Ht.findScrollParentElement(this),i===document.body&&(i=window)),r(this,a,this.hasAttribute("horisontal"));const p=this.querySelector("[data-thumb]");i&&p&&(r(this,o,i),r(this,b,p),t(this,o).addEventListener("scroll",t(this,J)),t(this,b).addEventListener("pointerdown",t(this,N)),ut.intersector.subscribe(this.parentElement===document.body?this:this.parentElement,t(this,Q)))}disconnectedCallback(){t(this,o).removeEventListener("scroll",t(this,J)),t(this,b).removeEventListener("pointerdown",t(this,N)),clearTimeout(t(this,D)),ut.intersector.unsubscribe(t(this,Q)),K.ticker.unsubscribe(t(this,k))}}o=new WeakMap,b=new WeakMap,O=new WeakMap,x=new WeakMap,a=new WeakMap,D=new WeakMap,y=new WeakSet,dt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollLeft:t(this,o).scrollTop:t(this,a)?t(this,o).scrollX:t(this,o).scrollY},vt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).scrollWidth:t(this,o).scrollHeight:t(this,a)?Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth):Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},wt=function(){return t(this,o)instanceof HTMLElement?t(this,a)?t(this,o).offsetWidth:t(this,o).offsetHeight:t(this,a)?innerWidth:innerHeight},J=new WeakMap,ht=new WeakMap,N=new WeakMap,k=new WeakMap,Q=new WeakMap;ut.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Et);const At=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End","Space"]);var _,Y,h,Z,F,z,B,tt,et,st,it,rt;class Lt extends HTMLElement{constructor(){super(...arguments);s(this,z);s(this,_,new f.CSSProperty(this,"--smooth-scroll-disabled",!1));s(this,Y,new f.CSSProperty(this,"--smooth-scroll-damping",10));s(this,h,new Mt.Damped(0));s(this,Z,0);s(this,F,!1);s(this,tt,e=>{if(!u(this,z,B).call(this)){if(Math.sign(e.deltaY)<0&&t(this,h).target===0&&t(this,h).direction<0||Math.sign(e.deltaY)>0&&t(this,h).target===t(this,h).max&&t(this,h).direction>0||e.stopPropagation(),e.target instanceof Element){const i=e.target.closest("[data-prevent-smooth-scroll]");if(i){const p=i.getAttribute("data-prevent-smooth-scroll");if(p){if(matchMedia(p).matches)return}else return}}Math.abs(e.deltaX)>Math.abs(e.deltaY)||(e.preventDefault(),this.shiftPosition(e.deltaY))}});s(this,et,()=>{u(this,z,B).call(this)||this.stop()});s(this,st,e=>{u(this,z,B).call(this)||e.target instanceof Element&&e.target.closest("a")&&this.stop()});s(this,it,()=>{this.resize()});s(this,rt,e=>{u(this,z,B).call(this)||At.has(e.code)&&this.stop()})}resize(){t(this,h).min=0,t(this,h).max=this.scrollHeight-this.offsetHeight}stop(){t(this,h).unlistenAnimationFrame(),r(this,F,!0)}sync(){const e=this.scrollTop;(t(this,F)||Math.abs(e-t(this,h).current)>100)&&(r(this,F,!1),t(this,h).set(e,{equalize:!0}))}shiftPosition(e){this.resize(),this.sync(),t(this,h).shift(e)}setPosition(e,i){this.resize(),this.sync(),t(this,h).set(e,i)}connectedCallback(){window.addEventListener("resize",t(this,it)),this.addEventListener("keydown",t(this,rt)),this.addEventListener("pointerdown",t(this,st)),this.addEventListener("touchstart",t(this,et)),this.addEventListener("wheel",t(this,tt),{passive:!1}),t(this,h).subscribe(e=>{const i=Math.round(e.current);ct.scrollEntries.update(this,"y",e.current),i!==t(this,Z)&&this.scroll({top:i,behavior:"instant"}),r(this,Z,i)}),t(this,Y).observe(),t(this,_).observe(),t(this,Y).subscribe(e=>{t(this,h).damping=e.current}),ct.scrollEntries.register(this),this.resize()}disconnectedCallback(){t(this,h).close(),t(this,Y).close(),t(this,_).close(),ct.scrollEntries.unregister(this),window.removeEventListener("resize",t(this,it)),this.removeEventListener("keydown",t(this,rt)),this.removeEventListener("pointerdown",t(this,st)),this.removeEventListener("touchstart",t(this,et)),this.removeEventListener("wheel",t(this,tt))}}_=new WeakMap,Y=new WeakMap,h=new WeakMap,Z=new WeakMap,F=new WeakMap,z=new WeakSet,B=function(){return t(this,_).current||getComputedStyle(this).getPropertyValue("overflow")==="hidden"},tt=new WeakMap,et=new WeakMap,st=new WeakMap,it=new WeakMap,rt=new WeakMap;customElements.get("e-smooth-scroll")||customElements.define("e-smooth-scroll",Lt);var H,v,q,$,G,w,M,V,I,L,U,S,T,d,nt,m,g,A,R,P,X,l,Ct,mt,xt,C,W,ft,kt,ot,j;class Pt extends HTMLElement{constructor(){super(...arguments);s(this,l);s(this,H,this);s(this,v,this);s(this,q,null);s(this,$,new f.CSSProperty(this,"--scroll-region-status-holder",!1));s(this,G,new f.CSSProperty(this,"--scroll-region-progress-holder",!1));s(this,w,new f.CSSProperty(this,"--scroll-region-disabled",!1));s(this,M,new f.CSSProperty(this,"--scroll-region-start-offset",0,{rawValueCheck:!1}));s(this,V,new f.CSSProperty(this,"--scroll-region-start-offset-min",!1,{rawValueCheck:!1}));s(this,I,new f.CSSProperty(this,"--scroll-region-start-extra-offset",0,{rawValueCheck:!1}));s(this,L,new f.CSSProperty(this,"--scroll-region-distance",0,{rawValueCheck:!1}));s(this,U,new f.CSSProperty(this,"--scroll-region-distance-offset",0,{rawValueCheck:!1}));s(this,S,new f.CSSProperty(this,"--scroll-region-progress-var",""));s(this,T,new f.CSSProperty(this,"--scroll-region-enter-once",!1));s(this,d,new Vt.ElementLinkedStore(this,{enabled:!1,entered:!1,enteredOnLoad:!1,activated:!1}));s(this,nt,0);s(this,m,0);s(this,g,0);s(this,A,0);s(this,R,0);s(this,P,0);s(this,X,!1);s(this,C,()=>{this.resize()});s(this,W,()=>{this.tick()});s(this,j,()=>{document.readyState==="complete"&&u(this,l,xt).call(this)})}get start(){return t(this,m)}get finish(){return t(this,g)}get distance(){return t(this,A)}get scrolled(){return t(this,R)}get progress(){return t(this,P)}get status(){return t(this,d)}get scrollValue(){return t(this,q)instanceof HTMLElement?t(this,q).scrollTop:t(this,q).scrollY}resize(){t(this,w).current||(r(this,nt,St.getCumulativeOffsetTop(this)),r(this,m,t(this,nt)),typeof t(this,V).current=="number"?r(this,m,t(this,m)+Math.max(t(this,M).current,t(this,V).current)):r(this,m,t(this,m)+t(this,M).current),r(this,m,t(this,m)+t(this,I).current),r(this,m,t(this,m)-St.getStickyOffset(this,"top")),r(this,g,t(this,m)),t(this,L).current?r(this,g,t(this,g)+t(this,L).current):r(this,g,t(this,g)+this.offsetHeight),r(this,g,t(this,g)+t(this,U).current),r(this,A,t(this,g)-t(this,m)),r(this,X,this.offsetWidth!==0&&this.offsetHeight!==0),this.tick())}tick(){if(t(this,w).current)return;const e=this.scrollValue;r(this,R,Tt.clamp(e-t(this,m),0,t(this,A))),r(this,P,t(this,R)/t(this,A)||0),t(this,S).current&&t(this,v).style.setProperty(u(this,l,ot).call(this,t(this,S).current),t(this,P).toFixed(6)),t(this,d).set("activated",e>=t(this,m)),t(this,X)&&t(this,d).isFalse("entered")&&e>=t(this,m)&&e<=t(this,g)?u(this,l,ft).call(this):t(this,X)&&!t(this,T).current&&t(this,d).isTrue("entered")&&(e<t(this,m)||e>t(this,g))&&u(this,l,kt).call(this),t(this,T).current&&t(this,P)===1&&(t(this,d).current.entered||u(this,l,ft).call(this),this.destroy()),at.dispatchEvent(this,"scrollRegionProgress",{detail:{progress:t(this,P),scrolled:t(this,R)}})}destroy(){document.removeEventListener("readystatechange",t(this,j)),this.disable(!1),t(this,$).close(),t(this,G).close(),t(this,w).close(),t(this,M).close(),t(this,V).close(),t(this,I).close(),t(this,L).close(),t(this,U).close(),t(this,S).close(),t(this,T).close()}enable(){K.ticker.subscribe(t(this,W),{culling:this}),gt.elementResizer.subscribe(this,t(this,C)),yt.windowResizer.subscribe(t(this,C)),t(this,W).call(this),t(this,d).set("enabled",!0)}disable(e=!0){K.ticker.unsubscribe(t(this,W)),gt.elementResizer.unsubscribe(t(this,C)),yt.windowResizer.unsubscribe(t(this,C)),e&&t(this,d).reset(),u(this,l,mt).call(this)}connectedCallback(){const e=this.getAttribute("data-scroll")||".page-scroll";r(this,q,document.querySelector(e)),document.readyState==="complete"?t(this,j).call(this):document.addEventListener("readystatechange",t(this,j))}disconnectedCallback(){this.destroy()}}H=new WeakMap,v=new WeakMap,q=new WeakMap,$=new WeakMap,G=new WeakMap,w=new WeakMap,M=new WeakMap,V=new WeakMap,I=new WeakMap,L=new WeakMap,U=new WeakMap,S=new WeakMap,T=new WeakMap,d=new WeakMap,nt=new WeakMap,m=new WeakMap,g=new WeakMap,A=new WeakMap,R=new WeakMap,P=new WeakMap,X=new WeakMap,l=new WeakSet,Ct=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.add(this.getAttribute("data-global-class"))},mt=function(){this.hasAttribute("data-global-class")&&document.documentElement.classList.remove(this.getAttribute("data-global-class"))},xt=function(){t(this,$).subscribe(e=>{t(this,H)&&t(this,d).removeElement(t(this,H)),r(this,H,e.current?document.querySelector(e.current)||this:this),t(this,d).addElement(t(this,H))}),t(this,G).subscribe(e=>{t(this,v)&&t(this,v).style.removeProperty(u(this,l,ot).call(this,t(this,S).current)),r(this,v,e.current?document.querySelector(e.current)||this:this)}),t(this,w).subscribe(e=>{e.current&&!e.previous?this.disable():this.enable()}),t(this,S).subscribe(e=>{e.current?t(this,W).call(this):e.previous&&t(this,v).style.removeProperty(u(this,l,ot).call(this,e.previous))}),t(this,L).subscribe(()=>{t(this,C).call(this)}),t(this,$).observe(),t(this,G).observe(),t(this,w).observe(),t(this,M).observe(),t(this,V).observe(),t(this,I).observe(),t(this,L).observe(),t(this,U).observe(),t(this,S).observe(),t(this,T).observe()},C=new WeakMap,W=new WeakMap,ft=function(){const e=this.scrollValue;t(this,d).set("entered",!0),e===0&&t(this,d).set("enteredOnLoad",!0),u(this,l,Ct).call(this),at.dispatchEvent(this,"scrollRegionEnter")},kt=function(){t(this,d).set("entered",!1),u(this,l,mt).call(this),at.dispatchEvent(this,"scrollRegionExit")},ot=function(e){return`--${e}`},j=new WeakMap;customElements.get("e-scroll-region")||customElements.define("e-scroll-region",Pt);exports.ScrollRegionElement=Pt;exports.ScrollbarElement=Et;exports.SmoothScrollElement=Lt;
|
package/lib/scroll-kit/index.js
CHANGED
|
@@ -17,12 +17,12 @@ import { elementResizer as gt } from "../element-resizer/index.js";
|
|
|
17
17
|
import { d as at } from "../events-CsVF98U6.js";
|
|
18
18
|
import { a as Mt, b as Vt } from "../layout-BSMtwCga.js";
|
|
19
19
|
import { c as Tt } from "../math-BOBiC4TN.js";
|
|
20
|
-
import { windowResizer as
|
|
21
|
-
var h, b, R, H, a, q,
|
|
20
|
+
import { windowResizer as yt } from "../window-resizer/index.js";
|
|
21
|
+
var h, b, R, H, a, q, E, dt, Et, vt, N, nt, Q, x, Z;
|
|
22
22
|
class At extends HTMLElement {
|
|
23
23
|
constructor() {
|
|
24
24
|
super(...arguments);
|
|
25
|
-
s(this,
|
|
25
|
+
s(this, E);
|
|
26
26
|
s(this, h, null);
|
|
27
27
|
s(this, b, null);
|
|
28
28
|
s(this, R, 0);
|
|
@@ -31,35 +31,29 @@ class At extends HTMLElement {
|
|
|
31
31
|
s(this, q);
|
|
32
32
|
s(this, N, () => {
|
|
33
33
|
this.classList.add("active"), clearTimeout(t(this, q));
|
|
34
|
-
const i = t(this,
|
|
34
|
+
const i = t(this, E, dt) / t(this, H) * t(this, R);
|
|
35
35
|
t(this, a) ? t(this, b).style.transform = `translate3d(${i}px, 0px, 0px)` : t(this, b).style.transform = `translate3d(0px, ${i}px, 0px)`, r(this, q, setTimeout(() => {
|
|
36
36
|
this.classList.remove("active");
|
|
37
37
|
}, 1e3));
|
|
38
38
|
});
|
|
39
39
|
s(this, nt, () => {
|
|
40
|
-
const e = t(this, a) ? this.offsetWidth : this.offsetHeight, i = t(this,
|
|
40
|
+
const e = t(this, a) ? this.offsetWidth : this.offsetHeight, i = t(this, E, Et), p = t(this, E, vt);
|
|
41
41
|
r(this, H, i - p);
|
|
42
|
-
let
|
|
43
|
-
|
|
42
|
+
let v = e * e / (t(this, H) + e);
|
|
43
|
+
v = Math.max(v, 30), t(this, a) ? (t(this, b).style.width = v + "px", t(this, b).style.height = "100%") : (t(this, b).style.width = "100%", t(this, b).style.height = v + "px"), r(this, R, e - v), i <= p ? this.style.display = "none" : this.style.display = "block";
|
|
44
44
|
});
|
|
45
45
|
s(this, Q, (e) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
() => {
|
|
60
|
-
document.documentElement.classList.remove("grabbing");
|
|
61
|
-
}
|
|
62
|
-
);
|
|
46
|
+
const i = t(this, E, dt), p = t(this, a) ? e.x : e.y;
|
|
47
|
+
xt((v) => {
|
|
48
|
+
const Ct = t(this, H) / t(this, R), ft = (t(this, a) ? v.x - p : v.y - p) * Ct;
|
|
49
|
+
t(this, a) ? t(this, h).scroll({
|
|
50
|
+
left: i + ft,
|
|
51
|
+
behavior: "instant"
|
|
52
|
+
}) : t(this, h).scroll({
|
|
53
|
+
top: i + ft,
|
|
54
|
+
behavior: "instant"
|
|
55
|
+
});
|
|
56
|
+
});
|
|
63
57
|
});
|
|
64
58
|
s(this, x, () => {
|
|
65
59
|
t(this, nt).call(this);
|
|
@@ -82,9 +76,9 @@ class At extends HTMLElement {
|
|
|
82
76
|
t(this, h).removeEventListener("scroll", t(this, N)), t(this, b).removeEventListener("pointerdown", t(this, Q)), clearTimeout(t(this, q)), pt.unsubscribe(t(this, Z)), J.unsubscribe(t(this, x));
|
|
83
77
|
}
|
|
84
78
|
}
|
|
85
|
-
h = new WeakMap(), b = new WeakMap(), R = new WeakMap(), H = new WeakMap(), a = new WeakMap(), q = new WeakMap(),
|
|
79
|
+
h = new WeakMap(), b = new WeakMap(), R = new WeakMap(), H = new WeakMap(), a = new WeakMap(), q = new WeakMap(), E = new WeakSet(), dt = function() {
|
|
86
80
|
return t(this, h) instanceof HTMLElement ? t(this, a) ? t(this, h).scrollLeft : t(this, h).scrollTop : t(this, a) ? t(this, h).scrollX : t(this, h).scrollY;
|
|
87
|
-
},
|
|
81
|
+
}, Et = function() {
|
|
88
82
|
return t(this, h) instanceof HTMLElement ? t(this, a) ? t(this, h).scrollWidth : t(this, h).scrollHeight : t(this, a) ? Math.max(
|
|
89
83
|
document.body.scrollWidth,
|
|
90
84
|
document.documentElement.scrollWidth,
|
|
@@ -100,7 +94,7 @@ h = new WeakMap(), b = new WeakMap(), R = new WeakMap(), H = new WeakMap(), a =
|
|
|
100
94
|
document.body.clientHeight,
|
|
101
95
|
document.documentElement.clientHeight
|
|
102
96
|
);
|
|
103
|
-
},
|
|
97
|
+
}, vt = function() {
|
|
104
98
|
return t(this, h) instanceof HTMLElement ? t(this, a) ? t(this, h).offsetWidth : t(this, h).offsetHeight : t(this, a) ? innerWidth : innerHeight;
|
|
105
99
|
}, N = new WeakMap(), nt = new WeakMap(), Q = new WeakMap(), x = new WeakMap(), Z = new WeakMap();
|
|
106
100
|
Pt && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", At);
|
|
@@ -192,7 +186,7 @@ Y = new WeakMap(), F = new WeakMap(), n = new WeakMap(), _ = new WeakMap(), $ =
|
|
|
192
186
|
return t(this, Y).current || getComputedStyle(this).getPropertyValue("overflow") === "hidden";
|
|
193
187
|
}, tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), it = new WeakMap(), rt = new WeakMap();
|
|
194
188
|
customElements.get("e-smooth-scroll") || customElements.define("e-smooth-scroll", Dt);
|
|
195
|
-
var z, S, M, G, I, w, V, T, U, L, X,
|
|
189
|
+
var z, S, M, G, I, w, V, T, U, L, X, y, A, u, ot, m, g, W, D, C, B, l, St, ut, wt, P, O, mt, Lt, ht, K;
|
|
196
190
|
class Ot extends HTMLElement {
|
|
197
191
|
constructor() {
|
|
198
192
|
super(...arguments);
|
|
@@ -255,7 +249,7 @@ class Ot extends HTMLElement {
|
|
|
255
249
|
rawValueCheck: !1
|
|
256
250
|
}
|
|
257
251
|
));
|
|
258
|
-
s(this,
|
|
252
|
+
s(this, y, new f(
|
|
259
253
|
this,
|
|
260
254
|
"--scroll-region-progress-var",
|
|
261
255
|
""
|
|
@@ -319,8 +313,8 @@ class Ot extends HTMLElement {
|
|
|
319
313
|
if (t(this, w).current)
|
|
320
314
|
return;
|
|
321
315
|
const e = this.scrollValue;
|
|
322
|
-
r(this, D, Tt(e - t(this, m), 0, t(this, W))), r(this, C, t(this, D) / t(this, W) || 0), t(this,
|
|
323
|
-
d(this, l, ht).call(this, t(this,
|
|
316
|
+
r(this, D, Tt(e - t(this, m), 0, t(this, W))), r(this, C, t(this, D) / t(this, W) || 0), t(this, y).current && t(this, S).style.setProperty(
|
|
317
|
+
d(this, l, ht).call(this, t(this, y).current),
|
|
324
318
|
t(this, C).toFixed(6)
|
|
325
319
|
), t(this, u).set("activated", e >= t(this, m)), t(this, B) && t(this, u).isFalse("entered") && e >= t(this, m) && e <= t(this, g) ? d(this, l, mt).call(this) : t(this, B) && !t(this, A).current && t(this, u).isTrue("entered") && (e < t(this, m) || e > t(this, g)) && d(this, l, Lt).call(this), t(this, A).current && t(this, C) === 1 && (t(this, u).current.entered || d(this, l, mt).call(this), this.destroy()), at(this, "scrollRegionProgress", {
|
|
326
320
|
detail: {
|
|
@@ -333,13 +327,13 @@ class Ot extends HTMLElement {
|
|
|
333
327
|
document.removeEventListener(
|
|
334
328
|
"readystatechange",
|
|
335
329
|
t(this, K)
|
|
336
|
-
), this.disable(!1), t(this, G).close(), t(this, I).close(), t(this, w).close(), t(this, V).close(), t(this, T).close(), t(this, U).close(), t(this, L).close(), t(this, X).close(), t(this,
|
|
330
|
+
), this.disable(!1), t(this, G).close(), t(this, I).close(), t(this, w).close(), t(this, V).close(), t(this, T).close(), t(this, U).close(), t(this, L).close(), t(this, X).close(), t(this, y).close(), t(this, A).close();
|
|
337
331
|
}
|
|
338
332
|
enable() {
|
|
339
|
-
J.subscribe(t(this, O), { culling: this }), gt.subscribe(this, t(this, P)),
|
|
333
|
+
J.subscribe(t(this, O), { culling: this }), gt.subscribe(this, t(this, P)), yt.subscribe(t(this, P)), t(this, O).call(this), t(this, u).set("enabled", !0);
|
|
340
334
|
}
|
|
341
335
|
disable(e = !0) {
|
|
342
|
-
J.unsubscribe(t(this, O)), gt.unsubscribe(t(this, P)),
|
|
336
|
+
J.unsubscribe(t(this, O)), gt.unsubscribe(t(this, P)), yt.unsubscribe(t(this, P)), e && t(this, u).reset(), d(this, l, ut).call(this);
|
|
343
337
|
}
|
|
344
338
|
connectedCallback() {
|
|
345
339
|
const e = this.getAttribute("data-scroll") || ".page-scroll";
|
|
@@ -352,7 +346,7 @@ class Ot extends HTMLElement {
|
|
|
352
346
|
this.destroy();
|
|
353
347
|
}
|
|
354
348
|
}
|
|
355
|
-
z = new WeakMap(), S = new WeakMap(), M = new WeakMap(), G = new WeakMap(), I = new WeakMap(), w = new WeakMap(), V = new WeakMap(), T = new WeakMap(), U = new WeakMap(), L = new WeakMap(), X = new WeakMap(),
|
|
349
|
+
z = new WeakMap(), S = new WeakMap(), M = new WeakMap(), G = new WeakMap(), I = new WeakMap(), w = new WeakMap(), V = new WeakMap(), T = new WeakMap(), U = new WeakMap(), L = new WeakMap(), X = new WeakMap(), y = new WeakMap(), A = new WeakMap(), u = new WeakMap(), ot = new WeakMap(), m = new WeakMap(), g = new WeakMap(), W = new WeakMap(), D = new WeakMap(), C = new WeakMap(), B = new WeakMap(), l = new WeakSet(), St = function() {
|
|
356
350
|
this.hasAttribute("data-global-class") && document.documentElement.classList.add(
|
|
357
351
|
this.getAttribute("data-global-class")
|
|
358
352
|
);
|
|
@@ -365,17 +359,17 @@ z = new WeakMap(), S = new WeakMap(), M = new WeakMap(), G = new WeakMap(), I =
|
|
|
365
359
|
t(this, z) && t(this, u).removeElement(t(this, z)), r(this, z, e.current ? document.querySelector(e.current) || this : this), t(this, u).addElement(t(this, z));
|
|
366
360
|
}), t(this, I).subscribe((e) => {
|
|
367
361
|
t(this, S) && t(this, S).style.removeProperty(
|
|
368
|
-
d(this, l, ht).call(this, t(this,
|
|
362
|
+
d(this, l, ht).call(this, t(this, y).current)
|
|
369
363
|
), r(this, S, e.current ? document.querySelector(e.current) || this : this);
|
|
370
364
|
}), t(this, w).subscribe((e) => {
|
|
371
365
|
e.current && !e.previous ? this.disable() : this.enable();
|
|
372
|
-
}), t(this,
|
|
366
|
+
}), t(this, y).subscribe((e) => {
|
|
373
367
|
e.current ? t(this, O).call(this) : e.previous && t(this, S).style.removeProperty(
|
|
374
368
|
d(this, l, ht).call(this, e.previous)
|
|
375
369
|
);
|
|
376
370
|
}), t(this, L).subscribe(() => {
|
|
377
371
|
t(this, P).call(this);
|
|
378
|
-
}), t(this, G).observe(), t(this, I).observe(), t(this, w).observe(), t(this, V).observe(), t(this, T).observe(), t(this, U).observe(), t(this, L).observe(), t(this, X).observe(), t(this,
|
|
372
|
+
}), t(this, G).observe(), t(this, I).observe(), t(this, w).observe(), t(this, V).observe(), t(this, T).observe(), t(this, U).observe(), t(this, L).observe(), t(this, X).observe(), t(this, y).observe(), t(this, A).observe();
|
|
379
373
|
}, P = new WeakMap(), O = new WeakMap(), mt = function() {
|
|
380
374
|
const e = this.scrollValue;
|
|
381
375
|
t(this, u).set("entered", !0), e === 0 && t(this, u).set("enteredOnLoad", !0), d(this, l, St).call(this), at(this, "scrollRegionEnter");
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=r=>{throw TypeError(r)};var G=(r,a,e)=>a.has(r)||p("Cannot "+e);var t=(r,a,e)=>(G(r,a,"read from private field"),e?e.call(r):a.get(r)),s=(r,a,e)=>a.has(r)?p("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(r):a.set(r,e),i=(r,a,e,h)=>(G(r,a,"write to private field"),h?h.call(r,e):a.set(r,e),e),T=(r,a,e)=>(G(r,a,"access private method"),e);const w=require("./index-DekP7OZe.cjs"),_=require("./dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const B=require("./ticker/index.cjs");require("./Store-Cd1GlEmZ.cjs");const ee=require("./easings-GegIwET5.cjs"),te=require("./Tweened-mvHucL4Y.cjs"),ie=require("./gestures-C7gbKx11.cjs"),se=require("./number-ChAm68cm.cjs"),he=require("./order/index.cjs"),re=require("./notifier/index.cjs");var j;class F{constructor(){s(this,j,new re.Notifier)}get changeEvent(){return t(this,j)}}j=new WeakMap;var y,c,u,R;class ne extends F{constructor(e){super();s(this,y,null);s(this,c,null);s(this,u,"offsetHeight");s(this,R,e=>{const h=e.shiftKey?-1:1;let n;e.code==="Space"?n=h*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?n=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?n=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?n=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?n=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?n=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?n=1*t(this,c)[t(this,u)]:e.code==="Home"?n=0:e.code==="End"&&(n=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),n&&(e.stopPropagation(),this.changeEvent.notify("keyboard",n,e))});w.isBrowser&&(i(this,y,e!=null&&e.element&&_.getElement(e.element)||window),i(this,c,t(this,y)instanceof HTMLElement?t(this,y):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){w.isBrowser&&t(this,y).addEventListener("keydown",t(this,R))}disconnect(){w.isBrowser&&t(this,y).removeEventListener("keydown",t(this,R))}}y=new WeakMap,c=new WeakMap,u=new WeakMap,R=new WeakMap;var x,v,X,Y,d,A,m,b,V,J,D,O,I;class ae extends F{constructor(e){super();s(this,b);s(this,x);s(this,v);s(this,X);s(this,Y);s(this,d);s(this,A);s(this,m);s(this,D);s(this,O);s(this,I);this.direction=1,i(this,d,new te.Tweened(0,{easing:ee.easeInQuad})),i(this,m,!1),i(this,D,h=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",h.timeBetweenFrames*t(this,x)*this.direction*(1-t(this,d).current),h)}),i(this,O,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,x))*this.direction*(1-t(this,d).current),null)}),i(this,I,()=>{t(this,v)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,x,(e==null?void 0:e.speed)||1),i(this,v,(e==null?void 0:e.interval)||!1),i(this,X,e)}set interval(e){i(this,v,e),t(this,m)&&T(this,b,V).call(this)}set speed(e){i(this,x,e),t(this,m)&&T(this,b,V).call(this)}connect(){t(this,m)||(i(this,m,!0),T(this,b,V).call(this))}disconnect(){t(this,m)&&(i(this,m,!1),T(this,b,J).call(this))}pauseAndContinue(e,h){t(this,m)&&e&&(clearTimeout(t(this,A)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:h}),i(this,A,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:h})},e)))}}x=new WeakMap,v=new WeakMap,X=new WeakMap,Y=new WeakMap,d=new WeakMap,A=new WeakMap,m=new WeakMap,b=new WeakSet,V=function(){T(this,b,J).call(this),t(this,v)?i(this,Y,setInterval(t(this,O),Math.abs(t(this,x)))):B.ticker.subscribe(t(this,D),t(this,X)),document.addEventListener("visibilitychange",t(this,I))},J=function(){clearInterval(t(this,Y)),B.ticker.unsubscribe(t(this,D)),clearTimeout(t(this,A)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,I))},D=new WeakMap,O=new WeakMap,I=new WeakMap;var H,M,z,S;class le extends F{constructor(e){super();s(this,H,null);s(this,M);s(this,z);s(this,S,e=>{let h=0;const n=Math.abs(e.deltaY),g=Math.abs(e.deltaX);if(!(this.axis==="x"&&n>g||this.axis==="y"&&g>n)&&(e.preventDefault(),!(this.debounce&&this.axis==="x"&&g<5||this.debounce&&this.axis==="y"&&n<5)))if(h=(this.axis==="max"?g>n?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const N=Date.now();if(N-t(this,z)>40&&(h=100*Math.sign(h)),i(this,z,N),Math.abs(h)<100||t(this,M))return;this.changeEvent.notify("wheel",h,e),i(this,M,setTimeout(()=>{i(this,M,void 0)},80))}else this.changeEvent.notify("wheel",h,e)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,z,Date.now()),w.isBrowser&&i(this,H,e!=null&&e.element&&_.getElement(e.element)||window)}connect(){w.isBrowser&&t(this,H).addEventListener("wheel",t(this,S),{passive:!1})}disconnect(){w.isBrowser&&(t(this,H).removeEventListener("wheel",t(this,S)),clearTimeout(t(this,M)))}}H=new WeakMap,M=new WeakMap,z=new WeakMap,S=new WeakMap;var q,P,o,l,C,E,W,K,L;const k=class k extends F{constructor(e){super();s(this,P);s(this,o);s(this,l);s(this,C);s(this,E);s(this,W);s(this,K);s(this,L);this.inertion=1,i(this,P,null),i(this,o,null),i(this,l,0),i(this,C,[]),i(this,E,0),i(this,W,h=>{Math.abs(t(this,E))>2&&h.preventDefault()}),i(this,K,h=>{if(i(this,E,0),i(this,l,0),h.button!==0||h.composedPath().find(f=>f instanceof HTMLElement&&f.hasAttribute("drag-dead-zone")))return;this.swipe||B.ticker.unsubscribe(t(this,L));let n=h,g=!1;document.documentElement.classList.add("grabbing");let N=0,$=0,U=0,Q=0;ie.setupDrag(f=>{t(k,q)&&t(k,q)!==t(this,o)||(N=n.x-f.x,$=n.y-f.y,U=f.x-h.x,Q=f.y-h.y,this.axis==="x"?(i(this,E,U),i(this,l,N)):(i(this,E,Q),i(this,l,$)),n=f,g=this.axis==="x"&&Math.abs(U)>Math.abs(Q)||this.axis==="y"&&Math.abs(Q)>Math.abs(U),g&&(document.documentElement.classList.add("click-disabled"),i(k,q,t(this,o)),this.changeEvent.notify("drag",t(this,l),f)))},f=>{i(k,q,null),g&&(!this.swipe&&this.inertion?(i(this,l,t(this,l)*this.inertion),B.ticker.subscribe(t(this,L),{order:he.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",t(this,l),f)),document.documentElement.classList.remove("grabbing"),setTimeout(()=>{document.documentElement.classList.remove("click-disabled")})})}),i(this,L,()=>{Math.floor(Math.abs(t(this,l)))||B.ticker.unsubscribe(t(this,L)),i(this,l,t(this,l)*.95),i(this,l,se.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l),null)}),this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,w.isBrowser&&(i(this,o,e!=null&&e.element&&_.getElement(e.element)||document.documentElement),i(this,P,(e==null?void 0:e.rootElement)||t(this,o)))}connect(){w.isBrowser&&(i(this,C,[...t(this,P).querySelectorAll("a")]),t(this,C).forEach(e=>{e.addEventListener("click",t(this,W))}),t(this,o).addEventListener("pointerdown",t(this,K)))}disconnect(){w.isBrowser&&(t(this,C).forEach(e=>{e.removeEventListener("click",t(this,W))}),t(this,o).removeEventListener("pointerdown",t(this,K)),B.ticker.unsubscribe(t(this,L)))}};q=new WeakMap,P=new WeakMap,o=new WeakMap,l=new WeakMap,C=new WeakMap,E=new WeakMap,W=new WeakMap,K=new WeakMap,L=new WeakMap,s(k,q,null);let Z=k;exports.AutoplayControls=ae;exports.Controls=F;exports.DragControls=Z;exports.KeyboardControls=ne;exports.WheelControls=le;
|