aptechka 0.51.13 → 0.51.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var Ze=Object.defineProperty;var Ae=Object.getOwnPropertySymbols;var je=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable;var Me=d=>{throw TypeError(d)};var Re=(d,n,e)=>n in d?Ze(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e,Te=(d,n)=>{for(var e in n||(n={}))je.call(n,e)&&Re(d,e,n[e]);if(Ae)for(var e of Ae(n))Ke.call(n,e)&&Re(d,e,n[e]);return d};var Ee=(d,n,e)=>n.has(d)||Me("Cannot "+e);var t=(d,n,e)=>(Ee(d,n,"read from private field"),e?e.call(d):n.get(d)),s=(d,n,e)=>n.has(d)?Me("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(d):n.set(d,e),h=(d,n,e,i)=>(Ee(d,n,"write to private field"),i?i.call(d,e):n.set(d,e),e),c=(d,n,e)=>(Ee(d,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Je=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),Qe=require("../easings-GegIwET5.cjs"),se=require("../events-KVanG9sR.cjs"),De=require("../function-MthRj-GJ.cjs"),Be=require("../jss-CRBgdvJ3.cjs"),Bt=require("../layout-Ctc2p3uz.cjs"),Oe=require("../math-GDWEqu7y.cjs"),Xe=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ye=require("../order/index.cjs"),Ye=require("../Damped-DgAIjXp3.cjs"),ts=require("../Tweened-DpJDlbj9.cjs"),ge=require("../controls/index.cjs"),Ot=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),qe=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),es=require("../device/index.cjs"),he=require("../element-resizer/index.cjs"),ss=require("../gestures-C7gbKx11.cjs"),Ve=require("../dom-JBOkFLTh.cjs"),is=require("../scroll-segment/index.cjs");var b,Vt,g,Ct,V,tt,vt,Pt,ie;class rs{constructor(n,e,i){s(this,Pt);s(this,b);s(this,Vt);s(this,g);s(this,Ct,0);s(this,V,0);s(this,tt,null);s(this,vt,0);h(this,b,n),h(this,Vt,e),h(this,g,i),yt.scrollEntries.register(t(this,b)),this.setIndex(t(this,Vt))}get element(){return t(this,b)}get index(){return t(this,Vt)}get size(){return t(this,Ct)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,b)),this.unsetTransform()}unsetTransform(){t(this,b).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,b).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,b).style.width=n+"px",t(this,b).style.height=""):(t(this,b).style.height=n+"px",t(this,b).style.width="")):(t(this,b).style.width="",t(this,b).style.height="",t(this,b).style.removeProperty("--size"))}resize(){h(this,Ct,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?Bt.getCumulativeOffsetTop(t(this,b)):Bt.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,f=t(this,V)+t(this,Ct)+i,y=Oe.clamp(r,u,f);h(this,vt,y*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,tt)!==n&&(t(this,tt)&&t(this,b).classList.remove(t(this,tt)),n&&t(this,b).classList.add(n),h(this,tt,n),se.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,tt)},custom:!0}))}setMiddle(n){t(this,b).classList.toggle("middle",n)}setIndex(n){c(this,Pt,ie).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,ie).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,ie).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,ie).call(this,"current-index-arc-abs",n)}}b=new WeakMap,Vt=new WeakMap,g=new WeakMap,Ct=new WeakMap,V=new WeakMap,tt=new WeakMap,vt=new WeakMap,Pt=new WeakSet,ie=function(n,e){e!==null?(t(this,b).style.setProperty(`--${n}`,e.toString()),t(this,b).setAttribute(`data-${n}`,e.toString())):(t(this,b).style.removeProperty(`--${n}`),t(this,b).removeAttribute(`data-${n}`))};const ns=Be.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Et,w,et,_,H,$,M,st,it,W,rt,wt,T,v,xt,Lt,zt,It,_t,A,kt,nt,R,ht,F,At,ot,Rt,lt,ct,ut,p,Ht,l,oe,le,C,m,k,q,at,D,E,x,$t,N,U,G,Z,Wt,dt,j,Ft,B,P,Nt,St,o,we,re,Dt,Ce,ve,xe,Le,L,ce,_e,Ut,ue,ze,Ie,gt,He,ne,ae;class Tt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Et,new S.CSSProperty(this,"--controls",!0));s(this,w,new S.CSSProperty(this,"--axis","y"));s(this,et,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,st,new S.CSSProperty(this,"--tween-easing",!1));s(this,it,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,rt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,xt,new S.CSSProperty(this,"--damping",20));s(this,Lt,new S.CSSProperty(this,"--mass",0));s(this,zt,new S.CSSProperty(this,"--stiffness",0));s(this,It,new S.CSSProperty(this,"--mouse-drag",!1));s(this,_t,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,kt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,nt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ht,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,At,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ot,new S.CSSProperty(this,"--focus-delay",0));s(this,Rt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,lt,new S.CSSProperty(this,"--disabled",!1));s(this,ct,new S.CSSProperty(this,"--hibernate",!1));s(this,ut,null);s(this,p,null);s(this,Ht,null);s(this,l,[]);s(this,oe,0);s(this,le,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,at,null);s(this,D,null);s(this,E,null);s(this,x,new Je.Store(0));s(this,$t,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Wt);s(this,dt);s(this,j,new ts.Tweened);s(this,Ft,!1);s(this,B,null);s(this,P,!1);s(this,Nt,null);s(this,St,[]);s(this,L,()=>{this.resize()});s(this,ce,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,$t,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,ne).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,He).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,Ut,(e,i)=>{t(this,Et).current&&(c(this,o,ze).call(this,Math.sign(i)||1),t(this,ue).call(this,e,i))});s(this,ue,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,dt)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ot).current&&(clearInterval(t(this,Wt)),h(this,Wt,setTimeout(()=>{const r=t(this,l)[c(this,o,ne).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Rt).current,easing:Qe.easeInOutExpo}})},t(this,ot).current))),!(e.includes("drag")&&!es.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,st).current||t(this,it).current?{easing:t(this,st).current||"easeInOutCubic",duration:t(this,it).current||500}:void 0};t(this,Ft)?this.scrollToSection(c(this,o,ne).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ft,e==="drag")}});s(this,ae,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Le).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ns];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ut,document.createElement("div")),t(this,ut).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ht,document.createElement("slot")),t(this,p).appendChild(t(this,Ht)),t(this,ut).appendChild(t(this,p)),e.appendChild(t(this,ut)),h(this,Nt,new MutationObserver(De.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Et)}get axisCSSProperty(){return t(this,w)}get reverseCSSProperty(){return t(this,et)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,st)}get durationCSSProperty(){return t(this,it)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,rt)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,Lt)}get stiffnessCSSProperty(){return t(this,zt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,_t)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,kt)}get autoplayUserDirectionCSSProperty(){return t(this,nt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ht)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,At)}get focusDelayCSSProperty(){return t(this,ot)}get focusDurationCSSProperty(){return t(this,Rt)}get disabledCSSProperty(){return t(this,lt)}get hibernatedCSSProperty(){return t(this,ct)}get currentScrollValue(){return c(this,o,Ie).call(this,"current")}get targetScrollValue(){return c(this,o,Ie).call(this,"target")}get contentWrapperElement(){return t(this,ut)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,oe)}get contentPosition(){return t(this,le)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,$t)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,re).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>f?1:(this.currentProgress-u)/(f-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,_e).call(this,e),f=t(this,l)[r],y=t(this,l)[u];if(f&&y){let I=0;const Pe=c(this,o,ne).call(this),qt=t(this,l)[Pe],me=qt?this.targetScrollValue-qt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?I=t(this,m)+t(this,C)-f.position+t(this,k):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-f.position:I=y.position-f.position,this.shiftPosition(I-me,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,ze).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,dt)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,Te({},i.tween)),h(this,dt,setTimeout(()=>{h(this,dt,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ct).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,oe,this.vertical?Bt.getCumulativeOffsetTop(this):Bt.getCumulativeOffsetLeft(this)),h(this,le,this.vertical?Bt.getCumulativeOffsetTop(t(this,p)):Bt.getCumulativeOffsetLeft(t(this,p))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(f=>{f.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,C))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),f=t(this,m)-u;h(this,N,r.position+r.size+f)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,lt).current||c(this,o,ve).call(this):c(this,o,Ce).call(this),se.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new Ye.Damped(0,{damping:.01,min:0,order:ye.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new ge.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ut)),h(this,at,new ge.KeyboardControls({element:this})),t(this,at).changeEvent.subscribe(t(this,Ut)),h(this,D,new ge.DragControls({element:t(this,p),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,Ut)),h(this,E,new ge.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,ue)),t(this,w).subscribe(()=>{c(this,o,we).call(this)}),t(this,et).subscribe(()=>{c(this,o,we).call(this)}),t(this,rt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,w).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,re).call(this):c(this,o,Dt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,L).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,$t,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,Lt).subscribe(e=>{t(this,a).mass=e.current}),t(this,zt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,E).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,nt).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ht).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,At).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,Ce).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,ve).call(this))}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,xe).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Le).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,et).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,st).observe(),t(this,it).observe(),t(this,W).observe(),t(this,rt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,It).observe(),t(this,_t).observe(),t(this,A).observe(),t(this,A).observe(),t(this,kt).observe(),t(this,nt).observe(),t(this,R).observe(),t(this,ht).observe(),t(this,F).observe(),t(this,At).observe(),t(this,ot).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,ct).observe(),Ot.windowResizer.subscribe(t(this,ae),ye.RESIZE_ORDER.LAST),t(this,Nt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Et).unobserve(),t(this,w).unobserve(),t(this,et).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,st).unobserve(),t(this,it).unobserve(),t(this,W).unobserve(),t(this,rt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,It).unobserve(),t(this,_t).unobserve(),t(this,A).unobserve(),t(this,kt).unobserve(),t(this,nt).unobserve(),t(this,R).unobserve(),t(this,ht).unobserve(),t(this,F).unobserve(),t(this,At).unobserve(),t(this,ot).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),Ot.windowResizer.unsubscribe(t(this,ae)),c(this,o,xe).call(this),t(this,Nt).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,et=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,st=new WeakMap,it=new WeakMap,W=new WeakMap,rt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,It=new WeakMap,_t=new WeakMap,A=new WeakMap,kt=new WeakMap,nt=new WeakMap,R=new WeakMap,ht=new WeakMap,F=new WeakMap,At=new WeakMap,ot=new WeakMap,Rt=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,p=new WeakMap,Ht=new WeakMap,l=new WeakMap,oe=new WeakMap,le=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,at=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,$t=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Wt=new WeakMap,dt=new WeakMap,j=new WeakMap,Ft=new WeakMap,B=new WeakMap,P=new WeakMap,Nt=new WeakMap,St=new WeakMap,o=new WeakSet,we=function(){const e=t(this,w).current,i=t(this,et).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,rt).current?"max":e,t(this,at).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,L).call(this)},re=function(){c(this,o,Dt).call(this),t(this,Ht).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new rs(e,i,this))}),t(this,p).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,gt).call(this)},Dt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ce=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,ce)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Wt)),clearInterval(t(this,dt)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,at).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ve=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,ce),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,at).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},xe=function(){t(this,Z)||(h(this,Z,!0),Ot.windowResizer.unsubscribe(t(this,L)),he.elementResizer.unsubscribe(t(this,L)),c(this,o,Ce).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Dt).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Le=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,ve).call(this),Ot.windowResizer.subscribe(t(this,L),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,ce=new WeakMap,_e=function(e){let i=t(this,x).current;return t(this,v).current?i=Xe.loopNumber(e,t(this,l).length):i=Oe.clamp(e,0,this.limit),i},Ut=new WeakMap,ue=new WeakMap,ze=function(e=1){t(this,nt).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,kt).current,this.sectionalCSSProperty.current)},Ie=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ht).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),se.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,St,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=f?(r.setMark("current"),t(this,St).push(r)):u>=y&&u<y+I/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},He=function(){if(t(this,R).current){const e=Math.floor(t(this,St).length/2);t(this,St).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,St).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ne=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const f=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Pe=t(this,Ft)?I.size*f*-1*.4:0,qt=I.position;this.overscroll&&qt===0&&e&&(qt=t(this,N));let me=Math.abs(qt+Pe-i);me<=r&&(r=me,u=y)}return u},ae=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Tt);var de;class ke extends HTMLElement{constructor(){super(...arguments);s(this,de,null)}get scrollElement(){return t(this,de)}connectedCallback(){const e=Ve.findParentElement(this,Tt);e instanceof Tt?h(this,de,e):console.error(this,"e-scroll not found")}}de=new WeakMap;var pt,z,K,J,Gt,Zt,bt,jt,Se,pe;class $e extends ke{constructor(){super();s(this,pt,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Gt,0);s(this,Zt,0);s(this,bt,()=>{h(this,K,this.offsetWidth>this.offsetHeight);const e=t(this,K)?this.offsetWidth:this.offsetHeight;h(this,J,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,J,Math.max(t(this,J),30)),t(this,K)?(t(this,z).style.width=t(this,J)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,J)+"px"),h(this,Gt,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,jt).call(this)});s(this,jt,()=>{h(this,Zt,this.scrollElement.currentProgress*t(this,Gt)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Zt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Zt)}px, 0px)`});s(this,Se,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,pe,e=>{document.documentElement.classList.add("grabbing"),ss.setupDrag(u=>{const f=t(this,K)?u.x:u.y,y=this.scrollElement.distance/t(this,Gt),I=(f-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,K)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Be.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,pe)),Ot.windowResizer.subscribe(t(this,bt),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,bt)),he.elementResizer.subscribe(this.scrollElement,t(this,bt)),this.scrollElement.onScroll(t(this,jt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Se))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,pe)),Ot.windowResizer.unsubscribe(t(this,bt)),he.elementResizer.unsubscribe(t(this,bt)),this.scrollElement.offScroll(t(this,jt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Se))}}pt=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,bt=new WeakMap,jt=new WeakMap,Se=new WeakMap,pe=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",$e);var Kt,Jt,Qt;class We extends ke{constructor(){super();s(this,Kt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Jt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Qt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Kt).current,i=t(this,Jt).current,r=t(this,Qt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Kt).observe(),t(this,Jt).observe(),t(this,Qt).observe()}disconnectedCallback(){t(this,Kt).close(),t(this,Jt).close(),t(this,Qt).close()}}Kt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap;var Xt;class Fe extends We{constructor(){super(...arguments);s(this,Xt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xt).close()}}Xt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Fe);var Q,Yt;class Ne extends We{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Yt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Q).current>0&&this.scrollElement.scrollLine==="end"||t(this,Q).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Q).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Q).subscribe(()=>{t(this,Yt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Yt)),t(this,Yt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Yt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ne);var X,ft,te,be,fe,ee;class hs{constructor(n,e,i){s(this,X,null);s(this,ft,null);s(this,te,null);s(this,be,null);s(this,fe,()=>{t(this,ft).scrollToSection(t(this,te),{behaviour:t(this,be)})});s(this,ee,()=>{t(this,X).classList.toggle("current",t(this,ft).counter.current===t(this,te))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,ft,n),h(this,be,i),h(this,te,e),t(this,X).addEventListener("click",t(this,fe)),t(this,ft).counter.subscribe(t(this,ee)),t(this,ee).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,fe)),t(this,ft).counter.unsubscribe(t(this,ee)),t(this,X).remove()}}X=new WeakMap,ft=new WeakMap,te=new WeakMap,be=new WeakMap,fe=new WeakMap,ee=new WeakMap;var Mt,mt,Y;class Ue extends ke{constructor(){super(...arguments);s(this,Mt,null);s(this,mt,[]);s(this,Y,De.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new hs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Mt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Y)),this.scrollElement.loopCSSProperty.subscribe(t(this,Y)),h(this,Mt,document.createElement("div")),this.appendChild(t(this,Mt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Y)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,Y)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Mt).remove()}}Mt=new WeakMap,mt=new WeakMap,Y=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Ue);class Ge extends is.ScrollSegmentElement{connectedCallback(){const n=Ve.findParentElement(this,Tt);n instanceof Tt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Tt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ge);exports.ScrollBulletButtonsElement=Ue;exports.ScrollElement=Tt;exports.ScrollSegmentElement=Ge;exports.ScrollSetButtonElement=Fe;exports.ScrollStepButtonElement=Ne;exports.ScrollbarElement=$e;
1
+ "use strict";var je=Object.defineProperty;var Ae=Object.getOwnPropertySymbols;var Ke=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable;var Me=d=>{throw TypeError(d)};var Re=(d,n,e)=>n in d?je(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e,Te=(d,n)=>{for(var e in n||(n={}))Ke.call(n,e)&&Re(d,e,n[e]);if(Ae)for(var e of Ae(n))Je.call(n,e)&&Re(d,e,n[e]);return d};var Ee=(d,n,e)=>n.has(d)||Me("Cannot "+e);var t=(d,n,e)=>(Ee(d,n,"read from private field"),e?e.call(d):n.get(d)),s=(d,n,e)=>n.has(d)?Me("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(d):n.set(d,e),h=(d,n,e,i)=>(Ee(d,n,"write to private field"),i?i.call(d,e):n.set(d,e),e),c=(d,n,e)=>(Ee(d,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Qe=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),Xe=require("../easings-GegIwET5.cjs"),se=require("../events-KVanG9sR.cjs"),De=require("../function-MthRj-GJ.cjs"),Be=require("../jss-CRBgdvJ3.cjs"),Bt=require("../layout-Ctc2p3uz.cjs"),Oe=require("../math-GDWEqu7y.cjs"),Ve=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ye=require("../order/index.cjs"),Ye=require("../Damped-DgAIjXp3.cjs"),ts=require("../Tweened-DpJDlbj9.cjs"),ge=require("../controls/index.cjs"),Ot=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),qe=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),es=require("../device/index.cjs"),he=require("../element-resizer/index.cjs"),ss=require("../gestures-C7gbKx11.cjs"),_e=require("../dom-JBOkFLTh.cjs"),is=require("../scroll-segment/index.cjs");var b,Vt,g,Ct,V,tt,vt,Pt,ie;class rs{constructor(n,e,i){s(this,Pt);s(this,b);s(this,Vt);s(this,g);s(this,Ct,0);s(this,V,0);s(this,tt,null);s(this,vt,0);h(this,b,n),h(this,Vt,e),h(this,g,i),yt.scrollEntries.register(t(this,b)),this.setIndex(t(this,Vt))}get element(){return t(this,b)}get index(){return t(this,Vt)}get size(){return t(this,Ct)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,b)),this.unsetTransform()}unsetTransform(){t(this,b).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,b).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,b).style.width=n+"px",t(this,b).style.height=""):(t(this,b).style.height=n+"px",t(this,b).style.width="")):(t(this,b).style.width="",t(this,b).style.height="",t(this,b).style.removeProperty("--size"))}resize(){h(this,Ct,t(this,g).vertical?t(this,b).offsetHeight:t(this,b).offsetWidth),h(this,V,t(this,g).vertical?Bt.getCumulativeOffsetTop(t(this,b)):Bt.getCumulativeOffsetLeft(t(this,b))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,b),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,f=t(this,V)+t(this,Ct)+i,y=Ve.preciseNumber(Oe.clamp(r,u,f),3);h(this,vt,y*-1),t(this,g).vertical?t(this,b).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,b).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,tt)!==n&&(t(this,tt)&&t(this,b).classList.remove(t(this,tt)),n&&t(this,b).classList.add(n),h(this,tt,n),se.dispatchEvent(t(this,b),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,tt)},custom:!0}))}setMiddle(n){t(this,b).classList.toggle("middle",n)}setIndex(n){c(this,Pt,ie).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,ie).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,ie).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,ie).call(this,"current-index-arc-abs",n)}}b=new WeakMap,Vt=new WeakMap,g=new WeakMap,Ct=new WeakMap,V=new WeakMap,tt=new WeakMap,vt=new WeakMap,Pt=new WeakSet,ie=function(n,e){e!==null?(t(this,b).style.setProperty(`--${n}`,e.toString()),t(this,b).setAttribute(`data-${n}`,e.toString())):(t(this,b).style.removeProperty(`--${n}`),t(this,b).removeAttribute(`data-${n}`))};const ns=Be.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Et,w,et,_,H,$,M,st,it,W,rt,wt,T,v,xt,Lt,zt,It,_t,A,kt,nt,R,ht,F,At,ot,Rt,lt,ct,ut,p,Ht,l,oe,le,C,m,k,q,at,D,E,x,$t,N,U,G,Z,Wt,dt,j,Ft,B,P,Nt,St,o,we,re,Dt,Ce,ve,xe,Le,L,ce,He,Ut,ue,ze,Ie,gt,$e,ne,ae;class Tt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Et,new S.CSSProperty(this,"--controls",!0));s(this,w,new S.CSSProperty(this,"--axis","y"));s(this,et,new S.CSSProperty(this,"--reverse",!1));s(this,_,new S.CSSProperty(this,"--direction",0));s(this,H,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new S.CSSProperty(this,"--split",!1));s(this,M,new S.CSSProperty(this,"--sectional",!1));s(this,st,new S.CSSProperty(this,"--tween-easing",!1));s(this,it,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,rt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new S.CSSProperty(this,"--drag-inertion",1));s(this,T,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,xt,new S.CSSProperty(this,"--damping",20));s(this,Lt,new S.CSSProperty(this,"--mass",0));s(this,zt,new S.CSSProperty(this,"--stiffness",0));s(this,It,new S.CSSProperty(this,"--mouse-drag",!1));s(this,_t,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,A,new S.CSSProperty(this,"--autoplay",0));s(this,kt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,nt,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ht,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,At,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ot,new S.CSSProperty(this,"--focus-delay",0));s(this,Rt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,lt,new S.CSSProperty(this,"--disabled",!1));s(this,ct,new S.CSSProperty(this,"--hibernate",!1));s(this,ut,null);s(this,p,null);s(this,Ht,null);s(this,l,[]);s(this,oe,0);s(this,le,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,at,null);s(this,D,null);s(this,E,null);s(this,x,new Qe.Store(0));s(this,$t,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Wt);s(this,dt);s(this,j,new ts.Tweened);s(this,Ft,!1);s(this,B,null);s(this,P,!1);s(this,Nt,null);s(this,St,[]);s(this,L,()=>{this.resize()});s(this,ce,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,$t,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,ne).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,$e).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,Ut,(e,i)=>{t(this,Et).current&&(c(this,o,ze).call(this,Math.sign(i)||1),t(this,ue).call(this,e,i))});s(this,ue,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,dt)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,ot).current&&(clearInterval(t(this,Wt)),h(this,Wt,setTimeout(()=>{const r=t(this,l)[c(this,o,ne).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Rt).current,easing:Xe.easeInOutExpo}})},t(this,ot).current))),!(e.includes("drag")&&!es.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,st).current||t(this,it).current?{easing:t(this,st).current||"easeInOutCubic",duration:t(this,it).current||500}:void 0};t(this,Ft)?this.scrollToSection(c(this,o,ne).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ft,e==="drag")}});s(this,ae,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Le).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ns];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,ut,document.createElement("div")),t(this,ut).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,Ht,document.createElement("slot")),t(this,p).appendChild(t(this,Ht)),t(this,ut).appendChild(t(this,p)),e.appendChild(t(this,ut)),h(this,Nt,new MutationObserver(De.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Et)}get axisCSSProperty(){return t(this,w)}get reverseCSSProperty(){return t(this,et)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,st)}get durationCSSProperty(){return t(this,it)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,rt)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,Lt)}get stiffnessCSSProperty(){return t(this,zt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,_t)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,kt)}get autoplayUserDirectionCSSProperty(){return t(this,nt)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ht)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,At)}get focusDelayCSSProperty(){return t(this,ot)}get focusDurationCSSProperty(){return t(this,Rt)}get disabledCSSProperty(){return t(this,lt)}get hibernatedCSSProperty(){return t(this,ct)}get currentScrollValue(){return c(this,o,Ie).call(this,"current")}get targetScrollValue(){return c(this,o,Ie).call(this,"target")}get contentWrapperElement(){return t(this,ut)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,oe)}get contentPosition(){return t(this,le)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,$t)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,re).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>f?1:(this.currentProgress-u)/(f-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,f=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,He).call(this,e),f=t(this,l)[r],y=t(this,l)[u];if(f&&y){let I=0;const Pe=c(this,o,ne).call(this),qt=t(this,l)[Pe],me=qt?this.targetScrollValue-qt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?I=t(this,m)+t(this,C)-f.position+t(this,k):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-f.position:I=y.position-f.position,this.shiftPosition(I-me,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,ze).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,dt)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,Te({},i.tween)),h(this,dt,setTimeout(()=>{h(this,dt,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ct).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,oe,this.vertical?Bt.getCumulativeOffsetTop(this):Bt.getCumulativeOffsetLeft(this)),h(this,le,this.vertical?Bt.getCumulativeOffsetTop(t(this,p)):Bt.getCumulativeOffsetLeft(t(this,p))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,k,qe.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(f=>{f.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",h(this,m,t(this,p).offsetHeight-t(this,C))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,m,t(this,p).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),f=t(this,m)-u;h(this,N,r.position+r.size+f)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,lt).current||c(this,o,ve).call(this):c(this,o,Ce).call(this),se.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new Ye.Damped(0,{damping:.01,min:0,order:ye.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new ge.WheelControls({element:t(this,p)})),t(this,q).changeEvent.subscribe(t(this,Ut)),h(this,at,new ge.KeyboardControls({element:this})),t(this,at).changeEvent.subscribe(t(this,Ut)),h(this,D,new ge.DragControls({element:t(this,p),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,Ut)),h(this,E,new ge.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,ue)),t(this,w).subscribe(()=>{c(this,o,we).call(this)}),t(this,et).subscribe(()=>{c(this,o,we).call(this)}),t(this,rt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,w).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,L).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,re).call(this):c(this,o,Dt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,re).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Dt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,L).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,$t,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,Lt).subscribe(e=>{t(this,a).mass=e.current}),t(this,zt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,E).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,nt).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ht).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,At).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,lt).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,Ce).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,ve).call(this))}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,xe).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Le).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,et).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,st).observe(),t(this,it).observe(),t(this,W).observe(),t(this,rt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,It).observe(),t(this,_t).observe(),t(this,A).observe(),t(this,A).observe(),t(this,kt).observe(),t(this,nt).observe(),t(this,R).observe(),t(this,ht).observe(),t(this,F).observe(),t(this,At).observe(),t(this,ot).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,ct).observe(),Ot.windowResizer.subscribe(t(this,ae),ye.RESIZE_ORDER.LAST),t(this,Nt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Et).unobserve(),t(this,w).unobserve(),t(this,et).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,st).unobserve(),t(this,it).unobserve(),t(this,W).unobserve(),t(this,rt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,Lt).unobserve(),t(this,zt).unobserve(),t(this,It).unobserve(),t(this,_t).unobserve(),t(this,A).unobserve(),t(this,kt).unobserve(),t(this,nt).unobserve(),t(this,R).unobserve(),t(this,ht).unobserve(),t(this,F).unobserve(),t(this,At).unobserve(),t(this,ot).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,ct).unobserve(),Ot.windowResizer.unsubscribe(t(this,ae)),c(this,o,xe).call(this),t(this,Nt).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,et=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,st=new WeakMap,it=new WeakMap,W=new WeakMap,rt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,It=new WeakMap,_t=new WeakMap,A=new WeakMap,kt=new WeakMap,nt=new WeakMap,R=new WeakMap,ht=new WeakMap,F=new WeakMap,At=new WeakMap,ot=new WeakMap,Rt=new WeakMap,lt=new WeakMap,ct=new WeakMap,ut=new WeakMap,p=new WeakMap,Ht=new WeakMap,l=new WeakMap,oe=new WeakMap,le=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,at=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,$t=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Wt=new WeakMap,dt=new WeakMap,j=new WeakMap,Ft=new WeakMap,B=new WeakMap,P=new WeakMap,Nt=new WeakMap,St=new WeakMap,o=new WeakSet,we=function(){const e=t(this,w).current,i=t(this,et).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,rt).current?"max":e,t(this,at).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,L).call(this)},re=function(){c(this,o,Dt).call(this),t(this,Ht).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new rs(e,i,this))}),t(this,p).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,gt).call(this)},Dt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),se.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ce=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,ce)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Wt)),clearInterval(t(this,dt)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,at).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},ve=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,ce),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,at).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},xe=function(){t(this,Z)||(h(this,Z,!0),Ot.windowResizer.unsubscribe(t(this,L)),he.elementResizer.unsubscribe(t(this,L)),c(this,o,Ce).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Dt).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Le=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,ve).call(this),Ot.windowResizer.subscribe(t(this,L),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,ce=new WeakMap,He=function(e){let i=t(this,x).current;return t(this,v).current?i=Ve.loopNumber(e,t(this,l).length):i=Oe.clamp(e,0,this.limit),i},Ut=new WeakMap,ue=new WeakMap,ze=function(e=1){t(this,nt).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,kt).current,this.sectionalCSSProperty.current)},Ie=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ht).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),se.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,St,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=f?(r.setMark("current"),t(this,St).push(r)):u>=y&&u<y+I/2||u<=f+i?r.setMark("next"):r.setMark("previous")})}}},$e=function(){if(t(this,R).current){const e=Math.floor(t(this,St).length/2);t(this,St).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,St).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},ne=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const f=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Pe=t(this,Ft)?I.size*f*-1*.4:0,qt=I.position;this.overscroll&&qt===0&&e&&(qt=t(this,N));let me=Math.abs(qt+Pe-i);me<=r&&(r=me,u=y)}return u},ae=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Tt);var de;class ke extends HTMLElement{constructor(){super(...arguments);s(this,de,null)}get scrollElement(){return t(this,de)}connectedCallback(){const e=_e.findParentElement(this,Tt);e instanceof Tt?h(this,de,e):console.error(this,"e-scroll not found")}}de=new WeakMap;var pt,z,K,J,Gt,Zt,bt,jt,Se,pe;class We extends ke{constructor(){super();s(this,pt,null);s(this,z,null);s(this,K,!1);s(this,J,0);s(this,Gt,0);s(this,Zt,0);s(this,bt,()=>{h(this,K,this.offsetWidth>this.offsetHeight);const e=t(this,K)?this.offsetWidth:this.offsetHeight;h(this,J,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,J,Math.max(t(this,J),30)),t(this,K)?(t(this,z).style.width=t(this,J)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,J)+"px"),h(this,Gt,e-t(this,J)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,jt).call(this)});s(this,jt,()=>{h(this,Zt,this.scrollElement.currentProgress*t(this,Gt)),t(this,K)?t(this,z).style.transform=`translate3d(${t(this,Zt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Zt)}px, 0px)`});s(this,Se,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,pe,e=>{document.documentElement.classList.add("grabbing"),ss.setupDrag(u=>{const f=t(this,K)?u.x:u.y,y=this.scrollElement.distance/t(this,Gt),I=(f-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,K)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Be.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,z,e),t(this,z).addEventListener("pointerdown",t(this,pe)),Ot.windowResizer.subscribe(t(this,bt),ye.RESIZE_ORDER.SCROLL),he.elementResizer.subscribe(this,t(this,bt)),he.elementResizer.subscribe(this.scrollElement,t(this,bt)),this.scrollElement.onScroll(t(this,jt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Se))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,pe)),Ot.windowResizer.unsubscribe(t(this,bt)),he.elementResizer.unsubscribe(t(this,bt)),this.scrollElement.offScroll(t(this,jt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Se))}}pt=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,bt=new WeakMap,jt=new WeakMap,Se=new WeakMap,pe=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",We);var Kt,Jt,Qt;class Fe extends ke{constructor(){super();s(this,Kt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Jt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Qt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Kt).current,i=t(this,Jt).current,r=t(this,Qt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Kt).observe(),t(this,Jt).observe(),t(this,Qt).observe()}disconnectedCallback(){t(this,Kt).close(),t(this,Jt).close(),t(this,Qt).close()}}Kt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap;var Xt;class Ne extends Fe{constructor(){super(...arguments);s(this,Xt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Xt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Xt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Xt).close()}}Xt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Ne);var Q,Yt;class Ue extends Fe{constructor(){super(...arguments);s(this,Q,new S.CSSProperty(this,"--step",1));s(this,Yt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,Q).current>0&&this.scrollElement.scrollLine==="end"||t(this,Q).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,Q).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,Q).subscribe(()=>{t(this,Yt).call(this)}),t(this,Q).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Yt)),t(this,Yt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,Q).close(),this.removeAttribute("disabled")}}Q=new WeakMap,Yt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ue);var X,ft,te,be,fe,ee;class hs{constructor(n,e,i){s(this,X,null);s(this,ft,null);s(this,te,null);s(this,be,null);s(this,fe,()=>{t(this,ft).scrollToSection(t(this,te),{behaviour:t(this,be)})});s(this,ee,()=>{t(this,X).classList.toggle("current",t(this,ft).counter.current===t(this,te))});O.isBrowser&&(h(this,X,document.createElement("button")),h(this,ft,n),h(this,be,i),h(this,te,e),t(this,X).addEventListener("click",t(this,fe)),t(this,ft).counter.subscribe(t(this,ee)),t(this,ee).call(this))}get element(){return t(this,X)}destroy(){t(this,X).removeEventListener("click",t(this,fe)),t(this,ft).counter.unsubscribe(t(this,ee)),t(this,X).remove()}}X=new WeakMap,ft=new WeakMap,te=new WeakMap,be=new WeakMap,fe=new WeakMap,ee=new WeakMap;var Mt,mt,Y;class Ge extends ke{constructor(){super(...arguments);s(this,Mt,null);s(this,mt,[]);s(this,Y,De.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new hs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Mt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,Y)),this.scrollElement.loopCSSProperty.subscribe(t(this,Y)),h(this,Mt,document.createElement("div")),this.appendChild(t(this,Mt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,Y)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,Y)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,Y)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Mt).remove()}}Mt=new WeakMap,mt=new WeakMap,Y=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Ge);class Ze extends is.ScrollSegmentElement{connectedCallback(){const n=_e.findParentElement(this,Tt);n instanceof Tt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Tt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ze);exports.ScrollBulletButtonsElement=Ge;exports.ScrollElement=Tt;exports.ScrollSegmentElement=Ze;exports.ScrollSetButtonElement=Ne;exports.ScrollStepButtonElement=Ue;exports.ScrollbarElement=We;
@@ -22,23 +22,23 @@ import { d as Re } from "../function-C10DGppn.js";
22
22
  import { c as Oe } from "../jss-DtnXPEnq.js";
23
23
  import { a as Ce, g as Ee } from "../layout-DpZo-I0y.js";
24
24
  import { c as He } from "../math-BOBiC4TN.js";
25
- import { l as _e } from "../number-DwCxt_Ck.js";
25
+ import { p as _e, l as Ze } from "../number-DwCxt_Ck.js";
26
26
  import "../ticker/index.js";
27
- import { TICK_ORDER as Ze, RESIZE_ORDER as we } from "../order/index.js";
28
- import { D as je } from "../Damped-GyAS-U-z.js";
29
- import { T as Je } from "../Tweened-BSC-evuL.js";
30
- import { WheelControls as Qe, KeyboardControls as Xe, DragControls as Ye, AutoplayControls as ts } from "../controls/index.js";
27
+ import { TICK_ORDER as je, RESIZE_ORDER as we } from "../order/index.js";
28
+ import { D as Je } from "../Damped-GyAS-U-z.js";
29
+ import { T as Qe } from "../Tweened-BSC-evuL.js";
30
+ import { WheelControls as Xe, KeyboardControls as Ye, DragControls as ts, AutoplayControls as es } from "../controls/index.js";
31
31
  import { windowResizer as Rt } from "../window-resizer/index.js";
32
32
  import { scrollEntries as vt } from "../scroll-entries/index.js";
33
33
  import { cssUnitParser as Ve } from "../css-unit-parser/index.js";
34
34
  import { CSSProperty as p } from "../css-property/index.js";
35
- import { device as es } from "../device/index.js";
35
+ import { device as ss } from "../device/index.js";
36
36
  import { elementResizer as ne } from "../element-resizer/index.js";
37
- import { s as ss } from "../gestures-CcXV6fCp.js";
37
+ import { s as is } from "../gestures-CcXV6fCp.js";
38
38
  import { b as $e } from "../dom-CVWzyXPH.js";
39
- import { ScrollSegmentElement as is } from "../scroll-segment/index.js";
39
+ import { ScrollSegmentElement as rs } from "../scroll-segment/index.js";
40
40
  var b, Ht, g, yt, $, tt, Ct, Et, se;
41
- class rs {
41
+ class ns {
42
42
  constructor(n, e, i) {
43
43
  s(this, Et);
44
44
  s(this, b);
@@ -86,7 +86,7 @@ class rs {
86
86
  t(this, g).axisCSSProperty.current,
87
87
  e
88
88
  );
89
- const r = t(this, g).currentScrollValue + e, a = t(this, $) - t(this, g).viewportSize - i, m = t(this, $) + t(this, yt) + i, v = He(r, a, m);
89
+ const r = t(this, g).currentScrollValue + e, a = t(this, $) - t(this, g).viewportSize - i, m = t(this, $) + t(this, yt) + i, v = _e(He(r, a, m), 3);
90
90
  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)`;
91
91
  }
92
92
  setMark(n) {
@@ -117,7 +117,7 @@ class rs {
117
117
  b = new WeakMap(), Ht = new WeakMap(), g = new WeakMap(), yt = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), Ct = new WeakMap(), Et = new WeakSet(), se = function(n, e) {
118
118
  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}`));
119
119
  };
120
- const ns = Oe({
120
+ const hs = Oe({
121
121
  ":host": {
122
122
  position: "relative",
123
123
  width: "100%",
@@ -259,7 +259,7 @@ class Ot extends HTMLElement {
259
259
  s(this, _, !0);
260
260
  s(this, Ft);
261
261
  s(this, dt);
262
- s(this, Z, new Je());
262
+ s(this, Z, new Qe());
263
263
  s(this, Nt, !1);
264
264
  s(this, O, null);
265
265
  s(this, E, !1);
@@ -302,7 +302,7 @@ class Ot extends HTMLElement {
302
302
  easing: Ke
303
303
  }
304
304
  });
305
- }, t(this, ot).current))), !(e.includes("drag") && !es.isTouch && !t(this, It).current)) {
305
+ }, t(this, ot).current))), !(e.includes("drag") && !ss.isTouch && !t(this, It).current)) {
306
306
  if (t(this, T).current && e !== "drag") {
307
307
  const r = Math.sign(i);
308
308
  if (t(this, l).length) {
@@ -325,7 +325,7 @@ class Ot extends HTMLElement {
325
325
  });
326
326
  if (H) {
327
327
  const e = this.attachShadow({ mode: "open" });
328
- e.adoptedStyleSheets = [ns];
328
+ e.adoptedStyleSheets = [hs];
329
329
  const i = document.createElement("div");
330
330
  i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, at, document.createElement("div")), t(this, at).className = "content-wrapper", h(this, f, document.createElement("div")), t(this, f).className = "content", h(this, Bt, document.createElement("slot")), t(this, f).appendChild(t(this, Bt)), t(this, at).appendChild(t(this, f)), e.appendChild(t(this, at)), h(this, qt, new MutationObserver(
331
331
  Re(() => {
@@ -586,18 +586,18 @@ class Ot extends HTMLElement {
586
586
  h(this, G, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, lt).current || c(this, o, ge).call(this) : c(this, o, Se).call(this), ee(this, "scrollResize", { custom: !0 }), t(this, u).notify();
587
587
  }
588
588
  connectedCallback() {
589
- vt.register(this), h(this, u, new je(0, {
589
+ vt.register(this), h(this, u, new Je(0, {
590
590
  damping: 0.01,
591
591
  min: 0,
592
- order: Ze.SCROLL
593
- })), this.setAttribute("tabindex", "0"), h(this, V, new Qe({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Ut)), h(this, ut, new Xe({
592
+ order: je.SCROLL
593
+ })), this.setAttribute("tabindex", "0"), h(this, V, new Xe({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Ut)), h(this, ut, new Ye({
594
594
  element: this
595
595
  })), t(this, ut).changeEvent.subscribe(
596
596
  t(this, Ut)
597
- ), h(this, R, new Ye({
597
+ ), h(this, R, new ts({
598
598
  element: t(this, f),
599
599
  rootElement: this
600
- })), t(this, R).changeEvent.subscribe(t(this, Ut)), h(this, w, new ts({
600
+ })), t(this, R).changeEvent.subscribe(t(this, Ut)), h(this, w, new es({
601
601
  culling: this
602
602
  })), t(this, w).changeEvent.subscribe(t(this, ce)), t(this, x).subscribe(() => {
603
603
  c(this, o, xe).call(this);
@@ -658,7 +658,7 @@ u = new WeakMap(), wt = new WeakMap(), x = new WeakMap(), et = new WeakMap(), B
658
658
  t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, rt).current ? "max" : e, t(this, ut).dimension = e === "x" ? "width" : "height", t(this, R).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, E) && t(this, L).call(this);
659
659
  }, ie = function() {
660
660
  c(this, o, Vt).call(this), t(this, Bt).assignedElements().forEach((e, i) => {
661
- e instanceof HTMLElement && t(this, l).push(new rs(e, i, this));
661
+ e instanceof HTMLElement && t(this, l).push(new ns(e, i, this));
662
662
  }), t(this, f).style.transform = "", this.style.setProperty("--sections", t(this, l).length.toString()), ee(this, "scrollSectionsChange", {
663
663
  custom: !0,
664
664
  composed: !0
@@ -682,7 +682,7 @@ u = new WeakMap(), wt = new WeakMap(), x = new WeakMap(), et = new WeakMap(), B
682
682
  t(this, _) && (h(this, _, !1), vt.register(this), this.tryResplit(), c(this, o, ge).call(this), Rt.subscribe(t(this, L), we.SCROLL), ne.subscribe(this, t(this, L)));
683
683
  }, L = new WeakMap(), le = new WeakMap(), Be = function(e) {
684
684
  let i = t(this, P).current;
685
- return t(this, C).current ? i = _e(e, t(this, l).length) : i = He(e, 0, this.limit), i;
685
+ return t(this, C).current ? i = Ze(e, t(this, l).length) : i = He(e, 0, this.limit), i;
686
686
  }, Ut = new WeakMap(), ce = new WeakMap(), ze = function(e = 1) {
687
687
  t(this, nt).current && (t(this, w).direction = e), t(this, A).current && t(this, w).pauseAndContinue(
688
688
  t(this, kt).current,
@@ -746,7 +746,7 @@ class ke extends HTMLElement {
746
746
  }
747
747
  ue = new WeakMap();
748
748
  var ft, z, j, J, Gt, Kt, bt, _t, de, pe;
749
- class hs extends ke {
749
+ class os extends ke {
750
750
  constructor() {
751
751
  super();
752
752
  s(this, ft, null);
@@ -767,7 +767,7 @@ class hs extends ke {
767
767
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
768
768
  });
769
769
  s(this, pe, (e) => {
770
- document.documentElement.classList.add("grabbing"), ss(
770
+ document.documentElement.classList.add("grabbing"), is(
771
771
  (a) => {
772
772
  const m = t(this, j) ? a.x : a.y, v = this.scrollElement.distance / t(this, Gt), I = (m - r) * v;
773
773
  this.scrollElement.setPosition(i + I);
@@ -826,7 +826,7 @@ class hs extends ke {
826
826
  }
827
827
  }
828
828
  ft = new WeakMap(), z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), Gt = new WeakMap(), Kt = new WeakMap(), bt = new WeakMap(), _t = new WeakMap(), de = new WeakMap(), pe = new WeakMap();
829
- H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", hs);
829
+ H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", os);
830
830
  var Zt, jt, Jt;
831
831
  class Fe extends ke {
832
832
  constructor() {
@@ -855,7 +855,7 @@ class Fe extends ke {
855
855
  }
856
856
  Zt = new WeakMap(), jt = new WeakMap(), Jt = new WeakMap();
857
857
  var Qt;
858
- class os extends Fe {
858
+ class ls extends Fe {
859
859
  constructor() {
860
860
  super(...arguments);
861
861
  s(this, Qt, new p(this, "--set", 1));
@@ -871,9 +871,9 @@ class os extends Fe {
871
871
  }
872
872
  }
873
873
  Qt = new WeakMap();
874
- H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", os);
874
+ H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ls);
875
875
  var Q, Xt;
876
- class ls extends Fe {
876
+ class cs extends Fe {
877
877
  constructor() {
878
878
  super(...arguments);
879
879
  s(this, Q, new p(this, "--step", 1));
@@ -897,9 +897,9 @@ class ls extends Fe {
897
897
  }
898
898
  }
899
899
  Q = new WeakMap(), Xt = new WeakMap();
900
- H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ls);
900
+ H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", cs);
901
901
  var X, mt, Yt, fe, be, te;
902
- class cs {
902
+ class as {
903
903
  constructor(n, e, i) {
904
904
  s(this, X, null);
905
905
  s(this, mt, null);
@@ -927,7 +927,7 @@ class cs {
927
927
  }
928
928
  X = new WeakMap(), mt = new WeakMap(), Yt = new WeakMap(), fe = new WeakMap(), be = new WeakMap(), te = new WeakMap();
929
929
  var Tt, St, Y;
930
- class as extends ke {
930
+ class us extends ke {
931
931
  constructor() {
932
932
  super(...arguments);
933
933
  s(this, Tt, null);
@@ -937,7 +937,7 @@ class as extends ke {
937
937
  let e = 0;
938
938
  this.scrollElement.loopCSSProperty.current ? e = this.scrollElement.sections.length : e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
939
939
  for (let i = 0; i < e; i++) {
940
- const r = new cs(
940
+ const r = new as(
941
941
  this.scrollElement,
942
942
  i,
943
943
  this.getAttribute("behaviour") || "smooth"
@@ -964,8 +964,8 @@ class as extends ke {
964
964
  }
965
965
  }
966
966
  Tt = new WeakMap(), St = new WeakMap(), Y = new WeakMap();
967
- H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", as);
968
- class us extends is {
967
+ H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", us);
968
+ class ds extends rs {
969
969
  connectedCallback() {
970
970
  const n = $e(this, Ot);
971
971
  n instanceof Ot ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
@@ -980,12 +980,12 @@ class us extends is {
980
980
  ), this.scrollContainer.removeEventListener("scrollResize", this.resize));
981
981
  }
982
982
  }
983
- H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", us);
983
+ H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", ds);
984
984
  export {
985
- as as ScrollBulletButtonsElement,
985
+ us as ScrollBulletButtonsElement,
986
986
  Ot as ScrollElement,
987
- us as ScrollSegmentElement,
988
- os as ScrollSetButtonElement,
989
- ls as ScrollStepButtonElement,
990
- hs as ScrollbarElement
987
+ ds as ScrollSegmentElement,
988
+ ls as ScrollSetButtonElement,
989
+ cs as ScrollStepButtonElement,
990
+ os as ScrollbarElement
991
991
  };
@@ -34,6 +34,7 @@ export declare class ScrollSegmentElement extends HTMLElement {
34
34
  get passedVarCSSProperty(): CSSProperty<string>;
35
35
  get progressVarCSSProperty(): CSSProperty<string>;
36
36
  get progressArcVarCSSProperty(): CSSProperty<string>;
37
+ get progressArcMultCSSProperty(): CSSProperty<number>;
37
38
  get animationVarTypeCSSProperty(): CSSProperty<"target" | "current">;
38
39
  get distanceVarCSSProperty(): CSSProperty<string>;
39
40
  get startVarCSSProperty(): CSSProperty<string>;
@@ -53,6 +54,7 @@ export declare class ScrollSegmentElement extends HTMLElement {
53
54
  get directionSize(): number;
54
55
  get passed(): Damped;
55
56
  get progress(): number;
57
+ get progressArc(): number;
56
58
  get start(): number;
57
59
  get finish(): number;
58
60
  get distance(): number;
@@ -1 +1 @@
1
- "use strict";var mt=l=>{throw TypeError(l)};var at=(l,o,r)=>o.has(l)||mt("Cannot "+r);var t=(l,o,r)=>(at(l,o,"read from private field"),r?r.call(l):o.get(l)),i=(l,o,r)=>o.has(l)?mt("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(l):o.set(l,r),e=(l,o,r,s)=>(at(l,o,"write to private field"),s?s.call(l,r):o.set(l,r),r),c=(l,o,r)=>(at(l,o,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ot=require("../dom-JBOkFLTh.cjs"),qt=require("../index-Cqw2NKev.cjs"),bt=require("../element-resizer/index.cjs"),ot=require("../window-resizer/index.cjs"),u=require("../css-property/index.cjs"),Ct=require("../order/index.cjs"),st=require("../events-KVanG9sR.cjs"),xt=require("../function-MthRj-GJ.cjs"),lt=require("../layout-Ctc2p3uz.cjs"),kt=require("../math-GDWEqu7y.cjs"),et=require("../Store-GokLe_g-.cjs"),Dt=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Mt=require("../Damped-DgAIjXp3.cjs");var w,ct,rt,j;class St{constructor(o){i(this,w,null);i(this,ct);i(this,rt,!1);i(this,j,()=>{e(this,rt,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ct,o),e(this,w,Ot.findScrollParentElement(t(this,ct))),bt.elementResizer.subscribe(t(this,w),t(this,j)),ot.windowResizer.subscribe(t(this,j)),t(this,j).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,rt)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,rt)}destroy(){bt.elementResizer.unsubscribe(t(this,j)),ot.windowResizer.unsubscribe(t(this,j))}onScroll(o){t(this,w).addEventListener("scroll",o)}offScroll(o){t(this,w).removeEventListener("scroll",o)}}w=new WeakMap,ct=new WeakMap,rt=new WeakMap,j=new WeakMap;var S,B,G,K,Z,_,A,I,$,m,g,v,y,H,p,O,q,L,X,x,k,D,f,P,V,R,z,F,it,n,W,J,ht,d,M,C,b,E,Y,N,a,Q,h,yt,ft,Pt,Vt,wt,Ft,Et,Lt,nt,tt,pt,U,Rt,zt,dt,gt;let vt=(gt=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,B);i(this,G);i(this,K);i(this,Z);i(this,_);i(this,A);i(this,I);i(this,$);i(this,m);i(this,g);i(this,v);i(this,y);i(this,H);i(this,p);i(this,O);i(this,q);i(this,L);i(this,X);i(this,x);i(this,k);i(this,D);i(this,f);i(this,P);i(this,V);i(this,R);i(this,z);i(this,F);i(this,it);i(this,n);i(this,W);i(this,J);i(this,ht);i(this,d);i(this,M);i(this,C);i(this,b);i(this,E);i(this,Y);i(this,N);i(this,a);i(this,Q);i(this,nt);i(this,tt);e(this,S,null),e(this,B,new u.CSSProperty(this,"--damping",20)),e(this,G,new u.CSSProperty(this,"--mass",0)),e(this,K,new u.CSSProperty(this,"--stiffness",0)),e(this,Z,new u.CSSProperty(this,"--target","")),e(this,_,new u.CSSProperty(this,"--disabled",!1)),e(this,A,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,I,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,$,new u.CSSProperty(this,"--capture-once",!1)),e(this,m,new u.CSSProperty(this,"--captured","")),e(this,g,new u.CSSProperty(this,"--released","")),e(this,v,new u.CSSProperty(this,"--captured-from-start","")),e(this,y,new u.CSSProperty(this,"--captured-from-finish","")),e(this,H,new u.CSSProperty(this,"--released-from-start","")),e(this,p,new u.CSSProperty(this,"--released-from-finish","")),e(this,O,new u.CSSProperty(this,"--passed-var","")),e(this,q,new u.CSSProperty(this,"--progress-var","")),e(this,L,new u.CSSProperty(this,"--progress-arc-var","")),e(this,X,new u.CSSProperty(this,"--animation-var-type","target")),e(this,x,new u.CSSProperty(this,"--distance-var","")),e(this,k,new u.CSSProperty(this,"--start-var","")),e(this,D,new u.CSSProperty(this,"--finish-var","")),e(this,f,new et.Store(!1)),e(this,P,new et.Store(!1)),e(this,V,new et.Store(!1)),e(this,R,new et.Store(!1)),e(this,z,new et.Store(!1)),e(this,F,new et.Store(!1)),e(this,it,[]),e(this,n,this),e(this,W,0),e(this,J,0),e(this,ht,0),e(this,d,new Mt.Damped(0,{order:Ct.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,M,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,Y,!1),e(this,N,!1),e(this,a,!0),e(this,Q,!1),this.resize=()=>{e(this,J,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?lt.getCumulativeOffsetTop(this,r):lt.getCumulativeOffsetLeft(this,r));const s=lt.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,I).current),e(this,b,t(this,b)+t(this,A).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,f).current&&!t(this,P).current&&(t(this,f).current=!0),this.setVar(t(this,k).current,t(this,C)),this.setVar(t(this,D).current,t(this,E)),this.setVar(t(this,x).current,t(this,b)),t(this,d).max=t(this,b),e(this,Y,!0),t(this,tt).call(this)},this.findAnotherScrollEntries=xt.debounce(()=>{const r=Dt.scrollEntries.getAll(this).reverse();let s=0;r.forEach((T,ut)=>{T.element===t(this,S)&&(s=ut)}),e(this,it,r.slice(s+1)),this.tick()},0),e(this,nt,()=>{t(this,a)||this.resize()}),e(this,tt,()=>{!t(this,a)&&t(this,Y)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){c(this,h,ft).call(this),e(this,S,r),c(this,h,yt).call(this)}get distanceOffsetCSSProperty(){return t(this,A)}get startOffsetCSSProperty(){return t(this,I)}get captureOnceCSSProperty(){return t(this,$)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,v)}get capturedFromFinishCSSProperty(){return t(this,y)}get releasedFromStartCSSProperty(){return t(this,H)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,O)}get progressVarCSSProperty(){return t(this,q)}get progressArcVarCSSProperty(){return t(this,L)}get animationVarTypeCSSProperty(){return t(this,X)}get distanceVarCSSProperty(){return t(this,x)}get startVarCSSProperty(){return t(this,k)}get finishVarCSSProperty(){return t(this,D)}get disabledCSSProperty(){return t(this,_)}get dampingCSSProperty(){return t(this,B)}get massCSSProperty(){return t(this,G)}get stiffnessCSSProperty(){return t(this,K)}get targetCSSProperty(){return t(this,Z)}get isCaptured(){return t(this,f)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,R)}get isCapturedFromFinish(){return t(this,z)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,J)}get passed(){return t(this,d)}get progress(){return t(this,M)}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}tick(){let r=t(this,S).currentScrollValue;t(this,it).forEach(ut=>{r+=ut.value});const s=r-t(this,C);t(this,Q)||e(this,Q,t(this,d).previous?Math.abs(t(this,d).previous-s)>1e3:!1),t(this,d).set(s);const T=Math.round(r);t(this,f).current&&(T>=t(this,C)?t(this,V).current||c(this,h,wt).call(this):t(this,V).current&&!t(this,R).current&&c(this,h,Et).call(this),T<t(this,E)?t(this,F).current&&!t(this,z).current&&c(this,h,Ft).call(this):t(this,V).current&&!t(this,F).current&&c(this,h,Lt).call(this)),T>=t(this,C)&&T<t(this,E)?t(this,f).current||c(this,h,Pt).call(this):t(this,f).current&&(t(this,d).set(kt.step(t(this,b)/2,t(this,d).target,0,t(this,b))),c(this,h,Vt).call(this)),t(this,N)&&t(this,$).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,J,0),t(this,d).reset(),e(this,M,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,Y,!1),t(this,f).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,R).current=!1,t(this,z).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),c(this,h,dt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new St(this)}disconnectedCallback(){t(this,S)instanceof St&&t(this,S).destroy(),c(this,h,ft).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,J)+t(this,ht)}getStart(){return t(this,W)-t(this,ht)}},S=new WeakMap,B=new WeakMap,G=new WeakMap,K=new WeakMap,Z=new WeakMap,_=new WeakMap,A=new WeakMap,I=new WeakMap,$=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,H=new WeakMap,p=new WeakMap,O=new WeakMap,q=new WeakMap,L=new WeakMap,X=new WeakMap,x=new WeakMap,k=new WeakMap,D=new WeakMap,f=new WeakMap,P=new WeakMap,V=new WeakMap,R=new WeakMap,z=new WeakMap,F=new WeakMap,it=new WeakMap,n=new WeakMap,W=new WeakMap,J=new WeakMap,ht=new WeakMap,d=new WeakMap,M=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,Y=new WeakMap,N=new WeakMap,a=new WeakMap,Q=new WeakMap,h=new WeakSet,yt=function(){if(!t(this,S))return;t(this,f).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,z).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&st.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,B).observe(),t(this,G).observe(),t(this,K).observe(),t(this,Z).observe(),t(this,_).observe(),t(this,A).observe(),t(this,I).observe(),t(this,$).observe(),t(this,m).observe(),t(this,g).observe(),t(this,v).observe(),t(this,y).observe(),t(this,H).observe(),t(this,p).observe(),t(this,O).observe(),t(this,q).observe(),t(this,L).observe(),t(this,X).observe(),t(this,x).observe(),t(this,k).observe(),t(this,D).observe();let r=!1;this.findAnotherScrollEntries(),t(this,_).current||this.enable(),t(this,B).subscribe(s=>{t(this,d).damping=s.current}),t(this,G).subscribe(s=>{t(this,d).mass=s.current}),t(this,K).subscribe(s=>{t(this,d).stiffness=s.current}),t(this,Z).subscribe(s=>{s.previous&&c(this,h,dt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,_).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,I).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,A).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,v).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,y).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,g).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,H).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,p).subscribe(s=>{c(this,h,U).call(this,s)}),t(this,$).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,O).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,M)))}),t(this,L).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,c(this,h,pt).call(this)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,D).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,d).subscribe(s=>{if(t(this,Q)){e(this,Q,!1);return}const T=t(this,d)[t(this,X).current];e(this,M,T/t(this,b)||0),this.setVar(t(this,O).current,T.toFixed(6)),this.setVar(t(this,q).current,t(this,M).toFixed(6)),t(this,L).current&&this.setVar(t(this,L).current,c(this,h,pt).call(this).toFixed(6))}),ot.windowResizer.subscribe(t(this,nt),Ct.RESIZE_ORDER.SCROLL+1),this.scrollContainer.onScroll(t(this,tt)),r=!0},ft=function(){t(this,S)&&(ot.windowResizer.unsubscribe(t(this,nt)),this.scrollContainer.offScroll(t(this,tt)),t(this,B).close(),t(this,G).close(),t(this,K).close(),t(this,Z).close(),t(this,_).close(),t(this,A).close(),t(this,I).close(),t(this,$).close(),t(this,m).close(),t(this,g).close(),t(this,v).close(),t(this,y).close(),t(this,H).close(),t(this,p).close(),t(this,O).close(),t(this,q).close(),t(this,L).close(),t(this,x).close(),t(this,k).close(),t(this,D).close(),t(this,f).close(),t(this,P).close(),t(this,V).close(),t(this,R).close(),t(this,z).close(),t(this,F).close(),this.disable())},Pt=function(){t(this,f).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},Vt=function(){t(this,P).current=!0,t(this,f).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},wt=function(){t(this,f).current=!0,t(this,V).current=!0,t(this,R).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},Ft=function(){t(this,f).current=!0,t(this,z).current=!0,t(this,F).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Et=function(){t(this,P).current=!0,t(this,R).current=!0,t(this,V).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},Lt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,z).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},nt=new WeakMap,tt=new WeakMap,pt=function(){return Math.abs(Math.cos(t(this,M)*Math.PI))},U=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,f).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},Rt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},zt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},dt=function(){c(this,h,Rt).call(this,t(this,m).current,t(this,v).current,t(this,y).current,t(this,g).current,t(this,H).current,t(this,p).current),c(this,h,zt).call(this,t(this,O).current,t(this,q).current,t(this,L).current,t(this,x).current,t(this,k).current,t(this,D).current)},gt);qt.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",vt);exports.ScrollSegmentDefaultContainer=St;exports.ScrollSegmentElement=vt;
1
+ "use strict";var bt=l=>{throw TypeError(l)};var lt=(l,u,r)=>u.has(l)||bt("Cannot "+r);var t=(l,u,r)=>(lt(l,u,"read from private field"),r?r.call(l):u.get(l)),i=(l,u,r)=>u.has(l)?bt("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,r),e=(l,u,r,s)=>(lt(l,u,"write to private field"),s?s.call(l,r):u.set(l,r),r),o=(l,u,r)=>(lt(l,u,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("../dom-JBOkFLTh.cjs"),kt=require("../index-Cqw2NKev.cjs"),Ct=require("../element-resizer/index.cjs"),ut=require("../window-resizer/index.cjs"),c=require("../css-property/index.cjs"),gt=require("../order/index.cjs"),et=require("../events-KVanG9sR.cjs"),xt=require("../function-MthRj-GJ.cjs"),St=require("../layout-Ctc2p3uz.cjs"),Mt=require("../math-GDWEqu7y.cjs"),rt=require("../Store-GokLe_g-.cjs"),At=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Dt=require("../Damped-DgAIjXp3.cjs");var w,ct,it,B;class pt{constructor(u){i(this,w,null);i(this,ct);i(this,it,!1);i(this,B,()=>{e(this,it,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ct,u),e(this,w,qt.findScrollParentElement(t(this,ct))),Ct.elementResizer.subscribe(t(this,w),t(this,B)),ut.windowResizer.subscribe(t(this,B)),t(this,B).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,it)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,it)}destroy(){Ct.elementResizer.unsubscribe(t(this,B)),ut.windowResizer.unsubscribe(t(this,B))}onScroll(u){t(this,w).addEventListener("scroll",u)}offScroll(u){t(this,w).removeEventListener("scroll",u)}}w=new WeakMap,ct=new WeakMap,it=new WeakMap,B=new WeakMap;var S,G,K,Z,J,D,T,_,I,m,g,y,v,$,d,O,q,L,H,Y,k,x,M,p,P,V,R,z,F,ht,n,W,Q,nt,f,A,C,b,E,tt,N,a,U,h,Pt,ft,Vt,wt,Ft,Et,Lt,Rt,ot,st,dt,X,zt,Ot,mt,yt;let vt=(yt=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,G);i(this,K);i(this,Z);i(this,J);i(this,D);i(this,T);i(this,_);i(this,I);i(this,m);i(this,g);i(this,y);i(this,v);i(this,$);i(this,d);i(this,O);i(this,q);i(this,L);i(this,H);i(this,Y);i(this,k);i(this,x);i(this,M);i(this,p);i(this,P);i(this,V);i(this,R);i(this,z);i(this,F);i(this,ht);i(this,n);i(this,W);i(this,Q);i(this,nt);i(this,f);i(this,A);i(this,C);i(this,b);i(this,E);i(this,tt);i(this,N);i(this,a);i(this,U);i(this,ot);i(this,st);e(this,S,null),e(this,G,new c.CSSProperty(this,"--damping",20)),e(this,K,new c.CSSProperty(this,"--mass",0)),e(this,Z,new c.CSSProperty(this,"--stiffness",0)),e(this,J,new c.CSSProperty(this,"--target","")),e(this,D,new c.CSSProperty(this,"--disabled",!1)),e(this,T,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,_,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,I,new c.CSSProperty(this,"--capture-once",!1)),e(this,m,new c.CSSProperty(this,"--captured","")),e(this,g,new c.CSSProperty(this,"--released","")),e(this,y,new c.CSSProperty(this,"--captured-from-start","")),e(this,v,new c.CSSProperty(this,"--captured-from-finish","")),e(this,$,new c.CSSProperty(this,"--released-from-start","")),e(this,d,new c.CSSProperty(this,"--released-from-finish","")),e(this,O,new c.CSSProperty(this,"--passed-var","")),e(this,q,new c.CSSProperty(this,"--progress-var","")),e(this,L,new c.CSSProperty(this,"--progress-arc-var","")),e(this,H,new c.CSSProperty(this,"--progress-arc-mult",1)),e(this,Y,new c.CSSProperty(this,"--animation-var-type","target")),e(this,k,new c.CSSProperty(this,"--distance-var","")),e(this,x,new c.CSSProperty(this,"--start-var","")),e(this,M,new c.CSSProperty(this,"--finish-var","")),e(this,p,new rt.Store(!1)),e(this,P,new rt.Store(!1)),e(this,V,new rt.Store(!1)),e(this,R,new rt.Store(!1)),e(this,z,new rt.Store(!1)),e(this,F,new rt.Store(!1)),e(this,ht,[]),e(this,n,this),e(this,W,0),e(this,Q,0),e(this,nt,0),e(this,f,new Dt.Damped(0,{order:gt.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,A,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),e(this,N,!1),e(this,a,!0),e(this,U,!1),this.resize=()=>{e(this,Q,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?St.getCumulativeOffsetTop(this,r):St.getCumulativeOffsetLeft(this,r));const s=St.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,_).current),e(this,b,t(this,b)+t(this,T).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,p).current&&!t(this,P).current&&(t(this,p).current=!0),this.setVar(t(this,x).current,t(this,C)),this.setVar(t(this,M).current,t(this,E)),this.setVar(t(this,k).current,t(this,b)),t(this,f).max=t(this,b),e(this,tt,!0),t(this,st).call(this)},this.findAnotherScrollEntries=xt.debounce(()=>{const r=At.scrollEntries.getAll(this).reverse();let s=0;r.forEach((j,at)=>{j.element===t(this,S)&&(s=at)}),e(this,ht,r.slice(s+1)),this.tick()},0),e(this,ot,()=>{t(this,a)||this.resize()}),e(this,st,()=>{!t(this,a)&&t(this,tt)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){o(this,h,ft).call(this),e(this,S,r),o(this,h,Pt).call(this)}get distanceOffsetCSSProperty(){return t(this,T)}get startOffsetCSSProperty(){return t(this,_)}get captureOnceCSSProperty(){return t(this,I)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,y)}get capturedFromFinishCSSProperty(){return t(this,v)}get releasedFromStartCSSProperty(){return t(this,$)}get releasedFromFinishCSSProperty(){return t(this,d)}get passedVarCSSProperty(){return t(this,O)}get progressVarCSSProperty(){return t(this,q)}get progressArcVarCSSProperty(){return t(this,L)}get progressArcMultCSSProperty(){return t(this,H)}get animationVarTypeCSSProperty(){return t(this,Y)}get distanceVarCSSProperty(){return t(this,k)}get startVarCSSProperty(){return t(this,x)}get finishVarCSSProperty(){return t(this,M)}get disabledCSSProperty(){return t(this,D)}get dampingCSSProperty(){return t(this,G)}get massCSSProperty(){return t(this,K)}get stiffnessCSSProperty(){return t(this,Z)}get targetCSSProperty(){return t(this,J)}get isCaptured(){return t(this,p)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,R)}get isCapturedFromFinish(){return t(this,z)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,Q)}get passed(){return t(this,f)}get progress(){return t(this,A)}get progressArc(){return Math.abs(Math.cos(t(this,A)*Math.PI))*t(this,H).current}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}tick(){let r=t(this,S).currentScrollValue;t(this,ht).forEach(at=>{r+=at.value});const s=r-t(this,C);t(this,U)||e(this,U,t(this,f).previous?Math.abs(t(this,f).previous-s)>1e3:!1),t(this,f).set(s);const j=Math.round(r);t(this,p).current&&(j>=t(this,C)?t(this,V).current||o(this,h,Ft).call(this):t(this,V).current&&!t(this,R).current&&o(this,h,Lt).call(this),j<t(this,E)?t(this,F).current&&!t(this,z).current&&o(this,h,Et).call(this):t(this,V).current&&!t(this,F).current&&o(this,h,Rt).call(this)),j>=t(this,C)&&j<t(this,E)?t(this,p).current||o(this,h,Vt).call(this):t(this,p).current&&(t(this,f).set(Mt.step(t(this,b)/2,t(this,f).target,0,t(this,b))),o(this,h,wt).call(this)),t(this,N)&&t(this,I).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,Q,0),t(this,f).reset(),e(this,A,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),t(this,p).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,R).current=!1,t(this,z).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),o(this,h,mt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new pt(this)}disconnectedCallback(){t(this,S)instanceof pt&&t(this,S).destroy(),o(this,h,ft).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){if(r){const j=typeof s=="number"?s.toFixed(6):s;t(this,n).style.setProperty(`--${r}`,j)}}getDistance(){return t(this,Q)+t(this,nt)}getStart(){return t(this,W)-t(this,nt)}},S=new WeakMap,G=new WeakMap,K=new WeakMap,Z=new WeakMap,J=new WeakMap,D=new WeakMap,T=new WeakMap,_=new WeakMap,I=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,$=new WeakMap,d=new WeakMap,O=new WeakMap,q=new WeakMap,L=new WeakMap,H=new WeakMap,Y=new WeakMap,k=new WeakMap,x=new WeakMap,M=new WeakMap,p=new WeakMap,P=new WeakMap,V=new WeakMap,R=new WeakMap,z=new WeakMap,F=new WeakMap,ht=new WeakMap,n=new WeakMap,W=new WeakMap,Q=new WeakMap,nt=new WeakMap,f=new WeakMap,A=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,tt=new WeakMap,N=new WeakMap,a=new WeakMap,U=new WeakMap,h=new WeakSet,Pt=function(){if(!t(this,S))return;t(this,p).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,z).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,G).observe(),t(this,K).observe(),t(this,Z).observe(),t(this,J).observe(),t(this,D).observe(),t(this,T).observe(),t(this,_).observe(),t(this,I).observe(),t(this,m).observe(),t(this,g).observe(),t(this,y).observe(),t(this,v).observe(),t(this,$).observe(),t(this,d).observe(),t(this,O).observe(),t(this,q).observe(),t(this,L).observe(),t(this,H).observe(),t(this,Y).observe(),t(this,k).observe(),t(this,x).observe(),t(this,M).observe();let r=!1;this.findAnotherScrollEntries(),t(this,D).current||this.enable(),t(this,G).subscribe(s=>{t(this,f).damping=s.current}),t(this,K).subscribe(s=>{t(this,f).mass=s.current}),t(this,Z).subscribe(s=>{t(this,f).stiffness=s.current}),t(this,J).subscribe(s=>{s.previous&&o(this,h,mt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,D).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,_).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,T).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,y).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,v).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,g).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,$).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,d).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,I).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,O).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,L).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,H).subscribe(s=>{t(this,a)||o(this,h,dt).call(this)}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,M).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,f).subscribe(s=>{if(t(this,U)){e(this,U,!1);return}o(this,h,dt).call(this)}),ut.windowResizer.subscribe(t(this,ot),gt.RESIZE_ORDER.SCROLL+1),this.scrollContainer.onScroll(t(this,st)),r=!0},ft=function(){t(this,S)&&(ut.windowResizer.unsubscribe(t(this,ot)),this.scrollContainer.offScroll(t(this,st)),t(this,G).close(),t(this,K).close(),t(this,Z).close(),t(this,J).close(),t(this,D).close(),t(this,T).close(),t(this,_).close(),t(this,I).close(),t(this,m).close(),t(this,g).close(),t(this,y).close(),t(this,v).close(),t(this,$).close(),t(this,d).close(),t(this,O).close(),t(this,q).close(),t(this,L).close(),t(this,H).close(),t(this,k).close(),t(this,x).close(),t(this,M).close(),t(this,p).close(),t(this,P).close(),t(this,V).close(),t(this,R).close(),t(this,z).close(),t(this,F).close(),this.disable(),t(this,f).close())},Vt=function(){t(this,p).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},wt=function(){t(this,P).current=!0,t(this,p).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Ft=function(){t(this,p).current=!0,t(this,V).current=!0,t(this,R).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Et=function(){t(this,p).current=!0,t(this,z).current=!0,t(this,F).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},Lt=function(){t(this,P).current=!0,t(this,R).current=!0,t(this,V).current=!1,t(this,d).current&&t(this,n).classList.add(t(this,d).current)},Rt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,z).current=!1,t(this,d).current&&t(this,n).classList.add(t(this,d).current)},ot=new WeakMap,st=new WeakMap,dt=function(){const r=t(this,f)[t(this,Y).current];this.setVar(t(this,O).current,r),e(this,A,r/t(this,b)||0),this.setVar(t(this,q).current,t(this,A)),t(this,L).current&&this.setVar(t(this,L).current,this.progressArc)},X=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,p).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},zt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},Ot=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},mt=function(){o(this,h,zt).call(this,t(this,m).current,t(this,y).current,t(this,v).current,t(this,g).current,t(this,$).current,t(this,d).current),o(this,h,Ot).call(this,t(this,O).current,t(this,q).current,t(this,L).current,t(this,k).current,t(this,x).current,t(this,M).current)},yt);kt.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",vt);exports.ScrollSegmentDefaultContainer=pt;exports.ScrollSegmentElement=vt;
@@ -1,172 +1,177 @@
1
- var mt = (l) => {
1
+ var St = (l) => {
2
2
  throw TypeError(l);
3
3
  };
4
- var at = (l, o, r) => o.has(l) || mt("Cannot " + r);
5
- var t = (l, o, r) => (at(l, o, "read from private field"), r ? r.call(l) : o.get(l)), i = (l, o, r) => o.has(l) ? mt("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(l) : o.set(l, r), e = (l, o, r, s) => (at(l, o, "write to private field"), s ? s.call(l, r) : o.set(l, r), r), c = (l, o, r) => (at(l, o, "access private method"), r);
6
- import { f as Et } from "../dom-CVWzyXPH.js";
7
- import { i as Rt } from "../index-euf5anj6.js";
8
- import { elementResizer as St } from "../element-resizer/index.js";
9
- import { windowResizer as ot } from "../window-resizer/index.js";
10
- import { CSSProperty as u } from "../css-property/index.js";
11
- import { TICK_ORDER as Ot, RESIZE_ORDER as zt } from "../order/index.js";
12
- import { d as st } from "../events-CsVF98U6.js";
13
- import { d as kt } from "../function-C10DGppn.js";
14
- import { a as Dt, g as xt, c as Mt } from "../layout-DpZo-I0y.js";
15
- import { s as Tt } from "../math-BOBiC4TN.js";
16
- import { S as et } from "../Store-swP_0ymB.js";
17
- import { scrollEntries as At } from "../scroll-entries/index.js";
4
+ var lt = (l, u, r) => u.has(l) || St("Cannot " + r);
5
+ var t = (l, u, r) => (lt(l, u, "read from private field"), r ? r.call(l) : u.get(l)), i = (l, u, r) => u.has(l) ? St("Cannot add the same private member more than once") : u instanceof WeakSet ? u.add(l) : u.set(l, r), e = (l, u, r, s) => (lt(l, u, "write to private field"), s ? s.call(l, r) : u.set(l, r), r), c = (l, u, r) => (lt(l, u, "access private method"), r);
6
+ import { f as Rt } from "../dom-CVWzyXPH.js";
7
+ import { i as Ot } from "../index-euf5anj6.js";
8
+ import { elementResizer as dt } from "../element-resizer/index.js";
9
+ import { windowResizer as ut } from "../window-resizer/index.js";
10
+ import { CSSProperty as o } from "../css-property/index.js";
11
+ import { TICK_ORDER as zt, RESIZE_ORDER as kt } from "../order/index.js";
12
+ import { d as et } from "../events-CsVF98U6.js";
13
+ import { d as At } from "../function-C10DGppn.js";
14
+ import { a as Mt, g as Dt, c as Tt } from "../layout-DpZo-I0y.js";
15
+ import { s as xt } from "../math-BOBiC4TN.js";
16
+ import { S as rt } from "../Store-swP_0ymB.js";
17
+ import { scrollEntries as It } from "../scroll-entries/index.js";
18
18
  import "../ticker/index.js";
19
- import { D as It } from "../Damped-GyAS-U-z.js";
20
- var F, ct, rt, B;
21
- class dt {
22
- constructor(o) {
19
+ import { D as $t } from "../Damped-GyAS-U-z.js";
20
+ var F, ot, it, G;
21
+ class bt {
22
+ constructor(u) {
23
23
  i(this, F, null);
24
- i(this, ct);
25
- i(this, rt, !1);
26
- i(this, B, () => {
27
- e(this, rt, !(t(this, F).scrollWidth > t(this, F).clientWidth));
24
+ i(this, ot);
25
+ i(this, it, !1);
26
+ i(this, G, () => {
27
+ e(this, it, !(t(this, F).scrollWidth > t(this, F).clientWidth));
28
28
  });
29
- e(this, ct, o), e(this, F, Et(t(this, ct))), St.subscribe(t(this, F), t(this, B)), ot.subscribe(t(this, B)), t(this, B).call(this);
29
+ e(this, ot, u), e(this, F, Rt(t(this, ot))), dt.subscribe(t(this, F), t(this, G)), ut.subscribe(t(this, G)), t(this, G).call(this);
30
30
  }
31
31
  get element() {
32
32
  return t(this, F);
33
33
  }
34
34
  get currentScrollValue() {
35
- return t(this, rt) ? t(this, F).scrollTop : t(this, F).scrollLeft;
35
+ return t(this, it) ? t(this, F).scrollTop : t(this, F).scrollLeft;
36
36
  }
37
37
  get vertical() {
38
- return t(this, rt);
38
+ return t(this, it);
39
39
  }
40
40
  destroy() {
41
- St.unsubscribe(t(this, B)), ot.unsubscribe(t(this, B));
41
+ dt.unsubscribe(t(this, G)), ut.unsubscribe(t(this, G));
42
42
  }
43
- onScroll(o) {
44
- t(this, F).addEventListener("scroll", o);
43
+ onScroll(u) {
44
+ t(this, F).addEventListener("scroll", u);
45
45
  }
46
- offScroll(o) {
47
- t(this, F).removeEventListener("scroll", o);
46
+ offScroll(u) {
47
+ t(this, F).removeEventListener("scroll", u);
48
48
  }
49
49
  }
50
- F = new WeakMap(), ct = new WeakMap(), rt = new WeakMap(), B = new WeakMap();
51
- var f, G, K, Z, j, I, $, H, W, d, v, C, y, N, m, z, k, E, X, D, x, M, p, P, V, R, O, L, it, n, _, J, ht, S, T, g, b, w, Y, q, a, Q, h, gt, lt, vt, Ct, yt, Pt, Vt, Ft, nt, tt, ft, U, Lt, wt, pt, bt;
52
- let $t = (bt = class extends HTMLElement {
50
+ F = new WeakMap(), ot = new WeakMap(), it = new WeakMap(), G = new WeakMap();
51
+ var f, K, Z, j, J, x, I, $, H, d, v, C, y, W, S, z, k, E, N, Y, A, M, D, p, P, V, R, O, L, ht, n, _, Q, nt, m, T, g, b, w, tt, q, a, U, h, vt, ft, Ct, yt, Pt, Vt, Ft, Lt, ct, st, pt, X, wt, Et, mt, gt;
52
+ let Ht = (gt = class extends HTMLElement {
53
53
  constructor() {
54
54
  super(...arguments);
55
55
  i(this, h);
56
56
  i(this, f);
57
- i(this, G);
58
57
  i(this, K);
59
58
  i(this, Z);
60
59
  i(this, j);
60
+ i(this, J);
61
+ i(this, x);
61
62
  i(this, I);
62
63
  i(this, $);
63
64
  i(this, H);
64
- i(this, W);
65
65
  i(this, d);
66
66
  i(this, v);
67
67
  i(this, C);
68
68
  i(this, y);
69
- i(this, N);
70
- i(this, m);
69
+ i(this, W);
70
+ i(this, S);
71
71
  i(this, z);
72
72
  i(this, k);
73
73
  i(this, E);
74
- i(this, X);
75
- i(this, D);
76
- i(this, x);
74
+ i(this, N);
75
+ i(this, Y);
76
+ i(this, A);
77
77
  i(this, M);
78
+ i(this, D);
78
79
  i(this, p);
79
80
  i(this, P);
80
81
  i(this, V);
81
82
  i(this, R);
82
83
  i(this, O);
83
84
  i(this, L);
84
- i(this, it);
85
+ i(this, ht);
85
86
  i(this, n);
86
87
  i(this, _);
87
- i(this, J);
88
- i(this, ht);
89
- i(this, S);
88
+ i(this, Q);
89
+ i(this, nt);
90
+ i(this, m);
90
91
  i(this, T);
91
92
  i(this, g);
92
93
  i(this, b);
93
94
  i(this, w);
94
- i(this, Y);
95
+ i(this, tt);
95
96
  i(this, q);
96
97
  i(this, a);
97
- i(this, Q);
98
- i(this, nt);
99
- i(this, tt);
100
- e(this, f, null), e(this, G, new u(this, "--damping", 20)), e(this, K, new u(this, "--mass", 0)), e(this, Z, new u(this, "--stiffness", 0)), e(this, j, new u(this, "--target", "")), e(this, I, new u(this, "--disabled", !1)), e(this, $, new u(
98
+ i(this, U);
99
+ i(this, ct);
100
+ i(this, st);
101
+ e(this, f, null), e(this, K, new o(this, "--damping", 20)), e(this, Z, new o(this, "--mass", 0)), e(this, j, new o(this, "--stiffness", 0)), e(this, J, new o(this, "--target", "")), e(this, x, new o(this, "--disabled", !1)), e(this, I, new o(
101
102
  this,
102
103
  "--distance-offset",
103
104
  0,
104
105
  { rawValueCheck: !1 }
105
- )), e(this, H, new u(this, "--start-offset", 0, {
106
+ )), e(this, $, new o(this, "--start-offset", 0, {
106
107
  rawValueCheck: !1
107
- })), e(this, W, new u(
108
+ })), e(this, H, new o(
108
109
  this,
109
110
  "--capture-once",
110
111
  !1
111
- )), e(this, d, new u(this, "--captured", "")), e(this, v, new u(this, "--released", "")), e(this, C, new u(
112
+ )), e(this, d, new o(this, "--captured", "")), e(this, v, new o(this, "--released", "")), e(this, C, new o(
112
113
  this,
113
114
  "--captured-from-start",
114
115
  ""
115
- )), e(this, y, new u(
116
+ )), e(this, y, new o(
116
117
  this,
117
118
  "--captured-from-finish",
118
119
  ""
119
- )), e(this, N, new u(
120
+ )), e(this, W, new o(
120
121
  this,
121
122
  "--released-from-start",
122
123
  ""
123
- )), e(this, m, new u(
124
+ )), e(this, S, new o(
124
125
  this,
125
126
  "--released-from-finish",
126
127
  ""
127
- )), e(this, z, new u(this, "--passed-var", "")), e(this, k, new u(this, "--progress-var", "")), e(this, E, new u(
128
+ )), e(this, z, new o(this, "--passed-var", "")), e(this, k, new o(this, "--progress-var", "")), e(this, E, new o(
128
129
  this,
129
130
  "--progress-arc-var",
130
131
  ""
131
- )), e(this, X, new u(
132
+ )), e(this, N, new o(
133
+ this,
134
+ "--progress-arc-mult",
135
+ 1
136
+ )), e(this, Y, new o(
132
137
  this,
133
138
  "--animation-var-type",
134
139
  "target"
135
- )), e(this, D, new u(this, "--distance-var", "")), e(this, x, new u(this, "--start-var", "")), e(this, M, new u(this, "--finish-var", "")), e(this, p, new et(!1)), e(this, P, new et(!1)), e(this, V, new et(!1)), e(this, R, new et(!1)), e(this, O, new et(!1)), e(this, L, new et(!1)), e(this, it, []), e(this, n, this), e(this, _, 0), e(this, J, 0), e(this, ht, 0), e(this, S, new It(0, { order: Ot.SEGMENT, min: 0, max: 1 })), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, Y, !1), e(this, q, !1), e(this, a, !0), e(this, Q, !1), this.resize = () => {
136
- e(this, J, t(this, f).vertical ? this.offsetHeight : this.offsetWidth);
140
+ )), e(this, A, new o(this, "--distance-var", "")), e(this, M, new o(this, "--start-var", "")), e(this, D, new o(this, "--finish-var", "")), e(this, p, new rt(!1)), e(this, P, new rt(!1)), e(this, V, new rt(!1)), e(this, R, new rt(!1)), e(this, O, new rt(!1)), e(this, L, new rt(!1)), e(this, ht, []), e(this, n, this), e(this, _, 0), e(this, Q, 0), e(this, nt, 0), e(this, m, new $t(0, { order: zt.SEGMENT, min: 0, max: 1 })), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), e(this, q, !1), e(this, a, !0), e(this, U, !1), this.resize = () => {
141
+ e(this, Q, t(this, f).vertical ? this.offsetHeight : this.offsetWidth);
137
142
  const r = t(this, f) instanceof HTMLElement ? t(this, f) : t(this, f).element;
138
- e(this, _, t(this, f).vertical ? Dt(this, r) : xt(this, r));
139
- const s = Mt(
143
+ e(this, _, t(this, f).vertical ? Mt(this, r) : Dt(this, r));
144
+ const s = Tt(
140
145
  this,
141
146
  t(this, f).vertical ? "top" : "left"
142
147
  );
143
- e(this, _, t(this, _) - s), e(this, g, this.getStart()), e(this, b, this.getDistance()), e(this, g, t(this, g) + t(this, H).current), e(this, b, t(this, b) + t(this, $).current), e(this, w, t(this, g) + t(this, b)), t(this, f).currentScrollValue > t(this, w) && !t(this, p).current && !t(this, P).current && (t(this, p).current = !0), this.setVar(t(this, x).current, t(this, g)), this.setVar(t(this, M).current, t(this, w)), this.setVar(t(this, D).current, t(this, b)), t(this, S).max = t(this, b), e(this, Y, !0), t(this, tt).call(this);
144
- }, this.findAnotherScrollEntries = kt(() => {
145
- const r = At.getAll(this).reverse();
148
+ e(this, _, t(this, _) - s), e(this, g, this.getStart()), e(this, b, this.getDistance()), e(this, g, t(this, g) + t(this, $).current), e(this, b, t(this, b) + t(this, I).current), e(this, w, t(this, g) + t(this, b)), t(this, f).currentScrollValue > t(this, w) && !t(this, p).current && !t(this, P).current && (t(this, p).current = !0), this.setVar(t(this, M).current, t(this, g)), this.setVar(t(this, D).current, t(this, w)), this.setVar(t(this, A).current, t(this, b)), t(this, m).max = t(this, b), e(this, tt, !0), t(this, st).call(this);
149
+ }, this.findAnotherScrollEntries = At(() => {
150
+ const r = It.getAll(this).reverse();
146
151
  let s = 0;
147
- r.forEach((A, ut) => {
148
- A.element === t(this, f) && (s = ut);
149
- }), e(this, it, r.slice(s + 1)), this.tick();
150
- }, 0), e(this, nt, () => {
152
+ r.forEach((B, at) => {
153
+ B.element === t(this, f) && (s = at);
154
+ }), e(this, ht, r.slice(s + 1)), this.tick();
155
+ }, 0), e(this, ct, () => {
151
156
  t(this, a) || this.resize();
152
- }), e(this, tt, () => {
153
- !t(this, a) && t(this, Y) && this.tick();
157
+ }), e(this, st, () => {
158
+ !t(this, a) && t(this, tt) && this.tick();
154
159
  });
155
160
  }
156
161
  get scrollContainer() {
157
162
  return t(this, f);
158
163
  }
159
164
  set scrollContainer(r) {
160
- c(this, h, lt).call(this), e(this, f, r), c(this, h, gt).call(this);
165
+ c(this, h, ft).call(this), e(this, f, r), c(this, h, vt).call(this);
161
166
  }
162
167
  get distanceOffsetCSSProperty() {
163
- return t(this, $);
168
+ return t(this, I);
164
169
  }
165
170
  get startOffsetCSSProperty() {
166
- return t(this, H);
171
+ return t(this, $);
167
172
  }
168
173
  get captureOnceCSSProperty() {
169
- return t(this, W);
174
+ return t(this, H);
170
175
  }
171
176
  get capturedCSSProperty() {
172
177
  return t(this, d);
@@ -181,10 +186,10 @@ let $t = (bt = class extends HTMLElement {
181
186
  return t(this, y);
182
187
  }
183
188
  get releasedFromStartCSSProperty() {
184
- return t(this, N);
189
+ return t(this, W);
185
190
  }
186
191
  get releasedFromFinishCSSProperty() {
187
- return t(this, m);
192
+ return t(this, S);
188
193
  }
189
194
  get passedVarCSSProperty() {
190
195
  return t(this, z);
@@ -195,32 +200,35 @@ let $t = (bt = class extends HTMLElement {
195
200
  get progressArcVarCSSProperty() {
196
201
  return t(this, E);
197
202
  }
203
+ get progressArcMultCSSProperty() {
204
+ return t(this, N);
205
+ }
198
206
  get animationVarTypeCSSProperty() {
199
- return t(this, X);
207
+ return t(this, Y);
200
208
  }
201
209
  get distanceVarCSSProperty() {
202
- return t(this, D);
210
+ return t(this, A);
203
211
  }
204
212
  get startVarCSSProperty() {
205
- return t(this, x);
213
+ return t(this, M);
206
214
  }
207
215
  get finishVarCSSProperty() {
208
- return t(this, M);
216
+ return t(this, D);
209
217
  }
210
218
  get disabledCSSProperty() {
211
- return t(this, I);
219
+ return t(this, x);
212
220
  }
213
221
  get dampingCSSProperty() {
214
- return t(this, G);
222
+ return t(this, K);
215
223
  }
216
224
  get massCSSProperty() {
217
- return t(this, K);
225
+ return t(this, Z);
218
226
  }
219
227
  get stiffnessCSSProperty() {
220
- return t(this, Z);
228
+ return t(this, j);
221
229
  }
222
230
  get targetCSSProperty() {
223
- return t(this, j);
231
+ return t(this, J);
224
232
  }
225
233
  get isCaptured() {
226
234
  return t(this, p);
@@ -244,14 +252,17 @@ let $t = (bt = class extends HTMLElement {
244
252
  return t(this, _);
245
253
  }
246
254
  get directionSize() {
247
- return t(this, J);
255
+ return t(this, Q);
248
256
  }
249
257
  get passed() {
250
- return t(this, S);
258
+ return t(this, m);
251
259
  }
252
260
  get progress() {
253
261
  return t(this, T);
254
262
  }
263
+ get progressArc() {
264
+ return Math.abs(Math.cos(t(this, T) * Math.PI)) * t(this, N).current;
265
+ }
255
266
  get start() {
256
267
  return t(this, g);
257
268
  }
@@ -269,180 +280,179 @@ let $t = (bt = class extends HTMLElement {
269
280
  }
270
281
  tick() {
271
282
  let r = t(this, f).currentScrollValue;
272
- t(this, it).forEach((ut) => {
273
- r += ut.value;
283
+ t(this, ht).forEach((at) => {
284
+ r += at.value;
274
285
  });
275
286
  const s = r - t(this, g);
276
- t(this, Q) || e(this, Q, t(this, S).previous ? Math.abs(t(this, S).previous - s) > 1e3 : !1), t(this, S).set(s);
277
- const A = Math.round(r);
278
- t(this, p).current && (A >= t(this, g) ? t(this, V).current || c(this, h, yt).call(this) : t(this, V).current && !t(this, R).current && c(this, h, Vt).call(this), A < t(this, w) ? t(this, L).current && !t(this, O).current && c(this, h, Pt).call(this) : t(this, V).current && !t(this, L).current && c(this, h, Ft).call(this)), A >= t(this, g) && A < t(this, w) ? t(this, p).current || c(this, h, vt).call(this) : t(this, p).current && (t(this, S).set(
279
- Tt(t(this, b) / 2, t(this, S).target, 0, t(this, b))
280
- ), c(this, h, Ct).call(this)), t(this, q) && t(this, W).current && (t(this, d).current && t(this, n).classList.add(t(this, d).current), e(this, a, !0));
287
+ t(this, U) || e(this, U, t(this, m).previous ? Math.abs(t(this, m).previous - s) > 1e3 : !1), t(this, m).set(s);
288
+ const B = Math.round(r);
289
+ t(this, p).current && (B >= t(this, g) ? t(this, V).current || c(this, h, Pt).call(this) : t(this, V).current && !t(this, R).current && c(this, h, Ft).call(this), B < t(this, w) ? t(this, L).current && !t(this, O).current && c(this, h, Vt).call(this) : t(this, V).current && !t(this, L).current && c(this, h, Lt).call(this)), B >= t(this, g) && B < t(this, w) ? t(this, p).current || c(this, h, Ct).call(this) : t(this, p).current && (t(this, m).set(
290
+ xt(t(this, b) / 2, t(this, m).target, 0, t(this, b))
291
+ ), c(this, h, yt).call(this)), t(this, q) && t(this, H).current && (t(this, d).current && t(this, n).classList.add(t(this, d).current), e(this, a, !0));
281
292
  }
282
293
  disable() {
283
- this.style.cssText = "", e(this, _, 0), e(this, J, 0), t(this, S).reset(), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, Y, !1), t(this, p).current = !1, t(this, P).current = !1, t(this, V).current = !1, t(this, R).current = !1, t(this, O).current = !1, t(this, L).current = !1, e(this, q, !1), e(this, a, !0), c(this, h, pt).call(this);
294
+ this.style.cssText = "", e(this, _, 0), e(this, Q, 0), t(this, m).reset(), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), t(this, p).current = !1, t(this, P).current = !1, t(this, V).current = !1, t(this, R).current = !1, t(this, O).current = !1, t(this, L).current = !1, e(this, q, !1), e(this, a, !0), c(this, h, mt).call(this);
284
295
  }
285
296
  enable() {
286
297
  e(this, a, !1);
287
298
  }
288
299
  connectedCallback() {
289
- this.scrollContainer = new dt(this);
300
+ this.scrollContainer = new bt(this);
290
301
  }
291
302
  disconnectedCallback() {
292
- t(this, f) instanceof dt && t(this, f).destroy(), c(this, h, lt).call(this);
303
+ t(this, f) instanceof bt && t(this, f).destroy(), c(this, h, ft).call(this);
293
304
  }
294
305
  removeVar(r) {
295
306
  r && t(this, n).style.removeProperty(`--${r}`);
296
307
  }
297
308
  setVar(r, s) {
298
- r && t(this, n).style.setProperty(`--${r}`, s.toString());
309
+ if (r) {
310
+ const B = typeof s == "number" ? s.toFixed(6) : s;
311
+ t(this, n).style.setProperty(`--${r}`, B);
312
+ }
299
313
  }
300
314
  getDistance() {
301
- return t(this, J) + t(this, ht);
315
+ return t(this, Q) + t(this, nt);
302
316
  }
303
317
  getStart() {
304
- return t(this, _) - t(this, ht);
318
+ return t(this, _) - t(this, nt);
305
319
  }
306
- }, f = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), I = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), W = new WeakMap(), d = new WeakMap(), v = new WeakMap(), C = new WeakMap(), y = new WeakMap(), N = new WeakMap(), m = new WeakMap(), z = new WeakMap(), k = new WeakMap(), E = new WeakMap(), X = new WeakMap(), D = new WeakMap(), x = new WeakMap(), M = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), O = new WeakMap(), L = new WeakMap(), it = new WeakMap(), n = new WeakMap(), _ = new WeakMap(), J = new WeakMap(), ht = new WeakMap(), S = new WeakMap(), T = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), Y = new WeakMap(), q = new WeakMap(), a = new WeakMap(), Q = new WeakMap(), h = new WeakSet(), gt = function() {
320
+ }, f = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), x = new WeakMap(), I = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), d = new WeakMap(), v = new WeakMap(), C = new WeakMap(), y = new WeakMap(), W = new WeakMap(), S = new WeakMap(), z = new WeakMap(), k = new WeakMap(), E = new WeakMap(), N = new WeakMap(), Y = new WeakMap(), A = new WeakMap(), M = new WeakMap(), D = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), O = new WeakMap(), L = new WeakMap(), ht = new WeakMap(), n = new WeakMap(), _ = new WeakMap(), Q = new WeakMap(), nt = new WeakMap(), m = new WeakMap(), T = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), tt = new WeakMap(), q = new WeakMap(), a = new WeakMap(), U = new WeakMap(), h = new WeakSet(), vt = function() {
307
321
  if (!t(this, f))
308
322
  return;
309
323
  t(this, p).subscribe((s) => {
310
- s.current && st(this, "scrollSegmentCapture", {
324
+ s.current && et(this, "scrollSegmentCapture", {
311
325
  composed: !0,
312
326
  custom: !0
313
327
  });
314
328
  }), t(this, V).subscribe((s) => {
315
- s.current && st(this, "scrollSegmentCaptureFromStart", {
329
+ s.current && et(this, "scrollSegmentCaptureFromStart", {
316
330
  composed: !0,
317
331
  custom: !0
318
332
  });
319
333
  }), t(this, O).subscribe((s) => {
320
- s.current && st(this, "scrollSegmentCaptureFromFinish", {
334
+ s.current && et(this, "scrollSegmentCaptureFromFinish", {
321
335
  composed: !0,
322
336
  custom: !0
323
337
  });
324
338
  }), t(this, P).subscribe((s) => {
325
- s.current && st(this, "scrollSegmentRelease", {
339
+ s.current && et(this, "scrollSegmentRelease", {
326
340
  composed: !0,
327
341
  custom: !0
328
342
  });
329
343
  }), t(this, R).subscribe((s) => {
330
- s.current && st(this, "scrollSegmentReleaseFromStart", {
344
+ s.current && et(this, "scrollSegmentReleaseFromStart", {
331
345
  composed: !0,
332
346
  custom: !0
333
347
  });
334
348
  }), t(this, L).subscribe((s) => {
335
- s.current && st(this, "scrollSegmentReleaseFromFinish", {
349
+ s.current && et(this, "scrollSegmentReleaseFromFinish", {
336
350
  composed: !0,
337
351
  custom: !0
338
352
  });
339
- }), t(this, G).observe(), t(this, K).observe(), t(this, Z).observe(), t(this, j).observe(), t(this, I).observe(), t(this, $).observe(), t(this, H).observe(), t(this, W).observe(), t(this, d).observe(), t(this, v).observe(), t(this, C).observe(), t(this, y).observe(), t(this, N).observe(), t(this, m).observe(), t(this, z).observe(), t(this, k).observe(), t(this, E).observe(), t(this, X).observe(), t(this, D).observe(), t(this, x).observe(), t(this, M).observe();
353
+ }), t(this, K).observe(), t(this, Z).observe(), t(this, j).observe(), t(this, J).observe(), t(this, x).observe(), t(this, I).observe(), t(this, $).observe(), t(this, H).observe(), t(this, d).observe(), t(this, v).observe(), t(this, C).observe(), t(this, y).observe(), t(this, W).observe(), t(this, S).observe(), t(this, z).observe(), t(this, k).observe(), t(this, E).observe(), t(this, N).observe(), t(this, Y).observe(), t(this, A).observe(), t(this, M).observe(), t(this, D).observe();
340
354
  let r = !1;
341
- this.findAnotherScrollEntries(), t(this, I).current || this.enable(), t(this, G).subscribe((s) => {
342
- t(this, S).damping = s.current;
343
- }), t(this, K).subscribe((s) => {
344
- t(this, S).mass = s.current;
355
+ this.findAnotherScrollEntries(), t(this, x).current || this.enable(), t(this, K).subscribe((s) => {
356
+ t(this, m).damping = s.current;
345
357
  }), t(this, Z).subscribe((s) => {
346
- t(this, S).stiffness = s.current;
358
+ t(this, m).mass = s.current;
347
359
  }), t(this, j).subscribe((s) => {
348
- s.previous && c(this, h, pt).call(this), s.current ? s.current === "parent" ? e(this, n, this.parentElement || this) : e(this, n, document.querySelector(s.current) || this) : e(this, n, this);
349
- }), t(this, I).subscribe((s) => {
360
+ t(this, m).stiffness = s.current;
361
+ }), t(this, J).subscribe((s) => {
362
+ s.previous && c(this, h, mt).call(this), s.current ? s.current === "parent" ? e(this, n, this.parentElement || this) : e(this, n, document.querySelector(s.current) || this) : e(this, n, this);
363
+ }), t(this, x).subscribe((s) => {
350
364
  s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
351
- }), t(this, H).subscribe(() => {
352
- r && !t(this, a) && this.resize();
353
365
  }), t(this, $).subscribe(() => {
354
366
  r && !t(this, a) && this.resize();
367
+ }), t(this, I).subscribe(() => {
368
+ r && !t(this, a) && this.resize();
355
369
  }), t(this, d).subscribe((s) => {
356
- c(this, h, U).call(this, s);
370
+ c(this, h, X).call(this, s);
357
371
  }), t(this, C).subscribe((s) => {
358
- c(this, h, U).call(this, s);
372
+ c(this, h, X).call(this, s);
359
373
  }), t(this, y).subscribe((s) => {
360
- c(this, h, U).call(this, s);
374
+ c(this, h, X).call(this, s);
361
375
  }), t(this, v).subscribe((s) => {
362
- c(this, h, U).call(this, s);
363
- }), t(this, N).subscribe((s) => {
364
- c(this, h, U).call(this, s);
365
- }), t(this, m).subscribe((s) => {
366
- c(this, h, U).call(this, s);
376
+ c(this, h, X).call(this, s);
367
377
  }), t(this, W).subscribe((s) => {
378
+ c(this, h, X).call(this, s);
379
+ }), t(this, S).subscribe((s) => {
380
+ c(this, h, X).call(this, s);
381
+ }), t(this, H).subscribe((s) => {
368
382
  t(this, a) || !s.current && s.previous && (this.resize(), this.enable());
369
383
  }), t(this, z).subscribe((s) => {
370
384
  t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
371
385
  }), t(this, k).subscribe((s) => {
372
386
  t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, T)));
373
387
  }), t(this, E).subscribe((s) => {
374
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, c(this, h, ft).call(this)));
375
- }), t(this, x).subscribe((s) => {
376
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, g)));
388
+ t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.progressArc));
389
+ }), t(this, N).subscribe((s) => {
390
+ t(this, a) || c(this, h, pt).call(this);
377
391
  }), t(this, M).subscribe((s) => {
378
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, w)));
392
+ t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, g)));
379
393
  }), t(this, D).subscribe((s) => {
394
+ t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, w)));
395
+ }), t(this, A).subscribe((s) => {
380
396
  t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, b)));
381
- }), t(this, S).subscribe((s) => {
382
- if (t(this, Q)) {
383
- e(this, Q, !1);
397
+ }), t(this, m).subscribe((s) => {
398
+ if (t(this, U)) {
399
+ e(this, U, !1);
384
400
  return;
385
401
  }
386
- const A = t(this, S)[t(this, X).current];
387
- e(this, T, A / t(this, b) || 0), this.setVar(t(this, z).current, A.toFixed(6)), this.setVar(
388
- t(this, k).current,
389
- t(this, T).toFixed(6)
390
- ), t(this, E).current && this.setVar(
391
- t(this, E).current,
392
- c(this, h, ft).call(this).toFixed(6)
393
- );
394
- }), ot.subscribe(t(this, nt), zt.SCROLL + 1), this.scrollContainer.onScroll(t(this, tt)), r = !0;
395
- }, lt = function() {
396
- t(this, f) && (ot.unsubscribe(t(this, nt)), this.scrollContainer.offScroll(t(this, tt)), t(this, G).close(), t(this, K).close(), t(this, Z).close(), t(this, j).close(), t(this, I).close(), t(this, $).close(), t(this, H).close(), t(this, W).close(), t(this, d).close(), t(this, v).close(), t(this, C).close(), t(this, y).close(), t(this, N).close(), t(this, m).close(), t(this, z).close(), t(this, k).close(), t(this, E).close(), t(this, D).close(), t(this, x).close(), t(this, M).close(), t(this, p).close(), t(this, P).close(), t(this, V).close(), t(this, R).close(), t(this, O).close(), t(this, L).close(), this.disable());
397
- }, vt = function() {
398
- t(this, p).current = !0, t(this, P).current = !1, e(this, q, !0), t(this, v).current && t(this, n).classList.remove(t(this, v).current), t(this, m).current && t(this, n).classList.remove(
399
- t(this, m).current
400
- ), t(this, m).current && t(this, n).classList.remove(
401
- t(this, m).current
402
- ), t(this, d).current && t(this, n).classList.add(t(this, d).current);
402
+ c(this, h, pt).call(this);
403
+ }), ut.subscribe(t(this, ct), kt.SCROLL + 1), this.scrollContainer.onScroll(t(this, st)), r = !0;
404
+ }, ft = function() {
405
+ t(this, f) && (ut.unsubscribe(t(this, ct)), this.scrollContainer.offScroll(t(this, st)), t(this, K).close(), t(this, Z).close(), t(this, j).close(), t(this, J).close(), t(this, x).close(), t(this, I).close(), t(this, $).close(), t(this, H).close(), t(this, d).close(), t(this, v).close(), t(this, C).close(), t(this, y).close(), t(this, W).close(), t(this, S).close(), t(this, z).close(), t(this, k).close(), t(this, E).close(), t(this, N).close(), t(this, A).close(), t(this, M).close(), t(this, D).close(), t(this, p).close(), t(this, P).close(), t(this, V).close(), t(this, R).close(), t(this, O).close(), t(this, L).close(), this.disable(), t(this, m).close());
403
406
  }, Ct = function() {
407
+ t(this, p).current = !0, t(this, P).current = !1, e(this, q, !0), t(this, v).current && t(this, n).classList.remove(t(this, v).current), t(this, S).current && t(this, n).classList.remove(
408
+ t(this, S).current
409
+ ), t(this, S).current && t(this, n).classList.remove(
410
+ t(this, S).current
411
+ ), t(this, d).current && t(this, n).classList.add(t(this, d).current);
412
+ }, yt = function() {
404
413
  t(this, P).current = !0, t(this, p).current = !1, e(this, q, !0), t(this, d).current && t(this, n).classList.remove(t(this, d).current), t(this, C).current && t(this, n).classList.remove(
405
414
  t(this, C).current
406
415
  ), t(this, y).current && t(this, n).classList.remove(
407
416
  t(this, y).current
408
417
  ), t(this, v).current && t(this, n).classList.add(t(this, v).current);
409
- }, yt = function() {
418
+ }, Pt = function() {
410
419
  t(this, p).current = !0, t(this, V).current = !0, t(this, R).current = !1, t(this, C).current && t(this, n).classList.add(
411
420
  t(this, C).current
412
421
  );
413
- }, Pt = function() {
422
+ }, Vt = function() {
414
423
  t(this, p).current = !0, t(this, O).current = !0, t(this, L).current = !1, t(this, y).current && t(this, n).classList.add(
415
424
  t(this, y).current
416
425
  );
417
- }, Vt = function() {
418
- t(this, P).current = !0, t(this, R).current = !0, t(this, V).current = !1, t(this, m).current && t(this, n).classList.add(
419
- t(this, m).current
420
- );
421
426
  }, Ft = function() {
422
- t(this, P).current = !0, t(this, L).current = !0, t(this, O).current = !1, t(this, m).current && t(this, n).classList.add(
423
- t(this, m).current
427
+ t(this, P).current = !0, t(this, R).current = !0, t(this, V).current = !1, t(this, S).current && t(this, n).classList.add(
428
+ t(this, S).current
429
+ );
430
+ }, Lt = function() {
431
+ t(this, P).current = !0, t(this, L).current = !0, t(this, O).current = !1, t(this, S).current && t(this, n).classList.add(
432
+ t(this, S).current
424
433
  );
425
- }, nt = new WeakMap(), tt = new WeakMap(), ft = function() {
426
- return Math.abs(Math.cos(t(this, T) * Math.PI));
427
- }, U = function(r) {
434
+ }, ct = new WeakMap(), st = new WeakMap(), pt = function() {
435
+ const r = t(this, m)[t(this, Y).current];
436
+ this.setVar(t(this, z).current, r), e(this, T, r / t(this, b) || 0), this.setVar(t(this, k).current, t(this, T)), t(this, E).current && this.setVar(t(this, E).current, this.progressArc);
437
+ }, X = function(r) {
428
438
  if (t(this, a)) {
429
439
  r.previous && t(this, n).classList.remove(r.previous), r.current && t(this, n).classList.remove(r.current);
430
440
  return;
431
441
  }
432
442
  r.current && t(this, p).current ? (r.previous && t(this, n).classList.remove(r.previous), t(this, n).classList.add(r.current)) : !r.current && r.previous && t(this, n).classList.remove(r.previous);
433
- }, Lt = function(...r) {
443
+ }, wt = function(...r) {
434
444
  r.forEach((s) => {
435
445
  s && t(this, n).classList.remove(s);
436
446
  });
437
- }, wt = function(...r) {
447
+ }, Et = function(...r) {
438
448
  r.forEach((s) => {
439
449
  s && t(this, n).style.removeProperty(`--${s}`);
440
450
  });
441
- }, pt = function() {
442
- c(this, h, Lt).call(this, t(this, d).current, t(this, C).current, t(this, y).current, t(this, v).current, t(this, N).current, t(this, m).current), c(this, h, wt).call(this, t(this, z).current, t(this, k).current, t(this, E).current, t(this, D).current, t(this, x).current, t(this, M).current);
443
- }, bt);
444
- Rt && !customElements.get("scroll-segment") && customElements.define("scroll-segment", $t);
451
+ }, mt = function() {
452
+ c(this, h, wt).call(this, t(this, d).current, t(this, C).current, t(this, y).current, t(this, v).current, t(this, W).current, t(this, S).current), c(this, h, Et).call(this, t(this, z).current, t(this, k).current, t(this, E).current, t(this, A).current, t(this, M).current, t(this, D).current);
453
+ }, gt);
454
+ Ot && !customElements.get("scroll-segment") && customElements.define("scroll-segment", Ht);
445
455
  export {
446
- dt as ScrollSegmentDefaultContainer,
447
- $t as ScrollSegmentElement
456
+ bt as ScrollSegmentDefaultContainer,
457
+ Ht as ScrollSegmentElement
448
458
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.51.13",
3
+ "version": "0.51.14",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"