aptechka 0.8.2 → 0.8.4

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.
@@ -1 +1 @@
1
- "use strict";var S=(i,s,t)=>{if(!s.has(i))throw TypeError("Cannot "+t)};var e=(i,s,t)=>(S(i,s,"read from private field"),t?t.call(i):s.get(i)),a=(i,s,t)=>{if(s.has(i))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(i):s.set(i,t)},h=(i,s,t,n)=>(S(i,s,"write to private field"),n?n.call(i,t):s.set(i,t),t);var C=(i,s,t)=>(S(i,s,"access private method"),t);const M=require("./Store-Cr3VaD9G.cjs"),z=require("./math-GDWEqu7y.cjs"),m=require("./polyfills-CM4SCDTt.cjs"),I=require("./ticker/index.cjs"),N=require("./order/index.cjs");var d,f,A,c,b,r,u,l,g,F,q,P,x;class O extends M.Store{constructor(t,n){super(t||0,n);a(this,q);a(this,d,void 0);a(this,f,N.TICK_ORDER.ANIMATION);a(this,A,void 0);a(this,c,new M.Store(!1));a(this,b,0);a(this,r,0);a(this,u,-1/0);a(this,l,1/0);a(this,g,0);a(this,F,null);a(this,x,t=>{this.handleAnimationFrame(t)});h(this,r,this.current)}get direction(){return e(this,b)}get target(){return e(this,r)}get min(){return e(this,u)}set min(t){h(this,u,t),this.set(e(this,r),{equalize:!0})}get max(){return e(this,l)}set max(t){h(this,l,t),this.set(e(this,r),{equalize:!0})}get from(){return e(this,g)}get isRunning(){return e(this,c)}get delta(){return Math.abs(e(this,r)-e(this,g))}get deltaProgress(){return this.delta?m.preciseNumber(Math.abs(this.current-e(this,g))/this.delta,6):0}get distance(){return Math.abs(e(this,l)-e(this,u))}get distanceProgress(){return this.distance?m.preciseNumber(Math.abs(this.current-e(this,u))/this.distance,6):0}set(t,n){(e(this,r)!==t||n!=null&&n.restart)&&(h(this,F,t),this.updateOptions(n),h(this,F,null),e(this,r)!==this.current&&this.start())}shift(t,n){this.set(e(this,r)+t,n)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){e(this,c).current||(e(this,c).current=!0,I.ticker.subscribe(e(this,x),{maxFPS:e(this,d),order:e(this,f),culling:e(this,A)}))}unlistenAnimationFrame(){e(this,c).current&&(e(this,c).current=!1,I.ticker.unsubscribe(e(this,x)))}updateOptions(t){h(this,d,m.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,d))),h(this,f,m.nullishCoalescing(t==null?void 0:t.order,e(this,f))),h(this,A,m.nullishCoalescing(t==null?void 0:t.culling,e(this,A))),h(this,u,m.nullishCoalescing(t==null?void 0:t.min,e(this,u))),h(this,l,m.nullishCoalescing(t==null?void 0:t.max,e(this,l))),C(this,q,P).call(this,e(this,F)||e(this,r)),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=e(this,r)),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=this.initial)}start(){this.listenAnimationFrame()}}d=new WeakMap,f=new WeakMap,A=new WeakMap,c=new WeakMap,b=new WeakMap,r=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,F=new WeakMap,q=new WeakSet,P=function(t){h(this,b,Math.sign(t-e(this,r))),h(this,r,z.clamp(t,e(this,u),e(this,l))),h(this,g,this.current)},x=new WeakMap;exports.Animation=O;
1
+ "use strict";var S=(i,s,t)=>{if(!s.has(i))throw TypeError("Cannot "+t)};var e=(i,s,t)=>(S(i,s,"read from private field"),t?t.call(i):s.get(i)),a=(i,s,t)=>{if(s.has(i))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(i):s.set(i,t)},h=(i,s,t,n)=>(S(i,s,"write to private field"),n?n.call(i,t):s.set(i,t),t);var C=(i,s,t)=>(S(i,s,"access private method"),t);const M=require("./Store-Cr3VaD9G.cjs"),y=require("./math-GDWEqu7y.cjs"),m=require("./polyfills-CM4SCDTt.cjs"),I=require("./ticker/index.cjs"),z=require("./order/index.cjs");var f,b,A,c,F,r,u,l,g,d,q,P,x;class N extends M.Store{constructor(t,n){super(t||0,n);a(this,q);a(this,f,void 0);a(this,b,z.TICK_ORDER.ANIMATION);a(this,A,void 0);a(this,c,new M.Store(!1));a(this,F,0);a(this,r,0);a(this,u,-1/0);a(this,l,1/0);a(this,g,0);a(this,d,null);a(this,x,t=>{this.handleAnimationFrame(t)});h(this,r,this.current)}get direction(){return e(this,F)}get target(){return e(this,r)}get min(){return e(this,u)}set min(t){h(this,u,t),this.set(e(this,r),{equalize:!0})}get max(){return e(this,l)}set max(t){h(this,l,t),this.set(e(this,r),{equalize:!0})}get from(){return e(this,g)}get isRunning(){return e(this,c)}get delta(){return Math.abs(e(this,r)-e(this,g))}get deltaProgress(){return this.delta?m.preciseNumber(Math.abs(this.current-e(this,g))/this.delta,6):0}get distance(){return Math.abs(e(this,l)-e(this,u))}get distanceProgress(){return this.distance?m.preciseNumber(Math.abs(this.current-e(this,u))/this.distance,6):0}set(t,n){(e(this,r)!==t||n!=null&&n.restart)&&(h(this,d,t),this.updateOptions(n),h(this,d,null),e(this,r)!==this.current&&this.start())}shift(t,n){this.set(e(this,r)+t,n)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){e(this,c).current||(e(this,c).current=!0,I.ticker.subscribe(e(this,x),{maxFPS:e(this,f),order:e(this,b),culling:e(this,A)}))}unlistenAnimationFrame(){e(this,c).current&&(e(this,c).current=!1,I.ticker.unsubscribe(e(this,x)))}updateOptions(t){h(this,f,m.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,f))),h(this,b,m.nullishCoalescing(t==null?void 0:t.order,e(this,b))),h(this,A,m.nullishCoalescing(t==null?void 0:t.culling,e(this,A))),h(this,u,m.nullishCoalescing(t==null?void 0:t.min,e(this,u))),h(this,l,m.nullishCoalescing(t==null?void 0:t.max,e(this,l))),C(this,q,P).call(this,typeof e(this,d)=="number"?e(this,d):e(this,r)),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=e(this,r)),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=this.initial)}start(){this.listenAnimationFrame()}}f=new WeakMap,b=new WeakMap,A=new WeakMap,c=new WeakMap,F=new WeakMap,r=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,d=new WeakMap,q=new WeakSet,P=function(t){h(this,F,Math.sign(t-e(this,r))),h(this,r,y.clamp(t,e(this,u),e(this,l))),h(this,g,this.current)},x=new WeakMap;exports.Animation=N;
@@ -0,0 +1,110 @@
1
+ var S = (i, r, t) => {
2
+ if (!r.has(i))
3
+ throw TypeError("Cannot " + t);
4
+ };
5
+ var e = (i, r, t) => (S(i, r, "read from private field"), t ? t.call(i) : r.get(i)), a = (i, r, t) => {
6
+ if (r.has(i))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ r instanceof WeakSet ? r.add(i) : r.set(i, t);
9
+ }, h = (i, r, t, u) => (S(i, r, "write to private field"), u ? u.call(i, t) : r.set(i, t), t);
10
+ var I = (i, r, t) => (S(i, r, "access private method"), t);
11
+ import { S as P } from "./Store-Qr3SNOSf.js";
12
+ import { c as R } from "./math-BOBiC4TN.js";
13
+ import { p as q, n as F } from "./polyfills-X6KXuHg-.js";
14
+ import { ticker as z } from "./ticker/index.js";
15
+ import { TICK_ORDER as y } from "./order/index.js";
16
+ var f, d, A, l, b, s, n, m, c, g, M, O, x;
17
+ class E extends P {
18
+ constructor(t, u) {
19
+ super(t || 0, u);
20
+ a(this, M);
21
+ a(this, f, void 0);
22
+ a(this, d, y.ANIMATION);
23
+ a(this, A, void 0);
24
+ a(this, l, new P(!1));
25
+ a(this, b, 0);
26
+ a(this, s, 0);
27
+ a(this, n, -1 / 0);
28
+ a(this, m, 1 / 0);
29
+ a(this, c, 0);
30
+ a(this, g, null);
31
+ a(this, x, (t) => {
32
+ this.handleAnimationFrame(t);
33
+ });
34
+ h(this, s, this.current);
35
+ }
36
+ get direction() {
37
+ return e(this, b);
38
+ }
39
+ get target() {
40
+ return e(this, s);
41
+ }
42
+ get min() {
43
+ return e(this, n);
44
+ }
45
+ set min(t) {
46
+ h(this, n, t), this.set(e(this, s), {
47
+ equalize: !0
48
+ });
49
+ }
50
+ get max() {
51
+ return e(this, m);
52
+ }
53
+ set max(t) {
54
+ h(this, m, t), this.set(e(this, s), {
55
+ equalize: !0
56
+ });
57
+ }
58
+ get from() {
59
+ return e(this, c);
60
+ }
61
+ get isRunning() {
62
+ return e(this, l);
63
+ }
64
+ get delta() {
65
+ return Math.abs(e(this, s) - e(this, c));
66
+ }
67
+ get deltaProgress() {
68
+ return this.delta ? q(Math.abs(this.current - e(this, c)) / this.delta, 6) : 0;
69
+ }
70
+ get distance() {
71
+ return Math.abs(e(this, m) - e(this, n));
72
+ }
73
+ get distanceProgress() {
74
+ return this.distance ? q(Math.abs(this.current - e(this, n)) / this.distance, 6) : 0;
75
+ }
76
+ set(t, u) {
77
+ (e(this, s) !== t || u != null && u.restart) && (h(this, g, t), this.updateOptions(u), h(this, g, null), e(this, s) !== this.current && this.start());
78
+ }
79
+ shift(t, u) {
80
+ this.set(e(this, s) + t, u);
81
+ }
82
+ reset() {
83
+ super.reset(), this.set(this.initial, { equalize: !0 });
84
+ }
85
+ close() {
86
+ super.close(), this.reset(), this.unlistenAnimationFrame();
87
+ }
88
+ listenAnimationFrame() {
89
+ e(this, l).current || (e(this, l).current = !0, z.subscribe(e(this, x), {
90
+ maxFPS: e(this, f),
91
+ order: e(this, d),
92
+ culling: e(this, A)
93
+ }));
94
+ }
95
+ unlistenAnimationFrame() {
96
+ e(this, l).current && (e(this, l).current = !1, z.unsubscribe(e(this, x)));
97
+ }
98
+ updateOptions(t) {
99
+ h(this, f, F(t == null ? void 0 : t.maxFPS, e(this, f))), h(this, d, F(t == null ? void 0 : t.order, e(this, d))), h(this, A, F(t == null ? void 0 : t.culling, e(this, A))), h(this, n, F(t == null ? void 0 : t.min, e(this, n))), h(this, m, F(t == null ? void 0 : t.max, e(this, m))), I(this, M, O).call(this, typeof e(this, g) == "number" ? e(this, g) : e(this, s)), t != null && t.equalize && (this.unlistenAnimationFrame(), this.current = e(this, s)), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = this.initial);
100
+ }
101
+ start() {
102
+ this.listenAnimationFrame();
103
+ }
104
+ }
105
+ f = new WeakMap(), d = new WeakMap(), A = new WeakMap(), l = new WeakMap(), b = new WeakMap(), s = new WeakMap(), n = new WeakMap(), m = new WeakMap(), c = new WeakMap(), g = new WeakMap(), M = new WeakSet(), O = function(t) {
106
+ h(this, b, Math.sign(t - e(this, s))), h(this, s, R(t, e(this, n), e(this, m))), h(this, c, this.current);
107
+ }, x = new WeakMap();
108
+ export {
109
+ E as A
110
+ };
@@ -1 +1 @@
1
- "use strict";var F=Object.defineProperty,b=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var d=(e,t,s)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,g=(e,t)=>{for(var s in t||(t={}))C.call(t,s)&&d(e,s,t[s]);if(l)for(var s of l(t))O.call(t,s)&&d(e,s,t[s]);return e},f=(e,t)=>b(e,y(t));var p=(e,t,s)=>{if(!t.has(e))throw TypeError("Cannot "+s)};var a=(e,t,s)=>(p(e,t,"read from private field"),s?s.call(e):t.get(e)),u=(e,t,s)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,s)},n=(e,t,s,r)=>(p(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s);const v=require("./math-GDWEqu7y.cjs"),c=require("./polyfills-CM4SCDTt.cjs"),w=require("./Animation-BvXqY0d7.cjs");var i,h;class B extends w.Animation{constructor(s,r){super(s,r);u(this,i,void 0);u(this,h,void 0);this.damping=20,this.stiffness=0,this.mass=0,n(this,i,0),n(this,h,0),this.updateOptions(f(g({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,h)}updateOptions(s){this.damping=c.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=c.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=c.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){c.preciseNumber(this.current,4)===c.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,q=Math.abs(r-this.target);n(this,h,q/s.timeBetweenFrames);const m=s.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const A=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;n(this,i,a(this,i)+A/this.mass*m),this.current+=a(this,i)*m}else this.current=v.damp(this.current,this.target,this.damping,m)}}i=new WeakMap,h=new WeakMap;exports.Damped=B;
1
+ "use strict";var F=Object.defineProperty,b=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var d=(e,t,s)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,g=(e,t)=>{for(var s in t||(t={}))C.call(t,s)&&d(e,s,t[s]);if(l)for(var s of l(t))O.call(t,s)&&d(e,s,t[s]);return e},f=(e,t)=>b(e,y(t));var p=(e,t,s)=>{if(!t.has(e))throw TypeError("Cannot "+s)};var a=(e,t,s)=>(p(e,t,"read from private field"),s?s.call(e):t.get(e)),u=(e,t,s)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,s)},n=(e,t,s,r)=>(p(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s);const v=require("./math-GDWEqu7y.cjs"),c=require("./polyfills-CM4SCDTt.cjs"),w=require("./Animation-BInSRYNr.cjs");var i,h;class B extends w.Animation{constructor(s,r){super(s,r);u(this,i,void 0);u(this,h,void 0);this.damping=20,this.stiffness=0,this.mass=0,n(this,i,0),n(this,h,0),this.updateOptions(f(g({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,h)}updateOptions(s){this.damping=c.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=c.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=c.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){c.preciseNumber(this.current,6)===c.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,q=Math.abs(r-this.target);n(this,h,q/s.timeBetweenFrames);const m=s.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const A=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;n(this,i,a(this,i)+A/this.mass*m),this.current+=a(this,i)*m}else this.current=v.damp(this.current,this.target,this.damping,m)}}i=new WeakMap,h=new WeakMap;exports.Damped=B;
@@ -21,7 +21,7 @@ var a = (e, s, t) => (p(e, s, "read from private field"), t ? t.call(e) : s.get(
21
21
  }, m = (e, s, t, r) => (p(e, s, "write to private field"), r ? r.call(e, t) : s.set(e, t), t);
22
22
  import { d as B } from "./math-BOBiC4TN.js";
23
23
  import { n as u, p as A } from "./polyfills-X6KXuHg-.js";
24
- import { A as D } from "./Animation-VTp4qBgU.js";
24
+ import { A as D } from "./Animation-uimN7sdT.js";
25
25
  var i, h;
26
26
  class N extends D {
27
27
  constructor(t, r) {
@@ -40,7 +40,7 @@ class N extends D {
40
40
  this.damping = u(t == null ? void 0 : t.damping, this.damping), this.mass = u(t == null ? void 0 : t.mass, this.mass), this.stiffness = u(t == null ? void 0 : t.stiffness, this.stiffness), super.updateOptions(t);
41
41
  }
42
42
  handleAnimationFrame(t) {
43
- A(this.current, 4) === A(this.target, 4) && (this.unlistenAnimationFrame(), this.current = this.target);
43
+ A(this.current, 6) === A(this.target, 6) && (this.unlistenAnimationFrame(), this.current = this.target);
44
44
  const r = this.current, F = Math.abs(r - this.target);
45
45
  m(this, h, F / t.timeBetweenFrames);
46
46
  const n = t.timeBetweenFrames / 1e3;
@@ -22,7 +22,7 @@ var n = (i, e, t) => (f(i, e, "read from private field"), t ? t.call(i) : e.get(
22
22
  import { l as x } from "./easings-BKi40vHz.js";
23
23
  import { c as S } from "./math-BOBiC4TN.js";
24
24
  import { n as p, p as T } from "./polyfills-X6KXuHg-.js";
25
- import { A as q } from "./Animation-VTp4qBgU.js";
25
+ import { A as q } from "./Animation-uimN7sdT.js";
26
26
  var s, r;
27
27
  class j extends q {
28
28
  constructor(t, a) {
@@ -1 +1 @@
1
- "use strict";var f=Object.defineProperty,F=Object.defineProperties;var o=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var m=(t,i,e)=>i in t?f(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,d=(t,i)=>{for(var e in i||(i={}))O.call(i,e)&&m(t,e,i[e]);if(c)for(var e of c(i))b.call(i,e)&&m(t,e,i[e]);return t},g=(t,i)=>F(t,o(i));var A=(t,i,e)=>{if(!i.has(t))throw TypeError("Cannot "+e)};var a=(t,i,e)=>(A(t,i,"read from private field"),e?e.call(t):i.get(t)),u=(t,i,e)=>{if(i.has(t))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(t):i.set(t,e)},h=(t,i,e,s)=>(A(t,i,"write to private field"),s?s.call(t,e):i.set(t,e),e);const p=require("./easings-DsS5-Kqc.cjs"),w=require("./math-GDWEqu7y.cjs"),l=require("./polyfills-CM4SCDTt.cjs"),C=require("./Animation-BvXqY0d7.cjs");var n,r;class S extends C.Animation{constructor(e,s){super(e||0,s);u(this,n,p.linear);u(this,r,1e3);this.updateOptions(g(d({},s),{equalize:!0}))}updateOptions(e){super.updateOptions(e),h(this,n,l.nullishCoalescing(e==null?void 0:e.easing,a(this,n))),h(this,r,l.nullishCoalescing(e==null?void 0:e.duration,a(this,r)))}handleAnimationFrame(e){const s=e.timeElapsedSinceSubscription/1e3/(a(this,r)/1e3),q=a(this,n).call(this,w.clamp(s,0,1));this.current=l.preciseNumber(this.from+(this.target-this.from)*q,6),s>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,r=new WeakMap;exports.Tweened=S;
1
+ "use strict";var f=Object.defineProperty,F=Object.defineProperties;var o=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var m=(t,i,e)=>i in t?f(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,d=(t,i)=>{for(var e in i||(i={}))O.call(i,e)&&m(t,e,i[e]);if(c)for(var e of c(i))b.call(i,e)&&m(t,e,i[e]);return t},g=(t,i)=>F(t,o(i));var A=(t,i,e)=>{if(!i.has(t))throw TypeError("Cannot "+e)};var a=(t,i,e)=>(A(t,i,"read from private field"),e?e.call(t):i.get(t)),u=(t,i,e)=>{if(i.has(t))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(t):i.set(t,e)},h=(t,i,e,s)=>(A(t,i,"write to private field"),s?s.call(t,e):i.set(t,e),e);const p=require("./easings-DsS5-Kqc.cjs"),w=require("./math-GDWEqu7y.cjs"),l=require("./polyfills-CM4SCDTt.cjs"),C=require("./Animation-BInSRYNr.cjs");var n,r;class S extends C.Animation{constructor(e,s){super(e||0,s);u(this,n,p.linear);u(this,r,1e3);this.updateOptions(g(d({},s),{equalize:!0}))}updateOptions(e){super.updateOptions(e),h(this,n,l.nullishCoalescing(e==null?void 0:e.easing,a(this,n))),h(this,r,l.nullishCoalescing(e==null?void 0:e.duration,a(this,r)))}handleAnimationFrame(e){const s=e.timeElapsedSinceSubscription/1e3/(a(this,r)/1e3),q=a(this,n).call(this,w.clamp(s,0,1));this.current=l.preciseNumber(this.from+(this.target-this.from)*q,6),s>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,r=new WeakMap;exports.Tweened=S;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-BvXqY0d7.cjs"),n=require("../Damped-B_CbwZFD.cjs"),i=require("../Tweened-BoT6DBlM.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-BInSRYNr.cjs"),n=require("../Damped-Da3EnNN4.cjs"),i=require("../Tweened-DksN-Rz6.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
@@ -1,6 +1,6 @@
1
- import { A as r } from "../Animation-VTp4qBgU.js";
2
- import { D as m } from "../Damped-uk87KmLu.js";
3
- import { T as t } from "../Tweened-B5uDQSvr.js";
1
+ import { A as r } from "../Animation-uimN7sdT.js";
2
+ import { D as m } from "../Damped-yrNXlkDE.js";
3
+ import { T as t } from "../Tweened-CjgvoOwL.js";
4
4
  export {
5
5
  r as Animation,
6
6
  m as Damped,
@@ -1 +1 @@
1
- "use strict";var N=(r,n,e)=>{if(!n.has(r))throw TypeError("Cannot "+e)};var t=(r,n,e)=>(N(r,n,"read from private field"),e?e.call(r):n.get(r)),s=(r,n,e)=>{if(n.has(r))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(r):n.set(r,e)},i=(r,n,e,a)=>(N(r,n,"write to private field"),a?a.call(r,e):n.set(r,e),e);var L=(r,n,e)=>(N(r,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),Q=require("../dom-JBOkFLTh.cjs"),M=require("../ticker/index.cjs");require("../Store-Cr3VaD9G.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-BoT6DBlM.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),$=require("../polyfills-CM4SCDTt.cjs"),_=require("../order/index.cjs");var z;class R{constructor(){s(this,z,new V.Notifier)}get changeEvent(){return t(this,z)}}z=new WeakMap;var o,d,u,D;class p extends R{constructor(e){super();s(this,o,null);s(this,d,null);s(this,u,"offsetHeight");s(this,D,e=>{const a=e.shiftKey?-1:1;let h;e.code==="Space"?h=a*t(this,d)[t(this,u)]*.4:e.code==="ArrowLeft"?h=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowRight"?h=1*t(this,d)[t(this,u)]*.2:e.code==="ArrowUp"?h=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowDown"?h=1*t(this,d)[t(this,u)]*.2:e.code==="PageUp"?h=-1*t(this,d)[t(this,u)]:e.code==="PageDown"?h=1*t(this,d)[t(this,u)]:e.code==="Home"?h=0:e.code==="End"&&(h=t(this,u)==="offsetWidth"?t(this,d).scrollWidth:t(this,d).scrollHeight),h&&(e.stopPropagation(),this.changeEvent.notify("keyboard",h))});m.isBrowser&&(i(this,o,e!=null&&e.element&&Q.getElement(e.element)||window),i(this,d,t(this,o)instanceof HTMLElement?t(this,o):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,o).addEventListener("keydown",t(this,D))}disconnect(){m.isBrowser&&t(this,o).removeEventListener("keydown",t(this,D))}}o=new WeakMap,d=new WeakMap,u=new WeakMap,D=new WeakMap;var w,y,H,P,l,k,f,C,S,W,U,q,X,B;class ee extends R{constructor(e){super();s(this,C);s(this,W);s(this,w,void 0);s(this,y,void 0);s(this,H,void 0);s(this,P,void 0);s(this,l,void 0);s(this,k,void 0);s(this,f,void 0);s(this,q,void 0);s(this,X,void 0);s(this,B,void 0);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,w)*this.direction*(1-t(this,l).current))}),i(this,X,()=>{t(this,l).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,w))*this.direction*(1-t(this,l).current))}),i(this,B,()=>{t(this,y)&&(document.hidden?t(this,l).set(1,{equalize:!0}):t(this,l).set(0,{equalize:!0}))}),i(this,w,(e==null?void 0:e.speed)||1),i(this,y,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,y,e),t(this,f)&&L(this,C,S).call(this)}set speed(e){i(this,w,e),t(this,f)&&L(this,C,S).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,C,S).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,W,U).call(this))}pauseAndContinue(e){e&&!t(this,l).target&&(clearInterval(t(this,k)),t(this,l).set(1,{duration:Math.min(e,1e3)}),i(this,k,setTimeout(()=>{t(this,l).set(0,{duration:Math.min(e,5e3)})},e)))}}w=new WeakMap,y=new WeakMap,H=new WeakMap,P=new WeakMap,l=new WeakMap,k=new WeakMap,f=new WeakMap,C=new WeakSet,S=function(){L(this,W,U).call(this),t(this,y)?i(this,P,setInterval(t(this,X),Math.abs(t(this,w)))):M.ticker.subscribe(t(this,q),t(this,H)),document.addEventListener("visibilitychange",t(this,B))},W=new WeakSet,U=function(){clearInterval(t(this,P)),M.ticker.unsubscribe(t(this,q)),clearInterval(t(this,k)),t(this,l).close(),document.removeEventListener("visibilitychange",t(this,B))},q=new WeakMap,X=new WeakMap,B=new WeakMap;var T,E,I,Y;class te extends R{constructor(e){super();s(this,T,null);s(this,E,void 0);s(this,I,void 0);s(this,Y,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 h=Date.now();if(h-t(this,I)>40&&(a=100*Math.sign(a)),i(this,I,h),Math.abs(a)<100||t(this,E))return;this.changeEvent.notify("wheel",a),i(this,E,setTimeout(()=>{i(this,E,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,T,e!=null&&e.element&&Q.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,T).addEventListener("wheel",t(this,Y),{passive:!1})}disconnect(){m.isBrowser&&(t(this,T).removeEventListener("wheel",t(this,Y)),clearTimeout(t(this,E)))}}T=new WeakMap,E=new WeakMap,I=new WeakMap,Y=new WeakMap;var x,b,A,c,K,v;const g=class g extends R{constructor(e){super();s(this,b,null);s(this,A,!1);s(this,c,0);s(this,K,e=>{if(e.composedPath().find(h=>h instanceof HTMLElement&&h.hasAttribute("drag-dead-zone")))return;this.swipe||M.ticker.unsubscribe(t(this,v));let a=e;i(this,c,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(h=>{if(t(this,A)||t(g,x)&&t(g,x)!==t(this,b))return;this.swipe&&i(this,A,!0);const O=a.x-h.x,F=a.y-h.y;this.axis==="x"?i(this,c,O):i(this,c,F),a=h,(this.axis==="x"&&Math.abs(O)>Math.abs(F)||this.axis==="y"&&Math.abs(F)>Math.abs(O))&&(i(g,x,t(this,b)),this.changeEvent.notify("drag",t(this,c)))},()=>{i(g,x,null),this.swipe||(i(this,c,t(this,c)*3),M.ticker.subscribe(t(this,v),{order:_.TICK_ORDER.SCROLL-1})),document.documentElement.classList.remove("grabbing"),i(this,A,!1)})});s(this,v,()=>{Math.floor(t(this,c))||M.ticker.unsubscribe(t(this,v)),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,b,e!=null&&e.element&&Q.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,b).addEventListener("pointerdown",t(this,K))}disconnect(){m.isBrowser&&(t(this,b).removeEventListener("pointerdown",t(this,K)),M.ticker.unsubscribe(t(this,v)))}};x=new WeakMap,b=new WeakMap,A=new WeakMap,c=new WeakMap,K=new WeakMap,v=new WeakMap,s(g,x,null);let j=g;exports.AutoplayControls=ee;exports.Controls=R;exports.DragControls=j;exports.KeyboardControls=p;exports.WheelControls=te;
1
+ "use strict";var N=(r,n,e)=>{if(!n.has(r))throw TypeError("Cannot "+e)};var t=(r,n,e)=>(N(r,n,"read from private field"),e?e.call(r):n.get(r)),s=(r,n,e)=>{if(n.has(r))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(r):n.set(r,e)},i=(r,n,e,a)=>(N(r,n,"write to private field"),a?a.call(r,e):n.set(r,e),e);var L=(r,n,e)=>(N(r,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),Q=require("../dom-JBOkFLTh.cjs"),M=require("../ticker/index.cjs");require("../Store-Cr3VaD9G.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-DksN-Rz6.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),$=require("../polyfills-CM4SCDTt.cjs"),_=require("../order/index.cjs");var z;class R{constructor(){s(this,z,new V.Notifier)}get changeEvent(){return t(this,z)}}z=new WeakMap;var o,d,u,D;class p extends R{constructor(e){super();s(this,o,null);s(this,d,null);s(this,u,"offsetHeight");s(this,D,e=>{const a=e.shiftKey?-1:1;let h;e.code==="Space"?h=a*t(this,d)[t(this,u)]*.4:e.code==="ArrowLeft"?h=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowRight"?h=1*t(this,d)[t(this,u)]*.2:e.code==="ArrowUp"?h=-1*t(this,d)[t(this,u)]*.2:e.code==="ArrowDown"?h=1*t(this,d)[t(this,u)]*.2:e.code==="PageUp"?h=-1*t(this,d)[t(this,u)]:e.code==="PageDown"?h=1*t(this,d)[t(this,u)]:e.code==="Home"?h=0:e.code==="End"&&(h=t(this,u)==="offsetWidth"?t(this,d).scrollWidth:t(this,d).scrollHeight),h&&(e.stopPropagation(),this.changeEvent.notify("keyboard",h))});m.isBrowser&&(i(this,o,e!=null&&e.element&&Q.getElement(e.element)||window),i(this,d,t(this,o)instanceof HTMLElement?t(this,o):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,o).addEventListener("keydown",t(this,D))}disconnect(){m.isBrowser&&t(this,o).removeEventListener("keydown",t(this,D))}}o=new WeakMap,d=new WeakMap,u=new WeakMap,D=new WeakMap;var w,y,H,P,l,k,f,C,S,W,U,q,X,B;class ee extends R{constructor(e){super();s(this,C);s(this,W);s(this,w,void 0);s(this,y,void 0);s(this,H,void 0);s(this,P,void 0);s(this,l,void 0);s(this,k,void 0);s(this,f,void 0);s(this,q,void 0);s(this,X,void 0);s(this,B,void 0);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,w)*this.direction*(1-t(this,l).current))}),i(this,X,()=>{t(this,l).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,w))*this.direction*(1-t(this,l).current))}),i(this,B,()=>{t(this,y)&&(document.hidden?t(this,l).set(1,{equalize:!0}):t(this,l).set(0,{equalize:!0}))}),i(this,w,(e==null?void 0:e.speed)||1),i(this,y,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,y,e),t(this,f)&&L(this,C,S).call(this)}set speed(e){i(this,w,e),t(this,f)&&L(this,C,S).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,C,S).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,W,U).call(this))}pauseAndContinue(e){e&&!t(this,l).target&&(clearInterval(t(this,k)),t(this,l).set(1,{duration:Math.min(e,1e3)}),i(this,k,setTimeout(()=>{t(this,l).set(0,{duration:Math.min(e,5e3)})},e)))}}w=new WeakMap,y=new WeakMap,H=new WeakMap,P=new WeakMap,l=new WeakMap,k=new WeakMap,f=new WeakMap,C=new WeakSet,S=function(){L(this,W,U).call(this),t(this,y)?i(this,P,setInterval(t(this,X),Math.abs(t(this,w)))):M.ticker.subscribe(t(this,q),t(this,H)),document.addEventListener("visibilitychange",t(this,B))},W=new WeakSet,U=function(){clearInterval(t(this,P)),M.ticker.unsubscribe(t(this,q)),clearInterval(t(this,k)),t(this,l).close(),document.removeEventListener("visibilitychange",t(this,B))},q=new WeakMap,X=new WeakMap,B=new WeakMap;var T,E,I,Y;class te extends R{constructor(e){super();s(this,T,null);s(this,E,void 0);s(this,I,void 0);s(this,Y,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 h=Date.now();if(h-t(this,I)>40&&(a=100*Math.sign(a)),i(this,I,h),Math.abs(a)<100||t(this,E))return;this.changeEvent.notify("wheel",a),i(this,E,setTimeout(()=>{i(this,E,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,T,e!=null&&e.element&&Q.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,T).addEventListener("wheel",t(this,Y),{passive:!1})}disconnect(){m.isBrowser&&(t(this,T).removeEventListener("wheel",t(this,Y)),clearTimeout(t(this,E)))}}T=new WeakMap,E=new WeakMap,I=new WeakMap,Y=new WeakMap;var x,b,A,c,K,v;const g=class g extends R{constructor(e){super();s(this,b,null);s(this,A,!1);s(this,c,0);s(this,K,e=>{if(e.composedPath().find(h=>h instanceof HTMLElement&&h.hasAttribute("drag-dead-zone")))return;this.swipe||M.ticker.unsubscribe(t(this,v));let a=e;i(this,c,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(h=>{if(t(this,A)||t(g,x)&&t(g,x)!==t(this,b))return;this.swipe&&i(this,A,!0);const O=a.x-h.x,F=a.y-h.y;this.axis==="x"?i(this,c,O):i(this,c,F),a=h,(this.axis==="x"&&Math.abs(O)>Math.abs(F)||this.axis==="y"&&Math.abs(F)>Math.abs(O))&&(i(g,x,t(this,b)),this.changeEvent.notify("drag",t(this,c)))},()=>{i(g,x,null),this.swipe||(i(this,c,t(this,c)*3),M.ticker.subscribe(t(this,v),{order:_.TICK_ORDER.SCROLL-1})),document.documentElement.classList.remove("grabbing"),i(this,A,!1)})});s(this,v,()=>{Math.floor(t(this,c))||M.ticker.unsubscribe(t(this,v)),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,b,e!=null&&e.element&&Q.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,b).addEventListener("pointerdown",t(this,K))}disconnect(){m.isBrowser&&(t(this,b).removeEventListener("pointerdown",t(this,K)),M.ticker.unsubscribe(t(this,v)))}};x=new WeakMap,b=new WeakMap,A=new WeakMap,c=new WeakMap,K=new WeakMap,v=new WeakMap,s(g,x,null);let j=g;exports.AutoplayControls=ee;exports.Controls=R;exports.DragControls=j;exports.KeyboardControls=p;exports.WheelControls=te;
@@ -14,7 +14,7 @@ import { a as Q } from "../dom-P5QbAASX.js";
14
14
  import { ticker as M } from "../ticker/index.js";
15
15
  import "../Store-Qr3SNOSf.js";
16
16
  import { e as G } from "../easings-BKi40vHz.js";
17
- import { T as J } from "../Tweened-B5uDQSvr.js";
17
+ import { T as J } from "../Tweened-CjgvoOwL.js";
18
18
  import { s as Z } from "../gestures-D2Fdra_G.js";
19
19
  import { p as $ } from "../polyfills-X6KXuHg-.js";
20
20
  import { TICK_ORDER as p } from "../order/index.js";
@@ -1 +1 @@
1
- "use strict";var at=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var U=(n,t,i)=>{if(!t.has(n))throw TypeError("Cannot "+i)};var e=(n,t,i)=>(U(n,t,"read from private field"),i?i.call(n):t.get(n)),r=(n,t,i)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,i)},c=(n,t,i,a)=>(U(n,t,"write to private field"),a?a.call(n,i):t.set(n,i),i);var d=(n,t,i)=>(U(n,t,"access private method"),i);var T=(n,t,i)=>new Promise((a,s)=>{var u=l=>{try{f(i.next(l))}catch(g){s(g)}},p=l=>{try{f(i.throw(l))}catch(g){s(g)}},f=l=>l.done?a(l.value):Promise.resolve(l.value).then(u,p);f((i=i.apply(n,t)).next())});var ot=(n,t,i)=>(t=n[at("asyncIterator")])?t.call(n):(n=n[at("iterator")](),t={},i=(a,s)=>(s=n[a])&&(t[a]=u=>new Promise((p,f,l)=>(u=s.call(n,u),l=u.done,Promise.resolve(u.value).then(g=>p({value:g,done:l}),f)))),i("next"),i("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ht=require("../notifier/index.cjs"),mt=require("../browser-CpzFX2xg.cjs"),V=require("../url-C3dWnJQg.cjs");var w,h,m,k,P,C,A;class ft{constructor(t,i){r(this,w,void 0);r(this,h,void 0);r(this,m,void 0);r(this,k,void 0);r(this,P,void 0);r(this,C,t=>{t.preventDefault(),e(this,w).links.forEach(i=>{var a;e(this,m)===e(i,m)||(a=e(i,P))!=null&&a.includes(e(this,m))?e(i,h).classList.add("clicked"):e(i,h).classList.remove("clicked")}),e(this,w).navigate(e(this,m),e(this,k))});r(this,A,()=>{e(this,w).prefetch(e(this,m)),e(this,h).removeEventListener("pointerenter",e(this,A))});var u,p;c(this,w,i),c(this,h,t),c(this,m,e(this,h).getAttribute("href")||"/"),c(this,k,e(this,h).getAttribute("data-history-action")||"push"),e(this,h).addEventListener("click",e(this,C));const a=i.normalizePath(e(this,m)),s=i.normalizePath(location.pathname);c(this,P,(u=e(this,h).getAttribute("data-match-paths"))==null?void 0:u.split(",").map(f=>i.normalizePath(f.trim()).pathname)),e(this,h).hasAttribute("data-include")?s.pathname.includes(a.pathname)&&e(this,h).classList.add("current"):a.pathname===s.pathname||(p=e(this,P))!=null&&p.includes(s.pathname)?(e(this,h).classList.add("current"),e(this,h).classList.add("clicked")):e(this,h).classList.remove("clicked"),e(this,h).hasAttribute("data-prefetch")&&e(this,h).addEventListener("pointerenter",e(this,A))}destroy(){e(this,h).removeEventListener("click",e(this,C)),e(this,h).removeEventListener("pointerenter",e(this,A)),e(this,h).classList.remove("current")}}w=new WeakMap,h=new WeakMap,m=new WeakMap,k=new WeakMap,P=new WeakMap,C=new WeakMap,A=new WeakMap;var M,S,z,q,H,K,y,v,L,x,D,R,X,F,Z,I,$,Y,ct,O,tt,_;class pt{constructor(t){r(this,R);r(this,F);r(this,I);r(this,Y);r(this,O);r(this,M,null);r(this,S,null);r(this,z,null);r(this,q,null);r(this,H,[]);r(this,K,new DOMParser);r(this,y,new Map);r(this,v,void 0);r(this,L,null);r(this,x,new ht.Notifier);r(this,D,new ht.Notifier);r(this,_,t=>{t.state&&this.navigate(t.state,"none")});if(mt.isBrowser){t!=null&&t.base?c(this,M,V.normalizeBase(t.base)):c(this,M,"/"),c(this,S,(t==null?void 0:t.waitForHeadToLoad)!==!1),c(this,z,(t==null?void 0:t.cachePages)!==!1),c(this,q,d(this,I,$).call(this,document.body));const i=this.normalizePath(location.pathname);c(this,L,i.pathname),document.documentElement.setAttribute("data-current-pathname",e(this,L)),document.documentElement.setAttribute("data-current-leaf",i.leaf),d(this,F,Z).call(this),addEventListener("popstate",e(this,_))}}get currentPathname(){return e(this,L)}get links(){return e(this,H)}normalizePath(t){return V.splitPath(t,e(this,M))}beforeNavigationEvent(t){return e(this,x).subscribe(t)}afterNavigationEvent(t){return e(this,D).subscribe(t)}prefetch(t){return T(this,null,function*(){const i=this.normalizePath(t);return d(this,R,X).call(this,i.pathname)})}navigate(t,i="push"){return T(this,null,function*(){var g;const a=this.normalizePath(t);let{pathname:s,hash:u,parameters:p,leaf:f}=a;if(e(this,v)===s||e(this,L)===s)return;c(this,v,s);const l=e(this,y).has(s);try{let B=!0;if(e(this,x).notify({pathname:s,isCached:l}),this.preprocessor)try{yield new Promise((o,E)=>{var b;(b=this.preprocessor)==null||b.call(this,{pathname:s,resolve:o,reject:E,isCached:l})})}catch(o){o?console.error(o):console.log("Route change canceled"),B=!1}if(!B||e(this,v)!==s)return;const et=e(this,y).get(s)||(yield d(this,R,X).call(this,s));if(e(this,v)!==s)return;const it=Array.from(document.head.children),st=Array.from(et.head.cloneNode(!0).children),nt=d(this,Y,ct).call(this,it,st),lt=d(this,O,tt).call(this,it,nt),W=d(this,O,tt).call(this,st,nt);W.forEach((o,E)=>{if(o.tagName==="SCRIPT"&&o.getAttribute("src")){const b=document.createElement("script");b.type="module",b.src=o.getAttribute("src"),W[E]=b}}),W.forEach(o=>{document.head.appendChild(o)});const G=W.filter(o=>o.tagName==="STYLE"||o.tagName==="SCRIPT"||o.tagName==="LINK");e(this,S)&&G.length&&(yield new Promise(o=>T(this,null,function*(){let E=0;try{for(var b=ot(G),dt,J,j;dt=!(J=yield b.next()).done;dt=!1){const N=J.value;N.onload=()=>{E++,E===G.length&&o()}}}catch(J){j=[J]}finally{try{dt&&(J=b.return)&&(yield J.call(b))}finally{if(j)throw j[0]}}}))),lt.forEach(o=>{o.hasAttribute("data-permanent")||o.remove()}),c(this,L,s),V.changeHistory(i,s,p,u);const ut=d(this,I,$).call(this,et.body.cloneNode(!0));e(this,q).forEach((o,E)=>{const b=ut[E];let dt=[...o.childNodes],J=[...b.childNodes];dt.forEach(j=>{if(j instanceof HTMLElement){const N=j.getAttribute("data-remain");let rt;J=J.filter(Q=>Q instanceof HTMLElement&&N&&Q.getAttribute("data-remain")===N?(rt=Q,!1):!0),N&&rt||j.remove()}else j.remove()}),o.append(...J)}),d(this,F,Z).call(this),document.documentElement.setAttribute("data-current-pathname",s),document.documentElement.setAttribute("data-current-leaf",f),(g=this.postprocessor)==null||g.call(this,{pathname:s,isCached:l}),e(this,D).notify({pathname:s,isCached:l})}catch(B){console.error(B)}c(this,v,void 0)})}}M=new WeakMap,S=new WeakMap,z=new WeakMap,q=new WeakMap,H=new WeakMap,K=new WeakMap,y=new WeakMap,v=new WeakMap,L=new WeakMap,x=new WeakMap,D=new WeakMap,R=new WeakSet,X=function(t){return T(this,null,function*(){const i=e(this,y).get(t);if(i)return i;const s=yield(yield fetch(t)).text(),u=e(this,K).parseFromString(s,"text/html");return e(this,z)&&e(this,y).set(t,u),u})},F=new WeakSet,Z=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(i=>{var a;return(a=i.getAttribute("href"))==null?void 0:a.startsWith("/")});e(this,H).forEach(i=>i.destroy()),c(this,H,t.map(i=>new ft(i,this)))},I=new WeakSet,$=function(t){return[...t.querySelectorAll("[data-morph]")]},Y=new WeakSet,ct=function(t,i){return t.filter(a=>i.find(s=>s.outerHTML===a.outerHTML))},O=new WeakSet,tt=function(t,i){return t.filter(a=>!i.find(s=>s.outerHTML===a.outerHTML))},_=new WeakMap;exports.Morph=pt;
1
+ "use strict";var at=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var U=(n,t,i)=>{if(!t.has(n))throw TypeError("Cannot "+i)};var e=(n,t,i)=>(U(n,t,"read from private field"),i?i.call(n):t.get(n)),r=(n,t,i)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,i)},c=(n,t,i,a)=>(U(n,t,"write to private field"),a?a.call(n,i):t.set(n,i),i);var d=(n,t,i)=>(U(n,t,"access private method"),i);var T=(n,t,i)=>new Promise((a,s)=>{var u=l=>{try{f(i.next(l))}catch(g){s(g)}},p=l=>{try{f(i.throw(l))}catch(g){s(g)}},f=l=>l.done?a(l.value):Promise.resolve(l.value).then(u,p);f((i=i.apply(n,t)).next())});var ot=(n,t,i)=>(t=n[at("asyncIterator")])?t.call(n):(n=n[at("iterator")](),t={},i=(a,s)=>(s=n[a])&&(t[a]=u=>new Promise((p,f,l)=>(u=s.call(n,u),l=u.done,Promise.resolve(u.value).then(g=>p({value:g,done:l}),f)))),i("next"),i("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ht=require("../notifier/index.cjs"),mt=require("../browser-CpzFX2xg.cjs"),V=require("../url-C3dWnJQg.cjs");var w,h,m,k,P,C,A;class ft{constructor(t,i){r(this,w,void 0);r(this,h,void 0);r(this,m,void 0);r(this,k,void 0);r(this,P,void 0);r(this,C,t=>{t.preventDefault(),e(this,w).links.forEach(i=>{var a;e(this,m)===e(i,m)||(a=e(i,P))!=null&&a.includes(e(this,m))?e(i,h).classList.add("clicked"):e(i,h).classList.remove("clicked")}),e(this,w).navigate(e(this,m),e(this,k))});r(this,A,()=>{e(this,w).prefetch(e(this,m)),e(this,h).removeEventListener("pointerenter",e(this,A))});var u,p;c(this,w,i),c(this,h,t),c(this,m,e(this,h).getAttribute("href")||"/"),c(this,k,e(this,h).getAttribute("data-history-action")||"push"),e(this,h).addEventListener("click",e(this,C));const a=i.normalizePath(e(this,m)),s=i.normalizePath(location.pathname);c(this,P,(u=e(this,h).getAttribute("data-match-paths"))==null?void 0:u.split(",").map(f=>i.normalizePath(f.trim()).pathname)),e(this,h).hasAttribute("data-include")?s.pathname.includes(a.pathname)&&e(this,h).classList.add("current"):a.pathname===s.pathname||(p=e(this,P))!=null&&p.includes(s.pathname)?(e(this,h).classList.add("current"),e(this,h).classList.add("clicked")):e(this,h).classList.remove("clicked"),e(this,h).hasAttribute("data-prefetch")&&e(this,h).addEventListener("pointerenter",e(this,A))}destroy(){e(this,h).removeEventListener("click",e(this,C)),e(this,h).removeEventListener("pointerenter",e(this,A)),e(this,h).classList.remove("current")}}w=new WeakMap,h=new WeakMap,m=new WeakMap,k=new WeakMap,P=new WeakMap,C=new WeakMap,A=new WeakMap;var M,S,z,q,H,K,y,v,L,x,D,R,X,F,Z,I,$,Y,ct,O,tt,_;class pt{constructor(t){r(this,R);r(this,F);r(this,I);r(this,Y);r(this,O);r(this,M,null);r(this,S,null);r(this,z,null);r(this,q,null);r(this,H,[]);r(this,K,new DOMParser);r(this,y,new Map);r(this,v,void 0);r(this,L,null);r(this,x,new ht.Notifier);r(this,D,new ht.Notifier);r(this,_,t=>{t.state&&this.navigate(t.state,"none")});if(mt.isBrowser){t!=null&&t.base?c(this,M,V.normalizeBase(t.base)):c(this,M,"/"),c(this,S,(t==null?void 0:t.waitForHeadToLoad)!==!1),c(this,z,(t==null?void 0:t.cachePages)!==!1),c(this,q,d(this,I,$).call(this,document.body));const i=this.normalizePath(location.pathname);c(this,L,i.pathname),document.documentElement.setAttribute("data-current-pathname",e(this,L)),document.documentElement.setAttribute("data-current-leaf",i.leaf),d(this,F,Z).call(this),addEventListener("popstate",e(this,_))}}get currentPathname(){return e(this,L)}get links(){return e(this,H)}normalizePath(t){return V.splitPath(t,e(this,M))}beforeNavigationEvent(t){return e(this,x).subscribe(t)}afterNavigationEvent(t){return e(this,D).subscribe(t)}prefetch(t){return T(this,null,function*(){const i=this.normalizePath(t);return d(this,R,X).call(this,i.pathname)})}navigate(t,i="push"){return T(this,null,function*(){var g;const a=this.normalizePath(t);let{pathname:s,hash:u,parameters:p,leaf:f}=a;if(e(this,v)===s||e(this,L)===s)return;c(this,v,s);const l=e(this,y).has(s);try{let B=!0;if(e(this,x).notify({pathname:s,isCached:l}),this.preprocessor)try{yield new Promise((o,E)=>{var b;(b=this.preprocessor)==null||b.call(this,{pathname:s,resolve:o,reject:E,isCached:l})})}catch(o){o?console.error(o):console.log("Route change canceled"),B=!1}if(!B||e(this,v)!==s)return;const et=e(this,y).get(s)||(yield d(this,R,X).call(this,s));if(e(this,v)!==s)return;const it=Array.from(document.head.children),st=Array.from(et.head.cloneNode(!0).children),nt=d(this,Y,ct).call(this,it,st),lt=d(this,O,tt).call(this,it,nt),W=d(this,O,tt).call(this,st,nt);W.forEach((o,E)=>{if(o.tagName==="SCRIPT"&&o.getAttribute("src")){const b=document.createElement("script");b.type="module",b.src=o.getAttribute("src"),W[E]=b}}),W.forEach(o=>{document.head.appendChild(o)});const G=W.filter(o=>(o.tagName==="STYLE"||o.tagName==="SCRIPT"||o.tagName==="LINK")&&o.getAttribute("rel")!=="canonical");e(this,S)&&G.length&&(yield new Promise(o=>T(this,null,function*(){let E=0;try{for(var b=ot(G),dt,J,j;dt=!(J=yield b.next()).done;dt=!1){const N=J.value;N.onload=()=>{E++,E===G.length&&o()}}}catch(J){j=[J]}finally{try{dt&&(J=b.return)&&(yield J.call(b))}finally{if(j)throw j[0]}}}))),lt.forEach(o=>{o.hasAttribute("data-permanent")||o.remove()}),c(this,L,s),V.changeHistory(i,s,p,u);const ut=d(this,I,$).call(this,et.body.cloneNode(!0));e(this,q).forEach((o,E)=>{const b=ut[E];let dt=[...o.childNodes],J=[...b.childNodes];dt.forEach(j=>{if(j instanceof HTMLElement){const N=j.getAttribute("data-remain");let rt;J=J.filter(Q=>Q instanceof HTMLElement&&N&&Q.getAttribute("data-remain")===N?(rt=Q,!1):!0),N&&rt||j.remove()}else j.remove()}),o.append(...J)}),d(this,F,Z).call(this),document.documentElement.setAttribute("data-current-pathname",s),document.documentElement.setAttribute("data-current-leaf",f),(g=this.postprocessor)==null||g.call(this,{pathname:s,isCached:l}),e(this,D).notify({pathname:s,isCached:l})}catch(B){console.error(B)}c(this,v,void 0)})}}M=new WeakMap,S=new WeakMap,z=new WeakMap,q=new WeakMap,H=new WeakMap,K=new WeakMap,y=new WeakMap,v=new WeakMap,L=new WeakMap,x=new WeakMap,D=new WeakMap,R=new WeakSet,X=function(t){return T(this,null,function*(){const i=e(this,y).get(t);if(i)return i;const s=yield(yield fetch(t)).text(),u=e(this,K).parseFromString(s,"text/html");return e(this,z)&&e(this,y).set(t,u),u})},F=new WeakSet,Z=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(i=>{var a;return(a=i.getAttribute("href"))==null?void 0:a.startsWith("/")});e(this,H).forEach(i=>i.destroy()),c(this,H,t.map(i=>new ft(i,this)))},I=new WeakSet,$=function(t){return[...t.querySelectorAll("[data-morph]")]},Y=new WeakSet,ct=function(t,i){return t.filter(a=>i.find(s=>s.outerHTML===a.outerHTML))},O=new WeakSet,tt=function(t,i){return t.filter(a=>!i.find(s=>s.outerHTML===a.outerHTML))},_=new WeakMap;exports.Morph=pt;
@@ -13,52 +13,52 @@ var T = (n, t, i) => new Promise((r, s) => {
13
13
  var u = (l) => {
14
14
  try {
15
15
  f(i.next(l));
16
- } catch (E) {
17
- s(E);
16
+ } catch (g) {
17
+ s(g);
18
18
  }
19
19
  }, p = (l) => {
20
20
  try {
21
21
  f(i.throw(l));
22
- } catch (E) {
23
- s(E);
22
+ } catch (g) {
23
+ s(g);
24
24
  }
25
25
  }, f = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(u, p);
26
26
  f((i = i.apply(n, t)).next());
27
27
  });
28
- var rt = (n, t, i) => (t = n[at("asyncIterator")]) ? t.call(n) : (n = n[at("iterator")](), t = {}, i = (r, s) => (s = n[r]) && (t[r] = (u) => new Promise((p, f, l) => (u = s.call(n, u), l = u.done, Promise.resolve(u.value).then((E) => p({ value: E, done: l }), f)))), i("next"), i("return"), t);
28
+ var rt = (n, t, i) => (t = n[at("asyncIterator")]) ? t.call(n) : (n = n[at("iterator")](), t = {}, i = (r, s) => (s = n[r]) && (t[r] = (u) => new Promise((p, f, l) => (u = s.call(n, u), l = u.done, Promise.resolve(u.value).then((g) => p({ value: g, done: l }), f)))), i("next"), i("return"), t);
29
29
  import { Notifier as ot } from "../notifier/index.js";
30
30
  import { i as dt } from "../browser-0zX67oeU.js";
31
31
  import { n as mt, s as ft, c as pt } from "../url-DMNfW7uN.js";
32
- var w, h, m, k, y, C, A;
33
- class Et {
32
+ var w, h, m, k, P, C, y;
33
+ class gt {
34
34
  constructor(t, i) {
35
35
  a(this, w, void 0);
36
36
  a(this, h, void 0);
37
37
  a(this, m, void 0);
38
38
  a(this, k, void 0);
39
- a(this, y, void 0);
39
+ a(this, P, void 0);
40
40
  a(this, C, (t) => {
41
41
  t.preventDefault(), e(this, w).links.forEach((i) => {
42
42
  var r;
43
- e(this, m) === e(i, m) || (r = e(i, y)) != null && r.includes(e(this, m)) ? e(i, h).classList.add("clicked") : e(i, h).classList.remove("clicked");
43
+ e(this, m) === e(i, m) || (r = e(i, P)) != null && r.includes(e(this, m)) ? e(i, h).classList.add("clicked") : e(i, h).classList.remove("clicked");
44
44
  }), e(this, w).navigate(e(this, m), e(this, k));
45
45
  });
46
- a(this, A, () => {
47
- e(this, w).prefetch(e(this, m)), e(this, h).removeEventListener("pointerenter", e(this, A));
46
+ a(this, y, () => {
47
+ e(this, w).prefetch(e(this, m)), e(this, h).removeEventListener("pointerenter", e(this, y));
48
48
  });
49
49
  var u, p;
50
50
  c(this, w, i), c(this, h, t), c(this, m, e(this, h).getAttribute("href") || "/"), c(this, k, e(this, h).getAttribute(
51
51
  "data-history-action"
52
52
  ) || "push"), e(this, h).addEventListener("click", e(this, C));
53
53
  const r = i.normalizePath(e(this, m)), s = i.normalizePath(location.pathname);
54
- c(this, y, (u = e(this, h).getAttribute("data-match-paths")) == null ? void 0 : u.split(",").map((f) => i.normalizePath(f.trim()).pathname)), e(this, h).hasAttribute("data-include") ? s.pathname.includes(r.pathname) && e(this, h).classList.add("current") : r.pathname === s.pathname || (p = e(this, y)) != null && p.includes(s.pathname) ? (e(this, h).classList.add("current"), e(this, h).classList.add("clicked")) : e(this, h).classList.remove("clicked"), e(this, h).hasAttribute("data-prefetch") && e(this, h).addEventListener("pointerenter", e(this, A));
54
+ c(this, P, (u = e(this, h).getAttribute("data-match-paths")) == null ? void 0 : u.split(",").map((f) => i.normalizePath(f.trim()).pathname)), e(this, h).hasAttribute("data-include") ? s.pathname.includes(r.pathname) && e(this, h).classList.add("current") : r.pathname === s.pathname || (p = e(this, P)) != null && p.includes(s.pathname) ? (e(this, h).classList.add("current"), e(this, h).classList.add("clicked")) : e(this, h).classList.remove("clicked"), e(this, h).hasAttribute("data-prefetch") && e(this, h).addEventListener("pointerenter", e(this, y));
55
55
  }
56
56
  destroy() {
57
- e(this, h).removeEventListener("click", e(this, C)), e(this, h).removeEventListener("pointerenter", e(this, A)), e(this, h).classList.remove("current");
57
+ e(this, h).removeEventListener("click", e(this, C)), e(this, h).removeEventListener("pointerenter", e(this, y)), e(this, h).classList.remove("current");
58
58
  }
59
59
  }
60
- w = new WeakMap(), h = new WeakMap(), m = new WeakMap(), k = new WeakMap(), y = new WeakMap(), C = new WeakMap(), A = new WeakMap();
61
- var H, z, S, x, M, Y, P, v, b, D, R, F, X, I, Z, q, _, j, ht, B, $, G;
60
+ w = new WeakMap(), h = new WeakMap(), m = new WeakMap(), k = new WeakMap(), P = new WeakMap(), C = new WeakMap(), y = new WeakMap();
61
+ var H, z, S, x, M, Y, A, v, b, D, R, F, X, I, Z, q, _, j, ht, B, $, G;
62
62
  class wt {
63
63
  constructor(t) {
64
64
  a(this, F);
@@ -72,7 +72,7 @@ class wt {
72
72
  a(this, x, null);
73
73
  a(this, M, []);
74
74
  a(this, Y, new DOMParser());
75
- a(this, P, /* @__PURE__ */ new Map());
75
+ a(this, A, /* @__PURE__ */ new Map());
76
76
  a(this, v, void 0);
77
77
  a(this, b, null);
78
78
  a(this, D, new ot());
@@ -115,13 +115,13 @@ class wt {
115
115
  }
116
116
  navigate(t, i = "push") {
117
117
  return T(this, null, function* () {
118
- var E;
118
+ var g;
119
119
  const r = this.normalizePath(t);
120
120
  let { pathname: s, hash: u, parameters: p, leaf: f } = r;
121
121
  if (e(this, v) === s || e(this, b) === s)
122
122
  return;
123
123
  c(this, v, s);
124
- const l = e(this, P).has(s);
124
+ const l = e(this, A).has(s);
125
125
  try {
126
126
  let O = !0;
127
127
  if (e(this, D).notify({
@@ -129,39 +129,39 @@ class wt {
129
129
  isCached: l
130
130
  }), this.preprocessor)
131
131
  try {
132
- yield new Promise((o, g) => {
132
+ yield new Promise((o, E) => {
133
133
  var L;
134
- (L = this.preprocessor) == null || L.call(this, { pathname: s, resolve: o, reject: g, isCached: l });
134
+ (L = this.preprocessor) == null || L.call(this, { pathname: s, resolve: o, reject: E, isCached: l });
135
135
  });
136
136
  } catch (o) {
137
137
  o ? console.error(o) : console.log("Route change canceled"), O = !1;
138
138
  }
139
139
  if (!O || e(this, v) !== s)
140
140
  return;
141
- const tt = e(this, P).get(s) || (yield d(this, F, X).call(this, s));
141
+ const tt = e(this, A).get(s) || (yield d(this, F, X).call(this, s));
142
142
  if (e(this, v) !== s)
143
143
  return;
144
144
  const et = Array.from(document.head.children), it = Array.from(
145
145
  tt.head.cloneNode(!0).children
146
146
  ), st = d(this, j, ht).call(this, et, it), ct = d(this, B, $).call(this, et, st), W = d(this, B, $).call(this, it, st);
147
- W.forEach((o, g) => {
147
+ W.forEach((o, E) => {
148
148
  if (o.tagName === "SCRIPT" && o.getAttribute("src")) {
149
149
  const L = document.createElement("script");
150
- L.type = "module", L.src = o.getAttribute("src"), W[g] = L;
150
+ L.type = "module", L.src = o.getAttribute("src"), W[E] = L;
151
151
  }
152
152
  }), W.forEach((o) => {
153
153
  document.head.appendChild(o);
154
154
  });
155
155
  const J = W.filter(
156
- (o) => o.tagName === "STYLE" || o.tagName === "SCRIPT" || o.tagName === "LINK"
156
+ (o) => (o.tagName === "STYLE" || o.tagName === "SCRIPT" || o.tagName === "LINK") && o.getAttribute("rel") !== "canonical"
157
157
  );
158
158
  e(this, z) && J.length && (yield new Promise((o) => T(this, null, function* () {
159
- let g = 0;
159
+ let E = 0;
160
160
  try {
161
161
  for (var L = rt(J), ut, Q, K; ut = !(Q = yield L.next()).done; ut = !1) {
162
162
  const N = Q.value;
163
163
  N.onload = () => {
164
- g++, g === J.length && o();
164
+ E++, E === J.length && o();
165
165
  };
166
166
  }
167
167
  } catch (Q) {
@@ -178,8 +178,8 @@ class wt {
178
178
  o.hasAttribute("data-permanent") || o.remove();
179
179
  }), c(this, b, s), pt(i, s, p, u);
180
180
  const lt = d(this, q, _).call(this, tt.body.cloneNode(!0));
181
- e(this, x).forEach((o, g) => {
182
- const L = lt[g];
181
+ e(this, x).forEach((o, E) => {
182
+ const L = lt[E];
183
183
  let ut = [...o.childNodes], Q = [...L.childNodes];
184
184
  ut.forEach((K) => {
185
185
  if (K instanceof HTMLElement) {
@@ -191,7 +191,7 @@ class wt {
191
191
  } else
192
192
  K.remove();
193
193
  }), o.append(...Q);
194
- }), d(this, I, Z).call(this), document.documentElement.setAttribute("data-current-pathname", s), document.documentElement.setAttribute("data-current-leaf", f), (E = this.postprocessor) == null || E.call(this, { pathname: s, isCached: l }), e(this, R).notify({ pathname: s, isCached: l });
194
+ }), d(this, I, Z).call(this), document.documentElement.setAttribute("data-current-pathname", s), document.documentElement.setAttribute("data-current-leaf", f), (g = this.postprocessor) == null || g.call(this, { pathname: s, isCached: l }), e(this, R).notify({ pathname: s, isCached: l });
195
195
  } catch (O) {
196
196
  console.error(O);
197
197
  }
@@ -199,13 +199,13 @@ class wt {
199
199
  });
200
200
  }
201
201
  }
202
- H = new WeakMap(), z = new WeakMap(), S = new WeakMap(), x = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), P = new WeakMap(), v = new WeakMap(), b = new WeakMap(), D = new WeakMap(), R = new WeakMap(), F = new WeakSet(), X = function(t) {
202
+ H = new WeakMap(), z = new WeakMap(), S = new WeakMap(), x = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), A = new WeakMap(), v = new WeakMap(), b = new WeakMap(), D = new WeakMap(), R = new WeakMap(), F = new WeakSet(), X = function(t) {
203
203
  return T(this, null, function* () {
204
- const i = e(this, P).get(t);
204
+ const i = e(this, A).get(t);
205
205
  if (i)
206
206
  return i;
207
207
  const s = yield (yield fetch(t)).text(), u = e(this, Y).parseFromString(s, "text/html");
208
- return e(this, S) && e(this, P).set(t, u), u;
208
+ return e(this, S) && e(this, A).set(t, u), u;
209
209
  });
210
210
  }, I = new WeakSet(), Z = function() {
211
211
  const t = [
@@ -214,7 +214,7 @@ H = new WeakMap(), z = new WeakMap(), S = new WeakMap(), x = new WeakMap(), M =
214
214
  var r;
215
215
  return (r = i.getAttribute("href")) == null ? void 0 : r.startsWith("/");
216
216
  });
217
- e(this, M).forEach((i) => i.destroy()), c(this, M, t.map((i) => new Et(i, this)));
217
+ e(this, M).forEach((i) => i.destroy()), c(this, M, t.map((i) => new gt(i, this)));
218
218
  }, q = new WeakSet(), _ = function(t) {
219
219
  return [...t.querySelectorAll("[data-morph]")];
220
220
  }, j = new WeakSet(), ht = function(t, i) {
@@ -1 +1 @@
1
- "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-Cr3VaD9G.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-B_CbwZFD.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),x=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),b=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),e.set(i,s),s),h,S,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),b(this,h,void 0),b(this,S,new x.CSSProperty(this,"--damping",20)),b(this,g,new x.CSSProperty(this,"--mass",0)),b(this,z,new x.CSSProperty(this,"--stiffness",0)),b(this,W,new x.CSSProperty(this,"--cartesian",!1)),b(this,R,new x.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,S).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,S).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,S).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;S=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
1
+ "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-Cr3VaD9G.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-Da3EnNN4.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),x=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),b=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),e.set(i,s),s),h,S,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),b(this,h,void 0),b(this,S,new x.CSSProperty(this,"--damping",20)),b(this,g,new x.CSSProperty(this,"--mass",0)),b(this,z,new x.CSSProperty(this,"--stiffness",0)),b(this,W,new x.CSSProperty(this,"--cartesian",!1)),b(this,R,new x.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,S).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,S).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,S).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;S=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
@@ -23,7 +23,7 @@ import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
23
23
  import { a as U } from "../dom-P5QbAASX.js";
24
24
  import { c as A } from "../math-BOBiC4TN.js";
25
25
  import "../ticker/index.js";
26
- import { D as W } from "../Damped-uk87KmLu.js";
26
+ import { D as W } from "../Damped-yrNXlkDE.js";
27
27
  import { elementResizer as B } from "../element-resizer/index.js";
28
28
  import { windowResizer as G } from "../window-resizer/index.js";
29
29
  import { CustomElement as V, define as X } from "../custom-element/index.js";
@@ -1 +1 @@
1
- "use strict";var Ns=Object.defineProperty;var _s=Object.getOwnPropertySymbols;var Ks=Object.prototype.hasOwnProperty,Zs=Object.prototype.propertyIsEnumerable;var Ps=(r,e,i)=>e in r?Ns(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i,ks=(r,e)=>{for(var i in e||(e={}))Ks.call(e,i)&&Ps(r,i,e[i]);if(_s)for(var i of _s(e))Zs.call(e,i)&&Ps(r,i,e[i]);return r};var Es=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(Es(r,e,"read from private field"),i?i.call(r):e.get(r)),L=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},O=(r,e,i,n)=>(Es(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Et=require("../Store-Cr3VaD9G.cjs"),Js=require("../Derived-D9VrDuf9.cjs"),fs=require("../browser-CpzFX2xg.cjs"),Qs=require("../easings-DsS5-Kqc.cjs"),_t=require("../layout-8ryRAMGJ.cjs"),ds=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Me=require("../order/index.cjs"),zs=require("../Damped-B_CbwZFD.cjs"),Xs=require("../Tweened-BoT6DBlM.cjs"),De=require("../controls/index.cjs"),Pt=require("../custom-element/index.cjs"),fe=require("../window-resizer/index.cjs"),Nt=require("../scroll-entries/index.cjs"),A=require("../tags-CAfasCGV.cjs"),vs=require("../createStylesheet-BsMSWX0q.cjs"),Ws=require("../css-unit-parser/index.cjs"),u=require("../css-property/index.cjs"),Ys=require("../Viewport-BBYt1Ivy.cjs"),Qe=require("../element-resizer/index.cjs"),js=require("../gestures-DHLrn6Q8.cjs"),Ms=require("../theme/index.cjs"),ti=require("../dom-JBOkFLTh.cjs"),Vs=require("../function-MthRj-GJ.cjs");var C,xe,_,Ut,st,Ct;class ei{constructor(e,i,n){L(this,C,void 0);L(this,xe,void 0);L(this,_,void 0);L(this,Ut,0);L(this,st,0);L(this,Ct,null);O(this,C,e),O(this,xe,i),O(this,_,n),Nt.scrollEntries.register(o(this,C))}get index(){return o(this,xe)}get size(){return o(this,Ut)}get position(){return o(this,st)}destroy(){Nt.scrollEntries.unregister(o(this,C)),o(this,C).style.transform="",this.mark(null)}setSize(e){e?(o(this,C).style.setProperty("--size",e+"px"),o(this,_).axisCSSProperty.current==="x"?(o(this,C).style.width=e+"px",o(this,C).style.height=""):(o(this,C).style.height=e+"px",o(this,C).style.width="")):(o(this,C).style.width="",o(this,C).style.height="",o(this,C).style.removeProperty("--size"))}resize(){O(this,Ut,o(this,_).vertical?o(this,C).offsetHeight:o(this,C).offsetWidth),O(this,st,o(this,_).vertical?_t.getCumulativeOffsetTop(o(this,C)):_t.getCumulativeOffsetLeft(o(this,C))),O(this,st,o(this,st)-o(this,_).contentPosition)}transform(){let e=0;const i=o(this,_).viewportSize*o(this,_).sectionDistanceScaleCSSProperty.current;o(this,_).loopCSSProperty.current&&o(this,_).overscroll&&o(this,st)+o(this,Ut)<o(this,_).currentScrollValue&&(e=o(this,_).distance*-1-o(this,_).gap),Nt.scrollEntries.update(o(this,C),o(this,_).axisCSSProperty.current,e);const n=o(this,_).currentScrollValue+e,h=o(this,st)-o(this,_).viewportSize-i,c=o(this,st)+o(this,Ut)+i,S=ds.clamp(n,h,c);o(this,_).vertical?o(this,C).style.transform=`translate3d(0px, ${S*-1}px, 0px)`:o(this,C).style.transform=`translate3d(${S*-1}px, 0px, 0px)`}mark(e){o(this,Ct)!==e&&(o(this,Ct)&&o(this,C).classList.remove(o(this,Ct)),e&&o(this,C).classList.add(e),O(this,Ct,e),o(this,C).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,Ct)}})))}}C=new WeakMap,xe=new WeakMap,_=new WeakMap,Ut=new WeakMap,st=new WeakMap,Ct=new WeakMap;var si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(r,e,i,n)=>{for(var h=n>1?void 0:n?ii(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&si(e,i,h),h},ws=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(ws(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},m=(r,e,i,n)=>(ws(r,e,"write to private field"),e.set(r,i),i),v=(r,e,i)=>(ws(r,e,"access private method"),i),d,Zt,R,rt,nt,j,ht,Wt,Mt,Q,q,Jt,Qt,Xt,Yt,we,X,jt,xt,Y,qt,wt,Lt,te,ee,se,g,Xe,p,$e,Fe,W,y,I,tt,Bt,bt,$,P,be,zt,de,ve,Ee,ct,ce,We,Ht,ue,Ye,bs,je,ms,Re,ss,Te,is,B,ts,rs,Os,me,qe,Ie,ns,ut,It,Ae,hs;const ni=vs.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends Pt.CustomElement{constructor(){super(),a(this,ce),a(this,Ht),a(this,Ye),a(this,je),a(this,Re),a(this,Te),a(this,rs),a(this,Ie),a(this,ut),a(this,Ae),a(this,d,null),a(this,Zt,new u.CSSProperty(this,"--controls",!0)),a(this,R,new u.CSSProperty(this,"--axis","y")),a(this,rt,new u.CSSProperty(this,"--direction",0)),a(this,nt,new u.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,j,new u.CSSProperty(this,"--split",!1)),a(this,ht,new u.CSSProperty(this,"--sectional",!1)),a(this,Wt,new u.CSSProperty(this,"--auto-size",!1)),a(this,Mt,new u.CSSProperty(this,"--wheel-max-delta",!1)),a(this,Q,new u.CSSProperty(this,"--sections-in-view",1)),a(this,q,new u.CSSProperty(this,"--loop",!1)),a(this,Jt,new u.CSSProperty(this,"--damping",20)),a(this,Qt,new u.CSSProperty(this,"--mass",0)),a(this,Xt,new u.CSSProperty(this,"--stiffness",0)),a(this,Yt,new u.CSSProperty(this,"--mouse-drag",!1)),a(this,we,new u.CSSProperty(this,"--section-distance-scale",.5)),a(this,X,new u.CSSProperty(this,"--autoplay",0)),a(this,jt,new u.CSSProperty(this,"--autoplay-pause-duration",0)),a(this,xt,new u.CSSProperty(this,"--autoplay-user-direction",!1)),a(this,Y,new u.CSSProperty(this,"--classes",0)),a(this,qt,new u.CSSProperty(this,"--current-index-start-offset",0)),a(this,wt,new u.CSSProperty(this,"--current-index-end-offset",0)),a(this,Lt,new u.CSSProperty(this,"--focus-delay",0)),a(this,te,new u.CSSProperty(this,"--focus-duration",3e3)),a(this,ee,new u.CSSProperty(this,"--disabled",!1)),a(this,se,new u.CSSProperty(this,"--hibernated",!1)),a(this,g,null),a(this,Xe,null),a(this,p,[]),a(this,$e,0),a(this,Fe,0),a(this,W,0),a(this,y,0),a(this,I,0),a(this,tt,null),a(this,Bt,null),a(this,bt,null),a(this,$,null),a(this,P,new Et.Store(0)),a(this,be,0),a(this,zt,0),a(this,de,!0),a(this,ve,!0),a(this,Ee,void 0),a(this,ct,new Xs.Tweened),a(this,B,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,P).current;if(m(this,$e,this.vertical?_t.getCumulativeOffsetTop(this):_t.getCumulativeOffsetLeft(this)),m(this,Fe,this.vertical?_t.getCumulativeOffsetTop(t(this,g)):_t.getCumulativeOffsetLeft(t(this,g))),m(this,W,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?m(this,I,Ws.cssUnitParser.parse(getComputedStyle(t(this,g)).rowGap)):m(this,I,Ws.cssUnitParser.parse(getComputedStyle(t(this,g)).columnGap)),t(this,Wt).current&&t(this,p).length){const n=t(this,Q).current,h=(t(this,W)-t(this,I)*(n-1))/n;t(this,p).forEach(c=>{c.setSize(h)})}else t(this,p).forEach(n=>{n.setSize()});if(t(this,p).forEach(n=>{n.resize()}),t(this,nt).current){m(this,y,t(this,W)*t(this,nt).current);const n=t(this,y)+t(this,W);this.vertical?(t(this,g).style.width=n+"px",t(this,g).style.height="100%"):(t(this,g).style.height=n+"px",t(this,g).style.width="100%")}else this.vertical?(t(this,g).style.width="100%",t(this,g).style.height="max-content",m(this,y,t(this,g).offsetHeight-t(this,W))):(t(this,g).style.width="max-content",t(this,g).style.height="100%",m(this,y,t(this,g).offsetWidth-t(this,W)));if(!t(this,q).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);m(this,y,t(this,y)+h),t(this,d).max=t(this,y)}if(t(this,q).current&&t(this,p).length){const n=t(this,p)[t(this,p).length-1],h=n.position+n.size-t(this,W),c=t(this,y)-h;m(this,zt,n.position+n.size+c)}else m(this,zt,t(this,y));if(t(this,ht).current&&t(this,p).length){const n=t(this,p)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0})}),a(this,ts,()=>{const e=this.currentScrollValue;if(m(this,be,Math.max(0,e-t(this,y))),t(this,p).length){let i=0;for(let n=0;n<t(this,p).length;n++){const h=t(this,p)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,P).current=i}else this.vertical?t(this,g).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,g).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Nt.scrollEntries.update(this,t(this,R).current,e)}),a(this,me,(e,i)=>{t(this,Zt).current&&(t(this,xt).current&&(t(this,$).pauseAndContinue(t(this,jt).current),t(this,$).direction=Math.sign(i)||1),t(this,qe).call(this,e,i))}),a(this,qe,(e,i)=>{if(t(this,rt).current){if(t(this,rt).current<0&&i>0)return;if(t(this,rt).current>0&&i<0)return}if(t(this,ct).unlistenAnimationFrame(),!t(this,X).current&&t(this,Lt).current&&(clearInterval(t(this,Ee)),m(this,Ee,setTimeout(()=>{const n=v(this,Ae,hs).call(this);n&&this.scrollToSection(n.index,{tween:{duration:t(this,te).current,easing:Qs.easeInOutExpo}})},t(this,Lt).current))),!(e==="drag"&&!Ys.device.isMobile&&!t(this,Yt).current))if(t(this,ht).current){const n=Math.sign(i);t(this,p).length?this.shiftSections(n):t(this,d).shift(n*t(this,W))}else t(this,d).shift(i)}),fs.isBrowser&&(m(this,d,new zs.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.openShadow(ni),A.element(this,{tabIndex:0,children:[A.div({class:"static",children:[A.slot({name:"static"})]}),A.div({class:"content",children:[A.slot({ref:e=>m(this,Xe,e)})],style:{flexDirection:new Js.Derived(t(this,R),e=>e==="x"?"row":"column")},ref:e=>m(this,g,e)})]}),m(this,tt,new De.WheelControls({element:t(this,g)})),t(this,tt).changeEvent.subscribe(t(this,me)),m(this,Bt,new De.KeyboardControls({element:this})),t(this,Bt).changeEvent.subscribe(t(this,me)),m(this,bt,new De.DragControls({element:t(this,g)})),t(this,bt).changeEvent.subscribe(t(this,me)),m(this,$,new De.AutoplayControls({culling:this})),t(this,$).changeEvent.subscribe(t(this,qe)),t(this,R).subscribe(({current:e})=>{t(this,g).style.flexDirection=e==="x"?"row":"column",t(this,tt).axis=t(this,Mt).current?"max":e,t(this,Bt).dimension=e==="x"?"width":"height",t(this,bt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,B).call(this)}),t(this,Mt).subscribe(e=>{t(this,tt).axis=e.current?"max":t(this,R).current}),t(this,nt).subscribe(()=>{this.isConnected&&t(this,B).call(this)}),t(this,j).subscribe(({current:e})=>{this.isConnected&&(e?v(this,ce,We).call(this):v(this,Ht,ue).call(this))}),t(this,ht).subscribe(e=>{t(this,tt).debounce=e.current,t(this,bt).swipe=e.current,t(this,$).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,p).length?v(this,ce,We).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,Ht,ue).call(this))}),t(this,Wt).subscribe(e=>{this.isConnected&&(t(this,B).call(this),e.current&&!e.previous&&!t(this,p).length?v(this,ce,We).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,Ht,ue).call(this))}),t(this,Q).subscribe(e=>{this.isConnected&&(t(this,B).call(this),v(this,ut,It).call(this))}),t(this,q).subscribe(e=>{e.current?(this.isConnected&&(t(this,p).length||(t(this,j).current=!0)),t(this,p).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(m(this,be,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Jt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Qt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Xt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,ee).subscribe(e=>{e.current&&!e.previous?v(this,Ye,bs).call(this):!e.current&&e.previous&&v(this,je,ms).call(this)}),t(this,se).subscribe(e=>{e.current&&!e.previous?v(this,Re,ss).call(this):!e.current&&e.previous&&v(this,Te,is).call(this)}),t(this,X).subscribe(e=>{t(this,$).speed=e.current,e.current&&!e.previous?t(this,$).connect():!e.current&&e.previous&&t(this,$).disconnect()}),t(this,xt).subscribe(e=>{e.current||(t(this,$).direction=1)}),t(this,Y).subscribe(e=>{this.isConnected&&v(this,ut,It).call(this)}),t(this,qt).subscribe(e=>{this.isConnected&&t(this,Y).current&&v(this,ut,It).call(this)}),t(this,wt).subscribe(e=>{this.isConnected&&t(this,Y).current&&v(this,ut,It).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,p).length&&v(this,ut,It).call(this)}),t(this,ct).subscribe(e=>{t(this,ct).isRunning.current&&t(this,d).set(e.current)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Zt)}get axisCSSProperty(){return t(this,R)}get directionCSSProperty(){return t(this,rt)}get pagesCSSProperty(){return t(this,nt)}get splitCSSProperty(){return t(this,j)}get sectionalCSSProperty(){return t(this,ht)}get autoSizeCSSProperty(){return t(this,Wt)}get wheelMaxDeltaCSSProperty(){return t(this,Mt)}get sectionsInViewCSSProperty(){return t(this,Q)}get loopCSSProperty(){return t(this,q)}get dampingCSSProperty(){return t(this,Jt)}get massCSSProperty(){return t(this,Qt)}get stiffnessCSSProperty(){return t(this,Xt)}get mouseDragCSSProperty(){return t(this,Yt)}get sectionDistanceScaleCSSProperty(){return t(this,we)}get autoplayCSSProperty(){return t(this,X)}get autoplayPauseDurationCSSProperty(){return t(this,jt)}get autoplayUserDirectionCSSProperty(){return t(this,xt)}get classesCSSProperty(){return t(this,Y)}get currentIndexStartOffsetCSSProperty(){return t(this,qt)}get currentIndexEndOffsetCSSProperty(){return t(this,wt)}get focusDelayCSSProperty(){return t(this,Lt)}get focusDurationCSSProperty(){return t(this,te)}get disabledCSSProperty(){return t(this,ee)}get hibernatedCSSProperty(){return t(this,se)}get currentScrollValue(){return v(this,Ie,ns).call(this,"current")}get targetScrollValue(){return v(this,Ie,ns).call(this,"target")}get contentElement(){return t(this,g)}get sections(){return t(this,p)}get position(){return t(this,$e)}get contentPosition(){return t(this,Fe)}get viewportSize(){return t(this,W)}get scrollSize(){return t(this,y)}get gap(){return t(this,I)}get counter(){return t(this,P)}get limit(){return t(this,p).length-t(this,Q).current}get distance(){return t(this,zt)}get loopDistance(){return t(this,q).current?t(this,zt)+t(this,I):t(this,zt)}get overscroll(){return t(this,be)}get vertical(){return t(this,R).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,R).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,R).current==="x"?0:t(this,d).distance}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i){if(!t(this,p).length)return;const n=t(this,P).current;v(this,rs,Os).call(this,e);const h=t(this,p)[n],c=t(this,p)[t(this,P).current];if(h&&c){let S=0;const Oe=v(this,Ae,hs).call(this),Us=Oe?this.targetScrollValue-Oe.position:0;t(this,q).current?t(this,P).current===0&&n===t(this,p).length-1?S=t(this,y)+t(this,W)-h.position+t(this,I):t(this,P).current===t(this,p).length-1&&n===0?S=c.position-(t(this,y)+t(this,W)+t(this,I)):S=c.position-h.position:S=c.position-h.position,this.shiftPosition(S-Us,i)}}shiftSections(e,i){t(this,p).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){i!=null&&i.tween?(t(this,ct).set(t(this,d).current,{equalize:!0}),t(this,ct).set(e,ks({},i.tween))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}connectedCallback(){t(this,Zt).observe(),t(this,R).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,j).observe(),t(this,ht).observe(),t(this,Wt).observe(),t(this,Mt).observe(),t(this,Q).observe(),t(this,q).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,Xt).observe(),t(this,Yt).observe(),t(this,we).observe(),t(this,X).observe(),t(this,X).observe(),t(this,jt).observe(),t(this,xt).observe(),t(this,Y).observe(),t(this,qt).observe(),t(this,wt).observe(),t(this,Lt).observe(),t(this,te).observe(),t(this,ee).observe(),t(this,se).observe(),v(this,Te,is).call(this)}disconnectedCallback(){t(this,Zt).unobserve(),t(this,R).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,j).unobserve(),t(this,ht).unobserve(),t(this,Wt).unobserve(),t(this,Mt).unobserve(),t(this,Q).unobserve(),t(this,q).unobserve(),t(this,Jt).unobserve(),t(this,Qt).unobserve(),t(this,Xt).unobserve(),t(this,Yt).unobserve(),t(this,we).unobserve(),t(this,X).unobserve(),t(this,jt).unobserve(),t(this,xt).unobserve(),t(this,Y).unobserve(),t(this,qt).unobserve(),t(this,wt).unobserve(),t(this,Lt).unobserve(),t(this,te).unobserve(),t(this,ee).unobserve(),t(this,se).unobserve(),v(this,Re,ss).call(this)}};d=new WeakMap;Zt=new WeakMap;R=new WeakMap;rt=new WeakMap;nt=new WeakMap;j=new WeakMap;ht=new WeakMap;Wt=new WeakMap;Mt=new WeakMap;Q=new WeakMap;q=new WeakMap;Jt=new WeakMap;Qt=new WeakMap;Xt=new WeakMap;Yt=new WeakMap;we=new WeakMap;X=new WeakMap;jt=new WeakMap;xt=new WeakMap;Y=new WeakMap;qt=new WeakMap;wt=new WeakMap;Lt=new WeakMap;te=new WeakMap;ee=new WeakMap;se=new WeakMap;g=new WeakMap;Xe=new WeakMap;p=new WeakMap;$e=new WeakMap;Fe=new WeakMap;W=new WeakMap;y=new WeakMap;I=new WeakMap;tt=new WeakMap;Bt=new WeakMap;bt=new WeakMap;$=new WeakMap;P=new WeakMap;be=new WeakMap;zt=new WeakMap;de=new WeakMap;ve=new WeakMap;Ee=new WeakMap;ct=new WeakMap;ce=new WeakSet;We=function(){v(this,Ht,ue).call(this),t(this,Xe).assignedElements().forEach((r,e)=>{r instanceof HTMLElement&&t(this,p).push(new ei(r,e,this))}),t(this,g).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,B).call(this),v(this,ut,It).call(this)};Ht=new WeakSet;ue=function(){t(this,p).forEach(r=>{r.destroy()}),m(this,p,[]),t(this,P).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Ye=new WeakSet;bs=function(){t(this,de)||(m(this,de,!0),t(this,d).unsubscribe(t(this,ts)),t(this,d).unlistenAnimationFrame(),t(this,tt).disconnect(),t(this,Bt).disconnect(),t(this,bt).disconnect(),t(this,$).disconnect(),clearInterval(t(this,Ee)),t(this,ct).unlistenAnimationFrame())};je=new WeakSet;ms=function(){t(this,de)&&(m(this,de,!1),t(this,d).subscribe(t(this,ts)),t(this,tt).connect(),t(this,Bt).connect(),t(this,bt).connect(),t(this,X).current&&t(this,$).connect())};Re=new WeakSet;ss=function(){t(this,ve)||(m(this,ve,!0),fe.windowResizer.unsubscribe(t(this,B)),Qe.elementResizer.unsubscribe(t(this,B)),t(this,d).reset(),v(this,Ye,bs).call(this),t(this,g).style.transform="",t(this,j).current&&v(this,Ht,ue).call(this),Nt.scrollEntries.unregister(this))};Te=new WeakSet;is=function(){t(this,ve)&&(m(this,ve,!1),t(this,j).current&&v(this,ce,We).call(this),Nt.scrollEntries.register(this),fe.windowResizer.subscribe(t(this,B),Me.RESIZE_ORDER.SCROLL),Qe.elementResizer.subscribe(this,t(this,B)),v(this,je,ms).call(this))};B=new WeakMap;ts=new WeakMap;rs=new WeakSet;Os=function(r){t(this,q).current?(t(this,P).current=r%t(this,p).length,t(this,P).current=t(this,P).current<0?t(this,p).length+t(this,P).current:t(this,P).current):t(this,P).current=ds.clamp(r,0,this.limit)};me=new WeakMap;qe=new WeakMap;Ie=new WeakSet;ns=function(r="current"){if(t(this,q).current&&t(this,p).length){const e=t(this,d)[r]%(t(this,y)+t(this,W)+t(this,I));return e<0?t(this,y)+e+t(this,W)+t(this,I):e}else return t(this,d)[r]};ut=new WeakSet;It=function(){if(t(this,Y).current&&t(this,p).length){const r=t(this,P).current+t(this,qt).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,Q).current+t(this,wt).current;t(this,p).forEach((i,n)=>{const h=r-this.limit-1+t(this,wt).current,c=r+e,S=this.sections.length-c;n>=r&&n<c||n<=h?i.mark("current"):n>=c&&n<c+S/2||n<=h+e?i.mark("next"):i.mark("previous")})}};Ae=new WeakSet;hs=function(){let r=null,e=1/0;for(let i=0;i<t(this,p).length;i++){const n=Math.abs(t(this,p)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,p)[r]:null};exports.ScrollElement=ri([Pt.define("e-scroll")],exports.ScrollElement);var Le;class es extends Pt.CustomElement{constructor(){super(...arguments);L(this,Le,null)}get scrollElement(){return o(this,Le)}connectedCallback(){const i=ti.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?O(this,Le,i):console.error(this,"e-scroll not found")}}Le=new WeakMap;var hi=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ai=(r,e,i,n)=>{for(var h=n>1?void 0:n?oi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&hi(e,i,h),h},Ds=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},f=(r,e,i)=>(Ds(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},kt=(r,e,i,n)=>(Ds(r,e,"write to private field"),e.set(r,i),i),ge,T,ot,at,Ce,ye,ie,Be,He,Ge;const li=vs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:Ms.aptechkaTheme.colorFont.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:Ms.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends es{constructor(){super(),N(this,ge,null),N(this,T,null),N(this,ot,!1),N(this,at,0),N(this,Ce,0),N(this,ye,0),N(this,ie,()=>{kt(this,ot,this.offsetWidth>this.offsetHeight);const e=f(this,ot)?this.offsetWidth:this.offsetHeight;kt(this,at,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),kt(this,at,Math.max(f(this,at),30)),f(this,ot)?(f(this,T).style.width=f(this,at)+"px",f(this,T).style.height="100%"):(f(this,T).style.width="100%",f(this,T).style.height=f(this,at)+"px"),kt(this,Ce,e-f(this,at)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,Be,()=>{kt(this,ye,this.scrollElement.currentProgress*f(this,Ce)),f(this,ot)?f(this,T).style.transform=`translate3d(${f(this,ye)}px, 0px, 0px)`:f(this,T).style.transform=`translate3d(0px, ${f(this,ye)}px, 0px)`}),N(this,He,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,Ge,e=>{document.documentElement.classList.add("grabbing"),js.setupDrag(h=>{const c=f(this,ot)?h.x:h.y,S=this.scrollElement.distance/f(this,Ce),Oe=(c-n)*S;this.scrollElement.setPosition(i+Oe)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=f(this,ot)?e.x:e.y}),fs.isBrowser&&(this.openShadow(li),A.element(this,{slot:"static","drag-dead-zone":"",children:[A.slot({ref:e=>kt(this,ge,e),children:A.div({class:"default-thumb"})})]}))}get thumbElement(){return f(this,T)}connectedCallback(){super.connectedCallback();const e=f(this,ge).assignedElements()[0]||f(this,ge).firstElementChild;kt(this,T,e),f(this,T).addEventListener("pointerdown",f(this,Ge)),fe.windowResizer.subscribe(f(this,ie),Me.RESIZE_ORDER.SCROLL+1),Qe.elementResizer.subscribe(this,f(this,ie)),this.scrollElement.onScroll(f(this,Be)),this.scrollElement.axisCSSProperty.subscribe(f(this,He))}disconnectedCallback(){f(this,T).removeEventListener("pointerdown",f(this,Ge)),fe.windowResizer.unsubscribe(f(this,ie)),Qe.elementResizer.unsubscribe(f(this,ie)),this.scrollElement.offScroll(f(this,Be)),this.scrollElement.axisCSSProperty.unsubscribe(f(this,He))}};ge=new WeakMap;T=new WeakMap;ot=new WeakMap;at=new WeakMap;Ce=new WeakMap;ye=new WeakMap;ie=new WeakMap;Be=new WeakMap;He=new WeakMap;Ge=new WeakMap;exports.ScrollbarElement=ai([Pt.define("e-scrollbar")],exports.ScrollbarElement);const ci=vs.createStylesheet({button:{all:"inherit"}});class $s extends es{constructor(){super(),this.openShadow(ci),fs.isBrowser&&A.element(this,{children:[A.button({onClick:()=>{this.handleClick()},children:[A.slot()]})]})}}var ui=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,Si=(r,e,i,n)=>{for(var h=n>1?void 0:n?pi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ui(e,i,h),h};exports.ScrollSetButtonElement=class extends $s{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),{behaviour:i})}};exports.ScrollSetButtonElement=Si([Pt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var fi=Object.defineProperty,di=Object.getOwnPropertyDescriptor,vi=(r,e,i,n)=>{for(var h=n>1?void 0:n?di(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&fi(e,i,h),h};exports.ScrollStepButtonElement=class extends $s{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),{behaviour:i})}};exports.ScrollStepButtonElement=vi([Pt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var wi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,mi=(r,e,i,n)=>{for(var h=n>1?void 0:n?bi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&wi(e,i,h),h},Fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Kt=(r,e,i)=>(Fs(r,e,"read from private field"),i?i.call(r):e.get(r)),xs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Ls=(r,e,i,n)=>(Fs(r,e,"write to private field"),e.set(r,i),i),Vt,_e,it,yt,pe,ze,Ve,Se;class gi{constructor(e,i,n){L(this,it,void 0);L(this,yt,void 0);L(this,pe,void 0);L(this,ze,void 0);L(this,Ve,()=>{o(this,yt).scrollToSection(o(this,pe),{behaviour:o(this,ze)})});L(this,Se,()=>{o(this,it).classList.toggle("current",o(this,yt).counter.current===o(this,pe))});O(this,it,document.createElement("button")),O(this,yt,e),O(this,ze,n),O(this,pe,i),o(this,it).addEventListener("click",o(this,Ve)),o(this,yt).counter.subscribe(o(this,Se)),o(this,Se).call(this)}get element(){return o(this,it)}destroy(){o(this,it).removeEventListener("click",o(this,Ve)),o(this,yt).counter.unsubscribe(o(this,Se)),o(this,it).remove()}}it=new WeakMap,yt=new WeakMap,pe=new WeakMap,ze=new WeakMap,Ve=new WeakMap,Se=new WeakMap;exports.ScrollBulletButtonsElement=class extends es{constructor(){super(...arguments),xs(this,Vt,[]),xs(this,_e,Vs.debounce(()=>{Kt(this,Vt).forEach(e=>e.destroy()),Ls(this,Vt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new gi(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Kt(this,Vt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Kt(this,_e)),Kt(this,_e).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Kt(this,_e)),Kt(this,Vt).forEach(e=>e.destroy()),Ls(this,Vt,[])}};Vt=new WeakMap;_e=new WeakMap;exports.ScrollBulletButtonsElement=mi([Pt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Ci=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,_i=(r,e,i,n)=>{for(var h=n>1?void 0:n?yi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ci(e,i,h),h},gs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(gs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},b=(r,e,i,n)=>(gs(r,e,"write to private field"),e.set(r,i),i),E=(r,e,i)=>(gs(r,e,"access private method"),i),re,ne,he,oe,Ot,Dt,$t,Ft,F,H,G,U,At,x,pt,St,ft,dt,vt,M,J,Z,mt,gt,et,Ue,w,ae,le,Ne,z,Rt,D,V,K,Pe,Gt,k,os,Rs,as,Ts,ls,qs,cs,Is,us,As,ps,Bs,Ke,ke,lt,Tt,Cs,Hs,ys,Gs,Ze,Ss,Je;exports.ScrollSegmentElement=class extends es{constructor(){super(),l(this,os),l(this,as),l(this,ls),l(this,cs),l(this,us),l(this,ps),l(this,lt),l(this,Cs),l(this,ys),l(this,Ze),l(this,re,new u.CSSProperty(this,"--damping",20)),l(this,ne,new u.CSSProperty(this,"--mass",0)),l(this,he,new u.CSSProperty(this,"--stiffness",0)),l(this,oe,new u.CSSProperty(this,"--target","")),l(this,Ot,new u.CSSProperty(this,"--disabled",!1)),l(this,Dt,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),l(this,$t,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),l(this,Ft,new u.CSSProperty(this,"--capture-once",!1)),l(this,F,new u.CSSProperty(this,"--captured","")),l(this,H,new u.CSSProperty(this,"--released","")),l(this,G,new u.CSSProperty(this,"--captured-from-start","")),l(this,U,new u.CSSProperty(this,"--captured-from-finish","")),l(this,At,new u.CSSProperty(this,"--released-from-start","")),l(this,x,new u.CSSProperty(this,"--released-from-finish","")),l(this,pt,new u.CSSProperty(this,"--passed-var","")),l(this,St,new u.CSSProperty(this,"--progress-var","")),l(this,ft,new u.CSSProperty(this,"--distance-var","")),l(this,dt,new u.CSSProperty(this,"--start-var","")),l(this,vt,new u.CSSProperty(this,"--finish-var","")),l(this,M,new Et.Store(!1)),l(this,J,new Et.Store(!1)),l(this,Z,new Et.Store(!1)),l(this,mt,new Et.Store(!1)),l(this,gt,new Et.Store(!1)),l(this,et,new Et.Store(!1)),l(this,Ue,[]),l(this,w,this),l(this,ae,0),l(this,le,0),l(this,Ne,0),l(this,z,new zs.Damped(0,{order:Me.TICK_ORDER.SCROLL-1,min:0,max:1})),l(this,Rt,0),l(this,D,0),l(this,V,0),l(this,K,0),l(this,Pe,!1),l(this,Gt,!1),l(this,k,!0),l(this,Ke,()=>{s(this,k)||(this.resize(),s(this,ke).call(this))}),l(this,ke,()=>{!s(this,k)&&s(this,Pe)&&this.tick()}),l(this,Je,Vs.debounce(()=>{const e=Nt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),b(this,Ue,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,Dt)}get startOffsetCSSProperty(){return s(this,$t)}get captureOnceCSSProperty(){return s(this,Ft)}get capturedCSSProperty(){return s(this,F)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,At)}get releasedFromFinishCSSProperty(){return s(this,x)}get passedVarCSSProperty(){return s(this,pt)}get progressVarCSSProperty(){return s(this,St)}get distanceVarCSSProperty(){return s(this,ft)}get startVarCSSProperty(){return s(this,dt)}get finishVarCSSProperty(){return s(this,vt)}get disabledCSSProperty(){return s(this,Ot)}get dampingCSSProperty(){return s(this,re)}get massCSSProperty(){return s(this,ne)}get stiffnessCSSProperty(){return s(this,he)}get targetCSSProperty(){return s(this,oe)}get isCaptured(){return s(this,M)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,Z)}get isReleasedFromStart(){return s(this,mt)}get isCapturedFromFinish(){return s(this,gt)}get isReleasedFromFinish(){return s(this,et)}get directionPosition(){return s(this,ae)}get directionSize(){return s(this,le)}get passed(){return s(this,z)}get progress(){return s(this,Rt)}get start(){return s(this,D)}get finish(){return s(this,K)}get distance(){return s(this,V)}get isCapturedOnce(){return s(this,Gt)}get isDisabled(){return s(this,k)}resize(){b(this,le,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),b(this,ae,this.scrollElement.vertical?_t.getCumulativeOffsetTop(this,this.scrollElement):_t.getCumulativeOffsetLeft(this,this.scrollElement)),b(this,D,this.getStart()),b(this,V,this.getDistance()),b(this,D,s(this,D)+s(this,$t).current),b(this,V,s(this,V)+s(this,Dt).current),b(this,K,s(this,D)+s(this,V)),this.scrollElement.currentScrollValue>s(this,K)&&!s(this,M).current&&!s(this,J).current&&(s(this,M).current=!0),this.setVar(s(this,dt).current,s(this,D)),this.setVar(s(this,vt).current,s(this,K)),this.setVar(s(this,ft).current,s(this,V)),s(this,z).max=s(this,V),b(this,Pe,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,Ue).forEach(n=>{e+=n.value}),s(this,z).set(e-s(this,D));const i=Math.round(e);s(this,M).current&&(i>s(this,D)?s(this,Z).current||E(this,ls,qs).call(this):s(this,Z).current&&!s(this,mt).current&&E(this,us,As).call(this),i<s(this,K)?s(this,et).current&&!s(this,gt).current&&E(this,cs,Is).call(this):s(this,Z).current&&!s(this,et).current&&E(this,ps,Bs).call(this)),i>s(this,D)&&i<s(this,K)?s(this,M).current||E(this,os,Rs).call(this):s(this,M).current&&(s(this,z).set(ds.step(s(this,V)/2,s(this,z).current,0,s(this,V))),E(this,as,Ts).call(this)),s(this,Gt)&&s(this,Ft).current&&(s(this,F).current&&s(this,w).classList.add(s(this,F).current),b(this,k,!0))}disable(){this.style.cssText="",b(this,ae,0),b(this,le,0),s(this,z).reset(),b(this,Rt,0),b(this,D,0),b(this,V,0),b(this,K,0),b(this,Pe,!1),s(this,M).current=!1,s(this,J).current=!1,s(this,Z).current=!1,s(this,mt).current=!1,s(this,gt).current=!1,s(this,et).current=!1,b(this,Gt,!1),b(this,k,!0),E(this,Ze,Ss).call(this)}enable(){b(this,k,!1)}connectedCallback(){super.connectedCallback(),s(this,re).observe(),s(this,ne).observe(),s(this,he).observe(),s(this,oe).observe(),s(this,Ot).observe(),s(this,Dt).observe(),s(this,$t).observe(),s(this,Ft).observe(),s(this,F).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,At).observe(),s(this,x).observe(),s(this,pt).observe(),s(this,St).observe(),s(this,ft).observe(),s(this,dt).observe(),s(this,vt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,Je)),s(this,Je).call(this),s(this,Ot).current||this.enable(),s(this,re).subscribe(i=>{s(this,z).damping=i.current}),s(this,ne).subscribe(i=>{s(this,z).mass=i.current}),s(this,he).subscribe(i=>{s(this,z).stiffness=i.current}),s(this,oe).subscribe(i=>{i.previous&&E(this,Ze,Ss).call(this),i.current?i.current==="parent"?b(this,w,this.parentElement||this):b(this,w,document.querySelector(i.current)||this):b(this,w,this)}),s(this,Ot).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,$t).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,Dt).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,F).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,G).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,U).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,H).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,At).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,x).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,Ft).subscribe(i=>{s(this,k)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,pt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,this.passed.current))}),s(this,St).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,Rt)))}),s(this,dt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,D)))}),s(this,vt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,K)))}),s(this,ft).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,V)))}),s(this,z).subscribe(i=>{b(this,Rt,s(this,z).current/s(this,V)||0),this.setVar(s(this,pt).current,s(this,z).current.toFixed(6)),this.setVar(s(this,St).current,s(this,Rt).toFixed(6))}),fe.windowResizer.subscribe(s(this,Ke),Me.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,ke)),e=!0}disconnectedCallback(){fe.windowResizer.unsubscribe(s(this,Ke)),this.scrollElement.offScroll(s(this,ke)),s(this,re).close(),s(this,ne).close(),s(this,he).close(),s(this,oe).close(),s(this,Ot).close(),s(this,Dt).close(),s(this,$t).close(),s(this,Ft).close(),s(this,F).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,At).close(),s(this,x).close(),s(this,pt).close(),s(this,St).close(),s(this,ft).close(),s(this,dt).close(),s(this,vt).close(),s(this,M).close(),s(this,J).close(),s(this,Z).close(),s(this,mt).close(),s(this,gt).close(),s(this,et).close(),this.disable()}removeVar(e){e&&s(this,w).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,w).style.setProperty(`--${e}`,i.toString())}getDistance(){return s(this,le)+s(this,Ne)}getStart(){return s(this,ae)-s(this,Ne)}};re=new WeakMap;ne=new WeakMap;he=new WeakMap;oe=new WeakMap;Ot=new WeakMap;Dt=new WeakMap;$t=new WeakMap;Ft=new WeakMap;F=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;At=new WeakMap;x=new WeakMap;pt=new WeakMap;St=new WeakMap;ft=new WeakMap;dt=new WeakMap;vt=new WeakMap;M=new WeakMap;J=new WeakMap;Z=new WeakMap;mt=new WeakMap;gt=new WeakMap;et=new WeakMap;Ue=new WeakMap;w=new WeakMap;ae=new WeakMap;le=new WeakMap;Ne=new WeakMap;z=new WeakMap;Rt=new WeakMap;D=new WeakMap;V=new WeakMap;K=new WeakMap;Pe=new WeakMap;Gt=new WeakMap;k=new WeakMap;os=new WeakSet;Rs=function(){s(this,M).current=!0,s(this,J).current=!1,b(this,Gt,!0),s(this,H).current&&s(this,w).classList.remove(s(this,H).current),s(this,x).current&&s(this,w).classList.remove(s(this,x).current),s(this,x).current&&s(this,w).classList.remove(s(this,x).current),s(this,F).current&&s(this,w).classList.add(s(this,F).current)};as=new WeakSet;Ts=function(){s(this,J).current=!0,s(this,M).current=!1,b(this,Gt,!0),s(this,F).current&&s(this,w).classList.remove(s(this,F).current),s(this,G).current&&s(this,w).classList.remove(s(this,G).current),s(this,U).current&&s(this,w).classList.remove(s(this,U).current),s(this,H).current&&s(this,w).classList.add(s(this,H).current)};ls=new WeakSet;qs=function(){s(this,M).current=!0,s(this,Z).current=!0,s(this,mt).current=!1,s(this,G).current&&s(this,w).classList.add(s(this,G).current)};cs=new WeakSet;Is=function(){s(this,M).current=!0,s(this,gt).current=!0,s(this,et).current=!1,s(this,U).current&&s(this,w).classList.add(s(this,U).current)};us=new WeakSet;As=function(){s(this,J).current=!0,s(this,mt).current=!0,s(this,Z).current=!1,s(this,x).current&&s(this,w).classList.add(s(this,x).current)};ps=new WeakSet;Bs=function(){s(this,J).current=!0,s(this,et).current=!0,s(this,gt).current=!1,s(this,x).current&&s(this,w).classList.add(s(this,x).current)};Ke=new WeakMap;ke=new WeakMap;lt=new WeakSet;Tt=function(r){if(s(this,k)){r.previous&&s(this,w).classList.remove(r.previous),r.current&&s(this,w).classList.remove(r.current);return}r.current&&s(this,M).current?(r.previous&&s(this,w).classList.remove(r.previous),s(this,w).classList.add(r.current)):!r.current&&r.previous&&s(this,w).classList.remove(r.previous)};Cs=new WeakSet;Hs=function(...r){r.forEach(e=>{e&&s(this,w).classList.remove(e)})};ys=new WeakSet;Gs=function(...r){r.forEach(e=>{e&&s(this,w).style.removeProperty(`--${e}`)})};Ze=new WeakSet;Ss=function(){E(this,Cs,Hs).call(this,s(this,F).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,At).current,s(this,x).current),E(this,ys,Gs).call(this,s(this,pt).current,s(this,St).current,s(this,ft).current,s(this,dt).current,s(this,vt).current)};Je=new WeakMap;exports.ScrollSegmentElement=_i([Pt.define("e-scroll-segment")],exports.ScrollSegmentElement);
1
+ "use strict";var Ns=Object.defineProperty;var _s=Object.getOwnPropertySymbols;var Ks=Object.prototype.hasOwnProperty,Zs=Object.prototype.propertyIsEnumerable;var Ps=(r,e,i)=>e in r?Ns(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i,ks=(r,e)=>{for(var i in e||(e={}))Ks.call(e,i)&&Ps(r,i,e[i]);if(_s)for(var i of _s(e))Zs.call(e,i)&&Ps(r,i,e[i]);return r};var Es=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(Es(r,e,"read from private field"),i?i.call(r):e.get(r)),L=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},O=(r,e,i,n)=>(Es(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Et=require("../Store-Cr3VaD9G.cjs"),Js=require("../Derived-D9VrDuf9.cjs"),fs=require("../browser-CpzFX2xg.cjs"),Qs=require("../easings-DsS5-Kqc.cjs"),_t=require("../layout-8ryRAMGJ.cjs"),ds=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Me=require("../order/index.cjs"),zs=require("../Damped-Da3EnNN4.cjs"),Xs=require("../Tweened-DksN-Rz6.cjs"),De=require("../controls/index.cjs"),Pt=require("../custom-element/index.cjs"),fe=require("../window-resizer/index.cjs"),Nt=require("../scroll-entries/index.cjs"),A=require("../tags-CAfasCGV.cjs"),vs=require("../createStylesheet-BsMSWX0q.cjs"),Ws=require("../css-unit-parser/index.cjs"),u=require("../css-property/index.cjs"),Ys=require("../Viewport-BBYt1Ivy.cjs"),Qe=require("../element-resizer/index.cjs"),js=require("../gestures-DHLrn6Q8.cjs"),Ms=require("../theme/index.cjs"),ti=require("../dom-JBOkFLTh.cjs"),Vs=require("../function-MthRj-GJ.cjs");var C,xe,_,Ut,st,Ct;class ei{constructor(e,i,n){L(this,C,void 0);L(this,xe,void 0);L(this,_,void 0);L(this,Ut,0);L(this,st,0);L(this,Ct,null);O(this,C,e),O(this,xe,i),O(this,_,n),Nt.scrollEntries.register(o(this,C))}get index(){return o(this,xe)}get size(){return o(this,Ut)}get position(){return o(this,st)}destroy(){Nt.scrollEntries.unregister(o(this,C)),o(this,C).style.transform="",this.mark(null)}setSize(e){e?(o(this,C).style.setProperty("--size",e+"px"),o(this,_).axisCSSProperty.current==="x"?(o(this,C).style.width=e+"px",o(this,C).style.height=""):(o(this,C).style.height=e+"px",o(this,C).style.width="")):(o(this,C).style.width="",o(this,C).style.height="",o(this,C).style.removeProperty("--size"))}resize(){O(this,Ut,o(this,_).vertical?o(this,C).offsetHeight:o(this,C).offsetWidth),O(this,st,o(this,_).vertical?_t.getCumulativeOffsetTop(o(this,C)):_t.getCumulativeOffsetLeft(o(this,C))),O(this,st,o(this,st)-o(this,_).contentPosition)}transform(){let e=0;const i=o(this,_).viewportSize*o(this,_).sectionDistanceScaleCSSProperty.current;o(this,_).loopCSSProperty.current&&o(this,_).overscroll&&o(this,st)+o(this,Ut)<o(this,_).currentScrollValue&&(e=o(this,_).distance*-1-o(this,_).gap),Nt.scrollEntries.update(o(this,C),o(this,_).axisCSSProperty.current,e);const n=o(this,_).currentScrollValue+e,h=o(this,st)-o(this,_).viewportSize-i,c=o(this,st)+o(this,Ut)+i,S=ds.clamp(n,h,c);o(this,_).vertical?o(this,C).style.transform=`translate3d(0px, ${S*-1}px, 0px)`:o(this,C).style.transform=`translate3d(${S*-1}px, 0px, 0px)`}mark(e){o(this,Ct)!==e&&(o(this,Ct)&&o(this,C).classList.remove(o(this,Ct)),e&&o(this,C).classList.add(e),O(this,Ct,e),o(this,C).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,Ct)}})))}}C=new WeakMap,xe=new WeakMap,_=new WeakMap,Ut=new WeakMap,st=new WeakMap,Ct=new WeakMap;var si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(r,e,i,n)=>{for(var h=n>1?void 0:n?ii(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&si(e,i,h),h},ws=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(ws(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},m=(r,e,i,n)=>(ws(r,e,"write to private field"),e.set(r,i),i),v=(r,e,i)=>(ws(r,e,"access private method"),i),d,Zt,R,rt,nt,j,ht,Wt,Mt,Q,q,Jt,Qt,Xt,Yt,we,X,jt,xt,Y,qt,wt,Lt,te,ee,se,g,Xe,p,$e,Fe,W,y,I,tt,Bt,bt,$,P,be,zt,de,ve,Ee,ct,ce,We,Ht,ue,Ye,bs,je,ms,Re,ss,Te,is,B,ts,rs,Os,me,qe,Ie,ns,ut,It,Ae,hs;const ni=vs.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends Pt.CustomElement{constructor(){super(),a(this,ce),a(this,Ht),a(this,Ye),a(this,je),a(this,Re),a(this,Te),a(this,rs),a(this,Ie),a(this,ut),a(this,Ae),a(this,d,null),a(this,Zt,new u.CSSProperty(this,"--controls",!0)),a(this,R,new u.CSSProperty(this,"--axis","y")),a(this,rt,new u.CSSProperty(this,"--direction",0)),a(this,nt,new u.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,j,new u.CSSProperty(this,"--split",!1)),a(this,ht,new u.CSSProperty(this,"--sectional",!1)),a(this,Wt,new u.CSSProperty(this,"--auto-size",!1)),a(this,Mt,new u.CSSProperty(this,"--wheel-max-delta",!1)),a(this,Q,new u.CSSProperty(this,"--sections-in-view",1)),a(this,q,new u.CSSProperty(this,"--loop",!1)),a(this,Jt,new u.CSSProperty(this,"--damping",20)),a(this,Qt,new u.CSSProperty(this,"--mass",0)),a(this,Xt,new u.CSSProperty(this,"--stiffness",0)),a(this,Yt,new u.CSSProperty(this,"--mouse-drag",!1)),a(this,we,new u.CSSProperty(this,"--section-distance-scale",.5)),a(this,X,new u.CSSProperty(this,"--autoplay",0)),a(this,jt,new u.CSSProperty(this,"--autoplay-pause-duration",0)),a(this,xt,new u.CSSProperty(this,"--autoplay-user-direction",!1)),a(this,Y,new u.CSSProperty(this,"--classes",0)),a(this,qt,new u.CSSProperty(this,"--current-index-start-offset",0)),a(this,wt,new u.CSSProperty(this,"--current-index-end-offset",0)),a(this,Lt,new u.CSSProperty(this,"--focus-delay",0)),a(this,te,new u.CSSProperty(this,"--focus-duration",3e3)),a(this,ee,new u.CSSProperty(this,"--disabled",!1)),a(this,se,new u.CSSProperty(this,"--hibernated",!1)),a(this,g,null),a(this,Xe,null),a(this,p,[]),a(this,$e,0),a(this,Fe,0),a(this,W,0),a(this,y,0),a(this,I,0),a(this,tt,null),a(this,Bt,null),a(this,bt,null),a(this,$,null),a(this,P,new Et.Store(0)),a(this,be,0),a(this,zt,0),a(this,de,!0),a(this,ve,!0),a(this,Ee,void 0),a(this,ct,new Xs.Tweened),a(this,B,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,P).current;if(m(this,$e,this.vertical?_t.getCumulativeOffsetTop(this):_t.getCumulativeOffsetLeft(this)),m(this,Fe,this.vertical?_t.getCumulativeOffsetTop(t(this,g)):_t.getCumulativeOffsetLeft(t(this,g))),m(this,W,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?m(this,I,Ws.cssUnitParser.parse(getComputedStyle(t(this,g)).rowGap)):m(this,I,Ws.cssUnitParser.parse(getComputedStyle(t(this,g)).columnGap)),t(this,Wt).current&&t(this,p).length){const n=t(this,Q).current,h=(t(this,W)-t(this,I)*(n-1))/n;t(this,p).forEach(c=>{c.setSize(h)})}else t(this,p).forEach(n=>{n.setSize()});if(t(this,p).forEach(n=>{n.resize()}),t(this,nt).current){m(this,y,t(this,W)*t(this,nt).current);const n=t(this,y)+t(this,W);this.vertical?(t(this,g).style.width=n+"px",t(this,g).style.height="100%"):(t(this,g).style.height=n+"px",t(this,g).style.width="100%")}else this.vertical?(t(this,g).style.width="100%",t(this,g).style.height="max-content",m(this,y,t(this,g).offsetHeight-t(this,W))):(t(this,g).style.width="max-content",t(this,g).style.height="100%",m(this,y,t(this,g).offsetWidth-t(this,W)));if(!t(this,q).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);m(this,y,t(this,y)+h),t(this,d).max=t(this,y)}if(t(this,q).current&&t(this,p).length){const n=t(this,p)[t(this,p).length-1],h=n.position+n.size-t(this,W),c=t(this,y)-h;m(this,zt,n.position+n.size+c)}else m(this,zt,t(this,y));if(t(this,ht).current&&t(this,p).length){const n=t(this,p)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0})}),a(this,ts,()=>{const e=this.currentScrollValue;if(m(this,be,Math.max(0,e-t(this,y))),t(this,p).length){let i=0;for(let n=0;n<t(this,p).length;n++){const h=t(this,p)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,P).current=i}else this.vertical?t(this,g).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,g).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Nt.scrollEntries.update(this,t(this,R).current,e)}),a(this,me,(e,i)=>{t(this,Zt).current&&(t(this,xt).current&&(t(this,$).pauseAndContinue(t(this,jt).current),t(this,$).direction=Math.sign(i)||1),t(this,qe).call(this,e,i))}),a(this,qe,(e,i)=>{if(t(this,rt).current){if(t(this,rt).current<0&&i>0)return;if(t(this,rt).current>0&&i<0)return}if(t(this,ct).unlistenAnimationFrame(),!t(this,X).current&&t(this,Lt).current&&(clearInterval(t(this,Ee)),m(this,Ee,setTimeout(()=>{const n=v(this,Ae,hs).call(this);n&&this.scrollToSection(n.index,{tween:{duration:t(this,te).current,easing:Qs.easeInOutExpo}})},t(this,Lt).current))),!(e==="drag"&&!Ys.device.isMobile&&!t(this,Yt).current))if(t(this,ht).current){const n=Math.sign(i);t(this,p).length?this.shiftSections(n):t(this,d).shift(n*t(this,W))}else t(this,d).shift(i)}),fs.isBrowser&&(m(this,d,new zs.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.openShadow(ni),A.element(this,{tabIndex:0,children:[A.div({class:"static",children:[A.slot({name:"static"})]}),A.div({class:"content",children:[A.slot({ref:e=>m(this,Xe,e)})],style:{flexDirection:new Js.Derived(t(this,R),e=>e==="x"?"row":"column")},ref:e=>m(this,g,e)})]}),m(this,tt,new De.WheelControls({element:t(this,g)})),t(this,tt).changeEvent.subscribe(t(this,me)),m(this,Bt,new De.KeyboardControls({element:this})),t(this,Bt).changeEvent.subscribe(t(this,me)),m(this,bt,new De.DragControls({element:t(this,g)})),t(this,bt).changeEvent.subscribe(t(this,me)),m(this,$,new De.AutoplayControls({culling:this})),t(this,$).changeEvent.subscribe(t(this,qe)),t(this,R).subscribe(({current:e})=>{t(this,g).style.flexDirection=e==="x"?"row":"column",t(this,tt).axis=t(this,Mt).current?"max":e,t(this,Bt).dimension=e==="x"?"width":"height",t(this,bt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,B).call(this)}),t(this,Mt).subscribe(e=>{t(this,tt).axis=e.current?"max":t(this,R).current}),t(this,nt).subscribe(()=>{this.isConnected&&t(this,B).call(this)}),t(this,j).subscribe(({current:e})=>{this.isConnected&&(e?v(this,ce,We).call(this):v(this,Ht,ue).call(this))}),t(this,ht).subscribe(e=>{t(this,tt).debounce=e.current,t(this,bt).swipe=e.current,t(this,$).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,p).length?v(this,ce,We).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,Ht,ue).call(this))}),t(this,Wt).subscribe(e=>{this.isConnected&&(t(this,B).call(this),e.current&&!e.previous&&!t(this,p).length?v(this,ce,We).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,Ht,ue).call(this))}),t(this,Q).subscribe(e=>{this.isConnected&&(t(this,B).call(this),v(this,ut,It).call(this))}),t(this,q).subscribe(e=>{e.current?(this.isConnected&&(t(this,p).length||(t(this,j).current=!0)),t(this,p).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(m(this,be,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Jt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Qt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Xt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,ee).subscribe(e=>{e.current&&!e.previous?v(this,Ye,bs).call(this):!e.current&&e.previous&&v(this,je,ms).call(this)}),t(this,se).subscribe(e=>{e.current&&!e.previous?v(this,Re,ss).call(this):!e.current&&e.previous&&v(this,Te,is).call(this)}),t(this,X).subscribe(e=>{t(this,$).speed=e.current,e.current&&!e.previous?t(this,$).connect():!e.current&&e.previous&&t(this,$).disconnect()}),t(this,xt).subscribe(e=>{e.current||(t(this,$).direction=1)}),t(this,Y).subscribe(e=>{this.isConnected&&v(this,ut,It).call(this)}),t(this,qt).subscribe(e=>{this.isConnected&&t(this,Y).current&&v(this,ut,It).call(this)}),t(this,wt).subscribe(e=>{this.isConnected&&t(this,Y).current&&v(this,ut,It).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,p).length&&v(this,ut,It).call(this)}),t(this,ct).subscribe(e=>{t(this,ct).isRunning.current&&t(this,d).set(e.current)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Zt)}get axisCSSProperty(){return t(this,R)}get directionCSSProperty(){return t(this,rt)}get pagesCSSProperty(){return t(this,nt)}get splitCSSProperty(){return t(this,j)}get sectionalCSSProperty(){return t(this,ht)}get autoSizeCSSProperty(){return t(this,Wt)}get wheelMaxDeltaCSSProperty(){return t(this,Mt)}get sectionsInViewCSSProperty(){return t(this,Q)}get loopCSSProperty(){return t(this,q)}get dampingCSSProperty(){return t(this,Jt)}get massCSSProperty(){return t(this,Qt)}get stiffnessCSSProperty(){return t(this,Xt)}get mouseDragCSSProperty(){return t(this,Yt)}get sectionDistanceScaleCSSProperty(){return t(this,we)}get autoplayCSSProperty(){return t(this,X)}get autoplayPauseDurationCSSProperty(){return t(this,jt)}get autoplayUserDirectionCSSProperty(){return t(this,xt)}get classesCSSProperty(){return t(this,Y)}get currentIndexStartOffsetCSSProperty(){return t(this,qt)}get currentIndexEndOffsetCSSProperty(){return t(this,wt)}get focusDelayCSSProperty(){return t(this,Lt)}get focusDurationCSSProperty(){return t(this,te)}get disabledCSSProperty(){return t(this,ee)}get hibernatedCSSProperty(){return t(this,se)}get currentScrollValue(){return v(this,Ie,ns).call(this,"current")}get targetScrollValue(){return v(this,Ie,ns).call(this,"target")}get contentElement(){return t(this,g)}get sections(){return t(this,p)}get position(){return t(this,$e)}get contentPosition(){return t(this,Fe)}get viewportSize(){return t(this,W)}get scrollSize(){return t(this,y)}get gap(){return t(this,I)}get counter(){return t(this,P)}get limit(){return t(this,p).length-t(this,Q).current}get distance(){return t(this,zt)}get loopDistance(){return t(this,q).current?t(this,zt)+t(this,I):t(this,zt)}get overscroll(){return t(this,be)}get vertical(){return t(this,R).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,R).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,R).current==="x"?0:t(this,d).distance}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i){if(!t(this,p).length)return;const n=t(this,P).current;v(this,rs,Os).call(this,e);const h=t(this,p)[n],c=t(this,p)[t(this,P).current];if(h&&c){let S=0;const Oe=v(this,Ae,hs).call(this),Us=Oe?this.targetScrollValue-Oe.position:0;t(this,q).current?t(this,P).current===0&&n===t(this,p).length-1?S=t(this,y)+t(this,W)-h.position+t(this,I):t(this,P).current===t(this,p).length-1&&n===0?S=c.position-(t(this,y)+t(this,W)+t(this,I)):S=c.position-h.position:S=c.position-h.position,this.shiftPosition(S-Us,i)}}shiftSections(e,i){t(this,p).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){i!=null&&i.tween?(t(this,ct).set(t(this,d).current,{equalize:!0}),t(this,ct).set(e,ks({},i.tween))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}connectedCallback(){t(this,Zt).observe(),t(this,R).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,j).observe(),t(this,ht).observe(),t(this,Wt).observe(),t(this,Mt).observe(),t(this,Q).observe(),t(this,q).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,Xt).observe(),t(this,Yt).observe(),t(this,we).observe(),t(this,X).observe(),t(this,X).observe(),t(this,jt).observe(),t(this,xt).observe(),t(this,Y).observe(),t(this,qt).observe(),t(this,wt).observe(),t(this,Lt).observe(),t(this,te).observe(),t(this,ee).observe(),t(this,se).observe(),v(this,Te,is).call(this)}disconnectedCallback(){t(this,Zt).unobserve(),t(this,R).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,j).unobserve(),t(this,ht).unobserve(),t(this,Wt).unobserve(),t(this,Mt).unobserve(),t(this,Q).unobserve(),t(this,q).unobserve(),t(this,Jt).unobserve(),t(this,Qt).unobserve(),t(this,Xt).unobserve(),t(this,Yt).unobserve(),t(this,we).unobserve(),t(this,X).unobserve(),t(this,jt).unobserve(),t(this,xt).unobserve(),t(this,Y).unobserve(),t(this,qt).unobserve(),t(this,wt).unobserve(),t(this,Lt).unobserve(),t(this,te).unobserve(),t(this,ee).unobserve(),t(this,se).unobserve(),v(this,Re,ss).call(this)}};d=new WeakMap;Zt=new WeakMap;R=new WeakMap;rt=new WeakMap;nt=new WeakMap;j=new WeakMap;ht=new WeakMap;Wt=new WeakMap;Mt=new WeakMap;Q=new WeakMap;q=new WeakMap;Jt=new WeakMap;Qt=new WeakMap;Xt=new WeakMap;Yt=new WeakMap;we=new WeakMap;X=new WeakMap;jt=new WeakMap;xt=new WeakMap;Y=new WeakMap;qt=new WeakMap;wt=new WeakMap;Lt=new WeakMap;te=new WeakMap;ee=new WeakMap;se=new WeakMap;g=new WeakMap;Xe=new WeakMap;p=new WeakMap;$e=new WeakMap;Fe=new WeakMap;W=new WeakMap;y=new WeakMap;I=new WeakMap;tt=new WeakMap;Bt=new WeakMap;bt=new WeakMap;$=new WeakMap;P=new WeakMap;be=new WeakMap;zt=new WeakMap;de=new WeakMap;ve=new WeakMap;Ee=new WeakMap;ct=new WeakMap;ce=new WeakSet;We=function(){v(this,Ht,ue).call(this),t(this,Xe).assignedElements().forEach((r,e)=>{r instanceof HTMLElement&&t(this,p).push(new ei(r,e,this))}),t(this,g).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,B).call(this),v(this,ut,It).call(this)};Ht=new WeakSet;ue=function(){t(this,p).forEach(r=>{r.destroy()}),m(this,p,[]),t(this,P).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Ye=new WeakSet;bs=function(){t(this,de)||(m(this,de,!0),t(this,d).unsubscribe(t(this,ts)),t(this,d).unlistenAnimationFrame(),t(this,tt).disconnect(),t(this,Bt).disconnect(),t(this,bt).disconnect(),t(this,$).disconnect(),clearInterval(t(this,Ee)),t(this,ct).unlistenAnimationFrame())};je=new WeakSet;ms=function(){t(this,de)&&(m(this,de,!1),t(this,d).subscribe(t(this,ts)),t(this,tt).connect(),t(this,Bt).connect(),t(this,bt).connect(),t(this,X).current&&t(this,$).connect())};Re=new WeakSet;ss=function(){t(this,ve)||(m(this,ve,!0),fe.windowResizer.unsubscribe(t(this,B)),Qe.elementResizer.unsubscribe(t(this,B)),t(this,d).reset(),v(this,Ye,bs).call(this),t(this,g).style.transform="",t(this,j).current&&v(this,Ht,ue).call(this),Nt.scrollEntries.unregister(this))};Te=new WeakSet;is=function(){t(this,ve)&&(m(this,ve,!1),t(this,j).current&&v(this,ce,We).call(this),Nt.scrollEntries.register(this),fe.windowResizer.subscribe(t(this,B),Me.RESIZE_ORDER.SCROLL),Qe.elementResizer.subscribe(this,t(this,B)),v(this,je,ms).call(this))};B=new WeakMap;ts=new WeakMap;rs=new WeakSet;Os=function(r){t(this,q).current?(t(this,P).current=r%t(this,p).length,t(this,P).current=t(this,P).current<0?t(this,p).length+t(this,P).current:t(this,P).current):t(this,P).current=ds.clamp(r,0,this.limit)};me=new WeakMap;qe=new WeakMap;Ie=new WeakSet;ns=function(r="current"){if(t(this,q).current&&t(this,p).length){const e=t(this,d)[r]%(t(this,y)+t(this,W)+t(this,I));return e<0?t(this,y)+e+t(this,W)+t(this,I):e}else return t(this,d)[r]};ut=new WeakSet;It=function(){if(t(this,Y).current&&t(this,p).length){const r=t(this,P).current+t(this,qt).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,Q).current+t(this,wt).current;t(this,p).forEach((i,n)=>{const h=r-this.limit-1+t(this,wt).current,c=r+e,S=this.sections.length-c;n>=r&&n<c||n<=h?i.mark("current"):n>=c&&n<c+S/2||n<=h+e?i.mark("next"):i.mark("previous")})}};Ae=new WeakSet;hs=function(){let r=null,e=1/0;for(let i=0;i<t(this,p).length;i++){const n=Math.abs(t(this,p)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,p)[r]:null};exports.ScrollElement=ri([Pt.define("e-scroll")],exports.ScrollElement);var Le;class es extends Pt.CustomElement{constructor(){super(...arguments);L(this,Le,null)}get scrollElement(){return o(this,Le)}connectedCallback(){const i=ti.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?O(this,Le,i):console.error(this,"e-scroll not found")}}Le=new WeakMap;var hi=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ai=(r,e,i,n)=>{for(var h=n>1?void 0:n?oi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&hi(e,i,h),h},Ds=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},f=(r,e,i)=>(Ds(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},kt=(r,e,i,n)=>(Ds(r,e,"write to private field"),e.set(r,i),i),ge,T,ot,at,Ce,ye,ie,Be,He,Ge;const li=vs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:Ms.aptechkaTheme.colorFont.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:Ms.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends es{constructor(){super(),N(this,ge,null),N(this,T,null),N(this,ot,!1),N(this,at,0),N(this,Ce,0),N(this,ye,0),N(this,ie,()=>{kt(this,ot,this.offsetWidth>this.offsetHeight);const e=f(this,ot)?this.offsetWidth:this.offsetHeight;kt(this,at,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),kt(this,at,Math.max(f(this,at),30)),f(this,ot)?(f(this,T).style.width=f(this,at)+"px",f(this,T).style.height="100%"):(f(this,T).style.width="100%",f(this,T).style.height=f(this,at)+"px"),kt(this,Ce,e-f(this,at)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,Be,()=>{kt(this,ye,this.scrollElement.currentProgress*f(this,Ce)),f(this,ot)?f(this,T).style.transform=`translate3d(${f(this,ye)}px, 0px, 0px)`:f(this,T).style.transform=`translate3d(0px, ${f(this,ye)}px, 0px)`}),N(this,He,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,Ge,e=>{document.documentElement.classList.add("grabbing"),js.setupDrag(h=>{const c=f(this,ot)?h.x:h.y,S=this.scrollElement.distance/f(this,Ce),Oe=(c-n)*S;this.scrollElement.setPosition(i+Oe)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=f(this,ot)?e.x:e.y}),fs.isBrowser&&(this.openShadow(li),A.element(this,{slot:"static","drag-dead-zone":"",children:[A.slot({ref:e=>kt(this,ge,e),children:A.div({class:"default-thumb"})})]}))}get thumbElement(){return f(this,T)}connectedCallback(){super.connectedCallback();const e=f(this,ge).assignedElements()[0]||f(this,ge).firstElementChild;kt(this,T,e),f(this,T).addEventListener("pointerdown",f(this,Ge)),fe.windowResizer.subscribe(f(this,ie),Me.RESIZE_ORDER.SCROLL+1),Qe.elementResizer.subscribe(this,f(this,ie)),this.scrollElement.onScroll(f(this,Be)),this.scrollElement.axisCSSProperty.subscribe(f(this,He))}disconnectedCallback(){f(this,T).removeEventListener("pointerdown",f(this,Ge)),fe.windowResizer.unsubscribe(f(this,ie)),Qe.elementResizer.unsubscribe(f(this,ie)),this.scrollElement.offScroll(f(this,Be)),this.scrollElement.axisCSSProperty.unsubscribe(f(this,He))}};ge=new WeakMap;T=new WeakMap;ot=new WeakMap;at=new WeakMap;Ce=new WeakMap;ye=new WeakMap;ie=new WeakMap;Be=new WeakMap;He=new WeakMap;Ge=new WeakMap;exports.ScrollbarElement=ai([Pt.define("e-scrollbar")],exports.ScrollbarElement);const ci=vs.createStylesheet({button:{all:"inherit"}});class $s extends es{constructor(){super(),this.openShadow(ci),fs.isBrowser&&A.element(this,{children:[A.button({onClick:()=>{this.handleClick()},children:[A.slot()]})]})}}var ui=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,Si=(r,e,i,n)=>{for(var h=n>1?void 0:n?pi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ui(e,i,h),h};exports.ScrollSetButtonElement=class extends $s{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),{behaviour:i})}};exports.ScrollSetButtonElement=Si([Pt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var fi=Object.defineProperty,di=Object.getOwnPropertyDescriptor,vi=(r,e,i,n)=>{for(var h=n>1?void 0:n?di(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&fi(e,i,h),h};exports.ScrollStepButtonElement=class extends $s{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),{behaviour:i})}};exports.ScrollStepButtonElement=vi([Pt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var wi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,mi=(r,e,i,n)=>{for(var h=n>1?void 0:n?bi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&wi(e,i,h),h},Fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Kt=(r,e,i)=>(Fs(r,e,"read from private field"),i?i.call(r):e.get(r)),xs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Ls=(r,e,i,n)=>(Fs(r,e,"write to private field"),e.set(r,i),i),Vt,_e,it,yt,pe,ze,Ve,Se;class gi{constructor(e,i,n){L(this,it,void 0);L(this,yt,void 0);L(this,pe,void 0);L(this,ze,void 0);L(this,Ve,()=>{o(this,yt).scrollToSection(o(this,pe),{behaviour:o(this,ze)})});L(this,Se,()=>{o(this,it).classList.toggle("current",o(this,yt).counter.current===o(this,pe))});O(this,it,document.createElement("button")),O(this,yt,e),O(this,ze,n),O(this,pe,i),o(this,it).addEventListener("click",o(this,Ve)),o(this,yt).counter.subscribe(o(this,Se)),o(this,Se).call(this)}get element(){return o(this,it)}destroy(){o(this,it).removeEventListener("click",o(this,Ve)),o(this,yt).counter.unsubscribe(o(this,Se)),o(this,it).remove()}}it=new WeakMap,yt=new WeakMap,pe=new WeakMap,ze=new WeakMap,Ve=new WeakMap,Se=new WeakMap;exports.ScrollBulletButtonsElement=class extends es{constructor(){super(...arguments),xs(this,Vt,[]),xs(this,_e,Vs.debounce(()=>{Kt(this,Vt).forEach(e=>e.destroy()),Ls(this,Vt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new gi(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Kt(this,Vt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Kt(this,_e)),Kt(this,_e).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Kt(this,_e)),Kt(this,Vt).forEach(e=>e.destroy()),Ls(this,Vt,[])}};Vt=new WeakMap;_e=new WeakMap;exports.ScrollBulletButtonsElement=mi([Pt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Ci=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,_i=(r,e,i,n)=>{for(var h=n>1?void 0:n?yi(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ci(e,i,h),h},gs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(gs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},b=(r,e,i,n)=>(gs(r,e,"write to private field"),e.set(r,i),i),E=(r,e,i)=>(gs(r,e,"access private method"),i),re,ne,he,oe,Ot,Dt,$t,Ft,F,H,G,U,At,x,pt,St,ft,dt,vt,M,J,Z,mt,gt,et,Ue,w,ae,le,Ne,z,Rt,D,V,K,Pe,Gt,k,os,Rs,as,Ts,ls,qs,cs,Is,us,As,ps,Bs,Ke,ke,lt,Tt,Cs,Hs,ys,Gs,Ze,Ss,Je;exports.ScrollSegmentElement=class extends es{constructor(){super(),l(this,os),l(this,as),l(this,ls),l(this,cs),l(this,us),l(this,ps),l(this,lt),l(this,Cs),l(this,ys),l(this,Ze),l(this,re,new u.CSSProperty(this,"--damping",20)),l(this,ne,new u.CSSProperty(this,"--mass",0)),l(this,he,new u.CSSProperty(this,"--stiffness",0)),l(this,oe,new u.CSSProperty(this,"--target","")),l(this,Ot,new u.CSSProperty(this,"--disabled",!1)),l(this,Dt,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),l(this,$t,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),l(this,Ft,new u.CSSProperty(this,"--capture-once",!1)),l(this,F,new u.CSSProperty(this,"--captured","")),l(this,H,new u.CSSProperty(this,"--released","")),l(this,G,new u.CSSProperty(this,"--captured-from-start","")),l(this,U,new u.CSSProperty(this,"--captured-from-finish","")),l(this,At,new u.CSSProperty(this,"--released-from-start","")),l(this,x,new u.CSSProperty(this,"--released-from-finish","")),l(this,pt,new u.CSSProperty(this,"--passed-var","")),l(this,St,new u.CSSProperty(this,"--progress-var","")),l(this,ft,new u.CSSProperty(this,"--distance-var","")),l(this,dt,new u.CSSProperty(this,"--start-var","")),l(this,vt,new u.CSSProperty(this,"--finish-var","")),l(this,M,new Et.Store(!1)),l(this,J,new Et.Store(!1)),l(this,Z,new Et.Store(!1)),l(this,mt,new Et.Store(!1)),l(this,gt,new Et.Store(!1)),l(this,et,new Et.Store(!1)),l(this,Ue,[]),l(this,w,this),l(this,ae,0),l(this,le,0),l(this,Ne,0),l(this,z,new zs.Damped(0,{order:Me.TICK_ORDER.SCROLL-1,min:0,max:1})),l(this,Rt,0),l(this,D,0),l(this,V,0),l(this,K,0),l(this,Pe,!1),l(this,Gt,!1),l(this,k,!0),l(this,Ke,()=>{s(this,k)||(this.resize(),s(this,ke).call(this))}),l(this,ke,()=>{!s(this,k)&&s(this,Pe)&&this.tick()}),l(this,Je,Vs.debounce(()=>{const e=Nt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),b(this,Ue,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,Dt)}get startOffsetCSSProperty(){return s(this,$t)}get captureOnceCSSProperty(){return s(this,Ft)}get capturedCSSProperty(){return s(this,F)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,At)}get releasedFromFinishCSSProperty(){return s(this,x)}get passedVarCSSProperty(){return s(this,pt)}get progressVarCSSProperty(){return s(this,St)}get distanceVarCSSProperty(){return s(this,ft)}get startVarCSSProperty(){return s(this,dt)}get finishVarCSSProperty(){return s(this,vt)}get disabledCSSProperty(){return s(this,Ot)}get dampingCSSProperty(){return s(this,re)}get massCSSProperty(){return s(this,ne)}get stiffnessCSSProperty(){return s(this,he)}get targetCSSProperty(){return s(this,oe)}get isCaptured(){return s(this,M)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,Z)}get isReleasedFromStart(){return s(this,mt)}get isCapturedFromFinish(){return s(this,gt)}get isReleasedFromFinish(){return s(this,et)}get directionPosition(){return s(this,ae)}get directionSize(){return s(this,le)}get passed(){return s(this,z)}get progress(){return s(this,Rt)}get start(){return s(this,D)}get finish(){return s(this,K)}get distance(){return s(this,V)}get isCapturedOnce(){return s(this,Gt)}get isDisabled(){return s(this,k)}resize(){b(this,le,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),b(this,ae,this.scrollElement.vertical?_t.getCumulativeOffsetTop(this,this.scrollElement):_t.getCumulativeOffsetLeft(this,this.scrollElement)),b(this,D,this.getStart()),b(this,V,this.getDistance()),b(this,D,s(this,D)+s(this,$t).current),b(this,V,s(this,V)+s(this,Dt).current),b(this,K,s(this,D)+s(this,V)),this.scrollElement.currentScrollValue>s(this,K)&&!s(this,M).current&&!s(this,J).current&&(s(this,M).current=!0),this.setVar(s(this,dt).current,s(this,D)),this.setVar(s(this,vt).current,s(this,K)),this.setVar(s(this,ft).current,s(this,V)),s(this,z).max=s(this,V),b(this,Pe,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,Ue).forEach(n=>{e+=n.value}),s(this,z).set(e-s(this,D));const i=Math.round(e);s(this,M).current&&(i>s(this,D)?s(this,Z).current||E(this,ls,qs).call(this):s(this,Z).current&&!s(this,mt).current&&E(this,us,As).call(this),i<s(this,K)?s(this,et).current&&!s(this,gt).current&&E(this,cs,Is).call(this):s(this,Z).current&&!s(this,et).current&&E(this,ps,Bs).call(this)),i>s(this,D)&&i<s(this,K)?s(this,M).current||E(this,os,Rs).call(this):s(this,M).current&&(s(this,z).set(ds.step(s(this,V)/2,s(this,z).current,0,s(this,V))),E(this,as,Ts).call(this)),s(this,Gt)&&s(this,Ft).current&&(s(this,F).current&&s(this,w).classList.add(s(this,F).current),b(this,k,!0))}disable(){this.style.cssText="",b(this,ae,0),b(this,le,0),s(this,z).reset(),b(this,Rt,0),b(this,D,0),b(this,V,0),b(this,K,0),b(this,Pe,!1),s(this,M).current=!1,s(this,J).current=!1,s(this,Z).current=!1,s(this,mt).current=!1,s(this,gt).current=!1,s(this,et).current=!1,b(this,Gt,!1),b(this,k,!0),E(this,Ze,Ss).call(this)}enable(){b(this,k,!1)}connectedCallback(){super.connectedCallback(),s(this,re).observe(),s(this,ne).observe(),s(this,he).observe(),s(this,oe).observe(),s(this,Ot).observe(),s(this,Dt).observe(),s(this,$t).observe(),s(this,Ft).observe(),s(this,F).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,At).observe(),s(this,x).observe(),s(this,pt).observe(),s(this,St).observe(),s(this,ft).observe(),s(this,dt).observe(),s(this,vt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,Je)),s(this,Je).call(this),s(this,Ot).current||this.enable(),s(this,re).subscribe(i=>{s(this,z).damping=i.current}),s(this,ne).subscribe(i=>{s(this,z).mass=i.current}),s(this,he).subscribe(i=>{s(this,z).stiffness=i.current}),s(this,oe).subscribe(i=>{i.previous&&E(this,Ze,Ss).call(this),i.current?i.current==="parent"?b(this,w,this.parentElement||this):b(this,w,document.querySelector(i.current)||this):b(this,w,this)}),s(this,Ot).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,$t).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,Dt).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,F).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,G).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,U).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,H).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,At).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,x).subscribe(i=>{E(this,lt,Tt).call(this,i)}),s(this,Ft).subscribe(i=>{s(this,k)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,pt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,this.passed.current))}),s(this,St).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,Rt)))}),s(this,dt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,D)))}),s(this,vt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,K)))}),s(this,ft).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,V)))}),s(this,z).subscribe(i=>{b(this,Rt,s(this,z).current/s(this,V)||0),this.setVar(s(this,pt).current,s(this,z).current.toFixed(6)),this.setVar(s(this,St).current,s(this,Rt).toFixed(6))}),fe.windowResizer.subscribe(s(this,Ke),Me.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,ke)),e=!0}disconnectedCallback(){fe.windowResizer.unsubscribe(s(this,Ke)),this.scrollElement.offScroll(s(this,ke)),s(this,re).close(),s(this,ne).close(),s(this,he).close(),s(this,oe).close(),s(this,Ot).close(),s(this,Dt).close(),s(this,$t).close(),s(this,Ft).close(),s(this,F).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,At).close(),s(this,x).close(),s(this,pt).close(),s(this,St).close(),s(this,ft).close(),s(this,dt).close(),s(this,vt).close(),s(this,M).close(),s(this,J).close(),s(this,Z).close(),s(this,mt).close(),s(this,gt).close(),s(this,et).close(),this.disable()}removeVar(e){e&&s(this,w).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,w).style.setProperty(`--${e}`,i.toString())}getDistance(){return s(this,le)+s(this,Ne)}getStart(){return s(this,ae)-s(this,Ne)}};re=new WeakMap;ne=new WeakMap;he=new WeakMap;oe=new WeakMap;Ot=new WeakMap;Dt=new WeakMap;$t=new WeakMap;Ft=new WeakMap;F=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;At=new WeakMap;x=new WeakMap;pt=new WeakMap;St=new WeakMap;ft=new WeakMap;dt=new WeakMap;vt=new WeakMap;M=new WeakMap;J=new WeakMap;Z=new WeakMap;mt=new WeakMap;gt=new WeakMap;et=new WeakMap;Ue=new WeakMap;w=new WeakMap;ae=new WeakMap;le=new WeakMap;Ne=new WeakMap;z=new WeakMap;Rt=new WeakMap;D=new WeakMap;V=new WeakMap;K=new WeakMap;Pe=new WeakMap;Gt=new WeakMap;k=new WeakMap;os=new WeakSet;Rs=function(){s(this,M).current=!0,s(this,J).current=!1,b(this,Gt,!0),s(this,H).current&&s(this,w).classList.remove(s(this,H).current),s(this,x).current&&s(this,w).classList.remove(s(this,x).current),s(this,x).current&&s(this,w).classList.remove(s(this,x).current),s(this,F).current&&s(this,w).classList.add(s(this,F).current)};as=new WeakSet;Ts=function(){s(this,J).current=!0,s(this,M).current=!1,b(this,Gt,!0),s(this,F).current&&s(this,w).classList.remove(s(this,F).current),s(this,G).current&&s(this,w).classList.remove(s(this,G).current),s(this,U).current&&s(this,w).classList.remove(s(this,U).current),s(this,H).current&&s(this,w).classList.add(s(this,H).current)};ls=new WeakSet;qs=function(){s(this,M).current=!0,s(this,Z).current=!0,s(this,mt).current=!1,s(this,G).current&&s(this,w).classList.add(s(this,G).current)};cs=new WeakSet;Is=function(){s(this,M).current=!0,s(this,gt).current=!0,s(this,et).current=!1,s(this,U).current&&s(this,w).classList.add(s(this,U).current)};us=new WeakSet;As=function(){s(this,J).current=!0,s(this,mt).current=!0,s(this,Z).current=!1,s(this,x).current&&s(this,w).classList.add(s(this,x).current)};ps=new WeakSet;Bs=function(){s(this,J).current=!0,s(this,et).current=!0,s(this,gt).current=!1,s(this,x).current&&s(this,w).classList.add(s(this,x).current)};Ke=new WeakMap;ke=new WeakMap;lt=new WeakSet;Tt=function(r){if(s(this,k)){r.previous&&s(this,w).classList.remove(r.previous),r.current&&s(this,w).classList.remove(r.current);return}r.current&&s(this,M).current?(r.previous&&s(this,w).classList.remove(r.previous),s(this,w).classList.add(r.current)):!r.current&&r.previous&&s(this,w).classList.remove(r.previous)};Cs=new WeakSet;Hs=function(...r){r.forEach(e=>{e&&s(this,w).classList.remove(e)})};ys=new WeakSet;Gs=function(...r){r.forEach(e=>{e&&s(this,w).style.removeProperty(`--${e}`)})};Ze=new WeakSet;Ss=function(){E(this,Cs,Hs).call(this,s(this,F).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,At).current,s(this,x).current),E(this,ys,Gs).call(this,s(this,pt).current,s(this,St).current,s(this,ft).current,s(this,dt).current,s(this,vt).current)};Je=new WeakMap;exports.ScrollSegmentElement=_i([Pt.define("e-scroll-segment")],exports.ScrollSegmentElement);
@@ -26,8 +26,8 @@ import { a as Ne, g as Ue } from "../layout-HoBT_Da2.js";
26
26
  import { c as Ts, s as ni } from "../math-BOBiC4TN.js";
27
27
  import "../ticker/index.js";
28
28
  import { TICK_ORDER as Is, RESIZE_ORDER as Ss } from "../order/index.js";
29
- import { D as As } from "../Damped-uk87KmLu.js";
30
- import { T as ai } from "../Tweened-B5uDQSvr.js";
29
+ import { D as As } from "../Damped-yrNXlkDE.js";
30
+ import { T as ai } from "../Tweened-CjgvoOwL.js";
31
31
  import { WheelControls as oi, KeyboardControls as li, DragControls as ci, AutoplayControls as ui } from "../controls/index.js";
32
32
  import { CustomElement as Rs, define as de } from "../custom-element/index.js";
33
33
  import { windowResizer as ue } from "../window-resizer/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1,110 +0,0 @@
1
- var S = (e, r, t) => {
2
- if (!r.has(e))
3
- throw TypeError("Cannot " + t);
4
- };
5
- var i = (e, r, t) => (S(e, r, "read from private field"), t ? t.call(e) : r.get(e)), a = (e, r, t) => {
6
- if (r.has(e))
7
- throw TypeError("Cannot add the same private member more than once");
8
- r instanceof WeakSet ? r.add(e) : r.set(e, t);
9
- }, h = (e, r, t, u) => (S(e, r, "write to private field"), u ? u.call(e, t) : r.set(e, t), t);
10
- var I = (e, r, t) => (S(e, r, "access private method"), t);
11
- import { S as P } from "./Store-Qr3SNOSf.js";
12
- import { c as R } from "./math-BOBiC4TN.js";
13
- import { p as q, n as F } from "./polyfills-X6KXuHg-.js";
14
- import { ticker as z } from "./ticker/index.js";
15
- import { TICK_ORDER as N } from "./order/index.js";
16
- var g, f, d, l, b, s, n, m, c, A, M, O, x;
17
- class E extends P {
18
- constructor(t, u) {
19
- super(t || 0, u);
20
- a(this, M);
21
- a(this, g, void 0);
22
- a(this, f, N.ANIMATION);
23
- a(this, d, void 0);
24
- a(this, l, new P(!1));
25
- a(this, b, 0);
26
- a(this, s, 0);
27
- a(this, n, -1 / 0);
28
- a(this, m, 1 / 0);
29
- a(this, c, 0);
30
- a(this, A, null);
31
- a(this, x, (t) => {
32
- this.handleAnimationFrame(t);
33
- });
34
- h(this, s, this.current);
35
- }
36
- get direction() {
37
- return i(this, b);
38
- }
39
- get target() {
40
- return i(this, s);
41
- }
42
- get min() {
43
- return i(this, n);
44
- }
45
- set min(t) {
46
- h(this, n, t), this.set(i(this, s), {
47
- equalize: !0
48
- });
49
- }
50
- get max() {
51
- return i(this, m);
52
- }
53
- set max(t) {
54
- h(this, m, t), this.set(i(this, s), {
55
- equalize: !0
56
- });
57
- }
58
- get from() {
59
- return i(this, c);
60
- }
61
- get isRunning() {
62
- return i(this, l);
63
- }
64
- get delta() {
65
- return Math.abs(i(this, s) - i(this, c));
66
- }
67
- get deltaProgress() {
68
- return this.delta ? q(Math.abs(this.current - i(this, c)) / this.delta, 6) : 0;
69
- }
70
- get distance() {
71
- return Math.abs(i(this, m) - i(this, n));
72
- }
73
- get distanceProgress() {
74
- return this.distance ? q(Math.abs(this.current - i(this, n)) / this.distance, 6) : 0;
75
- }
76
- set(t, u) {
77
- (i(this, s) !== t || u != null && u.restart) && (h(this, A, t), this.updateOptions(u), h(this, A, null), i(this, s) !== this.current && this.start());
78
- }
79
- shift(t, u) {
80
- this.set(i(this, s) + t, u);
81
- }
82
- reset() {
83
- super.reset(), this.set(this.initial, { equalize: !0 });
84
- }
85
- close() {
86
- super.close(), this.reset(), this.unlistenAnimationFrame();
87
- }
88
- listenAnimationFrame() {
89
- i(this, l).current || (i(this, l).current = !0, z.subscribe(i(this, x), {
90
- maxFPS: i(this, g),
91
- order: i(this, f),
92
- culling: i(this, d)
93
- }));
94
- }
95
- unlistenAnimationFrame() {
96
- i(this, l).current && (i(this, l).current = !1, z.unsubscribe(i(this, x)));
97
- }
98
- updateOptions(t) {
99
- h(this, g, F(t == null ? void 0 : t.maxFPS, i(this, g))), h(this, f, F(t == null ? void 0 : t.order, i(this, f))), h(this, d, F(t == null ? void 0 : t.culling, i(this, d))), h(this, n, F(t == null ? void 0 : t.min, i(this, n))), h(this, m, F(t == null ? void 0 : t.max, i(this, m))), I(this, M, O).call(this, i(this, A) || i(this, s)), t != null && t.equalize && (this.unlistenAnimationFrame(), this.current = i(this, s)), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = this.initial);
100
- }
101
- start() {
102
- this.listenAnimationFrame();
103
- }
104
- }
105
- g = new WeakMap(), f = new WeakMap(), d = new WeakMap(), l = new WeakMap(), b = new WeakMap(), s = new WeakMap(), n = new WeakMap(), m = new WeakMap(), c = new WeakMap(), A = new WeakMap(), M = new WeakSet(), O = function(t) {
106
- h(this, b, Math.sign(t - i(this, s))), h(this, s, R(t, i(this, n), i(this, m))), h(this, c, this.current);
107
- }, x = new WeakMap();
108
- export {
109
- E as A
110
- };