aptechka 0.51.8 → 0.51.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var Ze=Object.defineProperty;var Ae=Object.getOwnPropertySymbols;var je=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable;var Me=d=>{throw TypeError(d)};var Re=(d,n,e)=>n in d?Ze(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e,Te=(d,n)=>{for(var e in n||(n={}))je.call(n,e)&&Re(d,e,n[e]);if(Ae)for(var e of Ae(n))Ke.call(n,e)&&Re(d,e,n[e]);return d};var Ee=(d,n,e)=>n.has(d)||Me("Cannot "+e);var t=(d,n,e)=>(Ee(d,n,"read from private field"),e?e.call(d):n.get(d)),s=(d,n,e)=>n.has(d)?Me("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(d):n.set(d,e),h=(d,n,e,i)=>(Ee(d,n,"write to private field"),i?i.call(d,e):n.set(d,e),e),l=(d,n,e)=>(Ee(d,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Je=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),Qe=require("../easings-GegIwET5.cjs"),se=require("../events-KVanG9sR.cjs"),De=require("../function-MthRj-GJ.cjs"),Be=require("../jss-CRBgdvJ3.cjs"),Bt=require("../layout-Ctc2p3uz.cjs"),Oe=require("../math-GDWEqu7y.cjs"),Xe=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ye=require("../order/index.cjs"),Ye=require("../Damped-DgAIjXp3.cjs"),ts=require("../Tweened-DpJDlbj9.cjs"),ge=require("../controls/index.cjs"),Ot=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),qe=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),es=require("../device/index.cjs"),he=require("../element-resizer/index.cjs"),ss=require("../gestures-C7gbKx11.cjs"),Ve=require("../dom-JBOkFLTh.cjs"),is=require("../scroll-segment/index.cjs");var b,Vt,g,Ct,V,tt,vt,Pt,ie;class rs{constructor(n,e,i){s(this,Pt);s(this,b);s(this,Vt);s(this,g);s(this,Ct,0);s(this,V,0);s(this,tt,null);s(this,vt,0);h(this,b,n),h(this,Vt,e),h(this,g,i),yt.scrollEntries.register(t(this,b)),this.setIndex(t(this,Vt))}get element(){return t(this,b)}get index(){return t(this,Vt)}get size(){return t(this,Ct)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,b)),this.unsetTransform()}unsetTransform(){t(this,b).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,b).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,b).style.width=n+"px",t(this,b).style.height=""):(t(this,b).style.height=n+"px",t(this,b).style.width="")):(t(this,b).style.width="",t(this,b).style.height="",t(this,b).style.removeProperty("--size"))}resize(){h(this,Ct,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?Bt.getCumulativeOffsetTop(t(this,b)):Bt.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,f=t(this,V)+t(this,Ct)+i,y=Oe.clamp(r,u,f);h(this,vt,y*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,tt)!==n&&(t(this,tt)&&t(this,b).classList.remove(t(this,tt)),n&&t(this,b).classList.add(n),h(this,tt,n),se.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,tt)},custom:!0}))}setMiddle(n){t(this,b).classList.toggle("middle",n)}setIndex(n){l(this,Pt,ie).call(this,"index",n)}setCurrentIndex(n){l(this,Pt,ie).call(this,"current-index",n)}setCurrentIndexArc(n){l(this,Pt,ie).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){l(this,Pt,ie).call(this,"current-index-arc-abs",n)}}b=new WeakMap,Vt=new WeakMap,g=new WeakMap,Ct=new WeakMap,V=new WeakMap,tt=new WeakMap,vt=new WeakMap,Pt=new WeakSet,ie=function(n,e){e!==null?(t(this,b).style.setProperty(`--${n}`,e.toString()),t(this,b).setAttribute(`data-${n}`,e.toString())):(t(this,b).style.removeProperty(`--${n}`),t(this,b).removeAttribute(`data-${n}`))};const ns=Be.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:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Et,w,et,_,H,$,M,st,it,W,rt,wt,T,v,xt,Lt,zt,It,_t,A,kt,nt,R,ht,F,At,ot,Rt,lt,ct,ut,p,Ht,c,oe,le,C,m,k,q,at,D,E,x,$t,N,U,G,Z,Wt,dt,j,Ft,B,P,Nt,St,o,we,re,Dt,Ce,ve,xe,Le,L,ce,_e,Ut,ue,ze,Ie,gt,He,ne,ae;class Tt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Et,new S.CSSProperty(this,"--controls",!0));s(this,w,new S.CSSProperty(this,"--axis","y"));s(this,et,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,st,new S.CSSProperty(this,"--tween-easing",!1));s(this,it,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,rt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,xt,new S.CSSProperty(this,"--damping",20));s(this,Lt,new S.CSSProperty(this,"--mass",0));s(this,zt,new S.CSSProperty(this,"--stiffness",0));s(this,It,new S.CSSProperty(this,"--mouse-drag",!1));s(this,_t,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,kt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,nt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ht,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,At,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ot,new S.CSSProperty(this,"--focus-delay",0));s(this,Rt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,lt,new S.CSSProperty(this,"--disabled",!1));s(this,ct,new S.CSSProperty(this,"--hibernate",!1));s(this,ut,null);s(this,p,null);s(this,Ht,null);s(this,c,[]);s(this,oe,0);s(this,le,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,at,null);s(this,D,null);s(this,E,null);s(this,x,new Je.Store(0));s(this,$t,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Wt);s(this,dt);s(this,j,new ts.Tweened);s(this,Ft,!1);s(this,B,null);s(this,P,!1);s(this,Nt,null);s(this,St,[]);s(this,L,()=>{if(t(this,ct).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,oe,this.vertical?Bt.getCumulativeOffsetTop(this):Bt.getCumulativeOffsetLeft(this)),h(this,le,this.vertical?Bt.getCumulativeOffsetTop(t(this,p)):Bt.getCumulativeOffsetLeft(t(this,p))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,c).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,c).forEach(f=>{f.setSize(u)})}else t(this,c).forEach(r=>{r.setSize()});if(t(this,c).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,C))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,c).length){const r=t(this,c)[t(this,c).length-1],u=r.position+r.size-t(this,C),f=t(this,m)-u;h(this,N,r.position+r.size+f)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,c).length){const r=t(this,c)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,lt).current||l(this,o,ve).call(this):l(this,o,Ce).call(this),se.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()});s(this,ce,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,$t,Math.max(0,e-t(this,m))),t(this,c).length){for(let i=0;i<t(this,c).length;i++)t(this,c)[i].transform();t(this,x).current=l(this,o,ne).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;l(this,o,He).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,Ut,(e,i)=>{t(this,Et).current&&(l(this,o,ze).call(this,Math.sign(i)||1),t(this,ue).call(this,e,i))});s(this,ue,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,dt)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ot).current&&(clearInterval(t(this,Wt)),h(this,Wt,setTimeout(()=>{const r=t(this,c)[l(this,o,ne).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Rt).current,easing:Qe.easeInOutExpo}})},t(this,ot).current))),!(e.includes("drag")&&!es.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,c).length){const u={tween:t(this,st).current||t(this,it).current?{easing:t(this,st).current||"easeInOutCubic",duration:t(this,it).current||500}:void 0};t(this,Ft)?this.scrollToSection(l(this,o,ne).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ft,e==="drag")}});s(this,ae,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||l(this,o,Le).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ns];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ut,document.createElement("div")),t(this,ut).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ht,document.createElement("slot")),t(this,p).appendChild(t(this,Ht)),t(this,ut).appendChild(t(this,p)),e.appendChild(t(this,ut)),h(this,Nt,new MutationObserver(De.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Et)}get axisCSSProperty(){return t(this,w)}get reverseCSSProperty(){return t(this,et)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,st)}get durationCSSProperty(){return t(this,it)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,rt)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,Lt)}get stiffnessCSSProperty(){return t(this,zt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,_t)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,kt)}get autoplayUserDirectionCSSProperty(){return t(this,nt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ht)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,At)}get focusDelayCSSProperty(){return t(this,ot)}get focusDurationCSSProperty(){return t(this,Rt)}get disabledCSSProperty(){return t(this,lt)}get hibernatedCSSProperty(){return t(this,ct)}get currentScrollValue(){return l(this,o,Ie).call(this,"current")}get targetScrollValue(){return l(this,o,Ie).call(this,"target")}get contentWrapperElement(){return t(this,ut)}get contentElement(){return t(this,p)}get sections(){return t(this,c)}get position(){return t(this,oe)}get contentPosition(){return t(this,le)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,c).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,$t)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&l(this,o,re).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>f?1:(this.currentProgress-u)/(f-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,c).length)return;const r=t(this,x).current,u=l(this,o,_e).call(this,e),f=t(this,c)[r],y=t(this,c)[u];if(f&&y){let I=0;const Pe=l(this,o,ne).call(this),qt=t(this,c)[Pe],me=qt?this.targetScrollValue-qt.position:0;t(this,v).current?u===0&&r===t(this,c).length-1?I=t(this,m)+t(this,C)-f.position+t(this,k):u===t(this,c).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-f.position:I=y.position-f.position,this.shiftPosition(I-me,i)}}shiftSections(e,i){t(this,c).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){l(this,o,ze).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,dt)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,Te({},i.tween)),h(this,dt,setTimeout(()=>{h(this,dt,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new Ye.Damped(0,{damping:.01,min:0,order:ye.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new ge.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ut)),h(this,at,new ge.KeyboardControls({element:this})),t(this,at).changeEvent.subscribe(t(this,Ut)),h(this,D,new ge.DragControls({element:t(this,p),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,Ut)),h(this,E,new ge.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,ue)),t(this,w).subscribe(()=>{l(this,o,we).call(this)}),t(this,et).subscribe(()=>{l(this,o,we).call(this)}),t(this,rt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,w).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?l(this,o,re).call(this):l(this,o,Dt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,c).length?l(this,o,re).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,Dt).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,c).length?l(this,o,re).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,Dt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,L).call(this),l(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,c).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,$t,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,Lt).subscribe(e=>{t(this,a).mass=e.current}),t(this,zt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,E).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,nt).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&l(this,o,gt).call(this)}),t(this,ht).subscribe(e=>{t(this,P)&&t(this,R).current&&l(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&l(this,o,gt).call(this)}),t(this,At).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,c).length&&l(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),l(this,o,Ce).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),l(this,o,ve).call(this))}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),l(this,o,xe).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),l(this,o,Le).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,et).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,st).observe(),t(this,it).observe(),t(this,W).observe(),t(this,rt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,It).observe(),t(this,_t).observe(),t(this,A).observe(),t(this,A).observe(),t(this,kt).observe(),t(this,nt).observe(),t(this,R).observe(),t(this,ht).observe(),t(this,F).observe(),t(this,At).observe(),t(this,ot).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,ct).observe(),Ot.windowResizer.subscribe(t(this,ae),ye.RESIZE_ORDER.LAST),t(this,Nt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Et).unobserve(),t(this,w).unobserve(),t(this,et).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,st).unobserve(),t(this,it).unobserve(),t(this,W).unobserve(),t(this,rt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,It).unobserve(),t(this,_t).unobserve(),t(this,A).unobserve(),t(this,kt).unobserve(),t(this,nt).unobserve(),t(this,R).unobserve(),t(this,ht).unobserve(),t(this,F).unobserve(),t(this,At).unobserve(),t(this,ot).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),Ot.windowResizer.unsubscribe(t(this,ae)),l(this,o,xe).call(this),t(this,Nt).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,et=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,st=new WeakMap,it=new WeakMap,W=new WeakMap,rt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,It=new WeakMap,_t=new WeakMap,A=new WeakMap,kt=new WeakMap,nt=new WeakMap,R=new WeakMap,ht=new WeakMap,F=new WeakMap,At=new WeakMap,ot=new WeakMap,Rt=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,p=new WeakMap,Ht=new WeakMap,c=new WeakMap,oe=new WeakMap,le=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,at=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,$t=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Wt=new WeakMap,dt=new WeakMap,j=new WeakMap,Ft=new WeakMap,B=new WeakMap,P=new WeakMap,Nt=new WeakMap,St=new WeakMap,o=new WeakSet,we=function(){const e=t(this,w).current,i=t(this,et).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,rt).current?"max":e,t(this,at).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,L).call(this)},re=function(){l(this,o,Dt).call(this),t(this,Ht).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,c).push(new rs(e,i,this))}),t(this,p).style.transform="",se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),l(this,o,gt).call(this)},Dt=function(){t(this,c).forEach(e=>{e.destroy()}),h(this,c,[]),t(this,x).reset(),t(this,a).reset(),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ce=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,ce)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Wt)),clearInterval(t(this,dt)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,at).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ve=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,ce),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,at).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},xe=function(){t(this,Z)||(h(this,Z,!0),Ot.windowResizer.unsubscribe(t(this,L)),he.elementResizer.unsubscribe(t(this,L)),l(this,o,Ce).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,c).length?l(this,o,Dt).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Le=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),l(this,o,ve).call(this),Ot.windowResizer.subscribe(t(this,L),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,ce=new WeakMap,_e=function(e){let i=t(this,x).current;return t(this,v).current?i=Xe.loopNumber(e,t(this,c).length):i=Oe.clamp(e,0,this.limit),i},Ut=new WeakMap,ue=new WeakMap,ze=function(e=1){t(this,nt).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,kt).current,this.sectionalCSSProperty.current)},Ie=function(e="current"){if(t(this,v).current&&t(this,c).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,c).length){const e=t(this,x).current+t(this,ht).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),se.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,St,[]),t(this,c).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=f?(r.setMark("current"),t(this,St).push(r)):u>=y&&u<y+I/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},He=function(){if(t(this,R).current){const e=Math.floor(t(this,St).length/2);t(this,St).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,St).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ne=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const f=t(this,a).direction;for(let y=0;y<t(this,c).length;y++){const I=t(this,c)[y];let Pe=t(this,Ft)?I.size*f*-1*.4:0,qt=I.position;this.overscroll&&qt===0&&e&&(qt=t(this,N));let me=Math.abs(qt+Pe-i);me<=r&&(r=me,u=y)}return u},ae=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Tt);var de;class ke extends HTMLElement{constructor(){super(...arguments);s(this,de,null)}get scrollElement(){return t(this,de)}connectedCallback(){const e=Ve.findParentElement(this,Tt);e instanceof Tt?h(this,de,e):console.error(this,"e-scroll not found")}}de=new WeakMap;var pt,z,K,J,Gt,Zt,bt,jt,Se,pe;class $e extends ke{constructor(){super();s(this,pt,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Gt,0);s(this,Zt,0);s(this,bt,()=>{h(this,K,this.offsetWidth>this.offsetHeight);const e=t(this,K)?this.offsetWidth:this.offsetHeight;h(this,J,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,J,Math.max(t(this,J),30)),t(this,K)?(t(this,z).style.width=t(this,J)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,J)+"px"),h(this,Gt,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,jt).call(this)});s(this,jt,()=>{h(this,Zt,this.scrollElement.currentProgress*t(this,Gt)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Zt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Zt)}px, 0px)`});s(this,Se,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,pe,e=>{document.documentElement.classList.add("grabbing"),ss.setupDrag(u=>{const f=t(this,K)?u.x:u.y,y=this.scrollElement.distance/t(this,Gt),I=(f-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,K)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Be.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,pe)),Ot.windowResizer.subscribe(t(this,bt),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,bt)),he.elementResizer.subscribe(this.scrollElement,t(this,bt)),this.scrollElement.onScroll(t(this,jt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Se))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,pe)),Ot.windowResizer.unsubscribe(t(this,bt)),he.elementResizer.unsubscribe(t(this,bt)),this.scrollElement.offScroll(t(this,jt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Se))}}pt=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,bt=new WeakMap,jt=new WeakMap,Se=new WeakMap,pe=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",$e);var Kt,Jt,Qt;class We extends ke{constructor(){super();s(this,Kt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Jt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Qt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Kt).current,i=t(this,Jt).current,r=t(this,Qt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Kt).observe(),t(this,Jt).observe(),t(this,Qt).observe()}disconnectedCallback(){t(this,Kt).close(),t(this,Jt).close(),t(this,Qt).close()}}Kt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap;var Xt;class Fe extends We{constructor(){super(...arguments);s(this,Xt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xt).close()}}Xt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Fe);var Q,Yt;class Ne extends We{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Yt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Q).current>0&&this.scrollElement.scrollLine==="end"||t(this,Q).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Q).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Q).subscribe(()=>{t(this,Yt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Yt)),t(this,Yt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Yt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ne);var X,ft,te,be,fe,ee;class hs{constructor(n,e,i){s(this,X,null);s(this,ft,null);s(this,te,null);s(this,be,null);s(this,fe,()=>{t(this,ft).scrollToSection(t(this,te),{behaviour:t(this,be)})});s(this,ee,()=>{t(this,X).classList.toggle("current",t(this,ft).counter.current===t(this,te))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,ft,n),h(this,be,i),h(this,te,e),t(this,X).addEventListener("click",t(this,fe)),t(this,ft).counter.subscribe(t(this,ee)),t(this,ee).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,fe)),t(this,ft).counter.unsubscribe(t(this,ee)),t(this,X).remove()}}X=new WeakMap,ft=new WeakMap,te=new WeakMap,be=new WeakMap,fe=new WeakMap,ee=new WeakMap;var Mt,mt,Y;class Ue extends ke{constructor(){super(...arguments);s(this,Mt,null);s(this,mt,[]);s(this,Y,De.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new hs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Mt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Y)),this.scrollElement.loopCSSProperty.subscribe(t(this,Y)),h(this,Mt,document.createElement("div")),this.appendChild(t(this,Mt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Y)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,Y)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Mt).remove()}}Mt=new WeakMap,mt=new WeakMap,Y=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Ue);class Ge extends is.ScrollSegmentElement{connectedCallback(){const n=Ve.findParentElement(this,Tt);n instanceof Tt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Tt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ge);exports.ScrollBulletButtonsElement=Ue;exports.ScrollElement=Tt;exports.ScrollSegmentElement=Ge;exports.ScrollSetButtonElement=Fe;exports.ScrollStepButtonElement=Ne;exports.ScrollbarElement=$e;
1
+ "use strict";var Ze=Object.defineProperty;var Ae=Object.getOwnPropertySymbols;var je=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable;var Me=d=>{throw TypeError(d)};var Re=(d,n,e)=>n in d?Ze(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e,Te=(d,n)=>{for(var e in n||(n={}))je.call(n,e)&&Re(d,e,n[e]);if(Ae)for(var e of Ae(n))Ke.call(n,e)&&Re(d,e,n[e]);return d};var Ee=(d,n,e)=>n.has(d)||Me("Cannot "+e);var t=(d,n,e)=>(Ee(d,n,"read from private field"),e?e.call(d):n.get(d)),s=(d,n,e)=>n.has(d)?Me("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(d):n.set(d,e),h=(d,n,e,i)=>(Ee(d,n,"write to private field"),i?i.call(d,e):n.set(d,e),e),c=(d,n,e)=>(Ee(d,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Je=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),Qe=require("../easings-GegIwET5.cjs"),se=require("../events-KVanG9sR.cjs"),De=require("../function-MthRj-GJ.cjs"),Be=require("../jss-CRBgdvJ3.cjs"),Bt=require("../layout-Ctc2p3uz.cjs"),Oe=require("../math-GDWEqu7y.cjs"),Xe=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ye=require("../order/index.cjs"),Ye=require("../Damped-DgAIjXp3.cjs"),ts=require("../Tweened-DpJDlbj9.cjs"),ge=require("../controls/index.cjs"),Ot=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),qe=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),es=require("../device/index.cjs"),he=require("../element-resizer/index.cjs"),ss=require("../gestures-C7gbKx11.cjs"),Ve=require("../dom-JBOkFLTh.cjs"),is=require("../scroll-segment/index.cjs");var b,Vt,g,Ct,V,tt,vt,Pt,ie;class rs{constructor(n,e,i){s(this,Pt);s(this,b);s(this,Vt);s(this,g);s(this,Ct,0);s(this,V,0);s(this,tt,null);s(this,vt,0);h(this,b,n),h(this,Vt,e),h(this,g,i),yt.scrollEntries.register(t(this,b)),this.setIndex(t(this,Vt))}get element(){return t(this,b)}get index(){return t(this,Vt)}get size(){return t(this,Ct)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,b)),this.unsetTransform()}unsetTransform(){t(this,b).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,b).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,b).style.width=n+"px",t(this,b).style.height=""):(t(this,b).style.height=n+"px",t(this,b).style.width="")):(t(this,b).style.width="",t(this,b).style.height="",t(this,b).style.removeProperty("--size"))}resize(){h(this,Ct,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?Bt.getCumulativeOffsetTop(t(this,b)):Bt.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,f=t(this,V)+t(this,Ct)+i,y=Oe.clamp(r,u,f);h(this,vt,y*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,tt)!==n&&(t(this,tt)&&t(this,b).classList.remove(t(this,tt)),n&&t(this,b).classList.add(n),h(this,tt,n),se.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,tt)},custom:!0}))}setMiddle(n){t(this,b).classList.toggle("middle",n)}setIndex(n){c(this,Pt,ie).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,ie).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,ie).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,ie).call(this,"current-index-arc-abs",n)}}b=new WeakMap,Vt=new WeakMap,g=new WeakMap,Ct=new WeakMap,V=new WeakMap,tt=new WeakMap,vt=new WeakMap,Pt=new WeakSet,ie=function(n,e){e!==null?(t(this,b).style.setProperty(`--${n}`,e.toString()),t(this,b).setAttribute(`data-${n}`,e.toString())):(t(this,b).style.removeProperty(`--${n}`),t(this,b).removeAttribute(`data-${n}`))};const ns=Be.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:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Et,w,et,_,H,$,M,st,it,W,rt,wt,T,v,xt,Lt,zt,It,_t,A,kt,nt,R,ht,F,At,ot,Rt,lt,ct,ut,p,Ht,l,oe,le,C,m,k,q,at,D,E,x,$t,N,U,G,Z,Wt,dt,j,Ft,B,P,Nt,St,o,we,re,Dt,Ce,ve,xe,Le,L,ce,_e,Ut,ue,ze,Ie,gt,He,ne,ae;class Tt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Et,new S.CSSProperty(this,"--controls",!0));s(this,w,new S.CSSProperty(this,"--axis","y"));s(this,et,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,st,new S.CSSProperty(this,"--tween-easing",!1));s(this,it,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,rt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,xt,new S.CSSProperty(this,"--damping",20));s(this,Lt,new S.CSSProperty(this,"--mass",0));s(this,zt,new S.CSSProperty(this,"--stiffness",0));s(this,It,new S.CSSProperty(this,"--mouse-drag",!1));s(this,_t,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,kt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,nt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ht,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,At,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ot,new S.CSSProperty(this,"--focus-delay",0));s(this,Rt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,lt,new S.CSSProperty(this,"--disabled",!1));s(this,ct,new S.CSSProperty(this,"--hibernate",!1));s(this,ut,null);s(this,p,null);s(this,Ht,null);s(this,l,[]);s(this,oe,0);s(this,le,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,at,null);s(this,D,null);s(this,E,null);s(this,x,new Je.Store(0));s(this,$t,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Wt);s(this,dt);s(this,j,new ts.Tweened);s(this,Ft,!1);s(this,B,null);s(this,P,!1);s(this,Nt,null);s(this,St,[]);s(this,L,()=>{if(t(this,ct).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,oe,this.vertical?Bt.getCumulativeOffsetTop(this):Bt.getCumulativeOffsetLeft(this)),h(this,le,this.vertical?Bt.getCumulativeOffsetTop(t(this,p)):Bt.getCumulativeOffsetLeft(t(this,p))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(f=>{f.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,C))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),f=t(this,m)-u;h(this,N,r.position+r.size+f)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,lt).current||c(this,o,ve).call(this):c(this,o,Ce).call(this),se.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()});s(this,ce,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,$t,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,ne).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,He).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,Ut,(e,i)=>{t(this,Et).current&&(c(this,o,ze).call(this,Math.sign(i)||1),t(this,ue).call(this,e,i))});s(this,ue,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,dt)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ot).current&&(clearInterval(t(this,Wt)),h(this,Wt,setTimeout(()=>{const r=t(this,l)[c(this,o,ne).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Rt).current,easing:Qe.easeInOutExpo}})},t(this,ot).current))),!(e.includes("drag")&&!es.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,st).current||t(this,it).current?{easing:t(this,st).current||"easeInOutCubic",duration:t(this,it).current||500}:void 0};t(this,Ft)?this.scrollToSection(c(this,o,ne).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ft,e==="drag")}});s(this,ae,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Le).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ns];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ut,document.createElement("div")),t(this,ut).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ht,document.createElement("slot")),t(this,p).appendChild(t(this,Ht)),t(this,ut).appendChild(t(this,p)),e.appendChild(t(this,ut)),h(this,Nt,new MutationObserver(De.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Et)}get axisCSSProperty(){return t(this,w)}get reverseCSSProperty(){return t(this,et)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,st)}get durationCSSProperty(){return t(this,it)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,rt)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,Lt)}get stiffnessCSSProperty(){return t(this,zt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,_t)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,kt)}get autoplayUserDirectionCSSProperty(){return t(this,nt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ht)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,At)}get focusDelayCSSProperty(){return t(this,ot)}get focusDurationCSSProperty(){return t(this,Rt)}get disabledCSSProperty(){return t(this,lt)}get hibernatedCSSProperty(){return t(this,ct)}get currentScrollValue(){return c(this,o,Ie).call(this,"current")}get targetScrollValue(){return c(this,o,Ie).call(this,"target")}get contentWrapperElement(){return t(this,ut)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,oe)}get contentPosition(){return t(this,le)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,$t)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,re).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>f?1:(this.currentProgress-u)/(f-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,_e).call(this,e),f=t(this,l)[r],y=t(this,l)[u];if(f&&y){let I=0;const Pe=c(this,o,ne).call(this),qt=t(this,l)[Pe],me=qt?this.targetScrollValue-qt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?I=t(this,m)+t(this,C)-f.position+t(this,k):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-f.position:I=y.position-f.position,this.shiftPosition(I-me,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,ze).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,dt)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,Te({},i.tween)),h(this,dt,setTimeout(()=>{h(this,dt,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new Ye.Damped(0,{damping:.01,min:0,order:ye.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new ge.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ut)),h(this,at,new ge.KeyboardControls({element:this})),t(this,at).changeEvent.subscribe(t(this,Ut)),h(this,D,new ge.DragControls({element:t(this,p),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,Ut)),h(this,E,new ge.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,ue)),t(this,w).subscribe(()=>{c(this,o,we).call(this)}),t(this,et).subscribe(()=>{c(this,o,we).call(this)}),t(this,rt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,w).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,re).call(this):c(this,o,Dt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,L).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,$t,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,Lt).subscribe(e=>{t(this,a).mass=e.current}),t(this,zt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,E).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,nt).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ht).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,At).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,Ce).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,ve).call(this))}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,xe).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Le).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,et).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,st).observe(),t(this,it).observe(),t(this,W).observe(),t(this,rt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,It).observe(),t(this,_t).observe(),t(this,A).observe(),t(this,A).observe(),t(this,kt).observe(),t(this,nt).observe(),t(this,R).observe(),t(this,ht).observe(),t(this,F).observe(),t(this,At).observe(),t(this,ot).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,ct).observe(),Ot.windowResizer.subscribe(t(this,ae),ye.RESIZE_ORDER.LAST),t(this,Nt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Et).unobserve(),t(this,w).unobserve(),t(this,et).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,st).unobserve(),t(this,it).unobserve(),t(this,W).unobserve(),t(this,rt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,It).unobserve(),t(this,_t).unobserve(),t(this,A).unobserve(),t(this,kt).unobserve(),t(this,nt).unobserve(),t(this,R).unobserve(),t(this,ht).unobserve(),t(this,F).unobserve(),t(this,At).unobserve(),t(this,ot).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),Ot.windowResizer.unsubscribe(t(this,ae)),c(this,o,xe).call(this),t(this,Nt).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,et=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,st=new WeakMap,it=new WeakMap,W=new WeakMap,rt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,It=new WeakMap,_t=new WeakMap,A=new WeakMap,kt=new WeakMap,nt=new WeakMap,R=new WeakMap,ht=new WeakMap,F=new WeakMap,At=new WeakMap,ot=new WeakMap,Rt=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,p=new WeakMap,Ht=new WeakMap,l=new WeakMap,oe=new WeakMap,le=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,at=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,$t=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Wt=new WeakMap,dt=new WeakMap,j=new WeakMap,Ft=new WeakMap,B=new WeakMap,P=new WeakMap,Nt=new WeakMap,St=new WeakMap,o=new WeakSet,we=function(){const e=t(this,w).current,i=t(this,et).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,rt).current?"max":e,t(this,at).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,L).call(this)},re=function(){c(this,o,Dt).call(this),t(this,Ht).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new rs(e,i,this))}),t(this,p).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,gt).call(this)},Dt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ce=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,ce)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Wt)),clearInterval(t(this,dt)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,at).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ve=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,ce),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,at).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},xe=function(){t(this,Z)||(h(this,Z,!0),Ot.windowResizer.unsubscribe(t(this,L)),he.elementResizer.unsubscribe(t(this,L)),c(this,o,Ce).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Dt).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Le=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,ve).call(this),Ot.windowResizer.subscribe(t(this,L),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,ce=new WeakMap,_e=function(e){let i=t(this,x).current;return t(this,v).current?i=Xe.loopNumber(e,t(this,l).length):i=Oe.clamp(e,0,this.limit),i},Ut=new WeakMap,ue=new WeakMap,ze=function(e=1){t(this,nt).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,kt).current,this.sectionalCSSProperty.current)},Ie=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ht).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),se.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,St,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=f?(r.setMark("current"),t(this,St).push(r)):u>=y&&u<y+I/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},He=function(){if(t(this,R).current){const e=Math.floor(t(this,St).length/2);t(this,St).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,St).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ne=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const f=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Pe=t(this,Ft)?I.size*f*-1*.4:0,qt=I.position;this.overscroll&&qt===0&&e&&(qt=t(this,N));let me=Math.abs(qt+Pe-i);me<=r&&(r=me,u=y)}return u},ae=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Tt);var de;class ke extends HTMLElement{constructor(){super(...arguments);s(this,de,null)}get scrollElement(){return t(this,de)}connectedCallback(){const e=Ve.findParentElement(this,Tt);e instanceof Tt?h(this,de,e):console.error(this,"e-scroll not found")}}de=new WeakMap;var pt,z,K,J,Gt,Zt,bt,jt,Se,pe;class $e extends ke{constructor(){super();s(this,pt,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Gt,0);s(this,Zt,0);s(this,bt,()=>{h(this,K,this.offsetWidth>this.offsetHeight);const e=t(this,K)?this.offsetWidth:this.offsetHeight;h(this,J,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,J,Math.max(t(this,J),30)),t(this,K)?(t(this,z).style.width=t(this,J)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,J)+"px"),h(this,Gt,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,jt).call(this)});s(this,jt,()=>{h(this,Zt,this.scrollElement.currentProgress*t(this,Gt)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Zt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Zt)}px, 0px)`});s(this,Se,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,pe,e=>{document.documentElement.classList.add("grabbing"),ss.setupDrag(u=>{const f=t(this,K)?u.x:u.y,y=this.scrollElement.distance/t(this,Gt),I=(f-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,K)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Be.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,pe)),Ot.windowResizer.subscribe(t(this,bt),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,bt)),he.elementResizer.subscribe(this.scrollElement,t(this,bt)),this.scrollElement.onScroll(t(this,jt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Se))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,pe)),Ot.windowResizer.unsubscribe(t(this,bt)),he.elementResizer.unsubscribe(t(this,bt)),this.scrollElement.offScroll(t(this,jt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Se))}}pt=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,bt=new WeakMap,jt=new WeakMap,Se=new WeakMap,pe=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",$e);var Kt,Jt,Qt;class We extends ke{constructor(){super();s(this,Kt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Jt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Qt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Kt).current,i=t(this,Jt).current,r=t(this,Qt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Kt).observe(),t(this,Jt).observe(),t(this,Qt).observe()}disconnectedCallback(){t(this,Kt).close(),t(this,Jt).close(),t(this,Qt).close()}}Kt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap;var Xt;class Fe extends We{constructor(){super(...arguments);s(this,Xt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xt).close()}}Xt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Fe);var Q,Yt;class Ne extends We{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Yt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Q).current>0&&this.scrollElement.scrollLine==="end"||t(this,Q).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Q).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Q).subscribe(()=>{t(this,Yt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Yt)),t(this,Yt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Yt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ne);var X,ft,te,be,fe,ee;class hs{constructor(n,e,i){s(this,X,null);s(this,ft,null);s(this,te,null);s(this,be,null);s(this,fe,()=>{t(this,ft).scrollToSection(t(this,te),{behaviour:t(this,be)})});s(this,ee,()=>{t(this,X).classList.toggle("current",t(this,ft).counter.current===t(this,te))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,ft,n),h(this,be,i),h(this,te,e),t(this,X).addEventListener("click",t(this,fe)),t(this,ft).counter.subscribe(t(this,ee)),t(this,ee).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,fe)),t(this,ft).counter.unsubscribe(t(this,ee)),t(this,X).remove()}}X=new WeakMap,ft=new WeakMap,te=new WeakMap,be=new WeakMap,fe=new WeakMap,ee=new WeakMap;var Mt,mt,Y;class Ue extends ke{constructor(){super(...arguments);s(this,Mt,null);s(this,mt,[]);s(this,Y,De.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new hs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Mt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Y)),this.scrollElement.loopCSSProperty.subscribe(t(this,Y)),h(this,Mt,document.createElement("div")),this.appendChild(t(this,Mt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Y)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,Y)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Mt).remove()}}Mt=new WeakMap,mt=new WeakMap,Y=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Ue);class Ge extends is.ScrollSegmentElement{connectedCallback(){const n=Ve.findParentElement(this,Tt);n instanceof Tt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Tt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ge);exports.ScrollBulletButtonsElement=Ue;exports.ScrollElement=Tt;exports.ScrollSegmentElement=Ge;exports.ScrollSetButtonElement=Fe;exports.ScrollStepButtonElement=Ne;exports.ScrollbarElement=$e;
@@ -13,7 +13,7 @@ var Me = (d, n, e) => n in d ? Ne(d, n, { enumerable: !0, configurable: !0, writ
13
13
  return d;
14
14
  };
15
15
  var ye = (d, n, e) => n.has(d) || Te("Cannot " + e);
16
- var t = (d, n, e) => (ye(d, n, "read from private field"), e ? e.call(d) : n.get(d)), s = (d, n, e) => n.has(d) ? Te("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, e), h = (d, n, e, i) => (ye(d, n, "write to private field"), i ? i.call(d, e) : n.set(d, e), e), l = (d, n, e) => (ye(d, n, "access private method"), e);
16
+ var t = (d, n, e) => (ye(d, n, "read from private field"), e ? e.call(d) : n.get(d)), s = (d, n, e) => n.has(d) ? Te("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, e), h = (d, n, e, i) => (ye(d, n, "write to private field"), i ? i.call(d, e) : n.set(d, e), e), c = (d, n, e) => (ye(d, n, "access private method"), e);
17
17
  import { S as Ge } from "../Store-swP_0ymB.js";
18
18
  import { i as H } from "../index-euf5anj6.js";
19
19
  import { a as Ke } from "../easings-Bni3YAAW.js";
@@ -31,7 +31,7 @@ import { WheelControls as Qe, KeyboardControls as Xe, DragControls as Ye, Autopl
31
31
  import { windowResizer as Rt } from "../window-resizer/index.js";
32
32
  import { scrollEntries as vt } from "../scroll-entries/index.js";
33
33
  import { cssUnitParser as Ve } from "../css-unit-parser/index.js";
34
- import { CSSProperty as f } from "../css-property/index.js";
34
+ import { CSSProperty as p } from "../css-property/index.js";
35
35
  import { device as es } from "../device/index.js";
36
36
  import { elementResizer as ne } from "../element-resizer/index.js";
37
37
  import { s as ss } from "../gestures-CcXV6fCp.js";
@@ -102,16 +102,16 @@ class rs {
102
102
  t(this, b).classList.toggle("middle", n);
103
103
  }
104
104
  setIndex(n) {
105
- l(this, Et, se).call(this, "index", n);
105
+ c(this, Et, se).call(this, "index", n);
106
106
  }
107
107
  setCurrentIndex(n) {
108
- l(this, Et, se).call(this, "current-index", n);
108
+ c(this, Et, se).call(this, "current-index", n);
109
109
  }
110
110
  setCurrentIndexArc(n) {
111
- l(this, Et, se).call(this, "current-index-arc", n);
111
+ c(this, Et, se).call(this, "current-index-arc", n);
112
112
  }
113
113
  setCurrentIndexArcAbs(n) {
114
- l(this, Et, se).call(this, "current-index-arc-abs", n);
114
+ c(this, Et, se).call(this, "current-index-arc-abs", n);
115
115
  }
116
116
  }
117
117
  b = new WeakMap(), Ht = new WeakMap(), g = new WeakMap(), yt = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), Ct = new WeakMap(), Et = new WeakSet(), se = function(n, e) {
@@ -155,93 +155,93 @@ const ns = Oe({
155
155
  flexShrink: "0"
156
156
  }
157
157
  });
158
- var u, wt, x, et, B, W, F, T, st, it, N, rt, xt, D, C, Pt, Lt, zt, It, $t, A, kt, nt, M, ht, q, At, ot, Mt, lt, ct, at, p, Bt, c, he, oe, y, S, k, V, ut, R, w, P, Wt, U, G, K, _, Ft, dt, Z, Nt, O, E, qt, ft, o, xe, ie, Vt, Se, ge, Pe, Le, L, le, Be, Ut, ce, ze, Ie, gt, We, re, ae;
158
+ var u, wt, x, et, B, W, F, T, st, it, N, rt, xt, D, C, Pt, Lt, zt, It, $t, A, kt, nt, M, ht, q, At, ot, Mt, lt, ct, at, f, Bt, l, he, oe, y, S, k, V, ut, R, w, P, Wt, U, G, K, _, Ft, dt, Z, Nt, O, E, qt, pt, o, xe, ie, Vt, Se, ge, Pe, Le, L, le, Be, Ut, ce, ze, Ie, gt, We, re, ae;
159
159
  class Ot extends HTMLElement {
160
160
  constructor() {
161
161
  super();
162
162
  s(this, o);
163
163
  s(this, u, null);
164
- s(this, wt, new f(this, "--controls", !0));
165
- s(this, x, new f(this, "--axis", "y"));
166
- s(this, et, new f(this, "--reverse", !1));
167
- s(this, B, new f(this, "--direction", 0));
168
- s(this, W, new f(this, "--pages", 0, {
164
+ s(this, wt, new p(this, "--controls", !0));
165
+ s(this, x, new p(this, "--axis", "y"));
166
+ s(this, et, new p(this, "--reverse", !1));
167
+ s(this, B, new p(this, "--direction", 0));
168
+ s(this, W, new p(this, "--pages", 0, {
169
169
  validate: (e) => Math.max(0, e - 1)
170
170
  }));
171
- s(this, F, new f(this, "--split", !1));
172
- s(this, T, new f(this, "--sectional", !1));
173
- s(this, st, new f(
171
+ s(this, F, new p(this, "--split", !1));
172
+ s(this, T, new p(this, "--sectional", !1));
173
+ s(this, st, new p(
174
174
  this,
175
175
  "--tween-easing",
176
176
  !1
177
177
  ));
178
- s(this, it, new f(
178
+ s(this, it, new p(
179
179
  this,
180
180
  "--tween-duration",
181
181
  !1
182
182
  ));
183
- s(this, N, new f(this, "--auto-size", !1));
184
- s(this, rt, new f(
183
+ s(this, N, new p(this, "--auto-size", !1));
184
+ s(this, rt, new p(
185
185
  this,
186
186
  "--wheel-max-delta",
187
187
  !1
188
188
  ));
189
- s(this, xt, new f(this, "--drag-inertion", 1));
190
- s(this, D, new f(
189
+ s(this, xt, new p(this, "--drag-inertion", 1));
190
+ s(this, D, new p(
191
191
  this,
192
192
  "--sections-in-view",
193
193
  1
194
194
  ));
195
- s(this, C, new f(this, "--loop", !1));
196
- s(this, Pt, new f(this, "--damping", 20));
197
- s(this, Lt, new f(this, "--mass", 0));
198
- s(this, zt, new f(this, "--stiffness", 0));
199
- s(this, It, new f(this, "--mouse-drag", !1));
200
- s(this, $t, new f(
195
+ s(this, C, new p(this, "--loop", !1));
196
+ s(this, Pt, new p(this, "--damping", 20));
197
+ s(this, Lt, new p(this, "--mass", 0));
198
+ s(this, zt, new p(this, "--stiffness", 0));
199
+ s(this, It, new p(this, "--mouse-drag", !1));
200
+ s(this, $t, new p(
201
201
  this,
202
202
  "--section-distance-scale",
203
203
  0.5
204
204
  ));
205
- s(this, A, new f(this, "--autoplay", 0));
206
- s(this, kt, new f(
205
+ s(this, A, new p(this, "--autoplay", 0));
206
+ s(this, kt, new p(
207
207
  this,
208
208
  "--autoplay-pause-duration",
209
209
  0
210
210
  ));
211
- s(this, nt, new f(
211
+ s(this, nt, new p(
212
212
  this,
213
213
  "--autoplay-user-direction",
214
214
  !1
215
215
  ));
216
- s(this, M, new f(this, "--classes", !1));
217
- s(this, ht, new f(
216
+ s(this, M, new p(this, "--classes", !1));
217
+ s(this, ht, new p(
218
218
  this,
219
219
  "--current-index-start-offset",
220
220
  0
221
221
  ));
222
- s(this, q, new f(
222
+ s(this, q, new p(
223
223
  this,
224
224
  "--current-index-end-offset",
225
225
  0
226
226
  ));
227
- s(this, At, new f(
227
+ s(this, At, new p(
228
228
  this,
229
229
  "--shift-section-position",
230
230
  0,
231
231
  { rawValueCheck: !1 }
232
232
  ));
233
- s(this, ot, new f(this, "--focus-delay", 0));
234
- s(this, Mt, new f(
233
+ s(this, ot, new p(this, "--focus-delay", 0));
234
+ s(this, Mt, new p(
235
235
  this,
236
236
  "--focus-duration",
237
237
  3e3
238
238
  ));
239
- s(this, lt, new f(this, "--disabled", !1));
240
- s(this, ct, new f(this, "--hibernate", !1));
239
+ s(this, lt, new p(this, "--disabled", !1));
240
+ s(this, ct, new p(this, "--hibernate", !1));
241
241
  s(this, at, null);
242
- s(this, p, null);
242
+ s(this, f, null);
243
243
  s(this, Bt, null);
244
- s(this, c, []);
244
+ s(this, l, []);
245
245
  s(this, he, 0);
246
246
  s(this, oe, 0);
247
247
  s(this, y, 0);
@@ -264,44 +264,44 @@ class Ot extends HTMLElement {
264
264
  s(this, O, null);
265
265
  s(this, E, !1);
266
266
  s(this, qt, null);
267
- s(this, ft, []);
267
+ s(this, pt, []);
268
268
  s(this, L, () => {
269
269
  if (t(this, ct).current)
270
270
  return;
271
271
  t(this, u).unlistenAnimationFrame();
272
272
  const e = this.currentScrollValue / t(this, S) || 0, i = t(this, P).current;
273
- if (h(this, he, this.vertical ? Ce(this) : Ee(this)), h(this, oe, this.vertical ? Ce(t(this, p)) : Ee(t(this, p))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, k, Ve.parse(
274
- getComputedStyle(t(this, p)).rowGap
273
+ if (h(this, he, this.vertical ? Ce(this) : Ee(this)), h(this, oe, this.vertical ? Ce(t(this, f)) : Ee(t(this, f))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, k, Ve.parse(
274
+ getComputedStyle(t(this, f)).rowGap
275
275
  )) : h(this, k, Ve.parse(
276
- getComputedStyle(t(this, p)).columnGap
277
- )), t(this, N).current && t(this, c).length) {
276
+ getComputedStyle(t(this, f)).columnGap
277
+ )), t(this, N).current && t(this, l).length) {
278
278
  const r = t(this, D).current, a = (t(this, y) - t(this, k) * (r - 1)) / r;
279
- t(this, c).forEach((m) => {
279
+ t(this, l).forEach((m) => {
280
280
  m.setSize(a);
281
281
  });
282
282
  } else
283
- t(this, c).forEach((r) => {
283
+ t(this, l).forEach((r) => {
284
284
  r.setSize();
285
285
  });
286
- if (t(this, c).forEach((r) => {
286
+ if (t(this, l).forEach((r) => {
287
287
  r.resize();
288
288
  }), t(this, W).current) {
289
289
  h(this, S, t(this, y) * t(this, W).current);
290
290
  const r = t(this, S) + t(this, y);
291
- this.vertical ? (t(this, p).style.width = r + "px", t(this, p).style.height = "100%") : (t(this, p).style.height = r + "px", t(this, p).style.width = "100%");
291
+ this.vertical ? (t(this, f).style.width = r + "px", t(this, f).style.height = "100%") : (t(this, f).style.height = r + "px", t(this, f).style.width = "100%");
292
292
  } else
293
- this.vertical ? (t(this, p).style.width = "100%", t(this, p).style.height = "max-content", h(this, S, t(this, p).offsetHeight - t(this, y))) : (t(this, p).style.width = "max-content", t(this, p).style.height = "100%", h(this, S, t(this, p).offsetWidth - t(this, y)));
293
+ this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", h(this, S, t(this, f).offsetHeight - t(this, y))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", h(this, S, t(this, f).offsetWidth - t(this, y)));
294
294
  if (!t(this, C).current) {
295
295
  const r = getComputedStyle(this), a = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
296
296
  h(this, S, t(this, S) + a), t(this, u).max = t(this, S);
297
297
  }
298
- if (t(this, C).current && t(this, c).length) {
299
- const r = t(this, c)[t(this, c).length - 1], a = r.position + r.size - t(this, y), m = t(this, S) - a;
298
+ if (t(this, C).current && t(this, l).length) {
299
+ const r = t(this, l)[t(this, l).length - 1], a = r.position + r.size - t(this, y), m = t(this, S) - a;
300
300
  h(this, U, r.position + r.size + m);
301
301
  } else
302
302
  h(this, U, t(this, S));
303
- if (t(this, T).current && t(this, c).length) {
304
- const r = t(this, c)[i];
303
+ if (t(this, T).current && t(this, l).length) {
304
+ const r = t(this, l)[i];
305
305
  t(this, u).set(r.position, {
306
306
  equalize: !0
307
307
  });
@@ -309,26 +309,26 @@ class Ot extends HTMLElement {
309
309
  t(this, u).set(e * t(this, S), {
310
310
  equalize: !0
311
311
  });
312
- h(this, G, (this.vertical ? t(this, p).offsetHeight : t(this, p).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, lt).current || l(this, o, ge).call(this) : l(this, o, Se).call(this), ee(this, "scrollResize", { custom: !0 }), t(this, u).notify();
312
+ h(this, G, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, lt).current || c(this, o, ge).call(this) : c(this, o, Se).call(this), ee(this, "scrollResize", { custom: !0 }), t(this, u).notify();
313
313
  });
314
314
  s(this, le, () => {
315
315
  if (!t(this, G) || t(this, _) || t(this, K))
316
316
  return;
317
317
  const e = this.currentScrollValue;
318
- if (h(this, Wt, Math.max(0, e - t(this, S))), t(this, c).length) {
319
- for (let i = 0; i < t(this, c).length; i++)
320
- t(this, c)[i].transform();
321
- t(this, P).current = l(this, o, re).call(this);
318
+ if (h(this, Wt, Math.max(0, e - t(this, S))), t(this, l).length) {
319
+ for (let i = 0; i < t(this, l).length; i++)
320
+ t(this, l)[i].transform();
321
+ t(this, P).current = c(this, o, re).call(this);
322
322
  } else
323
- this.vertical ? t(this, p).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, p).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
324
- l(this, o, We).call(this), vt.update(
323
+ this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
324
+ c(this, o, We).call(this), vt.update(
325
325
  this,
326
326
  t(this, x).current,
327
327
  e
328
328
  );
329
329
  });
330
330
  s(this, Ut, (e, i) => {
331
- t(this, wt).current && (l(this, o, ze).call(this, Math.sign(i) || 1), t(this, ce).call(this, e, i));
331
+ t(this, wt).current && (c(this, o, ze).call(this, Math.sign(i) || 1), t(this, ce).call(this, e, i));
332
332
  });
333
333
  s(this, ce, (e, i) => {
334
334
  if (t(this, B).current) {
@@ -338,7 +338,7 @@ class Ot extends HTMLElement {
338
338
  return;
339
339
  }
340
340
  if (t(this, dt) || t(this, Z).unlistenAnimationFrame(), !t(this, A).current && t(this, ot).current && (clearInterval(t(this, Ft)), h(this, Ft, setTimeout(() => {
341
- const r = t(this, c)[l(this, o, re).call(this)];
341
+ const r = t(this, l)[c(this, o, re).call(this)];
342
342
  r && this.scrollToSection(r.index, {
343
343
  tween: {
344
344
  duration: t(this, Mt).current,
@@ -348,14 +348,14 @@ class Ot extends HTMLElement {
348
348
  }, t(this, ot).current))), !(e.includes("drag") && !es.isTouch && !t(this, It).current)) {
349
349
  if (t(this, T).current && e !== "drag") {
350
350
  const r = Math.sign(i);
351
- if (t(this, c).length) {
351
+ if (t(this, l).length) {
352
352
  const a = {
353
353
  tween: t(this, st).current || t(this, it).current ? {
354
354
  easing: t(this, st).current || "easeInOutCubic",
355
355
  duration: t(this, it).current || 500
356
356
  } : void 0
357
357
  };
358
- t(this, Nt) ? this.scrollToSection(l(this, o, re).call(this, !0), a) : this.shiftSections(r, a);
358
+ t(this, Nt) ? this.scrollToSection(c(this, o, re).call(this, !0), a) : this.shiftSections(r, a);
359
359
  } else
360
360
  t(this, u).shift(r * t(this, y));
361
361
  } else
@@ -364,13 +364,13 @@ class Ot extends HTMLElement {
364
364
  }
365
365
  });
366
366
  s(this, ae, () => {
367
- h(this, E, !0), this.hibernatedCSSProperty.current || l(this, o, Le).call(this);
367
+ h(this, E, !0), this.hibernatedCSSProperty.current || c(this, o, Le).call(this);
368
368
  });
369
369
  if (H) {
370
370
  const e = this.attachShadow({ mode: "open" });
371
371
  e.adoptedStyleSheets = [ns];
372
372
  const i = document.createElement("div");
373
- i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, at, document.createElement("div")), t(this, at).className = "content-wrapper", h(this, p, document.createElement("div")), t(this, p).className = "content", h(this, Bt, document.createElement("slot")), t(this, p).appendChild(t(this, Bt)), t(this, at).appendChild(t(this, p)), e.appendChild(t(this, at)), h(this, qt, new MutationObserver(
373
+ i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, at, document.createElement("div")), t(this, at).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, Bt, document.createElement("slot")), t(this, f).appendChild(t(this, Bt)), t(this, at).appendChild(t(this, f)), e.appendChild(t(this, at)), h(this, qt, new MutationObserver(
374
374
  Re(() => {
375
375
  this.tryResplit();
376
376
  }, 10)
@@ -471,19 +471,19 @@ class Ot extends HTMLElement {
471
471
  return t(this, ct);
472
472
  }
473
473
  get currentScrollValue() {
474
- return l(this, o, Ie).call(this, "current");
474
+ return c(this, o, Ie).call(this, "current");
475
475
  }
476
476
  get targetScrollValue() {
477
- return l(this, o, Ie).call(this, "target");
477
+ return c(this, o, Ie).call(this, "target");
478
478
  }
479
479
  get contentWrapperElement() {
480
480
  return t(this, at);
481
481
  }
482
482
  get contentElement() {
483
- return t(this, p);
483
+ return t(this, f);
484
484
  }
485
485
  get sections() {
486
- return t(this, c);
486
+ return t(this, l);
487
487
  }
488
488
  get position() {
489
489
  return t(this, he);
@@ -505,7 +505,7 @@ class Ot extends HTMLElement {
505
505
  }
506
506
  get limit() {
507
507
  return Math.ceil(
508
- t(this, c).length - t(this, D).current
508
+ t(this, l).length - t(this, D).current
509
509
  );
510
510
  }
511
511
  get distance() {
@@ -539,7 +539,7 @@ class Ot extends HTMLElement {
539
539
  return t(this, x).current === "x" ? 0 : t(this, u).distance;
540
540
  }
541
541
  tryResplit() {
542
- !t(this, _) && (t(this, C).current || t(this, F).current || t(this, C).current || t(this, N).current || t(this, T).current) && l(this, o, ie).call(this);
542
+ !t(this, _) && (t(this, C).current || t(this, F).current || t(this, C).current || t(this, N).current || t(this, T).current) && c(this, o, ie).call(this);
543
543
  }
544
544
  onScroll(...e) {
545
545
  return t(this, u).subscribe(...e);
@@ -560,20 +560,20 @@ class Ot extends HTMLElement {
560
560
  return this.currentProgress >= a && this.currentProgress <= m;
561
561
  }
562
562
  scrollToSection(e, i) {
563
- if (!t(this, c).length)
563
+ if (!t(this, l).length)
564
564
  return;
565
- const r = t(this, P).current, a = l(this, o, Be).call(this, e), m = t(this, c)[r], v = t(this, c)[a];
565
+ const r = t(this, P).current, a = c(this, o, Be).call(this, e), m = t(this, l)[r], v = t(this, l)[a];
566
566
  if (m && v) {
567
567
  let I = 0;
568
- const ve = l(this, o, re).call(this), Dt = t(this, c)[ve], me = Dt ? this.targetScrollValue - Dt.position : 0;
569
- t(this, C).current ? a === 0 && r === t(this, c).length - 1 ? I = t(this, S) + t(this, y) - m.position + t(this, k) : a === t(this, c).length - 1 && r === 0 ? I = v.position - (t(this, S) + t(this, y) + t(this, k)) : I = v.position - m.position : I = v.position - m.position, this.shiftPosition(I - me, i);
568
+ const ve = c(this, o, re).call(this), Dt = t(this, l)[ve], me = Dt ? this.targetScrollValue - Dt.position : 0;
569
+ t(this, C).current ? a === 0 && r === t(this, l).length - 1 ? I = t(this, S) + t(this, y) - m.position + t(this, k) : a === t(this, l).length - 1 && r === 0 ? I = v.position - (t(this, S) + t(this, y) + t(this, k)) : I = v.position - m.position : I = v.position - m.position, this.shiftPosition(I - me, i);
570
570
  }
571
571
  }
572
572
  shiftSections(e, i) {
573
- t(this, c).length && this.scrollToSection(t(this, P).current + e, i);
573
+ t(this, l).length && this.scrollToSection(t(this, P).current + e, i);
574
574
  }
575
575
  setPosition(e, i) {
576
- l(this, o, ze).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, dt) || (t(this, Z).set(t(this, u).current, { equalize: !0 }), t(this, Z).set(e, De({}, i.tween)), h(this, dt, setTimeout(() => {
576
+ c(this, o, ze).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, dt) || (t(this, Z).set(t(this, u).current, { equalize: !0 }), t(this, Z).set(e, De({}, i.tween)), h(this, dt, setTimeout(() => {
577
577
  h(this, dt, void 0);
578
578
  }, i.tween.duration || 0))) : t(this, u).set(e, {
579
579
  equalize: (i == null ? void 0 : i.behaviour) === "instant"
@@ -587,19 +587,19 @@ class Ot extends HTMLElement {
587
587
  damping: 0.01,
588
588
  min: 0,
589
589
  order: Ze.SCROLL
590
- })), this.setAttribute("tabindex", "0"), h(this, V, new Qe({ element: t(this, p) })), t(this, V).changeEvent.subscribe(t(this, Ut)), h(this, ut, new Xe({
590
+ })), this.setAttribute("tabindex", "0"), h(this, V, new Qe({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Ut)), h(this, ut, new Xe({
591
591
  element: this
592
592
  })), t(this, ut).changeEvent.subscribe(
593
593
  t(this, Ut)
594
594
  ), h(this, R, new Ye({
595
- element: t(this, p),
595
+ element: t(this, f),
596
596
  rootElement: this
597
597
  })), t(this, R).changeEvent.subscribe(t(this, Ut)), h(this, w, new ts({
598
598
  culling: this
599
599
  })), t(this, w).changeEvent.subscribe(t(this, ce)), t(this, x).subscribe(() => {
600
- l(this, o, xe).call(this);
600
+ c(this, o, xe).call(this);
601
601
  }), t(this, et).subscribe(() => {
602
- l(this, o, xe).call(this);
602
+ c(this, o, xe).call(this);
603
603
  }), t(this, rt).subscribe((e) => {
604
604
  t(this, V).axis = e.current ? "max" : t(this, x).current;
605
605
  }), t(this, xt).subscribe((e) => {
@@ -607,15 +607,15 @@ class Ot extends HTMLElement {
607
607
  }), t(this, W).subscribe(() => {
608
608
  t(this, E) && t(this, L).call(this);
609
609
  }), t(this, F).subscribe(({ current: e }) => {
610
- t(this, E) && (e ? l(this, o, ie).call(this) : l(this, o, Vt).call(this));
610
+ t(this, E) && (e ? c(this, o, ie).call(this) : c(this, o, Vt).call(this));
611
611
  }), t(this, T).subscribe((e) => {
612
- t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, E) && (e.current && !e.previous && !t(this, c).length ? l(this, o, ie).call(this) : !e.current && e.previous && t(this, c).length && l(this, o, Vt).call(this));
612
+ t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, E) && (e.current && !e.previous && !t(this, l).length ? c(this, o, ie).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Vt).call(this));
613
613
  }), t(this, N).subscribe((e) => {
614
- t(this, E) && (t(this, L).call(this), e.current && !e.previous && !t(this, c).length ? l(this, o, ie).call(this) : !e.current && e.previous && t(this, c).length && l(this, o, Vt).call(this));
614
+ t(this, E) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, ie).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Vt).call(this));
615
615
  }), t(this, D).subscribe((e) => {
616
- t(this, E) && (t(this, L).call(this), l(this, o, gt).call(this));
616
+ t(this, E) && (t(this, L).call(this), c(this, o, gt).call(this));
617
617
  }), t(this, C).subscribe((e) => {
618
- e.current ? (t(this, E) && (t(this, c).length || (t(this, F).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (h(this, Wt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
618
+ e.current ? (t(this, E) && (t(this, l).length || (t(this, F).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (h(this, Wt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
619
619
  }), t(this, Pt).subscribe((e) => {
620
620
  t(this, u).damping = e.current;
621
621
  }), t(this, Lt).subscribe((e) => {
@@ -627,43 +627,43 @@ class Ot extends HTMLElement {
627
627
  }), t(this, nt).subscribe((e) => {
628
628
  e.current || (t(this, w).direction = 1);
629
629
  }), t(this, M).subscribe((e) => {
630
- t(this, E) && l(this, o, gt).call(this);
630
+ t(this, E) && c(this, o, gt).call(this);
631
631
  }), t(this, ht).subscribe((e) => {
632
- t(this, E) && t(this, M).current && l(this, o, gt).call(this);
632
+ t(this, E) && t(this, M).current && c(this, o, gt).call(this);
633
633
  }), t(this, q).subscribe((e) => {
634
- t(this, E) && t(this, M).current && l(this, o, gt).call(this);
634
+ t(this, E) && t(this, M).current && c(this, o, gt).call(this);
635
635
  }), t(this, At).subscribe((e) => {
636
636
  t(this, E) && t(this, u).notify();
637
637
  }), t(this, u).isRunning.subscribe((e) => {
638
638
  this.classList.toggle("active", e.current);
639
639
  }), t(this, P).subscribe((e) => {
640
- t(this, c).length && l(this, o, gt).call(this), this.style.setProperty("--counter", e.current + "");
640
+ t(this, l).length && c(this, o, gt).call(this), this.style.setProperty("--counter", e.current + "");
641
641
  }), t(this, Z).subscribe((e) => {
642
642
  t(this, Z).isRunning.current && t(this, u).set(e.current, { equalize: !0 });
643
643
  }), t(this, lt).subscribe((e) => {
644
- e.current && !e.previous ? (this.classList.add("disabled"), l(this, o, Se).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), l(this, o, ge).call(this));
644
+ e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, Se).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, ge).call(this));
645
645
  }), t(this, ct).subscribe((e) => {
646
- e.current && !e.previous ? (this.classList.add("hibernated"), l(this, o, Pe).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), l(this, o, Le).call(this));
646
+ e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, Pe).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, Le).call(this));
647
647
  }), t(this, wt).observe(), t(this, x).observe(), t(this, et).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, T).observe(), t(this, st).observe(), t(this, it).observe(), t(this, N).observe(), t(this, rt).observe(), t(this, xt).observe(), t(this, D).observe(), t(this, C).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, It).observe(), t(this, $t).observe(), t(this, A).observe(), t(this, A).observe(), t(this, kt).observe(), t(this, nt).observe(), t(this, M).observe(), t(this, ht).observe(), t(this, q).observe(), t(this, At).observe(), t(this, ot).observe(), t(this, Mt).observe(), t(this, lt).observe(), t(this, ct).observe(), Rt.subscribe(t(this, ae), we.LAST), t(this, qt).observe(this, { childList: !0 });
648
648
  }
649
649
  disconnectedCallback() {
650
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, wt).unobserve(), t(this, x).unobserve(), t(this, et).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, T).unobserve(), t(this, st).unobserve(), t(this, it).unobserve(), t(this, N).unobserve(), t(this, rt).unobserve(), t(this, xt).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, It).unobserve(), t(this, $t).unobserve(), t(this, A).unobserve(), t(this, kt).unobserve(), t(this, nt).unobserve(), t(this, M).unobserve(), t(this, ht).unobserve(), t(this, q).unobserve(), t(this, At).unobserve(), t(this, ot).unobserve(), t(this, Mt).unobserve(), t(this, lt).unobserve(), t(this, ct).unobserve(), Rt.unsubscribe(t(this, ae)), l(this, o, Pe).call(this), t(this, qt).disconnect();
650
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, wt).unobserve(), t(this, x).unobserve(), t(this, et).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, T).unobserve(), t(this, st).unobserve(), t(this, it).unobserve(), t(this, N).unobserve(), t(this, rt).unobserve(), t(this, xt).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, It).unobserve(), t(this, $t).unobserve(), t(this, A).unobserve(), t(this, kt).unobserve(), t(this, nt).unobserve(), t(this, M).unobserve(), t(this, ht).unobserve(), t(this, q).unobserve(), t(this, At).unobserve(), t(this, ot).unobserve(), t(this, Mt).unobserve(), t(this, lt).unobserve(), t(this, ct).unobserve(), Rt.unsubscribe(t(this, ae)), c(this, o, Pe).call(this), t(this, qt).disconnect();
651
651
  }
652
652
  }
653
- u = new WeakMap(), wt = new WeakMap(), x = new WeakMap(), et = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), T = new WeakMap(), st = new WeakMap(), it = new WeakMap(), N = new WeakMap(), rt = new WeakMap(), xt = new WeakMap(), D = new WeakMap(), C = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), A = new WeakMap(), kt = new WeakMap(), nt = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), q = new WeakMap(), At = new WeakMap(), ot = new WeakMap(), Mt = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), p = new WeakMap(), Bt = new WeakMap(), c = new WeakMap(), he = new WeakMap(), oe = new WeakMap(), y = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), ut = new WeakMap(), R = new WeakMap(), w = new WeakMap(), P = new WeakMap(), Wt = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), Ft = new WeakMap(), dt = new WeakMap(), Z = new WeakMap(), Nt = new WeakMap(), O = new WeakMap(), E = new WeakMap(), qt = new WeakMap(), ft = new WeakMap(), o = new WeakSet(), xe = function() {
653
+ u = new WeakMap(), wt = new WeakMap(), x = new WeakMap(), et = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), T = new WeakMap(), st = new WeakMap(), it = new WeakMap(), N = new WeakMap(), rt = new WeakMap(), xt = new WeakMap(), D = new WeakMap(), C = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), A = new WeakMap(), kt = new WeakMap(), nt = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), q = new WeakMap(), At = new WeakMap(), ot = new WeakMap(), Mt = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), f = new WeakMap(), Bt = new WeakMap(), l = new WeakMap(), he = new WeakMap(), oe = new WeakMap(), y = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), ut = new WeakMap(), R = new WeakMap(), w = new WeakMap(), P = new WeakMap(), Wt = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), Ft = new WeakMap(), dt = new WeakMap(), Z = new WeakMap(), Nt = new WeakMap(), O = new WeakMap(), E = new WeakMap(), qt = new WeakMap(), pt = new WeakMap(), o = new WeakSet(), xe = function() {
654
654
  const e = t(this, x).current, i = t(this, et).current ? "-reverse" : "";
655
- t(this, p).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, rt).current ? "max" : e, t(this, ut).dimension = e === "x" ? "width" : "height", t(this, R).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, E) && t(this, L).call(this);
655
+ t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, rt).current ? "max" : e, t(this, ut).dimension = e === "x" ? "width" : "height", t(this, R).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, E) && t(this, L).call(this);
656
656
  }, ie = function() {
657
- l(this, o, Vt).call(this), t(this, Bt).assignedElements().forEach((e, i) => {
658
- e instanceof HTMLElement && t(this, c).push(new rs(e, i, this));
659
- }), t(this, p).style.transform = "", ee(this, "scrollSectionsChange", {
657
+ c(this, o, Vt).call(this), t(this, Bt).assignedElements().forEach((e, i) => {
658
+ e instanceof HTMLElement && t(this, l).push(new rs(e, i, this));
659
+ }), t(this, f).style.transform = "", this.style.setProperty("--sections", t(this, l).length.toString()), ee(this, "scrollSectionsChange", {
660
660
  custom: !0,
661
661
  composed: !0
662
- }), t(this, L).call(this), l(this, o, gt).call(this);
662
+ }), t(this, L).call(this), c(this, o, gt).call(this);
663
663
  }, Vt = function() {
664
- t(this, c).forEach((e) => {
664
+ t(this, l).forEach((e) => {
665
665
  e.destroy();
666
- }), h(this, c, []), t(this, P).reset(), t(this, u).reset(), ee(this, "scrollSectionsChange", {
666
+ }), h(this, l, []), t(this, P).reset(), t(this, u).reset(), ee(this, "scrollSectionsChange", {
667
667
  custom: !0,
668
668
  composed: !0
669
669
  });
@@ -674,42 +674,42 @@ u = new WeakMap(), wt = new WeakMap(), x = new WeakMap(), et = new WeakMap(), B
674
674
  }, ge = function() {
675
675
  t(this, K) && (h(this, K, !1), t(this, u).subscribe(t(this, le), -1e4), t(this, u).notify(), t(this, V).connect(), t(this, ut).connect(), t(this, R).connect(), t(this, A).current && t(this, w).connect());
676
676
  }, Pe = function() {
677
- t(this, _) || (h(this, _, !0), Rt.unsubscribe(t(this, L)), ne.unsubscribe(t(this, L)), l(this, o, Se).call(this), t(this, p).style.transform = "", t(this, p).style.height = "", t(this, p).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, c).length ? l(this, o, Vt).call(this) : (t(this, P).reset(), t(this, u).reset()), vt.unregister(this));
677
+ t(this, _) || (h(this, _, !0), Rt.unsubscribe(t(this, L)), ne.unsubscribe(t(this, L)), c(this, o, Se).call(this), t(this, f).style.transform = "", t(this, f).style.height = "", t(this, f).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, Vt).call(this) : (t(this, P).reset(), t(this, u).reset()), vt.unregister(this));
678
678
  }, Le = function() {
679
- t(this, _) && (h(this, _, !1), vt.register(this), this.tryResplit(), l(this, o, ge).call(this), Rt.subscribe(t(this, L), we.SCROLL), ne.subscribe(this, t(this, L)));
679
+ t(this, _) && (h(this, _, !1), vt.register(this), this.tryResplit(), c(this, o, ge).call(this), Rt.subscribe(t(this, L), we.SCROLL), ne.subscribe(this, t(this, L)));
680
680
  }, L = new WeakMap(), le = new WeakMap(), Be = function(e) {
681
681
  let i = t(this, P).current;
682
- return t(this, C).current ? i = _e(e, t(this, c).length) : i = He(e, 0, this.limit), i;
682
+ return t(this, C).current ? i = _e(e, t(this, l).length) : i = He(e, 0, this.limit), i;
683
683
  }, Ut = new WeakMap(), ce = new WeakMap(), ze = function(e = 1) {
684
684
  t(this, nt).current && (t(this, w).direction = e), t(this, A).current && t(this, w).pauseAndContinue(
685
685
  t(this, kt).current,
686
686
  this.sectionalCSSProperty.current
687
687
  );
688
688
  }, Ie = function(e = "current") {
689
- if (t(this, C).current && t(this, c).length) {
689
+ if (t(this, C).current && t(this, l).length) {
690
690
  const i = t(this, u)[e] % Math.round(t(this, S) + t(this, y) + t(this, k));
691
691
  return i < 0 ? t(this, S) + i + t(this, y) + t(this, k) : i;
692
692
  } else
693
693
  return t(this, u)[e];
694
694
  }, gt = function() {
695
- if (t(this, c).length) {
695
+ if (t(this, l).length) {
696
696
  const e = t(this, P).current + t(this, ht).current;
697
697
  if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null), ee(this, "scrollLine", {
698
698
  detail: { line: t(this, O) }
699
699
  }), t(this, M).current) {
700
700
  this.classList.remove("end", "start"), t(this, O) && this.classList.add(t(this, O));
701
701
  const i = t(this, D).current + t(this, q).current;
702
- h(this, ft, []), t(this, c).forEach((r, a) => {
702
+ h(this, pt, []), t(this, l).forEach((r, a) => {
703
703
  r.setCurrentIndex(null), r.setCurrentIndexArc(null), r.setCurrentIndexArcAbs(null), r.setMiddle(!1);
704
704
  const m = e - this.limit - 1 + t(this, q).current, v = e + i, I = this.sections.length - v;
705
- a >= e && a < v || a <= m ? (r.setMark("current"), t(this, ft).push(r)) : a >= v && a < v + I / 2 || a <= m + i ? r.setMark("next") : r.setMark("previous");
705
+ a >= e && a < v || a <= m ? (r.setMark("current"), t(this, pt).push(r)) : a >= v && a < v + I / 2 || a <= m + i ? r.setMark("next") : r.setMark("previous");
706
706
  });
707
707
  }
708
708
  }
709
709
  }, We = function() {
710
710
  if (t(this, M).current) {
711
- const e = Math.floor(t(this, ft).length / 2);
712
- t(this, ft).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, ft).forEach((i, r) => {
711
+ const e = Math.floor(t(this, pt).length / 2);
712
+ t(this, pt).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, pt).forEach((i, r) => {
713
713
  const a = r - e;
714
714
  i.setCurrentIndex(r), i.setCurrentIndexArc(a), i.setCurrentIndexArcAbs(Math.abs(a)), i.setMiddle(r === e);
715
715
  });
@@ -717,8 +717,8 @@ u = new WeakMap(), wt = new WeakMap(), x = new WeakMap(), et = new WeakMap(), B
717
717
  }, re = function(e = !1) {
718
718
  let i = this.targetScrollValue, r = 1 / 0, a = 0;
719
719
  const m = t(this, u).direction;
720
- for (let v = 0; v < t(this, c).length; v++) {
721
- const I = t(this, c)[v];
720
+ for (let v = 0; v < t(this, l).length; v++) {
721
+ const I = t(this, l)[v];
722
722
  let ve = t(this, Nt) ? I.size * m * -1 * 0.4 : 0, Dt = I.position;
723
723
  this.overscroll && Dt === 0 && e && (Dt = t(this, U));
724
724
  let me = Math.abs(Dt + ve - i);
@@ -742,11 +742,11 @@ class ke extends HTMLElement {
742
742
  }
743
743
  }
744
744
  ue = new WeakMap();
745
- var pt, z, j, J, Gt, Kt, bt, _t, de, fe;
745
+ var ft, z, j, J, Gt, Kt, bt, _t, de, pe;
746
746
  class hs extends ke {
747
747
  constructor() {
748
748
  super();
749
- s(this, pt, null);
749
+ s(this, ft, null);
750
750
  s(this, z, null);
751
751
  s(this, j, !1);
752
752
  s(this, J, 0);
@@ -763,7 +763,7 @@ class hs extends ke {
763
763
  s(this, de, () => {
764
764
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
765
765
  });
766
- s(this, fe, (e) => {
766
+ s(this, pe, (e) => {
767
767
  document.documentElement.classList.add("grabbing"), ss(
768
768
  (a) => {
769
769
  const m = t(this, j) ? a.x : a.y, v = this.scrollElement.distance / t(this, Gt), I = (m - r) * v;
@@ -807,7 +807,7 @@ class hs extends ke {
807
807
  touchAction: "none"
808
808
  }
809
809
  })
810
- ], h(this, pt, document.createElement("slot")), t(this, pt).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, pt));
810
+ ], h(this, ft, document.createElement("slot")), t(this, ft).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, ft));
811
811
  }
812
812
  }
813
813
  get thumbElement() {
@@ -815,26 +815,26 @@ class hs extends ke {
815
815
  }
816
816
  connectedCallback() {
817
817
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
818
- const e = t(this, pt).assignedElements()[0] || t(this, pt).firstElementChild;
819
- h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, fe)), Rt.subscribe(t(this, bt), we.SCROLL), ne.subscribe(this, t(this, bt)), ne.subscribe(this.scrollElement, t(this, bt)), this.scrollElement.onScroll(t(this, _t)), this.scrollElement.axisCSSProperty.subscribe(t(this, de));
818
+ const e = t(this, ft).assignedElements()[0] || t(this, ft).firstElementChild;
819
+ h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, pe)), Rt.subscribe(t(this, bt), we.SCROLL), ne.subscribe(this, t(this, bt)), ne.subscribe(this.scrollElement, t(this, bt)), this.scrollElement.onScroll(t(this, _t)), this.scrollElement.axisCSSProperty.subscribe(t(this, de));
820
820
  }
821
821
  disconnectedCallback() {
822
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, fe)), Rt.unsubscribe(t(this, bt)), ne.unsubscribe(t(this, bt)), this.scrollElement.offScroll(t(this, _t)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, de));
822
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, pe)), Rt.unsubscribe(t(this, bt)), ne.unsubscribe(t(this, bt)), this.scrollElement.offScroll(t(this, _t)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, de));
823
823
  }
824
824
  }
825
- pt = new WeakMap(), z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), Gt = new WeakMap(), Kt = new WeakMap(), bt = new WeakMap(), _t = new WeakMap(), de = new WeakMap(), fe = new WeakMap();
825
+ ft = new WeakMap(), z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), Gt = new WeakMap(), Kt = new WeakMap(), bt = new WeakMap(), _t = new WeakMap(), de = new WeakMap(), pe = new WeakMap();
826
826
  H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", hs);
827
827
  var Zt, jt, Jt;
828
828
  class Fe extends ke {
829
829
  constructor() {
830
830
  super();
831
- s(this, Zt, new f(this, "--behaviour", "smooth"));
832
- s(this, jt, new f(
831
+ s(this, Zt, new p(this, "--behaviour", "smooth"));
832
+ s(this, jt, new p(
833
833
  this,
834
834
  "--tween-easing",
835
835
  !1
836
836
  ));
837
- s(this, Jt, new f(this, "--tween-duration", 0));
837
+ s(this, Jt, new p(this, "--tween-duration", 0));
838
838
  H && this.addEventListener("click", () => {
839
839
  const e = t(this, Zt).current, i = t(this, jt).current, r = t(this, Jt).current;
840
840
  this.handleClick({
@@ -855,7 +855,7 @@ var Qt;
855
855
  class os extends Fe {
856
856
  constructor() {
857
857
  super(...arguments);
858
- s(this, Qt, new f(this, "--set", 1));
858
+ s(this, Qt, new p(this, "--set", 1));
859
859
  }
860
860
  handleClick(e) {
861
861
  this.scrollElement.scrollToSection(t(this, Qt).current, e);
@@ -873,7 +873,7 @@ var Q, Xt;
873
873
  class ls extends Fe {
874
874
  constructor() {
875
875
  super(...arguments);
876
- s(this, Q, new f(this, "--step", 1));
876
+ s(this, Q, new p(this, "--step", 1));
877
877
  s(this, Xt, () => {
878
878
  this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, Q).current > 0 && this.scrollElement.scrollLine === "end" || t(this, Q).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
879
879
  });
@@ -895,16 +895,16 @@ class ls extends Fe {
895
895
  }
896
896
  Q = new WeakMap(), Xt = new WeakMap();
897
897
  H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ls);
898
- var X, mt, Yt, pe, be, te;
898
+ var X, mt, Yt, fe, be, te;
899
899
  class cs {
900
900
  constructor(n, e, i) {
901
901
  s(this, X, null);
902
902
  s(this, mt, null);
903
903
  s(this, Yt, null);
904
- s(this, pe, null);
904
+ s(this, fe, null);
905
905
  s(this, be, () => {
906
906
  t(this, mt).scrollToSection(t(this, Yt), {
907
- behaviour: t(this, pe)
907
+ behaviour: t(this, fe)
908
908
  });
909
909
  });
910
910
  s(this, te, () => {
@@ -913,7 +913,7 @@ class cs {
913
913
  t(this, mt).counter.current === t(this, Yt)
914
914
  );
915
915
  });
916
- H && (h(this, X, document.createElement("button")), h(this, mt, n), h(this, pe, i), h(this, Yt, e), t(this, X).addEventListener("click", t(this, be)), t(this, mt).counter.subscribe(t(this, te)), t(this, te).call(this));
916
+ H && (h(this, X, document.createElement("button")), h(this, mt, n), h(this, fe, i), h(this, Yt, e), t(this, X).addEventListener("click", t(this, be)), t(this, mt).counter.subscribe(t(this, te)), t(this, te).call(this));
917
917
  }
918
918
  get element() {
919
919
  return t(this, X);
@@ -922,7 +922,7 @@ class cs {
922
922
  t(this, X).removeEventListener("click", t(this, be)), t(this, mt).counter.unsubscribe(t(this, te)), t(this, X).remove();
923
923
  }
924
924
  }
925
- X = new WeakMap(), mt = new WeakMap(), Yt = new WeakMap(), pe = new WeakMap(), be = new WeakMap(), te = new WeakMap();
925
+ X = new WeakMap(), mt = new WeakMap(), Yt = new WeakMap(), fe = new WeakMap(), be = new WeakMap(), te = new WeakMap();
926
926
  var Tt, St, Y;
927
927
  class as extends ke {
928
928
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.51.8",
3
+ "version": "0.51.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"