aptechka 0.30.5 → 0.30.7

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.
@@ -13,5 +13,5 @@ export declare class AutoplayControls extends Controls {
13
13
  set speed(value: number);
14
14
  connect(): void;
15
15
  disconnect(): void;
16
- pauseAndContinue(duration: number): void;
16
+ pauseAndContinue(duration: number, instant?: boolean): void;
17
17
  }
@@ -1 +1 @@
1
- "use strict";var Q=h=>{throw TypeError(h)};var N=(h,n,e)=>n.has(h)||Q("Cannot "+e);var t=(h,n,e)=>(N(h,n,"read from private field"),e?e.call(h):n.get(h)),s=(h,n,e)=>n.has(h)?Q("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(h):n.set(h,e),i=(h,n,e,a)=>(N(h,n,"write to private field"),a?a.call(h,e):n.set(h,e),e),L=(h,n,e)=>(N(h,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),j=require("../dom-JBOkFLTh.cjs"),k=require("../ticker/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-BttGiyB0.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),_=require("../polyfills-CM4SCDTt.cjs"),$=require("../order/index.cjs");var R;class K{constructor(){s(this,R,new V.Notifier)}get changeEvent(){return t(this,R)}}R=new WeakMap;var w,d,u,D;class p extends K{constructor(e){super();s(this,w,null);s(this,d,null);s(this,u,"offsetHeight");s(this,D,e=>{const a=e.shiftKey?-1:1;let r;e.code==="Space"?r=a*t(this,d)[t(this,u)]*.4:e.code==="ArrowLeft"?r=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowRight"?r=1*t(this,d)[t(this,u)]*.2:e.code==="ArrowUp"?r=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowDown"?r=1*t(this,d)[t(this,u)]*.2:e.code==="PageUp"?r=-1*t(this,d)[t(this,u)]:e.code==="PageDown"?r=1*t(this,d)[t(this,u)]:e.code==="Home"?r=0:e.code==="End"&&(r=t(this,u)==="offsetWidth"?t(this,d).scrollWidth:t(this,d).scrollHeight),r&&(e.stopPropagation(),this.changeEvent.notify("keyboard",r))});m.isBrowser&&(i(this,w,e!=null&&e.element&&j.getElement(e.element)||window),i(this,d,t(this,w)instanceof HTMLElement?t(this,w):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,w).addEventListener("keydown",t(this,D))}disconnect(){m.isBrowser&&t(this,w).removeEventListener("keydown",t(this,D))}}w=new WeakMap,d=new WeakMap,u=new WeakMap,D=new WeakMap;var b,E,H,P,l,C,f,o,O,F,q,W,T;class ee extends K{constructor(e){super();s(this,o);s(this,b);s(this,E);s(this,H);s(this,P);s(this,l);s(this,C);s(this,f);s(this,q);s(this,W);s(this,T);this.direction=1,i(this,l,new J.Tweened(0,{easing:G.easeInQuad})),i(this,f,!1),i(this,q,a=>{t(this,l).current!==1&&this.changeEvent.notify("autoplay",a.timeBetweenFrames*t(this,b)*this.direction*(1-t(this,l).current))}),i(this,W,()=>{t(this,l).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,b))*this.direction*(1-t(this,l).current))}),i(this,T,()=>{t(this,E)&&(document.hidden?t(this,l).set(1,{equalize:!0}):t(this,l).set(0,{equalize:!0}))}),i(this,b,(e==null?void 0:e.speed)||1),i(this,E,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,E,e),t(this,f)&&L(this,o,O).call(this)}set speed(e){i(this,b,e),t(this,f)&&L(this,o,O).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,o,O).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,o,F).call(this))}pauseAndContinue(e){e&&!t(this,l).target&&(clearInterval(t(this,C)),t(this,l).set(1,{duration:Math.min(e,1e3)}),i(this,C,setTimeout(()=>{t(this,l).set(0,{duration:Math.min(e,5e3)})},e)))}}b=new WeakMap,E=new WeakMap,H=new WeakMap,P=new WeakMap,l=new WeakMap,C=new WeakMap,f=new WeakMap,o=new WeakSet,O=function(){L(this,o,F).call(this),t(this,E)?i(this,P,setInterval(t(this,W),Math.abs(t(this,b)))):k.ticker.subscribe(t(this,q),t(this,H)),document.addEventListener("visibilitychange",t(this,T))},F=function(){clearInterval(t(this,P)),k.ticker.unsubscribe(t(this,q)),clearInterval(t(this,C)),t(this,l).close(),document.removeEventListener("visibilitychange",t(this,T))},q=new WeakMap,W=new WeakMap,T=new WeakMap;var B,v,I,X;class te extends K{constructor(e){super();s(this,B,null);s(this,v);s(this,I);s(this,X,e=>{let a=0;if(e.preventDefault(),!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(a=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const r=Date.now();if(r-t(this,I)>40&&(a=100*Math.sign(a)),i(this,I,r),Math.abs(a)<100||t(this,v))return;this.changeEvent.notify("wheel",a),i(this,v,setTimeout(()=>{i(this,v,void 0)},80))}else this.changeEvent.notify("wheel",a)});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,I,Date.now()),m.isBrowser&&i(this,B,e!=null&&e.element&&j.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,B).addEventListener("wheel",t(this,X),{passive:!1})}disconnect(){m.isBrowser&&(t(this,B).removeEventListener("wheel",t(this,X)),clearTimeout(t(this,v)))}}B=new WeakMap,v=new WeakMap,I=new WeakMap,X=new WeakMap;var x,g,A,c,Y,M;const y=class y extends K{constructor(e){super();s(this,g,null);s(this,A,!1);s(this,c,0);s(this,Y,e=>{if(e.composedPath().find(r=>r instanceof HTMLElement&&r.hasAttribute("drag-dead-zone")))return;this.swipe||k.ticker.unsubscribe(t(this,M));let a=e;i(this,c,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(r=>{if(t(this,A)||t(y,x)&&t(y,x)!==t(this,g))return;this.swipe&&i(this,A,!0);const S=a.x-r.x,z=a.y-r.y;this.axis==="x"?i(this,c,S):i(this,c,z),a=r,(this.axis==="x"&&Math.abs(S)>Math.abs(z)||this.axis==="y"&&Math.abs(z)>Math.abs(S))&&(i(y,x,t(this,g)),this.changeEvent.notify("drag",t(this,c)))},()=>{i(y,x,null),this.swipe||(i(this,c,t(this,c)*3),k.ticker.subscribe(t(this,M),{order:$.TICK_ORDER.CONTROLS-1})),document.documentElement.classList.remove("grabbing"),i(this,A,!1)})});s(this,M,()=>{Math.floor(t(this,c))||k.ticker.unsubscribe(t(this,M)),i(this,c,t(this,c)*.95),i(this,c,_.preciseNumber(t(this,c),3)),this.changeEvent.notify("drag",t(this,c))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,g,e!=null&&e.element&&j.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,g).addEventListener("pointerdown",t(this,Y))}disconnect(){m.isBrowser&&(t(this,g).removeEventListener("pointerdown",t(this,Y)),k.ticker.unsubscribe(t(this,M)))}};x=new WeakMap,g=new WeakMap,A=new WeakMap,c=new WeakMap,Y=new WeakMap,M=new WeakMap,s(y,x,null);let U=y;exports.AutoplayControls=ee;exports.Controls=K;exports.DragControls=U;exports.KeyboardControls=p;exports.WheelControls=te;
1
+ "use strict";var Q=h=>{throw TypeError(h)};var N=(h,a,e)=>a.has(h)||Q("Cannot "+e);var t=(h,a,e)=>(N(h,a,"read from private field"),e?e.call(h):a.get(h)),s=(h,a,e)=>a.has(h)?Q("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(h):a.set(h,e),i=(h,a,e,n)=>(N(h,a,"write to private field"),n?n.call(h,e):a.set(h,e),e),L=(h,a,e)=>(N(h,a,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),j=require("../dom-JBOkFLTh.cjs"),k=require("../ticker/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-BttGiyB0.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),_=require("../polyfills-CM4SCDTt.cjs"),$=require("../order/index.cjs");var O;class Y{constructor(){s(this,O,new V.Notifier)}get changeEvent(){return t(this,O)}}O=new WeakMap;var w,c,u,I;class p extends Y{constructor(e){super();s(this,w,null);s(this,c,null);s(this,u,"offsetHeight");s(this,I,e=>{const n=e.shiftKey?-1:1;let r;e.code==="Space"?r=n*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))});m.isBrowser&&(i(this,w,e!=null&&e.element&&j.getElement(e.element)||window),i(this,c,t(this,w)instanceof HTMLElement?t(this,w):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,w).addEventListener("keydown",t(this,I))}disconnect(){m.isBrowser&&t(this,w).removeEventListener("keydown",t(this,I))}}w=new WeakMap,c=new WeakMap,u=new WeakMap,I=new WeakMap;var b,E,H,P,d,q,f,o,K,F,C,z,T;class ee extends Y{constructor(e){super();s(this,o);s(this,b);s(this,E);s(this,H);s(this,P);s(this,d);s(this,q);s(this,f);s(this,C);s(this,z);s(this,T);this.direction=1,i(this,d,new J.Tweened(0,{easing:G.easeInQuad})),i(this,f,!1),i(this,C,n=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",n.timeBetweenFrames*t(this,b)*this.direction*(1-t(this,d).current))}),i(this,z,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,b))*this.direction*(1-t(this,d).current))}),i(this,T,()=>{t(this,E)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,b,(e==null?void 0:e.speed)||1),i(this,E,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,E,e),t(this,f)&&L(this,o,K).call(this)}set speed(e){i(this,b,e),t(this,f)&&L(this,o,K).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,o,K).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,o,F).call(this))}pauseAndContinue(e,n){e&&(clearTimeout(t(this,q)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:n}),i(this,q,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:n})},e)))}}b=new WeakMap,E=new WeakMap,H=new WeakMap,P=new WeakMap,d=new WeakMap,q=new WeakMap,f=new WeakMap,o=new WeakSet,K=function(){L(this,o,F).call(this),t(this,E)?i(this,P,setInterval(t(this,z),Math.abs(t(this,b)))):k.ticker.subscribe(t(this,C),t(this,H)),document.addEventListener("visibilitychange",t(this,T))},F=function(){clearInterval(t(this,P)),k.ticker.unsubscribe(t(this,C)),clearTimeout(t(this,q)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,T))},C=new WeakMap,z=new WeakMap,T=new WeakMap;var B,x,A,W;class te extends Y{constructor(e){super();s(this,B,null);s(this,x);s(this,A);s(this,W,e=>{let n=0;if(e.preventDefault(),!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(n=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const r=Date.now();if(r-t(this,A)>40&&(n=100*Math.sign(n)),i(this,A,r),Math.abs(n)<100||t(this,x))return;this.changeEvent.notify("wheel",n),i(this,x,setTimeout(()=>{i(this,x,void 0)},80))}else this.changeEvent.notify("wheel",n)});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,A,Date.now()),m.isBrowser&&i(this,B,e!=null&&e.element&&j.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,B).addEventListener("wheel",t(this,W),{passive:!1})}disconnect(){m.isBrowser&&(t(this,B).removeEventListener("wheel",t(this,W)),clearTimeout(t(this,x)))}}B=new WeakMap,x=new WeakMap,A=new WeakMap,W=new WeakMap;var v,g,D,l,X,M;const y=class y extends Y{constructor(e){super();s(this,g,null);s(this,D,!1);s(this,l,0);s(this,X,e=>{if(e.composedPath().find(r=>r instanceof HTMLElement&&r.hasAttribute("drag-dead-zone")))return;this.swipe||k.ticker.unsubscribe(t(this,M));let n=e;i(this,l,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(r=>{if(t(this,D)||t(y,v)&&t(y,v)!==t(this,g))return;this.swipe&&i(this,D,!0);const R=n.x-r.x,S=n.y-r.y;this.axis==="x"?i(this,l,R):i(this,l,S),n=r,(this.axis==="x"&&Math.abs(R)>Math.abs(S)||this.axis==="y"&&Math.abs(S)>Math.abs(R))&&(i(y,v,t(this,g)),this.changeEvent.notify("drag",t(this,l)))},()=>{i(y,v,null),this.swipe||(i(this,l,t(this,l)*3),k.ticker.subscribe(t(this,M),{order:$.TICK_ORDER.CONTROLS-1})),document.documentElement.classList.remove("grabbing"),i(this,D,!1)})});s(this,M,()=>{Math.floor(t(this,l))||k.ticker.unsubscribe(t(this,M)),i(this,l,t(this,l)*.95),i(this,l,_.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,g,e!=null&&e.element&&j.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,g).addEventListener("pointerdown",t(this,X))}disconnect(){m.isBrowser&&(t(this,g).removeEventListener("pointerdown",t(this,X)),k.ticker.unsubscribe(t(this,M)))}};v=new WeakMap,g=new WeakMap,D=new WeakMap,l=new WeakMap,X=new WeakMap,M=new WeakMap,s(y,v,null);let U=y;exports.AutoplayControls=ee;exports.Controls=Y;exports.DragControls=U;exports.KeyboardControls=p;exports.WheelControls=te;
@@ -1,8 +1,8 @@
1
1
  var Q = (h) => {
2
2
  throw TypeError(h);
3
3
  };
4
- var F = (h, n, e) => n.has(h) || Q("Cannot " + e);
5
- var t = (h, n, e) => (F(h, n, "read from private field"), e ? e.call(h) : n.get(h)), s = (h, n, e) => n.has(h) ? Q("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(h) : n.set(h, e), i = (h, n, e, r) => (F(h, n, "write to private field"), r ? r.call(h, e) : n.set(h, e), e), M = (h, n, e) => (F(h, n, "access private method"), e);
4
+ var F = (h, r, e) => r.has(h) || Q("Cannot " + e);
5
+ var t = (h, r, e) => (F(h, r, "read from private field"), e ? e.call(h) : r.get(h)), s = (h, r, e) => r.has(h) ? Q("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(h) : r.set(h, e), i = (h, r, e, n) => (F(h, r, "write to private field"), n ? n.call(h, e) : r.set(h, e), e), M = (h, r, e) => (F(h, r, "access private method"), e);
6
6
  import { Notifier as j } from "../notifier/index.js";
7
7
  import { i as m } from "../browser-0zX67oeU.js";
8
8
  import { g as U } from "../dom-0S_WDL4g.js";
@@ -13,196 +13,202 @@ import { T as J } from "../Tweened-BUuSLSF7.js";
13
13
  import { s as Z } from "../gestures-D2Fdra_G.js";
14
14
  import { p as $ } from "../polyfills-X6KXuHg-.js";
15
15
  import { TICK_ORDER as p } from "../order/index.js";
16
- var N;
17
- class O {
16
+ var K;
17
+ class N {
18
18
  constructor() {
19
- s(this, N, new j());
19
+ s(this, K, new j());
20
20
  }
21
21
  get changeEvent() {
22
- return t(this, N);
22
+ return t(this, K);
23
23
  }
24
24
  }
25
- N = new WeakMap();
26
- var b, c, f, P;
27
- class ce extends O {
25
+ K = new WeakMap();
26
+ var w, d, f, z;
27
+ class ce extends N {
28
28
  constructor(e) {
29
29
  super();
30
- s(this, b, null);
31
- s(this, c, null);
30
+ s(this, w, null);
31
+ s(this, d, null);
32
32
  s(this, f, "offsetHeight");
33
- s(this, P, (e) => {
34
- const r = e.shiftKey ? -1 : 1;
33
+ s(this, z, (e) => {
34
+ const n = e.shiftKey ? -1 : 1;
35
35
  let a;
36
- e.code === "Space" ? a = r * t(this, c)[t(this, f)] * 0.4 : e.code === "ArrowLeft" ? a = -1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowRight" ? a = 1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowUp" ? a = -1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowDown" ? a = 1 * t(this, c)[t(this, f)] * 0.2 : e.code === "PageUp" ? a = -1 * t(this, c)[t(this, f)] : e.code === "PageDown" ? a = 1 * t(this, c)[t(this, f)] : e.code === "Home" ? a = 0 : e.code === "End" && (a = t(this, f) === "offsetWidth" ? t(this, c).scrollWidth : t(this, c).scrollHeight), a && (e.stopPropagation(), this.changeEvent.notify("keyboard", a));
36
+ e.code === "Space" ? a = n * t(this, d)[t(this, f)] * 0.4 : e.code === "ArrowLeft" ? a = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowRight" ? a = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowUp" ? a = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowDown" ? a = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "PageUp" ? a = -1 * t(this, d)[t(this, f)] : e.code === "PageDown" ? a = 1 * t(this, d)[t(this, f)] : e.code === "Home" ? a = 0 : e.code === "End" && (a = t(this, f) === "offsetWidth" ? t(this, d).scrollWidth : t(this, d).scrollHeight), a && (e.stopPropagation(), this.changeEvent.notify("keyboard", a));
37
37
  });
38
- m && (i(this, b, e != null && e.element && U(e.element) || window), i(this, c, t(this, b) instanceof HTMLElement ? t(this, b) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
38
+ m && (i(this, w, e != null && e.element && U(e.element) || window), i(this, d, t(this, w) instanceof HTMLElement ? t(this, w) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
39
39
  }
40
40
  set dimension(e) {
41
41
  i(this, f, e === "width" ? "offsetWidth" : "offsetHeight");
42
42
  }
43
43
  connect() {
44
- m && t(this, b).addEventListener(
44
+ m && t(this, w).addEventListener(
45
45
  "keydown",
46
- t(this, P)
46
+ t(this, z)
47
47
  );
48
48
  }
49
49
  disconnect() {
50
- m && t(this, b).removeEventListener(
50
+ m && t(this, w).removeEventListener(
51
51
  "keydown",
52
- t(this, P)
52
+ t(this, z)
53
53
  );
54
54
  }
55
55
  }
56
- b = new WeakMap(), c = new WeakMap(), f = new WeakMap(), P = new WeakMap();
57
- var o, y, X, Y, l, I, u, w, K, S, k, R, C;
58
- class fe extends O {
56
+ w = new WeakMap(), d = new WeakMap(), f = new WeakMap(), z = new WeakMap();
57
+ var b, y, P, X, c, k, u, o, W, S, C, Y, A;
58
+ class fe extends N {
59
59
  constructor(e) {
60
60
  super();
61
- s(this, w);
62
61
  s(this, o);
62
+ s(this, b);
63
63
  s(this, y);
64
+ s(this, P);
64
65
  s(this, X);
65
- s(this, Y);
66
- s(this, l);
67
- s(this, I);
68
- s(this, u);
66
+ s(this, c);
69
67
  s(this, k);
70
- s(this, R);
68
+ s(this, u);
71
69
  s(this, C);
72
- this.direction = 1, i(this, l, new J(0, { easing: G })), i(this, u, !1), i(this, k, (r) => {
73
- t(this, l).current !== 1 && this.changeEvent.notify(
70
+ s(this, Y);
71
+ s(this, A);
72
+ this.direction = 1, i(this, c, new J(0, { easing: G })), i(this, u, !1), i(this, C, (n) => {
73
+ t(this, c).current !== 1 && this.changeEvent.notify(
74
74
  "autoplay",
75
- r.timeBetweenFrames * t(this, o) * this.direction * (1 - t(this, l).current)
75
+ n.timeBetweenFrames * t(this, b) * this.direction * (1 - t(this, c).current)
76
76
  );
77
- }), i(this, R, () => {
78
- t(this, l).current !== 1 && this.changeEvent.notify(
77
+ }), i(this, Y, () => {
78
+ t(this, c).current !== 1 && this.changeEvent.notify(
79
79
  "autoplay",
80
- Math.sign(t(this, o)) * this.direction * (1 - t(this, l).current)
80
+ Math.sign(t(this, b)) * this.direction * (1 - t(this, c).current)
81
81
  );
82
- }), i(this, C, () => {
83
- t(this, y) && (document.hidden ? t(this, l).set(1, { equalize: !0 }) : t(this, l).set(0, { equalize: !0 }));
84
- }), i(this, o, (e == null ? void 0 : e.speed) || 1), i(this, y, (e == null ? void 0 : e.interval) || !1), i(this, X, e);
82
+ }), i(this, A, () => {
83
+ t(this, y) && (document.hidden ? t(this, c).set(1, { equalize: !0 }) : t(this, c).set(0, { equalize: !0 }));
84
+ }), i(this, b, (e == null ? void 0 : e.speed) || 1), i(this, y, (e == null ? void 0 : e.interval) || !1), i(this, P, e);
85
85
  }
86
86
  set interval(e) {
87
- i(this, y, e), t(this, u) && M(this, w, K).call(this);
87
+ i(this, y, e), t(this, u) && M(this, o, W).call(this);
88
88
  }
89
89
  set speed(e) {
90
- i(this, o, e), t(this, u) && M(this, w, K).call(this);
90
+ i(this, b, e), t(this, u) && M(this, o, W).call(this);
91
91
  }
92
92
  connect() {
93
- t(this, u) || (i(this, u, !0), M(this, w, K).call(this));
93
+ t(this, u) || (i(this, u, !0), M(this, o, W).call(this));
94
94
  }
95
95
  disconnect() {
96
- t(this, u) && (i(this, u, !1), M(this, w, S).call(this));
97
- }
98
- pauseAndContinue(e) {
99
- e && !t(this, l).target && (clearInterval(t(this, I)), t(this, l).set(1, { duration: Math.min(e, 1e3) }), i(this, I, setTimeout(() => {
100
- t(this, l).set(0, { duration: Math.min(e, 5e3) });
96
+ t(this, u) && (i(this, u, !1), M(this, o, S).call(this));
97
+ }
98
+ pauseAndContinue(e, n) {
99
+ e && (clearTimeout(t(this, k)), t(this, c).set(1, {
100
+ duration: Math.min(e, 1e3),
101
+ equalize: n
102
+ }), i(this, k, setTimeout(() => {
103
+ t(this, c).set(0, {
104
+ duration: Math.min(e, 5e3),
105
+ equalize: n
106
+ });
101
107
  }, e)));
102
108
  }
103
109
  }
104
- o = new WeakMap(), y = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), l = new WeakMap(), I = new WeakMap(), u = new WeakMap(), w = new WeakSet(), K = function() {
105
- M(this, w, S).call(this), t(this, y) ? i(this, Y, setInterval(
106
- t(this, R),
107
- Math.abs(t(this, o))
108
- )) : T.subscribe(t(this, k), t(this, X)), document.addEventListener(
110
+ b = new WeakMap(), y = new WeakMap(), P = new WeakMap(), X = new WeakMap(), c = new WeakMap(), k = new WeakMap(), u = new WeakMap(), o = new WeakSet(), W = function() {
111
+ M(this, o, S).call(this), t(this, y) ? i(this, X, setInterval(
112
+ t(this, Y),
113
+ Math.abs(t(this, b))
114
+ )) : T.subscribe(t(this, C), t(this, P)), document.addEventListener(
109
115
  "visibilitychange",
110
- t(this, C)
116
+ t(this, A)
111
117
  );
112
118
  }, S = function() {
113
- clearInterval(t(this, Y)), T.unsubscribe(t(this, k)), clearInterval(t(this, I)), t(this, l).close(), document.removeEventListener(
119
+ clearInterval(t(this, X)), T.unsubscribe(t(this, C)), clearTimeout(t(this, k)), t(this, c).close(), document.removeEventListener(
114
120
  "visibilitychange",
115
- t(this, C)
121
+ t(this, A)
116
122
  );
117
- }, k = new WeakMap(), R = new WeakMap(), C = new WeakMap();
118
- var A, v, D, W;
119
- class ue extends O {
123
+ }, C = new WeakMap(), Y = new WeakMap(), A = new WeakMap();
124
+ var I, x, D, q;
125
+ class ue extends N {
120
126
  constructor(e) {
121
127
  super();
122
- s(this, A, null);
123
- s(this, v);
128
+ s(this, I, null);
129
+ s(this, x);
124
130
  s(this, D);
125
- s(this, W, (e) => {
126
- let r = 0;
131
+ s(this, q, (e) => {
132
+ let n = 0;
127
133
  if (e.preventDefault(), !(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) * 0.5 || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY) * 0.5))
128
- if (r = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
134
+ if (n = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
129
135
  const a = Date.now();
130
- if (a - t(this, D) > 40 && (r = 100 * Math.sign(r)), i(this, D, a), Math.abs(r) < 100 || t(this, v))
136
+ if (a - t(this, D) > 40 && (n = 100 * Math.sign(n)), i(this, D, a), Math.abs(n) < 100 || t(this, x))
131
137
  return;
132
- this.changeEvent.notify("wheel", r), i(this, v, setTimeout(() => {
133
- i(this, v, void 0);
138
+ this.changeEvent.notify("wheel", n), i(this, x, setTimeout(() => {
139
+ i(this, x, void 0);
134
140
  }, 80));
135
141
  } else
136
- this.changeEvent.notify("wheel", r);
142
+ this.changeEvent.notify("wheel", n);
137
143
  });
138
- 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, D, Date.now()), m && i(this, A, e != null && e.element && U(e.element) || window);
144
+ 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, D, Date.now()), m && i(this, I, e != null && e.element && U(e.element) || window);
139
145
  }
140
146
  connect() {
141
- m && t(this, A).addEventListener(
147
+ m && t(this, I).addEventListener(
142
148
  "wheel",
143
- t(this, W),
149
+ t(this, q),
144
150
  {
145
151
  passive: !1
146
152
  }
147
153
  );
148
154
  }
149
155
  disconnect() {
150
- m && (t(this, A).removeEventListener(
156
+ m && (t(this, I).removeEventListener(
151
157
  "wheel",
152
- t(this, W)
153
- ), clearTimeout(t(this, v)));
158
+ t(this, q)
159
+ ), clearTimeout(t(this, x)));
154
160
  }
155
161
  }
156
- A = new WeakMap(), v = new WeakMap(), D = new WeakMap(), W = new WeakMap();
157
- var x, g, H, d, z, L;
158
- const E = class E extends O {
162
+ I = new WeakMap(), x = new WeakMap(), D = new WeakMap(), q = new WeakMap();
163
+ var v, g, H, l, R, L;
164
+ const E = class E extends N {
159
165
  constructor(e) {
160
166
  super();
161
167
  s(this, g, null);
162
168
  s(this, H, !1);
163
- s(this, d, 0);
164
- s(this, z, (e) => {
169
+ s(this, l, 0);
170
+ s(this, R, (e) => {
165
171
  if (e.composedPath().find(
166
172
  (a) => a instanceof HTMLElement && a.hasAttribute("drag-dead-zone")
167
173
  ))
168
174
  return;
169
175
  this.swipe || T.unsubscribe(t(this, L));
170
- let r = e;
171
- i(this, d, 0), document.documentElement.classList.add("grabbing"), Z(
176
+ let n = e;
177
+ i(this, l, 0), document.documentElement.classList.add("grabbing"), Z(
172
178
  (a) => {
173
- if (t(this, H) || t(E, x) && t(E, x) !== t(this, g))
179
+ if (t(this, H) || t(E, v) && t(E, v) !== t(this, g))
174
180
  return;
175
181
  this.swipe && i(this, H, !0);
176
- const q = r.x - a.x, B = r.y - a.y;
177
- this.axis === "x" ? i(this, d, q) : i(this, d, B), r = a, (this.axis === "x" && Math.abs(q) > Math.abs(B) || this.axis === "y" && Math.abs(B) > Math.abs(q)) && (i(E, x, t(this, g)), this.changeEvent.notify("drag", t(this, d)));
182
+ const O = n.x - a.x, B = n.y - a.y;
183
+ this.axis === "x" ? i(this, l, O) : i(this, l, B), n = a, (this.axis === "x" && Math.abs(O) > Math.abs(B) || this.axis === "y" && Math.abs(B) > Math.abs(O)) && (i(E, v, t(this, g)), this.changeEvent.notify("drag", t(this, l)));
178
184
  },
179
185
  () => {
180
- i(E, x, null), this.swipe || (i(this, d, t(this, d) * 3), T.subscribe(t(this, L), {
186
+ i(E, v, null), this.swipe || (i(this, l, t(this, l) * 3), T.subscribe(t(this, L), {
181
187
  order: p.CONTROLS - 1
182
188
  })), document.documentElement.classList.remove("grabbing"), i(this, H, !1);
183
189
  }
184
190
  );
185
191
  });
186
192
  s(this, L, () => {
187
- Math.floor(t(this, d)) || T.unsubscribe(t(this, L)), i(this, d, t(this, d) * 0.95), i(this, d, $(t(this, d), 3)), this.changeEvent.notify("drag", t(this, d));
193
+ Math.floor(t(this, l)) || T.unsubscribe(t(this, L)), i(this, l, t(this, l) * 0.95), i(this, l, $(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l));
188
194
  });
189
195
  this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this, g, e != null && e.element && U(e.element) || document.documentElement);
190
196
  }
191
197
  connect() {
192
- m && t(this, g).addEventListener("pointerdown", t(this, z));
198
+ m && t(this, g).addEventListener("pointerdown", t(this, R));
193
199
  }
194
200
  disconnect() {
195
201
  m && (t(this, g).removeEventListener(
196
202
  "pointerdown",
197
- t(this, z)
203
+ t(this, R)
198
204
  ), T.unsubscribe(t(this, L)));
199
205
  }
200
206
  };
201
- x = new WeakMap(), g = new WeakMap(), H = new WeakMap(), d = new WeakMap(), z = new WeakMap(), L = new WeakMap(), s(E, x, null);
207
+ v = new WeakMap(), g = new WeakMap(), H = new WeakMap(), l = new WeakMap(), R = new WeakMap(), L = new WeakMap(), s(E, v, null);
202
208
  let V = E;
203
209
  export {
204
210
  fe as AutoplayControls,
205
- O as Controls,
211
+ N as Controls,
206
212
  V as DragControls,
207
213
  ce as KeyboardControls,
208
214
  ue as WheelControls
@@ -1 +1 @@
1
- "use strict";var ge=Object.defineProperty;var se=Object.getOwnPropertySymbols;var ye=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var re=u=>{throw TypeError(u)};var ie=(u,n,e)=>n in u?ge(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,ne=(u,n)=>{for(var e in n||(n={}))ye.call(n,e)&&ie(u,e,n[e]);if(se)for(var e of se(n))ve.call(n,e)&&ie(u,e,n[e]);return u};var jt=(u,n,e)=>n.has(u)||re("Cannot "+e);var t=(u,n,e)=>(jt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?re("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(jt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(jt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce=require("../../Store-CDb6RMce.cjs"),Nt=require("../../browser-CpzFX2xg.cjs"),Ee=require("../../easings-DsS5-Kqc.cjs"),Gt=require("../../events-KVanG9sR.cjs"),oe=require("../../jss-GJLvaNfT.cjs"),bt=require("../../layout-8ryRAMGJ.cjs"),le=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Kt=require("../../order/index.cjs"),Pe=require("../../Damped-CTsV8tl_.cjs"),we=require("../../Tweened-BttGiyB0.cjs"),Wt=require("../../controls/index.cjs"),Ut=require("../../window-resizer/vanilla/index.cjs"),gt=require("../../scroll-entries/index.cjs"),he=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),xe=require("../../device/index.cjs"),$t=require("../../element-resizer/vanilla/index.cjs"),ze=require("../../gestures-DHLrn6Q8.cjs"),ce=require("../../dom-JBOkFLTh.cjs"),Le=require("../../function-MthRj-GJ.cjs"),ke=require("../../scroll-segment/index.cjs");var f,Rt,y,st,A,U;class De{constructor(n,e,i){s(this,f);s(this,Rt);s(this,y);s(this,st,0);s(this,A,0);s(this,U,null);h(this,f,n),h(this,Rt,e),h(this,y,i),gt.scrollEntries.register(t(this,f))}get index(){return t(this,Rt)}get size(){return t(this,st)}get position(){return t(this,A)}destroy(){gt.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,st,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?bt.getCumulativeOffsetTop(t(this,f)):bt.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,A)+t(this,st)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),gt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,st)+e,m=le.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,U)!==n&&(t(this,U)&&t(this,f).classList.remove(t(this,U)),n&&t(this,f).classList.add(n),h(this,U,n),Gt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,U)},custom:!0}))}}f=new WeakMap,Rt=new WeakMap,y=new WeakMap,st=new WeakMap,A=new WeakMap,U=new WeakMap;const qe=oe.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,it,x,M,T,k,O,$,N,D,E,rt,nt,ht,ot,yt,q,lt,j,R,G,V,K,ct,ut,at,Z,p,vt,o,It,At,v,b,z,I,J,B,C,g,Ct,Q,dt,pt,Et,_,l,qt,mt,Zt,Jt,Qt,Xt,L,Mt,ue,Pt,Tt,Yt,et,te;class Dt extends HTMLElement{constructor(){super();s(this,l);s(this,a,null);s(this,it,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,M,new S.CSSProperty(this,"--direction",0));s(this,T,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,k,new S.CSSProperty(this,"--split",!1));s(this,O,new S.CSSProperty(this,"--sectional",!1));s(this,$,new S.CSSProperty(this,"--auto-size",!1));s(this,N,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,D,new S.CSSProperty(this,"--sections-in-view",1));s(this,E,new S.CSSProperty(this,"--loop",!1));s(this,rt,new S.CSSProperty(this,"--damping",20));s(this,nt,new S.CSSProperty(this,"--mass",0));s(this,ht,new S.CSSProperty(this,"--stiffness",0));s(this,ot,new S.CSSProperty(this,"--mouse-drag",!1));s(this,yt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,q,new S.CSSProperty(this,"--autoplay",0));s(this,lt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,j,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,G,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,V,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,K,new S.CSSProperty(this,"--focus-delay",0));s(this,ct,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ut,new S.CSSProperty(this,"--disabled",!1));s(this,at,new S.CSSProperty(this,"--hibernated",!1));s(this,Z,null);s(this,p,null);s(this,vt,null);s(this,o,[]);s(this,It,0);s(this,At,0);s(this,v,0);s(this,b,0);s(this,z,0);s(this,I,null);s(this,J,null);s(this,B,null);s(this,C,null);s(this,g,new Ce.Store(0));s(this,Ct,0);s(this,Q,0);s(this,dt,!0);s(this,pt,!0);s(this,Et);s(this,_,new we.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,b)||0,i=t(this,g).current;if(h(this,It,this.vertical?bt.getCumulativeOffsetTop(this):bt.getCumulativeOffsetLeft(this)),h(this,At,this.vertical?bt.getCumulativeOffsetTop(t(this,p)):bt.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,he.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,he.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,$).current&&t(this,o).length){const r=t(this,D).current,c=(t(this,v)-t(this,z)*(r-1))/r;t(this,o).forEach(m=>{m.setSize(c)})}else t(this,o).forEach(r=>{r.setSize()});if(t(this,o).forEach(r=>{r.resize()}),t(this,T).current){h(this,b,t(this,v)*t(this,T).current);const r=t(this,b)+t(this,v);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,b,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,b,t(this,p).offsetWidth-t(this,v)));if(!t(this,E).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,b,t(this,b)+c),t(this,a).max=t(this,b)}if(t(this,E).current&&t(this,o).length){const r=t(this,o)[t(this,o).length-1],c=r.position+r.size-t(this,v),m=t(this,b)-c;h(this,Q,r.position+r.size+m)}else h(this,Q,t(this,b));if(t(this,O).current&&t(this,o).length){const r=t(this,o)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,b),{equalize:!0})});s(this,Mt,()=>{const e=this.currentScrollValue;if(h(this,Ct,Math.max(0,e-t(this,b))),t(this,o).length){let i=0;for(let r=0;r<t(this,o).length;r++){const c=t(this,o)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,g).current=i}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;gt.scrollEntries.update(this,t(this,x).current,e)});s(this,Pt,(e,i)=>{t(this,it).current&&(t(this,j).current&&(t(this,C).pauseAndContinue(t(this,lt).current),t(this,C).direction=Math.sign(i)||1),t(this,Tt).call(this,e,i))});s(this,Tt,(e,i)=>{if(t(this,M).current){if(t(this,M).current<0&&i>0)return;if(t(this,M).current>0&&i<0)return}if(t(this,_).unlistenAnimationFrame(),!t(this,q).current&&t(this,K).current&&(clearInterval(t(this,Et)),h(this,Et,setTimeout(()=>{const r=d(this,l,te).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,ct).current,easing:Ee.easeInOutExpo}})},t(this,K).current))),!(e==="drag"&&!xe.device.isMobile&&!t(this,ot).current))if(t(this,O).current){const r=Math.sign(i);t(this,o).length?this.shiftSections(r):t(this,a).shift(r*t(this,v))}else t(this,a).shift(i)});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(qe);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Z,document.createElement("div")),t(this,Z).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,vt,document.createElement("slot")),t(this,p).appendChild(t(this,vt)),t(this,Z).appendChild(t(this,p)),e.appendChild(t(this,Z))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,it)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,T)}get splitCSSProperty(){return t(this,k)}get sectionalCSSProperty(){return t(this,O)}get autoSizeCSSProperty(){return t(this,$)}get wheelMaxDeltaCSSProperty(){return t(this,N)}get sectionsInViewCSSProperty(){return t(this,D)}get loopCSSProperty(){return t(this,E)}get dampingCSSProperty(){return t(this,rt)}get massCSSProperty(){return t(this,nt)}get stiffnessCSSProperty(){return t(this,ht)}get mouseDragCSSProperty(){return t(this,ot)}get sectionDistanceScaleCSSProperty(){return t(this,yt)}get autoplayCSSProperty(){return t(this,q)}get autoplayPauseDurationCSSProperty(){return t(this,lt)}get autoplayUserDirectionCSSProperty(){return t(this,j)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,G)}get currentIndexEndOffsetCSSProperty(){return t(this,V)}get focusDelayCSSProperty(){return t(this,K)}get focusDurationCSSProperty(){return t(this,ct)}get disabledCSSProperty(){return t(this,ut)}get hibernatedCSSProperty(){return t(this,at)}get currentScrollValue(){return d(this,l,Yt).call(this,"current")}get targetScrollValue(){return d(this,l,Yt).call(this,"target")}get contentWrapperElement(){return t(this,Z)}get contentElement(){return t(this,p)}get sections(){return t(this,o)}get position(){return t(this,It)}get contentPosition(){return t(this,At)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,b)}get gap(){return t(this,z)}get counter(){return t(this,g)}get limit(){return t(this,o).length-t(this,D).current}get distance(){return t(this,Q)}get loopDistance(){return t(this,E).current?t(this,Q)+t(this,z):t(this,Q)}get overscroll(){return t(this,Ct)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,o).length)return;const r=t(this,g).current;d(this,l,ue).call(this,e);const c=t(this,o)[r],m=t(this,o)[t(this,g).current];if(c&&m){let w=0;const ft=d(this,l,te).call(this),be=ft?this.targetScrollValue-ft.position:0;t(this,E).current?t(this,g).current===0&&r===t(this,o).length-1?w=t(this,b)+t(this,v)-c.position+t(this,z):t(this,g).current===t(this,o).length-1&&r===0?w=m.position-(t(this,b)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-be,i)}}shiftSections(e,i){t(this,o).length&&this.scrollToSection(t(this,g).current+e,i)}setPosition(e,i){i!=null&&i.tween?(t(this,_).set(t(this,a).current,{equalize:!0}),t(this,_).set(e,ne({},i.tween))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){h(this,a,new Pe.Damped(0,{damping:.01,min:0,order:Kt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,I,new Wt.WheelControls({element:t(this,p)})),t(this,I).changeEvent.subscribe(t(this,Pt)),h(this,J,new Wt.KeyboardControls({element:this})),t(this,J).changeEvent.subscribe(t(this,Pt)),h(this,B,new Wt.DragControls({element:t(this,p)})),t(this,B).changeEvent.subscribe(t(this,Pt)),h(this,C,new Wt.AutoplayControls({culling:this})),t(this,C).changeEvent.subscribe(t(this,Tt)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,I).axis=t(this,N).current?"max":e,t(this,J).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,N).subscribe(e=>{t(this,I).axis=e.current?"max":t(this,x).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,k).subscribe(({current:e})=>{this.isConnected&&(e?d(this,l,qt).call(this):d(this,l,mt).call(this))}),t(this,O).subscribe(e=>{t(this,I).debounce=e.current,t(this,B).swipe=e.current,t(this,C).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,$).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,D).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,l,et).call(this))}),t(this,E).subscribe(e=>{e.current?(this.isConnected&&(t(this,o).length||(t(this,k).current=!0)),t(this,o).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Ct,0),t(this,a).max=t(this,b),t(this,a).min=0)}),t(this,rt).subscribe(e=>{t(this,a).damping=e.current}),t(this,nt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ht).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,ut).subscribe(e=>{e.current&&!e.previous?d(this,l,Zt).call(this):!e.current&&e.previous&&d(this,l,Jt).call(this)}),t(this,at).subscribe(e=>{e.current&&!e.previous?d(this,l,Qt).call(this):!e.current&&e.previous&&d(this,l,Xt).call(this)}),t(this,q).subscribe(e=>{t(this,C).speed=e.current,e.current&&!e.previous?t(this,C).connect():!e.current&&e.previous&&t(this,C).disconnect()}),t(this,j).subscribe(e=>{e.current||(t(this,C).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,l,et).call(this)}),t(this,G).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,et).call(this)}),t(this,V).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,et).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,o).length&&d(this,l,et).call(this)}),t(this,_).subscribe(e=>{t(this,_).isRunning.current&&t(this,a).set(e.current)}),t(this,it).observe(),t(this,x).observe(),t(this,M).observe(),t(this,T).observe(),t(this,k).observe(),t(this,O).observe(),t(this,$).observe(),t(this,N).observe(),t(this,D).observe(),t(this,E).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,yt).observe(),t(this,q).observe(),t(this,q).observe(),t(this,lt).observe(),t(this,j).observe(),t(this,R).observe(),t(this,G).observe(),t(this,V).observe(),t(this,K).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,at).observe(),d(this,l,Xt).call(this)}disconnectedCallback(){this.setAttribute("tabindex",""),t(this,it).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,T).unobserve(),t(this,k).unobserve(),t(this,O).unobserve(),t(this,$).unobserve(),t(this,N).unobserve(),t(this,D).unobserve(),t(this,E).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),t(this,yt).unobserve(),t(this,q).unobserve(),t(this,lt).unobserve(),t(this,j).unobserve(),t(this,R).unobserve(),t(this,G).unobserve(),t(this,V).unobserve(),t(this,K).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),d(this,l,Qt).call(this)}}a=new WeakMap,it=new WeakMap,x=new WeakMap,M=new WeakMap,T=new WeakMap,k=new WeakMap,O=new WeakMap,$=new WeakMap,N=new WeakMap,D=new WeakMap,E=new WeakMap,rt=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,yt=new WeakMap,q=new WeakMap,lt=new WeakMap,j=new WeakMap,R=new WeakMap,G=new WeakMap,V=new WeakMap,K=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,Z=new WeakMap,p=new WeakMap,vt=new WeakMap,o=new WeakMap,It=new WeakMap,At=new WeakMap,v=new WeakMap,b=new WeakMap,z=new WeakMap,I=new WeakMap,J=new WeakMap,B=new WeakMap,C=new WeakMap,g=new WeakMap,Ct=new WeakMap,Q=new WeakMap,dt=new WeakMap,pt=new WeakMap,Et=new WeakMap,_=new WeakMap,l=new WeakSet,qt=function(){d(this,l,mt).call(this),t(this,vt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,o).push(new De(e,i,this))}),t(this,p).style.transform="",Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,l,et).call(this)},mt=function(){t(this,o).forEach(e=>{e.destroy()}),h(this,o,[]),t(this,g).current=0,t(this,a).reset(),Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Zt=function(){t(this,dt)||(h(this,dt,!0),t(this,a).unsubscribe(t(this,Mt)),t(this,a).unlistenAnimationFrame(),t(this,I).disconnect(),t(this,J).disconnect(),t(this,B).disconnect(),t(this,C).disconnect(),clearInterval(t(this,Et)),t(this,_).unlistenAnimationFrame())},Jt=function(){t(this,dt)&&(h(this,dt,!1),t(this,a).subscribe(t(this,Mt)),t(this,I).connect(),t(this,J).connect(),t(this,B).connect(),t(this,q).current&&t(this,C).connect())},Qt=function(){t(this,pt)||(h(this,pt,!0),Ut.windowResizer.unsubscribe(t(this,L)),$t.elementResizer.unsubscribe(t(this,L)),t(this,a).reset(),d(this,l,Zt).call(this),t(this,p).style.transform="",t(this,k).current&&d(this,l,mt).call(this),gt.scrollEntries.unregister(this))},Xt=function(){t(this,pt)&&(h(this,pt,!1),t(this,k).current&&d(this,l,qt).call(this),gt.scrollEntries.register(this),Ut.windowResizer.subscribe(t(this,L),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,L)),d(this,l,Jt).call(this))},L=new WeakMap,Mt=new WeakMap,ue=function(e){t(this,E).current?(t(this,g).current=e%t(this,o).length,t(this,g).current=t(this,g).current<0?t(this,o).length+t(this,g).current:t(this,g).current):t(this,g).current=le.clamp(e,0,this.limit)},Pt=new WeakMap,Tt=new WeakMap,Yt=function(e="current"){if(t(this,E).current&&t(this,o).length){const i=t(this,a)[e]%(t(this,b)+t(this,v)+t(this,z));return i<0?t(this,b)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},et=function(){if(t(this,R).current&&t(this,o).length){const e=t(this,g).current+t(this,G).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,D).current+t(this,V).current;t(this,o).forEach((r,c)=>{const m=e-this.limit-1+t(this,V).current,w=e+i,ft=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+ft/2||c<=m+i?r.mark("next"):r.mark("previous")})}},te=function(){let e=null,i=1/0;for(let r=0;r<t(this,o).length;r++){const c=Math.abs(t(this,o)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,o)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Dt);var Ot;class ee extends HTMLElement{constructor(){super(...arguments);s(this,Ot,null)}get scrollElement(){return t(this,Ot)}connectedCallback(){const e=ce.findParentElement(this,Dt);e instanceof Dt?h(this,Ot,e):console.error(this,"e-scroll not found")}}Ot=new WeakMap;var X,P,H,F,wt,xt,St,Vt,Bt,_t;class ae extends ee{constructor(){super();s(this,X,null);s(this,P,null);s(this,H,!1);s(this,F,0);s(this,wt,0);s(this,xt,0);s(this,St,()=>{h(this,H,this.offsetWidth>this.offsetHeight);const e=t(this,H)?this.offsetWidth:this.offsetHeight;h(this,F,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,F,Math.max(t(this,F),30)),t(this,H)?(t(this,P).style.width=t(this,F)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,F)+"px"),h(this,wt,e-t(this,F)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Vt,()=>{h(this,xt,this.scrollElement.currentProgress*t(this,wt)),t(this,H)?t(this,P).style.transform=`translate3d(${t(this,xt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,xt)}px, 0px)`});s(this,Bt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,_t,e=>{document.documentElement.classList.add("grabbing"),ze.setupDrag(c=>{const m=t(this,H)?c.x:c.y,w=this.scrollElement.distance/t(this,wt),ft=(m-r)*w;this.scrollElement.setPosition(i+ft)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,H)?e.x:e.y});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(oe.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:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,X,document.createElement("slot")),t(this,X).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,X))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,X).assignedElements()[0]||t(this,X).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,_t)),Ut.windowResizer.subscribe(t(this,St),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,St)),this.scrollElement.onScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Bt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,_t)),Ut.windowResizer.unsubscribe(t(this,St)),$t.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Bt))}}X=new WeakMap,P=new WeakMap,H=new WeakMap,F=new WeakMap,wt=new WeakMap,xt=new WeakMap,St=new WeakMap,Vt=new WeakMap,Bt=new WeakMap,_t=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",ae);class de extends ee{constructor(){super(),Nt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class pe extends de{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",pe);class Se extends de{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Se);var W,Y,zt,Ht,Ft,Lt;class Re{constructor(n,e,i){s(this,W,null);s(this,Y,null);s(this,zt,null);s(this,Ht,null);s(this,Ft,()=>{t(this,Y).scrollToSection(t(this,zt),{behaviour:t(this,Ht)})});s(this,Lt,()=>{t(this,W).classList.toggle("current",t(this,Y).counter.current===t(this,zt))});Nt.isBrowser&&(h(this,W,document.createElement("button")),h(this,Y,n),h(this,Ht,i),h(this,zt,e),t(this,W).addEventListener("click",t(this,Ft)),t(this,Y).counter.subscribe(t(this,Lt)),t(this,Lt).call(this))}get element(){return t(this,W)}destroy(){t(this,W).removeEventListener("click",t(this,Ft)),t(this,Y).counter.unsubscribe(t(this,Lt)),t(this,W).remove()}}W=new WeakMap,Y=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Ft=new WeakMap,Lt=new WeakMap;var tt,kt;class fe extends ee{constructor(){super(...arguments);s(this,tt,[]);s(this,kt,Le.debounce(()=>{t(this,tt).forEach(e=>e.destroy()),h(this,tt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Re(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,tt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,kt)),t(this,kt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,kt)),t(this,tt).forEach(e=>e.destroy()),h(this,tt,[])}}tt=new WeakMap,kt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",fe);class me extends ke.ScrollSegmentElement{connectedCallback(){const n=ce.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",me);exports.ScrollBulletButtonsElement=fe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=me;exports.ScrollSetButtonElement=pe;exports.ScrollStepButtonElement=Se;exports.ScrollbarElement=ae;
1
+ "use strict";var ge=Object.defineProperty;var se=Object.getOwnPropertySymbols;var ye=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var re=u=>{throw TypeError(u)};var ie=(u,n,e)=>n in u?ge(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,ne=(u,n)=>{for(var e in n||(n={}))ye.call(n,e)&&ie(u,e,n[e]);if(se)for(var e of se(n))ve.call(n,e)&&ie(u,e,n[e]);return u};var jt=(u,n,e)=>n.has(u)||re("Cannot "+e);var t=(u,n,e)=>(jt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?re("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(jt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(jt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce=require("../../Store-CDb6RMce.cjs"),Nt=require("../../browser-CpzFX2xg.cjs"),Ee=require("../../easings-DsS5-Kqc.cjs"),Gt=require("../../events-KVanG9sR.cjs"),oe=require("../../jss-GJLvaNfT.cjs"),bt=require("../../layout-8ryRAMGJ.cjs"),le=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Kt=require("../../order/index.cjs"),Pe=require("../../Damped-CTsV8tl_.cjs"),we=require("../../Tweened-BttGiyB0.cjs"),Wt=require("../../controls/index.cjs"),Ut=require("../../window-resizer/vanilla/index.cjs"),gt=require("../../scroll-entries/index.cjs"),he=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),xe=require("../../device/index.cjs"),$t=require("../../element-resizer/vanilla/index.cjs"),ze=require("../../gestures-DHLrn6Q8.cjs"),ce=require("../../dom-JBOkFLTh.cjs"),Le=require("../../function-MthRj-GJ.cjs"),ke=require("../../scroll-segment/index.cjs");var f,Rt,y,st,A,U;class De{constructor(n,e,i){s(this,f);s(this,Rt);s(this,y);s(this,st,0);s(this,A,0);s(this,U,null);h(this,f,n),h(this,Rt,e),h(this,y,i),gt.scrollEntries.register(t(this,f))}get index(){return t(this,Rt)}get size(){return t(this,st)}get position(){return t(this,A)}destroy(){gt.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,st,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?bt.getCumulativeOffsetTop(t(this,f)):bt.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,A)+t(this,st)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),gt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,st)+e,m=le.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,U)!==n&&(t(this,U)&&t(this,f).classList.remove(t(this,U)),n&&t(this,f).classList.add(n),h(this,U,n),Gt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,U)},custom:!0}))}}f=new WeakMap,Rt=new WeakMap,y=new WeakMap,st=new WeakMap,A=new WeakMap,U=new WeakMap;const qe=oe.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,it,x,M,T,D,O,$,N,q,E,rt,nt,ht,ot,yt,k,lt,j,R,G,V,K,ct,ut,at,Z,p,vt,o,It,At,v,b,z,I,J,B,C,g,Ct,Q,dt,pt,Et,_,l,qt,mt,Zt,Jt,Qt,Xt,L,Mt,ue,Pt,Tt,Yt,et,te;class Dt extends HTMLElement{constructor(){super();s(this,l);s(this,a,null);s(this,it,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,M,new S.CSSProperty(this,"--direction",0));s(this,T,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,D,new S.CSSProperty(this,"--split",!1));s(this,O,new S.CSSProperty(this,"--sectional",!1));s(this,$,new S.CSSProperty(this,"--auto-size",!1));s(this,N,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,E,new S.CSSProperty(this,"--loop",!1));s(this,rt,new S.CSSProperty(this,"--damping",20));s(this,nt,new S.CSSProperty(this,"--mass",0));s(this,ht,new S.CSSProperty(this,"--stiffness",0));s(this,ot,new S.CSSProperty(this,"--mouse-drag",!1));s(this,yt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,lt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,j,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,G,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,V,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,K,new S.CSSProperty(this,"--focus-delay",0));s(this,ct,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ut,new S.CSSProperty(this,"--disabled",!1));s(this,at,new S.CSSProperty(this,"--hibernated",!1));s(this,Z,null);s(this,p,null);s(this,vt,null);s(this,o,[]);s(this,It,0);s(this,At,0);s(this,v,0);s(this,b,0);s(this,z,0);s(this,I,null);s(this,J,null);s(this,B,null);s(this,C,null);s(this,g,new Ce.Store(0));s(this,Ct,0);s(this,Q,0);s(this,dt,!0);s(this,pt,!0);s(this,Et);s(this,_,new we.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,b)||0,i=t(this,g).current;if(h(this,It,this.vertical?bt.getCumulativeOffsetTop(this):bt.getCumulativeOffsetLeft(this)),h(this,At,this.vertical?bt.getCumulativeOffsetTop(t(this,p)):bt.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,he.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,he.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,$).current&&t(this,o).length){const r=t(this,q).current,c=(t(this,v)-t(this,z)*(r-1))/r;t(this,o).forEach(m=>{m.setSize(c)})}else t(this,o).forEach(r=>{r.setSize()});if(t(this,o).forEach(r=>{r.resize()}),t(this,T).current){h(this,b,t(this,v)*t(this,T).current);const r=t(this,b)+t(this,v);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,b,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,b,t(this,p).offsetWidth-t(this,v)));if(!t(this,E).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,b,t(this,b)+c),t(this,a).max=t(this,b)}if(t(this,E).current&&t(this,o).length){const r=t(this,o)[t(this,o).length-1],c=r.position+r.size-t(this,v),m=t(this,b)-c;h(this,Q,r.position+r.size+m)}else h(this,Q,t(this,b));if(t(this,O).current&&t(this,o).length){const r=t(this,o)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,b),{equalize:!0})});s(this,Mt,()=>{const e=this.currentScrollValue;if(h(this,Ct,Math.max(0,e-t(this,b))),t(this,o).length){let i=0;for(let r=0;r<t(this,o).length;r++){const c=t(this,o)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,g).current=i}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;gt.scrollEntries.update(this,t(this,x).current,e)});s(this,Pt,(e,i)=>{t(this,it).current&&(t(this,j).current&&(t(this,C).direction=Math.sign(i)||1),t(this,k).current&&t(this,C).pauseAndContinue(t(this,lt).current,this.sectionalCSSProperty.current),t(this,Tt).call(this,e,i))});s(this,Tt,(e,i)=>{if(t(this,M).current){if(t(this,M).current<0&&i>0)return;if(t(this,M).current>0&&i<0)return}if(t(this,_).unlistenAnimationFrame(),!t(this,k).current&&t(this,K).current&&(clearInterval(t(this,Et)),h(this,Et,setTimeout(()=>{const r=d(this,l,te).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,ct).current,easing:Ee.easeInOutExpo}})},t(this,K).current))),!(e==="drag"&&!xe.device.isMobile&&!t(this,ot).current))if(t(this,O).current){const r=Math.sign(i);t(this,o).length?this.shiftSections(r):t(this,a).shift(r*t(this,v))}else t(this,a).shift(i)});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(qe);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Z,document.createElement("div")),t(this,Z).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,vt,document.createElement("slot")),t(this,p).appendChild(t(this,vt)),t(this,Z).appendChild(t(this,p)),e.appendChild(t(this,Z))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,it)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,T)}get splitCSSProperty(){return t(this,D)}get sectionalCSSProperty(){return t(this,O)}get autoSizeCSSProperty(){return t(this,$)}get wheelMaxDeltaCSSProperty(){return t(this,N)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,E)}get dampingCSSProperty(){return t(this,rt)}get massCSSProperty(){return t(this,nt)}get stiffnessCSSProperty(){return t(this,ht)}get mouseDragCSSProperty(){return t(this,ot)}get sectionDistanceScaleCSSProperty(){return t(this,yt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,lt)}get autoplayUserDirectionCSSProperty(){return t(this,j)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,G)}get currentIndexEndOffsetCSSProperty(){return t(this,V)}get focusDelayCSSProperty(){return t(this,K)}get focusDurationCSSProperty(){return t(this,ct)}get disabledCSSProperty(){return t(this,ut)}get hibernatedCSSProperty(){return t(this,at)}get currentScrollValue(){return d(this,l,Yt).call(this,"current")}get targetScrollValue(){return d(this,l,Yt).call(this,"target")}get contentWrapperElement(){return t(this,Z)}get contentElement(){return t(this,p)}get sections(){return t(this,o)}get position(){return t(this,It)}get contentPosition(){return t(this,At)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,b)}get gap(){return t(this,z)}get counter(){return t(this,g)}get limit(){return t(this,o).length-t(this,q).current}get distance(){return t(this,Q)}get loopDistance(){return t(this,E).current?t(this,Q)+t(this,z):t(this,Q)}get overscroll(){return t(this,Ct)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,o).length)return;const r=t(this,g).current;d(this,l,ue).call(this,e);const c=t(this,o)[r],m=t(this,o)[t(this,g).current];if(c&&m){let w=0;const ft=d(this,l,te).call(this),be=ft?this.targetScrollValue-ft.position:0;t(this,E).current?t(this,g).current===0&&r===t(this,o).length-1?w=t(this,b)+t(this,v)-c.position+t(this,z):t(this,g).current===t(this,o).length-1&&r===0?w=m.position-(t(this,b)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-be,i)}}shiftSections(e,i){t(this,o).length&&this.scrollToSection(t(this,g).current+e,i)}setPosition(e,i){i!=null&&i.tween?(t(this,_).set(t(this,a).current,{equalize:!0}),t(this,_).set(e,ne({},i.tween))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){h(this,a,new Pe.Damped(0,{damping:.01,min:0,order:Kt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,I,new Wt.WheelControls({element:t(this,p)})),t(this,I).changeEvent.subscribe(t(this,Pt)),h(this,J,new Wt.KeyboardControls({element:this})),t(this,J).changeEvent.subscribe(t(this,Pt)),h(this,B,new Wt.DragControls({element:t(this,p)})),t(this,B).changeEvent.subscribe(t(this,Pt)),h(this,C,new Wt.AutoplayControls({culling:this})),t(this,C).changeEvent.subscribe(t(this,Tt)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,I).axis=t(this,N).current?"max":e,t(this,J).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,N).subscribe(e=>{t(this,I).axis=e.current?"max":t(this,x).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,D).subscribe(({current:e})=>{this.isConnected&&(e?d(this,l,qt).call(this):d(this,l,mt).call(this))}),t(this,O).subscribe(e=>{t(this,I).debounce=e.current,t(this,B).swipe=e.current,t(this,C).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,$).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,l,et).call(this))}),t(this,E).subscribe(e=>{e.current?(this.isConnected&&(t(this,o).length||(t(this,D).current=!0)),t(this,o).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Ct,0),t(this,a).max=t(this,b),t(this,a).min=0)}),t(this,rt).subscribe(e=>{t(this,a).damping=e.current}),t(this,nt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ht).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,ut).subscribe(e=>{e.current&&!e.previous?d(this,l,Zt).call(this):!e.current&&e.previous&&d(this,l,Jt).call(this)}),t(this,at).subscribe(e=>{e.current&&!e.previous?d(this,l,Qt).call(this):!e.current&&e.previous&&d(this,l,Xt).call(this)}),t(this,k).subscribe(e=>{t(this,C).speed=e.current,e.current&&!e.previous?t(this,C).connect():!e.current&&e.previous&&t(this,C).disconnect()}),t(this,j).subscribe(e=>{e.current||(t(this,C).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,l,et).call(this)}),t(this,G).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,et).call(this)}),t(this,V).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,et).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,o).length&&d(this,l,et).call(this)}),t(this,_).subscribe(e=>{t(this,_).isRunning.current&&t(this,a).set(e.current)}),t(this,it).observe(),t(this,x).observe(),t(this,M).observe(),t(this,T).observe(),t(this,D).observe(),t(this,O).observe(),t(this,$).observe(),t(this,N).observe(),t(this,q).observe(),t(this,E).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,yt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,lt).observe(),t(this,j).observe(),t(this,R).observe(),t(this,G).observe(),t(this,V).observe(),t(this,K).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,at).observe(),d(this,l,Xt).call(this)}disconnectedCallback(){this.setAttribute("tabindex",""),t(this,it).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,T).unobserve(),t(this,D).unobserve(),t(this,O).unobserve(),t(this,$).unobserve(),t(this,N).unobserve(),t(this,q).unobserve(),t(this,E).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),t(this,yt).unobserve(),t(this,k).unobserve(),t(this,lt).unobserve(),t(this,j).unobserve(),t(this,R).unobserve(),t(this,G).unobserve(),t(this,V).unobserve(),t(this,K).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),d(this,l,Qt).call(this)}}a=new WeakMap,it=new WeakMap,x=new WeakMap,M=new WeakMap,T=new WeakMap,D=new WeakMap,O=new WeakMap,$=new WeakMap,N=new WeakMap,q=new WeakMap,E=new WeakMap,rt=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,yt=new WeakMap,k=new WeakMap,lt=new WeakMap,j=new WeakMap,R=new WeakMap,G=new WeakMap,V=new WeakMap,K=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,Z=new WeakMap,p=new WeakMap,vt=new WeakMap,o=new WeakMap,It=new WeakMap,At=new WeakMap,v=new WeakMap,b=new WeakMap,z=new WeakMap,I=new WeakMap,J=new WeakMap,B=new WeakMap,C=new WeakMap,g=new WeakMap,Ct=new WeakMap,Q=new WeakMap,dt=new WeakMap,pt=new WeakMap,Et=new WeakMap,_=new WeakMap,l=new WeakSet,qt=function(){d(this,l,mt).call(this),t(this,vt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,o).push(new De(e,i,this))}),t(this,p).style.transform="",Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,l,et).call(this)},mt=function(){t(this,o).forEach(e=>{e.destroy()}),h(this,o,[]),t(this,g).current=0,t(this,a).reset(),Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Zt=function(){t(this,dt)||(h(this,dt,!0),t(this,a).unsubscribe(t(this,Mt)),t(this,a).unlistenAnimationFrame(),t(this,I).disconnect(),t(this,J).disconnect(),t(this,B).disconnect(),t(this,C).disconnect(),clearInterval(t(this,Et)),t(this,_).unlistenAnimationFrame())},Jt=function(){t(this,dt)&&(h(this,dt,!1),t(this,a).subscribe(t(this,Mt)),t(this,I).connect(),t(this,J).connect(),t(this,B).connect(),t(this,k).current&&t(this,C).connect())},Qt=function(){t(this,pt)||(h(this,pt,!0),Ut.windowResizer.unsubscribe(t(this,L)),$t.elementResizer.unsubscribe(t(this,L)),t(this,a).reset(),d(this,l,Zt).call(this),t(this,p).style.transform="",t(this,D).current&&d(this,l,mt).call(this),gt.scrollEntries.unregister(this))},Xt=function(){t(this,pt)&&(h(this,pt,!1),t(this,D).current&&d(this,l,qt).call(this),gt.scrollEntries.register(this),Ut.windowResizer.subscribe(t(this,L),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,L)),d(this,l,Jt).call(this))},L=new WeakMap,Mt=new WeakMap,ue=function(e){t(this,E).current?(t(this,g).current=e%t(this,o).length,t(this,g).current=t(this,g).current<0?t(this,o).length+t(this,g).current:t(this,g).current):t(this,g).current=le.clamp(e,0,this.limit)},Pt=new WeakMap,Tt=new WeakMap,Yt=function(e="current"){if(t(this,E).current&&t(this,o).length){const i=t(this,a)[e]%(t(this,b)+t(this,v)+t(this,z));return i<0?t(this,b)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},et=function(){if(t(this,R).current&&t(this,o).length){const e=t(this,g).current+t(this,G).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,q).current+t(this,V).current;t(this,o).forEach((r,c)=>{const m=e-this.limit-1+t(this,V).current,w=e+i,ft=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+ft/2||c<=m+i?r.mark("next"):r.mark("previous")})}},te=function(){let e=null,i=1/0;for(let r=0;r<t(this,o).length;r++){const c=Math.abs(t(this,o)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,o)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Dt);var Ot;class ee extends HTMLElement{constructor(){super(...arguments);s(this,Ot,null)}get scrollElement(){return t(this,Ot)}connectedCallback(){const e=ce.findParentElement(this,Dt);e instanceof Dt?h(this,Ot,e):console.error(this,"e-scroll not found")}}Ot=new WeakMap;var X,P,H,F,wt,xt,St,Vt,Bt,_t;class ae extends ee{constructor(){super();s(this,X,null);s(this,P,null);s(this,H,!1);s(this,F,0);s(this,wt,0);s(this,xt,0);s(this,St,()=>{h(this,H,this.offsetWidth>this.offsetHeight);const e=t(this,H)?this.offsetWidth:this.offsetHeight;h(this,F,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,F,Math.max(t(this,F),30)),t(this,H)?(t(this,P).style.width=t(this,F)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,F)+"px"),h(this,wt,e-t(this,F)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Vt,()=>{h(this,xt,this.scrollElement.currentProgress*t(this,wt)),t(this,H)?t(this,P).style.transform=`translate3d(${t(this,xt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,xt)}px, 0px)`});s(this,Bt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,_t,e=>{document.documentElement.classList.add("grabbing"),ze.setupDrag(c=>{const m=t(this,H)?c.x:c.y,w=this.scrollElement.distance/t(this,wt),ft=(m-r)*w;this.scrollElement.setPosition(i+ft)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,H)?e.x:e.y});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(oe.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:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,X,document.createElement("slot")),t(this,X).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,X))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,X).assignedElements()[0]||t(this,X).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,_t)),Ut.windowResizer.subscribe(t(this,St),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,St)),this.scrollElement.onScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Bt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,_t)),Ut.windowResizer.unsubscribe(t(this,St)),$t.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Bt))}}X=new WeakMap,P=new WeakMap,H=new WeakMap,F=new WeakMap,wt=new WeakMap,xt=new WeakMap,St=new WeakMap,Vt=new WeakMap,Bt=new WeakMap,_t=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",ae);class de extends ee{constructor(){super(),Nt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class pe extends de{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",pe);class Se extends de{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Se);var W,Y,zt,Ht,Ft,Lt;class Re{constructor(n,e,i){s(this,W,null);s(this,Y,null);s(this,zt,null);s(this,Ht,null);s(this,Ft,()=>{t(this,Y).scrollToSection(t(this,zt),{behaviour:t(this,Ht)})});s(this,Lt,()=>{t(this,W).classList.toggle("current",t(this,Y).counter.current===t(this,zt))});Nt.isBrowser&&(h(this,W,document.createElement("button")),h(this,Y,n),h(this,Ht,i),h(this,zt,e),t(this,W).addEventListener("click",t(this,Ft)),t(this,Y).counter.subscribe(t(this,Lt)),t(this,Lt).call(this))}get element(){return t(this,W)}destroy(){t(this,W).removeEventListener("click",t(this,Ft)),t(this,Y).counter.unsubscribe(t(this,Lt)),t(this,W).remove()}}W=new WeakMap,Y=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Ft=new WeakMap,Lt=new WeakMap;var tt,kt;class fe extends ee{constructor(){super(...arguments);s(this,tt,[]);s(this,kt,Le.debounce(()=>{t(this,tt).forEach(e=>e.destroy()),h(this,tt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Re(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,tt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,kt)),t(this,kt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,kt)),t(this,tt).forEach(e=>e.destroy()),h(this,tt,[])}}tt=new WeakMap,kt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",fe);class me extends ke.ScrollSegmentElement{connectedCallback(){const n=ce.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",me);exports.ScrollBulletButtonsElement=fe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=me;exports.ScrollSetButtonElement=pe;exports.ScrollStepButtonElement=Se;exports.ScrollbarElement=ae;
@@ -125,7 +125,7 @@ const Ae = he({
125
125
  flexShrink: "0"
126
126
  }
127
127
  });
128
- var u, it, P, V, R, k, H, U, G, D, E, rt, nt, ht, ot, gt, A, lt, K, I, _, O, Z, ct, at, ut, j, p, vt, o, It, Mt, y, S, L, M, J, B, C, g, yt, Q, dt, pt, Ct, F, l, kt, bt, Zt, jt, Jt, Qt, z, Tt, ae, Et, Vt, Xt, et, Yt;
128
+ var u, it, P, V, R, D, H, U, G, A, E, rt, nt, ht, ot, gt, k, lt, K, I, _, O, Z, ct, at, ut, j, p, vt, o, It, Mt, y, S, L, M, J, B, C, g, yt, Q, dt, pt, Ct, F, l, kt, bt, Zt, jt, Jt, Qt, z, Tt, ae, Et, Vt, Xt, et, Yt;
129
129
  class Dt extends HTMLElement {
130
130
  constructor() {
131
131
  super();
@@ -137,7 +137,7 @@ class Dt extends HTMLElement {
137
137
  s(this, R, new m(this, "--pages", 0, {
138
138
  validate: (e) => Math.max(0, e - 1)
139
139
  }));
140
- s(this, k, new m(this, "--split", !1));
140
+ s(this, D, new m(this, "--split", !1));
141
141
  s(this, H, new m(this, "--sectional", !1));
142
142
  s(this, U, new m(this, "--auto-size", !1));
143
143
  s(this, G, new m(
@@ -145,7 +145,7 @@ class Dt extends HTMLElement {
145
145
  "--wheel-max-delta",
146
146
  !1
147
147
  ));
148
- s(this, D, new m(
148
+ s(this, A, new m(
149
149
  this,
150
150
  "--sections-in-view",
151
151
  1
@@ -160,7 +160,7 @@ class Dt extends HTMLElement {
160
160
  "--section-distance-scale",
161
161
  0.5
162
162
  ));
163
- s(this, A, new m(this, "--autoplay", 0));
163
+ s(this, k, new m(this, "--autoplay", 0));
164
164
  s(this, lt, new m(
165
165
  this,
166
166
  "--autoplay-pause-duration",
@@ -218,7 +218,7 @@ class Dt extends HTMLElement {
218
218
  )) : h(this, L, ne.parse(
219
219
  getComputedStyle(t(this, p)).columnGap
220
220
  )), t(this, U).current && t(this, o).length) {
221
- const r = t(this, D).current, c = (t(this, y) - t(this, L) * (r - 1)) / r;
221
+ const r = t(this, A).current, c = (t(this, y) - t(this, L) * (r - 1)) / r;
222
222
  t(this, o).forEach((b) => {
223
223
  b.setSize(c);
224
224
  });
@@ -271,9 +271,10 @@ class Dt extends HTMLElement {
271
271
  );
272
272
  });
273
273
  s(this, Et, (e, i) => {
274
- t(this, it).current && (t(this, K).current && (t(this, C).pauseAndContinue(
275
- t(this, lt).current
276
- ), t(this, C).direction = Math.sign(i) || 1), t(this, Vt).call(this, e, i));
274
+ t(this, it).current && (t(this, K).current && (t(this, C).direction = Math.sign(i) || 1), t(this, k).current && t(this, C).pauseAndContinue(
275
+ t(this, lt).current,
276
+ this.sectionalCSSProperty.current
277
+ ), t(this, Vt).call(this, e, i));
277
278
  });
278
279
  s(this, Vt, (e, i) => {
279
280
  if (t(this, V).current) {
@@ -282,7 +283,7 @@ class Dt extends HTMLElement {
282
283
  if (t(this, V).current > 0 && i < 0)
283
284
  return;
284
285
  }
285
- if (t(this, F).unlistenAnimationFrame(), !t(this, A).current && t(this, Z).current && (clearInterval(t(this, Ct)), h(this, Ct, setTimeout(() => {
286
+ if (t(this, F).unlistenAnimationFrame(), !t(this, k).current && t(this, Z).current && (clearInterval(t(this, Ct)), h(this, Ct, setTimeout(() => {
286
287
  const r = d(this, l, Yt).call(this);
287
288
  r && this.scrollToSection(r.index, {
288
289
  tween: {
@@ -320,7 +321,7 @@ class Dt extends HTMLElement {
320
321
  return t(this, R);
321
322
  }
322
323
  get splitCSSProperty() {
323
- return t(this, k);
324
+ return t(this, D);
324
325
  }
325
326
  get sectionalCSSProperty() {
326
327
  return t(this, H);
@@ -332,7 +333,7 @@ class Dt extends HTMLElement {
332
333
  return t(this, G);
333
334
  }
334
335
  get sectionsInViewCSSProperty() {
335
- return t(this, D);
336
+ return t(this, A);
336
337
  }
337
338
  get loopCSSProperty() {
338
339
  return t(this, E);
@@ -353,7 +354,7 @@ class Dt extends HTMLElement {
353
354
  return t(this, gt);
354
355
  }
355
356
  get autoplayCSSProperty() {
356
- return t(this, A);
357
+ return t(this, k);
357
358
  }
358
359
  get autoplayPauseDurationCSSProperty() {
359
360
  return t(this, lt);
@@ -416,7 +417,7 @@ class Dt extends HTMLElement {
416
417
  return t(this, g);
417
418
  }
418
419
  get limit() {
419
- return t(this, o).length - t(this, D).current;
420
+ return t(this, o).length - t(this, A).current;
420
421
  }
421
422
  get distance() {
422
423
  return t(this, Q);
@@ -500,16 +501,16 @@ class Dt extends HTMLElement {
500
501
  t(this, M).axis = e.current ? "max" : t(this, P).current;
501
502
  }), t(this, R).subscribe(() => {
502
503
  this.isConnected && t(this, z).call(this);
503
- }), t(this, k).subscribe(({ current: e }) => {
504
+ }), t(this, D).subscribe(({ current: e }) => {
504
505
  this.isConnected && (e ? d(this, l, kt).call(this) : d(this, l, bt).call(this));
505
506
  }), t(this, H).subscribe((e) => {
506
507
  t(this, M).debounce = e.current, t(this, B).swipe = e.current, t(this, C).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, o).length ? d(this, l, kt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, bt).call(this));
507
508
  }), t(this, U).subscribe((e) => {
508
509
  this.isConnected && (t(this, z).call(this), e.current && !e.previous && !t(this, o).length ? d(this, l, kt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, bt).call(this));
509
- }), t(this, D).subscribe((e) => {
510
+ }), t(this, A).subscribe((e) => {
510
511
  this.isConnected && (t(this, z).call(this), d(this, l, et).call(this));
511
512
  }), t(this, E).subscribe((e) => {
512
- e.current ? (this.isConnected && (t(this, o).length || (t(this, k).current = !0)), t(this, o).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (h(this, yt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
513
+ e.current ? (this.isConnected && (t(this, o).length || (t(this, D).current = !0)), t(this, o).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (h(this, yt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
513
514
  }), t(this, rt).subscribe((e) => {
514
515
  t(this, u).damping = e.current;
515
516
  }), t(this, nt).subscribe((e) => {
@@ -520,7 +521,7 @@ class Dt extends HTMLElement {
520
521
  e.current && !e.previous ? d(this, l, Zt).call(this) : !e.current && e.previous && d(this, l, jt).call(this);
521
522
  }), t(this, ut).subscribe((e) => {
522
523
  e.current && !e.previous ? d(this, l, Jt).call(this) : !e.current && e.previous && d(this, l, Qt).call(this);
523
- }), t(this, A).subscribe((e) => {
524
+ }), t(this, k).subscribe((e) => {
524
525
  t(this, C).speed = e.current, e.current && !e.previous ? t(this, C).connect() : !e.current && e.previous && t(this, C).disconnect();
525
526
  }), t(this, K).subscribe((e) => {
526
527
  e.current || (t(this, C).direction = 1);
@@ -536,13 +537,13 @@ class Dt extends HTMLElement {
536
537
  t(this, o).length && d(this, l, et).call(this);
537
538
  }), t(this, F).subscribe((e) => {
538
539
  t(this, F).isRunning.current && t(this, u).set(e.current);
539
- }), t(this, it).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, k).observe(), t(this, H).observe(), t(this, U).observe(), t(this, G).observe(), t(this, D).observe(), t(this, E).observe(), t(this, rt).observe(), t(this, nt).observe(), t(this, ht).observe(), t(this, ot).observe(), t(this, gt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, lt).observe(), t(this, K).observe(), t(this, I).observe(), t(this, _).observe(), t(this, O).observe(), t(this, Z).observe(), t(this, ct).observe(), t(this, at).observe(), t(this, ut).observe(), d(this, l, Qt).call(this);
540
+ }), t(this, it).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, D).observe(), t(this, H).observe(), t(this, U).observe(), t(this, G).observe(), t(this, A).observe(), t(this, E).observe(), t(this, rt).observe(), t(this, nt).observe(), t(this, ht).observe(), t(this, ot).observe(), t(this, gt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, lt).observe(), t(this, K).observe(), t(this, I).observe(), t(this, _).observe(), t(this, O).observe(), t(this, Z).observe(), t(this, ct).observe(), t(this, at).observe(), t(this, ut).observe(), d(this, l, Qt).call(this);
540
541
  }
541
542
  disconnectedCallback() {
542
- this.setAttribute("tabindex", ""), t(this, it).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, k).unobserve(), t(this, H).unobserve(), t(this, U).unobserve(), t(this, G).unobserve(), t(this, D).unobserve(), t(this, E).unobserve(), t(this, rt).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), t(this, gt).unobserve(), t(this, A).unobserve(), t(this, lt).unobserve(), t(this, K).unobserve(), t(this, I).unobserve(), t(this, _).unobserve(), t(this, O).unobserve(), t(this, Z).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), t(this, ut).unobserve(), d(this, l, Jt).call(this);
543
+ this.setAttribute("tabindex", ""), t(this, it).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, D).unobserve(), t(this, H).unobserve(), t(this, U).unobserve(), t(this, G).unobserve(), t(this, A).unobserve(), t(this, E).unobserve(), t(this, rt).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), t(this, gt).unobserve(), t(this, k).unobserve(), t(this, lt).unobserve(), t(this, K).unobserve(), t(this, I).unobserve(), t(this, _).unobserve(), t(this, O).unobserve(), t(this, Z).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), t(this, ut).unobserve(), d(this, l, Jt).call(this);
543
544
  }
544
545
  }
545
- u = new WeakMap(), it = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), k = new WeakMap(), H = new WeakMap(), U = new WeakMap(), G = new WeakMap(), D = new WeakMap(), E = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), A = new WeakMap(), lt = new WeakMap(), K = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), j = new WeakMap(), p = new WeakMap(), vt = new WeakMap(), o = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), M = new WeakMap(), J = new WeakMap(), B = new WeakMap(), C = new WeakMap(), g = new WeakMap(), yt = new WeakMap(), Q = new WeakMap(), dt = new WeakMap(), pt = new WeakMap(), Ct = new WeakMap(), F = new WeakMap(), l = new WeakSet(), kt = function() {
546
+ u = new WeakMap(), it = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), D = new WeakMap(), H = new WeakMap(), U = new WeakMap(), G = new WeakMap(), A = new WeakMap(), E = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), k = new WeakMap(), lt = new WeakMap(), K = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), j = new WeakMap(), p = new WeakMap(), vt = new WeakMap(), o = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), M = new WeakMap(), J = new WeakMap(), B = new WeakMap(), C = new WeakMap(), g = new WeakMap(), yt = new WeakMap(), Q = new WeakMap(), dt = new WeakMap(), pt = new WeakMap(), Ct = new WeakMap(), F = new WeakMap(), l = new WeakSet(), kt = function() {
546
547
  d(this, l, bt).call(this), t(this, vt).assignedElements().forEach((e, i) => {
547
548
  e instanceof HTMLElement && t(this, o).push(new De(e, i, this));
548
549
  }), t(this, p).style.transform = "", Gt(this, "scrollSectionsChange", {
@@ -559,11 +560,11 @@ u = new WeakMap(), it = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
559
560
  }, Zt = function() {
560
561
  t(this, dt) || (h(this, dt, !0), t(this, u).unsubscribe(t(this, Tt)), t(this, u).unlistenAnimationFrame(), t(this, M).disconnect(), t(this, J).disconnect(), t(this, B).disconnect(), t(this, C).disconnect(), clearInterval(t(this, Ct)), t(this, F).unlistenAnimationFrame());
561
562
  }, jt = function() {
562
- t(this, dt) && (h(this, dt, !1), t(this, u).subscribe(t(this, Tt)), t(this, M).connect(), t(this, J).connect(), t(this, B).connect(), t(this, A).current && t(this, C).connect());
563
+ t(this, dt) && (h(this, dt, !1), t(this, u).subscribe(t(this, Tt)), t(this, M).connect(), t(this, J).connect(), t(this, B).connect(), t(this, k).current && t(this, C).connect());
563
564
  }, Jt = function() {
564
- t(this, pt) || (h(this, pt, !0), $t.unsubscribe(t(this, z)), Nt.unsubscribe(t(this, z)), t(this, u).reset(), d(this, l, Zt).call(this), t(this, p).style.transform = "", t(this, k).current && d(this, l, bt).call(this), St.unregister(this));
565
+ t(this, pt) || (h(this, pt, !0), $t.unsubscribe(t(this, z)), Nt.unsubscribe(t(this, z)), t(this, u).reset(), d(this, l, Zt).call(this), t(this, p).style.transform = "", t(this, D).current && d(this, l, bt).call(this), St.unregister(this));
565
566
  }, Qt = function() {
566
- t(this, pt) && (h(this, pt, !1), t(this, k).current && d(this, l, kt).call(this), St.register(this), $t.subscribe(t(this, z), le.SCROLL), Nt.subscribe(this, t(this, z)), d(this, l, jt).call(this));
567
+ t(this, pt) && (h(this, pt, !1), t(this, D).current && d(this, l, kt).call(this), St.register(this), $t.subscribe(t(this, z), le.SCROLL), Nt.subscribe(this, t(this, z)), d(this, l, jt).call(this));
567
568
  }, z = new WeakMap(), Tt = new WeakMap(), ae = function(e) {
568
569
  t(this, E).current ? (t(this, g).current = e % t(this, o).length, t(this, g).current = t(this, g).current < 0 ? t(this, o).length + t(this, g).current : t(this, g).current) : t(this, g).current = oe(e, 0, this.limit);
569
570
  }, Et = new WeakMap(), Vt = new WeakMap(), Xt = function(e = "current") {
@@ -576,7 +577,7 @@ u = new WeakMap(), it = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
576
577
  if (t(this, I).current && t(this, o).length) {
577
578
  const e = t(this, g).current + t(this, _).current;
578
579
  e === 0 ? this.classList.add("start") : this.classList.remove("start"), e === this.limit ? this.classList.add("end") : this.classList.remove("end");
579
- const i = t(this, D).current + t(this, O).current;
580
+ const i = t(this, A).current + t(this, O).current;
580
581
  t(this, o).forEach((r, c) => {
581
582
  const b = e - this.limit - 1 + t(this, O).current, w = e + i, ft = this.sections.length - w;
582
583
  c >= e && c < w || c <= b ? r.mark("current") : c >= w && c < w + ft / 2 || c <= b + i ? r.mark("next") : r.mark("previous");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.30.5",
3
+ "version": "0.30.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"