aptechka 0.57.6 → 0.58.0

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 J=i=>{throw TypeError(i)};var N=(i,r,e)=>r.has(i)||J("Cannot "+e);var t=(i,r,e)=>(N(i,r,"read from private field"),e?e.call(i):r.get(i)),n=(i,r,e)=>r.has(i)?J("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,e),a=(i,r,e,s)=>(N(i,r,"write to private field"),s?s.call(i,e):r.set(i,e),e),u=(i,r,e)=>(N(i,r,"access private method"),e);var K=(i,r,e)=>new Promise((s,l)=>{var c=C=>{try{z(e.next(C))}catch(F){l(F)}},S=C=>{try{z(e.throw(C))}catch(F){l(F)}},z=C=>C.done?s(C.value):Promise.resolve(C.value).then(c,S);z((e=e.apply(i,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../index-Cqw2NKev.cjs"),G=require("../dom-JBOkFLTh.cjs"),q=require("../css-property/index.cjs"),V=require("../events-KVanG9sR.cjs"),W=require("../gestures-C7gbKx11.cjs"),X=require("../math-GDWEqu7y.cjs"),Y=require("../number-DyefJ5a1.cjs");var w,p,v,L,x,d,o,h,O,H,y,_,D,$,j;class A extends HTMLElement{constructor(){super(...arguments);n(this,h);n(this,w,new q.CSSProperty(this,"--loop",!0));n(this,p,new q.CSSProperty(this,"--autoplay",!1));n(this,v,new q.CSSProperty(this,"--swipe","x"));n(this,L);n(this,x,!1);n(this,d,[]);n(this,o,0);n(this,y,e=>{a(this,x,e.isIntersecting),t(this,x)?u(this,h,H).call(this):clearInterval(t(this,L))});n(this,_,()=>{clearInterval(t(this,L)),t(this,x)&&a(this,L,setInterval(t(this,$),parseFloat(t(this,p).current||"0")*1e3))});n(this,$,()=>{u(this,h,D).call(this,t(this,o)+1)});n(this,j,e=>{if(!t(this,v).current)return;let s=0;W.setupDrag(l=>{const c=e.x-l.x,S=e.y-l.y;t(this,v).current==="x"?Math.abs(c)>Math.abs(S)&&Math.abs(c)>10&&(s=Math.sign(c)):t(this,v).current==="y"&&Math.abs(S)>Math.abs(c)&&Math.abs(S)>10&&(s=Math.sign(S))},()=>{s&&this.shift(s)})})}get counter(){return t(this,o)}get itemElements(){return t(this,d)}addItem(e){t(this,d).push(e),u(this,h,O).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(u(this,h,D).call(this,e),u(this,h,H).call(this))}shift(e){this.set(t(this,o)+e)}connectedCallback(){var e;a(this,d,[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)]),(e=t(this,d)[0])==null||e.classList.add("current"),u(this,h,O).call(this),t(this,p).subscribe(s=>{s.current?(k.intersector.subscribe(this,t(this,y)),u(this,h,H).call(this)):(a(this,x,!0),k.intersector.unsubscribe(t(this,y)),clearInterval(t(this,L)),u(this,h,D).call(this,0))}),t(this,p).observe(),t(this,v).observe(),t(this,w).observe(),this.addEventListener("pointerdown",t(this,j))}disconnectedCallback(){t(this,p).unobserve(),t(this,v).unobserve(),t(this,w).unobserve(),k.intersector.unsubscribe(t(this,y)),clearInterval(t(this,L))}}w=new WeakMap,p=new WeakMap,v=new WeakMap,L=new WeakMap,x=new WeakMap,d=new WeakMap,o=new WeakMap,h=new WeakSet,O=function(){t(this,d).length>1?this.classList.add("has-length"):this.classList.remove("has-length")},H=function(){t(this,p).current!==!1&&t(this,_).call(this)},y=new WeakMap,_=new WeakMap,D=function(e){t(this,w).current?a(this,o,Y.loopNumber(e,t(this,d).length)):a(this,o,X.clamp(e,0,t(this,d).length-1)),t(this,d).forEach((s,l)=>{s.classList.remove("current","previous","next"),l===t(this,o)?s.classList.add("current"):l<t(this,o)?s.classList.add("previous"):l>t(this,o)&&s.classList.add("next")}),V.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,o)}}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)},$=new WeakMap,j=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",A);var b,B,m,T,M;class Q extends HTMLElement{constructor(){super(...arguments);n(this,b,null);n(this,B,null);n(this,m,[]);n(this,T,e=>{const s=e.currentTarget,l=t(this,m).findIndex(c=>c===s);l>=0&&t(this,b).set(l)});n(this,M,()=>{t(this,m).forEach((e,s)=>{s===t(this,b).counter?e.classList.add("current"):e.classList.remove("current")})})}connectedCallback(){return K(this,null,function*(){var e;if(a(this,b,G.findParentElement(this,A)),t(this,b)&&(yield customElements.whenDefined("e-billboard"),this.isConnected)){const s=t(this,b).itemElements.length;a(this,B,document.createElement("div"));for(let l=0;l<s;l++){const c=document.createElement("button");t(this,m).push(c),t(this,B).appendChild(c)}this.appendChild(t(this,B)),t(this,m).forEach(l=>{l.addEventListener("click",t(this,T))}),(e=t(this,b))==null||e.addEventListener("billboardChange",t(this,M)),t(this,M).call(this)}})}disconnectedCallback(){var e;t(this,m).forEach(s=>{s.removeEventListener("click",t(this,T))}),(e=t(this,b))==null||e.removeEventListener("billboardChange",t(this,M)),this.innerHTML="",a(this,m,[])}}b=new WeakMap,B=new WeakMap,m=new WeakMap,T=new WeakMap,M=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",Q);var f,E,g;class R extends HTMLElement{constructor(){super();n(this,f,new q.CSSProperty(this,"--index",0));n(this,E,null);n(this,g,()=>{var e;t(this,f).current===((e=t(this,E))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,E)&&(!this.handleClick||this.handleClick(e))&&t(this,E).set(t(this,f).current)})}connectedCallback(){var e;this.tabIndex=0,a(this,E,G.findParentElement(this,A)),(e=t(this,E))==null||e.addEventListener("billboardChange",t(this,g)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,g).call(this)}),t(this,f).subscribe(t(this,g)),t(this,f).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,f).unsubscribe(t(this,g)),t(this,f).unobserve(),(e=t(this,E))==null||e.removeEventListener("billboardChange",t(this,g))}}f=new WeakMap,E=new WeakMap,g=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",R);var I,P;class U extends HTMLElement{constructor(){super();n(this,I,new q.CSSProperty(this,"--step",1));n(this,P,null);this.addEventListener("click",e=>{t(this,P)&&(!this.handleClick||this.handleClick(e))&&t(this,P).shift(t(this,I).current)})}connectedCallback(){this.tabIndex=0,a(this,P,G.findParentElement(this,A)),t(this,I).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),t(this,I).unobserve()}}I=new WeakMap,P=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",U);exports.BillboardBulletsElement=Q;exports.BillboardElement=A;exports.BillboardSetButtonElement=R;exports.BillboardStepButtonElement=U;
1
+ "use strict";var J=i=>{throw TypeError(i)};var N=(i,r,e)=>r.has(i)||J("Cannot "+e);var t=(i,r,e)=>(N(i,r,"read from private field"),e?e.call(i):r.get(i)),n=(i,r,e)=>r.has(i)?J("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,e),a=(i,r,e,s)=>(N(i,r,"write to private field"),s?s.call(i,e):r.set(i,e),e),u=(i,r,e)=>(N(i,r,"access private method"),e);var K=(i,r,e)=>new Promise((s,l)=>{var c=C=>{try{z(e.next(C))}catch(F){l(F)}},S=C=>{try{z(e.throw(C))}catch(F){l(F)}},z=C=>C.done?s(C.value):Promise.resolve(C.value).then(c,S);z((e=e.apply(i,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../index-Cqw2NKev.cjs"),G=require("../dom-JBOkFLTh.cjs"),T=require("../css-property/index.cjs"),V=require("../events-KVanG9sR.cjs"),W=require("../gestures-C7gbKx11.cjs"),X=require("../math-GDWEqu7y.cjs"),Y=require("../number-DyefJ5a1.cjs");var w,p,v,L,x,d,o,h,O,A,y,_,D,$,j;class H extends HTMLElement{constructor(){super(...arguments);n(this,h);n(this,w,new T.CSSProperty(this,"--loop",!0));n(this,p,new T.CSSProperty(this,"--autoplay",!1));n(this,v,new T.CSSProperty(this,"--swipe","x"));n(this,L);n(this,x,!1);n(this,d,[]);n(this,o,0);n(this,y,e=>{a(this,x,e.isIntersecting),t(this,x)?u(this,h,A).call(this):clearInterval(t(this,L))});n(this,_,()=>{clearInterval(t(this,L)),t(this,x)&&a(this,L,setInterval(t(this,$),parseFloat(t(this,p).current||"0")*1e3))});n(this,$,()=>{u(this,h,D).call(this,t(this,o)+1)});n(this,j,e=>{if(!t(this,v).current)return;let s=0;W.setupDrag(l=>{const c=e.x-l.x,S=e.y-l.y;t(this,v).current==="x"?Math.abs(c)>Math.abs(S)&&Math.abs(c)>10&&(s=Math.sign(c)):t(this,v).current==="y"&&Math.abs(S)>Math.abs(c)&&Math.abs(S)>10&&(s=Math.sign(S))},()=>{s&&this.shift(s)})})}get counter(){return t(this,o)}get itemElements(){return t(this,d)}addItem(e){t(this,d).push(e),u(this,h,O).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(u(this,h,D).call(this,e),u(this,h,A).call(this))}shift(e){this.set(t(this,o)+e)}connectedCallback(){var e;a(this,d,[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)]),(e=t(this,d)[0])==null||e.classList.add("current"),u(this,h,O).call(this),t(this,p).subscribe(s=>{s.current?(k.intersector.subscribe(this,t(this,y)),u(this,h,A).call(this)):(a(this,x,!0),k.intersector.unsubscribe(t(this,y)),clearInterval(t(this,L)),u(this,h,D).call(this,0))}),t(this,p).observe(),t(this,v).observe(),t(this,w).observe(),this.addEventListener("pointerdown",t(this,j))}disconnectedCallback(){t(this,p).unobserve(),t(this,v).unobserve(),t(this,w).unobserve(),k.intersector.unsubscribe(t(this,y)),clearInterval(t(this,L))}}w=new WeakMap,p=new WeakMap,v=new WeakMap,L=new WeakMap,x=new WeakMap,d=new WeakMap,o=new WeakMap,h=new WeakSet,O=function(){t(this,d).length>1?this.classList.add("has-length"):this.classList.remove("has-length")},A=function(){t(this,p).current!==!1&&t(this,_).call(this)},y=new WeakMap,_=new WeakMap,D=function(e){t(this,w).current?a(this,o,Y.loopNumber(e,t(this,d).length)):a(this,o,X.clamp(e,0,t(this,d).length-1)),t(this,d).forEach((s,l)=>{s.classList.remove("current","previous","next"),l===t(this,o)?s.classList.add("current"):l<t(this,o)?s.classList.add("previous"):l>t(this,o)&&s.classList.add("next")}),V.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,o)}}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)},$=new WeakMap,j=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",H);var b,B,m,q,M;class Q extends HTMLElement{constructor(){super(...arguments);n(this,b,null);n(this,B,null);n(this,m,[]);n(this,q,e=>{const s=e.currentTarget,l=t(this,m).findIndex(c=>c===s);l>=0&&t(this,b).set(l)});n(this,M,()=>{t(this,m).forEach((e,s)=>{s===t(this,b).counter?e.classList.add("current"):e.classList.remove("current")})})}connectedCallback(){return K(this,null,function*(){var e;if(a(this,b,G.findParentElement(this,H)),t(this,b)&&(yield customElements.whenDefined("e-billboard"),this.isConnected)){this.innerHTML="";const s=t(this,b).itemElements.length;a(this,B,document.createElement("div"));for(let l=0;l<s;l++){const c=document.createElement("button");t(this,m).push(c),t(this,B).appendChild(c)}this.appendChild(t(this,B)),t(this,m).forEach(l=>{l.addEventListener("click",t(this,q))}),(e=t(this,b))==null||e.addEventListener("billboardChange",t(this,M)),t(this,M).call(this)}})}disconnectedCallback(){var e;t(this,m).forEach(s=>{s.removeEventListener("click",t(this,q))}),(e=t(this,b))==null||e.removeEventListener("billboardChange",t(this,M)),this.innerHTML="",a(this,m,[])}}b=new WeakMap,B=new WeakMap,m=new WeakMap,q=new WeakMap,M=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",Q);var f,E,g;class R extends HTMLElement{constructor(){super();n(this,f,new T.CSSProperty(this,"--index",0));n(this,E,null);n(this,g,()=>{var e;t(this,f).current===((e=t(this,E))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,E)&&(!this.handleClick||this.handleClick(e))&&t(this,E).set(t(this,f).current)})}connectedCallback(){var e;this.tabIndex=0,a(this,E,G.findParentElement(this,H)),(e=t(this,E))==null||e.addEventListener("billboardChange",t(this,g)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,g).call(this)}),t(this,f).subscribe(t(this,g)),t(this,f).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,f).unsubscribe(t(this,g)),t(this,f).unobserve(),(e=t(this,E))==null||e.removeEventListener("billboardChange",t(this,g))}}f=new WeakMap,E=new WeakMap,g=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",R);var I,P;class U extends HTMLElement{constructor(){super();n(this,I,new T.CSSProperty(this,"--step",1));n(this,P,null);this.addEventListener("click",e=>{t(this,P)&&(!this.handleClick||this.handleClick(e))&&t(this,P).shift(t(this,I).current)})}connectedCallback(){this.tabIndex=0,a(this,P,G.findParentElement(this,H)),t(this,I).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),t(this,I).unobserve()}}I=new WeakMap,P=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",U);exports.BillboardBulletsElement=Q;exports.BillboardElement=H;exports.BillboardSetButtonElement=R;exports.BillboardStepButtonElement=U;
@@ -3,18 +3,18 @@ var Q = (i) => {
3
3
  };
4
4
  var j = (i, h, e) => h.has(i) || Q("Cannot " + e);
5
5
  var t = (i, h, e) => (j(i, h, "read from private field"), e ? e.call(i) : h.get(i)), n = (i, h, e) => h.has(i) ? Q("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(i) : h.set(i, e), a = (i, h, e, s) => (j(i, h, "write to private field"), s ? s.call(i, e) : h.set(i, e), e), u = (i, h, e) => (j(i, h, "access private method"), e);
6
- var R = (i, h, e) => new Promise((s, l) => {
6
+ var R = (i, h, e) => new Promise((s, r) => {
7
7
  var o = (C) => {
8
8
  try {
9
9
  F(e.next(C));
10
10
  } catch (N) {
11
- l(N);
11
+ r(N);
12
12
  }
13
13
  }, k = (C) => {
14
14
  try {
15
15
  F(e.throw(C));
16
16
  } catch (N) {
17
- l(N);
17
+ r(N);
18
18
  }
19
19
  }, F = (C) => C.done ? s(C.value) : Promise.resolve(C.value).then(o, k);
20
20
  F((e = e.apply(i, h)).next());
@@ -26,11 +26,11 @@ import { d as U } from "../events-CsVF98U6.js";
26
26
  import { s as V } from "../gestures-CcXV6fCp.js";
27
27
  import { c as W } from "../math-BOBiC4TN.js";
28
28
  import { l as X } from "../number-CbdpfO3u.js";
29
- var w, E, v, L, x, d, c, r, J, H, I, P, D, $, q;
29
+ var w, E, v, L, x, d, c, l, J, A, M, P, D, $, q;
30
30
  class z extends HTMLElement {
31
31
  constructor() {
32
32
  super(...arguments);
33
- n(this, r);
33
+ n(this, l);
34
34
  n(this, w, new T(this, "--loop", !0));
35
35
  n(this, E, new T(this, "--autoplay", !1));
36
36
  n(this, v, new T(this, "--swipe", "x"));
@@ -38,8 +38,8 @@ class z extends HTMLElement {
38
38
  n(this, x, !1);
39
39
  n(this, d, []);
40
40
  n(this, c, 0);
41
- n(this, I, (e) => {
42
- a(this, x, e.isIntersecting), t(this, x) ? u(this, r, H).call(this) : clearInterval(t(this, L));
41
+ n(this, M, (e) => {
42
+ a(this, x, e.isIntersecting), t(this, x) ? u(this, l, A).call(this) : clearInterval(t(this, L));
43
43
  });
44
44
  n(this, P, () => {
45
45
  clearInterval(t(this, L)), t(this, x) && a(this, L, setInterval(
@@ -48,15 +48,15 @@ class z extends HTMLElement {
48
48
  ));
49
49
  });
50
50
  n(this, $, () => {
51
- u(this, r, D).call(this, t(this, c) + 1);
51
+ u(this, l, D).call(this, t(this, c) + 1);
52
52
  });
53
53
  n(this, q, (e) => {
54
54
  if (!t(this, v).current)
55
55
  return;
56
56
  let s = 0;
57
57
  V(
58
- (l) => {
59
- const o = e.x - l.x, k = e.y - l.y;
58
+ (r) => {
59
+ const o = e.x - r.x, k = e.y - r.y;
60
60
  t(this, v).current === "x" ? Math.abs(o) > Math.abs(k) && Math.abs(o) > 10 && (s = Math.sign(o)) : t(this, v).current === "y" && Math.abs(k) > Math.abs(o) && Math.abs(k) > 10 && (s = Math.sign(k));
61
61
  },
62
62
  () => {
@@ -72,10 +72,10 @@ class z extends HTMLElement {
72
72
  return t(this, d);
73
73
  }
74
74
  addItem(e) {
75
- t(this, d).push(e), u(this, r, J).call(this);
75
+ t(this, d).push(e), u(this, l, J).call(this);
76
76
  }
77
77
  set(e) {
78
- (!this.handleSet || this.handleSet(e)) && (u(this, r, D).call(this, e), u(this, r, H).call(this));
78
+ (!this.handleSet || this.handleSet(e)) && (u(this, l, D).call(this, e), u(this, l, A).call(this));
79
79
  }
80
80
  shift(e) {
81
81
  this.set(t(this, c) + e);
@@ -86,21 +86,21 @@ class z extends HTMLElement {
86
86
  ...this.querySelectorAll(
87
87
  `[data-billboard-item${this.id ? `="${this.id}"` : ""}]`
88
88
  )
89
- ]), (e = t(this, d)[0]) == null || e.classList.add("current"), u(this, r, J).call(this), t(this, E).subscribe((s) => {
90
- s.current ? (G.subscribe(this, t(this, I)), u(this, r, H).call(this)) : (a(this, x, !0), G.unsubscribe(t(this, I)), clearInterval(t(this, L)), u(this, r, D).call(this, 0));
89
+ ]), (e = t(this, d)[0]) == null || e.classList.add("current"), u(this, l, J).call(this), t(this, E).subscribe((s) => {
90
+ s.current ? (G.subscribe(this, t(this, M)), u(this, l, A).call(this)) : (a(this, x, !0), G.unsubscribe(t(this, M)), clearInterval(t(this, L)), u(this, l, D).call(this, 0));
91
91
  }), t(this, E).observe(), t(this, v).observe(), t(this, w).observe(), this.addEventListener("pointerdown", t(this, q));
92
92
  }
93
93
  disconnectedCallback() {
94
- t(this, E).unobserve(), t(this, v).unobserve(), t(this, w).unobserve(), G.unsubscribe(t(this, I)), clearInterval(t(this, L));
94
+ t(this, E).unobserve(), t(this, v).unobserve(), t(this, w).unobserve(), G.unsubscribe(t(this, M)), clearInterval(t(this, L));
95
95
  }
96
96
  }
97
- w = new WeakMap(), E = new WeakMap(), v = new WeakMap(), L = new WeakMap(), x = new WeakMap(), d = new WeakMap(), c = new WeakMap(), r = new WeakSet(), J = function() {
97
+ w = new WeakMap(), E = new WeakMap(), v = new WeakMap(), L = new WeakMap(), x = new WeakMap(), d = new WeakMap(), c = new WeakMap(), l = new WeakSet(), J = function() {
98
98
  t(this, d).length > 1 ? this.classList.add("has-length") : this.classList.remove("has-length");
99
- }, H = function() {
99
+ }, A = function() {
100
100
  t(this, E).current !== !1 && t(this, P).call(this);
101
- }, I = new WeakMap(), P = new WeakMap(), D = function(e) {
102
- t(this, w).current ? a(this, c, X(e, t(this, d).length)) : a(this, c, W(e, 0, t(this, d).length - 1)), t(this, d).forEach((s, l) => {
103
- s.classList.remove("current", "previous", "next"), l === t(this, c) ? s.classList.add("current") : l < t(this, c) ? s.classList.add("previous") : l > t(this, c) && s.classList.add("next");
101
+ }, M = new WeakMap(), P = new WeakMap(), D = function(e) {
102
+ t(this, w).current ? a(this, c, X(e, t(this, d).length)) : a(this, c, W(e, 0, t(this, d).length - 1)), t(this, d).forEach((s, r) => {
103
+ s.classList.remove("current", "previous", "next"), r === t(this, c) ? s.classList.add("current") : r < t(this, c) ? s.classList.add("previous") : r > t(this, c) && s.classList.add("next");
104
104
  }), U(this, "billboardChange", {
105
105
  detail: {
106
106
  counter: t(this, c)
@@ -110,16 +110,16 @@ w = new WeakMap(), E = new WeakMap(), v = new WeakMap(), L = new WeakMap(), x =
110
110
  }, 0);
111
111
  }, $ = new WeakMap(), q = new WeakMap();
112
112
  customElements.get("e-billboard") || customElements.define("e-billboard", z);
113
- var b, M, m, A, y;
113
+ var b, I, m, H, y;
114
114
  class Y extends HTMLElement {
115
115
  constructor() {
116
116
  super(...arguments);
117
117
  n(this, b, null);
118
- n(this, M, null);
118
+ n(this, I, null);
119
119
  n(this, m, []);
120
- n(this, A, (e) => {
121
- const s = e.currentTarget, l = t(this, m).findIndex((o) => o === s);
122
- l >= 0 && t(this, b).set(l);
120
+ n(this, H, (e) => {
121
+ const s = e.currentTarget, r = t(this, m).findIndex((o) => o === s);
122
+ r >= 0 && t(this, b).set(r);
123
123
  });
124
124
  n(this, y, () => {
125
125
  t(this, m).forEach((e, s) => {
@@ -131,14 +131,15 @@ class Y extends HTMLElement {
131
131
  return R(this, null, function* () {
132
132
  var e;
133
133
  if (a(this, b, O(this, z)), t(this, b) && (yield customElements.whenDefined("e-billboard"), this.isConnected)) {
134
+ this.innerHTML = "";
134
135
  const s = t(this, b).itemElements.length;
135
- a(this, M, document.createElement("div"));
136
- for (let l = 0; l < s; l++) {
136
+ a(this, I, document.createElement("div"));
137
+ for (let r = 0; r < s; r++) {
137
138
  const o = document.createElement("button");
138
- t(this, m).push(o), t(this, M).appendChild(o);
139
+ t(this, m).push(o), t(this, I).appendChild(o);
139
140
  }
140
- this.appendChild(t(this, M)), t(this, m).forEach((l) => {
141
- l.addEventListener("click", t(this, A));
141
+ this.appendChild(t(this, I)), t(this, m).forEach((r) => {
142
+ r.addEventListener("click", t(this, H));
142
143
  }), (e = t(this, b)) == null || e.addEventListener(
143
144
  "billboardChange",
144
145
  t(this, y)
@@ -149,14 +150,14 @@ class Y extends HTMLElement {
149
150
  disconnectedCallback() {
150
151
  var e;
151
152
  t(this, m).forEach((s) => {
152
- s.removeEventListener("click", t(this, A));
153
+ s.removeEventListener("click", t(this, H));
153
154
  }), (e = t(this, b)) == null || e.removeEventListener(
154
155
  "billboardChange",
155
156
  t(this, y)
156
157
  ), this.innerHTML = "", a(this, m, []);
157
158
  }
158
159
  }
159
- b = new WeakMap(), M = new WeakMap(), m = new WeakMap(), A = new WeakMap(), y = new WeakMap();
160
+ b = new WeakMap(), I = new WeakMap(), m = new WeakMap(), H = new WeakMap(), y = new WeakMap();
160
161
  K && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", Y);
161
162
  var f, p, g;
162
163
  class Z extends HTMLElement {
@@ -6,6 +6,7 @@ export interface MorphOptions {
6
6
  cachePages: boolean;
7
7
  trailingSlash: boolean;
8
8
  scrollSelector: string;
9
+ morphInsideScrollContainer: boolean;
9
10
  }
10
11
  export interface MorphNavigationEntry {
11
12
  pathname: string;
@@ -20,4 +20,5 @@ export declare class MorphRoute {
20
20
  saveScrollState(): void;
21
21
  saveDocumentState(): void;
22
22
  restoreScrollPosition(): void;
23
+ renewScrollPosition(): void;
23
24
  }
@@ -1 +1 @@
1
- "use strict";var vt=(r,e)=>(e=Symbol[r])?e:Symbol.for("Symbol."+r),Lt=r=>{throw TypeError(r)};var et=(r,e,s)=>e.has(r)||Lt("Cannot "+s);var t=(r,e,s)=>(et(r,e,"read from private field"),s?s.call(r):e.get(r)),o=(r,e,s)=>e.has(r)?Lt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,s),a=(r,e,s,i)=>(et(r,e,"write to private field"),i?i.call(r,s):e.set(r,s),s),d=(r,e,s)=>(et(r,e,"access private method"),s);var H=(r,e,s)=>new Promise((i,u)=>{var f=p=>{try{T(s.next(p))}catch(h){u(h)}},M=p=>{try{T(s.throw(p))}catch(h){u(h)}},T=p=>p.done?i(p.value):Promise.resolve(p.value).then(f,M);T((s=s.apply(r,e)).next())});var St=(r,e,s)=>(e=r[vt("asyncIterator")])?e.call(r):(r=r[vt("iterator")](),e={},s=(i,u)=>(u=r[i])&&(e[i]=f=>new Promise((M,T,p)=>(f=u.call(r,f),p=f.done,Promise.resolve(f.value).then(h=>M({value:h,done:p}),T)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pt=require("../index-Cqw2NKev.cjs"),_=require("../events-KVanG9sR.cjs"),Nt=require("../polyfills-Df4r-ETT.cjs"),yt=require("../scroll-DAhSpkhR.cjs"),X=require("../url-D1CgmwZ_.cjs"),Dt=require("../css-value-parser/index.cjs");class At extends HTMLElement{connectedCallback(){const e={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};for(const[s,i]of Object.entries(e))this.setAttribute(s,i)}}Pt.isBrowser&&!customElements.get("morph-announcer")&&customElements.define("morph-announcer",At);var y,c,x,j,I;class bt{constructor(e,s){o(this,y);o(this,c);o(this,x);o(this,j,e=>{if(e.preventDefault(),t(this,c).hasAttribute("data-back")&&t(this,y).previousPathname)history.back();else{const i=t(this,c).getAttribute("data-history-action")||"push",u=t(this,c).hasAttribute("data-center-scroll"),f=getComputedStyle(t(this,c)).getPropertyValue("--offset-scroll").trim(),M=f?Dt.cssValueParser.parse(f):void 0,T=t(this,c).hasAttribute("data-revalidate"),p=t(this,c).hasAttribute("data-keep-search-parameters");t(this,y).navigate(t(this,x),{historyAction:i,centerScroll:u,offsetScroll:M,revalidate:T,keepSearchParameters:p})}});o(this,I,()=>{t(this,y).prefetch(t(this,x)),t(this,c).removeEventListener("pointerenter",t(this,I))});a(this,y,s),a(this,c,e),a(this,x,t(this,c).getAttribute("href")||"/"),t(this,c).addEventListener("click",t(this,j)),this.checkCurrent(location.pathname),t(this,c).hasAttribute("data-prefetch")&&t(this,c).addEventListener("pointerenter",t(this,I))}get element(){return t(this,c)}checkCurrent(e){const s=t(this,y).normalizePath(e),i=t(this,y).normalizePath(t(this,x));t(this,c).hasAttribute("data-include")&&s.pathname.includes(i.pathname)?t(this,c).classList.add("current"):i.pathname===s.pathname?t(this,c).classList.add("current"):t(this,c).classList.remove("current")}destroy(){t(this,c).removeEventListener("click",t(this,j)),t(this,c).removeEventListener("pointerenter",t(this,I)),t(this,c).classList.remove("current")}}y=new WeakMap,c=new WeakMap,x=new WeakMap,j=new WeakMap,I=new WeakMap;var N,V,E,D,R,A;class wt{constructor(e,s,i){o(this,N);o(this,V);o(this,E,{x:0,y:0});o(this,D);o(this,R,null);o(this,A,null);a(this,N,e),a(this,V,s),a(this,D,i.cloneNode(!0))}get pathname(){return t(this,V)}get scrollState(){return t(this,E)}get document(){return t(this,A)}cloneDocument(){a(this,A,(t(this,R)||t(this,D)).cloneNode(!0))}get title(){let e="";if(t(this,A).title)e=t(this,A).title;else{const s=t(this,A).querySelector("h1");e=(s==null?void 0:s.innerText)||(s==null?void 0:s.textContent)||t(this,V)}return e}clearScrollState(){t(this,E).x=0,t(this,E).y=0}clearDocumentState(){a(this,R,null)}saveScrollState(){t(this,D).documentElement.hasAttribute("data-no-scroll-restoration")?(t(this,E).x=0,t(this,E).y=0):(t(this,E).x=t(this,N).scrollElement.scrollLeft,t(this,E).y=t(this,N).scrollElement.scrollTop)}saveDocumentState(){t(this,D).documentElement.hasAttribute("data-no-page-restoration")?a(this,R,null):a(this,R,document.cloneNode(!0))}restoreScrollPosition(){t(this,N).scrollElement.scroll({top:t(this,E).y,left:t(this,E).x})}}N=new WeakMap,V=new WeakMap,E=new WeakMap,D=new WeakMap,R=new WeakMap,A=new WeakMap;var k,U,g,Z,C,m,K,q,b,L,B,z,l,st,it,rt,kt,nt,ot,at,lt,$,O;class Rt{constructor(e){o(this,l);o(this,k,null);o(this,U,null);o(this,g,[]);o(this,Z,new DOMParser);o(this,C);o(this,m,null);o(this,K);o(this,q,[]);o(this,b,!1);o(this,L,null);o(this,B,new Map);o(this,z,null);o(this,$,e=>H(this,null,function*(){var s;(s=e.state)!=null&&s.path&&(e.preventDefault(),a(this,b,!0),yield this.navigate(e.state.path,{historyAction:"none"}),a(this,b,!1))}));o(this,O,()=>{const e=t(this,L).scrollTop,s=t(this,L).scrollLeft;document.documentElement.classList.toggle("top-scrolled",e>0),document.documentElement.classList.toggle("left-scrolled",s>0),_.dispatchEvent(document,"morphScroll",{detail:{left:s,top:e}})});if(Pt.isBrowser){a(this,k,{base:X.normalizeBase(e==null?void 0:e.base),waitForHeadToLoad:(e==null?void 0:e.waitForHeadToLoad)!==!1,cachePages:(e==null?void 0:e.cachePages)!==!1,trailingSlash:(e==null?void 0:e.trailingSlash)||!1,scrollSelector:(e==null?void 0:e.scrollSelector)||"body"}),a(this,U,d(this,l,rt).call(this,document.body));const s=this.normalizePath(location.pathname+location.hash);a(this,m,s.pathname),t(this,B).set(t(this,m),new wt(this,t(this,m),document)),document.documentElement.setAttribute("data-current-pathname",t(this,m)),document.documentElement.setAttribute("data-current-leaf",s.leaf),this.findLinks(),addEventListener("popstate",t(this,$)),X.changeHistory({action:"replace",pathname:t(this,m),searchParameters:s.parameters||location.search,hash:s.hash}),a(this,z,new At),d(this,l,at).call(this,document)}}get currentPathname(){return t(this,m)}get previousPathname(){return t(this,K)}get links(){return t(this,g)}get scrollElement(){return t(this,L)}get isPopstateNavigation(){return t(this,b)}normalizePath(e){return X.splitPath(e,{base:t(this,k).base,trailingSlash:t(this,k).trailingSlash})}prefetch(e){return H(this,null,function*(){const s=this.normalizePath(e);d(this,l,it).call(this,s.pathname)})}navigate(T){return H(this,arguments,function*(e,{historyAction:s="push",centerScroll:i,offsetScroll:u,revalidate:f,keepSearchParameters:M}={}){var ct;if(t(this,q).length)return;const p=this.normalizePath(((ct=this.pathnameModifier)==null?void 0:ct.call(this,e))||e);let{pathname:h,hash:Y,parameters:Ct,leaf:Mt}=p;if(t(this,C)===h||t(this,m)===h){t(this,b)||d(this,l,lt).call(this,Y||0,{centerScroll:i,offsetScroll:u,behavior:"smooth"});return}a(this,C,h),t(this,g).forEach(F=>{F.checkCurrent(h)});try{let F=!0;if(this.preprocessor)try{yield new Promise((n,w)=>{var P;(P=this.preprocessor)==null||P.call(this,{pathname:h,resolve:n,reject:w})})}catch(n){n?console.error(n):console.log("Route change canceled"),F=!1}if(!F||t(this,C)!==h){t(this,g).forEach(n=>{n.checkCurrent(t(this,m))});return}const ht=yield d(this,l,st).call(this,t(this,m)),S=yield d(this,l,st).call(this,h,f);if(t(this,C)!==h){t(this,g).forEach(n=>{n.checkCurrent(t(this,m))});return}ht.saveScrollState(),ht.saveDocumentState(),t(this,b)||(S.clearScrollState(),S.clearDocumentState()),S.cloneDocument(),t(this,z).textContent=S.title,document.body.appendChild(t(this,z));const ut={pathname:h};_.dispatchEvent(document,"morphStart",{detail:ut});const dt=Array.from(document.head.children),mt=Array.from(S.document.head.children),ft=d(this,l,kt).call(this,dt,mt),Tt=d(this,l,nt).call(this,dt,ft),G=d(this,l,nt).call(this,mt,ft);G.forEach((n,w)=>{if(n.tagName==="SCRIPT"&&n.getAttribute("src")){const P=document.createElement("script");P.type="module",P.src=n.getAttribute("src"),G[w]=P}}),G.forEach(n=>{document.head.appendChild(n)});const tt=G.filter(n=>{if(n.hasAttribute("data-no-waiting"))return!1;if(d(this,l,ot).call(this,n))return!0});t(this,k).waitForHeadToLoad&&tt.length&&(yield new Promise(n=>H(this,null,function*(){let w=0;try{for(var P=St(tt),Et,W,gt;Et=!(W=yield P.next()).done;Et=!1){const J=W.value;J.onload=()=>{w++,w===tt.length&&n()}}}catch(W){gt=[W]}finally{try{Et&&(W=P.return)&&(yield W.call(P))}finally{if(gt)throw gt[0]}}}))),yield yt.wait(10);const pt=[];Tt.forEach(n=>{n.hasAttribute("data-permanent")||(d(this,l,ot).call(this,n)?pt.push(n):n.remove())});const Ht=d(this,l,rt).call(this,S.document.body);d(this,l,at).call(this,S.document),document.documentElement.setAttribute("data-current-pathname",h),document.documentElement.setAttribute("data-current-leaf",Mt),X.changeHistory({action:s,pathname:h,searchParameters:Ct||(M?location.search:""),hash:Y}),t(this,z).remove(),a(this,K,t(this,m)),a(this,m,h),t(this,U).forEach((n,w)=>{const P=Ht[w],Et=getComputedStyle(n).getPropertyValue("--morph-duration"),W=[...P.childNodes];if(Et){const gt=[...n.childNodes];gt.forEach(v=>{v instanceof HTMLElement&&v.classList.add("old")}),W.forEach(v=>{v instanceof HTMLElement&&v.classList.add("new")}),n.prepend(...W),Nt.requestIdleCallback(()=>{W.forEach(v=>{v instanceof HTMLElement&&v.classList.add("in")})});const J={morphElement:n,pathname:h};_.dispatchEvent(document,"morphNewChildrenAdded",{detail:J});const xt=new Promise(v=>{setTimeout(()=>{gt.forEach(Q=>Q.remove()),W.forEach(Q=>{Q instanceof HTMLElement&&Q.classList.remove("in","new")}),_.dispatchEvent(document,"morphOldChildrenRemoved",{detail:J}),v()},(parseFloat(Et)||0)*1e3+10)});t(this,q).push(xt)}else n.innerHTML="",n.append(...W)}),Y?(S.clearScrollState(),d(this,l,lt).call(this,Y,{centerScroll:i,offsetScroll:u})):t(this,b)&&S.restoreScrollPosition(),yield Promise.all(t(this,q)),pt.forEach(n=>n.remove()),a(this,q,[]),this.findLinks(),_.dispatchEvent(document,"morphComplete",{detail:ut}),window.dispatchEvent(new Event("resize"))}catch(F){console.error(F)}a(this,C,void 0)})}addLink(e){t(this,g).push(new bt(e,this))}addLinks(e){e.forEach(s=>{this.addLink(s)})}removeLink(e){a(this,g,t(this,g).filter(s=>s.element===e?(s.destroy(),!1):!0))}findLinks(){const e=[...document.documentElement.querySelectorAll("a")].filter(s=>{var i;return((i=s.getAttribute("href"))==null?void 0:i.startsWith("/"))&&!s.hasAttribute("download")&&!s.hasAttribute("data-morph-skip")&&!s.closest("[data-morph-skip]")&&s.getAttribute("target")!=="_blank"});t(this,g).forEach(s=>s.destroy()),a(this,g,e.map(s=>new bt(s,this)))}}k=new WeakMap,U=new WeakMap,g=new WeakMap,Z=new WeakMap,C=new WeakMap,m=new WeakMap,K=new WeakMap,q=new WeakMap,b=new WeakMap,L=new WeakMap,B=new WeakMap,z=new WeakMap,l=new WeakSet,st=function(e,s=!1){return H(this,null,function*(){let i=t(this,B).get(e);return(!i||s)&&(i=yield d(this,l,it).call(this,e)),i})},it=function(e){return H(this,null,function*(){const i=yield(yield fetch(e)).text(),u=t(this,Z).parseFromString(i,"text/html"),f=new wt(this,e,u);return t(this,B).set(e,f),f})},rt=function(e){const s=[...e.querySelectorAll("[data-morph]")];return s.length?s:[e]},kt=function(e,s){return e.filter(i=>s.find(u=>u.outerHTML===i.outerHTML))},nt=function(e,s){return e.filter(i=>!s.find(u=>u.outerHTML===i.outerHTML))},ot=function(e){return e.tagName==="SCRIPT"||e.tagName==="STYLE"||e.tagName==="LINK"&&e.getAttribute("rel")==="stylesheet"},at=function(e){var s,i;(s=t(this,L))==null||s.removeEventListener("scroll",t(this,O)),a(this,L,e.querySelector(t(this,k).scrollSelector)||e.documentElement),(i=t(this,L))==null||i.addEventListener("scroll",t(this,O)),t(this,O).call(this)},lt=function(e,s){const i=typeof e=="string"?document.getElementById(e):e;(typeof i=="number"||i)&&yt.scrollToElement(i,{scrollElement:t(this,L),behavior:(s==null?void 0:s.behavior)||"instant",center:s==null?void 0:s.centerScroll,offset:s==null?void 0:s.offsetScroll})},$=new WeakMap,O=new WeakMap;exports.Morph=Rt;
1
+ "use strict";var vt=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n),St=n=>{throw TypeError(n)};var st=(n,e,s)=>e.has(n)||St("Cannot "+s);var t=(n,e,s)=>(st(n,e,"read from private field"),s?s.call(n):e.get(n)),o=(n,e,s)=>e.has(n)?St("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,s),a=(n,e,s,i)=>(st(n,e,"write to private field"),i?i.call(n,s):e.set(n,s),s),d=(n,e,s)=>(st(n,e,"access private method"),s);var x=(n,e,s)=>new Promise((i,u)=>{var f=p=>{try{H(s.next(p))}catch(h){u(h)}},M=p=>{try{H(s.throw(p))}catch(h){u(h)}},H=p=>p.done?i(p.value):Promise.resolve(p.value).then(f,M);H((s=s.apply(n,e)).next())});var yt=(n,e,s)=>(e=n[vt("asyncIterator")])?e.call(n):(n=n[vt("iterator")](),e={},s=(i,u)=>(u=n[i])&&(e[i]=f=>new Promise((M,H,p)=>(f=u.call(n,f),p=f.done,Promise.resolve(f.value).then(h=>M({value:h,done:p}),H)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pt=require("../index-Cqw2NKev.cjs"),U=require("../events-KVanG9sR.cjs"),Nt=require("../polyfills-Df4r-ETT.cjs"),Lt=require("../scroll-DAhSpkhR.cjs"),Z=require("../url-D1CgmwZ_.cjs"),Dt=require("../css-value-parser/index.cjs");class At extends HTMLElement{connectedCallback(){const e={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};for(const[s,i]of Object.entries(e))this.setAttribute(s,i)}}Pt.isBrowser&&!customElements.get("morph-announcer")&&customElements.define("morph-announcer",At);var w,c,N,K,V;class bt{constructor(e,s){o(this,w);o(this,c);o(this,N);o(this,K,e=>{if(e.preventDefault(),t(this,c).hasAttribute("data-back")&&t(this,w).previousPathname)history.back();else{const i=t(this,c).getAttribute("data-history-action")||"push",u=t(this,c).hasAttribute("data-center-scroll"),f=getComputedStyle(t(this,c)).getPropertyValue("--offset-scroll").trim(),M=f?Dt.cssValueParser.parse(f):void 0,H=t(this,c).hasAttribute("data-revalidate"),p=t(this,c).hasAttribute("data-keep-search-parameters");t(this,w).navigate(t(this,N),{historyAction:i,centerScroll:u,offsetScroll:M,revalidate:H,keepSearchParameters:p})}});o(this,V,()=>{t(this,w).prefetch(t(this,N)),t(this,c).removeEventListener("pointerenter",t(this,V))});a(this,w,s),a(this,c,e),a(this,N,t(this,c).getAttribute("href")||"/"),t(this,c).addEventListener("click",t(this,K)),this.checkCurrent(location.pathname),t(this,c).hasAttribute("data-prefetch")&&t(this,c).addEventListener("pointerenter",t(this,V))}get element(){return t(this,c)}checkCurrent(e){const s=t(this,w).normalizePath(e),i=t(this,w).normalizePath(t(this,N));t(this,c).hasAttribute("data-include")&&s.pathname.includes(i.pathname)?t(this,c).classList.add("current"):i.pathname===s.pathname?t(this,c).classList.add("current"):t(this,c).classList.remove("current")}destroy(){t(this,c).removeEventListener("click",t(this,K)),t(this,c).removeEventListener("pointerenter",t(this,V)),t(this,c).classList.remove("current")}}w=new WeakMap,c=new WeakMap,N=new WeakMap,K=new WeakMap,V=new WeakMap;var k,B,E,D,q,C;class wt{constructor(e,s,i){o(this,k);o(this,B);o(this,E,{x:0,y:0});o(this,D);o(this,q,null);o(this,C,null);a(this,k,e),a(this,B,s),a(this,D,i.cloneNode(!0))}get pathname(){return t(this,B)}get scrollState(){return t(this,E)}get document(){return t(this,C)}cloneDocument(){a(this,C,(t(this,q)||t(this,D)).cloneNode(!0))}get title(){let e="";if(t(this,C).title)e=t(this,C).title;else{const s=t(this,C).querySelector("h1");e=(s==null?void 0:s.innerText)||(s==null?void 0:s.textContent)||t(this,B)}return e}clearScrollState(){t(this,E).x=0,t(this,E).y=0}clearDocumentState(){a(this,q,null)}saveScrollState(){t(this,D).documentElement.hasAttribute("data-no-scroll-restoration")?(t(this,E).x=0,t(this,E).y=0):(t(this,E).x=t(this,k).scrollElement.scrollLeft,t(this,E).y=t(this,k).scrollElement.scrollTop)}saveDocumentState(){t(this,D).documentElement.hasAttribute("data-no-page-restoration")?a(this,q,null):a(this,q,document.cloneNode(!0))}restoreScrollPosition(){t(this,k).scrollElement.scroll({top:t(this,E).y,left:t(this,E).x})}renewScrollPosition(){t(this,k).scrollElement.scroll({top:0,left:0,behavior:"instant"})}}k=new WeakMap,B=new WeakMap,E=new WeakMap,D=new WeakMap,q=new WeakMap,C=new WeakMap;var P,O,g,$,T,m,Y,R,A,L,W,z,l,it,rt,nt,kt,ot,at,lt,ct,tt,_;class qt{constructor(e){o(this,l);o(this,P,null);o(this,O,null);o(this,g,[]);o(this,$,new DOMParser);o(this,T);o(this,m,null);o(this,Y);o(this,R,[]);o(this,A,!1);o(this,L,null);o(this,W,new Map);o(this,z,null);o(this,tt,e=>x(this,null,function*(){var s;(s=e.state)!=null&&s.path&&(e.preventDefault(),a(this,A,!0),yield this.navigate(e.state.path,{historyAction:"none"}),a(this,A,!1))}));o(this,_,()=>{const e=t(this,L).scrollTop,s=t(this,L).scrollLeft;document.documentElement.classList.toggle("top-scrolled",e>0),document.documentElement.classList.toggle("left-scrolled",s>0),U.dispatchEvent(document,"morphScroll",{detail:{left:s,top:e}})});if(Pt.isBrowser){a(this,P,{base:Z.normalizeBase(e==null?void 0:e.base),waitForHeadToLoad:(e==null?void 0:e.waitForHeadToLoad)!==!1,cachePages:(e==null?void 0:e.cachePages)!==!1,trailingSlash:(e==null?void 0:e.trailingSlash)||!1,scrollSelector:(e==null?void 0:e.scrollSelector)||"body",morphInsideScrollContainer:(e==null?void 0:e.morphInsideScrollContainer)||!1}),a(this,O,d(this,l,nt).call(this,document.body));const s=this.normalizePath(location.pathname+location.hash);a(this,m,s.pathname),t(this,W).set(t(this,m),new wt(this,t(this,m),document)),document.documentElement.setAttribute("data-current-pathname",t(this,m)),document.documentElement.setAttribute("data-current-leaf",s.leaf),this.findLinks(),addEventListener("popstate",t(this,tt)),Z.changeHistory({action:"replace",pathname:t(this,m),searchParameters:s.parameters||location.search,hash:s.hash}),a(this,z,new At),d(this,l,lt).call(this,document)}}get currentPathname(){return t(this,m)}get previousPathname(){return t(this,Y)}get links(){return t(this,g)}get scrollElement(){return t(this,L)}get isPopstateNavigation(){return t(this,A)}normalizePath(e){return Z.splitPath(e,{base:t(this,P).base,trailingSlash:t(this,P).trailingSlash})}prefetch(e){return x(this,null,function*(){const s=this.normalizePath(e);d(this,l,rt).call(this,s.pathname)})}navigate(H){return x(this,arguments,function*(e,{historyAction:s="push",centerScroll:i,offsetScroll:u,revalidate:f,keepSearchParameters:M}={}){var ht;if(t(this,R).length)return;const p=this.normalizePath(((ht=this.pathnameModifier)==null?void 0:ht.call(this,e))||e);let{pathname:h,hash:G,parameters:Ct,leaf:Tt}=p;if(t(this,T)===h||t(this,m)===h){t(this,A)||d(this,l,ct).call(this,G||0,{centerScroll:i,offsetScroll:u,behavior:"smooth"});return}a(this,T,h),t(this,g).forEach(I=>{I.checkCurrent(h)});try{let I=!0;if(this.preprocessor)try{yield new Promise((r,b)=>{var v;(v=this.preprocessor)==null||v.call(this,{pathname:h,resolve:r,reject:b})})}catch(r){r?console.error(r):console.log("Route change canceled"),I=!1}if(!I||t(this,T)!==h){t(this,g).forEach(r=>{r.checkCurrent(t(this,m))});return}const ut=yield d(this,l,it).call(this,t(this,m)),S=yield d(this,l,it).call(this,h,f);if(t(this,T)!==h){t(this,g).forEach(r=>{r.checkCurrent(t(this,m))});return}ut.saveScrollState(),ut.saveDocumentState(),t(this,A)||(S.clearScrollState(),S.clearDocumentState()),S.cloneDocument(),t(this,z).textContent=S.title,document.body.appendChild(t(this,z));const dt={pathname:h};U.dispatchEvent(document,"morphStart",{detail:dt});const mt=Array.from(document.head.children),ft=Array.from(S.document.head.children),pt=d(this,l,kt).call(this,mt,ft),Mt=d(this,l,ot).call(this,mt,pt),J=d(this,l,ot).call(this,ft,pt);J.forEach((r,b)=>{if(r.tagName==="SCRIPT"&&r.getAttribute("src")){const v=document.createElement("script");v.type="module",v.src=r.getAttribute("src"),J[b]=v}}),J.forEach(r=>{document.head.appendChild(r)});const et=J.filter(r=>{if(r.hasAttribute("data-no-waiting"))return!1;if(d(this,l,at).call(this,r))return!0});t(this,P).waitForHeadToLoad&&et.length&&(yield new Promise(r=>x(this,null,function*(){let b=0;try{for(var v=yt(et),F,j,gt;F=!(j=yield v.next()).done;F=!1){const Q=j.value;Q.onload=()=>{b++,b===et.length&&r()}}}catch(j){gt=[j]}finally{try{F&&(j=v.return)&&(yield j.call(v))}finally{if(gt)throw gt[0]}}}))),yield Lt.wait(10);const Et=[];Mt.forEach(r=>{r.hasAttribute("data-permanent")||(d(this,l,at).call(this,r)?Et.push(r):r.remove())});const Ht=d(this,l,nt).call(this,S.document.body);t(this,P).morphInsideScrollContainer||d(this,l,lt).call(this,S.document),document.documentElement.setAttribute("data-current-pathname",h),document.documentElement.setAttribute("data-current-leaf",Tt),Z.changeHistory({action:s,pathname:h,searchParameters:Ct||(M?location.search:""),hash:G}),t(this,z).remove(),a(this,Y,t(this,m)),a(this,m,h),t(this,O).forEach((r,b)=>{const v=Ht[b],F=getComputedStyle(r).getPropertyValue("--morph-duration"),j=[...v.childNodes];if(F){const gt=[...r.childNodes];gt.forEach(y=>{y instanceof HTMLElement&&y.classList.add("old")}),j.forEach(y=>{y instanceof HTMLElement&&y.classList.add("new")}),r.prepend(...j),Nt.requestIdleCallback(()=>{j.forEach(y=>{y instanceof HTMLElement&&y.classList.add("in")})});const Q={morphElement:r,pathname:h};U.dispatchEvent(document,"morphNewChildrenAdded",{detail:Q});const xt=new Promise(y=>{setTimeout(()=>{gt.forEach(X=>X.remove()),j.forEach(X=>{X instanceof HTMLElement&&X.classList.remove("in","new")}),U.dispatchEvent(document,"morphOldChildrenRemoved",{detail:Q}),y()},(parseFloat(F)||0)*1e3+10)});t(this,R).push(xt)}else r.innerHTML="",r.append(...j)}),G?(S.clearScrollState(),d(this,l,ct).call(this,G,{centerScroll:i,offsetScroll:u})):t(this,A)?S.restoreScrollPosition():S.renewScrollPosition(),yield Promise.all(t(this,R)),Et.forEach(r=>r.remove()),a(this,R,[]),t(this,O).forEach(r=>{r.querySelectorAll("script").forEach(v=>{const F=document.createElement("script");F.type="module",F.src=v.getAttribute("src"),v.replaceWith(F)})}),this.findLinks(),U.dispatchEvent(document,"morphComplete",{detail:dt}),window.dispatchEvent(new Event("resize"))}catch(I){console.error(I)}a(this,T,void 0)})}addLink(e){t(this,g).push(new bt(e,this))}addLinks(e){e.forEach(s=>{this.addLink(s)})}removeLink(e){a(this,g,t(this,g).filter(s=>s.element===e?(s.destroy(),!1):!0))}findLinks(){const e=[...document.documentElement.querySelectorAll("a")].filter(s=>{var i;return((i=s.getAttribute("href"))==null?void 0:i.startsWith("/"))&&!s.hasAttribute("download")&&!s.hasAttribute("data-morph-skip")&&!s.closest("[data-morph-skip]")&&s.getAttribute("target")!=="_blank"});t(this,g).forEach(s=>s.destroy()),a(this,g,e.map(s=>new bt(s,this)))}}P=new WeakMap,O=new WeakMap,g=new WeakMap,$=new WeakMap,T=new WeakMap,m=new WeakMap,Y=new WeakMap,R=new WeakMap,A=new WeakMap,L=new WeakMap,W=new WeakMap,z=new WeakMap,l=new WeakSet,it=function(e,s=!1){return x(this,null,function*(){let i=t(this,W).get(e);return(!i||s)&&(i=yield d(this,l,rt).call(this,e)),i})},rt=function(e){return x(this,null,function*(){const i=yield(yield fetch(e)).text(),u=t(this,$).parseFromString(i,"text/html"),f=new wt(this,e,u);return t(this,W).set(e,f),f})},nt=function(e){const s=[...e.querySelectorAll("[data-morph]")];return s.length?s:[e]},kt=function(e,s){return e.filter(i=>s.find(u=>u.outerHTML===i.outerHTML))},ot=function(e,s){return e.filter(i=>!s.find(u=>u.outerHTML===i.outerHTML))},at=function(e){return e.tagName==="SCRIPT"||e.tagName==="STYLE"||e.tagName==="LINK"&&e.getAttribute("rel")==="stylesheet"},lt=function(e){var s,i;(s=t(this,L))==null||s.removeEventListener("scroll",t(this,_)),a(this,L,e.querySelector(t(this,P).scrollSelector)||e.documentElement),(i=t(this,L))==null||i.addEventListener("scroll",t(this,_)),t(this,_).call(this)},ct=function(e,s){const i=typeof e=="string"?document.getElementById(e):e;(typeof i=="number"||i)&&Lt.scrollToElement(i,{scrollElement:t(this,L),behavior:(s==null?void 0:s.behavior)||"instant",center:s==null?void 0:s.centerScroll,offset:s==null?void 0:s.offsetScroll})},tt=new WeakMap,_=new WeakMap;exports.Morph=qt;
@@ -1,31 +1,31 @@
1
- var gt = (r, e) => (e = Symbol[r]) ? e : Symbol.for("Symbol." + r), vt = (r) => {
2
- throw TypeError(r);
1
+ var gt = (n, e) => (e = Symbol[n]) ? e : Symbol.for("Symbol." + n), St = (n) => {
2
+ throw TypeError(n);
3
3
  };
4
- var tt = (r, e, s) => e.has(r) || vt("Cannot " + s);
5
- var t = (r, e, s) => (tt(r, e, "read from private field"), s ? s.call(r) : e.get(r)), o = (r, e, s) => e.has(r) ? vt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, s), a = (r, e, s, i) => (tt(r, e, "write to private field"), i ? i.call(r, s) : e.set(r, s), s), d = (r, e, s) => (tt(r, e, "access private method"), s);
6
- var H = (r, e, s) => new Promise((i, u) => {
4
+ var et = (n, e, s) => e.has(n) || St("Cannot " + s);
5
+ var t = (n, e, s) => (et(n, e, "read from private field"), s ? s.call(n) : e.get(n)), o = (n, e, s) => e.has(n) ? St("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, s), a = (n, e, s, i) => (et(n, e, "write to private field"), i ? i.call(n, s) : e.set(n, s), s), d = (n, e, s) => (et(n, e, "access private method"), s);
6
+ var x = (n, e, s) => new Promise((i, u) => {
7
7
  var f = (p) => {
8
8
  try {
9
- M(s.next(p));
10
- } catch (c) {
11
- u(c);
9
+ H(s.next(p));
10
+ } catch (h) {
11
+ u(h);
12
12
  }
13
- }, T = (p) => {
13
+ }, M = (p) => {
14
14
  try {
15
- M(s.throw(p));
16
- } catch (c) {
17
- u(c);
15
+ H(s.throw(p));
16
+ } catch (h) {
17
+ u(h);
18
18
  }
19
- }, M = (p) => p.done ? i(p.value) : Promise.resolve(p.value).then(f, T);
20
- M((s = s.apply(r, e)).next());
19
+ }, H = (p) => p.done ? i(p.value) : Promise.resolve(p.value).then(f, M);
20
+ H((s = s.apply(n, e)).next());
21
21
  });
22
- var Lt = (r, e, s) => (e = r[gt("asyncIterator")]) ? e.call(r) : (r = r[gt("iterator")](), e = {}, s = (i, u) => (u = r[i]) && (e[i] = (f) => new Promise((T, M, p) => (f = u.call(r, f), p = f.done, Promise.resolve(f.value).then((c) => T({ value: c, done: p }), M)))), s("next"), s("return"), e);
22
+ var vt = (n, e, s) => (e = n[gt("asyncIterator")]) ? e.call(n) : (n = n[gt("iterator")](), e = {}, s = (i, u) => (u = n[i]) && (e[i] = (f) => new Promise((M, H, p) => (f = u.call(n, f), p = f.done, Promise.resolve(f.value).then((h) => M({ value: h, done: p }), H)))), s("next"), s("return"), e);
23
23
  import { i as yt } from "../index-euf5anj6.js";
24
- import { d as U } from "../events-CsVF98U6.js";
24
+ import { d as K } from "../events-CsVF98U6.js";
25
25
  import { r as xt } from "../polyfills-DJrTJQky.js";
26
26
  import { w as Nt, s as Dt } from "../scroll-Benkuq-t.js";
27
- import { n as Rt, c as St, s as zt } from "../url-B6BNcw6_.js";
28
- import { cssValueParser as qt } from "../css-value-parser/index.js";
27
+ import { n as Rt, c as Lt, s as zt } from "../url-B6BNcw6_.js";
28
+ import { cssValueParser as It } from "../css-value-parser/index.js";
29
29
  class Pt extends HTMLElement {
30
30
  connectedCallback() {
31
31
  const e = {
@@ -38,77 +38,77 @@ class Pt extends HTMLElement {
38
38
  }
39
39
  }
40
40
  yt && !customElements.get("morph-announcer") && customElements.define("morph-announcer", Pt);
41
- var b, l, x, j, I;
42
- class bt {
41
+ var y, c, N, Y, V;
42
+ class wt {
43
43
  constructor(e, s) {
44
- o(this, b);
45
- o(this, l);
46
- o(this, x);
47
- o(this, j, (e) => {
48
- if (e.preventDefault(), t(this, l).hasAttribute("data-back") && t(this, b).previousPathname)
44
+ o(this, y);
45
+ o(this, c);
46
+ o(this, N);
47
+ o(this, Y, (e) => {
48
+ if (e.preventDefault(), t(this, c).hasAttribute("data-back") && t(this, y).previousPathname)
49
49
  history.back();
50
50
  else {
51
- const i = t(this, l).getAttribute(
51
+ const i = t(this, c).getAttribute(
52
52
  "data-history-action"
53
- ) || "push", u = t(this, l).hasAttribute("data-center-scroll"), f = getComputedStyle(t(this, l)).getPropertyValue("--offset-scroll").trim(), T = f ? qt.parse(f) : void 0, M = t(this, l).hasAttribute("data-revalidate"), p = t(this, l).hasAttribute(
53
+ ) || "push", u = t(this, c).hasAttribute("data-center-scroll"), f = getComputedStyle(t(this, c)).getPropertyValue("--offset-scroll").trim(), M = f ? It.parse(f) : void 0, H = t(this, c).hasAttribute("data-revalidate"), p = t(this, c).hasAttribute(
54
54
  "data-keep-search-parameters"
55
55
  );
56
- t(this, b).navigate(t(this, x), {
56
+ t(this, y).navigate(t(this, N), {
57
57
  historyAction: i,
58
58
  centerScroll: u,
59
- offsetScroll: T,
60
- revalidate: M,
59
+ offsetScroll: M,
60
+ revalidate: H,
61
61
  keepSearchParameters: p
62
62
  });
63
63
  }
64
64
  });
65
- o(this, I, () => {
66
- t(this, b).prefetch(t(this, x)), t(this, l).removeEventListener("pointerenter", t(this, I));
65
+ o(this, V, () => {
66
+ t(this, y).prefetch(t(this, N)), t(this, c).removeEventListener("pointerenter", t(this, V));
67
67
  });
68
- a(this, b, s), a(this, l, e), a(this, x, t(this, l).getAttribute("href") || "/"), t(this, l).addEventListener("click", t(this, j)), this.checkCurrent(location.pathname), t(this, l).hasAttribute("data-prefetch") && t(this, l).addEventListener("pointerenter", t(this, I));
68
+ a(this, y, s), a(this, c, e), a(this, N, t(this, c).getAttribute("href") || "/"), t(this, c).addEventListener("click", t(this, Y)), this.checkCurrent(location.pathname), t(this, c).hasAttribute("data-prefetch") && t(this, c).addEventListener("pointerenter", t(this, V));
69
69
  }
70
70
  get element() {
71
- return t(this, l);
71
+ return t(this, c);
72
72
  }
73
73
  checkCurrent(e) {
74
- const s = t(this, b).normalizePath(e), i = t(this, b).normalizePath(t(this, x));
75
- t(this, l).hasAttribute("data-include") && s.pathname.includes(i.pathname) ? t(this, l).classList.add("current") : i.pathname === s.pathname ? t(this, l).classList.add("current") : t(this, l).classList.remove("current");
74
+ const s = t(this, y).normalizePath(e), i = t(this, y).normalizePath(t(this, N));
75
+ t(this, c).hasAttribute("data-include") && s.pathname.includes(i.pathname) ? t(this, c).classList.add("current") : i.pathname === s.pathname ? t(this, c).classList.add("current") : t(this, c).classList.remove("current");
76
76
  }
77
77
  destroy() {
78
- t(this, l).removeEventListener("click", t(this, j)), t(this, l).removeEventListener("pointerenter", t(this, I)), t(this, l).classList.remove("current");
78
+ t(this, c).removeEventListener("click", t(this, Y)), t(this, c).removeEventListener("pointerenter", t(this, V)), t(this, c).classList.remove("current");
79
79
  }
80
80
  }
81
- b = new WeakMap(), l = new WeakMap(), x = new WeakMap(), j = new WeakMap(), I = new WeakMap();
82
- var N, V, E, D, R, A;
83
- class wt {
81
+ y = new WeakMap(), c = new WeakMap(), N = new WeakMap(), Y = new WeakMap(), V = new WeakMap();
82
+ var k, W, E, D, R, C;
83
+ class bt {
84
84
  constructor(e, s, i) {
85
- o(this, N);
86
- o(this, V);
85
+ o(this, k);
86
+ o(this, W);
87
87
  o(this, E, { x: 0, y: 0 });
88
88
  o(this, D);
89
89
  o(this, R, null);
90
- o(this, A, null);
91
- a(this, N, e), a(this, V, s), a(this, D, i.cloneNode(!0));
90
+ o(this, C, null);
91
+ a(this, k, e), a(this, W, s), a(this, D, i.cloneNode(!0));
92
92
  }
93
93
  get pathname() {
94
- return t(this, V);
94
+ return t(this, W);
95
95
  }
96
96
  get scrollState() {
97
97
  return t(this, E);
98
98
  }
99
99
  get document() {
100
- return t(this, A);
100
+ return t(this, C);
101
101
  }
102
102
  cloneDocument() {
103
- a(this, A, (t(this, R) || t(this, D)).cloneNode(!0));
103
+ a(this, C, (t(this, R) || t(this, D)).cloneNode(!0));
104
104
  }
105
105
  get title() {
106
106
  let e = "";
107
- if (t(this, A).title)
108
- e = t(this, A).title;
107
+ if (t(this, C).title)
108
+ e = t(this, C).title;
109
109
  else {
110
- const s = t(this, A).querySelector("h1");
111
- e = (s == null ? void 0 : s.innerText) || (s == null ? void 0 : s.textContent) || t(this, V);
110
+ const s = t(this, C).querySelector("h1");
111
+ e = (s == null ? void 0 : s.innerText) || (s == null ? void 0 : s.textContent) || t(this, W);
112
112
  }
113
113
  return e;
114
114
  }
@@ -121,7 +121,7 @@ class wt {
121
121
  saveScrollState() {
122
122
  t(this, D).documentElement.hasAttribute(
123
123
  "data-no-scroll-restoration"
124
- ) ? (t(this, E).x = 0, t(this, E).y = 0) : (t(this, E).x = t(this, N).scrollElement.scrollLeft, t(this, E).y = t(this, N).scrollElement.scrollTop);
124
+ ) ? (t(this, E).x = 0, t(this, E).y = 0) : (t(this, E).x = t(this, k).scrollElement.scrollLeft, t(this, E).y = t(this, k).scrollElement.scrollTop);
125
125
  }
126
126
  saveDocumentState() {
127
127
  t(this, D).documentElement.hasAttribute(
@@ -129,36 +129,43 @@ class wt {
129
129
  ) ? a(this, R, null) : a(this, R, document.cloneNode(!0));
130
130
  }
131
131
  restoreScrollPosition() {
132
- t(this, N).scrollElement.scroll({
132
+ t(this, k).scrollElement.scroll({
133
133
  top: t(this, E).y,
134
134
  left: t(this, E).x
135
135
  });
136
136
  }
137
+ renewScrollPosition() {
138
+ t(this, k).scrollElement.scroll({
139
+ top: 0,
140
+ left: 0,
141
+ behavior: "instant"
142
+ });
143
+ }
137
144
  }
138
- N = new WeakMap(), V = new WeakMap(), E = new WeakMap(), D = new WeakMap(), R = new WeakMap(), A = new WeakMap();
139
- var k, K, g, X, C, m, Y, z, w, L, B, q, h, et, st, it, At, rt, nt, ot, at, Z, O;
145
+ k = new WeakMap(), W = new WeakMap(), E = new WeakMap(), D = new WeakMap(), R = new WeakMap(), C = new WeakMap();
146
+ var P, B, g, Z, T, m, _, z, A, w, O, I, l, st, it, rt, At, nt, ot, at, lt, $, U;
140
147
  class jt {
141
148
  constructor(e) {
142
- o(this, h);
143
- o(this, k, null);
144
- o(this, K, null);
149
+ o(this, l);
150
+ o(this, P, null);
151
+ o(this, B, null);
145
152
  o(this, g, []);
146
- o(this, X, new DOMParser());
147
- o(this, C);
153
+ o(this, Z, new DOMParser());
154
+ o(this, T);
148
155
  o(this, m, null);
149
- o(this, Y);
156
+ o(this, _);
150
157
  o(this, z, []);
151
- o(this, w, !1);
152
- o(this, L, null);
153
- o(this, B, /* @__PURE__ */ new Map());
154
- o(this, q, null);
155
- o(this, Z, (e) => H(this, null, function* () {
158
+ o(this, A, !1);
159
+ o(this, w, null);
160
+ o(this, O, /* @__PURE__ */ new Map());
161
+ o(this, I, null);
162
+ o(this, $, (e) => x(this, null, function* () {
156
163
  var s;
157
- (s = e.state) != null && s.path && (e.preventDefault(), a(this, w, !0), yield this.navigate(e.state.path, { historyAction: "none" }), a(this, w, !1));
164
+ (s = e.state) != null && s.path && (e.preventDefault(), a(this, A, !0), yield this.navigate(e.state.path, { historyAction: "none" }), a(this, A, !1));
158
165
  }));
159
- o(this, O, () => {
160
- const e = t(this, L).scrollTop, s = t(this, L).scrollLeft;
161
- document.documentElement.classList.toggle("top-scrolled", e > 0), document.documentElement.classList.toggle("left-scrolled", s > 0), U(document, "morphScroll", {
166
+ o(this, U, () => {
167
+ const e = t(this, w).scrollTop, s = t(this, w).scrollLeft;
168
+ document.documentElement.classList.toggle("top-scrolled", e > 0), document.documentElement.classList.toggle("left-scrolled", s > 0), K(document, "morphScroll", {
162
169
  detail: {
163
170
  left: s,
164
171
  top: e
@@ -166,207 +173,213 @@ class jt {
166
173
  });
167
174
  });
168
175
  if (yt) {
169
- a(this, k, {
176
+ a(this, P, {
170
177
  base: Rt(e == null ? void 0 : e.base),
171
178
  waitForHeadToLoad: (e == null ? void 0 : e.waitForHeadToLoad) !== !1,
172
179
  cachePages: (e == null ? void 0 : e.cachePages) !== !1,
173
180
  trailingSlash: (e == null ? void 0 : e.trailingSlash) || !1,
174
- scrollSelector: (e == null ? void 0 : e.scrollSelector) || "body"
175
- }), a(this, K, d(this, h, it).call(this, document.body));
181
+ scrollSelector: (e == null ? void 0 : e.scrollSelector) || "body",
182
+ morphInsideScrollContainer: (e == null ? void 0 : e.morphInsideScrollContainer) || !1
183
+ }), a(this, B, d(this, l, rt).call(this, document.body));
176
184
  const s = this.normalizePath(
177
185
  location.pathname + location.hash
178
186
  );
179
- a(this, m, s.pathname), t(this, B).set(
187
+ a(this, m, s.pathname), t(this, O).set(
180
188
  t(this, m),
181
- new wt(this, t(this, m), document)
189
+ new bt(this, t(this, m), document)
182
190
  ), document.documentElement.setAttribute(
183
191
  "data-current-pathname",
184
192
  t(this, m)
185
193
  ), document.documentElement.setAttribute(
186
194
  "data-current-leaf",
187
195
  s.leaf
188
- ), this.findLinks(), addEventListener("popstate", t(this, Z)), St({
196
+ ), this.findLinks(), addEventListener("popstate", t(this, $)), Lt({
189
197
  action: "replace",
190
198
  pathname: t(this, m),
191
199
  searchParameters: s.parameters || location.search,
192
200
  hash: s.hash
193
- }), a(this, q, new Pt()), d(this, h, ot).call(this, document);
201
+ }), a(this, I, new Pt()), d(this, l, at).call(this, document);
194
202
  }
195
203
  }
196
204
  get currentPathname() {
197
205
  return t(this, m);
198
206
  }
199
207
  get previousPathname() {
200
- return t(this, Y);
208
+ return t(this, _);
201
209
  }
202
210
  get links() {
203
211
  return t(this, g);
204
212
  }
205
213
  get scrollElement() {
206
- return t(this, L);
214
+ return t(this, w);
207
215
  }
208
216
  get isPopstateNavigation() {
209
- return t(this, w);
217
+ return t(this, A);
210
218
  }
211
219
  normalizePath(e) {
212
220
  return zt(e, {
213
- base: t(this, k).base,
214
- trailingSlash: t(this, k).trailingSlash
221
+ base: t(this, P).base,
222
+ trailingSlash: t(this, P).trailingSlash
215
223
  });
216
224
  }
217
225
  prefetch(e) {
218
- return H(this, null, function* () {
226
+ return x(this, null, function* () {
219
227
  const s = this.normalizePath(e);
220
- d(this, h, st).call(this, s.pathname);
228
+ d(this, l, it).call(this, s.pathname);
221
229
  });
222
230
  }
223
- navigate(M) {
224
- return H(this, arguments, function* (e, {
231
+ navigate(H) {
232
+ return x(this, arguments, function* (e, {
225
233
  historyAction: s = "push",
226
234
  centerScroll: i,
227
235
  offsetScroll: u,
228
236
  revalidate: f,
229
- keepSearchParameters: T
237
+ keepSearchParameters: M
230
238
  } = {}) {
231
- var ht;
239
+ var ct;
232
240
  if (t(this, z).length)
233
241
  return;
234
- const p = this.normalizePath(((ht = this.pathnameModifier) == null ? void 0 : ht.call(this, e)) || e);
235
- let { pathname: c, hash: _, parameters: kt, leaf: Ct } = p;
236
- if (t(this, C) === c || t(this, m) === c) {
237
- t(this, w) || d(this, h, at).call(this, _ || 0, {
242
+ const p = this.normalizePath(((ct = this.pathnameModifier) == null ? void 0 : ct.call(this, e)) || e);
243
+ let { pathname: h, hash: G, parameters: kt, leaf: Ct } = p;
244
+ if (t(this, T) === h || t(this, m) === h) {
245
+ t(this, A) || d(this, l, lt).call(this, G || 0, {
238
246
  centerScroll: i,
239
247
  offsetScroll: u,
240
248
  behavior: "smooth"
241
249
  });
242
250
  return;
243
251
  }
244
- a(this, C, c), t(this, g).forEach((F) => {
245
- F.checkCurrent(c);
252
+ a(this, T, h), t(this, g).forEach((q) => {
253
+ q.checkCurrent(h);
246
254
  });
247
255
  try {
248
- let F = !0;
256
+ let q = !0;
249
257
  if (this.preprocessor)
250
258
  try {
251
- yield new Promise((n, y) => {
252
- var P;
253
- (P = this.preprocessor) == null || P.call(this, {
254
- pathname: c,
255
- resolve: n,
256
- reject: y
259
+ yield new Promise((r, b) => {
260
+ var S;
261
+ (S = this.preprocessor) == null || S.call(this, {
262
+ pathname: h,
263
+ resolve: r,
264
+ reject: b
257
265
  });
258
266
  });
259
- } catch (n) {
260
- n ? console.error(n) : console.log("Route change canceled"), F = !1;
267
+ } catch (r) {
268
+ r ? console.error(r) : console.log("Route change canceled"), q = !1;
261
269
  }
262
- if (!F || t(this, C) !== c) {
263
- t(this, g).forEach((n) => {
264
- n.checkCurrent(t(this, m));
270
+ if (!q || t(this, T) !== h) {
271
+ t(this, g).forEach((r) => {
272
+ r.checkCurrent(t(this, m));
265
273
  });
266
274
  return;
267
275
  }
268
- const lt = yield d(this, h, et).call(this, t(this, m)), S = yield d(this, h, et).call(this, c, f);
269
- if (t(this, C) !== c) {
270
- t(this, g).forEach((n) => {
271
- n.checkCurrent(t(this, m));
276
+ const ht = yield d(this, l, st).call(this, t(this, m)), v = yield d(this, l, st).call(this, h, f);
277
+ if (t(this, T) !== h) {
278
+ t(this, g).forEach((r) => {
279
+ r.checkCurrent(t(this, m));
272
280
  });
273
281
  return;
274
282
  }
275
- lt.saveScrollState(), lt.saveDocumentState(), t(this, w) || (S.clearScrollState(), S.clearDocumentState()), S.cloneDocument(), t(this, q).textContent = S.title, document.body.appendChild(t(this, q));
276
- const ct = {
277
- pathname: c
283
+ ht.saveScrollState(), ht.saveDocumentState(), t(this, A) || (v.clearScrollState(), v.clearDocumentState()), v.cloneDocument(), t(this, I).textContent = v.title, document.body.appendChild(t(this, I));
284
+ const ut = {
285
+ pathname: h
278
286
  };
279
- U(document, "morphStart", {
280
- detail: ct
287
+ K(document, "morphStart", {
288
+ detail: ut
281
289
  });
282
- const ut = Array.from(document.head.children), dt = Array.from(S.document.head.children), mt = d(this, h, At).call(this, ut, dt), Tt = d(this, h, rt).call(this, ut, mt), G = d(this, h, rt).call(this, dt, mt);
283
- G.forEach((n, y) => {
284
- if (n.tagName === "SCRIPT" && n.getAttribute("src")) {
285
- const P = document.createElement("script");
286
- P.type = "module", P.src = n.getAttribute("src"), G[y] = P;
290
+ const dt = Array.from(document.head.children), mt = Array.from(v.document.head.children), ft = d(this, l, At).call(this, dt, mt), Tt = d(this, l, nt).call(this, dt, ft), J = d(this, l, nt).call(this, mt, ft);
291
+ J.forEach((r, b) => {
292
+ if (r.tagName === "SCRIPT" && r.getAttribute("src")) {
293
+ const S = document.createElement("script");
294
+ S.type = "module", S.src = r.getAttribute("src"), J[b] = S;
287
295
  }
288
- }), G.forEach((n) => {
289
- document.head.appendChild(n);
296
+ }), J.forEach((r) => {
297
+ document.head.appendChild(r);
290
298
  });
291
- const $ = G.filter((n) => {
292
- if (n.hasAttribute("data-no-waiting"))
299
+ const tt = J.filter((r) => {
300
+ if (r.hasAttribute("data-no-waiting"))
293
301
  return !1;
294
- if (d(this, h, nt).call(this, n))
302
+ if (d(this, l, ot).call(this, r))
295
303
  return !0;
296
304
  });
297
- t(this, k).waitForHeadToLoad && $.length && (yield new Promise((n) => H(this, null, function* () {
298
- let y = 0;
305
+ t(this, P).waitForHeadToLoad && tt.length && (yield new Promise((r) => x(this, null, function* () {
306
+ let b = 0;
299
307
  try {
300
- for (var P = Lt($), pt, W, Et; pt = !(W = yield P.next()).done; pt = !1) {
301
- const J = W.value;
302
- J.onload = () => {
303
- y++, y === $.length && n();
308
+ for (var S = vt(tt), F, j, Et; F = !(j = yield S.next()).done; F = !1) {
309
+ const Q = j.value;
310
+ Q.onload = () => {
311
+ b++, b === tt.length && r();
304
312
  };
305
313
  }
306
- } catch (W) {
307
- Et = [W];
314
+ } catch (j) {
315
+ Et = [j];
308
316
  } finally {
309
317
  try {
310
- pt && (W = P.return) && (yield W.call(P));
318
+ F && (j = S.return) && (yield j.call(S));
311
319
  } finally {
312
320
  if (Et)
313
321
  throw Et[0];
314
322
  }
315
323
  }
316
324
  }))), yield Nt(10);
317
- const ft = [];
318
- Tt.forEach((n) => {
319
- n.hasAttribute("data-permanent") || (d(this, h, nt).call(this, n) ? ft.push(n) : n.remove());
325
+ const pt = [];
326
+ Tt.forEach((r) => {
327
+ r.hasAttribute("data-permanent") || (d(this, l, ot).call(this, r) ? pt.push(r) : r.remove());
320
328
  });
321
- const Mt = d(this, h, it).call(this, S.document.body);
322
- d(this, h, ot).call(this, S.document), document.documentElement.setAttribute("data-current-pathname", c), document.documentElement.setAttribute("data-current-leaf", Ct), St({
329
+ const Mt = d(this, l, rt).call(this, v.document.body);
330
+ t(this, P).morphInsideScrollContainer || d(this, l, at).call(this, v.document), document.documentElement.setAttribute("data-current-pathname", h), document.documentElement.setAttribute("data-current-leaf", Ct), Lt({
323
331
  action: s,
324
- pathname: c,
325
- searchParameters: kt || (T ? location.search : ""),
326
- hash: _
327
- }), t(this, q).remove(), a(this, Y, t(this, m)), a(this, m, c), t(this, K).forEach((n, y) => {
328
- const P = Mt[y], pt = getComputedStyle(n).getPropertyValue("--morph-duration"), W = [...P.childNodes];
329
- if (pt) {
330
- const Et = [...n.childNodes];
331
- Et.forEach((v) => {
332
- v instanceof HTMLElement && v.classList.add("old");
333
- }), W.forEach((v) => {
334
- v instanceof HTMLElement && v.classList.add("new");
335
- }), n.prepend(...W), xt(() => {
336
- W.forEach((v) => {
337
- v instanceof HTMLElement && v.classList.add("in");
332
+ pathname: h,
333
+ searchParameters: kt || (M ? location.search : ""),
334
+ hash: G
335
+ }), t(this, I).remove(), a(this, _, t(this, m)), a(this, m, h), t(this, B).forEach((r, b) => {
336
+ const S = Mt[b], F = getComputedStyle(r).getPropertyValue("--morph-duration"), j = [...S.childNodes];
337
+ if (F) {
338
+ const Et = [...r.childNodes];
339
+ Et.forEach((L) => {
340
+ L instanceof HTMLElement && L.classList.add("old");
341
+ }), j.forEach((L) => {
342
+ L instanceof HTMLElement && L.classList.add("new");
343
+ }), r.prepend(...j), xt(() => {
344
+ j.forEach((L) => {
345
+ L instanceof HTMLElement && L.classList.add("in");
338
346
  });
339
347
  });
340
- const J = {
341
- morphElement: n,
342
- pathname: c
348
+ const Q = {
349
+ morphElement: r,
350
+ pathname: h
343
351
  };
344
- U(document, "morphNewChildrenAdded", {
345
- detail: J
352
+ K(document, "morphNewChildrenAdded", {
353
+ detail: Q
346
354
  });
347
- const Ht = new Promise((v) => {
355
+ const Ht = new Promise((L) => {
348
356
  setTimeout(() => {
349
- Et.forEach((Q) => Q.remove()), W.forEach((Q) => {
350
- Q instanceof HTMLElement && Q.classList.remove("in", "new");
351
- }), U(document, "morphOldChildrenRemoved", {
352
- detail: J
353
- }), v();
354
- }, (parseFloat(pt) || 0) * 1e3 + 10);
357
+ Et.forEach((X) => X.remove()), j.forEach((X) => {
358
+ X instanceof HTMLElement && X.classList.remove("in", "new");
359
+ }), K(document, "morphOldChildrenRemoved", {
360
+ detail: Q
361
+ }), L();
362
+ }, (parseFloat(F) || 0) * 1e3 + 10);
355
363
  });
356
364
  t(this, z).push(Ht);
357
365
  } else
358
- n.innerHTML = "", n.append(...W);
359
- }), _ ? (S.clearScrollState(), d(this, h, at).call(this, _, { centerScroll: i, offsetScroll: u })) : t(this, w) && S.restoreScrollPosition(), yield Promise.all(t(this, z)), ft.forEach((n) => n.remove()), a(this, z, []), this.findLinks(), U(document, "morphComplete", {
360
- detail: ct
366
+ r.innerHTML = "", r.append(...j);
367
+ }), G ? (v.clearScrollState(), d(this, l, lt).call(this, G, { centerScroll: i, offsetScroll: u })) : t(this, A) ? v.restoreScrollPosition() : v.renewScrollPosition(), yield Promise.all(t(this, z)), pt.forEach((r) => r.remove()), a(this, z, []), t(this, B).forEach((r) => {
368
+ r.querySelectorAll("script").forEach((S) => {
369
+ const F = document.createElement("script");
370
+ F.type = "module", F.src = S.getAttribute("src"), S.replaceWith(F);
371
+ });
372
+ }), this.findLinks(), K(document, "morphComplete", {
373
+ detail: ut
361
374
  }), window.dispatchEvent(new Event("resize"));
362
- } catch (F) {
363
- console.error(F);
375
+ } catch (q) {
376
+ console.error(q);
364
377
  }
365
- a(this, C, void 0);
378
+ a(this, T, void 0);
366
379
  });
367
380
  }
368
381
  addLink(e) {
369
- t(this, g).push(new bt(e, this));
382
+ t(this, g).push(new wt(e, this));
370
383
  }
371
384
  addLinks(e) {
372
385
  e.forEach((s) => {
@@ -385,20 +398,20 @@ class jt {
385
398
  return ((i = s.getAttribute("href")) == null ? void 0 : i.startsWith("/")) && !s.hasAttribute("download") && !s.hasAttribute("data-morph-skip") && !s.closest("[data-morph-skip]") && s.getAttribute("target") !== "_blank";
386
399
  }
387
400
  );
388
- t(this, g).forEach((s) => s.destroy()), a(this, g, e.map((s) => new bt(s, this)));
401
+ t(this, g).forEach((s) => s.destroy()), a(this, g, e.map((s) => new wt(s, this)));
389
402
  }
390
403
  }
391
- k = new WeakMap(), K = new WeakMap(), g = new WeakMap(), X = new WeakMap(), C = new WeakMap(), m = new WeakMap(), Y = new WeakMap(), z = new WeakMap(), w = new WeakMap(), L = new WeakMap(), B = new WeakMap(), q = new WeakMap(), h = new WeakSet(), et = function(e, s = !1) {
392
- return H(this, null, function* () {
393
- let i = t(this, B).get(e);
394
- return (!i || s) && (i = yield d(this, h, st).call(this, e)), i;
395
- });
396
- }, st = function(e) {
397
- return H(this, null, function* () {
398
- const i = yield (yield fetch(e)).text(), u = t(this, X).parseFromString(i, "text/html"), f = new wt(this, e, u);
399
- return t(this, B).set(e, f), f;
404
+ P = new WeakMap(), B = new WeakMap(), g = new WeakMap(), Z = new WeakMap(), T = new WeakMap(), m = new WeakMap(), _ = new WeakMap(), z = new WeakMap(), A = new WeakMap(), w = new WeakMap(), O = new WeakMap(), I = new WeakMap(), l = new WeakSet(), st = function(e, s = !1) {
405
+ return x(this, null, function* () {
406
+ let i = t(this, O).get(e);
407
+ return (!i || s) && (i = yield d(this, l, it).call(this, e)), i;
400
408
  });
401
409
  }, it = function(e) {
410
+ return x(this, null, function* () {
411
+ const i = yield (yield fetch(e)).text(), u = t(this, Z).parseFromString(i, "text/html"), f = new bt(this, e, u);
412
+ return t(this, O).set(e, f), f;
413
+ });
414
+ }, rt = function(e) {
402
415
  const s = [...e.querySelectorAll("[data-morph]")];
403
416
  return s.length ? s : [e];
404
417
  }, At = function(e, s) {
@@ -407,29 +420,29 @@ k = new WeakMap(), K = new WeakMap(), g = new WeakMap(), X = new WeakMap(), C =
407
420
  (u) => u.outerHTML === i.outerHTML
408
421
  )
409
422
  );
410
- }, rt = function(e, s) {
423
+ }, nt = function(e, s) {
411
424
  return e.filter(
412
425
  (i) => !s.find(
413
426
  (u) => u.outerHTML === i.outerHTML
414
427
  )
415
428
  );
416
- }, nt = function(e) {
417
- return e.tagName === "SCRIPT" || e.tagName === "STYLE" || e.tagName === "LINK" && e.getAttribute("rel") === "stylesheet";
418
429
  }, ot = function(e) {
430
+ return e.tagName === "SCRIPT" || e.tagName === "STYLE" || e.tagName === "LINK" && e.getAttribute("rel") === "stylesheet";
431
+ }, at = function(e) {
419
432
  var s, i;
420
- (s = t(this, L)) == null || s.removeEventListener(
433
+ (s = t(this, w)) == null || s.removeEventListener(
421
434
  "scroll",
422
- t(this, O)
423
- ), a(this, L, e.querySelector(t(this, k).scrollSelector) || e.documentElement), (i = t(this, L)) == null || i.addEventListener("scroll", t(this, O)), t(this, O).call(this);
424
- }, at = function(e, s) {
435
+ t(this, U)
436
+ ), a(this, w, e.querySelector(t(this, P).scrollSelector) || e.documentElement), (i = t(this, w)) == null || i.addEventListener("scroll", t(this, U)), t(this, U).call(this);
437
+ }, lt = function(e, s) {
425
438
  const i = typeof e == "string" ? document.getElementById(e) : e;
426
439
  (typeof i == "number" || i) && Dt(i, {
427
- scrollElement: t(this, L),
440
+ scrollElement: t(this, w),
428
441
  behavior: (s == null ? void 0 : s.behavior) || "instant",
429
442
  center: s == null ? void 0 : s.centerScroll,
430
443
  offset: s == null ? void 0 : s.offsetScroll
431
444
  });
432
- }, Z = new WeakMap(), O = new WeakMap();
445
+ }, $ = new WeakMap(), U = new WeakMap();
433
446
  export {
434
447
  jt as Morph
435
448
  };
@@ -1 +1 @@
1
- "use strict";var ts=Object.defineProperty;var Oe=Object.getOwnPropertySymbols;var es=Object.prototype.hasOwnProperty,ss=Object.prototype.propertyIsEnumerable;var _e=S=>{throw TypeError(S)};var Ve=(S,n,e)=>n in S?ts(S,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[n]=e,He=(S,n)=>{for(var e in n||(n={}))es.call(n,e)&&Ve(S,e,n[e]);if(Oe)for(var e of Oe(n))ss.call(n,e)&&Ve(S,e,n[e]);return S};var ke=(S,n,e)=>n.has(S)||_e("Cannot "+e);var t=(S,n,e)=>(ke(S,n,"read from private field"),e?e.call(S):n.get(S)),s=(S,n,e)=>n.has(S)?_e("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(S):n.set(S,e),h=(S,n,e,i)=>(ke(S,n,"write to private field"),i?i.call(S,e):n.set(S,e),e),c=(S,n,e)=>(ke(S,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const is=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),rs=require("../easings-GegIwET5.cjs"),he=require("../events-KVanG9sR.cjs"),Ae=require("../function-MthRj-GJ.cjs"),We=require("../jss-CRBgdvJ3.cjs"),Vt=require("../layout-Ctc2p3uz.cjs"),Fe=require("../math-GDWEqu7y.cjs"),Ne=require("../number-DyefJ5a1.cjs");require("../ticker/index.cjs");const xe=require("../order/index.cjs"),ns=require("../Damped-B8bmTxAr.cjs"),hs=require("../Tweened-BsL9FamJ.cjs"),Ee=require("../controls/index.cjs"),_t=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),$e=require("../css-unit-parser/index.cjs"),d=require("../css-property/index.cjs"),os=require("../device/index.cjs"),ue=require("../element-resizer/index.cjs"),ls=require("../gestures-C7gbKx11.cjs"),Ue=require("../dom-JBOkFLTh.cjs"),cs=require("../scroll-segment/index.cjs");var p,Ht,g,ae,de,Ct,V,et,vt,Pt,oe;class us{constructor(n,e,i){s(this,Pt);s(this,p);s(this,Ht);s(this,g);s(this,ae,0);s(this,de,0);s(this,Ct,0);s(this,V,0);s(this,et,null);s(this,vt,0);h(this,p,n),h(this,Ht,e),h(this,g,i),yt.scrollEntries.register(t(this,p)),this.setIndex(t(this,Ht))}get element(){return t(this,p)}get index(){return t(this,Ht)}get size(){return t(this,Ct)}get width(){return t(this,ae)}get height(){return t(this,de)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,ae,t(this,p).offsetWidth),h(this,de,t(this,p).offsetHeight),h(this,Ct,t(this,g).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,g).vertical?Vt.getCumulativeOffsetTop(t(this,p)):Vt.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,p),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,Ct)+i,y=Ne.preciseNumber(Fe.clamp(r,u,b),3);h(this,vt,y*-1),t(this,g).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,et)!==n&&(t(this,et)&&t(this,p).classList.remove(t(this,et)),n&&t(this,p).classList.add(n),h(this,et,n),he.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,et)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){c(this,Pt,oe).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,oe).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,oe).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,oe).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Ht=new WeakMap,g=new WeakMap,ae=new WeakMap,de=new WeakMap,Ct=new WeakMap,V=new WeakMap,et=new WeakMap,vt=new WeakMap,Pt=new WeakSet,oe=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const as=We.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,wt,E,st,_,H,$,M,it,rt,W,nt,Et,T,v,xt,zt,Lt,It,$t,kt,A,At,ht,R,ot,F,Rt,lt,Mt,ct,ut,at,f,Wt,l,Se,pe,C,m,k,q,dt,D,w,x,Ft,N,U,G,Z,Nt,St,j,Ut,B,P,Gt,K,Tt,Zt,o,Re,le,Ot,ze,Le,Me,Te,z,fe,Ge,jt,be,qe,De,gt,Ze,me,ce,ge;class Dt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,wt,new d.CSSProperty(this,"--controls",!0));s(this,E,new d.CSSProperty(this,"--axis","y"));s(this,st,new d.CSSProperty(this,"--reverse",!1));s(this,_,new d.CSSProperty(this,"--direction",0));s(this,H,new d.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new d.CSSProperty(this,"--split",!1));s(this,M,new d.CSSProperty(this,"--sectional",!1));s(this,it,new d.CSSProperty(this,"--tween-easing",!1));s(this,rt,new d.CSSProperty(this,"--tween-duration",!1));s(this,W,new d.CSSProperty(this,"--auto-size",!1));s(this,nt,new d.CSSProperty(this,"--wheel-max-delta",!1));s(this,Et,new d.CSSProperty(this,"--drag-inertion",1));s(this,T,new d.CSSProperty(this,"--sections-in-view",1));s(this,v,new d.CSSProperty(this,"--loop",!1));s(this,xt,new d.CSSProperty(this,"--damping",20));s(this,zt,new d.CSSProperty(this,"--mass",0));s(this,Lt,new d.CSSProperty(this,"--stiffness",0));s(this,It,new d.CSSProperty(this,"--mouse-drag",!1));s(this,$t,new d.CSSProperty(this,"--section-distance-scale",.5));s(this,kt,new d.CSSProperty(this,"--start-section",0));s(this,A,new d.CSSProperty(this,"--autoplay",0));s(this,At,new d.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ht,new d.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new d.CSSProperty(this,"--classes",!1));s(this,ot,new d.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new d.CSSProperty(this,"--current-index-end-offset",0));s(this,Rt,new d.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new d.CSSProperty(this,"--focus-delay",0));s(this,Mt,new d.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new d.CSSProperty(this,"--disabled",!1));s(this,ut,new d.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,f,null);s(this,Wt,null);s(this,l,[]);s(this,Se,0);s(this,pe,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,dt,null);s(this,D,null);s(this,w,null);s(this,x,new is.Store(0));s(this,Ft,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Nt);s(this,St);s(this,j,new hs.Tweened);s(this,Ut,!1);s(this,B,null);s(this,P,!1);s(this,Gt,null);s(this,K,[]);s(this,Tt,!1);s(this,Zt);s(this,z,e=>{if(e&&t(this,Tt)){h(this,Tt,!1);return}this.resize()});s(this,fe,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,Ft,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,ce).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Ze).call(this),yt.scrollEntries.update(this,t(this,E).current,e)});s(this,jt,(e,i)=>{t(this,wt).current&&(c(this,o,qe).call(this,Math.sign(i)||1),t(this,be).call(this,e,i))});s(this,be,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,St)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,lt).current&&(clearInterval(t(this,Nt)),h(this,Nt,setTimeout(()=>{const r=t(this,l)[c(this,o,ce).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Mt).current,easing:rs.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!os.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,it).current||t(this,rt).current?{easing:t(this,it).current||"easeInOutCubic",duration:t(this,rt).current||500}:void 0};t(this,Ut)?this.scrollToSection(c(this,o,ce).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ut,e==="drag")}});s(this,me,Ae.debounce(()=>{const e=t(this,K).reduce((i,r)=>{const u=this.vertical?r.width:r.height;return u>i?u:i},0);clearTimeout(t(this,Zt)),h(this,Tt,!0),this.style.setProperty("--max-section-size",""),h(this,Zt,setTimeout(()=>{h(this,Tt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,ge,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Te).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[as];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,at,document.createElement("div")),t(this,at).className="content-wrapper",h(this,f,document.createElement("div")),t(this,f).className="content",h(this,Wt,document.createElement("slot")),t(this,f).appendChild(t(this,Wt)),t(this,at).appendChild(t(this,f)),e.appendChild(t(this,at)),h(this,Gt,new MutationObserver(Ae.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,wt)}get axisCSSProperty(){return t(this,E)}get reverseCSSProperty(){return t(this,st)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,it)}get durationCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,nt)}get dragInertionCSSProperty(){return t(this,Et)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,zt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,$t)}get startSectionCSSProperty(){return t(this,kt)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,At)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,Rt)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Mt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return c(this,o,De).call(this,"current")}get targetScrollValue(){return c(this,o,De).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,f)}get sections(){return t(this,l)}get position(){return t(this,Se)}get contentPosition(){return t(this,pe)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Ft)}get scrollLine(){return t(this,B)}get vertical(){return t(this,E).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,E).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,E).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,le).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,Ge).call(this,e),b=t(this,l)[r],y=t(this,l)[u];if(b&&y){let I=0;const Ie=c(this,o,ce).call(this),Bt=t(this,l)[Ie];let ne=Bt?this.targetScrollValue-Bt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?(I=t(this,m)+t(this,C)-b.position+t(this,k),ne=0):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-b.position:I=y.position-b.position,this.shiftPosition(I-ne,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,qe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,He({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ut).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,Se,this.vertical?Vt.getCumulativeOffsetTop(this):Vt.getCumulativeOffsetLeft(this)),h(this,pe,this.vertical?Vt.getCumulativeOffsetTop(t(this,f)):Vt.getCumulativeOffsetLeft(t(this,f))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,f).style.width=r+"px",t(this,f).style.height="100%"):(t(this,f).style.height=r+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",h(this,m,t(this,f).offsetHeight-t(this,C))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",h(this,m,t(this,f).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),b=t(this,m)-u;h(this,N,r.position+r.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||c(this,o,Le).call(this):c(this,o,ze).call(this),t(this,me).call(this),he.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new ns.Damped(0,{damping:.01,min:0,order:xe.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new Ee.WheelControls({element:t(this,f)})),t(this,q).changeEvent.subscribe(t(this,jt)),h(this,dt,new Ee.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,jt)),h(this,D,new Ee.DragControls({element:t(this,f),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,jt)),h(this,w,new Ee.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,be)),t(this,E).subscribe(()=>{c(this,o,Re).call(this)}),t(this,st).subscribe(()=>{c(this,o,Re).call(this)}),t(this,nt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,E).current}),t(this,Et).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,z).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,le).call(this):c(this,o,Ot).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,w).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,le).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,z).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,le).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,z).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,Ft,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,zt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,w).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,ht).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ot).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,Rt).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ze).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Le).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Te).call(this))}),t(this,wt).observe(),t(this,E).observe(),t(this,st).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,Et).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,$t).observe(),t(this,kt).observe(),t(this,A).observe(),t(this,A).observe(),t(this,At).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,Mt).observe(),t(this,ct).observe(),t(this,ut).observe(),_t.windowResizer.subscribe(t(this,ge),xe.RESIZE_ORDER.LAST),ue.elementResizer.subscribe(this,t(this,z)),t(this,Gt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,wt).unobserve(),t(this,E).unobserve(),t(this,st).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,Et).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,$t).unobserve(),t(this,kt).unobserve(),t(this,A).unobserve(),t(this,At).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,Mt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),_t.windowResizer.unsubscribe(t(this,ge)),ue.elementResizer.unsubscribe(t(this,z)),c(this,o,Me).call(this),t(this,Gt).disconnect()}}a=new WeakMap,wt=new WeakMap,E=new WeakMap,st=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,Et=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,$t=new WeakMap,kt=new WeakMap,A=new WeakMap,At=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,F=new WeakMap,Rt=new WeakMap,lt=new WeakMap,Mt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,f=new WeakMap,Wt=new WeakMap,l=new WeakMap,Se=new WeakMap,pe=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,dt=new WeakMap,D=new WeakMap,w=new WeakMap,x=new WeakMap,Ft=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Nt=new WeakMap,St=new WeakMap,j=new WeakMap,Ut=new WeakMap,B=new WeakMap,P=new WeakMap,Gt=new WeakMap,K=new WeakMap,Tt=new WeakMap,Zt=new WeakMap,o=new WeakSet,Re=function(){const e=t(this,E).current,i=t(this,st).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,z).call(this)},le=function(){c(this,o,Ot).call(this),t(this,Wt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new us(e,i,this))}),t(this,f).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),he.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,z).call(this),c(this,o,gt).call(this)},Ot=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),this.style.removeProperty("--max-section-size"),he.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ze=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,fe)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Nt)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,dt).disconnect(),t(this,D).disconnect(),t(this,w).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,z).call(this)))},Le=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,fe),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,dt).connect(),t(this,D).connect(),t(this,A).current&&t(this,w).connect())},Me=function(){t(this,Z)||(h(this,Z,!0),clearTimeout(t(this,Zt)),_t.windowResizer.unsubscribe(t(this,z)),c(this,o,ze).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Ot).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Te=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,Le).call(this),this.scrollToSection(t(this,kt).current,{behaviour:"instant"}),_t.windowResizer.subscribe(t(this,z),xe.RESIZE_ORDER.SCROLL))},z=new WeakMap,fe=new WeakMap,Ge=function(e){let i=t(this,x).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Fe.clamp(e,0,this.limit),i},jt=new WeakMap,be=new WeakMap,qe=function(e=1){t(this,ht).current&&(t(this,w).direction=e),t(this,A).current&&t(this,w).pauseAndContinue(t(this,At).current,this.sectionalCSSProperty.current)},De=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ot).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),he.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,K,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const b=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=b?(r.setMark("current"),t(this,K).push(r)):u>=y&&u<y+I/2||u<=b+i?r.setMark("next"):r.setMark("previous")}),t(this,me).call(this)}}},Ze=function(){if(t(this,R).current){const e=Math.floor(t(this,K).length/2);t(this,K).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,K).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},me=new WeakMap,ce=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const b=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Ie=t(this,Ut)?I.size*b*-1*.4:0,Bt=I.position;this.overscroll&&Bt===0&&e&&(Bt=t(this,N));let ne=Math.abs(Bt+Ie-i);ne<=r&&(r=ne,u=y)}return u},ge=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Dt);var ye;class Be extends HTMLElement{constructor(){super(...arguments);s(this,ye,null)}get scrollElement(){return t(this,ye)}connectedCallback(){const e=Ue.findParentElement(this,Dt);e instanceof Dt?h(this,ye,e):console.error(this,"e-scroll not found")}}ye=new WeakMap;var pt,L,J,Q,Kt,Jt,ft,Qt,Ce,ve;class je extends Be{constructor(){super();s(this,pt,null);s(this,L,null);s(this,J,!1);s(this,Q,0);s(this,Kt,0);s(this,Jt,0);s(this,ft,()=>{h(this,J,this.offsetWidth>this.offsetHeight);const e=t(this,J)?this.offsetWidth:this.offsetHeight;h(this,Q,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,Q,Math.max(t(this,Q),30)),t(this,J)?(t(this,L).style.width=t(this,Q)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,Q)+"px"),h(this,Kt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Qt).call(this)});s(this,Qt,()=>{h(this,Jt,this.scrollElement.currentProgress*t(this,Kt)),t(this,J)?t(this,L).style.transform=`translate3d(${t(this,Jt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,Jt)}px, 0px)`});s(this,Ce,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ve,e=>{document.documentElement.classList.add("grabbing"),ls.setupDrag(u=>{const b=t(this,J)?u.x:u.y,y=this.scrollElement.distance/t(this,Kt),I=(b-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[We.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,L,e),t(this,L).addEventListener("pointerdown",t(this,ve)),_t.windowResizer.subscribe(t(this,ft),xe.RESIZE_ORDER.SCROLL),ue.elementResizer.subscribe(this,t(this,ft)),ue.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Ce))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,ve)),_t.windowResizer.unsubscribe(t(this,ft)),ue.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Ce))}}pt=new WeakMap,L=new WeakMap,J=new WeakMap,Q=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,ft=new WeakMap,Qt=new WeakMap,Ce=new WeakMap,ve=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",je);var Xt,Yt,te;class Ke extends Be{constructor(){super();s(this,Xt,new d.CSSProperty(this,"--behaviour","smooth"));s(this,Yt,new d.CSSProperty(this,"--tween-easing",!1));s(this,te,new d.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Xt).current,i=t(this,Yt).current,r=t(this,te).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Xt).observe(),t(this,Yt).observe(),t(this,te).observe()}disconnectedCallback(){t(this,Xt).close(),t(this,Yt).close(),t(this,te).close()}}Xt=new WeakMap,Yt=new WeakMap,te=new WeakMap;var ee;class Je extends Ke{constructor(){super(...arguments);s(this,ee,new d.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,ee).current,e)}connectedCallback(){super.connectedCallback(),t(this,ee).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,ee).close()}}ee=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Je);var X,se;class Qe extends Ke{constructor(){super(...arguments);s(this,X,new d.CSSProperty(this,"--step",1));s(this,se,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,X).current>0&&this.scrollElement.scrollLine==="end"||t(this,X).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,X).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,X).subscribe(()=>{t(this,se).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,se)),t(this,se).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Qe);var Y,bt,ie,Pe,we,re;class ds{constructor(n,e,i){s(this,Y,null);s(this,bt,null);s(this,ie,null);s(this,Pe,null);s(this,we,()=>{t(this,bt).scrollToSection(t(this,ie),{behaviour:t(this,Pe)})});s(this,re,()=>{t(this,Y).classList.toggle("current",t(this,bt).counter.current===t(this,ie))});O.isBrowser&&(h(this,Y,document.createElement("button")),h(this,bt,n),h(this,Pe,i),h(this,ie,e),t(this,Y).addEventListener("click",t(this,we)),t(this,bt).counter.subscribe(t(this,re)),t(this,re).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,we)),t(this,bt).counter.unsubscribe(t(this,re)),t(this,Y).remove()}}Y=new WeakMap,bt=new WeakMap,ie=new WeakMap,Pe=new WeakMap,we=new WeakMap,re=new WeakMap;var qt,mt,tt;class Xe extends Be{constructor(){super(...arguments);s(this,qt,null);s(this,mt,[]);s(this,tt,Ae.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new ds(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,qt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,qt,document.createElement("div")),this.appendChild(t(this,qt))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,tt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,tt)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,qt).remove()}}qt=new WeakMap,mt=new WeakMap,tt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Xe);class Ye extends cs.ScrollSegmentElement{connectedCallback(){const n=Ue.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Dt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ye);exports.ScrollBulletButtonsElement=Xe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=Ye;exports.ScrollSetButtonElement=Je;exports.ScrollStepButtonElement=Qe;exports.ScrollbarElement=je;
1
+ "use strict";var ts=Object.defineProperty;var Oe=Object.getOwnPropertySymbols;var es=Object.prototype.hasOwnProperty,ss=Object.prototype.propertyIsEnumerable;var He=S=>{throw TypeError(S)};var Ve=(S,n,e)=>n in S?ts(S,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[n]=e,_e=(S,n)=>{for(var e in n||(n={}))es.call(n,e)&&Ve(S,e,n[e]);if(Oe)for(var e of Oe(n))ss.call(n,e)&&Ve(S,e,n[e]);return S};var ke=(S,n,e)=>n.has(S)||He("Cannot "+e);var t=(S,n,e)=>(ke(S,n,"read from private field"),e?e.call(S):n.get(S)),s=(S,n,e)=>n.has(S)?He("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(S):n.set(S,e),h=(S,n,e,i)=>(ke(S,n,"write to private field"),i?i.call(S,e):n.set(S,e),e),c=(S,n,e)=>(ke(S,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const is=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),rs=require("../easings-GegIwET5.cjs"),he=require("../events-KVanG9sR.cjs"),Ae=require("../function-MthRj-GJ.cjs"),We=require("../jss-CRBgdvJ3.cjs"),Vt=require("../layout-Ctc2p3uz.cjs"),Fe=require("../math-GDWEqu7y.cjs"),Ne=require("../number-DyefJ5a1.cjs");require("../ticker/index.cjs");const xe=require("../order/index.cjs"),ns=require("../Damped-B8bmTxAr.cjs"),hs=require("../Tweened-BsL9FamJ.cjs"),Ee=require("../controls/index.cjs"),Ht=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),$e=require("../css-unit-parser/index.cjs"),d=require("../css-property/index.cjs"),os=require("../device/index.cjs"),ue=require("../element-resizer/index.cjs"),ls=require("../gestures-C7gbKx11.cjs"),Ue=require("../dom-JBOkFLTh.cjs"),cs=require("../scroll-segment/index.cjs");var p,_t,g,ae,de,Ct,V,et,vt,Pt,oe;class us{constructor(n,e,i){s(this,Pt);s(this,p);s(this,_t);s(this,g);s(this,ae,0);s(this,de,0);s(this,Ct,0);s(this,V,0);s(this,et,null);s(this,vt,0);h(this,p,n),h(this,_t,e),h(this,g,i),yt.scrollEntries.register(t(this,p)),this.setIndex(t(this,_t))}get element(){return t(this,p)}get index(){return t(this,_t)}get size(){return t(this,Ct)}get width(){return t(this,ae)}get height(){return t(this,de)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,ae,t(this,p).offsetWidth),h(this,de,t(this,p).offsetHeight),h(this,Ct,t(this,g).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,g).vertical?Vt.getCumulativeOffsetTop(t(this,p)):Vt.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,p),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,Ct)+i,y=Ne.preciseNumber(Fe.clamp(r,u,b),3);h(this,vt,y*-1),t(this,g).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,et)!==n&&(t(this,et)&&t(this,p).classList.remove(t(this,et)),n&&t(this,p).classList.add(n),h(this,et,n),he.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,et)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){c(this,Pt,oe).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,oe).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,oe).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,oe).call(this,"current-index-arc-abs",n)}}p=new WeakMap,_t=new WeakMap,g=new WeakMap,ae=new WeakMap,de=new WeakMap,Ct=new WeakMap,V=new WeakMap,et=new WeakMap,vt=new WeakMap,Pt=new WeakSet,oe=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const as=We.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,wt,E,st,H,_,$,M,it,rt,W,nt,Et,T,v,xt,zt,Lt,It,$t,kt,A,At,ht,R,ot,F,Rt,lt,Mt,ct,ut,at,f,Wt,l,Se,pe,C,m,k,q,dt,D,w,x,Ft,N,U,G,Z,Nt,St,j,Ut,B,P,Gt,K,Tt,Zt,o,Re,le,Ot,ze,Le,Me,Te,z,fe,Ge,jt,be,qe,De,gt,Ze,me,ce,ge;class Dt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,wt,new d.CSSProperty(this,"--controls",!0));s(this,E,new d.CSSProperty(this,"--axis","y"));s(this,st,new d.CSSProperty(this,"--reverse",!1));s(this,H,new d.CSSProperty(this,"--direction",0));s(this,_,new d.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new d.CSSProperty(this,"--split",!1));s(this,M,new d.CSSProperty(this,"--sectional",!1));s(this,it,new d.CSSProperty(this,"--tween-easing",!1));s(this,rt,new d.CSSProperty(this,"--tween-duration",!1));s(this,W,new d.CSSProperty(this,"--auto-size",!1));s(this,nt,new d.CSSProperty(this,"--wheel-max-delta",!1));s(this,Et,new d.CSSProperty(this,"--drag-inertion",1));s(this,T,new d.CSSProperty(this,"--sections-in-view",1));s(this,v,new d.CSSProperty(this,"--loop",!1));s(this,xt,new d.CSSProperty(this,"--damping",20));s(this,zt,new d.CSSProperty(this,"--mass",0));s(this,Lt,new d.CSSProperty(this,"--stiffness",0));s(this,It,new d.CSSProperty(this,"--mouse-drag",!1));s(this,$t,new d.CSSProperty(this,"--section-distance-scale",.5));s(this,kt,new d.CSSProperty(this,"--start-section",0));s(this,A,new d.CSSProperty(this,"--autoplay",0));s(this,At,new d.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ht,new d.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new d.CSSProperty(this,"--classes",!1));s(this,ot,new d.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new d.CSSProperty(this,"--current-index-end-offset",0));s(this,Rt,new d.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new d.CSSProperty(this,"--focus-delay",0));s(this,Mt,new d.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new d.CSSProperty(this,"--disabled",!1));s(this,ut,new d.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,f,null);s(this,Wt,null);s(this,l,[]);s(this,Se,0);s(this,pe,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,dt,null);s(this,D,null);s(this,w,null);s(this,x,new is.Store(0));s(this,Ft,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Nt);s(this,St);s(this,j,new hs.Tweened);s(this,Ut,!1);s(this,B,null);s(this,P,!1);s(this,Gt,null);s(this,K,[]);s(this,Tt,!1);s(this,Zt);s(this,z,e=>{if(e&&t(this,Tt)){h(this,Tt,!1);return}this.resize()});s(this,fe,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,Ft,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,ce).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Ze).call(this),yt.scrollEntries.update(this,t(this,E).current,e)});s(this,jt,(e,i)=>{t(this,wt).current&&(c(this,o,qe).call(this,Math.sign(i)||1),t(this,be).call(this,e,i))});s(this,be,(e,i)=>{if(t(this,H).current){if(t(this,H).current<0&&i>0)return;if(t(this,H).current>0&&i<0)return}if(t(this,St)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,lt).current&&(clearInterval(t(this,Nt)),h(this,Nt,setTimeout(()=>{const r=t(this,l)[c(this,o,ce).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Mt).current,easing:rs.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!os.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,it).current||t(this,rt).current?{easing:t(this,it).current||"easeInOutCubic",duration:t(this,rt).current||500}:void 0};t(this,Ut)?this.scrollToSection(c(this,o,ce).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ut,e==="drag")}});s(this,me,Ae.debounce(()=>{const e=t(this,K).reduce((i,r)=>{const u=this.vertical?r.width:r.height;return u>i?u:i},0);clearTimeout(t(this,Zt)),h(this,Tt,!0),this.style.setProperty("--max-section-size",""),h(this,Zt,setTimeout(()=>{h(this,Tt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,ge,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Te).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[as];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,at,document.createElement("div")),t(this,at).className="content-wrapper",h(this,f,document.createElement("div")),t(this,f).className="content",h(this,Wt,document.createElement("slot")),t(this,f).appendChild(t(this,Wt)),t(this,at).appendChild(t(this,f)),e.appendChild(t(this,at)),h(this,Gt,new MutationObserver(Ae.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,wt)}get axisCSSProperty(){return t(this,E)}get reverseCSSProperty(){return t(this,st)}get directionCSSProperty(){return t(this,H)}get pagesCSSProperty(){return t(this,_)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,it)}get durationCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,nt)}get dragInertionCSSProperty(){return t(this,Et)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,zt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,$t)}get startSectionCSSProperty(){return t(this,kt)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,At)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,Rt)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Mt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return c(this,o,De).call(this,"current")}get targetScrollValue(){return c(this,o,De).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,f)}get sections(){return t(this,l)}get position(){return t(this,Se)}get contentPosition(){return t(this,pe)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Ft)}get scrollLine(){return t(this,B)}get vertical(){return t(this,E).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,E).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,E).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,le).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,Ge).call(this,e),b=t(this,l)[r],y=t(this,l)[u];if(b&&y){let I=0;const Ie=c(this,o,ce).call(this),Bt=t(this,l)[Ie];let ne=Bt?this.targetScrollValue-Bt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?(I=t(this,m)+t(this,C)-b.position+t(this,k),ne=0):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-b.position:I=y.position-b.position,this.shiftPosition(I-ne,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,qe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,_e({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ut).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,Se,this.vertical?Vt.getCumulativeOffsetTop(this):Vt.getCumulativeOffsetLeft(this)),h(this,pe,this.vertical?Vt.getCumulativeOffsetTop(t(this,f)):Vt.getCumulativeOffsetLeft(t(this,f))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,_).current){h(this,m,t(this,C)*t(this,_).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,f).style.width=r+"px",t(this,f).style.height="100%"):(t(this,f).style.height=r+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",h(this,m,t(this,f).offsetHeight-t(this,C))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",h(this,m,t(this,f).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),b=t(this,m)-u;h(this,N,r.position+r.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||c(this,o,Le).call(this):c(this,o,ze).call(this),t(this,me).call(this),he.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new ns.Damped(0,{damping:.01,min:0,order:xe.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new Ee.WheelControls({element:t(this,f)})),t(this,q).changeEvent.subscribe(t(this,jt)),h(this,dt,new Ee.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,jt)),h(this,D,new Ee.DragControls({element:t(this,f),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,jt)),h(this,w,new Ee.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,be)),t(this,E).subscribe(()=>{c(this,o,Re).call(this)}),t(this,st).subscribe(()=>{c(this,o,Re).call(this)}),t(this,nt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,E).current}),t(this,Et).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,_).subscribe(()=>{t(this,P)&&t(this,z).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,le).call(this):c(this,o,Ot).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,w).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,le).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,z).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,le).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,z).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,Ft,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,zt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,w).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,ht).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ot).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,Rt).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ze).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Le).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Te).call(this))}),t(this,wt).observe(),t(this,E).observe(),t(this,st).observe(),t(this,H).observe(),t(this,_).observe(),t(this,$).observe(),t(this,M).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,Et).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,$t).observe(),t(this,kt).observe(),t(this,A).observe(),t(this,A).observe(),t(this,At).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,Mt).observe(),t(this,ct).observe(),t(this,ut).observe(),Ht.windowResizer.subscribe(t(this,ge),xe.RESIZE_ORDER.LAST),ue.elementResizer.subscribe(this,t(this,z)),t(this,Gt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,wt).unobserve(),t(this,E).unobserve(),t(this,st).unobserve(),t(this,H).unobserve(),t(this,_).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,Et).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,$t).unobserve(),t(this,kt).unobserve(),t(this,A).unobserve(),t(this,At).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,Mt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),Ht.windowResizer.unsubscribe(t(this,ge)),ue.elementResizer.unsubscribe(t(this,z)),c(this,o,Me).call(this),t(this,Gt).disconnect()}}a=new WeakMap,wt=new WeakMap,E=new WeakMap,st=new WeakMap,H=new WeakMap,_=new WeakMap,$=new WeakMap,M=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,Et=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,$t=new WeakMap,kt=new WeakMap,A=new WeakMap,At=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,F=new WeakMap,Rt=new WeakMap,lt=new WeakMap,Mt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,f=new WeakMap,Wt=new WeakMap,l=new WeakMap,Se=new WeakMap,pe=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,dt=new WeakMap,D=new WeakMap,w=new WeakMap,x=new WeakMap,Ft=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Nt=new WeakMap,St=new WeakMap,j=new WeakMap,Ut=new WeakMap,B=new WeakMap,P=new WeakMap,Gt=new WeakMap,K=new WeakMap,Tt=new WeakMap,Zt=new WeakMap,o=new WeakSet,Re=function(){const e=t(this,E).current,i=t(this,st).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,z).call(this)},le=function(){c(this,o,Ot).call(this),t(this,Wt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new us(e,i,this))}),t(this,f).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),he.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,z).call(this),c(this,o,gt).call(this)},Ot=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),this.style.removeProperty("--max-section-size"),he.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ze=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,fe)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Nt)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,dt).disconnect(),t(this,D).disconnect(),t(this,w).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,z).call(this)))},Le=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,fe),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,dt).connect(),t(this,D).connect(),t(this,A).current&&t(this,w).connect())},Me=function(){t(this,Z)||(h(this,Z,!0),clearTimeout(t(this,Zt)),Ht.windowResizer.unsubscribe(t(this,z)),c(this,o,ze).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Ot).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Te=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,Le).call(this),this.scrollToSection(t(this,kt).current,{behaviour:"instant"}),Ht.windowResizer.subscribe(t(this,z),xe.RESIZE_ORDER.SCROLL))},z=new WeakMap,fe=new WeakMap,Ge=function(e){let i=t(this,x).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Fe.clamp(e,0,this.limit),i},jt=new WeakMap,be=new WeakMap,qe=function(e=1){t(this,ht).current&&(t(this,w).direction=e),t(this,A).current&&t(this,w).pauseAndContinue(t(this,At).current,this.sectionalCSSProperty.current)},De=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ot).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),he.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,K,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const b=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=b?(r.setMark("current"),t(this,K).push(r)):u>=y&&u<y+I/2||u<=b+i?r.setMark("next"):r.setMark("previous")}),t(this,me).call(this)}}},Ze=function(){if(t(this,R).current){const e=Math.floor(t(this,K).length/2);t(this,K).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,K).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},me=new WeakMap,ce=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const b=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Ie=t(this,Ut)?I.size*b*-1*.4:0,Bt=I.position;this.overscroll&&Bt===0&&e&&(Bt=t(this,N));let ne=Math.abs(Bt+Ie-i);ne<=r&&(r=ne,u=y)}return u},ge=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Dt);var ye;class Be extends HTMLElement{constructor(){super(...arguments);s(this,ye,null)}get scrollElement(){return t(this,ye)}connectedCallback(){const e=Ue.findParentElement(this,Dt);e instanceof Dt?h(this,ye,e):console.error(this,"e-scroll not found")}}ye=new WeakMap;var pt,L,J,Q,Kt,Jt,ft,Qt,Ce,ve;class je extends Be{constructor(){super();s(this,pt,null);s(this,L,null);s(this,J,!1);s(this,Q,0);s(this,Kt,0);s(this,Jt,0);s(this,ft,()=>{h(this,J,this.offsetWidth>this.offsetHeight);const e=t(this,J)?this.offsetWidth:this.offsetHeight;h(this,Q,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,Q,Math.max(t(this,Q),30)),t(this,J)?(t(this,L).style.width=t(this,Q)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,Q)+"px"),h(this,Kt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Qt).call(this)});s(this,Qt,()=>{h(this,Jt,this.scrollElement.currentProgress*t(this,Kt)),t(this,J)?t(this,L).style.transform=`translate3d(${t(this,Jt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,Jt)}px, 0px)`});s(this,Ce,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ve,e=>{document.documentElement.classList.add("grabbing"),ls.setupDrag(u=>{const b=t(this,J)?u.x:u.y,y=this.scrollElement.distance/t(this,Kt),I=(b-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[We.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,L,e),t(this,L).addEventListener("pointerdown",t(this,ve)),Ht.windowResizer.subscribe(t(this,ft),xe.RESIZE_ORDER.SCROLL),ue.elementResizer.subscribe(this,t(this,ft)),ue.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Ce))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,ve)),Ht.windowResizer.unsubscribe(t(this,ft)),ue.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Ce))}}pt=new WeakMap,L=new WeakMap,J=new WeakMap,Q=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,ft=new WeakMap,Qt=new WeakMap,Ce=new WeakMap,ve=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",je);var Xt,Yt,te;class Ke extends Be{constructor(){super();s(this,Xt,new d.CSSProperty(this,"--behaviour","smooth"));s(this,Yt,new d.CSSProperty(this,"--tween-easing",!1));s(this,te,new d.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Xt).current,i=t(this,Yt).current,r=t(this,te).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Xt).observe(),t(this,Yt).observe(),t(this,te).observe()}disconnectedCallback(){t(this,Xt).close(),t(this,Yt).close(),t(this,te).close()}}Xt=new WeakMap,Yt=new WeakMap,te=new WeakMap;var ee;class Je extends Ke{constructor(){super(...arguments);s(this,ee,new d.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,ee).current,e)}connectedCallback(){super.connectedCallback(),t(this,ee).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,ee).close()}}ee=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Je);var X,se;class Qe extends Ke{constructor(){super(...arguments);s(this,X,new d.CSSProperty(this,"--step",1));s(this,se,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,X).current>0&&this.scrollElement.scrollLine==="end"||t(this,X).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,X).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,X).subscribe(()=>{t(this,se).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,se)),t(this,se).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Qe);var Y,bt,ie,Pe,we,re;class ds{constructor(n,e,i){s(this,Y,null);s(this,bt,null);s(this,ie,null);s(this,Pe,null);s(this,we,()=>{t(this,bt).scrollToSection(t(this,ie),{behaviour:t(this,Pe)})});s(this,re,()=>{t(this,Y).classList.toggle("current",t(this,bt).counter.current===t(this,ie))});O.isBrowser&&(h(this,Y,document.createElement("button")),h(this,bt,n),h(this,Pe,i),h(this,ie,e),t(this,Y).addEventListener("click",t(this,we)),t(this,bt).counter.subscribe(t(this,re)),t(this,re).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,we)),t(this,bt).counter.unsubscribe(t(this,re)),t(this,Y).remove()}}Y=new WeakMap,bt=new WeakMap,ie=new WeakMap,Pe=new WeakMap,we=new WeakMap,re=new WeakMap;var qt,mt,tt;class Xe extends Be{constructor(){super(...arguments);s(this,qt,null);s(this,mt,[]);s(this,tt,Ae.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new ds(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,qt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,qt,document.createElement("div")),this.appendChild(t(this,qt))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,tt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,tt)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,qt).remove()}}qt=new WeakMap,mt=new WeakMap,tt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Xe);class Ye extends cs.ScrollSegmentElement{connectedCallback(){const n=Ue.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Dt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ye);exports.ScrollBulletButtonsElement=Xe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=Ye;exports.ScrollSetButtonElement=Je;exports.ScrollStepButtonElement=Qe;exports.ScrollbarElement=je;
@@ -978,7 +978,7 @@ class Ss extends Oe {
978
978
  }, 0));
979
979
  }
980
980
  connectedCallback() {
981
- super.connectedCallback(), this.scrollElement.addEventListener(
981
+ super.connectedCallback(), this.innerHTML = "", this.scrollElement.addEventListener(
982
982
  "scrollSectionsChange",
983
983
  t(this, tt)
984
984
  ), this.scrollElement.sectionsInViewCSSProperty.subscribe(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.57.6",
3
+ "version": "0.58.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"