aptechka 0.53.0 → 0.53.1

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 Xe=Object.defineProperty;var qe=Object.getOwnPropertySymbols;var Ye=Object.prototype.hasOwnProperty,ts=Object.prototype.propertyIsEnumerable;var Be=d=>{throw TypeError(d)};var De=(d,n,e)=>n in d?Xe(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e,Oe=(d,n)=>{for(var e in n||(n={}))Ye.call(n,e)&&De(d,e,n[e]);if(qe)for(var e of qe(n))ts.call(n,e)&&De(d,e,n[e]);return d};var ze=(d,n,e)=>n.has(d)||Be("Cannot "+e);var t=(d,n,e)=>(ze(d,n,"read from private field"),e?e.call(d):n.get(d)),s=(d,n,e)=>n.has(d)?Be("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(d):n.set(d,e),h=(d,n,e,i)=>(ze(d,n,"write to private field"),i?i.call(d,e):n.set(d,e),e),l=(d,n,e)=>(ze(d,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const es=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),ss=require("../easings-GegIwET5.cjs"),ie=require("../events-KVanG9sR.cjs"),_e=require("../function-MthRj-GJ.cjs"),He=require("../jss-CRBgdvJ3.cjs"),Ot=require("../layout-Ctc2p3uz.cjs"),$e=require("../math-GDWEqu7y.cjs"),We=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const Pe=require("../order/index.cjs"),is=require("../Damped-DgAIjXp3.cjs"),rs=require("../Tweened-DpJDlbj9.cjs"),ve=require("../controls/index.cjs"),Vt=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),Ve=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),ns=require("../device/index.cjs"),oe=require("../element-resizer/index.cjs"),hs=require("../gestures-C7gbKx11.cjs"),Fe=require("../dom-JBOkFLTh.cjs"),os=require("../scroll-segment/index.cjs");var p,_t,g,le,ce,Ct,V,et,vt,Pt,re;class ls{constructor(n,e,i){s(this,Pt);s(this,p);s(this,_t);s(this,g);s(this,le,0);s(this,ce,0);s(this,Ct,0);s(this,V,0);s(this,et,null);s(this,vt,0);h(this,p,n),h(this,_t,e),h(this,g,i),yt.scrollEntries.register(t(this,p)),this.setIndex(t(this,_t))}get element(){return t(this,p)}get index(){return t(this,_t)}get size(){return t(this,Ct)}get width(){return t(this,le)}get height(){return t(this,ce)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,le,t(this,p).offsetWidth),h(this,ce,t(this,p).offsetHeight),h(this,Ct,t(this,g).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,g).vertical?Ot.getCumulativeOffsetTop(t(this,p)):Ot.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,p),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,Ct)+i,y=We.preciseNumber($e.clamp(r,u,b),3);h(this,vt,y*-1),t(this,g).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,et)!==n&&(t(this,et)&&t(this,p).classList.remove(t(this,et)),n&&t(this,p).classList.add(n),h(this,et,n),ie.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,et)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){l(this,Pt,re).call(this,"index",n)}setCurrentIndex(n){l(this,Pt,re).call(this,"current-index",n)}setCurrentIndexArc(n){l(this,Pt,re).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){l(this,Pt,re).call(this,"current-index-arc-abs",n)}}p=new WeakMap,_t=new WeakMap,g=new WeakMap,le=new WeakMap,ce=new WeakMap,Ct=new WeakMap,V=new WeakMap,et=new WeakMap,vt=new WeakMap,Pt=new WeakSet,re=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const cs=He.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,st,_,H,$,M,it,rt,W,nt,wt,T,v,xt,zt,Lt,It,Ht,A,kt,ht,R,ot,F,At,lt,Rt,ct,ut,at,f,$t,c,ue,ae,C,m,k,q,dt,D,E,x,Wt,N,U,G,Z,Ft,St,j,Nt,B,P,Ut,K,Mt,o,Le,ne,Bt,Ee,we,Ie,ke,z,de,Ne,Gt,Se,Ae,Re,gt,Ue,Me,he,pe;class qt 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,st,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,it,new S.CSSProperty(this,"--tween-easing",!1));s(this,rt,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,nt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,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,zt,new S.CSSProperty(this,"--mass",0));s(this,Lt,new S.CSSProperty(this,"--stiffness",0));s(this,It,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Ht,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,ht,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ot,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,At,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new S.CSSProperty(this,"--focus-delay",0));s(this,Rt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new S.CSSProperty(this,"--disabled",!1));s(this,ut,new S.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,f,null);s(this,$t,null);s(this,c,[]);s(this,ue,0);s(this,ae,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,dt,null);s(this,D,null);s(this,E,null);s(this,x,new es.Store(0));s(this,Wt,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Ft);s(this,St);s(this,j,new rs.Tweened);s(this,Nt,!1);s(this,B,null);s(this,P,!1);s(this,Ut,null);s(this,K,[]);s(this,Mt,!1);s(this,z,()=>{this.resize()});s(this,de,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,Wt,Math.max(0,e-t(this,m))),t(this,c).length){for(let i=0;i<t(this,c).length;i++)t(this,c)[i].transform();t(this,x).current=l(this,o,he).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;l(this,o,Ue).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,Gt,(e,i)=>{t(this,Et).current&&(l(this,o,Ae).call(this,Math.sign(i)||1),t(this,Se).call(this,e,i))});s(this,Se,(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,St)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,lt).current&&(clearInterval(t(this,Ft)),h(this,Ft,setTimeout(()=>{const r=t(this,c)[l(this,o,he).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Rt).current,easing:ss.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!ns.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,c).length){const u={tween:t(this,it).current||t(this,rt).current?{easing:t(this,it).current||"easeInOutCubic",duration:t(this,rt).current||500}:void 0};t(this,Nt)?this.scrollToSection(l(this,o,he).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,Nt,e==="drag")}});s(this,pe,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||l(this,o,ke).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[cs];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,at,document.createElement("div")),t(this,at).className="content-wrapper",h(this,f,document.createElement("div")),t(this,f).className="content",h(this,$t,document.createElement("slot")),t(this,f).appendChild(t(this,$t)),t(this,at).appendChild(t(this,f)),e.appendChild(t(this,at)),h(this,Ut,new MutationObserver(_e.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,st)}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,it)}get durationCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,nt)}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,zt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,Ht)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,kt)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,At)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Rt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return l(this,o,Re).call(this,"current")}get targetScrollValue(){return l(this,o,Re).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,f)}get sections(){return t(this,c)}get position(){return t(this,ue)}get contentPosition(){return t(this,ae)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,c).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Wt)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&l(this,o,ne).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,c).length)return;const r=t(this,x).current,u=l(this,o,Ne).call(this,e),b=t(this,c)[r],y=t(this,c)[u];if(b&&y){let I=0;const xe=l(this,o,he).call(this),Dt=t(this,c)[xe],Ce=Dt?this.targetScrollValue-Dt.position:0;t(this,v).current?u===0&&r===t(this,c).length-1?I=t(this,m)+t(this,C)-b.position+t(this,k):u===t(this,c).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-b.position:I=y.position-b.position,this.shiftPosition(I-Ce,i)}}shiftSections(e,i){t(this,c).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){l(this,o,Ae).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,Oe({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,Mt)){h(this,Mt,!1);return}if(t(this,ut).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,ue,this.vertical?Ot.getCumulativeOffsetTop(this):Ot.getCumulativeOffsetLeft(this)),h(this,ae,this.vertical?Ot.getCumulativeOffsetTop(t(this,f)):Ot.getCumulativeOffsetLeft(t(this,f))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,Ve.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):h(this,k,Ve.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,W).current&&t(this,c).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,c).forEach(b=>{b.setSize(u)})}else t(this,c).forEach(r=>{r.setSize()});if(t(this,c).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,f).style.width=r+"px",t(this,f).style.height="100%"):(t(this,f).style.height=r+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",h(this,m,t(this,f).offsetHeight-t(this,C))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",h(this,m,t(this,f).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,c).length){const r=t(this,c)[t(this,c).length-1],u=r.position+r.size-t(this,C),b=t(this,m)-u;h(this,N,r.position+r.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,c).length){const r=t(this,c)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||l(this,o,we).call(this):l(this,o,Ee).call(this),l(this,o,Me).call(this),ie.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new is.Damped(0,{damping:.01,min:0,order:Pe.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new ve.WheelControls({element:t(this,f)})),t(this,q).changeEvent.subscribe(t(this,Gt)),h(this,dt,new ve.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,Gt)),h(this,D,new ve.DragControls({element:t(this,f),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,Gt)),h(this,E,new ve.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,Se)),t(this,w).subscribe(()=>{l(this,o,Le).call(this)}),t(this,st).subscribe(()=>{l(this,o,Le).call(this)}),t(this,nt).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,z).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?l(this,o,ne).call(this):l(this,o,Bt).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,c).length?l(this,o,ne).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,Bt).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,z).call(this),e.current&&!e.previous&&!t(this,c).length?l(this,o,ne).call(this):!e.current&&e.previous&&t(this,c).length&&l(this,o,Bt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,z).call(this),l(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,c).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,Wt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,zt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,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,ht).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&l(this,o,gt).call(this)}),t(this,ot).subscribe(e=>{t(this,P)&&t(this,R).current&&l(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&l(this,o,gt).call(this)}),t(this,At).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,c).length&&l(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),l(this,o,Ee).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),l(this,o,we).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),l(this,o,Ie).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),l(this,o,ke).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,st).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,Ht).observe(),t(this,A).observe(),t(this,A).observe(),t(this,kt).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,At).observe(),t(this,lt).observe(),t(this,Rt).observe(),t(this,ct).observe(),t(this,ut).observe(),Vt.windowResizer.subscribe(t(this,pe),Pe.RESIZE_ORDER.LAST),oe.elementResizer.subscribe(this,t(this,z)),t(this,Ut).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,st).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,Ht).unobserve(),t(this,A).unobserve(),t(this,kt).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,At).unobserve(),t(this,lt).unobserve(),t(this,Rt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),Vt.windowResizer.unsubscribe(t(this,pe)),oe.elementResizer.unsubscribe(t(this,z)),l(this,o,Ie).call(this),t(this,Ut).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,st=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,Ht=new WeakMap,A=new WeakMap,kt=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,F=new WeakMap,At=new WeakMap,lt=new WeakMap,Rt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,f=new WeakMap,$t=new WeakMap,c=new WeakMap,ue=new WeakMap,ae=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,dt=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,Wt=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Ft=new WeakMap,St=new WeakMap,j=new WeakMap,Nt=new WeakMap,B=new WeakMap,P=new WeakMap,Ut=new WeakMap,K=new WeakMap,Mt=new WeakMap,o=new WeakSet,Le=function(){const e=t(this,w).current,i=t(this,st).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,z).call(this)},ne=function(){l(this,o,Bt).call(this),t(this,$t).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,c).push(new ls(e,i,this))}),t(this,f).style.transform="",this.style.setProperty("--sections",t(this,c).length.toString()),ie.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,z).call(this),l(this,o,gt).call(this)},Bt=function(){t(this,c).forEach(e=>{e.destroy()}),h(this,c,[]),t(this,x).reset(),t(this,a).reset(),this.style.removeProperty("--max-section-size"),ie.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Ee=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,de)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Ft)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,dt).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,z).call(this)))},we=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,de),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,dt).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},Ie=function(){t(this,Z)||(h(this,Z,!0),Vt.windowResizer.unsubscribe(t(this,z)),l(this,o,Ee).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),t(this,c).length?l(this,o,Bt).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},ke=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),l(this,o,we).call(this),Vt.windowResizer.subscribe(t(this,z),Pe.RESIZE_ORDER.SCROLL))},z=new WeakMap,de=new WeakMap,Ne=function(e){let i=t(this,x).current;return t(this,v).current?i=We.loopNumber(e,t(this,c).length):i=$e.clamp(e,0,this.limit),i},Gt=new WeakMap,Se=new WeakMap,Ae=function(e=1){t(this,ht).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,kt).current,this.sectionalCSSProperty.current)},Re=function(e="current"){if(t(this,v).current&&t(this,c).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,c).length){const e=t(this,x).current+t(this,ot).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),ie.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,K,[]),t(this,c).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const b=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=b?(r.setMark("current"),t(this,K).push(r)):u>=y&&u<y+I/2||u<=b+i?r.setMark("next"):r.setMark("previous")}),l(this,o,Me).call(this)}}},Ue=function(){if(t(this,R).current){const e=Math.floor(t(this,K).length/2);t(this,K).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,K).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},Me=function(){const e=t(this,K).reduce((i,r)=>{const u=this.vertical?r.width:r.height;return u>i?u:i},0);h(this,Mt,!0),this.style.setProperty("--max-section-size",""),setTimeout(()=>{h(this,Mt,!0),this.style.setProperty("--max-section-size",e+"px")},10)},he=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const b=t(this,a).direction;for(let y=0;y<t(this,c).length;y++){const I=t(this,c)[y];let xe=t(this,Nt)?I.size*b*-1*.4:0,Dt=I.position;this.overscroll&&Dt===0&&e&&(Dt=t(this,N));let Ce=Math.abs(Dt+xe-i);Ce<=r&&(r=Ce,u=y)}return u},pe=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",qt);var fe;class Te extends HTMLElement{constructor(){super(...arguments);s(this,fe,null)}get scrollElement(){return t(this,fe)}connectedCallback(){const e=Fe.findParentElement(this,qt);e instanceof qt?h(this,fe,e):console.error(this,"e-scroll not found")}}fe=new WeakMap;var pt,L,J,Q,Zt,jt,ft,Kt,be,me;class Ge extends Te{constructor(){super();s(this,pt,null);s(this,L,null);s(this,J,!1);s(this,Q,0);s(this,Zt,0);s(this,jt,0);s(this,ft,()=>{h(this,J,this.offsetWidth>this.offsetHeight);const e=t(this,J)?this.offsetWidth:this.offsetHeight;h(this,Q,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,Q,Math.max(t(this,Q),30)),t(this,J)?(t(this,L).style.width=t(this,Q)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,Q)+"px"),h(this,Zt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Kt).call(this)});s(this,Kt,()=>{h(this,jt,this.scrollElement.currentProgress*t(this,Zt)),t(this,J)?t(this,L).style.transform=`translate3d(${t(this,jt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,jt)}px, 0px)`});s(this,be,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,me,e=>{document.documentElement.classList.add("grabbing"),hs.setupDrag(u=>{const b=t(this,J)?u.x:u.y,y=this.scrollElement.distance/t(this,Zt),I=(b-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[He.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,L,e),t(this,L).addEventListener("pointerdown",t(this,me)),Vt.windowResizer.subscribe(t(this,ft),Pe.RESIZE_ORDER.SCROLL),oe.elementResizer.subscribe(this,t(this,ft)),oe.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Kt)),this.scrollElement.axisCSSProperty.subscribe(t(this,be))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,me)),Vt.windowResizer.unsubscribe(t(this,ft)),oe.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Kt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,be))}}pt=new WeakMap,L=new WeakMap,J=new WeakMap,Q=new WeakMap,Zt=new WeakMap,jt=new WeakMap,ft=new WeakMap,Kt=new WeakMap,be=new WeakMap,me=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Ge);var Jt,Qt,Xt;class Ze extends Te{constructor(){super();s(this,Jt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Qt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Xt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Jt).current,i=t(this,Qt).current,r=t(this,Xt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,Xt).observe()}disconnectedCallback(){t(this,Jt).close(),t(this,Qt).close(),t(this,Xt).close()}}Jt=new WeakMap,Qt=new WeakMap,Xt=new WeakMap;var Yt;class je extends Ze{constructor(){super(...arguments);s(this,Yt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Yt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Yt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Yt).close()}}Yt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",je);var X,te;class Ke extends Ze{constructor(){super(...arguments);s(this,X,new S.CSSProperty(this,"--step",1));s(this,te,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,X).current>0&&this.scrollElement.scrollLine==="end"||t(this,X).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,X).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,X).subscribe(()=>{t(this,te).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,te)),t(this,te).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,te=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Ke);var Y,bt,ee,ge,ye,se;class us{constructor(n,e,i){s(this,Y,null);s(this,bt,null);s(this,ee,null);s(this,ge,null);s(this,ye,()=>{t(this,bt).scrollToSection(t(this,ee),{behaviour:t(this,ge)})});s(this,se,()=>{t(this,Y).classList.toggle("current",t(this,bt).counter.current===t(this,ee))});O.isBrowser&&(h(this,Y,document.createElement("button")),h(this,bt,n),h(this,ge,i),h(this,ee,e),t(this,Y).addEventListener("click",t(this,ye)),t(this,bt).counter.subscribe(t(this,se)),t(this,se).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,ye)),t(this,bt).counter.unsubscribe(t(this,se)),t(this,Y).remove()}}Y=new WeakMap,bt=new WeakMap,ee=new WeakMap,ge=new WeakMap,ye=new WeakMap,se=new WeakMap;var Tt,mt,tt;class Je extends Te{constructor(){super(...arguments);s(this,Tt,null);s(this,mt,[]);s(this,tt,_e.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 us(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Tt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,Tt,document.createElement("div")),this.appendChild(t(this,Tt))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,tt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,tt)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Tt).remove()}}Tt=new WeakMap,mt=new WeakMap,tt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Je);class Qe extends os.ScrollSegmentElement{connectedCallback(){const n=Fe.findParentElement(this,qt);n instanceof qt?(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 qt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Qe);exports.ScrollBulletButtonsElement=Je;exports.ScrollElement=qt;exports.ScrollSegmentElement=Qe;exports.ScrollSetButtonElement=je;exports.ScrollStepButtonElement=Ke;exports.ScrollbarElement=Ge;
1
+ "use strict";var Ye=Object.defineProperty;var Be=Object.getOwnPropertySymbols;var ts=Object.prototype.hasOwnProperty,es=Object.prototype.propertyIsEnumerable;var Ve=d=>{throw TypeError(d)};var Oe=(d,n,e)=>n in d?Ye(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e,_e=(d,n)=>{for(var e in n||(n={}))ts.call(n,e)&&Oe(d,e,n[e]);if(Be)for(var e of Be(n))es.call(n,e)&&Oe(d,e,n[e]);return d};var Ie=(d,n,e)=>n.has(d)||Ve("Cannot "+e);var t=(d,n,e)=>(Ie(d,n,"read from private field"),e?e.call(d):n.get(d)),s=(d,n,e)=>n.has(d)?Ve("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(d):n.set(d,e),h=(d,n,e,i)=>(Ie(d,n,"write to private field"),i?i.call(d,e):n.set(d,e),e),c=(d,n,e)=>(Ie(d,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ss=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),is=require("../easings-GegIwET5.cjs"),re=require("../events-KVanG9sR.cjs"),ke=require("../function-MthRj-GJ.cjs"),$e=require("../jss-CRBgdvJ3.cjs"),Ot=require("../layout-Ctc2p3uz.cjs"),We=require("../math-GDWEqu7y.cjs"),Fe=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const we=require("../order/index.cjs"),rs=require("../Damped-DgAIjXp3.cjs"),ns=require("../Tweened-DpJDlbj9.cjs"),Ee=require("../controls/index.cjs"),Vt=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),He=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),hs=require("../device/index.cjs"),le=require("../element-resizer/index.cjs"),os=require("../gestures-C7gbKx11.cjs"),Ne=require("../dom-JBOkFLTh.cjs"),ls=require("../scroll-segment/index.cjs");var p,_t,g,ce,ue,Ct,V,et,vt,Pt,ne;class cs{constructor(n,e,i){s(this,Pt);s(this,p);s(this,_t);s(this,g);s(this,ce,0);s(this,ue,0);s(this,Ct,0);s(this,V,0);s(this,et,null);s(this,vt,0);h(this,p,n),h(this,_t,e),h(this,g,i),yt.scrollEntries.register(t(this,p)),this.setIndex(t(this,_t))}get element(){return t(this,p)}get index(){return t(this,_t)}get size(){return t(this,Ct)}get width(){return t(this,ce)}get height(){return t(this,ue)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,ce,t(this,p).offsetWidth),h(this,ue,t(this,p).offsetHeight),h(this,Ct,t(this,g).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,g).vertical?Ot.getCumulativeOffsetTop(t(this,p)):Ot.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,p),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,Ct)+i,y=Fe.preciseNumber(We.clamp(r,u,b),3);h(this,vt,y*-1),t(this,g).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,et)!==n&&(t(this,et)&&t(this,p).classList.remove(t(this,et)),n&&t(this,p).classList.add(n),h(this,et,n),re.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,et)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){c(this,Pt,ne).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,ne).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,ne).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,ne).call(this,"current-index-arc-abs",n)}}p=new WeakMap,_t=new WeakMap,g=new WeakMap,ce=new WeakMap,ue=new WeakMap,Ct=new WeakMap,V=new WeakMap,et=new WeakMap,vt=new WeakMap,Pt=new WeakSet,ne=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const us=$e.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,st,_,H,$,M,it,rt,W,nt,wt,T,v,xt,zt,Lt,It,Ht,A,kt,ht,R,ot,F,At,lt,Rt,ct,ut,at,f,$t,l,ae,de,C,m,k,q,dt,D,E,x,Wt,N,U,G,Z,Ft,St,j,Nt,B,P,Ut,K,Mt,Gt,o,Ae,he,Bt,xe,ze,Re,Me,z,Se,Ue,Zt,pe,Te,qe,gt,Ge,fe,oe,be;class qt 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,st,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,it,new S.CSSProperty(this,"--tween-easing",!1));s(this,rt,new S.CSSProperty(this,"--tween-duration",!1));s(this,W,new S.CSSProperty(this,"--auto-size",!1));s(this,nt,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,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,zt,new S.CSSProperty(this,"--mass",0));s(this,Lt,new S.CSSProperty(this,"--stiffness",0));s(this,It,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Ht,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,ht,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,ot,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,At,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new S.CSSProperty(this,"--focus-delay",0));s(this,Rt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new S.CSSProperty(this,"--disabled",!1));s(this,ut,new S.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,f,null);s(this,$t,null);s(this,l,[]);s(this,ae,0);s(this,de,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,dt,null);s(this,D,null);s(this,E,null);s(this,x,new ss.Store(0));s(this,Wt,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Ft);s(this,St);s(this,j,new ns.Tweened);s(this,Nt,!1);s(this,B,null);s(this,P,!1);s(this,Ut,null);s(this,K,[]);s(this,Mt,!1);s(this,Gt);s(this,z,e=>{if(e&&t(this,Mt)){h(this,Mt,!1);return}this.resize()});s(this,Se,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,Wt,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,oe).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Ge).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,Zt,(e,i)=>{t(this,Et).current&&(c(this,o,Te).call(this,Math.sign(i)||1),t(this,pe).call(this,e,i))});s(this,pe,(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,St)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,lt).current&&(clearInterval(t(this,Ft)),h(this,Ft,setTimeout(()=>{const r=t(this,l)[c(this,o,oe).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Rt).current,easing:is.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!hs.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,it).current||t(this,rt).current?{easing:t(this,it).current||"easeInOutCubic",duration:t(this,rt).current||500}:void 0};t(this,Nt)?this.scrollToSection(c(this,o,oe).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,Nt,e==="drag")}});s(this,fe,ke.debounce(()=>{const e=t(this,K).reduce((i,r)=>{const u=this.vertical?r.width:r.height;return u>i?u:i},0);clearTimeout(t(this,Gt)),h(this,Mt,!0),this.style.setProperty("--max-section-size",""),h(this,Gt,setTimeout(()=>{h(this,Mt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,be,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Me).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[us];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,at,document.createElement("div")),t(this,at).className="content-wrapper",h(this,f,document.createElement("div")),t(this,f).className="content",h(this,$t,document.createElement("slot")),t(this,f).appendChild(t(this,$t)),t(this,at).appendChild(t(this,f)),e.appendChild(t(this,at)),h(this,Ut,new MutationObserver(ke.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,st)}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,it)}get durationCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,nt)}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,zt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,Ht)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,kt)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,At)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Rt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return c(this,o,qe).call(this,"current")}get targetScrollValue(){return c(this,o,qe).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,f)}get sections(){return t(this,l)}get position(){return t(this,ae)}get contentPosition(){return t(this,de)}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,Wt)}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,he).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,Ue).call(this,e),b=t(this,l)[r],y=t(this,l)[u];if(b&&y){let I=0;const Le=c(this,o,oe).call(this),Dt=t(this,l)[Le],Pe=Dt?this.targetScrollValue-Dt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?I=t(this,m)+t(this,C)-b.position+t(this,k):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-b.position:I=y.position-b.position,this.shiftPosition(I-Pe,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,Te).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,_e({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ut).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,ae,this.vertical?Ot.getCumulativeOffsetTop(this):Ot.getCumulativeOffsetLeft(this)),h(this,de,this.vertical?Ot.getCumulativeOffsetTop(t(this,f)):Ot.getCumulativeOffsetLeft(t(this,f))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,He.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):h(this,k,He.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,f).style.width=r+"px",t(this,f).style.height="100%"):(t(this,f).style.height=r+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",h(this,m,t(this,f).offsetHeight-t(this,C))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",h(this,m,t(this,f).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),b=t(this,m)-u;h(this,N,r.position+r.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||c(this,o,ze).call(this):c(this,o,xe).call(this),t(this,fe).call(this),re.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new rs.Damped(0,{damping:.01,min:0,order:we.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new Ee.WheelControls({element:t(this,f)})),t(this,q).changeEvent.subscribe(t(this,Zt)),h(this,dt,new Ee.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,Zt)),h(this,D,new Ee.DragControls({element:t(this,f),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,Zt)),h(this,E,new Ee.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,pe)),t(this,w).subscribe(()=>{c(this,o,Ae).call(this)}),t(this,st).subscribe(()=>{c(this,o,Ae).call(this)}),t(this,nt).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,z).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,he).call(this):c(this,o,Bt).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,he).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Bt).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,z).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,he).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Bt).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,z).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,Wt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,zt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,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,ht).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,ot).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,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,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,xe).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,ze).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Re).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Me).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,st).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,Ht).observe(),t(this,A).observe(),t(this,A).observe(),t(this,kt).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,At).observe(),t(this,lt).observe(),t(this,Rt).observe(),t(this,ct).observe(),t(this,ut).observe(),Vt.windowResizer.subscribe(t(this,be),we.RESIZE_ORDER.LAST),le.elementResizer.subscribe(this,t(this,z)),t(this,Ut).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,st).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,Ht).unobserve(),t(this,A).unobserve(),t(this,kt).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,At).unobserve(),t(this,lt).unobserve(),t(this,Rt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),Vt.windowResizer.unsubscribe(t(this,be)),le.elementResizer.unsubscribe(t(this,z)),c(this,o,Re).call(this),t(this,Ut).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,st=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,Ht=new WeakMap,A=new WeakMap,kt=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,F=new WeakMap,At=new WeakMap,lt=new WeakMap,Rt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,f=new WeakMap,$t=new WeakMap,l=new WeakMap,ae=new WeakMap,de=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,dt=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,Wt=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Ft=new WeakMap,St=new WeakMap,j=new WeakMap,Nt=new WeakMap,B=new WeakMap,P=new WeakMap,Ut=new WeakMap,K=new WeakMap,Mt=new WeakMap,Gt=new WeakMap,o=new WeakSet,Ae=function(){const e=t(this,w).current,i=t(this,st).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,z).call(this)},he=function(){c(this,o,Bt).call(this),t(this,$t).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new cs(e,i,this))}),t(this,f).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),re.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,z).call(this),c(this,o,gt).call(this)},Bt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),this.style.removeProperty("--max-section-size"),re.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},xe=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,Se)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Ft)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,dt).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,z).call(this)))},ze=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,Se),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,dt).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},Re=function(){t(this,Z)||(h(this,Z,!0),clearTimeout(t(this,Gt)),Vt.windowResizer.unsubscribe(t(this,z)),c(this,o,xe).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Bt).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Me=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,ze).call(this),Vt.windowResizer.subscribe(t(this,z),we.RESIZE_ORDER.SCROLL))},z=new WeakMap,Se=new WeakMap,Ue=function(e){let i=t(this,x).current;return t(this,v).current?i=Fe.loopNumber(e,t(this,l).length):i=We.clamp(e,0,this.limit),i},Zt=new WeakMap,pe=new WeakMap,Te=function(e=1){t(this,ht).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,kt).current,this.sectionalCSSProperty.current)},qe=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ot).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),re.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,K,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const b=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=b?(r.setMark("current"),t(this,K).push(r)):u>=y&&u<y+I/2||u<=b+i?r.setMark("next"):r.setMark("previous")}),t(this,fe).call(this)}}},Ge=function(){if(t(this,R).current){const e=Math.floor(t(this,K).length/2);t(this,K).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,K).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},fe=new WeakMap,oe=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const b=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Le=t(this,Nt)?I.size*b*-1*.4:0,Dt=I.position;this.overscroll&&Dt===0&&e&&(Dt=t(this,N));let Pe=Math.abs(Dt+Le-i);Pe<=r&&(r=Pe,u=y)}return u},be=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",qt);var me;class De extends HTMLElement{constructor(){super(...arguments);s(this,me,null)}get scrollElement(){return t(this,me)}connectedCallback(){const e=Ne.findParentElement(this,qt);e instanceof qt?h(this,me,e):console.error(this,"e-scroll not found")}}me=new WeakMap;var pt,L,J,Q,jt,Kt,ft,Jt,ge,ye;class Ze extends De{constructor(){super();s(this,pt,null);s(this,L,null);s(this,J,!1);s(this,Q,0);s(this,jt,0);s(this,Kt,0);s(this,ft,()=>{h(this,J,this.offsetWidth>this.offsetHeight);const e=t(this,J)?this.offsetWidth:this.offsetHeight;h(this,Q,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,Q,Math.max(t(this,Q),30)),t(this,J)?(t(this,L).style.width=t(this,Q)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,Q)+"px"),h(this,jt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Jt).call(this)});s(this,Jt,()=>{h(this,Kt,this.scrollElement.currentProgress*t(this,jt)),t(this,J)?t(this,L).style.transform=`translate3d(${t(this,Kt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,Kt)}px, 0px)`});s(this,ge,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,ye,e=>{document.documentElement.classList.add("grabbing"),os.setupDrag(u=>{const b=t(this,J)?u.x:u.y,y=this.scrollElement.distance/t(this,jt),I=(b-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[$e.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,L,e),t(this,L).addEventListener("pointerdown",t(this,ye)),Vt.windowResizer.subscribe(t(this,ft),we.RESIZE_ORDER.SCROLL),le.elementResizer.subscribe(this,t(this,ft)),le.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Jt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ge))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,ye)),Vt.windowResizer.unsubscribe(t(this,ft)),le.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Jt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ge))}}pt=new WeakMap,L=new WeakMap,J=new WeakMap,Q=new WeakMap,jt=new WeakMap,Kt=new WeakMap,ft=new WeakMap,Jt=new WeakMap,ge=new WeakMap,ye=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",Ze);var Qt,Xt,Yt;class je extends De{constructor(){super();s(this,Qt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Xt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Yt,new S.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Qt).current,i=t(this,Xt).current,r=t(this,Yt).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Qt).observe(),t(this,Xt).observe(),t(this,Yt).observe()}disconnectedCallback(){t(this,Qt).close(),t(this,Xt).close(),t(this,Yt).close()}}Qt=new WeakMap,Xt=new WeakMap,Yt=new WeakMap;var te;class Ke extends je{constructor(){super(...arguments);s(this,te,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,te).current,e)}connectedCallback(){super.connectedCallback(),t(this,te).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,te).close()}}te=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Ke);var X,ee;class Je extends je{constructor(){super(...arguments);s(this,X,new S.CSSProperty(this,"--step",1));s(this,ee,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,X).current>0&&this.scrollElement.scrollLine==="end"||t(this,X).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,X).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,X).subscribe(()=>{t(this,ee).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,ee)),t(this,ee).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,ee=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Je);var Y,bt,se,Ce,ve,ie;class as{constructor(n,e,i){s(this,Y,null);s(this,bt,null);s(this,se,null);s(this,Ce,null);s(this,ve,()=>{t(this,bt).scrollToSection(t(this,se),{behaviour:t(this,Ce)})});s(this,ie,()=>{t(this,Y).classList.toggle("current",t(this,bt).counter.current===t(this,se))});O.isBrowser&&(h(this,Y,document.createElement("button")),h(this,bt,n),h(this,Ce,i),h(this,se,e),t(this,Y).addEventListener("click",t(this,ve)),t(this,bt).counter.subscribe(t(this,ie)),t(this,ie).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,ve)),t(this,bt).counter.unsubscribe(t(this,ie)),t(this,Y).remove()}}Y=new WeakMap,bt=new WeakMap,se=new WeakMap,Ce=new WeakMap,ve=new WeakMap,ie=new WeakMap;var Tt,mt,tt;class Qe extends De{constructor(){super(...arguments);s(this,Tt,null);s(this,mt,[]);s(this,tt,ke.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 as(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Tt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,Tt,document.createElement("div")),this.appendChild(t(this,Tt))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,tt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,tt)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,Tt).remove()}}Tt=new WeakMap,mt=new WeakMap,tt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Qe);class Xe extends ls.ScrollSegmentElement{connectedCallback(){const n=Ne.findParentElement(this,qt);n instanceof qt?(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 qt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Xe);exports.ScrollBulletButtonsElement=Qe;exports.ScrollElement=qt;exports.ScrollSegmentElement=Xe;exports.ScrollSetButtonElement=Ke;exports.ScrollStepButtonElement=Je;exports.ScrollbarElement=Ze;
@@ -1,51 +1,51 @@
1
- var Ke = Object.defineProperty;
2
- var Ve = Object.getOwnPropertySymbols;
3
- var _e = Object.prototype.hasOwnProperty, Ze = Object.prototype.propertyIsEnumerable;
4
- var Oe = (d) => {
1
+ var _e = Object.defineProperty;
2
+ var Oe = Object.getOwnPropertySymbols;
3
+ var Ze = Object.prototype.hasOwnProperty, je = Object.prototype.propertyIsEnumerable;
4
+ var $e = (d) => {
5
5
  throw TypeError(d);
6
6
  };
7
- var Re = (d, n, e) => n in d ? Ke(d, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[n] = e, He = (d, n) => {
7
+ var He = (d, n, e) => n in d ? _e(d, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[n] = e, Be = (d, n) => {
8
8
  for (var e in n || (n = {}))
9
- _e.call(n, e) && Re(d, e, n[e]);
10
- if (Ve)
11
- for (var e of Ve(n))
12
- Ze.call(n, e) && Re(d, e, n[e]);
9
+ Ze.call(n, e) && He(d, e, n[e]);
10
+ if (Oe)
11
+ for (var e of Oe(n))
12
+ je.call(n, e) && He(d, e, n[e]);
13
13
  return d;
14
14
  };
15
- var Ee = (d, n, e) => n.has(d) || Oe("Cannot " + e);
16
- 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) ? Oe("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, e), h = (d, n, e, i) => (Ee(d, n, "write to private field"), i ? i.call(d, e) : n.set(d, e), e), l = (d, n, e) => (Ee(d, n, "access private method"), e);
17
- import { S as je } from "../Store-swP_0ymB.js";
15
+ var Pe = (d, n, e) => n.has(d) || $e("Cannot " + e);
16
+ var t = (d, n, e) => (Pe(d, n, "read from private field"), e ? e.call(d) : n.get(d)), s = (d, n, e) => n.has(d) ? $e("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, e), h = (d, n, e, i) => (Pe(d, n, "write to private field"), i ? i.call(d, e) : n.set(d, e), e), c = (d, n, e) => (Pe(d, n, "access private method"), e);
17
+ import { S as Je } from "../Store-swP_0ymB.js";
18
18
  import { i as H } from "../index-euf5anj6.js";
19
- import { q as Je } from "../easings-BEmRlrDd.js";
20
- import { d as se } from "../events-CsVF98U6.js";
21
- import { d as Be } from "../function-C10DGppn.js";
22
- import { c as We } from "../jss-DtnXPEnq.js";
23
- import { a as we, g as Pe } from "../layout-DpZo-I0y.js";
24
- import { c as Fe } from "../math-BOBiC4TN.js";
25
- import { p as Qe, l as Xe } from "../number-DwCxt_Ck.js";
19
+ import { q as Qe } from "../easings-BEmRlrDd.js";
20
+ import { d as ie } from "../events-CsVF98U6.js";
21
+ import { d as Le } from "../function-C10DGppn.js";
22
+ import { c as Fe } from "../jss-DtnXPEnq.js";
23
+ import { a as ze, g as Ie } from "../layout-DpZo-I0y.js";
24
+ import { c as Ne } from "../math-BOBiC4TN.js";
25
+ import { p as Xe, l as Ye } from "../number-DwCxt_Ck.js";
26
26
  import "../ticker/index.js";
27
- import { TICK_ORDER as Ye, RESIZE_ORDER as Le } from "../order/index.js";
28
- import { D as ts } from "../Damped-GyAS-U-z.js";
29
- import { T as es } from "../Tweened-BWPx3jJR.js";
30
- import { WheelControls as ss, KeyboardControls as is, DragControls as rs, AutoplayControls as ns } from "../controls/index.js";
27
+ import { TICK_ORDER as ts, RESIZE_ORDER as ke } from "../order/index.js";
28
+ import { D as es } from "../Damped-GyAS-U-z.js";
29
+ import { T as ss } from "../Tweened-BWPx3jJR.js";
30
+ import { WheelControls as is, KeyboardControls as rs, DragControls as ns, AutoplayControls as hs } from "../controls/index.js";
31
31
  import { windowResizer as Ot } from "../window-resizer/index.js";
32
32
  import { scrollEntries as vt } from "../scroll-entries/index.js";
33
- import { cssUnitParser as $e } from "../css-unit-parser/index.js";
33
+ import { cssUnitParser as We } from "../css-unit-parser/index.js";
34
34
  import { CSSProperty as f } from "../css-property/index.js";
35
- import { device as hs } from "../device/index.js";
36
- import { elementResizer as he } from "../element-resizer/index.js";
37
- import { s as os } from "../gestures-CcXV6fCp.js";
38
- import { b as Ne } from "../dom-CVWzyXPH.js";
39
- import { ScrollSegmentElement as ls } from "../scroll-segment/index.js";
40
- var p, $t, g, oe, le, yt, $, et, Ct, xt, ie;
41
- class cs {
35
+ import { device as os } from "../device/index.js";
36
+ import { elementResizer as oe } from "../element-resizer/index.js";
37
+ import { s as ls } from "../gestures-CcXV6fCp.js";
38
+ import { b as qe } from "../dom-CVWzyXPH.js";
39
+ import { ScrollSegmentElement as cs } from "../scroll-segment/index.js";
40
+ var p, $t, g, le, ce, yt, $, et, Ct, xt, re;
41
+ class as {
42
42
  constructor(n, e, i) {
43
43
  s(this, xt);
44
44
  s(this, p);
45
45
  s(this, $t);
46
46
  s(this, g);
47
- s(this, oe, 0);
48
47
  s(this, le, 0);
48
+ s(this, ce, 0);
49
49
  s(this, yt, 0);
50
50
  s(this, $, 0);
51
51
  s(this, et, null);
@@ -62,10 +62,10 @@ class cs {
62
62
  return t(this, yt);
63
63
  }
64
64
  get width() {
65
- return t(this, oe);
65
+ return t(this, le);
66
66
  }
67
67
  get height() {
68
- return t(this, le);
68
+ return t(this, ce);
69
69
  }
70
70
  get position() {
71
71
  return t(this, $);
@@ -83,7 +83,7 @@ class cs {
83
83
  n ? (t(this, p).style.setProperty("--size", n + "px"), t(this, g).axisCSSProperty.current === "x" ? (t(this, p).style.width = n + "px", t(this, p).style.height = "") : (t(this, p).style.height = n + "px", t(this, p).style.width = "")) : (t(this, p).style.width = "", t(this, p).style.height = "", t(this, p).style.removeProperty("--size"));
84
84
  }
85
85
  resize() {
86
- h(this, oe, t(this, p).offsetWidth), h(this, le, t(this, p).offsetHeight), h(this, yt, t(this, g).vertical ? t(this, p).offsetHeight : t(this, p).offsetWidth), h(this, $, t(this, g).vertical ? we(t(this, p)) : Pe(t(this, p))), h(this, $, t(this, $) - t(this, g).contentPosition);
86
+ h(this, le, t(this, p).offsetWidth), h(this, ce, t(this, p).offsetHeight), h(this, yt, t(this, g).vertical ? t(this, p).offsetHeight : t(this, p).offsetWidth), h(this, $, t(this, g).vertical ? ze(t(this, p)) : Ie(t(this, p))), h(this, $, t(this, $) - t(this, g).contentPosition);
87
87
  }
88
88
  transform() {
89
89
  const n = t(this, g).shiftSectionPositionCSSProperty.current;
@@ -94,11 +94,11 @@ class cs {
94
94
  t(this, g).axisCSSProperty.current,
95
95
  e
96
96
  );
97
- const r = t(this, g).currentScrollValue + e, a = t(this, $) - t(this, g).viewportSize - i, b = t(this, $) + t(this, yt) + i, v = Qe(Fe(r, a, b), 3);
97
+ const r = t(this, g).currentScrollValue + e, a = t(this, $) - t(this, g).viewportSize - i, b = t(this, $) + t(this, yt) + i, v = Xe(Ne(r, a, b), 3);
98
98
  h(this, Ct, v * -1), t(this, g).vertical ? t(this, p).style.transform = `translate3d(0px, ${t(this, Ct)}px, 0px)` : t(this, p).style.transform = `translate3d(${t(this, Ct)}px, 0px, 0px)`;
99
99
  }
100
100
  setMark(n) {
101
- t(this, et) !== n && (t(this, et) && t(this, p).classList.remove(t(this, et)), n && t(this, p).classList.add(n), h(this, et, n), se(t(this, p), "scrollSectionMarkChange", {
101
+ t(this, et) !== n && (t(this, et) && t(this, p).classList.remove(t(this, et)), n && t(this, p).classList.add(n), h(this, et, n), ie(t(this, p), "scrollSectionMarkChange", {
102
102
  composed: !0,
103
103
  detail: {
104
104
  mark: t(this, et)
@@ -110,22 +110,22 @@ class cs {
110
110
  t(this, p).classList.toggle("middle", n);
111
111
  }
112
112
  setIndex(n) {
113
- l(this, xt, ie).call(this, "index", n);
113
+ c(this, xt, re).call(this, "index", n);
114
114
  }
115
115
  setCurrentIndex(n) {
116
- l(this, xt, ie).call(this, "current-index", n);
116
+ c(this, xt, re).call(this, "current-index", n);
117
117
  }
118
118
  setCurrentIndexArc(n) {
119
- l(this, xt, ie).call(this, "current-index-arc", n);
119
+ c(this, xt, re).call(this, "current-index-arc", n);
120
120
  }
121
121
  setCurrentIndexArcAbs(n) {
122
- l(this, xt, ie).call(this, "current-index-arc-abs", n);
122
+ c(this, xt, re).call(this, "current-index-arc-abs", n);
123
123
  }
124
124
  }
125
- p = new WeakMap(), $t = new WeakMap(), g = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), yt = new WeakMap(), $ = new WeakMap(), et = new WeakMap(), Ct = new WeakMap(), xt = new WeakSet(), ie = function(n, e) {
125
+ p = new WeakMap(), $t = new WeakMap(), g = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), yt = new WeakMap(), $ = new WeakMap(), et = new WeakMap(), Ct = new WeakMap(), xt = new WeakSet(), re = function(n, e) {
126
126
  e !== null ? (t(this, p).style.setProperty(`--${n}`, e.toString()), t(this, p).setAttribute(`data-${n}`, e.toString())) : (t(this, p).style.removeProperty(`--${n}`), t(this, p).removeAttribute(`data-${n}`));
127
127
  };
128
- const as = We({
128
+ const us = Fe({
129
129
  ":host": {
130
130
  position: "relative",
131
131
  width: "100%",
@@ -163,7 +163,7 @@ const as = We({
163
163
  flexShrink: "0"
164
164
  }
165
165
  });
166
- var u, Et, w, st, B, W, F, T, it, rt, N, nt, wt, D, C, Pt, Lt, zt, kt, Bt, A, It, ht, M, ot, q, At, lt, Mt, ct, at, ut, m, Wt, c, ce, ae, y, S, I, V, dt, R, E, P, Ft, U, G, K, _, Nt, ft, Z, qt, O, x, Ut, j, Tt, o, ze, re, Rt, ye, Ce, ke, Ie, L, ue, qe, Gt, de, Ae, Me, gt, Ue, Te, ne, fe;
166
+ var u, Et, w, st, B, W, F, T, it, rt, N, nt, wt, D, C, Pt, Lt, zt, It, Bt, A, kt, ht, M, ot, q, At, lt, Mt, ct, at, ut, m, Wt, l, ae, ue, y, S, k, V, dt, R, E, P, Ft, U, G, K, _, Nt, ft, Z, qt, O, x, Ut, j, Tt, Gt, o, Ae, ne, Rt, xe, Ee, Me, Te, L, de, Ue, Kt, fe, De, Ve, gt, Ge, pe, he, me;
167
167
  class Ht extends HTMLElement {
168
168
  constructor() {
169
169
  super();
@@ -204,14 +204,14 @@ class Ht extends HTMLElement {
204
204
  s(this, Pt, new f(this, "--damping", 20));
205
205
  s(this, Lt, new f(this, "--mass", 0));
206
206
  s(this, zt, new f(this, "--stiffness", 0));
207
- s(this, kt, new f(this, "--mouse-drag", !1));
207
+ s(this, It, new f(this, "--mouse-drag", !1));
208
208
  s(this, Bt, new f(
209
209
  this,
210
210
  "--section-distance-scale",
211
211
  0.5
212
212
  ));
213
213
  s(this, A, new f(this, "--autoplay", 0));
214
- s(this, It, new f(
214
+ s(this, kt, new f(
215
215
  this,
216
216
  "--autoplay-pause-duration",
217
217
  0
@@ -249,17 +249,17 @@ class Ht extends HTMLElement {
249
249
  s(this, ut, null);
250
250
  s(this, m, null);
251
251
  s(this, Wt, null);
252
- s(this, c, []);
253
- s(this, ce, 0);
252
+ s(this, l, []);
254
253
  s(this, ae, 0);
254
+ s(this, ue, 0);
255
255
  s(this, y, 0);
256
256
  s(this, S, 0);
257
- s(this, I, 0);
257
+ s(this, k, 0);
258
258
  s(this, V, null);
259
259
  s(this, dt, null);
260
260
  s(this, R, null);
261
261
  s(this, E, null);
262
- s(this, P, new je(0));
262
+ s(this, P, new Je(0));
263
263
  s(this, Ft, 0);
264
264
  s(this, U, 0);
265
265
  s(this, G, !1);
@@ -267,36 +267,41 @@ class Ht extends HTMLElement {
267
267
  s(this, _, !0);
268
268
  s(this, Nt);
269
269
  s(this, ft);
270
- s(this, Z, new es());
270
+ s(this, Z, new ss());
271
271
  s(this, qt, !1);
272
272
  s(this, O, null);
273
273
  s(this, x, !1);
274
274
  s(this, Ut, null);
275
275
  s(this, j, []);
276
276
  s(this, Tt, !1);
277
- s(this, L, () => {
277
+ s(this, Gt);
278
+ s(this, L, (e) => {
279
+ if (e && t(this, Tt)) {
280
+ h(this, Tt, !1);
281
+ return;
282
+ }
278
283
  this.resize();
279
284
  });
280
- s(this, ue, () => {
285
+ s(this, de, () => {
281
286
  if (!t(this, G) || t(this, _) || t(this, K))
282
287
  return;
283
288
  const e = this.currentScrollValue;
284
- if (h(this, Ft, Math.max(0, e - t(this, S))), t(this, c).length) {
285
- for (let i = 0; i < t(this, c).length; i++)
286
- t(this, c)[i].transform();
287
- t(this, P).current = l(this, o, ne).call(this);
289
+ if (h(this, Ft, Math.max(0, e - t(this, S))), t(this, l).length) {
290
+ for (let i = 0; i < t(this, l).length; i++)
291
+ t(this, l)[i].transform();
292
+ t(this, P).current = c(this, o, he).call(this);
288
293
  } else
289
294
  this.vertical ? t(this, m).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, m).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
290
- l(this, o, Ue).call(this), vt.update(
295
+ c(this, o, Ge).call(this), vt.update(
291
296
  this,
292
297
  t(this, w).current,
293
298
  e
294
299
  );
295
300
  });
296
- s(this, Gt, (e, i) => {
297
- t(this, Et).current && (l(this, o, Ae).call(this, Math.sign(i) || 1), t(this, de).call(this, e, i));
301
+ s(this, Kt, (e, i) => {
302
+ t(this, Et).current && (c(this, o, De).call(this, Math.sign(i) || 1), t(this, fe).call(this, e, i));
298
303
  });
299
- s(this, de, (e, i) => {
304
+ s(this, fe, (e, i) => {
300
305
  if (t(this, B).current) {
301
306
  if (t(this, B).current < 0 && i > 0)
302
307
  return;
@@ -304,24 +309,24 @@ class Ht extends HTMLElement {
304
309
  return;
305
310
  }
306
311
  if (t(this, ft) || t(this, Z).unlistenAnimationFrame(), !t(this, A).current && t(this, lt).current && (clearInterval(t(this, Nt)), h(this, Nt, setTimeout(() => {
307
- const r = t(this, c)[l(this, o, ne).call(this)];
312
+ const r = t(this, l)[c(this, o, he).call(this)];
308
313
  r && this.scrollToSection(r.index, {
309
314
  tween: {
310
315
  duration: t(this, Mt).current,
311
- easing: Je
316
+ easing: Qe
312
317
  }
313
318
  });
314
- }, t(this, lt).current))), !(e.includes("drag") && !hs.isTouch && !t(this, kt).current)) {
319
+ }, t(this, lt).current))), !(e.includes("drag") && !os.isTouch && !t(this, It).current)) {
315
320
  if (t(this, T).current && e !== "drag") {
316
321
  const r = Math.sign(i);
317
- if (t(this, c).length) {
322
+ if (t(this, l).length) {
318
323
  const a = {
319
324
  tween: t(this, it).current || t(this, rt).current ? {
320
325
  easing: t(this, it).current || "easeInOutCubic",
321
326
  duration: t(this, rt).current || 500
322
327
  } : void 0
323
328
  };
324
- t(this, qt) ? this.scrollToSection(l(this, o, ne).call(this, !0), a) : this.shiftSections(r, a);
329
+ t(this, qt) ? this.scrollToSection(c(this, o, he).call(this, !0), a) : this.shiftSections(r, a);
325
330
  } else
326
331
  t(this, u).shift(r * t(this, y));
327
332
  } else
@@ -329,15 +334,24 @@ class Ht extends HTMLElement {
329
334
  h(this, qt, e === "drag");
330
335
  }
331
336
  });
332
- s(this, fe, () => {
333
- h(this, x, !0), this.hibernatedCSSProperty.current || l(this, o, Ie).call(this);
337
+ s(this, pe, Le(() => {
338
+ const e = t(this, j).reduce((i, r) => {
339
+ const a = this.vertical ? r.width : r.height;
340
+ return a > i ? a : i;
341
+ }, 0);
342
+ clearTimeout(t(this, Gt)), h(this, Tt, !0), this.style.setProperty("--max-section-size", ""), h(this, Gt, setTimeout(() => {
343
+ h(this, Tt, !0), this.style.setProperty("--max-section-size", e + "px");
344
+ }, 10));
345
+ }, 20));
346
+ s(this, me, () => {
347
+ h(this, x, !0), this.hibernatedCSSProperty.current || c(this, o, Te).call(this);
334
348
  });
335
349
  if (H) {
336
350
  const e = this.attachShadow({ mode: "open" });
337
- e.adoptedStyleSheets = [as];
351
+ e.adoptedStyleSheets = [us];
338
352
  const i = document.createElement("div");
339
353
  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, m, document.createElement("div")), t(this, m).className = "content", h(this, Wt, document.createElement("slot")), t(this, m).appendChild(t(this, Wt)), t(this, ut).appendChild(t(this, m)), e.appendChild(t(this, ut)), h(this, Ut, new MutationObserver(
340
- Be(() => {
354
+ Le(() => {
341
355
  this.tryResplit();
342
356
  }, 10)
343
357
  ));
@@ -398,7 +412,7 @@ class Ht extends HTMLElement {
398
412
  return t(this, zt);
399
413
  }
400
414
  get mouseDragCSSProperty() {
401
- return t(this, kt);
415
+ return t(this, It);
402
416
  }
403
417
  get sectionDistanceScaleCSSProperty() {
404
418
  return t(this, Bt);
@@ -407,7 +421,7 @@ class Ht extends HTMLElement {
407
421
  return t(this, A);
408
422
  }
409
423
  get autoplayPauseDurationCSSProperty() {
410
- return t(this, It);
424
+ return t(this, kt);
411
425
  }
412
426
  get autoplayUserDirectionCSSProperty() {
413
427
  return t(this, ht);
@@ -437,10 +451,10 @@ class Ht extends HTMLElement {
437
451
  return t(this, at);
438
452
  }
439
453
  get currentScrollValue() {
440
- return l(this, o, Me).call(this, "current");
454
+ return c(this, o, Ve).call(this, "current");
441
455
  }
442
456
  get targetScrollValue() {
443
- return l(this, o, Me).call(this, "target");
457
+ return c(this, o, Ve).call(this, "target");
444
458
  }
445
459
  get contentWrapperElement() {
446
460
  return t(this, ut);
@@ -449,13 +463,13 @@ class Ht extends HTMLElement {
449
463
  return t(this, m);
450
464
  }
451
465
  get sections() {
452
- return t(this, c);
466
+ return t(this, l);
453
467
  }
454
468
  get position() {
455
- return t(this, ce);
469
+ return t(this, ae);
456
470
  }
457
471
  get contentPosition() {
458
- return t(this, ae);
472
+ return t(this, ue);
459
473
  }
460
474
  get viewportSize() {
461
475
  return t(this, y);
@@ -464,21 +478,21 @@ class Ht extends HTMLElement {
464
478
  return t(this, S);
465
479
  }
466
480
  get gap() {
467
- return t(this, I);
481
+ return t(this, k);
468
482
  }
469
483
  get counter() {
470
484
  return t(this, P);
471
485
  }
472
486
  get limit() {
473
487
  return Math.ceil(
474
- t(this, c).length - t(this, D).current
488
+ t(this, l).length - t(this, D).current
475
489
  );
476
490
  }
477
491
  get distance() {
478
492
  return t(this, U);
479
493
  }
480
494
  get loopDistance() {
481
- return t(this, C).current ? t(this, U) + t(this, I) : t(this, U);
495
+ return t(this, C).current ? t(this, U) + t(this, k) : t(this, U);
482
496
  }
483
497
  get hasOverflow() {
484
498
  return t(this, G);
@@ -505,7 +519,7 @@ class Ht extends HTMLElement {
505
519
  return t(this, w).current === "x" ? 0 : t(this, u).distance;
506
520
  }
507
521
  tryResplit() {
508
- !t(this, _) && (t(this, C).current || t(this, F).current || t(this, C).current || t(this, N).current || t(this, T).current) && l(this, o, re).call(this);
522
+ !t(this, _) && (t(this, C).current || t(this, F).current || t(this, C).current || t(this, N).current || t(this, T).current) && c(this, o, ne).call(this);
509
523
  }
510
524
  onScroll(...e) {
511
525
  return t(this, u).subscribe(...e);
@@ -526,20 +540,20 @@ class Ht extends HTMLElement {
526
540
  return this.currentProgress >= a && this.currentProgress <= b;
527
541
  }
528
542
  scrollToSection(e, i) {
529
- if (!t(this, c).length)
543
+ if (!t(this, l).length)
530
544
  return;
531
- const r = t(this, P).current, a = l(this, o, qe).call(this, e), b = t(this, c)[r], v = t(this, c)[a];
545
+ const r = t(this, P).current, a = c(this, o, Ue).call(this, e), b = t(this, l)[r], v = t(this, l)[a];
532
546
  if (b && v) {
533
- let k = 0;
534
- const xe = l(this, o, ne).call(this), Vt = t(this, c)[xe], ve = Vt ? this.targetScrollValue - Vt.position : 0;
535
- t(this, C).current ? a === 0 && r === t(this, c).length - 1 ? k = t(this, S) + t(this, y) - b.position + t(this, I) : a === t(this, c).length - 1 && r === 0 ? k = v.position - (t(this, S) + t(this, y) + t(this, I)) : k = v.position - b.position : k = v.position - b.position, this.shiftPosition(k - ve, i);
547
+ let I = 0;
548
+ const we = c(this, o, he).call(this), Vt = t(this, l)[we], Ce = Vt ? this.targetScrollValue - Vt.position : 0;
549
+ t(this, C).current ? a === 0 && r === t(this, l).length - 1 ? I = t(this, S) + t(this, y) - b.position + t(this, k) : a === t(this, l).length - 1 && r === 0 ? I = v.position - (t(this, S) + t(this, y) + t(this, k)) : I = v.position - b.position : I = v.position - b.position, this.shiftPosition(I - Ce, i);
536
550
  }
537
551
  }
538
552
  shiftSections(e, i) {
539
- t(this, c).length && this.scrollToSection(t(this, P).current + e, i);
553
+ t(this, l).length && this.scrollToSection(t(this, P).current + e, i);
540
554
  }
541
555
  setPosition(e, i) {
542
- l(this, o, Ae).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ft) || (t(this, Z).set(t(this, u).current, { equalize: !0 }), t(this, Z).set(e, He({}, i.tween)), h(this, ft, setTimeout(() => {
556
+ c(this, o, De).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ft) || (t(this, Z).set(t(this, u).current, { equalize: !0 }), t(this, Z).set(e, Be({}, i.tween)), h(this, ft, setTimeout(() => {
543
557
  h(this, ft, void 0);
544
558
  }, i.tween.duration || 0))) : t(this, u).set(e, {
545
559
  equalize: (i == null ? void 0 : i.behaviour) === "instant"
@@ -549,28 +563,24 @@ class Ht extends HTMLElement {
549
563
  this.setPosition(t(this, u).target + e, i);
550
564
  }
551
565
  resize() {
552
- if (t(this, Tt)) {
553
- h(this, Tt, !1);
554
- return;
555
- }
556
566
  if (t(this, at).current)
557
567
  return;
558
568
  t(this, u).unlistenAnimationFrame();
559
569
  const e = this.currentScrollValue / t(this, S) || 0, i = t(this, P).current;
560
- if (h(this, ce, this.vertical ? we(this) : Pe(this)), h(this, ae, this.vertical ? we(t(this, m)) : Pe(t(this, m))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, I, $e.parse(
570
+ if (h(this, ae, this.vertical ? ze(this) : Ie(this)), h(this, ue, this.vertical ? ze(t(this, m)) : Ie(t(this, m))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, k, We.parse(
561
571
  getComputedStyle(t(this, m)).rowGap
562
- )) : h(this, I, $e.parse(
572
+ )) : h(this, k, We.parse(
563
573
  getComputedStyle(t(this, m)).columnGap
564
- )), t(this, N).current && t(this, c).length) {
565
- const r = t(this, D).current, a = (t(this, y) - t(this, I) * (r - 1)) / r;
566
- t(this, c).forEach((b) => {
574
+ )), t(this, N).current && t(this, l).length) {
575
+ const r = t(this, D).current, a = (t(this, y) - t(this, k) * (r - 1)) / r;
576
+ t(this, l).forEach((b) => {
567
577
  b.setSize(a);
568
578
  });
569
579
  } else
570
- t(this, c).forEach((r) => {
580
+ t(this, l).forEach((r) => {
571
581
  r.setSize();
572
582
  });
573
- if (t(this, c).forEach((r) => {
583
+ if (t(this, l).forEach((r) => {
574
584
  r.resize();
575
585
  }), t(this, W).current) {
576
586
  h(this, S, t(this, y) * t(this, W).current);
@@ -582,13 +592,13 @@ class Ht extends HTMLElement {
582
592
  const r = getComputedStyle(this), a = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
583
593
  h(this, S, t(this, S) + a), t(this, u).max = t(this, S);
584
594
  }
585
- if (t(this, C).current && t(this, c).length) {
586
- const r = t(this, c)[t(this, c).length - 1], a = r.position + r.size - t(this, y), b = t(this, S) - a;
595
+ if (t(this, C).current && t(this, l).length) {
596
+ const r = t(this, l)[t(this, l).length - 1], a = r.position + r.size - t(this, y), b = t(this, S) - a;
587
597
  h(this, U, r.position + r.size + b);
588
598
  } else
589
599
  h(this, U, t(this, S));
590
- if (t(this, T).current && t(this, c).length) {
591
- const r = t(this, c)[i];
600
+ if (t(this, T).current && t(this, l).length) {
601
+ const r = t(this, l)[i];
592
602
  t(this, u).set(r.position, {
593
603
  equalize: !0
594
604
  });
@@ -596,26 +606,26 @@ class Ht extends HTMLElement {
596
606
  t(this, u).set(e * t(this, S), {
597
607
  equalize: !0
598
608
  });
599
- h(this, G, (this.vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, ct).current || l(this, o, Ce).call(this) : l(this, o, ye).call(this), l(this, o, Te).call(this), se(this, "scrollResize", { custom: !0 }), t(this, u).notify();
609
+ h(this, G, (this.vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, ct).current || c(this, o, Ee).call(this) : c(this, o, xe).call(this), t(this, pe).call(this), ie(this, "scrollResize", { custom: !0 }), t(this, u).notify();
600
610
  }
601
611
  connectedCallback() {
602
- vt.register(this), h(this, u, new ts(0, {
612
+ vt.register(this), h(this, u, new es(0, {
603
613
  damping: 0.01,
604
614
  min: 0,
605
- order: Ye.SCROLL
606
- })), this.setAttribute("tabindex", "0"), h(this, V, new ss({ element: t(this, m) })), t(this, V).changeEvent.subscribe(t(this, Gt)), h(this, dt, new is({
615
+ order: ts.SCROLL
616
+ })), this.setAttribute("tabindex", "0"), h(this, V, new is({ element: t(this, m) })), t(this, V).changeEvent.subscribe(t(this, Kt)), h(this, dt, new rs({
607
617
  element: this
608
618
  })), t(this, dt).changeEvent.subscribe(
609
- t(this, Gt)
610
- ), h(this, R, new rs({
619
+ t(this, Kt)
620
+ ), h(this, R, new ns({
611
621
  element: t(this, m),
612
622
  rootElement: this
613
- })), t(this, R).changeEvent.subscribe(t(this, Gt)), h(this, E, new ns({
623
+ })), t(this, R).changeEvent.subscribe(t(this, Kt)), h(this, E, new hs({
614
624
  culling: this
615
- })), t(this, E).changeEvent.subscribe(t(this, de)), t(this, w).subscribe(() => {
616
- l(this, o, ze).call(this);
625
+ })), t(this, E).changeEvent.subscribe(t(this, fe)), t(this, w).subscribe(() => {
626
+ c(this, o, Ae).call(this);
617
627
  }), t(this, st).subscribe(() => {
618
- l(this, o, ze).call(this);
628
+ c(this, o, Ae).call(this);
619
629
  }), t(this, nt).subscribe((e) => {
620
630
  t(this, V).axis = e.current ? "max" : t(this, w).current;
621
631
  }), t(this, wt).subscribe((e) => {
@@ -623,15 +633,15 @@ class Ht extends HTMLElement {
623
633
  }), t(this, W).subscribe(() => {
624
634
  t(this, x) && t(this, L).call(this);
625
635
  }), t(this, F).subscribe(({ current: e }) => {
626
- t(this, x) && (e ? l(this, o, re).call(this) : l(this, o, Rt).call(this));
636
+ t(this, x) && (e ? c(this, o, ne).call(this) : c(this, o, Rt).call(this));
627
637
  }), t(this, T).subscribe((e) => {
628
- t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, E).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, c).length ? l(this, o, re).call(this) : !e.current && e.previous && t(this, c).length && l(this, o, Rt).call(this));
638
+ t(this, V).debounce = e.current, t(this, R).swipe = e.current, t(this, E).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, l).length ? c(this, o, ne).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Rt).call(this));
629
639
  }), t(this, N).subscribe((e) => {
630
- t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, c).length ? l(this, o, re).call(this) : !e.current && e.previous && t(this, c).length && l(this, o, Rt).call(this));
640
+ t(this, x) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, ne).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Rt).call(this));
631
641
  }), t(this, D).subscribe((e) => {
632
- t(this, x) && (t(this, L).call(this), l(this, o, gt).call(this));
642
+ t(this, x) && (t(this, L).call(this), c(this, o, gt).call(this));
633
643
  }), t(this, C).subscribe((e) => {
634
- e.current ? (t(this, x) && (t(this, c).length || (t(this, F).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (h(this, Ft, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
644
+ e.current ? (t(this, x) && (t(this, l).length || (t(this, F).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (h(this, Ft, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
635
645
  }), t(this, Pt).subscribe((e) => {
636
646
  t(this, u).damping = e.current;
637
647
  }), t(this, Lt).subscribe((e) => {
@@ -643,86 +653,86 @@ class Ht extends HTMLElement {
643
653
  }), t(this, ht).subscribe((e) => {
644
654
  e.current || (t(this, E).direction = 1);
645
655
  }), t(this, M).subscribe((e) => {
646
- t(this, x) && l(this, o, gt).call(this);
656
+ t(this, x) && c(this, o, gt).call(this);
647
657
  }), t(this, ot).subscribe((e) => {
648
- t(this, x) && t(this, M).current && l(this, o, gt).call(this);
658
+ t(this, x) && t(this, M).current && c(this, o, gt).call(this);
649
659
  }), t(this, q).subscribe((e) => {
650
- t(this, x) && t(this, M).current && l(this, o, gt).call(this);
660
+ t(this, x) && t(this, M).current && c(this, o, gt).call(this);
651
661
  }), t(this, At).subscribe((e) => {
652
662
  t(this, x) && t(this, u).notify();
653
663
  }), t(this, u).isRunning.subscribe((e) => {
654
664
  this.classList.toggle("active", e.current);
655
665
  }), t(this, P).subscribe((e) => {
656
- t(this, c).length && l(this, o, gt).call(this), this.style.setProperty("--counter", e.current + "");
666
+ t(this, l).length && c(this, o, gt).call(this), this.style.setProperty("--counter", e.current + "");
657
667
  }), t(this, Z).subscribe((e) => {
658
668
  t(this, Z).isRunning.current && t(this, u).set(e.current, { equalize: !0 });
659
669
  }), t(this, ct).subscribe((e) => {
660
- e.current && !e.previous ? (this.classList.add("disabled"), l(this, o, ye).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), l(this, o, Ce).call(this));
670
+ e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, xe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, Ee).call(this));
661
671
  }), t(this, at).subscribe((e) => {
662
- e.current && !e.previous ? (this.classList.add("hibernated"), l(this, o, ke).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), l(this, o, Ie).call(this));
663
- }), t(this, Et).observe(), t(this, w).observe(), t(this, st).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, T).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, N).observe(), t(this, nt).observe(), t(this, wt).observe(), t(this, D).observe(), t(this, C).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, kt).observe(), t(this, Bt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, It).observe(), t(this, ht).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, q).observe(), t(this, At).observe(), t(this, lt).observe(), t(this, Mt).observe(), t(this, ct).observe(), t(this, at).observe(), Ot.subscribe(t(this, fe), Le.LAST), he.subscribe(this, t(this, L)), t(this, Ut).observe(this, { childList: !0 });
672
+ e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, Me).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, Te).call(this));
673
+ }), t(this, Et).observe(), t(this, w).observe(), t(this, st).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, T).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, N).observe(), t(this, nt).observe(), t(this, wt).observe(), t(this, D).observe(), t(this, C).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, It).observe(), t(this, Bt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, kt).observe(), t(this, ht).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, q).observe(), t(this, At).observe(), t(this, lt).observe(), t(this, Mt).observe(), t(this, ct).observe(), t(this, at).observe(), Ot.subscribe(t(this, me), ke.LAST), oe.subscribe(this, t(this, L)), t(this, Ut).observe(this, { childList: !0 });
664
674
  }
665
675
  disconnectedCallback() {
666
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, Et).unobserve(), t(this, w).unobserve(), t(this, st).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, T).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, N).unobserve(), t(this, nt).unobserve(), t(this, wt).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, kt).unobserve(), t(this, Bt).unobserve(), t(this, A).unobserve(), t(this, It).unobserve(), t(this, ht).unobserve(), t(this, M).unobserve(), t(this, ot).unobserve(), t(this, q).unobserve(), t(this, At).unobserve(), t(this, lt).unobserve(), t(this, Mt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), Ot.unsubscribe(t(this, fe)), he.unsubscribe(t(this, L)), l(this, o, ke).call(this), t(this, Ut).disconnect();
676
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, Et).unobserve(), t(this, w).unobserve(), t(this, st).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, T).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, N).unobserve(), t(this, nt).unobserve(), t(this, wt).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, It).unobserve(), t(this, Bt).unobserve(), t(this, A).unobserve(), t(this, kt).unobserve(), t(this, ht).unobserve(), t(this, M).unobserve(), t(this, ot).unobserve(), t(this, q).unobserve(), t(this, At).unobserve(), t(this, lt).unobserve(), t(this, Mt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), Ot.unsubscribe(t(this, me)), oe.unsubscribe(t(this, L)), c(this, o, Me).call(this), t(this, Ut).disconnect();
667
677
  }
668
678
  }
669
- u = new WeakMap(), Et = new WeakMap(), w = new WeakMap(), st = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), T = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), N = new WeakMap(), nt = new WeakMap(), wt = new WeakMap(), D = new WeakMap(), C = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), kt = new WeakMap(), Bt = new WeakMap(), A = new WeakMap(), It = new WeakMap(), ht = new WeakMap(), M = new WeakMap(), ot = new WeakMap(), q = new WeakMap(), At = new WeakMap(), lt = new WeakMap(), Mt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), m = new WeakMap(), Wt = new WeakMap(), c = new WeakMap(), ce = new WeakMap(), ae = new WeakMap(), y = new WeakMap(), S = new WeakMap(), I = new WeakMap(), V = new WeakMap(), dt = new WeakMap(), R = new WeakMap(), E = new WeakMap(), P = new WeakMap(), Ft = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), Nt = new WeakMap(), ft = new WeakMap(), Z = new WeakMap(), qt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), Ut = new WeakMap(), j = new WeakMap(), Tt = new WeakMap(), o = new WeakSet(), ze = function() {
679
+ u = new WeakMap(), Et = new WeakMap(), w = new WeakMap(), st = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), T = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), N = new WeakMap(), nt = new WeakMap(), wt = new WeakMap(), D = new WeakMap(), C = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), It = new WeakMap(), Bt = new WeakMap(), A = new WeakMap(), kt = new WeakMap(), ht = new WeakMap(), M = new WeakMap(), ot = new WeakMap(), q = new WeakMap(), At = new WeakMap(), lt = new WeakMap(), Mt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), m = new WeakMap(), Wt = new WeakMap(), l = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), y = new WeakMap(), S = new WeakMap(), k = new WeakMap(), V = new WeakMap(), dt = new WeakMap(), R = new WeakMap(), E = new WeakMap(), P = new WeakMap(), Ft = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), Nt = new WeakMap(), ft = new WeakMap(), Z = new WeakMap(), qt = new WeakMap(), O = new WeakMap(), x = new WeakMap(), Ut = new WeakMap(), j = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), o = new WeakSet(), Ae = function() {
670
680
  const e = t(this, w).current, i = t(this, st).current ? "-reverse" : "";
671
681
  t(this, m).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, nt).current ? "max" : e, t(this, dt).dimension = e === "x" ? "width" : "height", t(this, R).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, x) && t(this, L).call(this);
672
- }, re = function() {
673
- l(this, o, Rt).call(this), t(this, Wt).assignedElements().forEach((e, i) => {
674
- e instanceof HTMLElement && t(this, c).push(new cs(e, i, this));
675
- }), t(this, m).style.transform = "", this.style.setProperty("--sections", t(this, c).length.toString()), se(this, "scrollSectionsChange", {
682
+ }, ne = function() {
683
+ c(this, o, Rt).call(this), t(this, Wt).assignedElements().forEach((e, i) => {
684
+ e instanceof HTMLElement && t(this, l).push(new as(e, i, this));
685
+ }), t(this, m).style.transform = "", this.style.setProperty("--sections", t(this, l).length.toString()), ie(this, "scrollSectionsChange", {
676
686
  custom: !0,
677
687
  composed: !0
678
- }), t(this, L).call(this), l(this, o, gt).call(this);
688
+ }), t(this, L).call(this), c(this, o, gt).call(this);
679
689
  }, Rt = function() {
680
- t(this, c).forEach((e) => {
690
+ t(this, l).forEach((e) => {
681
691
  e.destroy();
682
- }), h(this, c, []), t(this, P).reset(), t(this, u).reset(), this.style.removeProperty("--max-section-size"), se(this, "scrollSectionsChange", {
692
+ }), h(this, l, []), t(this, P).reset(), t(this, u).reset(), this.style.removeProperty("--max-section-size"), ie(this, "scrollSectionsChange", {
683
693
  custom: !0,
684
694
  composed: !0
685
695
  });
686
- }, ye = function() {
687
- t(this, K) || (h(this, K, !0), t(this, u).unsubscribe(t(this, ue)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Nt)), clearInterval(t(this, ft)), t(this, Z).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, dt).disconnect(), t(this, R).disconnect(), t(this, E).disconnect(), t(this, G) || (this.sections.forEach((e) => {
696
+ }, xe = function() {
697
+ t(this, K) || (h(this, K, !0), t(this, u).unsubscribe(t(this, de)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Nt)), clearInterval(t(this, ft)), t(this, Z).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, dt).disconnect(), t(this, R).disconnect(), t(this, E).disconnect(), t(this, G) || (this.sections.forEach((e) => {
688
698
  e.unsetTransform();
689
699
  }), t(this, L).call(this)));
690
- }, Ce = function() {
691
- t(this, K) && (h(this, K, !1), t(this, u).subscribe(t(this, ue), -1e4), t(this, u).notify(), t(this, V).connect(), t(this, dt).connect(), t(this, R).connect(), t(this, A).current && t(this, E).connect());
692
- }, ke = function() {
693
- t(this, _) || (h(this, _, !0), Ot.unsubscribe(t(this, L)), l(this, o, ye).call(this), t(this, m).style.transform = "", t(this, m).style.height = "", t(this, m).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, c).length ? l(this, o, Rt).call(this) : (t(this, P).reset(), t(this, u).reset()), vt.unregister(this));
694
- }, Ie = function() {
695
- t(this, _) && (h(this, _, !1), vt.register(this), this.tryResplit(), l(this, o, Ce).call(this), Ot.subscribe(t(this, L), Le.SCROLL));
696
- }, L = new WeakMap(), ue = new WeakMap(), qe = function(e) {
700
+ }, Ee = function() {
701
+ t(this, K) && (h(this, K, !1), t(this, u).subscribe(t(this, de), -1e4), t(this, u).notify(), t(this, V).connect(), t(this, dt).connect(), t(this, R).connect(), t(this, A).current && t(this, E).connect());
702
+ }, Me = function() {
703
+ t(this, _) || (h(this, _, !0), clearTimeout(t(this, Gt)), Ot.unsubscribe(t(this, L)), c(this, o, xe).call(this), t(this, m).style.transform = "", t(this, m).style.height = "", t(this, m).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, Rt).call(this) : (t(this, P).reset(), t(this, u).reset()), vt.unregister(this));
704
+ }, Te = function() {
705
+ t(this, _) && (h(this, _, !1), vt.register(this), this.tryResplit(), c(this, o, Ee).call(this), Ot.subscribe(t(this, L), ke.SCROLL));
706
+ }, L = new WeakMap(), de = new WeakMap(), Ue = function(e) {
697
707
  let i = t(this, P).current;
698
- return t(this, C).current ? i = Xe(e, t(this, c).length) : i = Fe(e, 0, this.limit), i;
699
- }, Gt = new WeakMap(), de = new WeakMap(), Ae = function(e = 1) {
708
+ return t(this, C).current ? i = Ye(e, t(this, l).length) : i = Ne(e, 0, this.limit), i;
709
+ }, Kt = new WeakMap(), fe = new WeakMap(), De = function(e = 1) {
700
710
  t(this, ht).current && (t(this, E).direction = e), t(this, A).current && t(this, E).pauseAndContinue(
701
- t(this, It).current,
711
+ t(this, kt).current,
702
712
  this.sectionalCSSProperty.current
703
713
  );
704
- }, Me = function(e = "current") {
705
- if (t(this, C).current && t(this, c).length) {
706
- const i = t(this, u)[e] % Math.round(t(this, S) + t(this, y) + t(this, I));
707
- return i < 0 ? t(this, S) + i + t(this, y) + t(this, I) : i;
714
+ }, Ve = function(e = "current") {
715
+ if (t(this, C).current && t(this, l).length) {
716
+ const i = t(this, u)[e] % Math.round(t(this, S) + t(this, y) + t(this, k));
717
+ return i < 0 ? t(this, S) + i + t(this, y) + t(this, k) : i;
708
718
  } else
709
719
  return t(this, u)[e];
710
720
  }, gt = function() {
711
- if (t(this, c).length) {
721
+ if (t(this, l).length) {
712
722
  const e = t(this, P).current + t(this, ot).current;
713
- if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null), se(this, "scrollLine", {
723
+ if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null), ie(this, "scrollLine", {
714
724
  detail: { line: t(this, O) }
715
725
  }), t(this, M).current) {
716
726
  this.classList.remove("end", "start"), t(this, O) && this.classList.add(t(this, O));
717
727
  const i = t(this, D).current + t(this, q).current;
718
- h(this, j, []), t(this, c).forEach((r, a) => {
728
+ h(this, j, []), t(this, l).forEach((r, a) => {
719
729
  r.setCurrentIndex(null), r.setCurrentIndexArc(null), r.setCurrentIndexArcAbs(null), r.setMiddle(!1);
720
- const b = e - this.limit - 1 + t(this, q).current, v = e + i, k = this.sections.length - v;
721
- a >= e && a < v || a <= b ? (r.setMark("current"), t(this, j).push(r)) : a >= v && a < v + k / 2 || a <= b + i ? r.setMark("next") : r.setMark("previous");
722
- }), l(this, o, Te).call(this);
730
+ const b = e - this.limit - 1 + t(this, q).current, v = e + i, I = this.sections.length - v;
731
+ a >= e && a < v || a <= b ? (r.setMark("current"), t(this, j).push(r)) : a >= v && a < v + I / 2 || a <= b + i ? r.setMark("next") : r.setMark("previous");
732
+ }), t(this, pe).call(this);
723
733
  }
724
734
  }
725
- }, Ue = function() {
735
+ }, Ge = function() {
726
736
  if (t(this, M).current) {
727
737
  const e = Math.floor(t(this, j).length / 2);
728
738
  t(this, j).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, j).forEach((i, r) => {
@@ -730,68 +740,60 @@ u = new WeakMap(), Et = new WeakMap(), w = new WeakMap(), st = new WeakMap(), B
730
740
  i.setCurrentIndex(r), i.setCurrentIndexArc(a), i.setCurrentIndexArcAbs(Math.abs(a)), i.setMiddle(r === e);
731
741
  });
732
742
  }
733
- }, Te = function() {
734
- const e = t(this, j).reduce((i, r) => {
735
- const a = this.vertical ? r.width : r.height;
736
- return a > i ? a : i;
737
- }, 0);
738
- h(this, Tt, !0), this.style.setProperty("--max-section-size", ""), setTimeout(() => {
739
- h(this, Tt, !0), this.style.setProperty("--max-section-size", e + "px");
740
- }, 10);
741
- }, ne = function(e = !1) {
743
+ }, pe = new WeakMap(), he = function(e = !1) {
742
744
  let i = this.targetScrollValue, r = 1 / 0, a = 0;
743
745
  const b = t(this, u).direction;
744
- for (let v = 0; v < t(this, c).length; v++) {
745
- const k = t(this, c)[v];
746
- let xe = t(this, qt) ? k.size * b * -1 * 0.4 : 0, Vt = k.position;
746
+ for (let v = 0; v < t(this, l).length; v++) {
747
+ const I = t(this, l)[v];
748
+ let we = t(this, qt) ? I.size * b * -1 * 0.4 : 0, Vt = I.position;
747
749
  this.overscroll && Vt === 0 && e && (Vt = t(this, U));
748
- let ve = Math.abs(Vt + xe - i);
749
- ve <= r && (r = ve, a = v);
750
+ let Ce = Math.abs(Vt + we - i);
751
+ Ce <= r && (r = Ce, a = v);
750
752
  }
751
753
  return a;
752
- }, fe = new WeakMap();
754
+ }, me = new WeakMap();
753
755
  H && !customElements.get("e-scroll") && customElements.define("e-scroll", Ht);
754
- var pe;
755
- class De extends HTMLElement {
756
+ var be;
757
+ class Re extends HTMLElement {
756
758
  constructor() {
757
759
  super(...arguments);
758
- s(this, pe, null);
760
+ s(this, be, null);
759
761
  }
760
762
  get scrollElement() {
761
- return t(this, pe);
763
+ return t(this, be);
762
764
  }
763
765
  connectedCallback() {
764
- const e = Ne(this, Ht);
765
- e instanceof Ht ? h(this, pe, e) : console.error(this, "e-scroll not found");
766
+ const e = qe(this, Ht);
767
+ e instanceof Ht ? h(this, be, e) : console.error(this, "e-scroll not found");
766
768
  }
767
769
  }
768
- pe = new WeakMap();
769
- var pt, z, J, Q, Kt, _t, mt, Zt, me, be;
770
- class us extends De {
770
+ be = new WeakMap();
771
+ var pt, z, J, Q, _t, Zt, mt, jt, Se, ge;
772
+ class ds extends Re {
771
773
  constructor() {
772
774
  super();
773
775
  s(this, pt, null);
774
776
  s(this, z, null);
775
777
  s(this, J, !1);
776
778
  s(this, Q, 0);
777
- s(this, Kt, 0);
778
779
  s(this, _t, 0);
780
+ s(this, Zt, 0);
779
781
  s(this, mt, () => {
780
782
  h(this, J, this.offsetWidth > this.offsetHeight);
781
783
  const e = t(this, J) ? this.offsetWidth : this.offsetHeight;
782
- h(this, Q, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, Q, Math.max(t(this, Q), 30)), t(this, J) ? (t(this, z).style.width = t(this, Q) + "px", t(this, z).style.height = "100%") : (t(this, z).style.width = "100%", t(this, z).style.height = t(this, Q) + "px"), h(this, Kt, e - t(this, Q)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Zt).call(this);
784
+ h(this, Q, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, Q, Math.max(t(this, Q), 30)), t(this, J) ? (t(this, z).style.width = t(this, Q) + "px", t(this, z).style.height = "100%") : (t(this, z).style.width = "100%", t(this, z).style.height = t(this, Q) + "px"), h(this, _t, e - t(this, Q)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, jt).call(this);
783
785
  });
784
- s(this, Zt, () => {
785
- h(this, _t, this.scrollElement.currentProgress * t(this, Kt)), t(this, J) ? t(this, z).style.transform = `translate3d(${t(this, _t)}px, 0px, 0px)` : t(this, z).style.transform = `translate3d(0px, ${t(this, _t)}px, 0px)`;
786
+ s(this, jt, () => {
787
+ h(this, Zt, this.scrollElement.currentProgress * t(this, _t)), t(this, J) ? t(this, z).style.transform = `translate3d(${t(this, Zt)}px, 0px, 0px)` : t(this, z).style.transform = `translate3d(0px, ${t(this, Zt)}px, 0px)`;
786
788
  });
787
- s(this, me, () => {
789
+ s(this, Se, () => {
788
790
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
789
791
  });
790
- s(this, be, (e) => {
791
- document.documentElement.classList.add("grabbing"), os(
792
+ s(this, ge, (e) => {
793
+ document.documentElement.classList.add("grabbing"), ls(
792
794
  (a) => {
793
- const b = t(this, J) ? a.x : a.y, v = this.scrollElement.distance / t(this, Kt), k = (b - r) * v;
794
- this.scrollElement.setPosition(i + k);
795
+ const b = t(this, J) ? a.x : a.y, v = this.scrollElement.distance / t(this, _t), I = (b - r) * v;
796
+ this.scrollElement.setPosition(i + I);
795
797
  },
796
798
  () => {
797
799
  document.documentElement.classList.remove("grabbing");
@@ -802,7 +804,7 @@ class us extends De {
802
804
  if (H) {
803
805
  const e = this.attachShadow({ mode: "open" });
804
806
  e.adoptedStyleSheets = [
805
- We({
807
+ Fe({
806
808
  ":host": {
807
809
  display: "inline-block",
808
810
  zIndex: "1",
@@ -840,27 +842,27 @@ class us extends De {
840
842
  connectedCallback() {
841
843
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
842
844
  const e = t(this, pt).assignedElements()[0] || t(this, pt).firstElementChild;
843
- h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, be)), Ot.subscribe(t(this, mt), Le.SCROLL), he.subscribe(this, t(this, mt)), he.subscribe(this.scrollElement, t(this, mt)), this.scrollElement.onScroll(t(this, Zt)), this.scrollElement.axisCSSProperty.subscribe(t(this, me));
845
+ h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, ge)), Ot.subscribe(t(this, mt), ke.SCROLL), oe.subscribe(this, t(this, mt)), oe.subscribe(this.scrollElement, t(this, mt)), this.scrollElement.onScroll(t(this, jt)), this.scrollElement.axisCSSProperty.subscribe(t(this, Se));
844
846
  }
845
847
  disconnectedCallback() {
846
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, be)), Ot.unsubscribe(t(this, mt)), he.unsubscribe(t(this, mt)), this.scrollElement.offScroll(t(this, Zt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, me));
848
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, ge)), Ot.unsubscribe(t(this, mt)), oe.unsubscribe(t(this, mt)), this.scrollElement.offScroll(t(this, jt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Se));
847
849
  }
848
850
  }
849
- pt = new WeakMap(), z = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), Kt = new WeakMap(), _t = new WeakMap(), mt = new WeakMap(), Zt = new WeakMap(), me = new WeakMap(), be = new WeakMap();
850
- H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", us);
851
- var jt, Jt, Qt;
852
- class Ge extends De {
851
+ pt = new WeakMap(), z = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), _t = new WeakMap(), Zt = new WeakMap(), mt = new WeakMap(), jt = new WeakMap(), Se = new WeakMap(), ge = new WeakMap();
852
+ H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", ds);
853
+ var Jt, Qt, Xt;
854
+ class Ke extends Re {
853
855
  constructor() {
854
856
  super();
855
- s(this, jt, new f(this, "--behaviour", "smooth"));
856
- s(this, Jt, new f(
857
+ s(this, Jt, new f(this, "--behaviour", "smooth"));
858
+ s(this, Qt, new f(
857
859
  this,
858
860
  "--tween-easing",
859
861
  !1
860
862
  ));
861
- s(this, Qt, new f(this, "--tween-duration", 0));
863
+ s(this, Xt, new f(this, "--tween-duration", 0));
862
864
  H && this.addEventListener("click", () => {
863
- const e = t(this, jt).current, i = t(this, Jt).current, r = t(this, Qt).current;
865
+ const e = t(this, Jt).current, i = t(this, Qt).current, r = t(this, Xt).current;
864
866
  this.handleClick({
865
867
  behaviour: e,
866
868
  tween: i || r ? { easing: i, duration: r } : void 0
@@ -868,37 +870,37 @@ class Ge extends De {
868
870
  });
869
871
  }
870
872
  connectedCallback() {
871
- super.connectedCallback(), t(this, jt).observe(), t(this, Jt).observe(), t(this, Qt).observe();
873
+ super.connectedCallback(), t(this, Jt).observe(), t(this, Qt).observe(), t(this, Xt).observe();
872
874
  }
873
875
  disconnectedCallback() {
874
- t(this, jt).close(), t(this, Jt).close(), t(this, Qt).close();
876
+ t(this, Jt).close(), t(this, Qt).close(), t(this, Xt).close();
875
877
  }
876
878
  }
877
- jt = new WeakMap(), Jt = new WeakMap(), Qt = new WeakMap();
878
- var Xt;
879
- class ds extends Ge {
879
+ Jt = new WeakMap(), Qt = new WeakMap(), Xt = new WeakMap();
880
+ var Yt;
881
+ class fs extends Ke {
880
882
  constructor() {
881
883
  super(...arguments);
882
- s(this, Xt, new f(this, "--set", 1));
884
+ s(this, Yt, new f(this, "--set", 1));
883
885
  }
884
886
  handleClick(e) {
885
- this.scrollElement.scrollToSection(t(this, Xt).current, e);
887
+ this.scrollElement.scrollToSection(t(this, Yt).current, e);
886
888
  }
887
889
  connectedCallback() {
888
- super.connectedCallback(), t(this, Xt).observe();
890
+ super.connectedCallback(), t(this, Yt).observe();
889
891
  }
890
892
  disconnectedCallback() {
891
- super.disconnectedCallback(), t(this, Xt).close();
893
+ super.disconnectedCallback(), t(this, Yt).close();
892
894
  }
893
895
  }
894
- Xt = new WeakMap();
895
- H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ds);
896
- var X, Yt;
897
- class fs extends Ge {
896
+ Yt = new WeakMap();
897
+ H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", fs);
898
+ var X, te;
899
+ class ps extends Ke {
898
900
  constructor() {
899
901
  super(...arguments);
900
902
  s(this, X, new f(this, "--step", 1));
901
- s(this, Yt, () => {
903
+ s(this, te, () => {
902
904
  this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, X).current > 0 && this.scrollElement.scrollLine === "end" || t(this, X).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
903
905
  });
904
906
  }
@@ -907,58 +909,58 @@ class fs extends Ge {
907
909
  }
908
910
  connectedCallback() {
909
911
  super.connectedCallback(), this.scrollElement && (t(this, X).subscribe(() => {
910
- t(this, Yt).call(this);
912
+ t(this, te).call(this);
911
913
  }), t(this, X).observe(), this.scrollElement.addEventListener(
912
914
  "scrollLine",
913
- t(this, Yt)
914
- ), t(this, Yt).call(this));
915
+ t(this, te)
916
+ ), t(this, te).call(this));
915
917
  }
916
918
  disconnectedCallback() {
917
919
  super.disconnectedCallback(), t(this, X).close(), this.removeAttribute("disabled");
918
920
  }
919
921
  }
920
- X = new WeakMap(), Yt = new WeakMap();
921
- H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", fs);
922
- var Y, bt, te, Se, ge, ee;
923
- class ps {
922
+ X = new WeakMap(), te = new WeakMap();
923
+ H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ps);
924
+ var Y, bt, ee, ve, ye, se;
925
+ class ms {
924
926
  constructor(n, e, i) {
925
927
  s(this, Y, null);
926
928
  s(this, bt, null);
927
- s(this, te, null);
928
- s(this, Se, null);
929
- s(this, ge, () => {
930
- t(this, bt).scrollToSection(t(this, te), {
931
- behaviour: t(this, Se)
929
+ s(this, ee, null);
930
+ s(this, ve, null);
931
+ s(this, ye, () => {
932
+ t(this, bt).scrollToSection(t(this, ee), {
933
+ behaviour: t(this, ve)
932
934
  });
933
935
  });
934
- s(this, ee, () => {
936
+ s(this, se, () => {
935
937
  t(this, Y).classList.toggle(
936
938
  "current",
937
- t(this, bt).counter.current === t(this, te)
939
+ t(this, bt).counter.current === t(this, ee)
938
940
  );
939
941
  });
940
- H && (h(this, Y, document.createElement("button")), h(this, bt, n), h(this, Se, i), h(this, te, e), t(this, Y).addEventListener("click", t(this, ge)), t(this, bt).counter.subscribe(t(this, ee)), t(this, ee).call(this));
942
+ H && (h(this, Y, document.createElement("button")), h(this, bt, n), h(this, ve, i), h(this, ee, e), t(this, Y).addEventListener("click", t(this, ye)), t(this, bt).counter.subscribe(t(this, se)), t(this, se).call(this));
941
943
  }
942
944
  get element() {
943
945
  return t(this, Y);
944
946
  }
945
947
  destroy() {
946
- t(this, Y).removeEventListener("click", t(this, ge)), t(this, bt).counter.unsubscribe(t(this, ee)), t(this, Y).remove();
948
+ t(this, Y).removeEventListener("click", t(this, ye)), t(this, bt).counter.unsubscribe(t(this, se)), t(this, Y).remove();
947
949
  }
948
950
  }
949
- Y = new WeakMap(), bt = new WeakMap(), te = new WeakMap(), Se = new WeakMap(), ge = new WeakMap(), ee = new WeakMap();
951
+ Y = new WeakMap(), bt = new WeakMap(), ee = new WeakMap(), ve = new WeakMap(), ye = new WeakMap(), se = new WeakMap();
950
952
  var Dt, St, tt;
951
- class ms extends De {
953
+ class bs extends Re {
952
954
  constructor() {
953
955
  super(...arguments);
954
956
  s(this, Dt, null);
955
957
  s(this, St, []);
956
- s(this, tt, Be(() => {
958
+ s(this, tt, Le(() => {
957
959
  t(this, St).forEach((i) => i.destroy()), h(this, St, []);
958
960
  let e = 0;
959
961
  this.scrollElement.loopCSSProperty.current ? e = this.scrollElement.sections.length : e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
960
962
  for (let i = 0; i < e; i++) {
961
- const r = new ps(
963
+ const r = new ms(
962
964
  this.scrollElement,
963
965
  i,
964
966
  this.getAttribute("behaviour") || "smooth"
@@ -985,10 +987,10 @@ class ms extends De {
985
987
  }
986
988
  }
987
989
  Dt = new WeakMap(), St = new WeakMap(), tt = new WeakMap();
988
- H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", ms);
989
- class bs extends ls {
990
+ H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", bs);
991
+ class Ss extends cs {
990
992
  connectedCallback() {
991
- const n = Ne(this, Ht);
993
+ const n = qe(this, Ht);
992
994
  n instanceof Ht ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
993
995
  "scrollSectionsChange",
994
996
  this.findAnotherScrollEntries
@@ -1001,12 +1003,12 @@ class bs extends ls {
1001
1003
  ), this.scrollContainer.removeEventListener("scrollResize", this.resize));
1002
1004
  }
1003
1005
  }
1004
- H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", bs);
1006
+ H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", Ss);
1005
1007
  export {
1006
- ms as ScrollBulletButtonsElement,
1008
+ bs as ScrollBulletButtonsElement,
1007
1009
  Ht as ScrollElement,
1008
- bs as ScrollSegmentElement,
1009
- ds as ScrollSetButtonElement,
1010
- fs as ScrollStepButtonElement,
1011
- us as ScrollbarElement
1010
+ Ss as ScrollSegmentElement,
1011
+ fs as ScrollSetButtonElement,
1012
+ ps as ScrollStepButtonElement,
1013
+ ds as ScrollbarElement
1012
1014
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.53.0",
3
+ "version": "0.53.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"