aptechka 0.61.9 → 0.61.11

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 te=c=>{throw TypeError(c)};var Q=(c,o,t)=>o.has(c)||te("Cannot "+t);var e=(c,o,t)=>(Q(c,o,"read from private field"),t?t.call(c):o.get(c)),r=(c,o,t)=>o.has(c)?te("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(c):o.set(c,t),n=(c,o,t,s)=>(Q(c,o,"write to private field"),s?s.call(c,t):o.set(c,t),t),b=(c,o,t)=>(Q(c,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../element-linked-store/index.cjs"),y=require("../css-property/index.cjs"),N=require("../index-Cqw2NKev.cjs"),Y=require("../events-KVanG9sR.cjs"),ce=require("../function-MthRj-GJ.cjs"),se=require("../style-At6aDoqG.cjs"),ie=require("../url-D1CgmwZ_.cjs"),re=require("../window-resizer/index.cjs"),F=require("../device/index.cjs");var u,m,J,K;class le{constructor(){r(this,u,new Map);r(this,m,[]);r(this,J,o=>{var s;const t=[...e(this,m)].reverse().find(i=>i.clickOutside.current);if(t){const i=o.composedPath();if(i.find(ee=>ee instanceof HTMLElement&&ee.hasAttribute("data-popover-content")))return;const l=i[0],p=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),H=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!p||H)&&t.close()}});r(this,K,o=>{if(o.code==="Escape"){const t=[...e(this,m)].reverse().find(s=>s.escape.current);console.log(e(this,m)),t&&t.close()}});addEventListener("click",e(this,J)),addEventListener("keydown",e(this,K))}get groups(){return e(this,u)}get stack(){return e(this,m)}add(o,t){if(t.closeRest.current)e(this,u).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,u).get(o);i==null||i.forEach(l=>{l.close()})}let s=e(this,u).get(o);s!=null&&s.length||(s=[],e(this,u).set(o,s)),e(this,m).push(t),s.push(t)}remove(o,t){if(n(this,m,e(this,m).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(o);e(this,u).delete(o),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,u).get(o);s&&(s=s.filter(i=>i!==t),e(this,u).set(o,s))}}}u=new WeakMap,m=new WeakMap,J=new WeakMap,K=new WeakMap;var f,M,V,C,B,v,w,x,A,g,R,q,L,T,O,a,P,oe,I,$,S,W,G;const E=class E extends HTMLElement{constructor(){super();r(this,P);r(this,f);r(this,M);r(this,V);r(this,C);r(this,B);r(this,v);r(this,w);r(this,x);r(this,A);r(this,g);r(this,R);r(this,q);r(this,L);r(this,T);r(this,O);r(this,a);r(this,$);r(this,S);r(this,W);r(this,G);this.urlValue="",n(this,f,!1),n(this,v,new y.CSSProperty(this,"--history",!1)),n(this,w,new y.CSSProperty(this,"--restore",!1)),n(this,x,new y.CSSProperty(this,"--close-rest",!1)),n(this,A,new y.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new y.CSSProperty(this,"--group","")),n(this,R,new y.CSSProperty(this,"--click-outside",!1)),n(this,q,new y.CSSProperty(this,"--escape",!1)),n(this,L,new y.CSSProperty(this,"--check-viewport-bounds",!1)),n(this,T,!1),n(this,a,new he.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),n(this,$,()=>{n(this,T,!1),e(this,f)&&e(this,v).current&&!location.search.includes(this.id)?this.close():!e(this,f)&&e(this,v).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,T,!0)}),n(this,S,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,W).call(this)}),n(this,W,ce.debounce(()=>{e(this,G).call(this)},10)),n(this,G,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,L).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>F.viewport.width?s=F.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>F.viewport.height?i=F.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),e(this,g).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get history(){return e(this,v)}get restore(){return e(this,w)}get closeRest(){return e(this,x)}get closeRestInGroup(){return e(this,A)}get group(){return e(this,g)}get clickOutside(){return e(this,R)}get escape(){return e(this,q)}get opened(){return e(this,f)}get lastTrigger(){return e(this,O)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,f)&&ie.updateSearchParameter(this.id,t)}open(t){if(e(this,f))return;n(this,O,t==null?void 0:t.trigger),clearTimeout(e(this,M)),clearTimeout(e(this,V)),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),Y.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,O)}}),e(this,v).current&&e(this,T)&&history.pushState(history.state,"",e(this,P,oe)),n(this,f,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,S).call(this),e(this,a).set("opened",!0),Y.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,O)}}),n(this,C,void 0),n(this,B,setTimeout(()=>{e(this,a).set("transitionend",!0)},se.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():n(this,C,setTimeout(s,10))}close(){e(this,f)&&(clearTimeout(e(this,C)),clearTimeout(e(this,B)),E.stack.remove(e(this,g).current,this),n(this,f,!1),b(this,P,I).call(this),e(this,a).set("transitionend",!1),n(this,M,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),Y.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,V,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),Y.dispatchEvent(this,"popoverClosed",{custom:!0})},se.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){e(this,v).observe(),e(this,w).observe(),e(this,x).observe(),e(this,A).observe(),e(this,g).observe(),e(this,R).observe(),e(this,q).observe(),e(this,L).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,$)),setTimeout(()=>{e(this,w).current?(this.urlValue=ie.parseSearchParameters(location.search)[this.id],e(this,$).call(this)):(b(this,P,I).call(this),n(this,T,!0))},0),e(this,L).subscribe(()=>{e(this,S).call(this)}),re.windowResizer.subscribe(e(this,S))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),re.windowResizer.unsubscribe(e(this,S)),e(this,a).close(),e(this,v).close(),e(this,w).close(),e(this,x).close(),e(this,A).close(),e(this,g).close(),e(this,R).close(),e(this,q).close(),e(this,L).close(),this.removeAttribute("role"),clearTimeout(e(this,M)),clearTimeout(e(this,V)),clearTimeout(e(this,C)),clearTimeout(e(this,B)),removeEventListener("popstate",e(this,$)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),b(this,P,I).call(this)}};f=new WeakMap,M=new WeakMap,V=new WeakMap,C=new WeakMap,B=new WeakMap,v=new WeakMap,w=new WeakMap,x=new WeakMap,A=new WeakMap,g=new WeakMap,R=new WeakMap,q=new WeakMap,L=new WeakMap,T=new WeakMap,O=new WeakMap,a=new WeakMap,P=new WeakSet,oe=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},I=function(){if(e(this,v).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},$=new WeakMap,S=new WeakMap,W=new WeakMap,G=new WeakMap,E.stack=new le;let z=E;N.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",z);var h,d,k,Z,D,U,j,X,_;class ne extends HTMLElement{constructor(){super();r(this,k);r(this,h);r(this,d,new y.CSSProperty(this,"--type","open"));r(this,D,()=>{e(this,d).current!=="close"&&this.classList.add("triggered")});r(this,U,()=>{e(this,d).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,j,()=>{e(this,d).current!=="close"&&this.classList.remove("opened")});r(this,X,()=>{e(this,d).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});N.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,d).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,d)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(b(this,k,Z).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const p=this.getRootNode();p instanceof ShadowRoot?i=p.host.closest("[data-popover]"):p instanceof HTMLElement&&(i=p.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=p=>{if(!p)return null;let H=p.querySelector("[data-popover]");return!H&&(p!=null&&p.parentElement)&&(H=l(p.parentElement)),H};i=l(this.parentElement)||null}else!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),i=document.querySelector(t)||this.getRootNode().querySelector(t);i instanceof HTMLElement?(n(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,D)),e(this,h).addEventListener("popoverOpened",e(this,U)),e(this,h).addEventListener("popoverClosing",e(this,j)),e(this,h).addEventListener("popoverClosed",e(this,X))):console.warn(this,`target ${t} not found`)}b(this,k,_).call(this,e(this,d).current)}connectedCallback(){e(this,d).subscribe(s=>{b(this,k,_).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,d).observe()}disconnectedCallback(){e(this,d).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),b(this,k,Z).call(this)}}h=new WeakMap,d=new WeakMap,k=new WeakSet,Z=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,D)),e(this,h).removeEventListener("popoverOpened",e(this,U)),e(this,h).removeEventListener("popoverClosing",e(this,j)),e(this,h).removeEventListener("popoverClosed",e(this,X)))},D=new WeakMap,U=new WeakMap,j=new WeakMap,X=new WeakMap,_=function(t){e(this,h)instanceof z&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};N.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ne);exports.PopoverButtonElement=ne;exports.PopoverElement=z;
1
+ "use strict";var te=c=>{throw TypeError(c)};var Q=(c,o,t)=>o.has(c)||te("Cannot "+t);var e=(c,o,t)=>(Q(c,o,"read from private field"),t?t.call(c):o.get(c)),r=(c,o,t)=>o.has(c)?te("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(c):o.set(c,t),n=(c,o,t,s)=>(Q(c,o,"write to private field"),s?s.call(c,t):o.set(c,t),t),b=(c,o,t)=>(Q(c,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../element-linked-store/index.cjs"),m=require("../css-property/index.cjs"),N=require("../index-Cqw2NKev.cjs"),Y=require("../events-KVanG9sR.cjs"),ce=require("../function-MthRj-GJ.cjs"),se=require("../style-At6aDoqG.cjs"),ie=require("../url-D1CgmwZ_.cjs"),re=require("../window-resizer/index.cjs"),F=require("../device/index.cjs");var u,y,J,K;class le{constructor(){r(this,u,new Map);r(this,y,[]);r(this,J,o=>{var s;const t=[...e(this,y)].reverse().find(i=>i.clickOutside.current);if(t){const i=o.composedPath();if(i.find(ee=>ee instanceof HTMLElement&&ee.hasAttribute("data-popover-content")))return;const l=i[0],p=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),H=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!p||H)&&t.close()}});r(this,K,o=>{if(o.code==="Escape"){const t=[...e(this,y)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,J)),addEventListener("keydown",e(this,K))}get groups(){return e(this,u)}get stack(){return e(this,y)}add(o,t){if(t.closeRest.current)e(this,u).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,u).get(o);i==null||i.forEach(l=>{l.close()})}let s=e(this,u).get(o);s!=null&&s.length||(s=[],e(this,u).set(o,s)),e(this,y).push(t),s.push(t)}remove(o,t){if(n(this,y,e(this,y).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(o);e(this,u).delete(o),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,u).get(o);s&&(s=s.filter(i=>i!==t),e(this,u).set(o,s))}}}u=new WeakMap,y=new WeakMap,J=new WeakMap,K=new WeakMap;var f,M,V,C,B,v,w,x,A,g,R,q,L,T,O,a,P,oe,I,$,S,W,G;const E=class E extends HTMLElement{constructor(){super();r(this,P);r(this,f);r(this,M);r(this,V);r(this,C);r(this,B);r(this,v);r(this,w);r(this,x);r(this,A);r(this,g);r(this,R);r(this,q);r(this,L);r(this,T);r(this,O);r(this,a);r(this,$);r(this,S);r(this,W);r(this,G);this.urlValue="",n(this,f,!1),n(this,v,new m.CSSProperty(this,"--history",!1)),n(this,w,new m.CSSProperty(this,"--restore",!1)),n(this,x,new m.CSSProperty(this,"--close-rest",!1)),n(this,A,new m.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new m.CSSProperty(this,"--group","")),n(this,R,new m.CSSProperty(this,"--click-outside",!1)),n(this,q,new m.CSSProperty(this,"--escape",!1)),n(this,L,new m.CSSProperty(this,"--check-viewport-bounds",!1)),n(this,T,!1),n(this,a,new he.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),n(this,$,()=>{n(this,T,!1),e(this,f)&&e(this,v).current&&!location.search.includes(this.id)?this.close():!e(this,f)&&e(this,v).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,T,!0)}),n(this,S,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,W).call(this)}),n(this,W,ce.debounce(()=>{e(this,G).call(this)},10)),n(this,G,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,L).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>F.viewport.width?s=F.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>F.viewport.height?i=F.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),e(this,g).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get history(){return e(this,v)}get restore(){return e(this,w)}get closeRest(){return e(this,x)}get closeRestInGroup(){return e(this,A)}get group(){return e(this,g)}get clickOutside(){return e(this,R)}get escape(){return e(this,q)}get opened(){return e(this,f)}get lastTrigger(){return e(this,O)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,f)&&ie.updateSearchParameter(this.id,t)}open(t){if(e(this,f))return;n(this,O,t==null?void 0:t.trigger),clearTimeout(e(this,M)),clearTimeout(e(this,V)),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),Y.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,O)}}),e(this,v).current&&e(this,T)&&history.pushState(history.state,"",e(this,P,oe)),n(this,f,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,S).call(this),e(this,a).set("opened",!0),Y.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,O)}}),n(this,C,void 0),n(this,B,setTimeout(()=>{e(this,a).set("transitionend",!0)},se.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():n(this,C,setTimeout(s,10))}close(){e(this,f)&&(clearTimeout(e(this,C)),clearTimeout(e(this,B)),E.stack.remove(e(this,g).current,this),n(this,f,!1),b(this,P,I).call(this),e(this,a).set("transitionend",!1),n(this,M,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),Y.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,V,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),Y.dispatchEvent(this,"popoverClosed",{custom:!0})},se.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){e(this,v).observe(),e(this,w).observe(),e(this,x).observe(),e(this,A).observe(),e(this,g).observe(),e(this,R).observe(),e(this,q).observe(),e(this,L).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,$)),setTimeout(()=>{e(this,w).current?(this.urlValue=ie.parseSearchParameters(location.search)[this.id],e(this,$).call(this)):(b(this,P,I).call(this),n(this,T,!0))},0),e(this,L).subscribe(()=>{e(this,S).call(this)}),re.windowResizer.subscribe(e(this,S))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),re.windowResizer.unsubscribe(e(this,S)),e(this,a).close(),e(this,v).close(),e(this,w).close(),e(this,x).close(),e(this,A).close(),e(this,g).close(),e(this,R).close(),e(this,q).close(),e(this,L).close(),this.removeAttribute("role"),clearTimeout(e(this,M)),clearTimeout(e(this,V)),clearTimeout(e(this,C)),clearTimeout(e(this,B)),removeEventListener("popstate",e(this,$)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),b(this,P,I).call(this)}};f=new WeakMap,M=new WeakMap,V=new WeakMap,C=new WeakMap,B=new WeakMap,v=new WeakMap,w=new WeakMap,x=new WeakMap,A=new WeakMap,g=new WeakMap,R=new WeakMap,q=new WeakMap,L=new WeakMap,T=new WeakMap,O=new WeakMap,a=new WeakMap,P=new WeakSet,oe=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},I=function(){if(e(this,v).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},$=new WeakMap,S=new WeakMap,W=new WeakMap,G=new WeakMap,E.stack=new le;let z=E;N.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",z);var h,d,k,Z,D,U,j,X,_;class ne extends HTMLElement{constructor(){super();r(this,k);r(this,h);r(this,d,new m.CSSProperty(this,"--type","open"));r(this,D,()=>{e(this,d).current!=="close"&&this.classList.add("triggered")});r(this,U,()=>{e(this,d).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,j,()=>{e(this,d).current!=="close"&&this.classList.remove("opened")});r(this,X,()=>{e(this,d).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});N.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,d).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,d)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(b(this,k,Z).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const p=this.getRootNode();p instanceof ShadowRoot?i=p.host.closest("[data-popover]"):p instanceof HTMLElement&&(i=p.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=p=>{if(!p)return null;let H=p.querySelector("[data-popover]");return!H&&(p!=null&&p.parentElement)&&(H=l(p.parentElement)),H};i=l(this.parentElement)||null}else!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),i=document.querySelector(t)||this.getRootNode().querySelector(t);i instanceof HTMLElement?(n(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,D)),e(this,h).addEventListener("popoverOpened",e(this,U)),e(this,h).addEventListener("popoverClosing",e(this,j)),e(this,h).addEventListener("popoverClosed",e(this,X))):console.warn(this,`target ${t} not found`)}b(this,k,_).call(this,e(this,d).current)}connectedCallback(){e(this,d).subscribe(s=>{b(this,k,_).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,d).observe()}disconnectedCallback(){e(this,d).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),b(this,k,Z).call(this)}}h=new WeakMap,d=new WeakMap,k=new WeakSet,Z=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,D)),e(this,h).removeEventListener("popoverOpened",e(this,U)),e(this,h).removeEventListener("popoverClosing",e(this,j)),e(this,h).removeEventListener("popoverClosed",e(this,X)))},D=new WeakMap,U=new WeakMap,j=new WeakMap,X=new WeakMap,_=function(t){e(this,h)instanceof z&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};N.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ne);exports.PopoverButtonElement=ne;exports.PopoverElement=z;
@@ -4,7 +4,7 @@ var et = (c) => {
4
4
  var Q = (c, o, e) => o.has(c) || et("Cannot " + e);
5
5
  var t = (c, o, e) => (Q(c, o, "read from private field"), e ? e.call(c) : o.get(c)), r = (c, o, e) => o.has(c) ? et("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(c) : o.set(c, e), h = (c, o, e, s) => (Q(c, o, "write to private field"), s ? s.call(c, e) : o.set(c, e), e), y = (c, o, e) => (Q(c, o, "access private method"), e);
6
6
  import { ElementLinkedStore as ot } from "../element-linked-store/index.js";
7
- import { CSSProperty as b } from "../css-property/index.js";
7
+ import { CSSProperty as v } from "../css-property/index.js";
8
8
  import { i as _ } from "../index-euf5anj6.js";
9
9
  import { d as Y } from "../events-CsVF98U6.js";
10
10
  import { d as ht } from "../function-C10DGppn.js";
@@ -12,14 +12,14 @@ import { g as st } from "../style-j2TwriJ_.js";
12
12
  import { u as nt, p as ct } from "../url-B6BNcw6_.js";
13
13
  import { windowResizer as it } from "../window-resizer/index.js";
14
14
  import { viewport as j } from "../device/index.js";
15
- var u, v, J, K;
15
+ var u, b, J, K;
16
16
  class lt {
17
17
  constructor() {
18
18
  r(this, u, /* @__PURE__ */ new Map());
19
- r(this, v, []);
19
+ r(this, b, []);
20
20
  r(this, J, (o) => {
21
21
  var s;
22
- const e = [...t(this, v)].reverse().find((i) => i.clickOutside.current);
22
+ const e = [...t(this, b)].reverse().find((i) => i.clickOutside.current);
23
23
  if (e) {
24
24
  const i = o.composedPath();
25
25
  if (i.find(
@@ -32,17 +32,20 @@ class lt {
32
32
  });
33
33
  r(this, K, (o) => {
34
34
  if (o.code === "Escape") {
35
- const e = [...t(this, v)].reverse().find((s) => s.escape.current);
36
- console.log(t(this, v)), e && e.close();
35
+ const e = [...t(this, b)].reverse().find((s) => s.escape.current);
36
+ e && e.close();
37
37
  }
38
38
  });
39
- addEventListener("click", t(this, J)), addEventListener("keydown", t(this, K));
39
+ document.documentElement.addEventListener(
40
+ "click",
41
+ t(this, J)
42
+ ), addEventListener("keydown", t(this, K));
40
43
  }
41
44
  get groups() {
42
45
  return t(this, u);
43
46
  }
44
47
  get stack() {
45
- return t(this, v);
48
+ return t(this, b);
46
49
  }
47
50
  add(o, e) {
48
51
  if (e.closeRest.current)
@@ -58,10 +61,10 @@ class lt {
58
61
  });
59
62
  }
60
63
  let s = t(this, u).get(o);
61
- s != null && s.length || (s = [], t(this, u).set(o, s)), t(this, v).push(e), s.push(e);
64
+ s != null && s.length || (s = [], t(this, u).set(o, s)), t(this, b).push(e), s.push(e);
62
65
  }
63
66
  remove(o, e) {
64
- if (h(this, v, t(this, v).filter((s) => s !== e)), e.closeRest.current) {
67
+ if (h(this, b, t(this, b).filter((s) => s !== e)), e.closeRest.current) {
65
68
  let s = [];
66
69
  t(this, u).forEach((i) => {
67
70
  i.forEach((l) => s.push(l));
@@ -77,8 +80,8 @@ class lt {
77
80
  }
78
81
  }
79
82
  }
80
- u = new WeakMap(), v = new WeakMap(), J = new WeakMap(), K = new WeakMap();
81
- var f, M, H, A, W, g, w, S, C, m, R, $, L, T, O, a, P, rt, F, V, k, q, z;
83
+ u = new WeakMap(), b = new WeakMap(), J = new WeakMap(), K = new WeakMap();
84
+ var f, M, H, A, W, m, w, S, C, g, R, $, L, T, O, a, P, rt, F, V, k, q, z;
82
85
  const E = class E extends HTMLElement {
83
86
  constructor() {
84
87
  super();
@@ -88,11 +91,11 @@ const E = class E extends HTMLElement {
88
91
  r(this, H);
89
92
  r(this, A);
90
93
  r(this, W);
91
- r(this, g);
94
+ r(this, m);
92
95
  r(this, w);
93
96
  r(this, S);
94
97
  r(this, C);
95
- r(this, m);
98
+ r(this, g);
96
99
  r(this, R);
97
100
  r(this, $);
98
101
  r(this, L);
@@ -103,17 +106,17 @@ const E = class E extends HTMLElement {
103
106
  r(this, k);
104
107
  r(this, q);
105
108
  r(this, z);
106
- this.urlValue = "", h(this, f, !1), h(this, g, new b(this, "--history", !1)), h(this, w, new b(this, "--restore", !1)), h(this, S, new b(this, "--close-rest", !1)), h(this, C, new b(
109
+ this.urlValue = "", h(this, f, !1), h(this, m, new v(this, "--history", !1)), h(this, w, new v(this, "--restore", !1)), h(this, S, new v(this, "--close-rest", !1)), h(this, C, new v(
107
110
  this,
108
111
  "--close-rest-in-group",
109
112
  !1
110
- )), h(this, m, new b(this, "--group", "")), h(this, R, new b(this, "--click-outside", !1)), h(this, $, new b(this, "--escape", !1)), h(this, L, new b(this, "--check-viewport-bounds", !1)), h(this, T, !1), h(this, a, new ot(this, {
113
+ )), h(this, g, new v(this, "--group", "")), h(this, R, new v(this, "--click-outside", !1)), h(this, $, new v(this, "--escape", !1)), h(this, L, new v(this, "--check-viewport-bounds", !1)), h(this, T, !1), h(this, a, new ot(this, {
111
114
  opened: !1,
112
115
  closing: !1,
113
116
  triggered: !1,
114
117
  transitionend: !1
115
118
  })), h(this, V, () => {
116
- h(this, T, !1), t(this, f) && t(this, g).current && !location.search.includes(this.id) ? this.close() : !t(this, f) && t(this, g).current && location.search.includes(this.id) && this.open({ trigger: this.idWithValue }), h(this, T, !0);
119
+ h(this, T, !1), t(this, f) && t(this, m).current && !location.search.includes(this.id) ? this.close() : !t(this, f) && t(this, m).current && location.search.includes(this.id) && this.open({ trigger: this.idWithValue }), h(this, T, !0);
117
120
  }), h(this, k, () => {
118
121
  this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), this.style.setProperty("--viewport-offset-x", "0px"), this.style.setProperty("--viewport-offset-y", "0px"), t(this, q).call(this);
119
122
  }), h(this, q, ht(() => {
@@ -124,7 +127,7 @@ const E = class E extends HTMLElement {
124
127
  let s = 0, i = 0;
125
128
  e.right > j.width ? s = j.width - e.right : e.left < 0 && (s = e.left * -1), e.bottom > j.height ? i = j.height - e.bottom : e.top < 0 && (i = e.top * -1), this.style.setProperty("--viewport-offset-x", s + "px"), this.style.setProperty("--viewport-offset-y", i + "px");
126
129
  }
127
- }), t(this, m).subscribe((e) => {
130
+ }), t(this, g).subscribe((e) => {
128
131
  e.previous && (E.stack.remove(e.previous, this), e.current || (document.documentElement.classList.remove(
129
132
  `${this.group.previous}-closing`
130
133
  ), document.documentElement.classList.remove(
@@ -145,7 +148,7 @@ const E = class E extends HTMLElement {
145
148
  });
146
149
  }
147
150
  get history() {
148
- return t(this, g);
151
+ return t(this, m);
149
152
  }
150
153
  get restore() {
151
154
  return t(this, w);
@@ -157,7 +160,7 @@ const E = class E extends HTMLElement {
157
160
  return t(this, C);
158
161
  }
159
162
  get group() {
160
- return t(this, m);
163
+ return t(this, g);
161
164
  }
162
165
  get clickOutside() {
163
166
  return t(this, R);
@@ -185,9 +188,9 @@ const E = class E extends HTMLElement {
185
188
  detail: {
186
189
  trigger: t(this, O)
187
190
  }
188
- }), t(this, g).current && t(this, T) && history.pushState(history.state, "", t(this, P, rt)), h(this, f, !0);
191
+ }), t(this, m).current && t(this, T) && history.pushState(history.state, "", t(this, P, rt)), h(this, f, !0);
189
192
  const s = () => {
190
- E.stack.add(t(this, m).current, this), t(this, k).call(this), t(this, a).set("opened", !0), Y(this, "popoverOpened", {
193
+ E.stack.add(t(this, g).current, this), t(this, k).call(this), t(this, a).set("opened", !0), Y(this, "popoverOpened", {
191
194
  custom: !0,
192
195
  detail: {
193
196
  trigger: t(this, O)
@@ -199,7 +202,7 @@ const E = class E extends HTMLElement {
199
202
  e != null && e.skipTransition ? s() : h(this, A, setTimeout(s, 10));
200
203
  }
201
204
  close() {
202
- t(this, f) && (clearTimeout(t(this, A)), clearTimeout(t(this, W)), E.stack.remove(t(this, m).current, this), h(this, f, !1), y(this, P, F).call(this), t(this, a).set("transitionend", !1), h(this, M, setTimeout(() => {
205
+ t(this, f) && (clearTimeout(t(this, A)), clearTimeout(t(this, W)), E.stack.remove(t(this, g).current, this), h(this, f, !1), y(this, P, F).call(this), t(this, a).set("transitionend", !1), h(this, M, setTimeout(() => {
203
206
  t(this, a).set("opened", !1), t(this, a).set("closing", !0), Y(this, "popoverClosing", {
204
207
  custom: !0
205
208
  }), h(this, H, setTimeout(() => {
@@ -210,20 +213,20 @@ const E = class E extends HTMLElement {
210
213
  }, 10)));
211
214
  }
212
215
  connectedCallback() {
213
- t(this, g).observe(), t(this, w).observe(), t(this, S).observe(), t(this, C).observe(), t(this, m).observe(), t(this, R).observe(), t(this, $).observe(), t(this, L).observe(), this.setAttribute("role", "dialog"), addEventListener("popstate", t(this, V)), setTimeout(() => {
216
+ t(this, m).observe(), t(this, w).observe(), t(this, S).observe(), t(this, C).observe(), t(this, g).observe(), t(this, R).observe(), t(this, $).observe(), t(this, L).observe(), this.setAttribute("role", "dialog"), addEventListener("popstate", t(this, V)), setTimeout(() => {
214
217
  t(this, w).current ? (this.urlValue = ct(location.search)[this.id], t(this, V).call(this)) : (y(this, P, F).call(this), h(this, T, !0));
215
218
  }, 0), t(this, L).subscribe(() => {
216
219
  t(this, k).call(this);
217
220
  }), it.subscribe(t(this, k));
218
221
  }
219
222
  disconnectedCallback() {
220
- E.stack.remove(t(this, m).current, this), it.unsubscribe(t(this, k)), t(this, a).close(), t(this, g).close(), t(this, w).close(), t(this, S).close(), t(this, C).close(), t(this, m).close(), t(this, R).close(), t(this, $).close(), t(this, L).close(), this.removeAttribute("role"), clearTimeout(t(this, M)), clearTimeout(t(this, H)), clearTimeout(t(this, A)), clearTimeout(t(this, W)), removeEventListener("popstate", t(this, V)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), this.style.removeProperty("--viewport-offset-x"), this.style.removeProperty("--viewport-offset-y"), y(this, P, F).call(this);
223
+ E.stack.remove(t(this, g).current, this), it.unsubscribe(t(this, k)), t(this, a).close(), t(this, m).close(), t(this, w).close(), t(this, S).close(), t(this, C).close(), t(this, g).close(), t(this, R).close(), t(this, $).close(), t(this, L).close(), this.removeAttribute("role"), clearTimeout(t(this, M)), clearTimeout(t(this, H)), clearTimeout(t(this, A)), clearTimeout(t(this, W)), removeEventListener("popstate", t(this, V)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), this.style.removeProperty("--viewport-offset-x"), this.style.removeProperty("--viewport-offset-y"), y(this, P, F).call(this);
221
224
  }
222
225
  };
223
- f = new WeakMap(), M = new WeakMap(), H = new WeakMap(), A = new WeakMap(), W = new WeakMap(), g = new WeakMap(), w = new WeakMap(), S = new WeakMap(), C = new WeakMap(), m = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), L = new WeakMap(), T = new WeakMap(), O = new WeakMap(), a = new WeakMap(), P = new WeakSet(), rt = function() {
226
+ f = new WeakMap(), M = new WeakMap(), H = new WeakMap(), A = new WeakMap(), W = new WeakMap(), m = new WeakMap(), w = new WeakMap(), S = new WeakMap(), C = new WeakMap(), g = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), L = new WeakMap(), T = new WeakMap(), O = new WeakMap(), a = new WeakMap(), P = new WeakSet(), rt = function() {
224
227
  return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.idWithValue}`;
225
228
  }, F = function() {
226
- if (t(this, g).current) {
229
+ if (t(this, m).current) {
227
230
  const e = new URL(location.href);
228
231
  e.searchParams.delete(this.id), history.replaceState(history.state, "", e.href);
229
232
  }
@@ -236,7 +239,7 @@ class at extends HTMLElement {
236
239
  super();
237
240
  r(this, x);
238
241
  r(this, n);
239
- r(this, d, new b(this, "--type", "open"));
242
+ r(this, d, new v(this, "--type", "open"));
240
243
  r(this, B, () => {
241
244
  t(this, d).current !== "close" && this.classList.add("triggered");
242
245
  });
@@ -0,0 +1,11 @@
1
+ import { ScrollUserElement } from './ScrollUserElement';
2
+ export declare class ScrollCounterElement extends ScrollUserElement {
3
+ #private;
4
+ protected connectedCallback(): Promise<void>;
5
+ protected disconnectedCallback(): void;
6
+ }
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ 'e-scroll-counter': ScrollCounterElement;
10
+ }
11
+ }
@@ -1 +1 @@
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"),Ht=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,$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?Ht.getCumulativeOffsetTop(t(this,p)):Ht.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,Wt,kt,A,At,ht,R,ot,F,Rt,lt,Mt,ct,ut,at,f,Ft,l,Se,pe,C,m,k,q,dt,D,w,x,Nt,N,U,G,Z,Ut,St,j,Tt,B,P,Gt,K,qt,Zt,o,Re,le,Vt,ze,Le,Me,Te,z,fe,Ge,jt,be,qe,De,gt,Ze,me,ce,ge;class Bt 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,Wt,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,Ft,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,Nt,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Ut);s(this,St);s(this,j,new hs.Tweened);s(this,Tt,!1);s(this,B,null);s(this,P,!1);s(this,Gt,null);s(this,K,[]);s(this,qt,!1);s(this,Zt);s(this,z,e=>{if(e&&t(this,qt)){h(this,qt,!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,Nt,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,Ut)),h(this,Ut,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,Tt)?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,Tt,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,qt,!0),this.style.setProperty("--max-section-size",""),h(this,Zt,setTimeout(()=>{h(this,qt,!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,Ft,document.createElement("slot")),t(this,f).appendChild(t(this,Ft)),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,Wt)}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,Nt)}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),Ot=t(this,l)[Ie];let ne=Ot?this.targetScrollValue-Ot.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),t(this,Tt)||(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?Ht.getCumulativeOffsetTop(this):Ht.getCumulativeOffsetLeft(this)),h(this,pe,this.vertical?Ht.getCumulativeOffsetTop(t(this,f)):Ht.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,Vt).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,Vt).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,Vt).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,Nt,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,Wt).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,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,Wt).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,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,Wt=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,Ft=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,Nt=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Ut=new WeakMap,St=new WeakMap,j=new WeakMap,Tt=new WeakMap,B=new WeakMap,P=new WeakMap,Gt=new WeakMap,K=new WeakMap,qt=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,Vt).call(this),t(this,Ft).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)},Vt=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,Ut)),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,Vt).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,Tt)?I.size*b*-1*.4:0,Ot=I.position;this.overscroll&&Ot===0&&e&&(Ot=t(this,N));let ne=Math.abs(Ot+Ie-i);ne<=r&&(r=ne,u=y)}return u},ge=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Bt);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,Bt);e instanceof Bt?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 Dt,mt,tt;class Xe extends Be{constructor(){super(...arguments);s(this,Dt,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,Dt).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,Dt,document.createElement("div")),this.appendChild(t(this,Dt))}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,Dt).remove()}}Dt=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,Bt);n instanceof Bt?(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 Bt&&(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=Bt;exports.ScrollSegmentElement=Ye;exports.ScrollSetButtonElement=Je;exports.ScrollStepButtonElement=Qe;exports.ScrollbarElement=je;
1
+ "use strict";var ns=Object.defineProperty;var _e=Object.getOwnPropertySymbols,hs=Object.getPrototypeOf,os=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable,cs=Reflect.get;var We=a=>{throw TypeError(a)};var $e=(a,n,e)=>n in a?ns(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,Fe=(a,n)=>{for(var e in n||(n={}))os.call(n,e)&&$e(a,e,n[e]);if(_e)for(var e of _e(n))ls.call(n,e)&&$e(a,e,n[e]);return a};var Me=(a,n,e)=>n.has(a)||We("Cannot "+e);var t=(a,n,e)=>(Me(a,n,"read from private field"),e?e.call(a):n.get(a)),s=(a,n,e)=>n.has(a)?We("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),h=(a,n,e,i)=>(Me(a,n,"write to private field"),i?i.call(a,e):n.set(a,e),e),u=(a,n,e)=>(Me(a,n,"access private method"),e);var Ne=(a,n,e)=>cs(hs(a),e,n);var Ue=(a,n,e)=>new Promise((i,r)=>{var l=g=>{try{m(e.next(g))}catch(gt){r(gt)}},f=g=>{try{m(e.throw(g))}catch(gt){r(gt)}},m=g=>g.done?i(g.value):Promise.resolve(g.value).then(l,f);m((e=e.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const us=require("../Store-GokLe_g-.cjs"),M=require("../index-Cqw2NKev.cjs"),as=require("../easings-GegIwET5.cjs"),oe=require("../events-KVanG9sR.cjs"),Te=require("../function-MthRj-GJ.cjs"),Ze=require("../jss-CRBgdvJ3.cjs"),_t=require("../layout-Ctc2p3uz.cjs"),je=require("../math-GDWEqu7y.cjs"),Ke=require("../number-DyefJ5a1.cjs");require("../ticker/index.cjs");const Le=require("../order/index.cjs"),ds=require("../Damped-B8bmTxAr.cjs"),Ss=require("../Tweened-BsL9FamJ.cjs"),ze=require("../controls/index.cjs"),$t=require("../window-resizer/index.cjs"),Ct=require("../scroll-entries/index.cjs"),Ge=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),ps=require("../device/index.cjs"),ae=require("../element-resizer/index.cjs"),bs=require("../gestures-C7gbKx11.cjs"),Je=require("../dom-JBOkFLTh.cjs"),fs=require("../scroll-segment/index.cjs");var p,Wt,C,de,Se,vt,V,et,Pt,Et,le;class ms{constructor(n,e,i){s(this,Et);s(this,p);s(this,Wt);s(this,C);s(this,de,0);s(this,Se,0);s(this,vt,0);s(this,V,0);s(this,et,null);s(this,Pt,0);h(this,p,n),h(this,Wt,e),h(this,C,i),Ct.scrollEntries.register(t(this,p)),this.setIndex(t(this,Wt))}get element(){return t(this,p)}get index(){return t(this,Wt)}get size(){return t(this,vt)}get width(){return t(this,de)}get height(){return t(this,Se)}get position(){return t(this,V)}get transformPosition(){return t(this,Pt)}destroy(){Ct.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,C).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,de,t(this,p).offsetWidth),h(this,Se,t(this,p).offsetHeight),h(this,vt,t(this,C).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,C).vertical?_t.getCumulativeOffsetTop(t(this,p)):_t.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,C).contentPosition)}transform(){const n=t(this,C).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,C).viewportSize*t(this,C).sectionDistanceScaleCSSProperty.current;t(this,C).loopCSSProperty.current&&t(this,V)+t(this,vt)<=t(this,C).currentScrollValue-n/2&&(e=(t(this,C).distance-n)*-1-t(this,C).gap),Ct.scrollEntries.update(t(this,p),t(this,C).axisCSSProperty.current,e);const r=t(this,C).currentScrollValue+e,l=t(this,V)-t(this,C).viewportSize-i,f=t(this,V)+t(this,vt)+i,m=Ke.preciseNumber(je.clamp(r,l,f),3);h(this,Pt,m*-1),t(this,C).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,Pt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,Pt)}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),oe.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){u(this,Et,le).call(this,"index",n)}setCurrentIndex(n){u(this,Et,le).call(this,"current-index",n)}setCurrentIndexArc(n){u(this,Et,le).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){u(this,Et,le).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Wt=new WeakMap,C=new WeakMap,de=new WeakMap,Se=new WeakMap,vt=new WeakMap,V=new WeakMap,et=new WeakMap,Pt=new WeakMap,Et=new WeakSet,le=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 gs=Ze.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var d,wt,x,st,H,_,$,T,it,rt,W,nt,xt,q,P,zt,Lt,kt,It,Ft,At,A,Rt,ht,R,ot,F,Mt,lt,Tt,ct,ut,at,b,Nt,c,pe,be,v,y,I,D,dt,B,w,z,Ut,N,U,G,Z,Gt,St,j,qt,O,E,Zt,K,Dt,jt,o,qe,ce,Ht,ke,Ie,De,Be,L,fe,Qe,Kt,me,Oe,Ve,yt,Xe,ge,ue,ye;class Ot extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,wt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,st,new S.CSSProperty(this,"--reverse",!1));s(this,H,new S.CSSProperty(this,"--direction",0));s(this,_,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,it,new S.CSSProperty(this,"--tween-easing",!1));s(this,rt,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,nt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,xt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,P,new S.CSSProperty(this,"--loop",!1));s(this,zt,new S.CSSProperty(this,"--damping",20));s(this,Lt,new S.CSSProperty(this,"--mass",0));s(this,kt,new S.CSSProperty(this,"--stiffness",0));s(this,It,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Ft,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,At,new S.CSSProperty(this,"--start-section",0));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,Rt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ht,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ot,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,Mt,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new S.CSSProperty(this,"--focus-delay",0));s(this,Tt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new S.CSSProperty(this,"--disabled",!1));s(this,ut,new S.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,b,null);s(this,Nt,null);s(this,c,[]);s(this,pe,0);s(this,be,0);s(this,v,0);s(this,y,0);s(this,I,0);s(this,D,null);s(this,dt,null);s(this,B,null);s(this,w,null);s(this,z,new us.Store(0));s(this,Ut,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Gt);s(this,St);s(this,j,new Ss.Tweened);s(this,qt,!1);s(this,O,null);s(this,E,!1);s(this,Zt,null);s(this,K,[]);s(this,Dt,!1);s(this,jt);s(this,L,e=>{if(e&&t(this,Dt)){h(this,Dt,!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,Ut,Math.max(0,e-t(this,y))),t(this,c).length){for(let i=0;i<t(this,c).length;i++)t(this,c)[i].transform();t(this,z).current=u(this,o,ue).call(this)}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;u(this,o,Xe).call(this),Ct.scrollEntries.update(this,t(this,x).current,e)});s(this,Kt,(e,i)=>{t(this,wt).current&&(u(this,o,Oe).call(this,Math.sign(i)||1),t(this,me).call(this,e,i))});s(this,me,(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,Gt)),h(this,Gt,setTimeout(()=>{const r=t(this,c)[u(this,o,ue).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Tt).current,easing:as.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!ps.device.isTouch&&!t(this,It).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,c).length){const l={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,qt)?this.scrollToSection(u(this,o,ue).call(this,!0),l):this.shiftSections(r,l)}else t(this,d).shift(r*t(this,v))}else t(this,d).shift(i);h(this,qt,e==="drag")}});s(this,ge,Te.debounce(()=>{const e=t(this,K).reduce((i,r)=>{const l=this.vertical?r.width:r.height;return l>i?l:i},0);clearTimeout(t(this,jt)),h(this,Dt,!0),this.style.setProperty("--max-section-size",""),h(this,jt,setTimeout(()=>{h(this,Dt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,ye,()=>{h(this,E,!0),this.hibernatedCSSProperty.current||u(this,o,Be).call(this)});if(M.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[gs];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,b,document.createElement("div")),t(this,b).className="content",h(this,Nt,document.createElement("slot")),t(this,b).appendChild(t(this,Nt)),t(this,at).appendChild(t(this,b)),e.appendChild(t(this,at)),h(this,Zt,new MutationObserver(Te.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,wt)}get axisCSSProperty(){return t(this,x)}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,T)}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,xt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,P)}get dampingCSSProperty(){return t(this,zt)}get massCSSProperty(){return t(this,Lt)}get stiffnessCSSProperty(){return t(this,kt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,Ft)}get startSectionCSSProperty(){return t(this,At)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,Rt)}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,Mt)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Tt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return u(this,o,Ve).call(this,"current")}get targetScrollValue(){return u(this,o,Ve).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,b)}get sections(){return t(this,c)}get position(){return t(this,pe)}get contentPosition(){return t(this,be)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,y)}get gap(){return t(this,I)}get counter(){return t(this,z)}get limit(){return Math.ceil(t(this,c).length-t(this,q).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,P).current?t(this,N)+t(this,I):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Ut)}get scrollLine(){return t(this,O)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,Z)&&(t(this,P).current||t(this,$).current||t(this,P).current||t(this,W).current||t(this,T).current)&&u(this,o,ce).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress<l?0:this.currentProgress>f?1:(this.currentProgress-l)/(f-l)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress>=l&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,c).length)return;const r=t(this,z).current,l=u(this,o,Qe).call(this,e),f=t(this,c)[r],m=t(this,c)[l];if(f&&m){let g=0;const gt=u(this,o,ue).call(this),Vt=t(this,c)[gt];let he=Vt?this.targetScrollValue-Vt.position:0;t(this,P).current?l===0&&r===t(this,c).length-1?(g=t(this,y)+t(this,v)-f.position+t(this,I),t(this,qt)||(he=0)):l===t(this,c).length-1&&r===0?g=m.position-(t(this,y)+t(this,v)+t(this,I)):g=m.position-f.position:g=m.position-f.position,this.shiftPosition(g-he,i)}}shiftSections(e,i){t(this,c).length&&this.scrollToSection(t(this,z).current+e,i)}setPosition(e,i){u(this,o,Oe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,d).current,{equalize:!0}),t(this,j).set(e,Fe({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}resize(){if(t(this,ut).current)return;t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,z).current;if(h(this,pe,this.vertical?_t.getCumulativeOffsetTop(this):_t.getCumulativeOffsetLeft(this)),h(this,be,this.vertical?_t.getCumulativeOffsetTop(t(this,b)):_t.getCumulativeOffsetLeft(t(this,b))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,I,Ge.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):h(this,I,Ge.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,W).current&&t(this,c).length){const r=t(this,q).current,l=(t(this,v)-t(this,I)*(r-1))/r;t(this,c).forEach(f=>{f.setSize(l)})}else t(this,c).forEach(r=>{r.setSize()});if(t(this,c).forEach(r=>{r.resize()}),t(this,_).current){h(this,y,t(this,v)*t(this,_).current);const r=t(this,y)+t(this,v);this.vertical?(t(this,b).style.width=r+"px",t(this,b).style.height="100%"):(t(this,b).style.height=r+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",h(this,y,t(this,b).offsetHeight-t(this,v))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",h(this,y,t(this,b).offsetWidth-t(this,v)));if(!t(this,P).current){const r=getComputedStyle(this),l=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,y,t(this,y)+l),t(this,d).max=t(this,y)}if(t(this,P).current&&t(this,c).length){const r=t(this,c)[t(this,c).length-1],l=r.position+r.size-t(this,v),f=t(this,y)-l;h(this,N,r.position+r.size+f)}else h(this,N,t(this,y));if(t(this,T).current&&t(this,c).length){const r=t(this,c)[i];t(this,d).set(r.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0});h(this,U,(this.vertical?t(this,b).offsetHeight:t(this,b).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||u(this,o,Ie).call(this):u(this,o,ke).call(this),t(this,ge).call(this),oe.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,d).notify()}connectedCallback(){Ct.scrollEntries.register(this),h(this,d,new ds.Damped(0,{damping:.01,min:0,order:Le.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,D,new ze.WheelControls({element:t(this,b)})),t(this,D).changeEvent.subscribe(t(this,Kt)),h(this,dt,new ze.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,Kt)),h(this,B,new ze.DragControls({element:t(this,b),rootElement:this})),t(this,B).changeEvent.subscribe(t(this,Kt)),h(this,w,new ze.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,me)),t(this,x).subscribe(()=>{u(this,o,qe).call(this)}),t(this,st).subscribe(()=>{u(this,o,qe).call(this)}),t(this,nt).subscribe(e=>{t(this,D).axis=e.current?"max":t(this,x).current}),t(this,xt).subscribe(e=>{t(this,B).inertion=typeof e.current=="number"?e.current:1}),t(this,_).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,E)&&(e?u(this,o,ce).call(this):u(this,o,Ht).call(this))}),t(this,T).subscribe(e=>{t(this,D).debounce=e.current,t(this,B).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,c).length?u(this,o,ce).call(this):!e.current&&e.previous&&t(this,c).length&&u(this,o,Ht).call(this))}),t(this,W).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,c).length?u(this,o,ce).call(this):!e.current&&e.previous&&t(this,c).length&&u(this,o,Ht).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),u(this,o,yt).call(this))}),t(this,P).subscribe(e=>{e.current?(t(this,E)&&(t(this,c).length||(t(this,$).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,Ut,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,zt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Lt).subscribe(e=>{t(this,d).mass=e.current}),t(this,kt).subscribe(e=>{t(this,d).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,E)&&u(this,o,yt).call(this)}),t(this,ot).subscribe(e=>{t(this,E)&&t(this,R).current&&u(this,o,yt).call(this)}),t(this,F).subscribe(e=>{t(this,E)&&t(this,R).current&&u(this,o,yt).call(this)}),t(this,Mt).subscribe(e=>{t(this,E)&&t(this,d).notify()}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,z).subscribe(e=>{t(this,c).length&&u(this,o,yt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),u(this,o,ke).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),u(this,o,Ie).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),u(this,o,De).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),u(this,o,Be).call(this))}),t(this,wt).observe(),t(this,x).observe(),t(this,st).observe(),t(this,H).observe(),t(this,_).observe(),t(this,$).observe(),t(this,T).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,xt).observe(),t(this,q).observe(),t(this,P).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,kt).observe(),t(this,It).observe(),t(this,Ft).observe(),t(this,At).observe(),t(this,A).observe(),t(this,A).observe(),t(this,Rt).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,Mt).observe(),t(this,lt).observe(),t(this,Tt).observe(),t(this,ct).observe(),t(this,ut).observe(),$t.windowResizer.subscribe(t(this,ye),Le.RESIZE_ORDER.LAST),ae.elementResizer.subscribe(this,t(this,L)),t(this,Zt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,wt).unobserve(),t(this,x).unobserve(),t(this,st).unobserve(),t(this,H).unobserve(),t(this,_).unobserve(),t(this,$).unobserve(),t(this,T).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,xt).unobserve(),t(this,q).unobserve(),t(this,P).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,kt).unobserve(),t(this,It).unobserve(),t(this,Ft).unobserve(),t(this,At).unobserve(),t(this,A).unobserve(),t(this,Rt).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,Mt).unobserve(),t(this,lt).unobserve(),t(this,Tt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),$t.windowResizer.unsubscribe(t(this,ye)),ae.elementResizer.unsubscribe(t(this,L)),u(this,o,De).call(this),t(this,Zt).disconnect()}}d=new WeakMap,wt=new WeakMap,x=new WeakMap,st=new WeakMap,H=new WeakMap,_=new WeakMap,$=new WeakMap,T=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,xt=new WeakMap,q=new WeakMap,P=new WeakMap,zt=new WeakMap,Lt=new WeakMap,kt=new WeakMap,It=new WeakMap,Ft=new WeakMap,At=new WeakMap,A=new WeakMap,Rt=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,F=new WeakMap,Mt=new WeakMap,lt=new WeakMap,Tt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,b=new WeakMap,Nt=new WeakMap,c=new WeakMap,pe=new WeakMap,be=new WeakMap,v=new WeakMap,y=new WeakMap,I=new WeakMap,D=new WeakMap,dt=new WeakMap,B=new WeakMap,w=new WeakMap,z=new WeakMap,Ut=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Gt=new WeakMap,St=new WeakMap,j=new WeakMap,qt=new WeakMap,O=new WeakMap,E=new WeakMap,Zt=new WeakMap,K=new WeakMap,Dt=new WeakMap,jt=new WeakMap,o=new WeakSet,qe=function(){const e=t(this,x).current,i=t(this,st).current?"-reverse":"";t(this,b).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,D).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},ce=function(){u(this,o,Ht).call(this),t(this,Nt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,c).push(new ms(e,i,this))}),t(this,b).style.transform="",this.style.setProperty("--sections",t(this,c).length.toString()),oe.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),u(this,o,yt).call(this)},Ht=function(){t(this,c).forEach(e=>{e.destroy()}),h(this,c,[]),t(this,z).reset(),t(this,d).reset(),this.style.removeProperty("--max-section-size"),oe.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ke=function(){t(this,G)||(h(this,G,!0),t(this,d).unsubscribe(t(this,fe)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,Gt)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,D).disconnect(),t(this,dt).disconnect(),t(this,B).disconnect(),t(this,w).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},Ie=function(){t(this,G)&&(h(this,G,!1),t(this,d).subscribe(t(this,fe),-1e4),t(this,d).notify(),t(this,D).connect(),t(this,dt).connect(),t(this,B).connect(),t(this,A).current&&t(this,w).connect())},De=function(){t(this,Z)||(h(this,Z,!0),clearTimeout(t(this,jt)),$t.windowResizer.unsubscribe(t(this,L)),u(this,o,ke).call(this),t(this,b).style.transform="",t(this,b).style.height="",t(this,b).style.width="",this.classList.remove("has-overflow","start","end"),t(this,c).length?u(this,o,Ht).call(this):(t(this,z).reset(),t(this,d).reset()),Ct.scrollEntries.unregister(this))},Be=function(){t(this,Z)&&(h(this,Z,!1),Ct.scrollEntries.register(this),this.tryResplit(),u(this,o,Ie).call(this),this.scrollToSection(t(this,At).current,{behaviour:"instant"}),$t.windowResizer.subscribe(t(this,L),Le.RESIZE_ORDER.SCROLL))},L=new WeakMap,fe=new WeakMap,Qe=function(e){let i=t(this,z).current;return t(this,P).current?i=Ke.loopNumber(e,t(this,c).length):i=je.clamp(e,0,this.limit),i},Kt=new WeakMap,me=new WeakMap,Oe=function(e=1){t(this,ht).current&&(t(this,w).direction=e),t(this,A).current&&t(this,w).pauseAndContinue(t(this,Rt).current,this.sectionalCSSProperty.current)},Ve=function(e="current"){if(t(this,P).current&&t(this,c).length){const i=t(this,d)[e]%Math.round(t(this,y)+t(this,v)+t(this,I));return i<0?t(this,y)+i+t(this,v)+t(this,I):i}else return t(this,d)[e]},yt=function(){if(t(this,c).length){const e=t(this,z).current+t(this,ot).current;if(e===0?h(this,O,"start"):e===this.limit?h(this,O,"end"):h(this,O,null),oe.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,R).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,q).current+t(this,F).current;h(this,K,[]),t(this,c).forEach((r,l)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,F).current,m=e+i,g=this.sections.length-m;l>=e&&l<m||l<=f?(r.setMark("current"),t(this,K).push(r)):l>=m&&l<m+g/2||l<=f+i?r.setMark("next"):r.setMark("previous")}),t(this,ge).call(this)}}},Xe=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 l=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(l),i.setCurrentIndexArcAbs(Math.abs(l)),i.setMiddle(r===e)})}},ge=new WeakMap,ue=function(e=!1){let i=this.targetScrollValue,r=1/0,l=0;const f=t(this,d).direction;for(let m=0;m<t(this,c).length;m++){const g=t(this,c)[m];let gt=t(this,qt)?g.size*f*-1*.4:0,Vt=g.position;this.overscroll&&Vt===0&&e&&(Vt=t(this,N));let he=Math.abs(Vt+gt-i);he<=r&&(r=he,l=m)}return l},ye=new WeakMap;M.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Ot);var Ce;class Re extends HTMLElement{constructor(){super(...arguments);s(this,Ce,null)}get scrollElement(){return t(this,Ce)}connectedCallback(){const e=Je.findParentElement(this,Ot);e instanceof Ot?h(this,Ce,e):console.error(this,"e-scroll not found")}}Ce=new WeakMap;var pt,k,J,Q,Jt,Qt,bt,Xt,ve,Pe;class Ye extends Re{constructor(){super();s(this,pt,null);s(this,k,null);s(this,J,!1);s(this,Q,0);s(this,Jt,0);s(this,Qt,0);s(this,bt,()=>{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,k).style.width=t(this,Q)+"px",t(this,k).style.height="100%"):(t(this,k).style.width="100%",t(this,k).style.height=t(this,Q)+"px"),h(this,Jt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Xt).call(this)});s(this,Xt,()=>{h(this,Qt,this.scrollElement.currentProgress*t(this,Jt)),t(this,J)?t(this,k).style.transform=`translate3d(${t(this,Qt)}px, 0px, 0px)`:t(this,k).style.transform=`translate3d(0px, ${t(this,Qt)}px, 0px)`});s(this,ve,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Pe,e=>{document.documentElement.classList.add("grabbing"),bs.setupDrag(l=>{const f=t(this,J)?l.x:l.y,m=this.scrollElement.distance/t(this,Jt),g=(f-r)*m;this.scrollElement.setPosition(i+g)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(M.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Ze.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,k)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,k,e),t(this,k).addEventListener("pointerdown",t(this,Pe)),$t.windowResizer.subscribe(t(this,bt),Le.RESIZE_ORDER.SCROLL),ae.elementResizer.subscribe(this,t(this,bt)),ae.elementResizer.subscribe(this.scrollElement,t(this,bt)),this.scrollElement.onScroll(t(this,Xt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ve))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,k).removeEventListener("pointerdown",t(this,Pe)),$t.windowResizer.unsubscribe(t(this,bt)),ae.elementResizer.unsubscribe(t(this,bt)),this.scrollElement.offScroll(t(this,Xt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ve))}}pt=new WeakMap,k=new WeakMap,J=new WeakMap,Q=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,bt=new WeakMap,Xt=new WeakMap,ve=new WeakMap,Pe=new WeakMap;M.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Ye);var Yt,te,ee;class ts extends Re{constructor(){super();s(this,Yt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,te,new S.CSSProperty(this,"--tween-easing",!1));s(this,ee,new S.CSSProperty(this,"--tween-duration",0));M.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Yt).current,i=t(this,te).current,r=t(this,ee).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Yt).observe(),t(this,te).observe(),t(this,ee).observe()}disconnectedCallback(){t(this,Yt).close(),t(this,te).close(),t(this,ee).close()}}Yt=new WeakMap,te=new WeakMap,ee=new WeakMap;var se;class es extends ts{constructor(){super(...arguments);s(this,se,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,se).current,e)}connectedCallback(){super.connectedCallback(),t(this,se).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,se).close()}}se=new WeakMap;M.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",es);var X,ie;class ss extends ts{constructor(){super(...arguments);s(this,X,new S.CSSProperty(this,"--step",1));s(this,ie,()=>{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,ie).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,ie)),t(this,ie).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,ie=new WeakMap;M.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",ss);var Y,ft,re,Ee,we,ne;class ys{constructor(n,e,i){s(this,Y,null);s(this,ft,null);s(this,re,null);s(this,Ee,null);s(this,we,()=>{t(this,ft).scrollToSection(t(this,re),{behaviour:t(this,Ee)})});s(this,ne,()=>{t(this,Y).classList.toggle("current",t(this,ft).counter.current===t(this,re))});M.isBrowser&&(h(this,Y,document.createElement("button")),h(this,ft,n),h(this,Ee,i),h(this,re,e),t(this,Y).addEventListener("click",t(this,we)),t(this,ft).counter.subscribe(t(this,ne)),t(this,ne).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,we)),t(this,ft).counter.unsubscribe(t(this,ne)),t(this,Y).remove()}}Y=new WeakMap,ft=new WeakMap,re=new WeakMap,Ee=new WeakMap,we=new WeakMap,ne=new WeakMap;var Bt,mt,tt;class is extends Re{constructor(){super(...arguments);s(this,Bt,null);s(this,mt,[]);s(this,tt,Te.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 ys(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Bt).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,Bt,document.createElement("div")),this.appendChild(t(this,Bt))}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,Bt).remove()}}Bt=new WeakMap,mt=new WeakMap,tt=new WeakMap;M.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",is);class rs extends fs.ScrollSegmentElement{connectedCallback(){const n=Je.findParentElement(this,Ot);n instanceof Ot?(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 Ot&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}M.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",rs);var xe;const He=class He extends Re{constructor(){super(...arguments);s(this,xe,()=>{this.textContent=`${this.scrollElement.counter.current+1}`})}connectedCallback(){return Ue(this,null,function*(){Ne(He.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,xe))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,xe))}};xe=new WeakMap;let Ae=He;M.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Ae);exports.ScrollBulletButtonsElement=is;exports.ScrollCounterElement=Ae;exports.ScrollElement=Ot;exports.ScrollSegmentElement=rs;exports.ScrollSetButtonElement=es;exports.ScrollStepButtonElement=ss;exports.ScrollbarElement=Ye;
@@ -4,3 +4,4 @@ export { ScrollSetButtonElement } from './ScrollSetButtonElement';
4
4
  export { ScrollStepButtonElement } from './ScrollStepButtonElement';
5
5
  export { ScrollBulletButtonsElement } from './ScrollBulletButtonsElement';
6
6
  export { ScrollSegmentElement } from './ScrollSegmentElement';
7
+ export { ScrollCounterElement } from './ScrollCounterElement';