aptechka 0.50.26 → 0.50.28

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.
@@ -48,6 +48,7 @@ export declare class ScrollElement extends HTMLElement {
48
48
  get classesCSSProperty(): CSSProperty<boolean>;
49
49
  get currentIndexStartOffsetCSSProperty(): CSSProperty<number>;
50
50
  get currentIndexEndOffsetCSSProperty(): CSSProperty<number>;
51
+ get shiftSectionPositionCSSProperty(): CSSProperty<number>;
51
52
  get focusDelayCSSProperty(): CSSProperty<number>;
52
53
  get focusDurationCSSProperty(): CSSProperty<number>;
53
54
  get disabledCSSProperty(): CSSProperty<boolean>;
@@ -1 +1 @@
1
- "use strict";var Ne=Object.defineProperty;var Ie=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var Ae=a=>{throw TypeError(a)};var ke=(a,n,e)=>n in a?Ne(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,Re=(a,n)=>{for(var e in n||(n={}))Ue.call(n,e)&&ke(a,e,n[e]);if(Ie)for(var e of Ie(n))Ge.call(n,e)&&ke(a,e,n[e]);return a};var ve=(a,n,e)=>n.has(a)||Ae("Cannot "+e);var t=(a,n,e)=>(ve(a,n,"read from private field"),e?e.call(a):n.get(a)),s=(a,n,e)=>n.has(a)?Ae("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),h=(a,n,e,i)=>(ve(a,n,"write to private field"),i?i.call(a,e):n.set(a,e),e),l=(a,n,e)=>(ve(a,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ze=require("../Store-DRp_K37w.cjs"),O=require("../index-Cqw2NKev.cjs"),je=require("../easings-GegIwET5.cjs"),te=require("../events-KVanG9sR.cjs"),Te=require("../jss-CRBgdvJ3.cjs"),qt=require("../layout-Ctc2p3uz.cjs"),qe=require("../math-GDWEqu7y.cjs"),Ke=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const me=require("../order/index.cjs"),Je=require("../Damped-B1lXa9nb.cjs"),Qe=require("../Tweened-cJ36zq1A.cjs"),fe=require("../controls/index.cjs"),Dt=require("../window-resizer/index.cjs"),gt=require("../scroll-entries/index.cjs"),Me=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Xe=require("../device/index.cjs"),re=require("../element-resizer/index.cjs"),Ye=require("../gestures-C7gbKx11.cjs"),De=require("../dom-JBOkFLTh.cjs"),ts=require("../function-MthRj-GJ.cjs"),es=require("../scroll-segment/index.cjs");var b,Bt,g,yt,V,Y,Ct,vt,ee;class ss{constructor(n,e,i){s(this,vt);s(this,b);s(this,Bt);s(this,g);s(this,yt,0);s(this,V,0);s(this,Y,null);s(this,Ct,0);h(this,b,n),h(this,Bt,e),h(this,g,i),gt.scrollEntries.register(t(this,b)),this.setIndex(t(this,Bt))}get element(){return t(this,b)}get index(){return t(this,Bt)}get size(){return t(this,yt)}get position(){return t(this,V)}get transformPosition(){return t(this,Ct)}destroy(){gt.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,yt,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?qt.getCumulativeOffsetTop(t(this,b)):qt.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let n=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,yt)<t(this,g).currentScrollValue&&(n=t(this,g).distance*-1-t(this,g).gap),gt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,n);const i=t(this,g).currentScrollValue+n,r=t(this,V)-t(this,g).viewportSize-e,u=t(this,V)+t(this,yt)+e,f=qe.clamp(i,r,u);h(this,Ct,f*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,Ct)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,Ct)}px, 0px, 0px)`}setMark(n){t(this,Y)!==n&&(t(this,Y)&&t(this,b).classList.remove(t(this,Y)),n&&t(this,b).classList.add(n),h(this,Y,n),te.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Y)},custom:!0}))}setMiddle(n){t(this,b).classList.toggle("middle",n)}setIndex(n){l(this,vt,ee).call(this,"index",n)}setCurrentIndex(n){l(this,vt,ee).call(this,"current-index",n)}setCurrentIndexArc(n){l(this,vt,ee).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){l(this,vt,ee).call(this,"current-index-arc-abs",n)}}b=new WeakMap,Bt=new WeakMap,g=new WeakMap,yt=new WeakMap,V=new WeakMap,Y=new WeakMap,Ct=new WeakMap,vt=new WeakSet,ee=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 is=Te.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 d,wt,P,tt,_,H,$,M,et,st,W,it,Et,T,v,Pt,xt,Lt,zt,Ot,A,It,rt,R,nt,F,ht,kt,ot,lt,ct,p,Vt,c,ne,he,y,m,k,q,ut,D,w,x,_t,N,U,G,Z,Ht,at,j,$t,B,E,oe,dt,o,we,se,Tt,ge,ye,Ee,Pe,L,Wt,Be,Ft,le,xe,Le,mt,Oe,ie,ce;class Rt extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,wt,new S.CSSProperty(this,"--controls",!0));s(this,P,new S.CSSProperty(this,"--axis","y"));s(this,tt,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,et,new S.CSSProperty(this,"--tween-easing",!1));s(this,st,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,it,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,Et,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,Pt,new S.CSSProperty(this,"--damping",20));s(this,xt,new S.CSSProperty(this,"--mass",0));s(this,Lt,new S.CSSProperty(this,"--stiffness",0));s(this,zt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Ot,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,It,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,rt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,nt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,ht,new S.CSSProperty(this,"--focus-delay",0));s(this,kt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ot,new S.CSSProperty(this,"--disabled",!1));s(this,lt,new S.CSSProperty(this,"--hibernate",!1));s(this,ct,null);s(this,p,null);s(this,Vt,null);s(this,c,[]);s(this,ne,0);s(this,he,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,ut,null);s(this,D,null);s(this,w,null);s(this,x,new Ze.Store(0));s(this,_t,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Ht);s(this,at);s(this,j,new Qe.Tweened);s(this,$t,!1);s(this,B,null);s(this,E,!1);s(this,oe,null);s(this,dt,[]);s(this,L,()=>{if(t(this,lt).current)return;t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,ne,this.vertical?qt.getCumulativeOffsetTop(this):qt.getCumulativeOffsetLeft(this)),h(this,he,this.vertical?qt.getCumulativeOffsetTop(t(this,p)):qt.getCumulativeOffsetLeft(t(this,p))),h(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,Me.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,Me.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,c).length){const r=t(this,T).current,u=(t(this,y)-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,y)*t(this,H).current);const r=t(this,m)+t(this,y);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,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,y)));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,d).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,y),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,d).set(r.position,{equalize:!0})}else t(this,d).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ot).current||l(this,o,ye).call(this):l(this,o,ge).call(this),te.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,Wt).call(this)});s(this,Wt,()=>{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,ie).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,Oe).call(this),gt.scrollEntries.update(this,t(this,P).current,e)});s(this,Ft,(e,i)=>{t(this,wt).current&&(l(this,o,xe).call(this,Math.sign(i)||1),t(this,le).call(this,e,i))});s(this,le,(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,at)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ht).current&&(clearInterval(t(this,Ht)),h(this,Ht,setTimeout(()=>{const r=t(this,c)[l(this,o,ie).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,kt).current,easing:je.easeInOutExpo}})},t(this,ht).current))),!(e.includes("drag")&&!Xe.device.isTouch&&!t(this,zt).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,c).length){const u={tween:t(this,et).current||t(this,st).current?{easing:t(this,et).current||"easeInOutCubic",duration:t(this,st).current||500}:void 0};t(this,$t)?this.scrollToSection(l(this,o,ie).call(this,!0),u):this.shiftSections(r,u)}else t(this,d).shift(r*t(this,y))}else t(this,d).shift(i);h(this,$t,e==="drag")}});s(this,ce,()=>{h(this,E,!0),this.hibernatedCSSProperty.current||l(this,o,Pe).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[is];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ct,document.createElement("div")),t(this,ct).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Vt,document.createElement("slot")),t(this,p).appendChild(t(this,Vt)),t(this,ct).appendChild(t(this,p)),e.appendChild(t(this,ct)),h(this,oe,new MutationObserver(r=>{this.tryResplit()}))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,wt)}get axisCSSProperty(){return t(this,P)}get reverseCSSProperty(){return t(this,tt)}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,et)}get durationCSSProperty(){return t(this,st)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,it)}get dragInertionCSSProperty(){return t(this,Et)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Pt)}get massCSSProperty(){return t(this,xt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,zt)}get sectionDistanceScaleCSSProperty(){return t(this,Ot)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,It)}get autoplayUserDirectionCSSProperty(){return t(this,rt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,nt)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get focusDelayCSSProperty(){return t(this,ht)}get focusDurationCSSProperty(){return t(this,kt)}get disabledCSSProperty(){return t(this,ot)}get hibernatedCSSProperty(){return t(this,lt)}get currentScrollValue(){return l(this,o,Le).call(this,"current")}get targetScrollValue(){return l(this,o,Le).call(this,"target")}get contentWrapperElement(){return t(this,ct)}get contentElement(){return t(this,p)}get sections(){return t(this,c)}get position(){return t(this,ne)}get contentPosition(){return t(this,he)}get viewportSize(){return t(this,y)}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,P).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,P).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,P).current==="x"?0:t(this,d).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,se).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).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,Be).call(this,e),f=t(this,c)[r],C=t(this,c)[u];if(f&&C){let I=0;const Ce=l(this,o,ie).call(this),Mt=t(this,c)[Ce],be=Mt?this.targetScrollValue-Mt.position:0;t(this,v).current?u===0&&r===t(this,c).length-1?I=t(this,m)+t(this,y)-f.position+t(this,k):u===t(this,c).length-1&&r===0?I=C.position-(t(this,m)+t(this,y)+t(this,k)):I=C.position-f.position:I=C.position-f.position,this.shiftPosition(I-be,i)}}shiftSections(e,i){t(this,c).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){l(this,o,xe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,j).set(t(this,d).current,{equalize:!0}),t(this,j).set(e,Re({},i.tween)),h(this,at,setTimeout(()=>{h(this,at,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}connectedCallback(){gt.scrollEntries.register(this),h(this,d,new Je.Damped(0,{damping:.01,min:0,order:me.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new fe.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ft)),h(this,ut,new fe.KeyboardControls({element:this})),t(this,ut).changeEvent.subscribe(t(this,Ft)),h(this,D,new fe.DragControls({element:t(this,p)})),t(this,D).changeEvent.subscribe(t(this,Ft)),h(this,w,new fe.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,le)),t(this,P).subscribe(()=>{l(this,o,we).call(this)}),t(this,tt).subscribe(()=>{l(this,o,we).call(this)}),t(this,it).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,P).current}),t(this,Et).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,E)&&(e?l(this,o,se).call(this):l(this,o,Tt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,c).length?l(this,o,se).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,Tt).call(this))}),t(this,W).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,c).length?l(this,o,se).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,Tt).call(this))}),t(this,T).subscribe(e=>{t(this,E)&&(t(this,L).call(this),l(this,o,mt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,c).length||(t(this,$).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,_t,0),t(this,d).max=t(this,m),t(this,d).min=0)}),t(this,Pt).subscribe(e=>{t(this,d).damping=e.current}),t(this,xt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,w).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,rt).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,R).subscribe(e=>{t(this,E)&&l(this,o,mt).call(this)}),t(this,nt).subscribe(e=>{t(this,E)&&t(this,R).current&&l(this,o,mt).call(this)}),t(this,F).subscribe(e=>{t(this,E)&&t(this,R).current&&l(this,o,mt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,c).length&&l(this,o,mt).call(this)}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),l(this,o,ge).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),l(this,o,ye).call(this))}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),l(this,o,Ee).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),l(this,o,Pe).call(this))}),t(this,wt).observe(),t(this,P).observe(),t(this,tt).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,et).observe(),t(this,st).observe(),t(this,W).observe(),t(this,it).observe(),t(this,Et).observe(),t(this,T).observe(),t(this,v).observe(),t(this,Pt).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,Ot).observe(),t(this,A).observe(),t(this,A).observe(),t(this,It).observe(),t(this,rt).observe(),t(this,R).observe(),t(this,nt).observe(),t(this,F).observe(),t(this,ht).observe(),t(this,kt).observe(),t(this,ot).observe(),t(this,lt).observe(),Dt.windowResizer.subscribe(t(this,ce),me.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,wt).unobserve(),t(this,P).unobserve(),t(this,tt).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,et).unobserve(),t(this,st).unobserve(),t(this,W).unobserve(),t(this,it).unobserve(),t(this,Et).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,Pt).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,Ot).unobserve(),t(this,A).unobserve(),t(this,It).unobserve(),t(this,rt).unobserve(),t(this,R).unobserve(),t(this,nt).unobserve(),t(this,F).unobserve(),t(this,ht).unobserve(),t(this,kt).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),Dt.windowResizer.unsubscribe(t(this,ce)),l(this,o,Ee).call(this),t(this,oe).disconnect()}}d=new WeakMap,wt=new WeakMap,P=new WeakMap,tt=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,et=new WeakMap,st=new WeakMap,W=new WeakMap,it=new WeakMap,Et=new WeakMap,T=new WeakMap,v=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,Ot=new WeakMap,A=new WeakMap,It=new WeakMap,rt=new WeakMap,R=new WeakMap,nt=new WeakMap,F=new WeakMap,ht=new WeakMap,kt=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,p=new WeakMap,Vt=new WeakMap,c=new WeakMap,ne=new WeakMap,he=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,ut=new WeakMap,D=new WeakMap,w=new WeakMap,x=new WeakMap,_t=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Ht=new WeakMap,at=new WeakMap,j=new WeakMap,$t=new WeakMap,B=new WeakMap,E=new WeakMap,oe=new WeakMap,dt=new WeakMap,o=new WeakSet,we=function(){const e=t(this,P).current,i=t(this,tt).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,it).current?"max":e,t(this,ut).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,E)&&t(this,L).call(this)},se=function(){l(this,o,Tt).call(this),t(this,Vt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,c).push(new ss(e,i,this))}),t(this,p).style.transform="",te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),l(this,o,mt).call(this)},Tt=function(){t(this,c).forEach(e=>{e.destroy()}),h(this,c,[]),t(this,x).reset(),t(this,d).reset(),te.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ge=function(){t(this,G)||(h(this,G,!0),t(this,d).unsubscribe(t(this,Wt)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,Ht)),clearInterval(t(this,at)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,ut).disconnect(),t(this,D).disconnect(),t(this,w).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ye=function(){t(this,G)&&(h(this,G,!1),t(this,d).subscribe(t(this,Wt)),t(this,q).connect(),t(this,ut).connect(),t(this,D).connect(),t(this,A).current&&t(this,w).connect())},Ee=function(){t(this,Z)||(h(this,Z,!0),Dt.windowResizer.unsubscribe(t(this,L)),re.elementResizer.unsubscribe(t(this,L)),l(this,o,ge).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,Tt).call(this):(t(this,x).reset(),t(this,d).reset()),gt.scrollEntries.unregister(this))},Pe=function(){t(this,Z)&&(h(this,Z,!1),gt.scrollEntries.register(this),this.tryResplit(),l(this,o,ye).call(this),Dt.windowResizer.subscribe(t(this,L),me.RESIZE_ORDER.SCROLL),re.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Wt=new WeakMap,Be=function(e){let i=t(this,x).current;return t(this,v).current?i=Ke.loopNumber(e,t(this,c).length):i=qe.clamp(e,0,this.limit),i},Ft=new WeakMap,le=new WeakMap,xe=function(e=1){t(this,rt).current&&(t(this,w).direction=e),t(this,A).current&&t(this,w).pauseAndContinue(t(this,It).current,this.sectionalCSSProperty.current)},Le=function(e="current"){if(t(this,v).current&&t(this,c).length){const i=t(this,d)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,d)[e]},mt=function(){if(t(this,c).length){const e=t(this,x).current+t(this,nt).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),te.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,dt,[]),t(this,c).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null);const f=e-this.limit-1+t(this,F).current,C=e+i,I=this.sections.length-C;u>=e&&u<C||u<=f?(r.setMark("current"),t(this,dt).push(r)):u>=C&&u<C+I/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},Oe=function(){if(t(this,R).current){const e=Math.floor(t(this,dt).length/2);t(this,dt).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,dt).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ie=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const f=t(this,d).direction;for(let C=0;C<t(this,c).length;C++){const I=t(this,c)[C];let Ce=t(this,$t)?I.size*f*-1*.4:0,Mt=I.position;this.overscroll&&Mt===0&&e&&(Mt=t(this,N));let be=Math.abs(Mt+Ce-i);be<r&&(r=be,u=C)}return u},ce=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Rt);var ue;class ze extends HTMLElement{constructor(){super(...arguments);s(this,ue,null)}get scrollElement(){return t(this,ue)}connectedCallback(){const e=De.findParentElement(this,Rt);e instanceof Rt?h(this,ue,e):console.error(this,"e-scroll not found")}}ue=new WeakMap;var St,z,K,J,Nt,Ut,pt,Gt,ae,de;class Ve extends ze{constructor(){super();s(this,St,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Nt,0);s(this,Ut,0);s(this,pt,()=>{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,Nt,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Gt).call(this)});s(this,Gt,()=>{h(this,Ut,this.scrollElement.currentProgress*t(this,Nt)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Ut)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Ut)}px, 0px)`});s(this,ae,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,de,e=>{document.documentElement.classList.add("grabbing"),Ye.setupDrag(u=>{const f=t(this,K)?u.x:u.y,C=this.scrollElement.distance/t(this,Nt),I=(f-r)*C;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=[Te.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,St,document.createElement("slot")),t(this,St).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,St))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,St).assignedElements()[0]||t(this,St).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,de)),Dt.windowResizer.subscribe(t(this,pt),me.RESIZE_ORDER.SCROLL),re.elementResizer.subscribe(this,t(this,pt)),re.elementResizer.subscribe(this.scrollElement,t(this,pt)),this.scrollElement.onScroll(t(this,Gt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ae))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,de)),Dt.windowResizer.unsubscribe(t(this,pt)),re.elementResizer.unsubscribe(t(this,pt)),this.scrollElement.offScroll(t(this,Gt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ae))}}St=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Nt=new WeakMap,Ut=new WeakMap,pt=new WeakMap,Gt=new WeakMap,ae=new WeakMap,de=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Ve);var Zt,jt,Kt;class _e extends ze{constructor(){super();s(this,Zt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,jt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Kt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Zt).current,i=t(this,jt).current,r=t(this,Kt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Zt).observe(),t(this,jt).observe(),t(this,Kt).observe()}disconnectedCallback(){t(this,Zt).close(),t(this,jt).close(),t(this,Kt).close()}}Zt=new WeakMap,jt=new WeakMap,Kt=new WeakMap;var Jt;class He extends _e{constructor(){super(...arguments);s(this,Jt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Jt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Jt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Jt).close()}}Jt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",He);var Q,Qt;class $e extends _e{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Qt,()=>{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,Qt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Qt)),t(this,Qt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Qt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",$e);var X,bt,Xt,Se,pe,Yt;class rs{constructor(n,e,i){s(this,X,null);s(this,bt,null);s(this,Xt,null);s(this,Se,null);s(this,pe,()=>{t(this,bt).scrollToSection(t(this,Xt),{behaviour:t(this,Se)})});s(this,Yt,()=>{t(this,X).classList.toggle("current",t(this,bt).counter.current===t(this,Xt))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,bt,n),h(this,Se,i),h(this,Xt,e),t(this,X).addEventListener("click",t(this,pe)),t(this,bt).counter.subscribe(t(this,Yt)),t(this,Yt).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,pe)),t(this,bt).counter.unsubscribe(t(this,Yt)),t(this,X).remove()}}X=new WeakMap,bt=new WeakMap,Xt=new WeakMap,Se=new WeakMap,pe=new WeakMap,Yt=new WeakMap;var ft,At;class We extends ze{constructor(){super(...arguments);s(this,ft,[]);s(this,At,ts.debounce(()=>{t(this,ft).forEach(i=>i.destroy()),h(this,ft,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new rs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(r.element),t(this,ft).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,At)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,At))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,At)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,At)),t(this,ft).forEach(e=>e.destroy()),h(this,ft,[])}}ft=new WeakMap,At=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",We);class Fe extends es.ScrollSegmentElement{connectedCallback(){const n=De.findParentElement(this,Rt);n instanceof Rt?(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 Rt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Fe);exports.ScrollBulletButtonsElement=We;exports.ScrollElement=Rt;exports.ScrollSegmentElement=Fe;exports.ScrollSetButtonElement=He;exports.ScrollStepButtonElement=$e;exports.ScrollbarElement=Ve;
1
+ "use strict";var Ue=Object.defineProperty;var ke=Object.getOwnPropertySymbols;var Ge=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable;var Re=a=>{throw TypeError(a)};var Ae=(a,r,e)=>r in a?Ue(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,Me=(a,r)=>{for(var e in r||(r={}))Ge.call(r,e)&&Ae(a,e,r[e]);if(ke)for(var e of ke(r))Ze.call(r,e)&&Ae(a,e,r[e]);return a};var Pe=(a,r,e)=>r.has(a)||Re("Cannot "+e);var t=(a,r,e)=>(Pe(a,r,"read from private field"),e?e.call(a):r.get(a)),s=(a,r,e)=>r.has(a)?Re("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),h=(a,r,e,i)=>(Pe(a,r,"write to private field"),i?i.call(a,e):r.set(a,e),e),l=(a,r,e)=>(Pe(a,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const je=require("../Store-DRp_K37w.cjs"),O=require("../index-Cqw2NKev.cjs"),Ke=require("../easings-GegIwET5.cjs"),ee=require("../events-KVanG9sR.cjs"),qe=require("../jss-CRBgdvJ3.cjs"),qt=require("../layout-Ctc2p3uz.cjs"),De=require("../math-GDWEqu7y.cjs"),Je=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ge=require("../order/index.cjs"),Qe=require("../Damped-B1lXa9nb.cjs"),Xe=require("../Tweened-cJ36zq1A.cjs"),me=require("../controls/index.cjs"),Dt=require("../window-resizer/index.cjs"),gt=require("../scroll-entries/index.cjs"),Te=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ye=require("../device/index.cjs"),ne=require("../element-resizer/index.cjs"),ts=require("../gestures-C7gbKx11.cjs"),Be=require("../dom-JBOkFLTh.cjs"),es=require("../function-MthRj-GJ.cjs"),ss=require("../scroll-segment/index.cjs");var f,Bt,g,Ct,V,Y,yt,vt,se;class is{constructor(r,e,i){s(this,vt);s(this,f);s(this,Bt);s(this,g);s(this,Ct,0);s(this,V,0);s(this,Y,null);s(this,yt,0);h(this,f,r),h(this,Bt,e),h(this,g,i),gt.scrollEntries.register(t(this,f)),this.setIndex(t(this,Bt))}get element(){return t(this,f)}get index(){return t(this,Bt)}get size(){return t(this,Ct)}get position(){return t(this,V)}get transformPosition(){return t(this,yt)}destroy(){gt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(r){r?(t(this,f).style.setProperty("--size",r+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=r+"px",t(this,f).style.height=""):(t(this,f).style.height=r+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,Ct,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,V,t(this,g).vertical?qt.getCumulativeOffsetTop(t(this,f)):qt.getCumulativeOffsetLeft(t(this,f))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const r=t(this,g).shiftSectionPositionCSSProperty.current;console.log(r);let e=r;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-r&&(e=(t(this,g).distance-r)*-1-t(this,g).gap),gt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,e);const n=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,Ct)+i,C=De.clamp(n,u,b);h(this,yt,C*-1),t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${t(this,yt)}px, 0px)`:t(this,f).style.transform=`translate3d(${t(this,yt)}px, 0px, 0px)`}setMark(r){t(this,Y)!==r&&(t(this,Y)&&t(this,f).classList.remove(t(this,Y)),r&&t(this,f).classList.add(r),h(this,Y,r),ee.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,Y)},custom:!0}))}setMiddle(r){t(this,f).classList.toggle("middle",r)}setIndex(r){l(this,vt,se).call(this,"index",r)}setCurrentIndex(r){l(this,vt,se).call(this,"current-index",r)}setCurrentIndexArc(r){l(this,vt,se).call(this,"current-index-arc",r)}setCurrentIndexArcAbs(r){l(this,vt,se).call(this,"current-index-arc-abs",r)}}f=new WeakMap,Bt=new WeakMap,g=new WeakMap,Ct=new WeakMap,V=new WeakMap,Y=new WeakMap,yt=new WeakMap,vt=new WeakSet,se=function(r,e){e!==null?(t(this,f).style.setProperty(`--${r}`,e.toString()),t(this,f).setAttribute(`data-${r}`,e.toString())):(t(this,f).style.removeProperty(`--${r}`),t(this,f).removeAttribute(`data-${r}`))};const rs=qe.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 d,Pt,E,tt,_,H,$,M,et,st,W,it,wt,T,v,Et,xt,Lt,zt,Ot,A,It,rt,R,nt,F,Vt,ht,kt,ot,lt,ct,p,_t,c,he,oe,y,m,k,q,ut,D,P,x,Ht,N,U,G,Z,$t,at,j,Wt,B,w,le,dt,o,we,ie,Tt,Ce,ye,Ee,xe,L,Ft,Oe,Nt,ce,Le,ze,mt,Ve,re,ue;class Rt extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,Pt,new S.CSSProperty(this,"--controls",!0));s(this,E,new S.CSSProperty(this,"--axis","y"));s(this,tt,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,et,new S.CSSProperty(this,"--tween-easing",!1));s(this,st,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,it,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,Et,new S.CSSProperty(this,"--damping",20));s(this,xt,new S.CSSProperty(this,"--mass",0));s(this,Lt,new S.CSSProperty(this,"--stiffness",0));s(this,zt,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Ot,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,It,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,rt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,nt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,Vt,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ht,new S.CSSProperty(this,"--focus-delay",0));s(this,kt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ot,new S.CSSProperty(this,"--disabled",!1));s(this,lt,new S.CSSProperty(this,"--hibernate",!1));s(this,ct,null);s(this,p,null);s(this,_t,null);s(this,c,[]);s(this,he,0);s(this,oe,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,ut,null);s(this,D,null);s(this,P,null);s(this,x,new je.Store(0));s(this,Ht,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,$t);s(this,at);s(this,j,new Xe.Tweened);s(this,Wt,!1);s(this,B,null);s(this,w,!1);s(this,le,null);s(this,dt,[]);s(this,L,()=>{if(t(this,lt).current)return;t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,he,this.vertical?qt.getCumulativeOffsetTop(this):qt.getCumulativeOffsetLeft(this)),h(this,oe,this.vertical?qt.getCumulativeOffsetTop(t(this,p)):qt.getCumulativeOffsetLeft(t(this,p))),h(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,Te.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,Te.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,c).length){const n=t(this,T).current,u=(t(this,y)-t(this,k)*(n-1))/n;t(this,c).forEach(b=>{b.setSize(u)})}else t(this,c).forEach(n=>{n.setSize()});if(t(this,c).forEach(n=>{n.resize()}),t(this,H).current){h(this,m,t(this,y)*t(this,H).current);const n=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=n+"px",t(this,p).style.height="100%"):(t(this,p).style.height=n+"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,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const n=getComputedStyle(this),u=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,d).max=t(this,m)}if(t(this,v).current&&t(this,c).length){const n=t(this,c)[t(this,c).length-1],u=n.position+n.size-t(this,y),b=t(this,m)-u;h(this,N,n.position+n.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,c).length){const n=t(this,c)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ot).current||l(this,o,ye).call(this):l(this,o,Ce).call(this),ee.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,Ft).call(this)});s(this,Ft,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,Ht,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,re).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,Ve).call(this),gt.scrollEntries.update(this,t(this,E).current,e)});s(this,Nt,(e,i)=>{t(this,Pt).current&&(l(this,o,Le).call(this,Math.sign(i)||1),t(this,ce).call(this,e,i))});s(this,ce,(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,at)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ht).current&&(clearInterval(t(this,$t)),h(this,$t,setTimeout(()=>{const n=t(this,c)[l(this,o,re).call(this)];n&&this.scrollToSection(n.index,{tween:{duration:t(this,kt).current,easing:Ke.easeInOutExpo}})},t(this,ht).current))),!(e.includes("drag")&&!Ye.device.isTouch&&!t(this,zt).current)){if(t(this,M).current&&e!=="drag"){const n=Math.sign(i);if(t(this,c).length){const u={tween:t(this,et).current||t(this,st).current?{easing:t(this,et).current||"easeInOutCubic",duration:t(this,st).current||500}:void 0};t(this,Wt)?this.scrollToSection(l(this,o,re).call(this,!0),u):this.shiftSections(n,u)}else t(this,d).shift(n*t(this,y))}else t(this,d).shift(i);h(this,Wt,e==="drag")}});s(this,ue,()=>{h(this,w,!0),this.hibernatedCSSProperty.current||l(this,o,xe).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[rs];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ct,document.createElement("div")),t(this,ct).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,_t,document.createElement("slot")),t(this,p).appendChild(t(this,_t)),t(this,ct).appendChild(t(this,p)),e.appendChild(t(this,ct)),h(this,le,new MutationObserver(n=>{this.tryResplit()}))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Pt)}get axisCSSProperty(){return t(this,E)}get reverseCSSProperty(){return t(this,tt)}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,et)}get durationCSSProperty(){return t(this,st)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,it)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Et)}get massCSSProperty(){return t(this,xt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,zt)}get sectionDistanceScaleCSSProperty(){return t(this,Ot)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,It)}get autoplayUserDirectionCSSProperty(){return t(this,rt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,nt)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,Vt)}get focusDelayCSSProperty(){return t(this,ht)}get focusDurationCSSProperty(){return t(this,kt)}get disabledCSSProperty(){return t(this,ot)}get hibernatedCSSProperty(){return t(this,lt)}get currentScrollValue(){return l(this,o,ze).call(this,"current")}get targetScrollValue(){return l(this,o,ze).call(this,"target")}get contentWrapperElement(){return t(this,ct)}get contentElement(){return t(this,p)}get sections(){return t(this,c)}get position(){return t(this,he)}get contentPosition(){return t(this,oe)}get viewportSize(){return t(this,y)}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,Ht)}get scrollLine(){return t(this,B)}get vertical(){return t(this,E).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,E).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,E).current==="x"?0:t(this,d).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,ie).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const u=e-n,b=u+i+n*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const u=e-n,b=u+i+n*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,c).length)return;const n=t(this,x).current,u=l(this,o,Oe).call(this,e),b=t(this,c)[n],C=t(this,c)[u];if(b&&C){let I=0;const ve=l(this,o,re).call(this),Mt=t(this,c)[ve],be=Mt?this.targetScrollValue-Mt.position:0;t(this,v).current?u===0&&n===t(this,c).length-1?I=t(this,m)+t(this,y)-b.position+t(this,k):u===t(this,c).length-1&&n===0?I=C.position-(t(this,m)+t(this,y)+t(this,k)):I=C.position-b.position:I=C.position-b.position,this.shiftPosition(I-be,i)}}shiftSections(e,i){t(this,c).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){l(this,o,Le).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,j).set(t(this,d).current,{equalize:!0}),t(this,j).set(e,Me({},i.tween)),h(this,at,setTimeout(()=>{h(this,at,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}connectedCallback(){gt.scrollEntries.register(this),h(this,d,new Qe.Damped(0,{damping:.01,min:0,order:ge.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new me.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Nt)),h(this,ut,new me.KeyboardControls({element:this})),t(this,ut).changeEvent.subscribe(t(this,Nt)),h(this,D,new me.DragControls({element:t(this,p)})),t(this,D).changeEvent.subscribe(t(this,Nt)),h(this,P,new me.AutoplayControls({culling:this})),t(this,P).changeEvent.subscribe(t(this,ce)),t(this,E).subscribe(()=>{l(this,o,we).call(this)}),t(this,tt).subscribe(()=>{l(this,o,we).call(this)}),t(this,it).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,E).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,w)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,w)&&(e?l(this,o,ie).call(this):l(this,o,Tt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,P).interval=e.current,t(this,w)&&(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,Tt).call(this))}),t(this,W).subscribe(e=>{t(this,w)&&(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,Tt).call(this))}),t(this,T).subscribe(e=>{t(this,w)&&(t(this,L).call(this),l(this,o,mt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,w)&&(t(this,c).length||(t(this,$).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,Ht,0),t(this,d).max=t(this,m),t(this,d).min=0)}),t(this,Et).subscribe(e=>{t(this,d).damping=e.current}),t(this,xt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,P).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,P).connect():!e.current&&e.previous&&t(this,P).disconnect()}),t(this,rt).subscribe(e=>{e.current||(t(this,P).direction=1)}),t(this,R).subscribe(e=>{t(this,w)&&l(this,o,mt).call(this)}),t(this,nt).subscribe(e=>{t(this,w)&&t(this,R).current&&l(this,o,mt).call(this)}),t(this,F).subscribe(e=>{t(this,w)&&t(this,R).current&&l(this,o,mt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,c).length&&l(this,o,mt).call(this)}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ot).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,ye).call(this))}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),l(this,o,Ee).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),l(this,o,xe).call(this))}),t(this,Pt).observe(),t(this,E).observe(),t(this,tt).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,et).observe(),t(this,st).observe(),t(this,W).observe(),t(this,it).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,Ot).observe(),t(this,A).observe(),t(this,A).observe(),t(this,It).observe(),t(this,rt).observe(),t(this,R).observe(),t(this,nt).observe(),t(this,F).observe(),t(this,Vt).observe(),t(this,ht).observe(),t(this,kt).observe(),t(this,ot).observe(),t(this,lt).observe(),Dt.windowResizer.subscribe(t(this,ue),ge.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Pt).unobserve(),t(this,E).unobserve(),t(this,tt).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,et).unobserve(),t(this,st).unobserve(),t(this,W).unobserve(),t(this,it).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,Et).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,Ot).unobserve(),t(this,A).unobserve(),t(this,It).unobserve(),t(this,rt).unobserve(),t(this,R).unobserve(),t(this,nt).unobserve(),t(this,F).unobserve(),t(this,Vt).unobserve(),t(this,ht).unobserve(),t(this,kt).unobserve(),t(this,ot).unobserve(),t(this,lt).unobserve(),Dt.windowResizer.unsubscribe(t(this,ue)),l(this,o,Ee).call(this),t(this,le).disconnect()}}d=new WeakMap,Pt=new WeakMap,E=new WeakMap,tt=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,et=new WeakMap,st=new WeakMap,W=new WeakMap,it=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,Ot=new WeakMap,A=new WeakMap,It=new WeakMap,rt=new WeakMap,R=new WeakMap,nt=new WeakMap,F=new WeakMap,Vt=new WeakMap,ht=new WeakMap,kt=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,p=new WeakMap,_t=new WeakMap,c=new WeakMap,he=new WeakMap,oe=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,ut=new WeakMap,D=new WeakMap,P=new WeakMap,x=new WeakMap,Ht=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,$t=new WeakMap,at=new WeakMap,j=new WeakMap,Wt=new WeakMap,B=new WeakMap,w=new WeakMap,le=new WeakMap,dt=new WeakMap,o=new WeakSet,we=function(){const e=t(this,E).current,i=t(this,tt).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,it).current?"max":e,t(this,ut).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,w)&&t(this,L).call(this)},ie=function(){l(this,o,Tt).call(this),t(this,_t).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,c).push(new is(e,i,this))}),t(this,p).style.transform="",ee.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),l(this,o,mt).call(this)},Tt=function(){t(this,c).forEach(e=>{e.destroy()}),h(this,c,[]),t(this,x).reset(),t(this,d).reset(),ee.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ce=function(){t(this,G)||(h(this,G,!0),t(this,d).unsubscribe(t(this,Ft)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,$t)),clearInterval(t(this,at)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,ut).disconnect(),t(this,D).disconnect(),t(this,P).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ye=function(){t(this,G)&&(h(this,G,!1),t(this,d).subscribe(t(this,Ft)),t(this,q).connect(),t(this,ut).connect(),t(this,D).connect(),t(this,A).current&&t(this,P).connect())},Ee=function(){t(this,Z)||(h(this,Z,!0),Dt.windowResizer.unsubscribe(t(this,L)),ne.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,Tt).call(this):(t(this,x).reset(),t(this,d).reset()),gt.scrollEntries.unregister(this))},xe=function(){t(this,Z)&&(h(this,Z,!1),gt.scrollEntries.register(this),this.tryResplit(),l(this,o,ye).call(this),Dt.windowResizer.subscribe(t(this,L),ge.RESIZE_ORDER.SCROLL),ne.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Ft=new WeakMap,Oe=function(e){let i=t(this,x).current;return t(this,v).current?i=Je.loopNumber(e,t(this,c).length):i=De.clamp(e,0,this.limit),i},Nt=new WeakMap,ce=new WeakMap,Le=function(e=1){t(this,rt).current&&(t(this,P).direction=e),t(this,A).current&&t(this,P).pauseAndContinue(t(this,It).current,this.sectionalCSSProperty.current)},ze=function(e="current"){if(t(this,v).current&&t(this,c).length){const i=t(this,d)[e]%Math.round(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,d)[e]},mt=function(){if(t(this,c).length){const e=t(this,x).current+t(this,nt).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),ee.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,dt,[]),t(this,c).forEach((n,u)=>{n.setCurrentIndex(null),n.setCurrentIndexArc(null),n.setCurrentIndexArcAbs(null);const b=e-this.limit-1+t(this,F).current,C=e+i,I=this.sections.length-C;u>=e&&u<C||u<=b?(n.setMark("current"),t(this,dt).push(n)):u>=C&&u<C+I/2||u<=b+i?n.setMark("next"):n.setMark("previous")})}}},Ve=function(){if(t(this,R).current){const e=Math.floor(t(this,dt).length/2);t(this,dt).sort((i,n)=>i.element.getBoundingClientRect().left-n.element.getBoundingClientRect().left),t(this,dt).forEach((i,n)=>{const u=n-e;i.setCurrentIndex(n),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(n===e)})}},re=function(e=!1){let i=this.targetScrollValue,n=1/0,u=0;const b=t(this,d).direction;for(let C=0;C<t(this,c).length;C++){const I=t(this,c)[C];let ve=t(this,Wt)?I.size*b*-1*.4:0,Mt=I.position;this.overscroll&&Mt===0&&e&&(Mt=t(this,N));let be=Math.abs(Mt+ve-i);be<=n&&(n=be,u=C)}return u},ue=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Rt);var ae;class Ie extends HTMLElement{constructor(){super(...arguments);s(this,ae,null)}get scrollElement(){return t(this,ae)}connectedCallback(){const e=Be.findParentElement(this,Rt);e instanceof Rt?h(this,ae,e):console.error(this,"e-scroll not found")}}ae=new WeakMap;var St,z,K,J,Ut,Gt,pt,Zt,de,Se;class _e extends Ie{constructor(){super();s(this,St,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Ut,0);s(this,Gt,0);s(this,pt,()=>{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,Ut,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Zt).call(this)});s(this,Zt,()=>{h(this,Gt,this.scrollElement.currentProgress*t(this,Ut)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Gt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Gt)}px, 0px)`});s(this,de,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Se,e=>{document.documentElement.classList.add("grabbing"),ts.setupDrag(u=>{const b=t(this,K)?u.x:u.y,C=this.scrollElement.distance/t(this,Ut),I=(b-n)*C;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,n=t(this,K)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[qe.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,St,document.createElement("slot")),t(this,St).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,St))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,St).assignedElements()[0]||t(this,St).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,Se)),Dt.windowResizer.subscribe(t(this,pt),ge.RESIZE_ORDER.SCROLL),ne.elementResizer.subscribe(this,t(this,pt)),ne.elementResizer.subscribe(this.scrollElement,t(this,pt)),this.scrollElement.onScroll(t(this,Zt)),this.scrollElement.axisCSSProperty.subscribe(t(this,de))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,Se)),Dt.windowResizer.unsubscribe(t(this,pt)),ne.elementResizer.unsubscribe(t(this,pt)),this.scrollElement.offScroll(t(this,Zt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,de))}}St=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,pt=new WeakMap,Zt=new WeakMap,de=new WeakMap,Se=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",_e);var jt,Kt,Jt;class He extends Ie{constructor(){super();s(this,jt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Kt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Jt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,jt).current,i=t(this,Kt).current,n=t(this,Jt).current;this.handleClick({behaviour:e,tween:i||n?{easing:i,duration:n}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,jt).observe(),t(this,Kt).observe(),t(this,Jt).observe()}disconnectedCallback(){t(this,jt).close(),t(this,Kt).close(),t(this,Jt).close()}}jt=new WeakMap,Kt=new WeakMap,Jt=new WeakMap;var Qt;class $e extends He{constructor(){super(...arguments);s(this,Qt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Qt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Qt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Qt).close()}}Qt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",$e);var Q,Xt;class We extends He{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Xt,()=>{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,Xt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Xt)),t(this,Xt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Xt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",We);var X,ft,Yt,pe,fe,te;class ns{constructor(r,e,i){s(this,X,null);s(this,ft,null);s(this,Yt,null);s(this,pe,null);s(this,fe,()=>{t(this,ft).scrollToSection(t(this,Yt),{behaviour:t(this,pe)})});s(this,te,()=>{t(this,X).classList.toggle("current",t(this,ft).counter.current===t(this,Yt))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,ft,r),h(this,pe,i),h(this,Yt,e),t(this,X).addEventListener("click",t(this,fe)),t(this,ft).counter.subscribe(t(this,te)),t(this,te).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,fe)),t(this,ft).counter.unsubscribe(t(this,te)),t(this,X).remove()}}X=new WeakMap,ft=new WeakMap,Yt=new WeakMap,pe=new WeakMap,fe=new WeakMap,te=new WeakMap;var bt,At;class Fe extends Ie{constructor(){super(...arguments);s(this,bt,[]);s(this,At,es.debounce(()=>{t(this,bt).forEach(i=>i.destroy()),h(this,bt,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const n=new ns(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(n.element),t(this,bt).push(n)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,At)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,At))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,At)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,At)),t(this,bt).forEach(e=>e.destroy()),h(this,bt,[])}}bt=new WeakMap,At=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Fe);class Ne extends ss.ScrollSegmentElement{connectedCallback(){const r=Be.findParentElement(this,Rt);r instanceof Rt?(this.scrollContainer=r,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 Rt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ne);exports.ScrollBulletButtonsElement=Fe;exports.ScrollElement=Rt;exports.ScrollSegmentElement=Ne;exports.ScrollSetButtonElement=$e;exports.ScrollStepButtonElement=We;exports.ScrollbarElement=_e;
@@ -1,45 +1,45 @@
1
- var Be = Object.defineProperty;
2
- var Ie = Object.getOwnPropertySymbols;
3
- var We = Object.prototype.hasOwnProperty, Fe = Object.prototype.propertyIsEnumerable;
4
- var Ae = (u) => {
1
+ var We = Object.defineProperty;
2
+ var ke = Object.getOwnPropertySymbols;
3
+ var Fe = Object.prototype.hasOwnProperty, Ne = Object.prototype.propertyIsEnumerable;
4
+ var Me = (u) => {
5
5
  throw TypeError(u);
6
6
  };
7
- var ke = (u, n, e) => n in u ? Be(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, Me = (u, n) => {
8
- for (var e in n || (n = {}))
9
- We.call(n, e) && ke(u, e, n[e]);
10
- if (Ie)
11
- for (var e of Ie(n))
12
- Fe.call(n, e) && ke(u, e, n[e]);
7
+ var Ae = (u, r, e) => r in u ? We(u, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[r] = e, Te = (u, r) => {
8
+ for (var e in r || (r = {}))
9
+ Fe.call(r, e) && Ae(u, e, r[e]);
10
+ if (ke)
11
+ for (var e of ke(r))
12
+ Ne.call(r, e) && Ae(u, e, r[e]);
13
13
  return u;
14
14
  };
15
- var ge = (u, n, e) => n.has(u) || Ae("Cannot " + e);
16
- var t = (u, n, e) => (ge(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? Ae("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (ge(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), l = (u, n, e) => (ge(u, n, "access private method"), e);
17
- import { S as Ne } from "../Store-D2xCXENW.js";
15
+ var ve = (u, r, e) => r.has(u) || Me("Cannot " + e);
16
+ var t = (u, r, e) => (ve(u, r, "read from private field"), e ? e.call(u) : r.get(u)), s = (u, r, e) => r.has(u) ? Me("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(u) : r.set(u, e), h = (u, r, e, i) => (ve(u, r, "write to private field"), i ? i.call(u, e) : r.set(u, e), e), l = (u, r, e) => (ve(u, r, "access private method"), e);
17
+ import { S as qe } from "../Store-D2xCXENW.js";
18
18
  import { i as H } from "../index-euf5anj6.js";
19
- import { a as qe } from "../easings-Bni3YAAW.js";
20
- import { d as Yt } from "../events-CsVF98U6.js";
21
- import { c as De } from "../jss-DtnXPEnq.js";
22
- import { a as ve, g as Ce } from "../layout-DpZo-I0y.js";
23
- import { c as Ve } from "../math-BOBiC4TN.js";
24
- import { l as Ue } from "../number-DwCxt_Ck.js";
19
+ import { a as Ue } from "../easings-Bni3YAAW.js";
20
+ import { d as te } from "../events-CsVF98U6.js";
21
+ import { c as Ve } from "../jss-DtnXPEnq.js";
22
+ import { a as Ce, g as ye } from "../layout-DpZo-I0y.js";
23
+ import { c as Re } from "../math-BOBiC4TN.js";
24
+ import { l as Ge } from "../number-DwCxt_Ck.js";
25
25
  import "../ticker/index.js";
26
- import { TICK_ORDER as Ge, RESIZE_ORDER as ye } from "../order/index.js";
27
- import { D as Ke } from "../Damped-BXsGpI-B.js";
28
- import { T as _e } from "../Tweened-BhDWLNF0.js";
29
- import { WheelControls as Ze, KeyboardControls as je, DragControls as Je, AutoplayControls as Qe } from "../controls/index.js";
26
+ import { TICK_ORDER as Ke, RESIZE_ORDER as we } from "../order/index.js";
27
+ import { D as _e } from "../Damped-BXsGpI-B.js";
28
+ import { T as Ze } from "../Tweened-BhDWLNF0.js";
29
+ import { WheelControls as je, KeyboardControls as Je, DragControls as Qe, AutoplayControls as Xe } from "../controls/index.js";
30
30
  import { windowResizer as Dt } from "../window-resizer/index.js";
31
31
  import { scrollEntries as gt } from "../scroll-entries/index.js";
32
- import { cssUnitParser as Te } from "../css-unit-parser/index.js";
33
- import { CSSProperty as p } from "../css-property/index.js";
34
- import { device as Xe } from "../device/index.js";
35
- import { elementResizer as ie } from "../element-resizer/index.js";
36
- import { s as Ye } from "../gestures-CcXV6fCp.js";
37
- import { b as Re } from "../dom-CVWzyXPH.js";
38
- import { d as ts } from "../function-C10DGppn.js";
39
- import { ScrollSegmentElement as es } from "../scroll-segment/index.js";
40
- var b, Rt, g, vt, $, Y, Ct, yt, te;
41
- class ss {
42
- constructor(n, e, i) {
32
+ import { cssUnitParser as De } from "../css-unit-parser/index.js";
33
+ import { CSSProperty as f } from "../css-property/index.js";
34
+ import { device as Ye } from "../device/index.js";
35
+ import { elementResizer as re } from "../element-resizer/index.js";
36
+ import { s as ts } from "../gestures-CcXV6fCp.js";
37
+ import { b as Oe } from "../dom-CVWzyXPH.js";
38
+ import { d as es } from "../function-C10DGppn.js";
39
+ import { ScrollSegmentElement as ss } from "../scroll-segment/index.js";
40
+ var b, Rt, g, vt, $, Y, Ct, yt, ee;
41
+ class is {
42
+ constructor(r, e, i) {
43
43
  s(this, yt);
44
44
  s(this, b);
45
45
  s(this, Rt);
@@ -48,7 +48,7 @@ class ss {
48
48
  s(this, $, 0);
49
49
  s(this, Y, null);
50
50
  s(this, Ct, 0);
51
- h(this, b, n), h(this, Rt, e), h(this, g, i), gt.register(t(this, b)), this.setIndex(t(this, Rt));
51
+ h(this, b, r), h(this, Rt, e), h(this, g, i), gt.register(t(this, b)), this.setIndex(t(this, Rt));
52
52
  }
53
53
  get element() {
54
54
  return t(this, b);
@@ -71,25 +71,27 @@ class ss {
71
71
  unsetTransform() {
72
72
  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();
73
73
  }
74
- setSize(n) {
75
- 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"));
74
+ setSize(r) {
75
+ r ? (t(this, b).style.setProperty("--size", r + "px"), t(this, g).axisCSSProperty.current === "x" ? (t(this, b).style.width = r + "px", t(this, b).style.height = "") : (t(this, b).style.height = r + "px", t(this, b).style.width = "")) : (t(this, b).style.width = "", t(this, b).style.height = "", t(this, b).style.removeProperty("--size"));
76
76
  }
77
77
  resize() {
78
- h(this, vt, t(this, g).vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth), h(this, $, t(this, g).vertical ? ve(t(this, b)) : Ce(t(this, b))), h(this, $, t(this, $) - t(this, g).contentPosition);
78
+ h(this, vt, t(this, g).vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth), h(this, $, t(this, g).vertical ? Ce(t(this, b)) : ye(t(this, b))), h(this, $, t(this, $) - t(this, g).contentPosition);
79
79
  }
80
80
  transform() {
81
- let n = 0;
82
- const e = t(this, g).viewportSize * t(this, g).sectionDistanceScaleCSSProperty.current;
83
- t(this, g).loopCSSProperty.current && t(this, g).overscroll && t(this, $) + t(this, vt) < t(this, g).currentScrollValue && (n = t(this, g).distance * -1 - t(this, g).gap), gt.update(
81
+ const r = t(this, g).shiftSectionPositionCSSProperty.current;
82
+ console.log(r);
83
+ let e = r;
84
+ const i = t(this, g).viewportSize * t(this, g).sectionDistanceScaleCSSProperty.current;
85
+ t(this, g).loopCSSProperty.current && t(this, $) + t(this, vt) < t(this, g).currentScrollValue - r && (e = (t(this, g).distance - r) * -1 - t(this, g).gap), gt.update(
84
86
  t(this, b),
85
87
  t(this, g).axisCSSProperty.current,
86
- n
88
+ e
87
89
  );
88
- const i = t(this, g).currentScrollValue + n, r = t(this, $) - t(this, g).viewportSize - e, a = t(this, $) + t(this, vt) + e, m = Ve(i, r, a);
89
- h(this, Ct, m * -1), t(this, g).vertical ? t(this, b).style.transform = `translate3d(0px, ${t(this, Ct)}px, 0px)` : t(this, b).style.transform = `translate3d(${t(this, Ct)}px, 0px, 0px)`;
90
+ const n = t(this, g).currentScrollValue + e, a = t(this, $) - t(this, g).viewportSize - i, m = t(this, $) + t(this, vt) + i, v = Re(n, a, m);
91
+ h(this, Ct, v * -1), t(this, g).vertical ? t(this, b).style.transform = `translate3d(0px, ${t(this, Ct)}px, 0px)` : t(this, b).style.transform = `translate3d(${t(this, Ct)}px, 0px, 0px)`;
90
92
  }
91
- setMark(n) {
92
- t(this, Y) !== n && (t(this, Y) && t(this, b).classList.remove(t(this, Y)), n && t(this, b).classList.add(n), h(this, Y, n), Yt(t(this, b), "scrollSectionMarkChange", {
93
+ setMark(r) {
94
+ t(this, Y) !== r && (t(this, Y) && t(this, b).classList.remove(t(this, Y)), r && t(this, b).classList.add(r), h(this, Y, r), te(t(this, b), "scrollSectionMarkChange", {
93
95
  composed: !0,
94
96
  detail: {
95
97
  mark: t(this, Y)
@@ -97,26 +99,26 @@ class ss {
97
99
  custom: !0
98
100
  }));
99
101
  }
100
- setMiddle(n) {
101
- t(this, b).classList.toggle("middle", n);
102
+ setMiddle(r) {
103
+ t(this, b).classList.toggle("middle", r);
102
104
  }
103
- setIndex(n) {
104
- l(this, yt, te).call(this, "index", n);
105
+ setIndex(r) {
106
+ l(this, yt, ee).call(this, "index", r);
105
107
  }
106
- setCurrentIndex(n) {
107
- l(this, yt, te).call(this, "current-index", n);
108
+ setCurrentIndex(r) {
109
+ l(this, yt, ee).call(this, "current-index", r);
108
110
  }
109
- setCurrentIndexArc(n) {
110
- l(this, yt, te).call(this, "current-index-arc", n);
111
+ setCurrentIndexArc(r) {
112
+ l(this, yt, ee).call(this, "current-index-arc", r);
111
113
  }
112
- setCurrentIndexArcAbs(n) {
113
- l(this, yt, te).call(this, "current-index-arc-abs", n);
114
+ setCurrentIndexArcAbs(r) {
115
+ l(this, yt, ee).call(this, "current-index-arc-abs", r);
114
116
  }
115
117
  }
116
- b = new WeakMap(), Rt = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), $ = new WeakMap(), Y = new WeakMap(), Ct = new WeakMap(), yt = new WeakSet(), te = function(n, e) {
117
- 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}`));
118
+ b = new WeakMap(), Rt = new WeakMap(), g = new WeakMap(), vt = new WeakMap(), $ = new WeakMap(), Y = new WeakMap(), Ct = new WeakMap(), yt = new WeakSet(), ee = function(r, e) {
119
+ e !== null ? (t(this, b).style.setProperty(`--${r}`, e.toString()), t(this, b).setAttribute(`data-${r}`, e.toString())) : (t(this, b).style.removeProperty(`--${r}`), t(this, b).removeAttribute(`data-${r}`));
118
120
  };
119
- const is = De({
121
+ const rs = Ve({
120
122
  ":host": {
121
123
  position: "relative",
122
124
  width: "100%",
@@ -154,193 +156,199 @@ const is = De({
154
156
  flexShrink: "0"
155
157
  }
156
158
  });
157
- var d, wt, E, tt, B, W, F, T, et, st, N, it, xt, D, y, Et, Pt, Lt, zt, Ot, A, It, rt, M, nt, q, ht, kt, ot, lt, ct, f, Ht, c, re, ne, v, S, k, V, at, R, w, P, $t, U, G, K, _, Bt, ut, Z, Wt, O, x, he, dt, o, we, ee, Tt, be, me, xe, Ee, L, Ft, Oe, Nt, oe, Pe, Le, St, He, se, le;
159
+ var d, wt, E, tt, B, W, F, T, et, st, N, it, xt, D, y, Et, Pt, Lt, zt, Ot, A, It, rt, M, nt, q, Ht, ht, kt, ot, lt, ct, p, $t, c, ne, he, C, S, k, V, at, R, w, P, Bt, U, G, K, _, Wt, ut, Z, Ft, O, x, oe, dt, o, xe, se, Tt, me, Se, Ee, Pe, L, Nt, He, qt, le, Le, ze, St, $e, ie, ce;
158
160
  class Vt extends HTMLElement {
159
161
  constructor() {
160
162
  super();
161
163
  s(this, o);
162
164
  s(this, d, null);
163
- s(this, wt, new p(this, "--controls", !0));
164
- s(this, E, new p(this, "--axis", "y"));
165
- s(this, tt, new p(this, "--reverse", !1));
166
- s(this, B, new p(this, "--direction", 0));
167
- s(this, W, new p(this, "--pages", 0, {
165
+ s(this, wt, new f(this, "--controls", !0));
166
+ s(this, E, new f(this, "--axis", "y"));
167
+ s(this, tt, new f(this, "--reverse", !1));
168
+ s(this, B, new f(this, "--direction", 0));
169
+ s(this, W, new f(this, "--pages", 0, {
168
170
  validate: (e) => Math.max(0, e - 1)
169
171
  }));
170
- s(this, F, new p(this, "--split", !1));
171
- s(this, T, new p(this, "--sectional", !1));
172
- s(this, et, new p(
172
+ s(this, F, new f(this, "--split", !1));
173
+ s(this, T, new f(this, "--sectional", !1));
174
+ s(this, et, new f(
173
175
  this,
174
176
  "--tween-easing",
175
177
  !1
176
178
  ));
177
- s(this, st, new p(
179
+ s(this, st, new f(
178
180
  this,
179
181
  "--tween-duration",
180
182
  !1
181
183
  ));
182
- s(this, N, new p(this, "--auto-size", !1));
183
- s(this, it, new p(
184
+ s(this, N, new f(this, "--auto-size", !1));
185
+ s(this, it, new f(
184
186
  this,
185
187
  "--wheel-max-delta",
186
188
  !1
187
189
  ));
188
- s(this, xt, new p(this, "--drag-inertion", 1));
189
- s(this, D, new p(
190
+ s(this, xt, new f(this, "--drag-inertion", 1));
191
+ s(this, D, new f(
190
192
  this,
191
193
  "--sections-in-view",
192
194
  1
193
195
  ));
194
- s(this, y, new p(this, "--loop", !1));
195
- s(this, Et, new p(this, "--damping", 20));
196
- s(this, Pt, new p(this, "--mass", 0));
197
- s(this, Lt, new p(this, "--stiffness", 0));
198
- s(this, zt, new p(this, "--mouse-drag", !1));
199
- s(this, Ot, new p(
196
+ s(this, y, new f(this, "--loop", !1));
197
+ s(this, Et, new f(this, "--damping", 20));
198
+ s(this, Pt, new f(this, "--mass", 0));
199
+ s(this, Lt, new f(this, "--stiffness", 0));
200
+ s(this, zt, new f(this, "--mouse-drag", !1));
201
+ s(this, Ot, new f(
200
202
  this,
201
203
  "--section-distance-scale",
202
204
  0.5
203
205
  ));
204
- s(this, A, new p(this, "--autoplay", 0));
205
- s(this, It, new p(
206
+ s(this, A, new f(this, "--autoplay", 0));
207
+ s(this, It, new f(
206
208
  this,
207
209
  "--autoplay-pause-duration",
208
210
  0
209
211
  ));
210
- s(this, rt, new p(
212
+ s(this, rt, new f(
211
213
  this,
212
214
  "--autoplay-user-direction",
213
215
  !1
214
216
  ));
215
- s(this, M, new p(this, "--classes", !1));
216
- s(this, nt, new p(
217
+ s(this, M, new f(this, "--classes", !1));
218
+ s(this, nt, new f(
217
219
  this,
218
220
  "--current-index-start-offset",
219
221
  0
220
222
  ));
221
- s(this, q, new p(
223
+ s(this, q, new f(
222
224
  this,
223
225
  "--current-index-end-offset",
224
226
  0
225
227
  ));
226
- s(this, ht, new p(this, "--focus-delay", 0));
227
- s(this, kt, new p(
228
+ s(this, Ht, new f(
229
+ this,
230
+ "--shift-section-position",
231
+ 0,
232
+ { rawValueCheck: !1 }
233
+ ));
234
+ s(this, ht, new f(this, "--focus-delay", 0));
235
+ s(this, kt, new f(
228
236
  this,
229
237
  "--focus-duration",
230
238
  3e3
231
239
  ));
232
- s(this, ot, new p(this, "--disabled", !1));
233
- s(this, lt, new p(this, "--hibernate", !1));
240
+ s(this, ot, new f(this, "--disabled", !1));
241
+ s(this, lt, new f(this, "--hibernate", !1));
234
242
  s(this, ct, null);
235
- s(this, f, null);
236
- s(this, Ht, null);
243
+ s(this, p, null);
244
+ s(this, $t, null);
237
245
  s(this, c, []);
238
- s(this, re, 0);
239
246
  s(this, ne, 0);
240
- s(this, v, 0);
247
+ s(this, he, 0);
248
+ s(this, C, 0);
241
249
  s(this, S, 0);
242
250
  s(this, k, 0);
243
251
  s(this, V, null);
244
252
  s(this, at, null);
245
253
  s(this, R, null);
246
254
  s(this, w, null);
247
- s(this, P, new Ne(0));
248
- s(this, $t, 0);
255
+ s(this, P, new qe(0));
256
+ s(this, Bt, 0);
249
257
  s(this, U, 0);
250
258
  s(this, G, !1);
251
259
  s(this, K, !0);
252
260
  s(this, _, !0);
253
- s(this, Bt);
261
+ s(this, Wt);
254
262
  s(this, ut);
255
- s(this, Z, new _e());
256
- s(this, Wt, !1);
263
+ s(this, Z, new Ze());
264
+ s(this, Ft, !1);
257
265
  s(this, O, null);
258
266
  s(this, x, !1);
259
- s(this, he, null);
267
+ s(this, oe, null);
260
268
  s(this, dt, []);
261
269
  s(this, L, () => {
262
270
  if (t(this, lt).current)
263
271
  return;
264
272
  t(this, d).unlistenAnimationFrame();
265
273
  const e = this.currentScrollValue / t(this, S) || 0, i = t(this, P).current;
266
- if (h(this, re, this.vertical ? ve(this) : Ce(this)), h(this, ne, this.vertical ? ve(t(this, f)) : Ce(t(this, f))), h(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, k, Te.parse(
267
- getComputedStyle(t(this, f)).rowGap
268
- )) : h(this, k, Te.parse(
269
- getComputedStyle(t(this, f)).columnGap
274
+ if (h(this, ne, this.vertical ? Ce(this) : ye(this)), h(this, he, this.vertical ? Ce(t(this, p)) : ye(t(this, p))), h(this, C, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, k, De.parse(
275
+ getComputedStyle(t(this, p)).rowGap
276
+ )) : h(this, k, De.parse(
277
+ getComputedStyle(t(this, p)).columnGap
270
278
  )), t(this, N).current && t(this, c).length) {
271
- const r = t(this, D).current, a = (t(this, v) - t(this, k) * (r - 1)) / r;
279
+ const n = t(this, D).current, a = (t(this, C) - t(this, k) * (n - 1)) / n;
272
280
  t(this, c).forEach((m) => {
273
281
  m.setSize(a);
274
282
  });
275
283
  } else
276
- t(this, c).forEach((r) => {
277
- r.setSize();
284
+ t(this, c).forEach((n) => {
285
+ n.setSize();
278
286
  });
279
- if (t(this, c).forEach((r) => {
280
- r.resize();
287
+ if (t(this, c).forEach((n) => {
288
+ n.resize();
281
289
  }), t(this, W).current) {
282
- h(this, S, t(this, v) * t(this, W).current);
283
- const r = t(this, S) + t(this, v);
284
- 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%");
290
+ h(this, S, t(this, C) * t(this, W).current);
291
+ const n = t(this, S) + t(this, C);
292
+ this.vertical ? (t(this, p).style.width = n + "px", t(this, p).style.height = "100%") : (t(this, p).style.height = n + "px", t(this, p).style.width = "100%");
285
293
  } else
286
- this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", h(this, S, t(this, f).offsetHeight - t(this, v))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", h(this, S, t(this, f).offsetWidth - t(this, v)));
294
+ this.vertical ? (t(this, p).style.width = "100%", t(this, p).style.height = "max-content", h(this, S, t(this, p).offsetHeight - t(this, C))) : (t(this, p).style.width = "max-content", t(this, p).style.height = "100%", h(this, S, t(this, p).offsetWidth - t(this, C)));
287
295
  if (!t(this, y).current) {
288
- const r = getComputedStyle(this), a = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
296
+ const n = getComputedStyle(this), a = this.vertical ? parseFloat(n.paddingBlockStart) + parseFloat(n.paddingBlockEnd) : parseFloat(n.paddingInlineStart) + parseFloat(n.paddingInlineEnd);
289
297
  h(this, S, t(this, S) + a), t(this, d).max = t(this, S);
290
298
  }
291
299
  if (t(this, y).current && t(this, c).length) {
292
- const r = t(this, c)[t(this, c).length - 1], a = r.position + r.size - t(this, v), m = t(this, S) - a;
293
- h(this, U, r.position + r.size + m);
300
+ const n = t(this, c)[t(this, c).length - 1], a = n.position + n.size - t(this, C), m = t(this, S) - a;
301
+ h(this, U, n.position + n.size + m);
294
302
  } else
295
303
  h(this, U, t(this, S));
296
304
  if (t(this, T).current && t(this, c).length) {
297
- const r = t(this, c)[i];
298
- t(this, d).set(r.position, {
305
+ const n = t(this, c)[i];
306
+ t(this, d).set(n.position, {
299
307
  equalize: !0
300
308
  });
301
309
  } else
302
310
  t(this, d).set(e * t(this, S), {
303
311
  equalize: !0
304
312
  });
305
- h(this, G, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, ot).current || l(this, o, me).call(this) : l(this, o, be).call(this), Yt(this, "scrollResize", { custom: !0 }), t(this, Ft).call(this);
313
+ h(this, G, (this.vertical ? t(this, p).offsetHeight : t(this, p).offsetWidth) > t(this, C)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, ot).current || l(this, o, Se).call(this) : l(this, o, me).call(this), te(this, "scrollResize", { custom: !0 }), t(this, Nt).call(this);
306
314
  });
307
- s(this, Ft, () => {
315
+ s(this, Nt, () => {
308
316
  if (!t(this, G) || t(this, _) || t(this, K))
309
317
  return;
310
318
  const e = this.currentScrollValue;
311
- if (h(this, $t, Math.max(0, e - t(this, S))), t(this, c).length) {
319
+ if (h(this, Bt, Math.max(0, e - t(this, S))), t(this, c).length) {
312
320
  for (let i = 0; i < t(this, c).length; i++)
313
321
  t(this, c)[i].transform();
314
- t(this, P).current = l(this, o, se).call(this);
322
+ t(this, P).current = l(this, o, ie).call(this);
315
323
  } else
316
- this.vertical ? t(this, f).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
317
- l(this, o, He).call(this), gt.update(
324
+ this.vertical ? t(this, p).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, p).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
325
+ l(this, o, $e).call(this), gt.update(
318
326
  this,
319
327
  t(this, E).current,
320
328
  e
321
329
  );
322
330
  });
323
- s(this, Nt, (e, i) => {
324
- t(this, wt).current && (l(this, o, Pe).call(this, Math.sign(i) || 1), t(this, oe).call(this, e, i));
331
+ s(this, qt, (e, i) => {
332
+ t(this, wt).current && (l(this, o, Le).call(this, Math.sign(i) || 1), t(this, le).call(this, e, i));
325
333
  });
326
- s(this, oe, (e, i) => {
334
+ s(this, le, (e, i) => {
327
335
  if (t(this, B).current) {
328
336
  if (t(this, B).current < 0 && i > 0)
329
337
  return;
330
338
  if (t(this, B).current > 0 && i < 0)
331
339
  return;
332
340
  }
333
- if (t(this, ut) || t(this, Z).unlistenAnimationFrame(), !t(this, A).current && t(this, ht).current && (clearInterval(t(this, Bt)), h(this, Bt, setTimeout(() => {
334
- const r = t(this, c)[l(this, o, se).call(this)];
335
- r && this.scrollToSection(r.index, {
341
+ if (t(this, ut) || t(this, Z).unlistenAnimationFrame(), !t(this, A).current && t(this, ht).current && (clearInterval(t(this, Wt)), h(this, Wt, setTimeout(() => {
342
+ const n = t(this, c)[l(this, o, ie).call(this)];
343
+ n && this.scrollToSection(n.index, {
336
344
  tween: {
337
345
  duration: t(this, kt).current,
338
- easing: qe
346
+ easing: Ue
339
347
  }
340
348
  });
341
- }, t(this, ht).current))), !(e.includes("drag") && !Xe.isTouch && !t(this, zt).current)) {
349
+ }, t(this, ht).current))), !(e.includes("drag") && !Ye.isTouch && !t(this, zt).current)) {
342
350
  if (t(this, T).current && e !== "drag") {
343
- const r = Math.sign(i);
351
+ const n = Math.sign(i);
344
352
  if (t(this, c).length) {
345
353
  const a = {
346
354
  tween: t(this, et).current || t(this, st).current ? {
@@ -348,22 +356,22 @@ class Vt extends HTMLElement {
348
356
  duration: t(this, st).current || 500
349
357
  } : void 0
350
358
  };
351
- t(this, Wt) ? this.scrollToSection(l(this, o, se).call(this, !0), a) : this.shiftSections(r, a);
359
+ t(this, Ft) ? this.scrollToSection(l(this, o, ie).call(this, !0), a) : this.shiftSections(n, a);
352
360
  } else
353
- t(this, d).shift(r * t(this, v));
361
+ t(this, d).shift(n * t(this, C));
354
362
  } else
355
363
  t(this, d).shift(i);
356
- h(this, Wt, e === "drag");
364
+ h(this, Ft, e === "drag");
357
365
  }
358
366
  });
359
- s(this, le, () => {
360
- h(this, x, !0), this.hibernatedCSSProperty.current || l(this, o, Ee).call(this);
367
+ s(this, ce, () => {
368
+ h(this, x, !0), this.hibernatedCSSProperty.current || l(this, o, Pe).call(this);
361
369
  });
362
370
  if (H) {
363
371
  const e = this.attachShadow({ mode: "open" });
364
- e.adoptedStyleSheets = [is];
372
+ e.adoptedStyleSheets = [rs];
365
373
  const i = document.createElement("div");
366
- i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, ct, document.createElement("div")), t(this, ct).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, Ht, document.createElement("slot")), t(this, f).appendChild(t(this, Ht)), t(this, ct).appendChild(t(this, f)), e.appendChild(t(this, ct)), h(this, he, new MutationObserver((r) => {
374
+ i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, ct, document.createElement("div")), t(this, ct).className = "content-wrapper", h(this, p, document.createElement("div")), t(this, p).className = "content", h(this, $t, document.createElement("slot")), t(this, p).appendChild(t(this, $t)), t(this, ct).appendChild(t(this, p)), e.appendChild(t(this, ct)), h(this, oe, new MutationObserver((n) => {
367
375
  this.tryResplit();
368
376
  }));
369
377
  }
@@ -446,6 +454,9 @@ class Vt extends HTMLElement {
446
454
  get currentIndexEndOffsetCSSProperty() {
447
455
  return t(this, q);
448
456
  }
457
+ get shiftSectionPositionCSSProperty() {
458
+ return t(this, Ht);
459
+ }
449
460
  get focusDelayCSSProperty() {
450
461
  return t(this, ht);
451
462
  }
@@ -459,28 +470,28 @@ class Vt extends HTMLElement {
459
470
  return t(this, lt);
460
471
  }
461
472
  get currentScrollValue() {
462
- return l(this, o, Le).call(this, "current");
473
+ return l(this, o, ze).call(this, "current");
463
474
  }
464
475
  get targetScrollValue() {
465
- return l(this, o, Le).call(this, "target");
476
+ return l(this, o, ze).call(this, "target");
466
477
  }
467
478
  get contentWrapperElement() {
468
479
  return t(this, ct);
469
480
  }
470
481
  get contentElement() {
471
- return t(this, f);
482
+ return t(this, p);
472
483
  }
473
484
  get sections() {
474
485
  return t(this, c);
475
486
  }
476
487
  get position() {
477
- return t(this, re);
488
+ return t(this, ne);
478
489
  }
479
490
  get contentPosition() {
480
- return t(this, ne);
491
+ return t(this, he);
481
492
  }
482
493
  get viewportSize() {
483
- return t(this, v);
494
+ return t(this, C);
484
495
  }
485
496
  get scrollSize() {
486
497
  return t(this, S);
@@ -506,7 +517,7 @@ class Vt extends HTMLElement {
506
517
  return t(this, G);
507
518
  }
508
519
  get overscroll() {
509
- return t(this, $t);
520
+ return t(this, Bt);
510
521
  }
511
522
  get scrollLine() {
512
523
  return t(this, O);
@@ -527,7 +538,7 @@ class Vt extends HTMLElement {
527
538
  return t(this, E).current === "x" ? 0 : t(this, d).distance;
528
539
  }
529
540
  tryResplit() {
530
- !t(this, _) && (t(this, y).current || t(this, F).current || t(this, y).current || t(this, N).current || t(this, T).current) && l(this, o, ee).call(this);
541
+ !t(this, _) && (t(this, y).current || t(this, F).current || t(this, y).current || t(this, N).current || t(this, T).current) && l(this, o, se).call(this);
531
542
  }
532
543
  onScroll(...e) {
533
544
  return t(this, d).subscribe(...e);
@@ -536,32 +547,32 @@ class Vt extends HTMLElement {
536
547
  t(this, d).unsubscribe(...e);
537
548
  }
538
549
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
539
- range(e, i, r = 0) {
540
- const a = e - r, m = a + i + r * 2;
550
+ range(e, i, n = 0) {
551
+ const a = e - n, m = a + i + n * 2;
541
552
  return this.currentProgress < a ? 0 : this.currentProgress > m ? 1 : (this.currentProgress - a) / (m - a);
542
553
  }
543
- curve(e, i, r = 0) {
544
- return Math.sin(this.range(e, i, r) * Math.PI);
554
+ curve(e, i, n = 0) {
555
+ return Math.sin(this.range(e, i, n) * Math.PI);
545
556
  }
546
- visible(e, i, r = 0) {
547
- const a = e - r, m = a + i + r * 2;
557
+ visible(e, i, n = 0) {
558
+ const a = e - n, m = a + i + n * 2;
548
559
  return this.currentProgress >= a && this.currentProgress <= m;
549
560
  }
550
561
  scrollToSection(e, i) {
551
562
  if (!t(this, c).length)
552
563
  return;
553
- const r = t(this, P).current, a = l(this, o, Oe).call(this, e), m = t(this, c)[r], C = t(this, c)[a];
554
- if (m && C) {
564
+ const n = t(this, P).current, a = l(this, o, He).call(this, e), m = t(this, c)[n], v = t(this, c)[a];
565
+ if (m && v) {
555
566
  let I = 0;
556
- const Se = l(this, o, se).call(this), Mt = t(this, c)[Se], fe = Mt ? this.targetScrollValue - Mt.position : 0;
557
- t(this, y).current ? a === 0 && r === t(this, c).length - 1 ? I = t(this, S) + t(this, v) - m.position + t(this, k) : a === t(this, c).length - 1 && r === 0 ? I = C.position - (t(this, S) + t(this, v) + t(this, k)) : I = C.position - m.position : I = C.position - m.position, this.shiftPosition(I - fe, i);
567
+ const ge = l(this, o, ie).call(this), Mt = t(this, c)[ge], be = Mt ? this.targetScrollValue - Mt.position : 0;
568
+ t(this, y).current ? a === 0 && n === t(this, c).length - 1 ? I = t(this, S) + t(this, C) - m.position + t(this, k) : a === t(this, c).length - 1 && n === 0 ? I = v.position - (t(this, S) + t(this, C) + t(this, k)) : I = v.position - m.position : I = v.position - m.position, this.shiftPosition(I - be, i);
558
569
  }
559
570
  }
560
571
  shiftSections(e, i) {
561
572
  t(this, c).length && this.scrollToSection(t(this, P).current + e, i);
562
573
  }
563
574
  setPosition(e, i) {
564
- l(this, o, Pe).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ut) || (t(this, Z).set(t(this, d).current, { equalize: !0 }), t(this, Z).set(e, Me({}, i.tween)), h(this, ut, setTimeout(() => {
575
+ l(this, o, Le).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ut) || (t(this, Z).set(t(this, d).current, { equalize: !0 }), t(this, Z).set(e, Te({}, i.tween)), h(this, ut, setTimeout(() => {
565
576
  h(this, ut, void 0);
566
577
  }, i.tween.duration || 0))) : t(this, d).set(e, {
567
578
  equalize: (i == null ? void 0 : i.behaviour) === "instant"
@@ -571,20 +582,20 @@ class Vt extends HTMLElement {
571
582
  this.setPosition(t(this, d).target + e, i);
572
583
  }
573
584
  connectedCallback() {
574
- gt.register(this), h(this, d, new Ke(0, {
585
+ gt.register(this), h(this, d, new _e(0, {
575
586
  damping: 0.01,
576
587
  min: 0,
577
- order: Ge.SCROLL
578
- })), this.setAttribute("tabindex", "0"), h(this, V, new Ze({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Nt)), h(this, at, new je({
588
+ order: Ke.SCROLL
589
+ })), this.setAttribute("tabindex", "0"), h(this, V, new je({ element: t(this, p) })), t(this, V).changeEvent.subscribe(t(this, qt)), h(this, at, new Je({
579
590
  element: this
580
591
  })), t(this, at).changeEvent.subscribe(
581
- t(this, Nt)
582
- ), h(this, R, new Je({ element: t(this, f) })), t(this, R).changeEvent.subscribe(t(this, Nt)), h(this, w, new Qe({
592
+ t(this, qt)
593
+ ), h(this, R, new Qe({ element: t(this, p) })), t(this, R).changeEvent.subscribe(t(this, qt)), h(this, w, new Xe({
583
594
  culling: this
584
- })), t(this, w).changeEvent.subscribe(t(this, oe)), t(this, E).subscribe(() => {
585
- l(this, o, we).call(this);
595
+ })), t(this, w).changeEvent.subscribe(t(this, le)), t(this, E).subscribe(() => {
596
+ l(this, o, xe).call(this);
586
597
  }), t(this, tt).subscribe(() => {
587
- l(this, o, we).call(this);
598
+ l(this, o, xe).call(this);
588
599
  }), t(this, it).subscribe((e) => {
589
600
  t(this, V).axis = e.current ? "max" : t(this, E).current;
590
601
  }), t(this, xt).subscribe((e) => {
@@ -592,15 +603,15 @@ class Vt extends HTMLElement {
592
603
  }), t(this, W).subscribe(() => {
593
604
  t(this, x) && t(this, L).call(this);
594
605
  }), t(this, F).subscribe(({ current: e }) => {
595
- t(this, x) && (e ? l(this, o, ee).call(this) : l(this, o, Tt).call(this));
606
+ t(this, x) && (e ? l(this, o, se).call(this) : l(this, o, Tt).call(this));
596
607
  }), t(this, T).subscribe((e) => {
597
- t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, c).length ? l(this, o, ee).call(this) : !e.current && e.previous && t(this, c).length && l(this, o, Tt).call(this));
608
+ t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, w).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, c).length ? l(this, o, se).call(this) : !e.current && e.previous && t(this, c).length && l(this, o, Tt).call(this));
598
609
  }), t(this, N).subscribe((e) => {
599
- t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, c).length ? l(this, o, ee).call(this) : !e.current && e.previous && t(this, c).length && l(this, o, Tt).call(this));
610
+ t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, c).length ? l(this, o, se).call(this) : !e.current && e.previous && t(this, c).length && l(this, o, Tt).call(this));
600
611
  }), t(this, D).subscribe((e) => {
601
612
  t(this, x) && (t(this, L).call(this), l(this, o, St).call(this));
602
613
  }), t(this, y).subscribe((e) => {
603
- e.current ? (t(this, x) && (t(this, c).length || (t(this, F).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this, $t, 0), t(this, d).max = t(this, S), t(this, d).min = 0);
614
+ e.current ? (t(this, x) && (t(this, c).length || (t(this, F).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this, Bt, 0), t(this, d).max = t(this, S), t(this, d).min = 0);
604
615
  }), t(this, Et).subscribe((e) => {
605
616
  t(this, d).damping = e.current;
606
617
  }), t(this, Pt).subscribe((e) => {
@@ -624,144 +635,144 @@ class Vt extends HTMLElement {
624
635
  }), t(this, Z).subscribe((e) => {
625
636
  t(this, Z).isRunning.current && t(this, d).set(e.current, { equalize: !0 });
626
637
  }), t(this, ot).subscribe((e) => {
627
- e.current && !e.previous ? (this.classList.add("disabled"), l(this, o, be).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), l(this, o, me).call(this));
638
+ e.current && !e.previous ? (this.classList.add("disabled"), l(this, o, me).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), l(this, o, Se).call(this));
628
639
  }), t(this, lt).subscribe((e) => {
629
- 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, Ee).call(this));
630
- }), t(this, wt).observe(), t(this, E).observe(), t(this, tt).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, T).observe(), t(this, et).observe(), t(this, st).observe(), t(this, N).observe(), t(this, it).observe(), t(this, xt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Et).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, Ot).observe(), t(this, A).observe(), t(this, A).observe(), t(this, It).observe(), t(this, rt).observe(), t(this, M).observe(), t(this, nt).observe(), t(this, q).observe(), t(this, ht).observe(), t(this, kt).observe(), t(this, ot).observe(), t(this, lt).observe(), Dt.subscribe(t(this, le), ye.LAST);
640
+ e.current && !e.previous ? (this.classList.add("hibernated"), l(this, o, Ee).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), l(this, o, Pe).call(this));
641
+ }), t(this, wt).observe(), t(this, E).observe(), t(this, tt).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, T).observe(), t(this, et).observe(), t(this, st).observe(), t(this, N).observe(), t(this, it).observe(), t(this, xt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Et).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, Ot).observe(), t(this, A).observe(), t(this, A).observe(), t(this, It).observe(), t(this, rt).observe(), t(this, M).observe(), t(this, nt).observe(), t(this, q).observe(), t(this, Ht).observe(), t(this, ht).observe(), t(this, kt).observe(), t(this, ot).observe(), t(this, lt).observe(), Dt.subscribe(t(this, ce), we.LAST);
631
642
  }
632
643
  disconnectedCallback() {
633
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, wt).unobserve(), t(this, E).unobserve(), t(this, tt).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, T).unobserve(), t(this, et).unobserve(), t(this, st).unobserve(), t(this, N).unobserve(), t(this, it).unobserve(), t(this, xt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Et).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, Ot).unobserve(), t(this, A).unobserve(), t(this, It).unobserve(), t(this, rt).unobserve(), t(this, M).unobserve(), t(this, nt).unobserve(), t(this, q).unobserve(), t(this, ht).unobserve(), t(this, kt).unobserve(), t(this, ot).unobserve(), t(this, lt).unobserve(), Dt.unsubscribe(t(this, le)), l(this, o, xe).call(this), t(this, he).disconnect();
644
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, wt).unobserve(), t(this, E).unobserve(), t(this, tt).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, T).unobserve(), t(this, et).unobserve(), t(this, st).unobserve(), t(this, N).unobserve(), t(this, it).unobserve(), t(this, xt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Et).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, Ot).unobserve(), t(this, A).unobserve(), t(this, It).unobserve(), t(this, rt).unobserve(), t(this, M).unobserve(), t(this, nt).unobserve(), t(this, q).unobserve(), t(this, Ht).unobserve(), t(this, ht).unobserve(), t(this, kt).unobserve(), t(this, ot).unobserve(), t(this, lt).unobserve(), Dt.unsubscribe(t(this, ce)), l(this, o, Ee).call(this), t(this, oe).disconnect();
634
645
  }
635
646
  }
636
- d = new WeakMap(), wt = new WeakMap(), E = new WeakMap(), tt = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), T = new WeakMap(), et = new WeakMap(), st = new WeakMap(), N = new WeakMap(), it = new WeakMap(), xt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Et = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), Ot = new WeakMap(), A = new WeakMap(), It = new WeakMap(), rt = new WeakMap(), M = new WeakMap(), nt = new WeakMap(), q = new WeakMap(), ht = new WeakMap(), kt = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), f = new WeakMap(), Ht = new WeakMap(), c = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), v = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), at = new WeakMap(), R = new WeakMap(), w = new WeakMap(), P = new WeakMap(), $t = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), Bt = new WeakMap(), ut = new WeakMap(), Z = new WeakMap(), Wt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), he = new WeakMap(), dt = new WeakMap(), o = new WeakSet(), we = function() {
647
+ d = new WeakMap(), wt = new WeakMap(), E = new WeakMap(), tt = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), T = new WeakMap(), et = new WeakMap(), st = new WeakMap(), N = new WeakMap(), it = new WeakMap(), xt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Et = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), Ot = new WeakMap(), A = new WeakMap(), It = new WeakMap(), rt = new WeakMap(), M = new WeakMap(), nt = new WeakMap(), q = new WeakMap(), Ht = new WeakMap(), ht = new WeakMap(), kt = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), p = new WeakMap(), $t = new WeakMap(), c = new WeakMap(), ne = new WeakMap(), he = new WeakMap(), C = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), at = new WeakMap(), R = new WeakMap(), w = new WeakMap(), P = new WeakMap(), Bt = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), Wt = new WeakMap(), ut = new WeakMap(), Z = new WeakMap(), Ft = new WeakMap(), O = new WeakMap(), x = new WeakMap(), oe = new WeakMap(), dt = new WeakMap(), o = new WeakSet(), xe = function() {
637
648
  const e = t(this, E).current, i = t(this, tt).current ? "-reverse" : "";
638
- t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, it).current ? "max" : e, t(this, at).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, x) && t(this, L).call(this);
639
- }, ee = function() {
640
- l(this, o, Tt).call(this), t(this, Ht).assignedElements().forEach((e, i) => {
641
- e instanceof HTMLElement && t(this, c).push(new ss(e, i, this));
642
- }), t(this, f).style.transform = "", Yt(this, "scrollSectionsChange", {
649
+ t(this, p).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, it).current ? "max" : e, t(this, at).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, x) && t(this, L).call(this);
650
+ }, se = function() {
651
+ l(this, o, Tt).call(this), t(this, $t).assignedElements().forEach((e, i) => {
652
+ e instanceof HTMLElement && t(this, c).push(new is(e, i, this));
653
+ }), t(this, p).style.transform = "", te(this, "scrollSectionsChange", {
643
654
  custom: !0,
644
655
  composed: !0
645
656
  }), t(this, L).call(this), l(this, o, St).call(this);
646
657
  }, Tt = function() {
647
658
  t(this, c).forEach((e) => {
648
659
  e.destroy();
649
- }), h(this, c, []), t(this, P).reset(), t(this, d).reset(), Yt(this, "scrollSectionsChange", {
660
+ }), h(this, c, []), t(this, P).reset(), t(this, d).reset(), te(this, "scrollSectionsChange", {
650
661
  custom: !0,
651
662
  composed: !0
652
663
  });
653
- }, be = function() {
654
- t(this, K) || (h(this, K, !0), t(this, d).unsubscribe(t(this, Ft)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Bt)), clearInterval(t(this, ut)), t(this, Z).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, at).disconnect(), t(this, R).disconnect(), t(this, w).disconnect(), t(this, G) || (this.sections.forEach((e) => {
664
+ }, me = function() {
665
+ t(this, K) || (h(this, K, !0), t(this, d).unsubscribe(t(this, Nt)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Wt)), clearInterval(t(this, ut)), t(this, Z).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, at).disconnect(), t(this, R).disconnect(), t(this, w).disconnect(), t(this, G) || (this.sections.forEach((e) => {
655
666
  e.unsetTransform();
656
667
  }), t(this, L).call(this)));
657
- }, me = function() {
658
- t(this, K) && (h(this, K, !1), t(this, d).subscribe(t(this, Ft)), t(this, V).connect(), t(this, at).connect(), t(this, R).connect(), t(this, A).current && t(this, w).connect());
659
- }, xe = function() {
660
- t(this, _) || (h(this, _, !0), Dt.unsubscribe(t(this, L)), ie.unsubscribe(t(this, L)), l(this, o, be).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, c).length ? l(this, o, Tt).call(this) : (t(this, P).reset(), t(this, d).reset()), gt.unregister(this));
668
+ }, Se = function() {
669
+ t(this, K) && (h(this, K, !1), t(this, d).subscribe(t(this, Nt)), t(this, V).connect(), t(this, at).connect(), t(this, R).connect(), t(this, A).current && t(this, w).connect());
661
670
  }, Ee = function() {
662
- t(this, _) && (h(this, _, !1), gt.register(this), this.tryResplit(), l(this, o, me).call(this), Dt.subscribe(t(this, L), ye.SCROLL), ie.subscribe(this, t(this, L)));
663
- }, L = new WeakMap(), Ft = new WeakMap(), Oe = function(e) {
671
+ t(this, _) || (h(this, _, !0), Dt.unsubscribe(t(this, L)), re.unsubscribe(t(this, L)), l(this, o, me).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, Tt).call(this) : (t(this, P).reset(), t(this, d).reset()), gt.unregister(this));
672
+ }, Pe = function() {
673
+ t(this, _) && (h(this, _, !1), gt.register(this), this.tryResplit(), l(this, o, Se).call(this), Dt.subscribe(t(this, L), we.SCROLL), re.subscribe(this, t(this, L)));
674
+ }, L = new WeakMap(), Nt = new WeakMap(), He = function(e) {
664
675
  let i = t(this, P).current;
665
- return t(this, y).current ? i = Ue(e, t(this, c).length) : i = Ve(e, 0, this.limit), i;
666
- }, Nt = new WeakMap(), oe = new WeakMap(), Pe = function(e = 1) {
676
+ return t(this, y).current ? i = Ge(e, t(this, c).length) : i = Re(e, 0, this.limit), i;
677
+ }, qt = new WeakMap(), le = new WeakMap(), Le = function(e = 1) {
667
678
  t(this, rt).current && (t(this, w).direction = e), t(this, A).current && t(this, w).pauseAndContinue(
668
679
  t(this, It).current,
669
680
  this.sectionalCSSProperty.current
670
681
  );
671
- }, Le = function(e = "current") {
682
+ }, ze = function(e = "current") {
672
683
  if (t(this, y).current && t(this, c).length) {
673
- const i = t(this, d)[e] % (t(this, S) + t(this, v) + t(this, k));
674
- return i < 0 ? t(this, S) + i + t(this, v) + t(this, k) : i;
684
+ const i = t(this, d)[e] % Math.round(t(this, S) + t(this, C) + t(this, k));
685
+ return i < 0 ? t(this, S) + i + t(this, C) + t(this, k) : i;
675
686
  } else
676
687
  return t(this, d)[e];
677
688
  }, St = function() {
678
689
  if (t(this, c).length) {
679
690
  const e = t(this, P).current + t(this, nt).current;
680
- if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null), Yt(this, "scrollLine", {
691
+ if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null), te(this, "scrollLine", {
681
692
  detail: { line: t(this, O) }
682
693
  }), t(this, M).current) {
683
694
  this.classList.remove("end", "start"), t(this, O) && this.classList.add(t(this, O));
684
695
  const i = t(this, D).current + t(this, q).current;
685
- h(this, dt, []), t(this, c).forEach((r, a) => {
686
- r.setCurrentIndex(null), r.setCurrentIndexArc(null), r.setCurrentIndexArcAbs(null);
687
- const m = e - this.limit - 1 + t(this, q).current, C = e + i, I = this.sections.length - C;
688
- a >= e && a < C || a <= m ? (r.setMark("current"), t(this, dt).push(r)) : a >= C && a < C + I / 2 || a <= m + i ? r.setMark("next") : r.setMark("previous");
696
+ h(this, dt, []), t(this, c).forEach((n, a) => {
697
+ n.setCurrentIndex(null), n.setCurrentIndexArc(null), n.setCurrentIndexArcAbs(null);
698
+ const m = e - this.limit - 1 + t(this, q).current, v = e + i, I = this.sections.length - v;
699
+ a >= e && a < v || a <= m ? (n.setMark("current"), t(this, dt).push(n)) : a >= v && a < v + I / 2 || a <= m + i ? n.setMark("next") : n.setMark("previous");
689
700
  });
690
701
  }
691
702
  }
692
- }, He = function() {
703
+ }, $e = function() {
693
704
  if (t(this, M).current) {
694
705
  const e = Math.floor(t(this, dt).length / 2);
695
- t(this, dt).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, dt).forEach((i, r) => {
696
- const a = r - e;
697
- i.setCurrentIndex(r), i.setCurrentIndexArc(a), i.setCurrentIndexArcAbs(Math.abs(a)), i.setMiddle(r === e);
706
+ t(this, dt).sort((i, n) => i.element.getBoundingClientRect().left - n.element.getBoundingClientRect().left), t(this, dt).forEach((i, n) => {
707
+ const a = n - e;
708
+ i.setCurrentIndex(n), i.setCurrentIndexArc(a), i.setCurrentIndexArcAbs(Math.abs(a)), i.setMiddle(n === e);
698
709
  });
699
710
  }
700
- }, se = function(e = !1) {
701
- let i = this.targetScrollValue, r = 1 / 0, a = 0;
711
+ }, ie = function(e = !1) {
712
+ let i = this.targetScrollValue, n = 1 / 0, a = 0;
702
713
  const m = t(this, d).direction;
703
- for (let C = 0; C < t(this, c).length; C++) {
704
- const I = t(this, c)[C];
705
- let Se = t(this, Wt) ? I.size * m * -1 * 0.4 : 0, Mt = I.position;
714
+ for (let v = 0; v < t(this, c).length; v++) {
715
+ const I = t(this, c)[v];
716
+ let ge = t(this, Ft) ? I.size * m * -1 * 0.4 : 0, Mt = I.position;
706
717
  this.overscroll && Mt === 0 && e && (Mt = t(this, U));
707
- let fe = Math.abs(Mt + Se - i);
708
- fe < r && (r = fe, a = C);
718
+ let be = Math.abs(Mt + ge - i);
719
+ be <= n && (n = be, a = v);
709
720
  }
710
721
  return a;
711
- }, le = new WeakMap();
722
+ }, ce = new WeakMap();
712
723
  H && !customElements.get("e-scroll") && customElements.define("e-scroll", Vt);
713
- var ce;
714
- class ze extends HTMLElement {
724
+ var ae;
725
+ class Ie extends HTMLElement {
715
726
  constructor() {
716
727
  super(...arguments);
717
- s(this, ce, null);
728
+ s(this, ae, null);
718
729
  }
719
730
  get scrollElement() {
720
- return t(this, ce);
731
+ return t(this, ae);
721
732
  }
722
733
  connectedCallback() {
723
- const e = Re(this, Vt);
724
- e instanceof Vt ? h(this, ce, e) : console.error(this, "e-scroll not found");
734
+ const e = Oe(this, Vt);
735
+ e instanceof Vt ? h(this, ae, e) : console.error(this, "e-scroll not found");
725
736
  }
726
737
  }
727
- ce = new WeakMap();
728
- var pt, z, j, J, qt, Ut, ft, Gt, ae, ue;
729
- class rs extends ze {
738
+ ae = new WeakMap();
739
+ var ft, z, j, J, Ut, Gt, pt, Kt, ue, de;
740
+ class ns extends Ie {
730
741
  constructor() {
731
742
  super();
732
- s(this, pt, null);
743
+ s(this, ft, null);
733
744
  s(this, z, null);
734
745
  s(this, j, !1);
735
746
  s(this, J, 0);
736
- s(this, qt, 0);
737
747
  s(this, Ut, 0);
738
- s(this, ft, () => {
748
+ s(this, Gt, 0);
749
+ s(this, pt, () => {
739
750
  h(this, j, this.offsetWidth > this.offsetHeight);
740
751
  const e = t(this, j) ? this.offsetWidth : this.offsetHeight;
741
- h(this, J, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, J, Math.max(t(this, J), 30)), t(this, j) ? (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, qt, e - t(this, J)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Gt).call(this);
752
+ h(this, J, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, J, Math.max(t(this, J), 30)), t(this, j) ? (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, Ut, e - t(this, J)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Kt).call(this);
742
753
  });
743
- s(this, Gt, () => {
744
- h(this, Ut, this.scrollElement.currentProgress * t(this, qt)), t(this, j) ? t(this, z).style.transform = `translate3d(${t(this, Ut)}px, 0px, 0px)` : t(this, z).style.transform = `translate3d(0px, ${t(this, Ut)}px, 0px)`;
754
+ s(this, Kt, () => {
755
+ h(this, Gt, this.scrollElement.currentProgress * t(this, Ut)), t(this, j) ? t(this, z).style.transform = `translate3d(${t(this, Gt)}px, 0px, 0px)` : t(this, z).style.transform = `translate3d(0px, ${t(this, Gt)}px, 0px)`;
745
756
  });
746
- s(this, ae, () => {
757
+ s(this, ue, () => {
747
758
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
748
759
  });
749
- s(this, ue, (e) => {
750
- document.documentElement.classList.add("grabbing"), Ye(
760
+ s(this, de, (e) => {
761
+ document.documentElement.classList.add("grabbing"), ts(
751
762
  (a) => {
752
- const m = t(this, j) ? a.x : a.y, C = this.scrollElement.distance / t(this, qt), I = (m - r) * C;
763
+ const m = t(this, j) ? a.x : a.y, v = this.scrollElement.distance / t(this, Ut), I = (m - n) * v;
753
764
  this.scrollElement.setPosition(i + I);
754
765
  },
755
766
  () => {
756
767
  document.documentElement.classList.remove("grabbing");
757
768
  }
758
769
  );
759
- const i = this.scrollElement.damped.target, r = t(this, j) ? e.x : e.y;
770
+ const i = this.scrollElement.damped.target, n = t(this, j) ? e.x : e.y;
760
771
  });
761
772
  if (H) {
762
773
  const e = this.attachShadow({ mode: "open" });
763
774
  e.adoptedStyleSheets = [
764
- De({
775
+ Ve({
765
776
  ":host": {
766
777
  display: "inline-block",
767
778
  zIndex: "1",
@@ -790,7 +801,7 @@ class rs extends ze {
790
801
  touchAction: "none"
791
802
  }
792
803
  })
793
- ], h(this, pt, document.createElement("slot")), t(this, pt).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, pt));
804
+ ], h(this, ft, document.createElement("slot")), t(this, ft).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, ft));
794
805
  }
795
806
  }
796
807
  get thumbElement() {
@@ -798,66 +809,66 @@ class rs extends ze {
798
809
  }
799
810
  connectedCallback() {
800
811
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
801
- const e = t(this, pt).assignedElements()[0] || t(this, pt).firstElementChild;
802
- h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, ue)), Dt.subscribe(t(this, ft), ye.SCROLL), ie.subscribe(this, t(this, ft)), ie.subscribe(this.scrollElement, t(this, ft)), this.scrollElement.onScroll(t(this, Gt)), this.scrollElement.axisCSSProperty.subscribe(t(this, ae));
812
+ const e = t(this, ft).assignedElements()[0] || t(this, ft).firstElementChild;
813
+ h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, de)), Dt.subscribe(t(this, pt), we.SCROLL), re.subscribe(this, t(this, pt)), re.subscribe(this.scrollElement, t(this, pt)), this.scrollElement.onScroll(t(this, Kt)), this.scrollElement.axisCSSProperty.subscribe(t(this, ue));
803
814
  }
804
815
  disconnectedCallback() {
805
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, ue)), Dt.unsubscribe(t(this, ft)), ie.unsubscribe(t(this, ft)), this.scrollElement.offScroll(t(this, Gt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, ae));
816
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, de)), Dt.unsubscribe(t(this, pt)), re.unsubscribe(t(this, pt)), this.scrollElement.offScroll(t(this, Kt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, ue));
806
817
  }
807
818
  }
808
- pt = new WeakMap(), z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), qt = new WeakMap(), Ut = new WeakMap(), ft = new WeakMap(), Gt = new WeakMap(), ae = new WeakMap(), ue = new WeakMap();
809
- H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", rs);
810
- var Kt, _t, Zt;
811
- class $e extends ze {
819
+ ft = new WeakMap(), z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), Ut = new WeakMap(), Gt = new WeakMap(), pt = new WeakMap(), Kt = new WeakMap(), ue = new WeakMap(), de = new WeakMap();
820
+ H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", ns);
821
+ var _t, Zt, jt;
822
+ class Be extends Ie {
812
823
  constructor() {
813
824
  super();
814
- s(this, Kt, new p(this, "--behaviour", "smooth"));
815
- s(this, _t, new p(
825
+ s(this, _t, new f(this, "--behaviour", "smooth"));
826
+ s(this, Zt, new f(
816
827
  this,
817
828
  "--tween-easing",
818
829
  !1
819
830
  ));
820
- s(this, Zt, new p(this, "--tween-duration", 0));
831
+ s(this, jt, new f(this, "--tween-duration", 0));
821
832
  H && this.addEventListener("click", () => {
822
- const e = t(this, Kt).current, i = t(this, _t).current, r = t(this, Zt).current;
833
+ const e = t(this, _t).current, i = t(this, Zt).current, n = t(this, jt).current;
823
834
  this.handleClick({
824
835
  behaviour: e,
825
- tween: i || r ? { easing: i, duration: r } : void 0
836
+ tween: i || n ? { easing: i, duration: n } : void 0
826
837
  });
827
838
  });
828
839
  }
829
840
  connectedCallback() {
830
- super.connectedCallback(), t(this, Kt).observe(), t(this, _t).observe(), t(this, Zt).observe();
841
+ super.connectedCallback(), t(this, _t).observe(), t(this, Zt).observe(), t(this, jt).observe();
831
842
  }
832
843
  disconnectedCallback() {
833
- t(this, Kt).close(), t(this, _t).close(), t(this, Zt).close();
844
+ t(this, _t).close(), t(this, Zt).close(), t(this, jt).close();
834
845
  }
835
846
  }
836
- Kt = new WeakMap(), _t = new WeakMap(), Zt = new WeakMap();
837
- var jt;
838
- class ns extends $e {
847
+ _t = new WeakMap(), Zt = new WeakMap(), jt = new WeakMap();
848
+ var Jt;
849
+ class hs extends Be {
839
850
  constructor() {
840
851
  super(...arguments);
841
- s(this, jt, new p(this, "--set", 1));
852
+ s(this, Jt, new f(this, "--set", 1));
842
853
  }
843
854
  handleClick(e) {
844
- this.scrollElement.scrollToSection(t(this, jt).current, e);
855
+ this.scrollElement.scrollToSection(t(this, Jt).current, e);
845
856
  }
846
857
  connectedCallback() {
847
- super.connectedCallback(), t(this, jt).observe();
858
+ super.connectedCallback(), t(this, Jt).observe();
848
859
  }
849
860
  disconnectedCallback() {
850
- super.disconnectedCallback(), t(this, jt).close();
861
+ super.disconnectedCallback(), t(this, Jt).close();
851
862
  }
852
863
  }
853
- jt = new WeakMap();
854
- H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ns);
855
- var Q, Jt;
856
- class hs extends $e {
864
+ Jt = new WeakMap();
865
+ H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", hs);
866
+ var Q, Qt;
867
+ class os extends Be {
857
868
  constructor() {
858
869
  super(...arguments);
859
- s(this, Q, new p(this, "--step", 1));
860
- s(this, Jt, () => {
870
+ s(this, Q, new f(this, "--step", 1));
871
+ s(this, Qt, () => {
861
872
  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");
862
873
  });
863
874
  }
@@ -866,61 +877,61 @@ class hs extends $e {
866
877
  }
867
878
  connectedCallback() {
868
879
  super.connectedCallback(), this.scrollElement && (t(this, Q).subscribe(() => {
869
- t(this, Jt).call(this);
880
+ t(this, Qt).call(this);
870
881
  }), t(this, Q).observe(), this.scrollElement.addEventListener(
871
882
  "scrollLine",
872
- t(this, Jt)
873
- ), t(this, Jt).call(this));
883
+ t(this, Qt)
884
+ ), t(this, Qt).call(this));
874
885
  }
875
886
  disconnectedCallback() {
876
887
  super.disconnectedCallback(), t(this, Q).close(), this.removeAttribute("disabled");
877
888
  }
878
889
  }
879
- Q = new WeakMap(), Jt = new WeakMap();
880
- H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", hs);
881
- var X, bt, Qt, de, pe, Xt;
882
- class os {
883
- constructor(n, e, i) {
890
+ Q = new WeakMap(), Qt = new WeakMap();
891
+ H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", os);
892
+ var X, bt, Xt, fe, pe, Yt;
893
+ class ls {
894
+ constructor(r, e, i) {
884
895
  s(this, X, null);
885
896
  s(this, bt, null);
886
- s(this, Qt, null);
887
- s(this, de, null);
897
+ s(this, Xt, null);
898
+ s(this, fe, null);
888
899
  s(this, pe, () => {
889
- t(this, bt).scrollToSection(t(this, Qt), {
890
- behaviour: t(this, de)
900
+ t(this, bt).scrollToSection(t(this, Xt), {
901
+ behaviour: t(this, fe)
891
902
  });
892
903
  });
893
- s(this, Xt, () => {
904
+ s(this, Yt, () => {
894
905
  t(this, X).classList.toggle(
895
906
  "current",
896
- t(this, bt).counter.current === t(this, Qt)
907
+ t(this, bt).counter.current === t(this, Xt)
897
908
  );
898
909
  });
899
- H && (h(this, X, document.createElement("button")), h(this, bt, n), h(this, de, i), h(this, Qt, e), t(this, X).addEventListener("click", t(this, pe)), t(this, bt).counter.subscribe(t(this, Xt)), t(this, Xt).call(this));
910
+ H && (h(this, X, document.createElement("button")), h(this, bt, r), h(this, fe, i), h(this, Xt, e), t(this, X).addEventListener("click", t(this, pe)), t(this, bt).counter.subscribe(t(this, Yt)), t(this, Yt).call(this));
900
911
  }
901
912
  get element() {
902
913
  return t(this, X);
903
914
  }
904
915
  destroy() {
905
- t(this, X).removeEventListener("click", t(this, pe)), t(this, bt).counter.unsubscribe(t(this, Xt)), t(this, X).remove();
916
+ t(this, X).removeEventListener("click", t(this, pe)), t(this, bt).counter.unsubscribe(t(this, Yt)), t(this, X).remove();
906
917
  }
907
918
  }
908
- X = new WeakMap(), bt = new WeakMap(), Qt = new WeakMap(), de = new WeakMap(), pe = new WeakMap(), Xt = new WeakMap();
919
+ X = new WeakMap(), bt = new WeakMap(), Xt = new WeakMap(), fe = new WeakMap(), pe = new WeakMap(), Yt = new WeakMap();
909
920
  var mt, At;
910
- class ls extends ze {
921
+ class cs extends Ie {
911
922
  constructor() {
912
923
  super(...arguments);
913
924
  s(this, mt, []);
914
- s(this, At, ts(() => {
925
+ s(this, At, es(() => {
915
926
  t(this, mt).forEach((i) => i.destroy()), h(this, mt, []);
916
927
  const e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
917
928
  for (let i = 0; i < e; i++) {
918
- const r = new os(
929
+ const n = new ls(
919
930
  this.scrollElement,
920
931
  i,
921
932
  this.getAttribute("behaviour") || "smooth"
922
933
  );
923
- this.appendChild(r.element), t(this, mt).push(r);
934
+ this.appendChild(n.element), t(this, mt).push(n);
924
935
  }
925
936
  }, 0));
926
937
  }
@@ -942,11 +953,11 @@ class ls extends ze {
942
953
  }
943
954
  }
944
955
  mt = new WeakMap(), At = new WeakMap();
945
- H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", ls);
946
- class cs extends es {
956
+ H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", cs);
957
+ class as extends ss {
947
958
  connectedCallback() {
948
- const n = Re(this, Vt);
949
- n instanceof Vt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
959
+ const r = Oe(this, Vt);
960
+ r instanceof Vt ? (this.scrollContainer = r, this.scrollContainer.addEventListener(
950
961
  "scrollSectionsChange",
951
962
  this.findAnotherScrollEntries
952
963
  ), this.scrollContainer.addEventListener("scrollResize", this.resize), this.resize()) : console.error(this, "e-scroll not found");
@@ -958,12 +969,12 @@ class cs extends es {
958
969
  ), this.scrollContainer.removeEventListener("scrollResize", this.resize));
959
970
  }
960
971
  }
961
- H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", cs);
972
+ H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", as);
962
973
  export {
963
- ls as ScrollBulletButtonsElement,
974
+ cs as ScrollBulletButtonsElement,
964
975
  Vt as ScrollElement,
965
- cs as ScrollSegmentElement,
966
- ns as ScrollSetButtonElement,
967
- hs as ScrollStepButtonElement,
968
- rs as ScrollbarElement
976
+ as as ScrollSegmentElement,
977
+ hs as ScrollSetButtonElement,
978
+ os as ScrollStepButtonElement,
979
+ ns as ScrollbarElement
969
980
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.50.26",
3
+ "version": "0.50.28",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"