aptechka 0.71.21 → 0.71.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/scroll/ScrollTotalElement.d.ts +11 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.d.ts +1 -0
- package/lib/scroll/index.js +418 -396
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ScrollUserElement } from './ScrollUserElement';
|
|
2
|
+
export declare class ScrollTotalElement extends ScrollUserElement {
|
|
3
|
+
#private;
|
|
4
|
+
protected connectedCallback(): Promise<void>;
|
|
5
|
+
protected disconnectedCallback(): void;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'e-scroll-total': ScrollTotalElement;
|
|
10
|
+
}
|
|
11
|
+
}
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ui=Object.defineProperty;var qs=Object.getOwnPropertySymbols,ai=Object.getPrototypeOf,di=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable,pi=Reflect.get;var $s=a=>{throw TypeError(a)};var Bs=(a,h,e)=>h in a?ui(a,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[h]=e,Hs=(a,h)=>{for(var e in h||(h={}))di.call(h,e)&&Bs(a,e,h[e]);if(qs)for(var e of qs(h))Si.call(h,e)&&Bs(a,e,h[e]);return a};var zs=(a,h,e)=>h.has(a)||$s("Cannot "+e);var t=(a,h,e)=>(zs(a,h,"read from private field"),e?e.call(a):h.get(a)),i=(a,h,e)=>h.has(a)?$s("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(a):h.set(a,e),r=(a,h,e,s)=>(zs(a,h,"write to private field"),s?s.call(a,e):h.set(a,e),e),o=(a,h,e)=>(zs(a,h,"access private method"),e);var _s=(a,h,e)=>pi(ai(a),e,h);var Ws=(a,h,e)=>new Promise((s,n)=>{var u=v=>{try{y(e.next(v))}catch(le){n(le)}},g=v=>{try{y(e.throw(v))}catch(le){n(le)}},y=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);y((e=e.apply(a,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("../Store-Cd1GlEmZ.cjs"),K=require("../index-DekP7OZe.cjs"),fi=require("../easings-GegIwET5.cjs"),bi=require("../element-yhcBhsho.cjs"),tt=require("../events-KVanG9sR.cjs"),ws=require("../function-MthRj-GJ.cjs"),et=require("../layout-Ctc2p3uz.cjs"),Ts=require("../math-GDWEqu7y.cjs"),Us=require("../number-ChAm68cm.cjs"),Gs=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Me=require("../order/index.cjs"),Zs=require("../Damped-z9Uaw2MJ.cjs"),mi=require("../Tweened-mvHucL4Y.cjs"),vs=require("../DragControls-CfE2oPAi.cjs"),ft=require("../window-resizer/index.cjs"),oe=require("../scroll-entries/index.cjs"),Ns=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),gi=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const hs=require("../element-resizer/index.cjs"),yi=require("../gestures-C7gbKx11.cjs"),Ci=require("../dom-JBOkFLTh.cjs");var p,Fe,E,os,ls,de,bt,Dt,Se,pe,is;class vi{constructor(h,e,s){i(this,pe);i(this,p);i(this,Fe);i(this,E);i(this,os,0);i(this,ls,0);i(this,de,0);i(this,bt,0);i(this,Dt,null);i(this,Se,0);r(this,p,h),r(this,Fe,e),r(this,E,s),oe.scrollEntries.register(t(this,p)),this.setIndex(t(this,Fe))}get element(){return t(this,p)}get index(){return t(this,Fe)}get size(){return t(this,de)}get width(){return t(this,os)}get height(){return t(this,ls)}get position(){return t(this,bt)}get transformPosition(){return t(this,Se)}destroy(){oe.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(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,os,t(this,p).offsetWidth),r(this,ls,t(this,p).offsetHeight),r(this,de,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,bt,t(this,E).vertical?et.getCumulativeOffsetTop(t(this,p)):et.getCumulativeOffsetLeft(t(this,p))),r(this,bt,t(this,bt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,bt)+t(this,de)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),oe.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,bt)-t(this,E).viewportSize-s,g=t(this,bt)+t(this,de)+s,y=Us.preciseNumber(Ts.clamp(n,u,g),3);r(this,Se,y*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,Se)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,Se)}px, 0px, 0px)`}setMark(h){t(this,Dt)!==h&&(t(this,Dt)&&t(this,p).classList.remove(t(this,Dt)),h&&t(this,p).classList.add(h),r(this,Dt,h),tt.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Dt)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,pe,is).call(this,"index",h)}setCurrentIndex(h){o(this,pe,is).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,pe,is).call(this,"current-index-arc",h)}setCurrentIndexArcAbs(h){o(this,pe,is).call(this,"current-index-arc-abs",h)}}p=new WeakMap,Fe=new WeakMap,E=new WeakMap,os=new WeakMap,ls=new WeakMap,de=new WeakMap,bt=new WeakMap,Dt=new WeakMap,Se=new WeakMap,pe=new WeakSet,is=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const Pi=Gs.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var S,fe,T,qt,mt,gt,yt,st,Bt,$t,Ct,Ht,be,it,V,me,ge,ye,Ce,Te,ve,j,Pe,_t,J,Wt,vt,Ee,Nt,we,Ut,Gt,Zt,f,Oe,W,d,cs,us,L,P,N,rt,Kt,nt,I,O,De,Pt,Et,wt,U,qe,jt,Jt,xe,ht,k,Be,xt,Le,$e,c,Vs,rs,Ie,Ps,Es,ks,Rs,M,as,Ks,He,ds,As,Is,ue,js,Ss,ns,_e;class xs extends HTMLElement{constructor(){super();i(this,c);i(this,S,null);i(this,fe,new l.CSSProperty(this,"--controls",!0));i(this,T,new l.CSSProperty(this,"--axis","y"));i(this,qt,new l.CSSProperty(this,"--reverse",!1));i(this,mt,new l.CSSProperty(this,"--direction",0));i(this,gt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,yt,new l.CSSProperty(this,"--split",!1));i(this,st,new l.CSSProperty(this,"--sectional",!1));i(this,Bt,new l.CSSProperty(this,"--tween-easing",!1));i(this,$t,new l.CSSProperty(this,"--tween-duration",!1));i(this,Ct,new l.CSSProperty(this,"--auto-size",!1));i(this,Ht,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,be,new l.CSSProperty(this,"--drag-inertion",1));i(this,it,new l.CSSProperty(this,"--sections-in-view",1));i(this,V,new l.CSSProperty(this,"--loop",!1));i(this,me,new l.CSSProperty(this,"--damping",20));i(this,ge,new l.CSSProperty(this,"--mass",0));i(this,ye,new l.CSSProperty(this,"--stiffness",0));i(this,Ce,new l.CSSProperty(this,"--mouse-drag",!1));i(this,Te,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,ve,new l.CSSProperty(this,"--start-section",0));i(this,j,new l.CSSProperty(this,"--autoplay",0));i(this,Pe,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,_t,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,J,new l.CSSProperty(this,"--classes",!1));i(this,Wt,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,vt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,Ee,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Nt,new l.CSSProperty(this,"--focus-delay",0));i(this,we,new l.CSSProperty(this,"--focus-duration",3e3));i(this,Ut,new l.CSSProperty(this,"--disabled",!1));i(this,Gt,new l.CSSProperty(this,"--hibernate",!1));i(this,Zt,null);i(this,f,null);i(this,Oe,null);i(this,W,[]);i(this,d,[]);i(this,cs,0);i(this,us,0);i(this,L,0);i(this,P,0);i(this,N,0);i(this,rt,null);i(this,Kt,null);i(this,nt,null);i(this,I,null);i(this,O,new ce.Store(0));i(this,De,0);i(this,Pt,0);i(this,Et,!1);i(this,wt,!0);i(this,U,!0);i(this,qe);i(this,jt);i(this,Jt,new mi.Tweened);i(this,xe,!1);i(this,ht,null);i(this,k,!1);i(this,Be,null);i(this,xt,[]);i(this,Le,!1);i(this,$e);i(this,M,e=>{if(e&&t(this,Le)){r(this,Le,!1);return}this.resize()});i(this,as,()=>{if(!t(this,Et)||t(this,U)||t(this,wt))return;const e=this.currentScrollValue;if(r(this,De,Math.max(0,e-t(this,P))),t(this,d).length){for(let s=0;s<t(this,W).length;s++)t(this,W)[s].transform();t(this,O).current=o(this,c,ns).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,js).call(this),oe.scrollEntries.update(this,t(this,T).current,e)});i(this,He,(e,s)=>{t(this,fe).current&&(o(this,c,As).call(this,Math.sign(s)||1),t(this,ds).call(this,e,s))});i(this,ds,(e,s)=>{if(!t(this,jt)){if(t(this,mt).current){if(t(this,mt).current<0&&s>0)return;if(t(this,mt).current>0&&s<0)return}if(!t(this,j).current&&t(this,Nt).current&&(clearInterval(t(this,qe)),r(this,qe,setTimeout(()=>{const n=t(this,d)[o(this,c,ns).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,we).current,easing:fi.easeInOutExpo}})},t(this,Nt).current))),!(e.includes("drag")&&!gi.device.isTouch&&!t(this,Ce).current)){if(t(this,st).current&&e!=="drag"){const n=Math.sign(s);if(t(this,d).length){const u={tween:t(this,Bt).current||t(this,$t).current?{easing:t(this,Bt).current||"easeInOutCubic",duration:t(this,$t).current||500}:void 0};t(this,xe)?this.scrollToSection(o(this,c,ns).call(this,!0),u):this.shiftSections(n,u)}else t(this,S).shift(n*t(this,L))}else t(this,S).shift(s);r(this,xe,e==="drag")}}});i(this,Ss,ws.debounce(()=>{const e=t(this,xt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,$e)),r(this,Le,!0),this.style.setProperty("--max-section-size",""),r(this,$e,setTimeout(()=>{r(this,Le,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,_e,()=>{r(this,k,!0),this.hibernatedCSSProperty.current||o(this,c,Rs).call(this),hs.elementResizer.subscribe(this,t(this,M)),ft.windowResizer.unsubscribe(t(this,_e))});if(K.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Pi];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Zt,document.createElement("div")),t(this,Zt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Oe,document.createElement("slot")),t(this,f).appendChild(t(this,Oe)),t(this,Zt).appendChild(t(this,f)),e.appendChild(t(this,Zt)),r(this,Be,new MutationObserver(ws.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,S)}get controlsCSSProperty(){return t(this,fe)}get axisCSSProperty(){return t(this,T)}get reverseCSSProperty(){return t(this,qt)}get directionCSSProperty(){return t(this,mt)}get pagesCSSProperty(){return t(this,gt)}get splitCSSProperty(){return t(this,yt)}get sectionalCSSProperty(){return t(this,st)}get easingCSSProperty(){return t(this,Bt)}get durationCSSProperty(){return t(this,$t)}get autoSizeCSSProperty(){return t(this,Ct)}get wheelMaxDeltaCSSProperty(){return t(this,Ht)}get dragInertionCSSProperty(){return t(this,be)}get sectionsInViewCSSProperty(){return t(this,it)}get loopCSSProperty(){return t(this,V)}get dampingCSSProperty(){return t(this,me)}get massCSSProperty(){return t(this,ge)}get stiffnessCSSProperty(){return t(this,ye)}get mouseDragCSSProperty(){return t(this,Ce)}get sectionDistanceScaleCSSProperty(){return t(this,Te)}get startSectionCSSProperty(){return t(this,ve)}get autoplayCSSProperty(){return t(this,j)}get autoplayPauseDurationCSSProperty(){return t(this,Pe)}get autoplayUserDirectionCSSProperty(){return t(this,_t)}get classesCSSProperty(){return t(this,J)}get currentIndexStartOffsetCSSProperty(){return t(this,Wt)}get currentIndexEndOffsetCSSProperty(){return t(this,vt)}get shiftSectionPositionCSSProperty(){return t(this,Ee)}get focusDelayCSSProperty(){return t(this,Nt)}get focusDurationCSSProperty(){return t(this,we)}get disabledCSSProperty(){return t(this,Ut)}get hibernatedCSSProperty(){return t(this,Gt)}get currentScrollValue(){return o(this,c,Is).call(this,"current")}get targetScrollValue(){return o(this,c,Is).call(this,"target")}get contentWrapperElement(){return t(this,Zt)}get contentElement(){return t(this,f)}get sections(){return t(this,W)}get visibleSections(){return t(this,d)}get position(){return t(this,cs)}get contentPosition(){return t(this,us)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,N)}get counter(){return t(this,O)}get limit(){return Math.ceil(t(this,d).length-t(this,it).current)}get distance(){return t(this,Pt)}get loopDistance(){return t(this,V).current?t(this,Pt)+t(this,N):t(this,Pt)}get hasOverflow(){return t(this,Et)}get overscroll(){return t(this,De)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,T).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,T).current==="y"?0:t(this,S).distance}get scrollHeight(){return t(this,T).current==="x"?0:t(this,S).distance}tryResplit(){!t(this,U)&&(t(this,V).current||t(this,yt).current||t(this,V).current||t(this,Ct).current||t(this,st).current)&&o(this,c,rs).call(this)}onScroll(...e){return t(this,S).subscribe(...e)}offScroll(...e){t(this,S).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,d).length||t(this,U))return;const n=t(this,O).current,u=o(this,c,Ks).call(this,e),g=t(this,d)[n],y=t(this,d)[u];if(g&&y){let v=0;const le=o(this,c,ns).call(this),Ae=t(this,d)[le];let ss=Ae?this.targetScrollValue-Ae.position:0;t(this,V).current?u===0&&n===t(this,d).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,N),t(this,xe)||(ss=0)):u===t(this,d).length-1&&n===0?v=y.position-(t(this,P)+t(this,L)+t(this,N)):v=y.position-g.position:v=y.position-g.position,this.shiftPosition(v-ss,s)}}shiftSections(e,s){t(this,d).length&&this.scrollToSection(t(this,O).current+e,s)}setPosition(e,s){t(this,U)||(o(this,c,As).call(this,Math.sign(e)||1),s!=null&&s.tween?(clearTimeout(t(this,jt)),t(this,Jt).set(t(this,S).current,{equalize:!0}),t(this,Jt).set(Math.min(e,this.distance),Hs({},s.tween)),r(this,jt,setTimeout(()=>{r(this,jt,void 0)},s.tween.duration||0))):t(this,S).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,S).target+e,s)}resize(){if(t(this,Gt).current)return;r(this,d,t(this,W).filter(n=>bi.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,d).length.toString()),t(this,S).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,O).current;if(r(this,cs,this.vertical?et.getCumulativeOffsetTop(this):et.getCumulativeOffsetLeft(this)),r(this,us,this.vertical?et.getCumulativeOffsetTop(t(this,f)):et.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,N,Ns.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,N,Ns.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,Ct).current&&t(this,d).length){const n=t(this,it).current,u=(t(this,L)-t(this,N)*(n-1))/n;t(this,d).forEach(g=>{g.setSize(u)})}else t(this,d).forEach(n=>{n.setSize()});if(t(this,d).forEach(n=>{n.resize()}),t(this,gt).current){r(this,P,t(this,L)*t(this,gt).current);const n=t(this,P)+t(this,L);this.vertical?(t(this,f).style.width=n+"px",t(this,f).style.height="100%"):(t(this,f).style.height=n+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,V).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,S).max=t(this,P)}if(t(this,V).current&&t(this,d).length){const n=t(this,d)[t(this,d).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Pt,n.position+n.size+g)}else r(this,Pt,t(this,P));if(t(this,st).current&&t(this,d).length){const n=t(this,d)[s];t(this,S).set(n.position,{equalize:!0})}else t(this,S).set(e*t(this,P),{equalize:!0});r(this,Et,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,Et)),t(this,Et)?t(this,Ut).current||o(this,c,Es).call(this):o(this,c,Ps).call(this),t(this,Ss).call(this),tt.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,S).notify()}connectedCallback(){oe.scrollEntries.register(this),r(this,S,new Zs.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new vs.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,He)),r(this,Kt,new vs.KeyboardControls({element:this})),t(this,Kt).changeEvent.subscribe(t(this,He)),r(this,nt,new vs.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,He)),r(this,I,new vs.AutoplayControls({culling:this})),t(this,I).changeEvent.subscribe(t(this,ds)),t(this,T).subscribe(()=>{o(this,c,Vs).call(this)}),t(this,qt).subscribe(()=>{o(this,c,Vs).call(this)}),t(this,Ht).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,T).current}),t(this,be).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,gt).subscribe(()=>{t(this,k)&&t(this,M).call(this)}),t(this,yt).subscribe(({current:e})=>{t(this,k)&&(e?o(this,c,rs).call(this):o(this,c,Ie).call(this))}),t(this,st).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,I).interval=e.current,t(this,k)&&(e.current&&!e.previous&&!t(this,d).length?o(this,c,rs).call(this):!e.current&&e.previous&&t(this,d).length&&o(this,c,Ie).call(this))}),t(this,Ct).subscribe(e=>{t(this,k)&&(t(this,M).call(this),e.current&&!e.previous&&!t(this,d).length?o(this,c,rs).call(this):!e.current&&e.previous&&t(this,d).length&&o(this,c,Ie).call(this))}),t(this,it).subscribe(e=>{t(this,k)&&(t(this,M).call(this),o(this,c,ue).call(this))}),t(this,V).subscribe(e=>{e.current?(t(this,k)&&(t(this,d).length||(t(this,yt).current=!0)),t(this,S).max=1/0,t(this,S).min=-1/0):(r(this,De,0),t(this,S).max=t(this,P),t(this,S).min=0)}),t(this,me).subscribe(e=>{t(this,S).damping=e.current}),t(this,ge).subscribe(e=>{t(this,S).mass=e.current}),t(this,ye).subscribe(e=>{t(this,S).stiffness=e.current}),t(this,j).subscribe(e=>{t(this,I).speed=e.current,!t(this,wt)&&e.current&&!e.previous?t(this,I).connect():!e.current&&e.previous&&t(this,I).disconnect()}),t(this,_t).subscribe(e=>{e.current||(t(this,I).direction=1)}),t(this,J).subscribe(e=>{t(this,k)&&o(this,c,ue).call(this)}),t(this,Wt).subscribe(e=>{t(this,k)&&t(this,J).current&&o(this,c,ue).call(this)}),t(this,vt).subscribe(e=>{t(this,k)&&t(this,J).current&&o(this,c,ue).call(this)}),t(this,Ee).subscribe(e=>{t(this,k)&&t(this,S).notify()}),t(this,S).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,O).subscribe(e=>{t(this,U)||(t(this,d).length&&o(this,c,ue).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,Jt).subscribe(e=>{t(this,Jt).isRunning.current&&t(this,S).set(e.current,{equalize:!0})}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,Ps).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,Es).call(this))}),t(this,Gt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,ks).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Rs).call(this))}),t(this,fe).observe(),t(this,T).observe(),t(this,qt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,yt).observe(),t(this,st).observe(),t(this,Bt).observe(),t(this,$t).observe(),t(this,Ct).observe(),t(this,Ht).observe(),t(this,be).observe(),t(this,it).observe(),t(this,V).observe(),t(this,me).observe(),t(this,ge).observe(),t(this,ye).observe(),t(this,Ce).observe(),t(this,Te).observe(),t(this,ve).observe(),t(this,j).observe(),t(this,j).observe(),t(this,Pe).observe(),t(this,_t).observe(),t(this,J).observe(),t(this,Wt).observe(),t(this,vt).observe(),t(this,Ee).observe(),t(this,Nt).observe(),t(this,we).observe(),t(this,Ut).observe(),t(this,Gt).observe(),ft.windowResizer.subscribe(t(this,_e),Me.RESIZE_ORDER.LAST),t(this,Be).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,fe).unobserve(),t(this,T).unobserve(),t(this,qt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,yt).unobserve(),t(this,st).unobserve(),t(this,Bt).unobserve(),t(this,$t).unobserve(),t(this,Ct).unobserve(),t(this,Ht).unobserve(),t(this,be).unobserve(),t(this,it).unobserve(),t(this,V).unobserve(),t(this,me).unobserve(),t(this,ge).unobserve(),t(this,ye).unobserve(),t(this,Ce).unobserve(),t(this,Te).unobserve(),t(this,ve).unobserve(),t(this,j).unobserve(),t(this,Pe).unobserve(),t(this,_t).unobserve(),t(this,J).unobserve(),t(this,Wt).unobserve(),t(this,vt).unobserve(),t(this,Ee).unobserve(),t(this,Nt).unobserve(),t(this,we).unobserve(),t(this,Ut).unobserve(),t(this,Gt).unobserve(),ft.windowResizer.unsubscribe(t(this,_e)),ft.windowResizer.unsubscribe(t(this,M)),hs.elementResizer.unsubscribe(t(this,M)),o(this,c,ks).call(this),t(this,Be).disconnect()}}S=new WeakMap,fe=new WeakMap,T=new WeakMap,qt=new WeakMap,mt=new WeakMap,gt=new WeakMap,yt=new WeakMap,st=new WeakMap,Bt=new WeakMap,$t=new WeakMap,Ct=new WeakMap,Ht=new WeakMap,be=new WeakMap,it=new WeakMap,V=new WeakMap,me=new WeakMap,ge=new WeakMap,ye=new WeakMap,Ce=new WeakMap,Te=new WeakMap,ve=new WeakMap,j=new WeakMap,Pe=new WeakMap,_t=new WeakMap,J=new WeakMap,Wt=new WeakMap,vt=new WeakMap,Ee=new WeakMap,Nt=new WeakMap,we=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,f=new WeakMap,Oe=new WeakMap,W=new WeakMap,d=new WeakMap,cs=new WeakMap,us=new WeakMap,L=new WeakMap,P=new WeakMap,N=new WeakMap,rt=new WeakMap,Kt=new WeakMap,nt=new WeakMap,I=new WeakMap,O=new WeakMap,De=new WeakMap,Pt=new WeakMap,Et=new WeakMap,wt=new WeakMap,U=new WeakMap,qe=new WeakMap,jt=new WeakMap,Jt=new WeakMap,xe=new WeakMap,ht=new WeakMap,k=new WeakMap,Be=new WeakMap,xt=new WeakMap,Le=new WeakMap,$e=new WeakMap,c=new WeakSet,Vs=function(){const e=t(this,T).current,s=t(this,qt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,Ht).current?"max":e,t(this,Kt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,k)&&t(this,M).call(this)},rs=function(){o(this,c,Ie).call(this),t(this,Oe).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,W).push(new vi(e,s,this))}),r(this,d,[...t(this,W)]),t(this,f).style.transform="",tt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,M).call(this),o(this,c,ue).call(this)},Ie=function(){t(this,W).forEach(e=>{e.destroy()}),r(this,W,[]),r(this,d,[]),t(this,O).reset(),t(this,S).reset(),this.style.removeProperty("--max-section-size"),tt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ps=function(){t(this,wt)||(r(this,wt,!0),t(this,S).unsubscribe(t(this,as)),t(this,S).unlistenAnimationFrame(),clearInterval(t(this,qe)),clearInterval(t(this,jt)),t(this,Jt).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Kt).disconnect(),t(this,nt).disconnect(),t(this,I).disconnect(),t(this,Et)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,M).call(this)))},Es=function(){t(this,wt)&&(r(this,wt,!1),t(this,S).subscribe(t(this,as),-1e4),t(this,S).notify(),t(this,rt).connect(),t(this,Kt).connect(),t(this,nt).connect(),t(this,j).current&&t(this,I).connect())},ks=function(){t(this,U)||(r(this,U,!0),clearTimeout(t(this,$e)),ft.windowResizer.unsubscribe(t(this,M)),o(this,c,Ps).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,W).length?o(this,c,Ie).call(this):(t(this,O).reset(),t(this,S).reset()),oe.scrollEntries.unregister(this))},Rs=function(){t(this,U)&&(r(this,U,!1),oe.scrollEntries.register(this),this.tryResplit(),o(this,c,Es).call(this),this.scrollToSection(t(this,ve).current,{behaviour:"instant"}),ft.windowResizer.subscribe(t(this,M),Me.RESIZE_ORDER.SCROLL))},M=new WeakMap,as=new WeakMap,Ks=function(e){let s=t(this,O).current;return t(this,V).current?s=Us.loopNumber(e,t(this,d).length):s=Ts.clamp(e,0,this.limit),s},He=new WeakMap,ds=new WeakMap,As=function(e=1){t(this,_t).current&&(t(this,I).direction=e),t(this,j).current&&t(this,I).pauseAndContinue(t(this,Pe).current,this.sectionalCSSProperty.current)},Is=function(e="current"){if(t(this,V).current&&t(this,d).length){const s=t(this,S)[e]%Math.round(t(this,P)+t(this,L)+t(this,N));return s<0?t(this,P)+s+t(this,L)+t(this,N):s}else return t(this,S)[e]},ue=function(){if(t(this,d).length){const e=t(this,O).current+t(this,Wt).current;if(e===0?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),tt.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,J).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,it).current+t(this,vt).current;r(this,xt,[]),t(this,d).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,vt).current,y=e+s,v=this.sections.length-y;u>=e&&u<y||u<=g?(n.setMark("current"),t(this,xt).push(n)):u>=y&&u<y+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,Ss).call(this)}}},js=function(){if(t(this,J).current){const e=Math.floor(t(this,xt).length/2);t(this,xt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,xt).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)})}},Ss=new WeakMap,ns=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,S).direction;for(let y=0;y<t(this,d).length;y++){const v=t(this,d)[y];let le=t(this,xe)?v.size*g*-1*.4:0,Ae=v.position;this.overscroll&&Ae===0&&e&&(Ae=t(this,Pt));let ss=Math.abs(Ae+le-s);ss<=n&&(n=ss,u=y)}return u},_e=new WeakMap;K.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",xs);var ps;class Cs extends HTMLElement{constructor(){super(...arguments);i(this,ps,null)}get scrollElement(){return t(this,ps)}connectedCallback(){const e=Ci.findParentElement(this,xs);e instanceof xs?r(this,ps,e):console.error(this,"e-scroll not found")}}ps=new WeakMap;var Qt,D,Lt,zt,We,Ne,Xt,Ue,fs,bs;class Js extends Cs{constructor(){super();i(this,Qt,null);i(this,D,null);i(this,Lt,!1);i(this,zt,0);i(this,We,0);i(this,Ne,0);i(this,Xt,()=>{r(this,Lt,this.offsetWidth>this.offsetHeight);const e=t(this,Lt)?this.offsetWidth:this.offsetHeight;r(this,zt,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,zt,Math.max(t(this,zt),30)),t(this,Lt)?(t(this,D).style.width=t(this,zt)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,zt)+"px"),r(this,We,e-t(this,zt)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ue).call(this)});i(this,Ue,()=>{r(this,Ne,this.scrollElement.currentProgress*t(this,We)),t(this,Lt)?t(this,D).style.transform=`translate3d(${t(this,Ne)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,Ne)}px, 0px)`});i(this,fs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,bs,e=>{document.documentElement.classList.add("grabbing"),yi.setupDrag(u=>{const g=t(this,Lt)?u.x:u.y,y=this.scrollElement.distance/t(this,We),v=(g-n)*y;this.scrollElement.setPosition(s+v)},()=>{document.documentElement.classList.remove("grabbing")});const s=this.scrollElement.damped.target,n=t(this,Lt)?e.x:e.y});if(K.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Gs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],r(this,Qt,document.createElement("slot")),t(this,Qt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Qt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Qt).assignedElements()[0]||t(this,Qt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,bs)),ft.windowResizer.subscribe(t(this,Xt),Me.RESIZE_ORDER.SCROLL),hs.elementResizer.subscribe(this,t(this,Xt)),hs.elementResizer.subscribe(this.scrollElement,t(this,Xt)),this.scrollElement.onScroll(t(this,Ue)),this.scrollElement.axisCSSProperty.subscribe(t(this,fs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,bs)),ft.windowResizer.unsubscribe(t(this,Xt)),hs.elementResizer.unsubscribe(t(this,Xt)),this.scrollElement.offScroll(t(this,Ue)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,fs))}}Qt=new WeakMap,D=new WeakMap,Lt=new WeakMap,zt=new WeakMap,We=new WeakMap,Ne=new WeakMap,Xt=new WeakMap,Ue=new WeakMap,fs=new WeakMap,bs=new WeakMap;K.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Js);var Ge,Ze,Ke;class Os extends Cs{constructor(){super();i(this,Ge,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Ze,new l.CSSProperty(this,"--tween-easing",!1));i(this,Ke,new l.CSSProperty(this,"--tween-duration",0));K.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Ge).current,s=t(this,Ze).current,n=t(this,Ke).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,Ge).observe(),t(this,Ze).observe(),t(this,Ke).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,Ge).close(),t(this,Ze).close(),t(this,Ke).close()}}Ge=new WeakMap,Ze=new WeakMap,Ke=new WeakMap;var je;class Qs extends Os{constructor(){super(...arguments);i(this,je,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,je).current,e)}connectedCallback(){super.connectedCallback(),t(this,je).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,je).close()}}je=new WeakMap;K.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Qs);var Vt,Je;class Xs extends Os{constructor(){super(...arguments);i(this,Vt,new l.CSSProperty(this,"--step",1));i(this,Je,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Vt).current>0&&this.scrollElement.scrollLine==="end"||t(this,Vt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Vt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Vt).subscribe(()=>{t(this,Je).call(this)}),t(this,Vt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Je)),t(this,Je).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Vt).close(),this.removeAttribute("disabled")}}Vt=new WeakMap,Je=new WeakMap;K.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Xs);var ot,Yt,Qe,ms,gs,Xe;class Ei{constructor(h,e,s){i(this,ot,null);i(this,Yt,null);i(this,Qe,null);i(this,ms,null);i(this,gs,()=>{t(this,Yt).scrollToSection(t(this,Qe),{behaviour:t(this,ms)})});i(this,Xe,()=>{t(this,ot).classList.toggle("current",t(this,Yt).counter.current===t(this,Qe))});K.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,Yt,h),r(this,ms,s),r(this,Qe,e),t(this,ot).addEventListener("click",t(this,gs)),t(this,Yt).counter.subscribe(t(this,Xe)),t(this,Xe).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,gs)),t(this,Yt).counter.unsubscribe(t(this,Xe)),t(this,ot).remove()}}ot=new WeakMap,Yt=new WeakMap,Qe=new WeakMap,ms=new WeakMap,gs=new WeakMap,Xe=new WeakMap;var ze,te,lt;class Ys extends Cs{constructor(){super(...arguments);i(this,ze,null);i(this,te,[]);i(this,lt,ws.debounce(()=>{t(this,te).forEach(s=>s.destroy()),r(this,te,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new Ei(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ze).appendChild(n.element),t(this,te).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",r(this,ze,document.createElement("div")),this.appendChild(t(this,ze)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,lt)),this.scrollElement.loopCSSProperty.subscribe(t(this,lt)),t(this,lt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,lt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,lt)),t(this,te).forEach(e=>e.destroy()),r(this,te,[]),t(this,ze).remove()}}ze=new WeakMap,te=new WeakMap,lt=new WeakMap;K.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Ys);var ee,se,ie,re,kt,Rt,At,It,R,q,B,$,Mt,z,ct,ut,Q,Ft,Ve,at,dt,St,w,H,_,X,Y,G,Ye,m,Tt,ne,ts,x,pt,F,A,Z,ke,Ot,C,he,b,ei,si,ii,ri,ni,hi,es,Re,Ms,ae,oi,li,Fs;class ti extends Cs{constructor(){super(...arguments);i(this,b);i(this,ee);i(this,se);i(this,ie);i(this,re);i(this,kt);i(this,Rt);i(this,At);i(this,It);i(this,R);i(this,q);i(this,B);i(this,$);i(this,Mt);i(this,z);i(this,ct);i(this,ut);i(this,Q);i(this,Ft);i(this,Ve);i(this,at);i(this,dt);i(this,St);i(this,w);i(this,H);i(this,_);i(this,X);i(this,Y);i(this,G);i(this,Ye);i(this,m);i(this,Tt);i(this,ne);i(this,ts);i(this,x);i(this,pt);i(this,F);i(this,A);i(this,Z);i(this,ke);i(this,Ot);i(this,C);i(this,he);i(this,es);i(this,Re);r(this,ee,new l.CSSProperty(this,"--damping",20)),r(this,se,new l.CSSProperty(this,"--mass",0)),r(this,ie,new l.CSSProperty(this,"--stiffness",0)),r(this,re,new l.CSSProperty(this,"--target","")),r(this,kt,new l.CSSProperty(this,"--disabled",!1)),r(this,Rt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,At,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,It,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,Mt,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,ct,new l.CSSProperty(this,"--passed-var","")),r(this,ut,new l.CSSProperty(this,"--progress-var","")),r(this,Q,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Ft,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,Ve,new l.CSSProperty(this,"--animation-var-type","target")),r(this,at,new l.CSSProperty(this,"--distance-var","")),r(this,dt,new l.CSSProperty(this,"--start-var","")),r(this,St,new l.CSSProperty(this,"--finish-var","")),r(this,w,new ce.Store(!1)),r(this,H,new ce.Store(!1)),r(this,_,new ce.Store(!1)),r(this,X,new ce.Store(!1)),r(this,Y,new ce.Store(!1)),r(this,G,new ce.Store(!1)),r(this,Ye,[]),r(this,m,this),r(this,Tt,0),r(this,ne,0),r(this,ts,0),r(this,x,new Zs.Damped(0,{order:Me.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,pt,0),r(this,F,0),r(this,A,0),r(this,Z,0),r(this,ke,!1),r(this,Ot,!1),r(this,C,!0),r(this,he,!1),this.resize=()=>{r(this,ne,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Tt,this.scrollElement.vertical?et.getCumulativeOffsetTop(this,this.scrollElement):et.getCumulativeOffsetLeft(this,this.scrollElement));const e=et.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,Tt,t(this,Tt)-e),r(this,F,this.getStart()),r(this,A,this.getDistance()),r(this,F,t(this,F)+t(this,At).current),r(this,A,t(this,A)+t(this,Rt).current),r(this,Z,t(this,F)+t(this,A)),this.scrollElement.currentScrollValue>t(this,Z)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,dt).current,t(this,F)),this.setVar(t(this,St).current,t(this,Z)),this.setVar(t(this,at).current,t(this,A)),t(this,x).max=t(this,A),r(this,ke,!0),t(this,Re).call(this)},this.findAnotherScrollEntries=ws.debounce(()=>{const e=oe.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,Ye,e.slice(s+1)),this.tick()},0),r(this,es,()=>{t(this,C)||this.resize()}),r(this,Re,()=>{!t(this,C)&&t(this,ke)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,Rt)}get startOffsetCSSProperty(){return t(this,At)}get captureOnceCSSProperty(){return t(this,It)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,Mt)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,ct)}get progressVarCSSProperty(){return t(this,ut)}get progressArcVarCSSProperty(){return t(this,Q)}get progressArcMultCSSProperty(){return t(this,Ft)}get animationVarTypeCSSProperty(){return t(this,Ve)}get distanceVarCSSProperty(){return t(this,at)}get startVarCSSProperty(){return t(this,dt)}get finishVarCSSProperty(){return t(this,St)}get disabledCSSProperty(){return t(this,kt)}get dampingCSSProperty(){return t(this,ee)}get massCSSProperty(){return t(this,se)}get stiffnessCSSProperty(){return t(this,ie)}get targetCSSProperty(){return t(this,re)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,_)}get isReleasedFromStart(){return t(this,X)}get isCapturedFromFinish(){return t(this,Y)}get isReleasedFromFinish(){return t(this,G)}get directionPosition(){return t(this,Tt)}get directionSize(){return t(this,ne)}get passed(){return t(this,x)}get progress(){return t(this,pt)}get progressArc(){return Math.abs(Math.cos(t(this,pt)*Math.PI))*t(this,Ft).current}get start(){return t(this,F)}get finish(){return t(this,Z)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Ot)}get isDisabled(){return t(this,C)}tick(){let e=this.scrollElement.currentScrollValue;t(this,Ye).forEach(u=>{e+=u.value});const s=e-t(this,F);t(this,he)||r(this,he,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,F)?t(this,_).current||o(this,b,ii).call(this):t(this,_).current&&!t(this,X).current&&o(this,b,ni).call(this),n<t(this,Z)?t(this,G).current&&!t(this,Y).current&&o(this,b,ri).call(this):t(this,_).current&&!t(this,G).current&&o(this,b,hi).call(this)),n>=t(this,F)&&n<t(this,Z)?t(this,w).current||o(this,b,ei).call(this):t(this,w).current&&(t(this,x).set(Ts.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,si).call(this)),t(this,Ot)&&t(this,It).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,C,!0))}disable(){this.style.cssText="",r(this,Tt,0),r(this,ne,0),t(this,x).reset(),r(this,pt,0),r(this,F,0),r(this,A,0),r(this,Z,0),r(this,ke,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,_).current=!1,t(this,X).current=!1,t(this,Y).current=!1,t(this,G).current=!1,r(this,Ot,!1),r(this,C,!0),o(this,b,Fs).call(this)}enable(){r(this,C,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,_).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,Y).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,X).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,G).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,ee).observe(),t(this,se).observe(),t(this,ie).observe(),t(this,re).observe(),t(this,kt).observe(),t(this,Rt).observe(),t(this,At).observe(),t(this,It).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,Mt).observe(),t(this,z).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,Q).observe(),t(this,Ft).observe(),t(this,Ve).observe(),t(this,at).observe(),t(this,dt).observe(),t(this,St).observe();let e=!1;this.findAnotherScrollEntries(),t(this,kt).current||this.enable(),t(this,ee).subscribe(s=>{t(this,x).damping=s.current}),t(this,se).subscribe(s=>{t(this,x).mass=s.current}),t(this,ie).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,re).subscribe(s=>{s.previous&&o(this,b,Fs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,kt).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,At).subscribe(()=>{e&&!t(this,C)&&this.resize()}),t(this,Rt).subscribe(()=>{e&&!t(this,C)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,Mt).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,It).subscribe(s=>{t(this,C)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,ct).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ut).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,pt)))}),t(this,Q).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Ft).subscribe(s=>{t(this,C)||o(this,b,Ms).call(this)}),t(this,dt).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,F)))}),t(this,St).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,Z)))}),t(this,at).subscribe(s=>{t(this,C)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,he)){r(this,he,!1);return}o(this,b,Ms).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),ft.windowResizer.subscribe(t(this,es),Me.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Re)),e=!0}disconnectedCallback(){ft.windowResizer.unsubscribe(t(this,es)),this.scrollElement.offScroll(t(this,Re)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,ee).close(),t(this,se).close(),t(this,ie).close(),t(this,re).close(),t(this,kt).close(),t(this,Rt).close(),t(this,At).close(),t(this,It).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,Mt).close(),t(this,z).close(),t(this,ct).close(),t(this,ut).close(),t(this,Q).close(),t(this,Ft).close(),t(this,at).close(),t(this,dt).close(),t(this,St).close(),t(this,w).close(),t(this,H).close(),t(this,_).close(),t(this,X).close(),t(this,Y).close(),t(this,G).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,ne)+t(this,ts)}getStart(){return t(this,Tt)-t(this,ts)}}ee=new WeakMap,se=new WeakMap,ie=new WeakMap,re=new WeakMap,kt=new WeakMap,Rt=new WeakMap,At=new WeakMap,It=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,Mt=new WeakMap,z=new WeakMap,ct=new WeakMap,ut=new WeakMap,Q=new WeakMap,Ft=new WeakMap,Ve=new WeakMap,at=new WeakMap,dt=new WeakMap,St=new WeakMap,w=new WeakMap,H=new WeakMap,_=new WeakMap,X=new WeakMap,Y=new WeakMap,G=new WeakMap,Ye=new WeakMap,m=new WeakMap,Tt=new WeakMap,ne=new WeakMap,ts=new WeakMap,x=new WeakMap,pt=new WeakMap,F=new WeakMap,A=new WeakMap,Z=new WeakMap,ke=new WeakMap,Ot=new WeakMap,C=new WeakMap,he=new WeakMap,b=new WeakSet,ei=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Ot,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},si=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Ot,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},ii=function(){t(this,w).current=!0,t(this,_).current=!0,t(this,X).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},ri=function(){t(this,w).current=!0,t(this,Y).current=!0,t(this,G).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},ni=function(){t(this,H).current=!0,t(this,X).current=!0,t(this,_).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},hi=function(){t(this,H).current=!0,t(this,G).current=!0,t(this,Y).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},es=new WeakMap,Re=new WeakMap,Ms=function(){const e=t(this,x)[t(this,Ve).current];this.setVar(t(this,ct).current,e),r(this,pt,e/t(this,A)||0),this.setVar(t(this,ut).current,t(this,pt)),t(this,Q).current&&this.setVar(t(this,Q).current,this.progressArc)},ae=function(e){if(t(this,C)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},oi=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},li=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},Fs=function(){o(this,b,oi).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,Mt).current,t(this,z).current),o(this,b,li).call(this,t(this,ct).current,t(this,ut).current,t(this,Q).current,t(this,at).current,t(this,dt).current,t(this,St).current)};K.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ti);class ci extends Os{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?et.getCumulativeOffsetTop(this):et.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}K.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",ci);var ys;const Ds=class Ds extends Cs{constructor(){super(...arguments);i(this,ys,()=>{const e=this.scrollElement.counter.current+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return Ws(this,null,function*(){_s(Ds.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,ys))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,ys))}};ys=new WeakMap;let Ls=Ds;K.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Ls);exports.ScrollBulletButtonsElement=Ys;exports.ScrollCounterElement=Ls;exports.ScrollElement=xs;exports.ScrollSectionButtonElement=ci;exports.ScrollSegmentElement=ti;exports.ScrollSetButtonElement=Qs;exports.ScrollStepButtonElement=Xs;exports.ScrollbarElement=Js;
|
|
1
|
+
"use strict";var Si=Object.defineProperty;var _s=Object.getOwnPropertySymbols,pi=Object.getPrototypeOf,fi=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,mi=Reflect.get;var Us=a=>{throw TypeError(a)};var Ns=(a,h,e)=>h in a?Si(a,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[h]=e,Gs=(a,h)=>{for(var e in h||(h={}))fi.call(h,e)&&Ns(a,e,h[e]);if(_s)for(var e of _s(h))bi.call(h,e)&&Ns(a,e,h[e]);return a};var Vs=(a,h,e)=>h.has(a)||Us("Cannot "+e);var t=(a,h,e)=>(Vs(a,h,"read from private field"),e?e.call(a):h.get(a)),i=(a,h,e)=>h.has(a)?Us("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(a):h.set(a,e),r=(a,h,e,s)=>(Vs(a,h,"write to private field"),s?s.call(a,e):h.set(a,e),e),o=(a,h,e)=>(Vs(a,h,"access private method"),e);var Rs=(a,h,e)=>mi(pi(a),e,h);var As=(a,h,e)=>new Promise((s,n)=>{var u=v=>{try{C(e.next(v))}catch(le){n(le)}},g=v=>{try{C(e.throw(v))}catch(le){n(le)}},C=v=>v.done?s(v.value):Promise.resolve(v.value).then(u,g);C((e=e.apply(a,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("../Store-Cd1GlEmZ.cjs"),_=require("../index-DekP7OZe.cjs"),gi=require("../easings-GegIwET5.cjs"),Ci=require("../element-yhcBhsho.cjs"),tt=require("../events-KVanG9sR.cjs"),xs=require("../function-MthRj-GJ.cjs"),et=require("../layout-Ctc2p3uz.cjs"),Bs=require("../math-GDWEqu7y.cjs"),Ks=require("../number-ChAm68cm.cjs"),js=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Me=require("../order/index.cjs"),Js=require("../Damped-z9Uaw2MJ.cjs"),yi=require("../Tweened-mvHucL4Y.cjs"),Ps=require("../DragControls-CfE2oPAi.cjs"),ft=require("../window-resizer/index.cjs"),oe=require("../scroll-entries/index.cjs"),Zs=require("../css-unit-parser/index.cjs"),l=require("../css-property/index.cjs"),vi=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const os=require("../element-resizer/index.cjs"),Pi=require("../gestures-C7gbKx11.cjs"),Ei=require("../dom-JBOkFLTh.cjs");var p,Fe,E,ls,cs,de,bt,Dt,Se,pe,rs;class wi{constructor(h,e,s){i(this,pe);i(this,p);i(this,Fe);i(this,E);i(this,ls,0);i(this,cs,0);i(this,de,0);i(this,bt,0);i(this,Dt,null);i(this,Se,0);r(this,p,h),r(this,Fe,e),r(this,E,s),oe.scrollEntries.register(t(this,p)),this.setIndex(t(this,Fe))}get element(){return t(this,p)}get index(){return t(this,Fe)}get size(){return t(this,de)}get width(){return t(this,ls)}get height(){return t(this,cs)}get position(){return t(this,bt)}get transformPosition(){return t(this,Se)}destroy(){oe.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(h){h?(t(this,p).style.setProperty("--size",h+"px"),t(this,E).axisCSSProperty.current==="x"?(t(this,p).style.width=h+"px",t(this,p).style.height=""):(t(this,p).style.height=h+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){r(this,ls,t(this,p).offsetWidth),r(this,cs,t(this,p).offsetHeight),r(this,de,t(this,E).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),r(this,bt,t(this,E).vertical?et.getCumulativeOffsetTop(t(this,p)):et.getCumulativeOffsetLeft(t(this,p))),r(this,bt,t(this,bt)-t(this,E).contentPosition)}transform(){const h=t(this,E).shiftSectionPositionCSSProperty.current;let e=h;const s=t(this,E).viewportSize*t(this,E).sectionDistanceScaleCSSProperty.current;t(this,E).loopCSSProperty.current&&t(this,bt)+t(this,de)<=t(this,E).currentScrollValue-h/2&&(e=(t(this,E).distance-h)*-1-t(this,E).gap),oe.scrollEntries.update(t(this,p),t(this,E).axisCSSProperty.current,e);const n=t(this,E).currentScrollValue+e,u=t(this,bt)-t(this,E).viewportSize-s,g=t(this,bt)+t(this,de)+s,C=Ks.preciseNumber(Bs.clamp(n,u,g),3);r(this,Se,C*-1),t(this,E).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,Se)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,Se)}px, 0px, 0px)`}setMark(h){t(this,Dt)!==h&&(t(this,Dt)&&t(this,p).classList.remove(t(this,Dt)),h&&t(this,p).classList.add(h),r(this,Dt,h),tt.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Dt)},custom:!0}))}setMiddle(h){t(this,p).classList.toggle("middle",h)}setIndex(h){o(this,pe,rs).call(this,"index",h)}setCurrentIndex(h){o(this,pe,rs).call(this,"current-index",h)}setCurrentIndexArc(h){o(this,pe,rs).call(this,"current-index-arc",h)}setCurrentIndexArcAbs(h){o(this,pe,rs).call(this,"current-index-arc-abs",h)}}p=new WeakMap,Fe=new WeakMap,E=new WeakMap,ls=new WeakMap,cs=new WeakMap,de=new WeakMap,bt=new WeakMap,Dt=new WeakMap,Se=new WeakMap,pe=new WeakSet,rs=function(h,e){e!==null?(t(this,p).style.setProperty(`--${h}`,e.toString()),t(this,p).setAttribute(`data-${h}`,e.toString())):(t(this,p).style.removeProperty(`--${h}`),t(this,p).removeAttribute(`data-${h}`))};const xi=js.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var S,fe,T,qt,mt,gt,Ct,st,Bt,$t,yt,Ht,be,it,k,me,ge,Ce,ye,Te,ve,j,Pe,Wt,J,_t,vt,Ee,Nt,we,Ut,Gt,Zt,f,Oe,N,d,us,as,L,P,U,rt,Kt,nt,I,O,De,Pt,Et,wt,G,qe,jt,Jt,xe,ht,V,Be,xt,Le,$e,c,Is,ns,Ie,Es,ws,Ms,Fs,M,ds,Qs,He,Ss,Ts,Os,ue,Xs,ps,hs,We;class Ls extends HTMLElement{constructor(){super();i(this,c);i(this,S,null);i(this,fe,new l.CSSProperty(this,"--controls",!0));i(this,T,new l.CSSProperty(this,"--axis","y"));i(this,qt,new l.CSSProperty(this,"--reverse",!1));i(this,mt,new l.CSSProperty(this,"--direction",0));i(this,gt,new l.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));i(this,Ct,new l.CSSProperty(this,"--split",!1));i(this,st,new l.CSSProperty(this,"--sectional",!1));i(this,Bt,new l.CSSProperty(this,"--tween-easing",!1));i(this,$t,new l.CSSProperty(this,"--tween-duration",!1));i(this,yt,new l.CSSProperty(this,"--auto-size",!1));i(this,Ht,new l.CSSProperty(this,"--wheel-max-delta",!1));i(this,be,new l.CSSProperty(this,"--drag-inertion",1));i(this,it,new l.CSSProperty(this,"--sections-in-view",1));i(this,k,new l.CSSProperty(this,"--loop",!1));i(this,me,new l.CSSProperty(this,"--damping",20));i(this,ge,new l.CSSProperty(this,"--mass",0));i(this,Ce,new l.CSSProperty(this,"--stiffness",0));i(this,ye,new l.CSSProperty(this,"--mouse-drag",!1));i(this,Te,new l.CSSProperty(this,"--section-distance-scale",.5));i(this,ve,new l.CSSProperty(this,"--start-section",0));i(this,j,new l.CSSProperty(this,"--autoplay",0));i(this,Pe,new l.CSSProperty(this,"--autoplay-pause-duration",0));i(this,Wt,new l.CSSProperty(this,"--autoplay-user-direction",!1));i(this,J,new l.CSSProperty(this,"--classes",!1));i(this,_t,new l.CSSProperty(this,"--current-index-start-offset",0));i(this,vt,new l.CSSProperty(this,"--current-index-end-offset",0));i(this,Ee,new l.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));i(this,Nt,new l.CSSProperty(this,"--focus-delay",0));i(this,we,new l.CSSProperty(this,"--focus-duration",3e3));i(this,Ut,new l.CSSProperty(this,"--disabled",!1));i(this,Gt,new l.CSSProperty(this,"--hibernate",!1));i(this,Zt,null);i(this,f,null);i(this,Oe,null);i(this,N,[]);i(this,d,[]);i(this,us,0);i(this,as,0);i(this,L,0);i(this,P,0);i(this,U,0);i(this,rt,null);i(this,Kt,null);i(this,nt,null);i(this,I,null);i(this,O,new ce.Store(0));i(this,De,0);i(this,Pt,0);i(this,Et,!1);i(this,wt,!0);i(this,G,!0);i(this,qe);i(this,jt);i(this,Jt,new yi.Tweened);i(this,xe,!1);i(this,ht,null);i(this,V,!1);i(this,Be,null);i(this,xt,[]);i(this,Le,!1);i(this,$e);i(this,M,e=>{if(e&&t(this,Le)){r(this,Le,!1);return}this.resize()});i(this,ds,()=>{if(!t(this,Et)||t(this,G)||t(this,wt))return;const e=this.currentScrollValue;if(r(this,De,Math.max(0,e-t(this,P))),t(this,d).length){for(let s=0;s<t(this,N).length;s++)t(this,N)[s].transform();t(this,O).current=o(this,c,hs).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;o(this,c,Xs).call(this),oe.scrollEntries.update(this,t(this,T).current,e)});i(this,He,(e,s)=>{t(this,fe).current&&(o(this,c,Ts).call(this,Math.sign(s)||1),t(this,Ss).call(this,e,s))});i(this,Ss,(e,s)=>{if(!t(this,jt)){if(t(this,mt).current){if(t(this,mt).current<0&&s>0)return;if(t(this,mt).current>0&&s<0)return}if(!t(this,j).current&&t(this,Nt).current&&(clearInterval(t(this,qe)),r(this,qe,setTimeout(()=>{const n=t(this,d)[o(this,c,hs).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,we).current,easing:gi.easeInOutExpo}})},t(this,Nt).current))),!(e.includes("drag")&&!vi.device.isTouch&&!t(this,ye).current)){if(t(this,st).current&&e!=="drag"){const n=Math.sign(s);if(t(this,d).length){const u={tween:t(this,Bt).current||t(this,$t).current?{easing:t(this,Bt).current||"easeInOutCubic",duration:t(this,$t).current||500}:void 0};t(this,xe)?this.scrollToSection(o(this,c,hs).call(this,!0),u):this.shiftSections(n,u)}else t(this,S).shift(n*t(this,L))}else t(this,S).shift(s);r(this,xe,e==="drag")}}});i(this,ps,xs.debounce(()=>{const e=t(this,xt).reduce((s,n)=>{const u=this.vertical?n.width:n.height;return u>s?u:s},0);clearTimeout(t(this,$e)),r(this,Le,!0),this.style.setProperty("--max-section-size",""),r(this,$e,setTimeout(()=>{r(this,Le,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));i(this,We,()=>{r(this,V,!0),this.hibernatedCSSProperty.current||o(this,c,Fs).call(this),os.elementResizer.subscribe(this,t(this,M)),ft.windowResizer.unsubscribe(t(this,We))});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[xi];const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),r(this,Zt,document.createElement("div")),t(this,Zt).className="content-wrapper",r(this,f,document.createElement("div")),t(this,f).className="content",r(this,Oe,document.createElement("slot")),t(this,f).appendChild(t(this,Oe)),t(this,Zt).appendChild(t(this,f)),e.appendChild(t(this,Zt)),r(this,Be,new MutationObserver(xs.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,S)}get controlsCSSProperty(){return t(this,fe)}get axisCSSProperty(){return t(this,T)}get reverseCSSProperty(){return t(this,qt)}get directionCSSProperty(){return t(this,mt)}get pagesCSSProperty(){return t(this,gt)}get splitCSSProperty(){return t(this,Ct)}get sectionalCSSProperty(){return t(this,st)}get easingCSSProperty(){return t(this,Bt)}get durationCSSProperty(){return t(this,$t)}get autoSizeCSSProperty(){return t(this,yt)}get wheelMaxDeltaCSSProperty(){return t(this,Ht)}get dragInertionCSSProperty(){return t(this,be)}get sectionsInViewCSSProperty(){return t(this,it)}get loopCSSProperty(){return t(this,k)}get dampingCSSProperty(){return t(this,me)}get massCSSProperty(){return t(this,ge)}get stiffnessCSSProperty(){return t(this,Ce)}get mouseDragCSSProperty(){return t(this,ye)}get sectionDistanceScaleCSSProperty(){return t(this,Te)}get startSectionCSSProperty(){return t(this,ve)}get autoplayCSSProperty(){return t(this,j)}get autoplayPauseDurationCSSProperty(){return t(this,Pe)}get autoplayUserDirectionCSSProperty(){return t(this,Wt)}get classesCSSProperty(){return t(this,J)}get currentIndexStartOffsetCSSProperty(){return t(this,_t)}get currentIndexEndOffsetCSSProperty(){return t(this,vt)}get shiftSectionPositionCSSProperty(){return t(this,Ee)}get focusDelayCSSProperty(){return t(this,Nt)}get focusDurationCSSProperty(){return t(this,we)}get disabledCSSProperty(){return t(this,Ut)}get hibernatedCSSProperty(){return t(this,Gt)}get currentScrollValue(){return o(this,c,Os).call(this,"current")}get targetScrollValue(){return o(this,c,Os).call(this,"target")}get contentWrapperElement(){return t(this,Zt)}get contentElement(){return t(this,f)}get sections(){return t(this,N)}get visibleSections(){return t(this,d)}get position(){return t(this,us)}get contentPosition(){return t(this,as)}get viewportSize(){return t(this,L)}get scrollSize(){return t(this,P)}get gap(){return t(this,U)}get counter(){return t(this,O)}get limit(){return Math.ceil(t(this,d).length-t(this,it).current)}get distance(){return t(this,Pt)}get loopDistance(){return t(this,k).current?t(this,Pt)+t(this,U):t(this,Pt)}get hasOverflow(){return t(this,Et)}get overscroll(){return t(this,De)}get scrollLine(){return t(this,ht)}get vertical(){return t(this,T).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,T).current==="y"?0:t(this,S).distance}get scrollHeight(){return t(this,T).current==="x"?0:t(this,S).distance}tryResplit(){!t(this,G)&&(t(this,k).current||t(this,Ct).current||t(this,k).current||t(this,yt).current||t(this,st).current)&&o(this,c,ns).call(this)}onScroll(...e){return t(this,S).subscribe(...e)}offScroll(...e){t(this,S).unsubscribe(...e)}range(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress<u?0:this.currentProgress>g?1:(this.currentProgress-u)/(g-u)}curve(e,s,n=0){return Math.sin(this.range(e,s,n)*Math.PI)}visible(e,s,n=0){const u=e-n,g=u+s+n*2;return this.currentProgress>=u&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,d).length||t(this,G))return;const n=t(this,O).current,u=o(this,c,Qs).call(this,e),g=t(this,d)[n],C=t(this,d)[u];if(g&&C){let v=0;const le=o(this,c,hs).call(this),Ae=t(this,d)[le];let is=Ae?this.targetScrollValue-Ae.position:0;t(this,k).current?u===0&&n===t(this,d).length-1?(v=t(this,P)+t(this,L)-g.position+t(this,U),t(this,xe)||(is=0)):u===t(this,d).length-1&&n===0?v=C.position-(t(this,P)+t(this,L)+t(this,U)):v=C.position-g.position:v=C.position-g.position,this.shiftPosition(v-is,s)}}shiftSections(e,s){t(this,d).length&&this.scrollToSection(t(this,O).current+e,s)}setPosition(e,s){t(this,G)||(o(this,c,Ts).call(this,Math.sign(e)||1),s!=null&&s.tween?(clearTimeout(t(this,jt)),t(this,Jt).set(t(this,S).current,{equalize:!0}),t(this,Jt).set(Math.min(e,this.distance),Gs({},s.tween)),r(this,jt,setTimeout(()=>{r(this,jt,void 0)},s.tween.duration||0))):t(this,S).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"}))}shiftPosition(e,s){this.setPosition(t(this,S).target+e,s)}resize(){if(t(this,Gt).current)return;r(this,d,t(this,N).filter(n=>Ci.isElementVisible(n.element))),this.style.setProperty("--sections",t(this,d).length.toString()),t(this,S).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,P)||0,s=t(this,O).current;if(r(this,us,this.vertical?et.getCumulativeOffsetTop(this):et.getCumulativeOffsetLeft(this)),r(this,as,this.vertical?et.getCumulativeOffsetTop(t(this,f)):et.getCumulativeOffsetLeft(t(this,f))),r(this,L,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,U,Zs.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):r(this,U,Zs.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,yt).current&&t(this,d).length){const n=t(this,it).current,u=(t(this,L)-t(this,U)*(n-1))/n;t(this,d).forEach(g=>{g.setSize(u)})}else t(this,d).forEach(n=>{n.setSize()});if(t(this,d).forEach(n=>{n.resize()}),t(this,gt).current){r(this,P,t(this,L)*t(this,gt).current);const n=t(this,P)+t(this,L);this.vertical?(t(this,f).style.width=n+"px",t(this,f).style.height="100%"):(t(this,f).style.height=n+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",r(this,P,t(this,f).offsetHeight-t(this,L))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",r(this,P,t(this,f).offsetWidth-t(this,L)));if(!t(this,k).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);r(this,P,t(this,P)+u),t(this,S).max=t(this,P)}if(t(this,k).current&&t(this,d).length){const n=t(this,d)[t(this,d).length-1],u=n.position+n.size-t(this,L),g=t(this,P)-u;r(this,Pt,n.position+n.size+g)}else r(this,Pt,t(this,P));if(t(this,st).current&&t(this,d).length){const n=t(this,d)[s];t(this,S).set(n.position,{equalize:!0})}else t(this,S).set(e*t(this,P),{equalize:!0});r(this,Et,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,L)),this.classList.toggle("has-overflow",t(this,Et)),t(this,Et)?t(this,Ut).current||o(this,c,ws).call(this):o(this,c,Es).call(this),t(this,ps).call(this),tt.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,S).notify()}connectedCallback(){oe.scrollEntries.register(this),r(this,S,new Js.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),r(this,rt,new Ps.WheelControls({element:t(this,f)})),t(this,rt).changeEvent.subscribe(t(this,He)),r(this,Kt,new Ps.KeyboardControls({element:this})),t(this,Kt).changeEvent.subscribe(t(this,He)),r(this,nt,new Ps.DragControls({element:t(this,f),rootElement:this})),t(this,nt).changeEvent.subscribe(t(this,He)),r(this,I,new Ps.AutoplayControls({culling:this})),t(this,I).changeEvent.subscribe(t(this,Ss)),t(this,T).subscribe(()=>{o(this,c,Is).call(this)}),t(this,qt).subscribe(()=>{o(this,c,Is).call(this)}),t(this,Ht).subscribe(e=>{t(this,rt).axis=e.current?"max":t(this,T).current}),t(this,be).subscribe(e=>{t(this,nt).inertion=typeof e.current=="number"?e.current:1}),t(this,gt).subscribe(()=>{t(this,V)&&t(this,M).call(this)}),t(this,Ct).subscribe(({current:e})=>{t(this,V)&&(e?o(this,c,ns).call(this):o(this,c,Ie).call(this))}),t(this,st).subscribe(e=>{t(this,rt).debounce=e.current,t(this,nt).swipe=e.current,t(this,I).interval=e.current,t(this,V)&&(e.current&&!e.previous&&!t(this,d).length?o(this,c,ns).call(this):!e.current&&e.previous&&t(this,d).length&&o(this,c,Ie).call(this))}),t(this,yt).subscribe(e=>{t(this,V)&&(t(this,M).call(this),e.current&&!e.previous&&!t(this,d).length?o(this,c,ns).call(this):!e.current&&e.previous&&t(this,d).length&&o(this,c,Ie).call(this))}),t(this,it).subscribe(e=>{t(this,V)&&(t(this,M).call(this),o(this,c,ue).call(this))}),t(this,k).subscribe(e=>{e.current?(t(this,V)&&(t(this,d).length||(t(this,Ct).current=!0)),t(this,S).max=1/0,t(this,S).min=-1/0):(r(this,De,0),t(this,S).max=t(this,P),t(this,S).min=0)}),t(this,me).subscribe(e=>{t(this,S).damping=e.current}),t(this,ge).subscribe(e=>{t(this,S).mass=e.current}),t(this,Ce).subscribe(e=>{t(this,S).stiffness=e.current}),t(this,j).subscribe(e=>{t(this,I).speed=e.current,!t(this,wt)&&e.current&&!e.previous?t(this,I).connect():!e.current&&e.previous&&t(this,I).disconnect()}),t(this,Wt).subscribe(e=>{e.current||(t(this,I).direction=1)}),t(this,J).subscribe(e=>{t(this,V)&&o(this,c,ue).call(this)}),t(this,_t).subscribe(e=>{t(this,V)&&t(this,J).current&&o(this,c,ue).call(this)}),t(this,vt).subscribe(e=>{t(this,V)&&t(this,J).current&&o(this,c,ue).call(this)}),t(this,Ee).subscribe(e=>{t(this,V)&&t(this,S).notify()}),t(this,S).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,O).subscribe(e=>{t(this,G)||(t(this,d).length&&o(this,c,ue).call(this),this.style.setProperty("--counter",e.current+""))}),t(this,Jt).subscribe(e=>{t(this,Jt).isRunning.current&&t(this,S).set(e.current,{equalize:!0})}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),o(this,c,Es).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),o(this,c,ws).call(this))}),t(this,Gt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),o(this,c,Ms).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),o(this,c,Fs).call(this))}),t(this,fe).observe(),t(this,T).observe(),t(this,qt).observe(),t(this,mt).observe(),t(this,gt).observe(),t(this,Ct).observe(),t(this,st).observe(),t(this,Bt).observe(),t(this,$t).observe(),t(this,yt).observe(),t(this,Ht).observe(),t(this,be).observe(),t(this,it).observe(),t(this,k).observe(),t(this,me).observe(),t(this,ge).observe(),t(this,Ce).observe(),t(this,ye).observe(),t(this,Te).observe(),t(this,ve).observe(),t(this,j).observe(),t(this,j).observe(),t(this,Pe).observe(),t(this,Wt).observe(),t(this,J).observe(),t(this,_t).observe(),t(this,vt).observe(),t(this,Ee).observe(),t(this,Nt).observe(),t(this,we).observe(),t(this,Ut).observe(),t(this,Gt).observe(),ft.windowResizer.subscribe(t(this,We),Me.RESIZE_ORDER.LAST),t(this,Be).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,fe).unobserve(),t(this,T).unobserve(),t(this,qt).unobserve(),t(this,mt).unobserve(),t(this,gt).unobserve(),t(this,Ct).unobserve(),t(this,st).unobserve(),t(this,Bt).unobserve(),t(this,$t).unobserve(),t(this,yt).unobserve(),t(this,Ht).unobserve(),t(this,be).unobserve(),t(this,it).unobserve(),t(this,k).unobserve(),t(this,me).unobserve(),t(this,ge).unobserve(),t(this,Ce).unobserve(),t(this,ye).unobserve(),t(this,Te).unobserve(),t(this,ve).unobserve(),t(this,j).unobserve(),t(this,Pe).unobserve(),t(this,Wt).unobserve(),t(this,J).unobserve(),t(this,_t).unobserve(),t(this,vt).unobserve(),t(this,Ee).unobserve(),t(this,Nt).unobserve(),t(this,we).unobserve(),t(this,Ut).unobserve(),t(this,Gt).unobserve(),ft.windowResizer.unsubscribe(t(this,We)),ft.windowResizer.unsubscribe(t(this,M)),os.elementResizer.unsubscribe(t(this,M)),o(this,c,Ms).call(this),t(this,Be).disconnect()}}S=new WeakMap,fe=new WeakMap,T=new WeakMap,qt=new WeakMap,mt=new WeakMap,gt=new WeakMap,Ct=new WeakMap,st=new WeakMap,Bt=new WeakMap,$t=new WeakMap,yt=new WeakMap,Ht=new WeakMap,be=new WeakMap,it=new WeakMap,k=new WeakMap,me=new WeakMap,ge=new WeakMap,Ce=new WeakMap,ye=new WeakMap,Te=new WeakMap,ve=new WeakMap,j=new WeakMap,Pe=new WeakMap,Wt=new WeakMap,J=new WeakMap,_t=new WeakMap,vt=new WeakMap,Ee=new WeakMap,Nt=new WeakMap,we=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,f=new WeakMap,Oe=new WeakMap,N=new WeakMap,d=new WeakMap,us=new WeakMap,as=new WeakMap,L=new WeakMap,P=new WeakMap,U=new WeakMap,rt=new WeakMap,Kt=new WeakMap,nt=new WeakMap,I=new WeakMap,O=new WeakMap,De=new WeakMap,Pt=new WeakMap,Et=new WeakMap,wt=new WeakMap,G=new WeakMap,qe=new WeakMap,jt=new WeakMap,Jt=new WeakMap,xe=new WeakMap,ht=new WeakMap,V=new WeakMap,Be=new WeakMap,xt=new WeakMap,Le=new WeakMap,$e=new WeakMap,c=new WeakSet,Is=function(){const e=t(this,T).current,s=t(this,qt).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${s}`:`column${s}`,t(this,rt).axis=t(this,Ht).current?"max":e,t(this,Kt).dimension=e==="x"?"width":"height",t(this,nt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,V)&&t(this,M).call(this)},ns=function(){o(this,c,Ie).call(this),t(this,Oe).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,N).push(new wi(e,s,this))}),r(this,d,[...t(this,N)]),t(this,f).style.transform="",tt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,M).call(this),o(this,c,ue).call(this)},Ie=function(){t(this,N).forEach(e=>{e.destroy()}),r(this,N,[]),r(this,d,[]),t(this,O).reset(),t(this,S).reset(),this.style.removeProperty("--max-section-size"),tt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Es=function(){t(this,wt)||(r(this,wt,!0),t(this,S).unsubscribe(t(this,ds)),t(this,S).unlistenAnimationFrame(),clearInterval(t(this,qe)),clearInterval(t(this,jt)),t(this,Jt).unlistenAnimationFrame(),t(this,rt).disconnect(),t(this,Kt).disconnect(),t(this,nt).disconnect(),t(this,I).disconnect(),t(this,Et)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,M).call(this)))},ws=function(){t(this,wt)&&(r(this,wt,!1),t(this,S).subscribe(t(this,ds),-1e4),t(this,S).notify(),t(this,rt).connect(),t(this,Kt).connect(),t(this,nt).connect(),t(this,j).current&&t(this,I).connect())},Ms=function(){t(this,G)||(r(this,G,!0),clearTimeout(t(this,$e)),ft.windowResizer.unsubscribe(t(this,M)),o(this,c,Es).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),t(this,N).length?o(this,c,Ie).call(this):(t(this,O).reset(),t(this,S).reset()),oe.scrollEntries.unregister(this))},Fs=function(){t(this,G)&&(r(this,G,!1),oe.scrollEntries.register(this),this.tryResplit(),o(this,c,ws).call(this),this.scrollToSection(t(this,ve).current,{behaviour:"instant"}),ft.windowResizer.subscribe(t(this,M),Me.RESIZE_ORDER.SCROLL))},M=new WeakMap,ds=new WeakMap,Qs=function(e){let s=t(this,O).current;return t(this,k).current?s=Ks.loopNumber(e,t(this,d).length):s=Bs.clamp(e,0,this.limit),s},He=new WeakMap,Ss=new WeakMap,Ts=function(e=1){t(this,Wt).current&&(t(this,I).direction=e),t(this,j).current&&t(this,I).pauseAndContinue(t(this,Pe).current,this.sectionalCSSProperty.current)},Os=function(e="current"){if(t(this,k).current&&t(this,d).length){const s=t(this,S)[e]%Math.round(t(this,P)+t(this,L)+t(this,U));return s<0?t(this,P)+s+t(this,L)+t(this,U):s}else return t(this,S)[e]},ue=function(){if(t(this,d).length){const e=t(this,O).current+t(this,_t).current;if(e===0?r(this,ht,"start"):e===this.limit?r(this,ht,"end"):r(this,ht,null),tt.dispatchEvent(this,"scrollLine",{detail:{line:t(this,ht)}}),t(this,J).current){this.classList.remove("end","start"),t(this,ht)&&this.classList.add(t(this,ht));const s=t(this,it).current+t(this,vt).current;r(this,xt,[]),t(this,d).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null),n.setMiddle(!1);const g=e-this.limit-1+t(this,vt).current,C=e+s,v=this.sections.length-C;u>=e&&u<C||u<=g?(n.setMark("current"),t(this,xt).push(n)):u>=C&&u<C+v/2||u<=g+s?n.setMark("next"):n.setMark("previous")}),t(this,ps).call(this)}}},Xs=function(){if(t(this,J).current){const e=Math.floor(t(this,xt).length/2);t(this,xt).sort((s,n)=>s.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,xt).forEach((s,n)=>{const u=n-e;s.setCurrentIndex(n),s.setCurrentIndexArc(u),s.setCurrentIndexArcAbs(Math.abs(u)),s.setMiddle(n===e)})}},ps=new WeakMap,hs=function(e=!1){let s=this.targetScrollValue,n=1/0,u=0;const g=t(this,S).direction;for(let C=0;C<t(this,d).length;C++){const v=t(this,d)[C];let le=t(this,xe)?v.size*g*-1*.4:0,Ae=v.position;this.overscroll&&Ae===0&&e&&(Ae=t(this,Pt));let is=Math.abs(Ae+le-s);is<=n&&(n=is,u=C)}return u},We=new WeakMap;_.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Ls);var fs;class ss extends HTMLElement{constructor(){super(...arguments);i(this,fs,null)}get scrollElement(){return t(this,fs)}connectedCallback(){const e=Ei.findParentElement(this,Ls);e instanceof Ls?r(this,fs,e):console.error(this,"e-scroll not found")}}fs=new WeakMap;var Qt,D,Lt,zt,_e,Ne,Xt,Ue,bs,ms;class Ys extends ss{constructor(){super();i(this,Qt,null);i(this,D,null);i(this,Lt,!1);i(this,zt,0);i(this,_e,0);i(this,Ne,0);i(this,Xt,()=>{r(this,Lt,this.offsetWidth>this.offsetHeight);const e=t(this,Lt)?this.offsetWidth:this.offsetHeight;r(this,zt,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),r(this,zt,Math.max(t(this,zt),30)),t(this,Lt)?(t(this,D).style.width=t(this,zt)+"px",t(this,D).style.height="100%"):(t(this,D).style.width="100%",t(this,D).style.height=t(this,zt)+"px"),r(this,_e,e-t(this,zt)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ue).call(this)});i(this,Ue,()=>{r(this,Ne,this.scrollElement.currentProgress*t(this,_e)),t(this,Lt)?t(this,D).style.transform=`translate3d(${t(this,Ne)}px, 0px, 0px)`:t(this,D).style.transform=`translate3d(0px, ${t(this,Ne)}px, 0px)`});i(this,bs,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,ms,e=>{document.documentElement.classList.add("grabbing"),Pi.setupDrag(u=>{const g=t(this,Lt)?u.x:u.y,C=this.scrollElement.distance/t(this,_e),v=(g-n)*C;this.scrollElement.setPosition(s+v)},()=>{document.documentElement.classList.remove("grabbing")});const s=this.scrollElement.damped.target,n=t(this,Lt)?e.x:e.y});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[js.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],r(this,Qt,document.createElement("slot")),t(this,Qt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,Qt))}}get thumbElement(){return t(this,D)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,Qt).assignedElements()[0]||t(this,Qt).firstElementChild;r(this,D,e),t(this,D).addEventListener("pointerdown",t(this,ms)),ft.windowResizer.subscribe(t(this,Xt),Me.RESIZE_ORDER.SCROLL),os.elementResizer.subscribe(this,t(this,Xt)),os.elementResizer.subscribe(this.scrollElement,t(this,Xt)),this.scrollElement.onScroll(t(this,Ue)),this.scrollElement.axisCSSProperty.subscribe(t(this,bs))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,D).removeEventListener("pointerdown",t(this,ms)),ft.windowResizer.unsubscribe(t(this,Xt)),os.elementResizer.unsubscribe(t(this,Xt)),this.scrollElement.offScroll(t(this,Ue)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,bs))}}Qt=new WeakMap,D=new WeakMap,Lt=new WeakMap,zt=new WeakMap,_e=new WeakMap,Ne=new WeakMap,Xt=new WeakMap,Ue=new WeakMap,bs=new WeakMap,ms=new WeakMap;_.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Ys);var Ge,Ze,Ke;class $s extends ss{constructor(){super();i(this,Ge,new l.CSSProperty(this,"--behaviour","smooth"));i(this,Ze,new l.CSSProperty(this,"--tween-easing",!1));i(this,Ke,new l.CSSProperty(this,"--tween-duration",0));_.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Ge).current,s=t(this,Ze).current,n=t(this,Ke).current;this.handleClick({behaviour:e,tween:s||n?{easing:s,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,Ge).observe(),t(this,Ze).observe(),t(this,Ke).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,Ge).close(),t(this,Ze).close(),t(this,Ke).close()}}Ge=new WeakMap,Ze=new WeakMap,Ke=new WeakMap;var je;class ti extends $s{constructor(){super(...arguments);i(this,je,new l.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,je).current,e)}connectedCallback(){super.connectedCallback(),t(this,je).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,je).close()}}je=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ti);var kt,Je;class ei extends $s{constructor(){super(...arguments);i(this,kt,new l.CSSProperty(this,"--step",1));i(this,Je,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,kt).current>0&&this.scrollElement.scrollLine==="end"||t(this,kt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,kt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,kt).subscribe(()=>{t(this,Je).call(this)}),t(this,kt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Je)),t(this,Je).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,kt).close(),this.removeAttribute("disabled")}}kt=new WeakMap,Je=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",ei);var ot,Yt,Qe,gs,Cs,Xe;class Li{constructor(h,e,s){i(this,ot,null);i(this,Yt,null);i(this,Qe,null);i(this,gs,null);i(this,Cs,()=>{t(this,Yt).scrollToSection(t(this,Qe),{behaviour:t(this,gs)})});i(this,Xe,()=>{t(this,ot).classList.toggle("current",t(this,Yt).counter.current===t(this,Qe))});_.isBrowser&&(r(this,ot,document.createElement("button")),t(this,ot).setAttribute("aria-label",`Go to section ${e+1}`),r(this,Yt,h),r(this,gs,s),r(this,Qe,e),t(this,ot).addEventListener("click",t(this,Cs)),t(this,Yt).counter.subscribe(t(this,Xe)),t(this,Xe).call(this))}get element(){return t(this,ot)}destroy(){t(this,ot).removeEventListener("click",t(this,Cs)),t(this,Yt).counter.unsubscribe(t(this,Xe)),t(this,ot).remove()}}ot=new WeakMap,Yt=new WeakMap,Qe=new WeakMap,gs=new WeakMap,Cs=new WeakMap,Xe=new WeakMap;var ze,te,lt;class si extends ss{constructor(){super(...arguments);i(this,ze,null);i(this,te,[]);i(this,lt,xs.debounce(()=>{t(this,te).forEach(s=>s.destroy()),r(this,te,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let s=0;s<e;s++){const n=new Li(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");t(this,ze).appendChild(n.element),t(this,te).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",r(this,ze,document.createElement("div")),this.appendChild(t(this,ze)),this.scrollElement.addEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,lt)),this.scrollElement.loopCSSProperty.subscribe(t(this,lt)),t(this,lt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,lt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,lt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,lt)),t(this,te).forEach(e=>e.destroy()),r(this,te,[]),t(this,ze).remove()}}ze=new WeakMap,te=new WeakMap,lt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",si);var ee,se,ie,re,Vt,Rt,At,It,R,q,B,$,Mt,z,ct,ut,Q,Ft,ke,at,dt,St,w,H,W,X,Y,Z,Ye,m,Tt,ne,ts,x,pt,F,A,K,Ve,Ot,y,he,b,ri,ni,hi,oi,li,ci,es,Re,Ds,ae,ui,ai,qs;class ii extends ss{constructor(){super(...arguments);i(this,b);i(this,ee);i(this,se);i(this,ie);i(this,re);i(this,Vt);i(this,Rt);i(this,At);i(this,It);i(this,R);i(this,q);i(this,B);i(this,$);i(this,Mt);i(this,z);i(this,ct);i(this,ut);i(this,Q);i(this,Ft);i(this,ke);i(this,at);i(this,dt);i(this,St);i(this,w);i(this,H);i(this,W);i(this,X);i(this,Y);i(this,Z);i(this,Ye);i(this,m);i(this,Tt);i(this,ne);i(this,ts);i(this,x);i(this,pt);i(this,F);i(this,A);i(this,K);i(this,Ve);i(this,Ot);i(this,y);i(this,he);i(this,es);i(this,Re);r(this,ee,new l.CSSProperty(this,"--damping",20)),r(this,se,new l.CSSProperty(this,"--mass",0)),r(this,ie,new l.CSSProperty(this,"--stiffness",0)),r(this,re,new l.CSSProperty(this,"--target","")),r(this,Vt,new l.CSSProperty(this,"--disabled",!1)),r(this,Rt,new l.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),r(this,At,new l.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),r(this,It,new l.CSSProperty(this,"--capture-once",!1)),r(this,R,new l.CSSProperty(this,"--captured","")),r(this,q,new l.CSSProperty(this,"--released","")),r(this,B,new l.CSSProperty(this,"--captured-from-start","")),r(this,$,new l.CSSProperty(this,"--captured-from-finish","")),r(this,Mt,new l.CSSProperty(this,"--released-from-start","")),r(this,z,new l.CSSProperty(this,"--released-from-finish","")),r(this,ct,new l.CSSProperty(this,"--passed-var","")),r(this,ut,new l.CSSProperty(this,"--progress-var","")),r(this,Q,new l.CSSProperty(this,"--progress-arc-var","")),r(this,Ft,new l.CSSProperty(this,"--progress-arc-mult",1)),r(this,ke,new l.CSSProperty(this,"--animation-var-type","target")),r(this,at,new l.CSSProperty(this,"--distance-var","")),r(this,dt,new l.CSSProperty(this,"--start-var","")),r(this,St,new l.CSSProperty(this,"--finish-var","")),r(this,w,new ce.Store(!1)),r(this,H,new ce.Store(!1)),r(this,W,new ce.Store(!1)),r(this,X,new ce.Store(!1)),r(this,Y,new ce.Store(!1)),r(this,Z,new ce.Store(!1)),r(this,Ye,[]),r(this,m,this),r(this,Tt,0),r(this,ne,0),r(this,ts,0),r(this,x,new Js.Damped(0,{order:Me.TICK_ORDER.SEGMENT,min:0,max:1})),r(this,pt,0),r(this,F,0),r(this,A,0),r(this,K,0),r(this,Ve,!1),r(this,Ot,!1),r(this,y,!0),r(this,he,!1),this.resize=()=>{r(this,ne,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Tt,this.scrollElement.vertical?et.getCumulativeOffsetTop(this,this.scrollElement):et.getCumulativeOffsetLeft(this,this.scrollElement));const e=et.getStickyOffset(this,this.scrollElement.vertical?"top":"left");r(this,Tt,t(this,Tt)-e),r(this,F,this.getStart()),r(this,A,this.getDistance()),r(this,F,t(this,F)+t(this,At).current),r(this,A,t(this,A)+t(this,Rt).current),r(this,K,t(this,F)+t(this,A)),this.scrollElement.currentScrollValue>t(this,K)&&!t(this,w).current&&!t(this,H).current&&(t(this,w).current=!0),this.setVar(t(this,dt).current,t(this,F)),this.setVar(t(this,St).current,t(this,K)),this.setVar(t(this,at).current,t(this,A)),t(this,x).max=t(this,A),r(this,Ve,!0),t(this,Re).call(this)},this.findAnotherScrollEntries=xs.debounce(()=>{const e=oe.scrollEntries.getAll(this).reverse();let s=0;e.forEach((n,u)=>{n.element===this.scrollElement&&(s=u)}),r(this,Ye,e.slice(s+1)),this.tick()},0),r(this,es,()=>{t(this,y)||this.resize()}),r(this,Re,()=>{!t(this,y)&&t(this,Ve)&&this.tick()})}get distanceOffsetCSSProperty(){return t(this,Rt)}get startOffsetCSSProperty(){return t(this,At)}get captureOnceCSSProperty(){return t(this,It)}get capturedCSSProperty(){return t(this,R)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,B)}get capturedFromFinishCSSProperty(){return t(this,$)}get releasedFromStartCSSProperty(){return t(this,Mt)}get releasedFromFinishCSSProperty(){return t(this,z)}get passedVarCSSProperty(){return t(this,ct)}get progressVarCSSProperty(){return t(this,ut)}get progressArcVarCSSProperty(){return t(this,Q)}get progressArcMultCSSProperty(){return t(this,Ft)}get animationVarTypeCSSProperty(){return t(this,ke)}get distanceVarCSSProperty(){return t(this,at)}get startVarCSSProperty(){return t(this,dt)}get finishVarCSSProperty(){return t(this,St)}get disabledCSSProperty(){return t(this,Vt)}get dampingCSSProperty(){return t(this,ee)}get massCSSProperty(){return t(this,se)}get stiffnessCSSProperty(){return t(this,ie)}get targetCSSProperty(){return t(this,re)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,W)}get isReleasedFromStart(){return t(this,X)}get isCapturedFromFinish(){return t(this,Y)}get isReleasedFromFinish(){return t(this,Z)}get directionPosition(){return t(this,Tt)}get directionSize(){return t(this,ne)}get passed(){return t(this,x)}get progress(){return t(this,pt)}get progressArc(){return Math.abs(Math.cos(t(this,pt)*Math.PI))*t(this,Ft).current}get start(){return t(this,F)}get finish(){return t(this,K)}get distance(){return t(this,A)}get isCapturedOnce(){return t(this,Ot)}get isDisabled(){return t(this,y)}tick(){let e=this.scrollElement.currentScrollValue;t(this,Ye).forEach(u=>{e+=u.value});const s=e-t(this,F);t(this,he)||r(this,he,t(this,x).previous?Math.abs(t(this,x).previous-s)>1e3:!1),t(this,x).set(s);const n=Math.round(e);t(this,w).current&&(n>=t(this,F)?t(this,W).current||o(this,b,hi).call(this):t(this,W).current&&!t(this,X).current&&o(this,b,li).call(this),n<t(this,K)?t(this,Z).current&&!t(this,Y).current&&o(this,b,oi).call(this):t(this,W).current&&!t(this,Z).current&&o(this,b,ci).call(this)),n>=t(this,F)&&n<t(this,K)?t(this,w).current||o(this,b,ri).call(this):t(this,w).current&&(t(this,x).set(Bs.step(t(this,A)/2,t(this,x).target,0,t(this,A))),o(this,b,ni).call(this)),t(this,Ot)&&t(this,It).current&&(t(this,R).current&&t(this,m).classList.add(t(this,R).current),r(this,y,!0))}disable(){this.style.cssText="",r(this,Tt,0),r(this,ne,0),t(this,x).reset(),r(this,pt,0),r(this,F,0),r(this,A,0),r(this,K,0),r(this,Ve,!1),t(this,w).current=!1,t(this,H).current=!1,t(this,W).current=!1,t(this,X).current=!1,t(this,Y).current=!1,t(this,Z).current=!1,r(this,Ot,!1),r(this,y,!0),o(this,b,qs).call(this)}enable(){r(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,w).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,W).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,Y).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,H).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,X).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,Z).subscribe(s=>{s.current&&tt.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,ee).observe(),t(this,se).observe(),t(this,ie).observe(),t(this,re).observe(),t(this,Vt).observe(),t(this,Rt).observe(),t(this,At).observe(),t(this,It).observe(),t(this,R).observe(),t(this,q).observe(),t(this,B).observe(),t(this,$).observe(),t(this,Mt).observe(),t(this,z).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,Q).observe(),t(this,Ft).observe(),t(this,ke).observe(),t(this,at).observe(),t(this,dt).observe(),t(this,St).observe();let e=!1;this.findAnotherScrollEntries(),t(this,Vt).current||this.enable(),t(this,ee).subscribe(s=>{t(this,x).damping=s.current}),t(this,se).subscribe(s=>{t(this,x).mass=s.current}),t(this,ie).subscribe(s=>{t(this,x).stiffness=s.current}),t(this,re).subscribe(s=>{s.previous&&o(this,b,qs).call(this),s.current?s.current==="parent"?r(this,m,this.parentElement||this):r(this,m,document.querySelector(s.current)||this):r(this,m,this)}),t(this,Vt).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,At).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,Rt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,R).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,$).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,q).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,Mt).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,z).subscribe(s=>{o(this,b,ae).call(this,s)}),t(this,It).subscribe(s=>{t(this,y)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,ct).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ut).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,pt)))}),t(this,Q).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,Ft).subscribe(s=>{t(this,y)||o(this,b,Ds).call(this)}),t(this,dt).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,F)))}),t(this,St).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,K)))}),t(this,at).subscribe(s=>{t(this,y)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,x).subscribe(s=>{if(t(this,he)){r(this,he,!1);return}o(this,b,Ds).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),ft.windowResizer.subscribe(t(this,es),Me.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(t(this,Re)),e=!0}disconnectedCallback(){ft.windowResizer.unsubscribe(t(this,es)),this.scrollElement.offScroll(t(this,Re)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),t(this,ee).close(),t(this,se).close(),t(this,ie).close(),t(this,re).close(),t(this,Vt).close(),t(this,Rt).close(),t(this,At).close(),t(this,It).close(),t(this,R).close(),t(this,q).close(),t(this,B).close(),t(this,$).close(),t(this,Mt).close(),t(this,z).close(),t(this,ct).close(),t(this,ut).close(),t(this,Q).close(),t(this,Ft).close(),t(this,at).close(),t(this,dt).close(),t(this,St).close(),t(this,w).close(),t(this,H).close(),t(this,W).close(),t(this,X).close(),t(this,Y).close(),t(this,Z).close(),this.disable(),t(this,x).close()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,s){if(e){const n=typeof s=="number"?s.toFixed(6):s;t(this,m).style.setProperty(`--${e}`,n)}}getDistance(){return t(this,ne)+t(this,ts)}getStart(){return t(this,Tt)-t(this,ts)}}ee=new WeakMap,se=new WeakMap,ie=new WeakMap,re=new WeakMap,Vt=new WeakMap,Rt=new WeakMap,At=new WeakMap,It=new WeakMap,R=new WeakMap,q=new WeakMap,B=new WeakMap,$=new WeakMap,Mt=new WeakMap,z=new WeakMap,ct=new WeakMap,ut=new WeakMap,Q=new WeakMap,Ft=new WeakMap,ke=new WeakMap,at=new WeakMap,dt=new WeakMap,St=new WeakMap,w=new WeakMap,H=new WeakMap,W=new WeakMap,X=new WeakMap,Y=new WeakMap,Z=new WeakMap,Ye=new WeakMap,m=new WeakMap,Tt=new WeakMap,ne=new WeakMap,ts=new WeakMap,x=new WeakMap,pt=new WeakMap,F=new WeakMap,A=new WeakMap,K=new WeakMap,Ve=new WeakMap,Ot=new WeakMap,y=new WeakMap,he=new WeakMap,b=new WeakSet,ri=function(){t(this,w).current=!0,t(this,H).current=!1,r(this,Ot,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,z).current&&t(this,m).classList.remove(t(this,z).current),t(this,R).current&&t(this,m).classList.add(t(this,R).current)},ni=function(){t(this,H).current=!0,t(this,w).current=!1,r(this,Ot,!0),t(this,R).current&&t(this,m).classList.remove(t(this,R).current),t(this,B).current&&t(this,m).classList.remove(t(this,B).current),t(this,$).current&&t(this,m).classList.remove(t(this,$).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)},hi=function(){t(this,w).current=!0,t(this,W).current=!0,t(this,X).current=!1,t(this,B).current&&t(this,m).classList.add(t(this,B).current)},oi=function(){t(this,w).current=!0,t(this,Y).current=!0,t(this,Z).current=!1,t(this,$).current&&t(this,m).classList.add(t(this,$).current)},li=function(){t(this,H).current=!0,t(this,X).current=!0,t(this,W).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},ci=function(){t(this,H).current=!0,t(this,Z).current=!0,t(this,Y).current=!1,t(this,z).current&&t(this,m).classList.add(t(this,z).current)},es=new WeakMap,Re=new WeakMap,Ds=function(){const e=t(this,x)[t(this,ke).current];this.setVar(t(this,ct).current,e),r(this,pt,e/t(this,A)||0),this.setVar(t(this,ut).current,t(this,pt)),t(this,Q).current&&this.setVar(t(this,Q).current,this.progressArc)},ae=function(e){if(t(this,y)){e.previous&&t(this,m).classList.remove(e.previous),e.current&&t(this,m).classList.remove(e.current);return}e.current&&t(this,w).current?(e.previous&&t(this,m).classList.remove(e.previous),t(this,m).classList.add(e.current)):!e.current&&e.previous&&t(this,m).classList.remove(e.previous)},ui=function(...e){e.forEach(s=>{s&&t(this,m).classList.remove(s)})},ai=function(...e){e.forEach(s=>{s&&t(this,m).style.removeProperty(`--${s}`)})},qs=function(){o(this,b,ui).call(this,t(this,R).current,t(this,B).current,t(this,$).current,t(this,q).current,t(this,Mt).current,t(this,z).current),o(this,b,ai).call(this,t(this,ct).current,t(this,ut).current,t(this,Q).current,t(this,at).current,t(this,dt).current,t(this,St).current)};_.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ii);class di extends $s{handleClick(h){this.scrollElement.setPosition(this.scrollElement.vertical?et.getCumulativeOffsetTop(this):et.getCumulativeOffsetLeft(this),h)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}}_.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",di);var ys;const Hs=class Hs extends ss{constructor(){super(...arguments);i(this,ys,()=>{const e=this.scrollElement.counter.current+1,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(Hs.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,ys))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,ys))}};ys=new WeakMap;let zs=Hs;_.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",zs);var vs;const Ws=class Ws extends ss{constructor(){super(...arguments);i(this,vs,()=>{const e=this.scrollElement.limit,s=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(s,"0")})}connectedCallback(){return As(this,null,function*(){Rs(Ws.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,vs))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,vs))}};vs=new WeakMap;let ks=Ws;_.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",ks);exports.ScrollBulletButtonsElement=si;exports.ScrollCounterElement=zs;exports.ScrollElement=Ls;exports.ScrollSectionButtonElement=di;exports.ScrollSegmentElement=ii;exports.ScrollSetButtonElement=ti;exports.ScrollStepButtonElement=ei;exports.ScrollTotalElement=ks;exports.ScrollbarElement=Ys;
|
package/lib/scroll/index.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export { ScrollBulletButtonsElement } from './ScrollBulletButtonsElement';
|
|
|
6
6
|
export { ScrollSegmentElement } from './ScrollSegmentElement';
|
|
7
7
|
export { ScrollSectionButtonElement } from './ScrollSectionButtonElement';
|
|
8
8
|
export { ScrollCounterElement } from './ScrollCounterElement';
|
|
9
|
+
export { ScrollTotalElement } from './ScrollTotalElement';
|