aptechka 0.50.7 → 0.50.8

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.
@@ -73,6 +73,7 @@ export declare class ScrollElement extends HTMLElement {
73
73
  get targetProgress(): number;
74
74
  get scrollWidth(): number;
75
75
  get scrollHeight(): number;
76
+ tryResplit(): void;
76
77
  onScroll(...parameters: Parameters<Damped['subscribe']>): () => void;
77
78
  offScroll(...parameters: Parameters<Damped['unsubscribe']>): void;
78
79
  range(from: number, distance: number, margin?: number): number;
@@ -1 +1 @@
1
- "use strict";var _e=Object.defineProperty;var Pe=Object.getOwnPropertySymbols;var He=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var xe=u=>{throw TypeError(u)};var Ee=(u,h,e)=>h in u?_e(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,Le=(u,h)=>{for(var e in h||(h={}))He.call(h,e)&&Ee(u,e,h[e]);if(Pe)for(var e of Pe(h))We.call(h,e)&&Ee(u,e,h[e]);return u};var fe=(u,h,e)=>h.has(u)||xe("Cannot "+e);var t=(u,h,e)=>(fe(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?xe("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),n=(u,h,e,i)=>(fe(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(fe(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("../Store-DRp_K37w.cjs"),_=require("../index-Cqw2NKev.cjs"),$e=require("../easings-GegIwET5.cjs"),ue=require("../events-KVanG9sR.cjs"),ke=require("../jss-BXAMRO12.cjs"),Rt=require("../layout-Ctc2p3uz.cjs"),Ie=require("../math-GDWEqu7y.cjs"),Ne=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ae=require("../order/index.cjs"),Ue=require("../Damped-DbaLw6w1.cjs"),Ge=require("../Tweened-Dm6Avip9.cjs"),ce=require("../controls/index.cjs"),Tt=require("../window-resizer/index.cjs"),mt=require("../scroll-entries/index.cjs"),ze=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ze=require("../device/index.cjs"),Xt=require("../element-resizer/index.cjs"),je=require("../gestures-DHLrn6Q8.cjs"),Re=require("../dom-JBOkFLTh.cjs"),Ke=require("../function-MthRj-GJ.cjs"),Je=require("../scroll-segment/index.cjs");var f,Yt,g,gt,H,X;class Qe{constructor(h,e,i){s(this,f);s(this,Yt);s(this,g);s(this,gt,0);s(this,H,0);s(this,X,null);n(this,f,h),n(this,Yt,e),n(this,g,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,Yt)}get size(){return t(this,gt)}get position(){return t(this,H)}destroy(){mt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){n(this,gt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),n(this,H,t(this,g).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),n(this,H,t(this,H)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,H)+t(this,gt)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),mt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,r=t(this,H)-t(this,g).viewportSize-e,d=t(this,H)+t(this,gt)+e,b=Ie.clamp(i,r,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,X)!==h&&(t(this,X)&&t(this,f).classList.remove(t(this,X)),h&&t(this,f).classList.add(h),n(this,X,h),ue.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,X)},custom:!0}))}}f=new WeakMap,Yt=new WeakMap,g=new WeakMap,gt=new WeakMap,H=new WeakMap,X=new WeakMap;const Xe=ke.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,yt,x,Y,W,F,q,R,tt,et,D,st,vt,A,y,Ct,wt,Pt,Et,qt,T,xt,it,M,rt,$,nt,Lt,ht,ot,lt,p,Dt,l,te,ee,v,m,k,O,ct,B,w,P,At,ut,N,U,G,Mt,at,Z,Ot,V,E,Bt,o,me,kt,It,de,Se,ge,ye,L,Vt,Te,_t,se,ve,Ce,ft,pe,ie;class Jt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,yt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,Y,new S.CSSProperty(this,"--reverse",!1));s(this,W,new S.CSSProperty(this,"--direction",0));s(this,F,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,q,new S.CSSProperty(this,"--split",!1));s(this,R,new S.CSSProperty(this,"--sectional",!1));s(this,tt,new S.CSSProperty(this,"--tween-easing",!1));s(this,et,new S.CSSProperty(this,"--tween-duration",!1));s(this,D,new S.CSSProperty(this,"--auto-size",!1));s(this,st,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,vt,new S.CSSProperty(this,"--drag-inertion",1));s(this,A,new S.CSSProperty(this,"--sections-in-view",1));s(this,y,new S.CSSProperty(this,"--loop",!1));s(this,Ct,new S.CSSProperty(this,"--damping",20));s(this,wt,new S.CSSProperty(this,"--mass",0));s(this,Pt,new S.CSSProperty(this,"--stiffness",0));s(this,Et,new S.CSSProperty(this,"--mouse-drag",!1));s(this,qt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,T,new S.CSSProperty(this,"--autoplay",0));s(this,xt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,it,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,M,new S.CSSProperty(this,"--classes",!1));s(this,rt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,nt,new S.CSSProperty(this,"--focus-delay",0));s(this,Lt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ht,new S.CSSProperty(this,"--disabled",!1));s(this,ot,new S.CSSProperty(this,"--hibernate",!1));s(this,lt,null);s(this,p,null);s(this,Dt,null);s(this,l,[]);s(this,te,0);s(this,ee,0);s(this,v,0);s(this,m,0);s(this,k,0);s(this,O,null);s(this,ct,null);s(this,B,null);s(this,w,null);s(this,P,new Fe.Store(0));s(this,At,0);s(this,ut,0);s(this,N,!1);s(this,U,!0);s(this,G,!0);s(this,Mt);s(this,at);s(this,Z,new Ge.Tweened);s(this,Ot,!1);s(this,V,null);s(this,E,!1);s(this,Bt,null);s(this,L,()=>{if(t(this,ot).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(n(this,te,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),n(this,ee,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),n(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,D).current&&t(this,l).length){const r=t(this,A).current,d=(t(this,v)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,F).current){n(this,m,t(this,v)*t(this,F).current);const r=t(this,m)+t(this,v);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",n(this,m,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",n(this,m,t(this,p).offsetWidth-t(this,v)));if(!t(this,y).current){const r=getComputedStyle(this),d=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);n(this,m,t(this,m)+d),t(this,a).max=t(this,m)}if(t(this,y).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],d=r.position+r.size-t(this,v),b=t(this,m)-d;n(this,ut,r.position+r.size+b)}else n(this,ut,t(this,m));if(t(this,R).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});n(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,ht).current||c(this,o,Se).call(this):c(this,o,de).call(this),t(this,Vt).call(this)});s(this,Vt,()=>{if(!t(this,N)||t(this,G)||t(this,U))return;const e=this.currentScrollValue;if(n(this,At,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,P).current=c(this,o,pe).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;mt.scrollEntries.update(this,t(this,x).current,e)});s(this,_t,(e,i)=>{t(this,yt).current&&(c(this,o,ve).call(this,Math.sign(i)||1),t(this,se).call(this,e,i))});s(this,se,(e,i)=>{if(t(this,W).current){if(t(this,W).current<0&&i>0)return;if(t(this,W).current>0&&i<0)return}if(t(this,at)||t(this,Z).unlistenAnimationFrame(),!t(this,T).current&&t(this,nt).current&&(clearInterval(t(this,Mt)),n(this,Mt,setTimeout(()=>{const r=t(this,l)[c(this,o,pe).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Lt).current,easing:$e.easeInOutExpo}})},t(this,nt).current))),!(e.includes("drag")&&!Ze.device.isTouch&&!t(this,Et).current)){if(t(this,R).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const d={tween:t(this,tt).current||t(this,et).current?{easing:t(this,tt).current||"easeInOutCubic",duration:t(this,et).current||500}:void 0};t(this,Ot)?this.scrollToSection(t(this,P).current,d):this.shiftSections(r,d)}else t(this,a).shift(r*t(this,v))}else t(this,a).shift(i);n(this,Ot,e==="drag")}});s(this,ie,()=>{n(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ye).call(this)});if(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Xe];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),n(this,lt,document.createElement("div")),t(this,lt).className="content-wrapper",n(this,p,document.createElement("div")),t(this,p).className="content",n(this,Dt,document.createElement("slot")),t(this,p).appendChild(t(this,Dt)),t(this,lt).appendChild(t(this,p)),e.appendChild(t(this,lt)),n(this,Bt,new MutationObserver(r=>{!t(this,G)&&(t(this,y).current||t(this,q).current||t(this,y).current||t(this,D).current||t(this,R).current)&&c(this,o,kt).call(this)}))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,yt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,Y)}get directionCSSProperty(){return t(this,W)}get pagesCSSProperty(){return t(this,F)}get splitCSSProperty(){return t(this,q)}get sectionalCSSProperty(){return t(this,R)}get easingCSSProperty(){return t(this,tt)}get durationCSSProperty(){return t(this,et)}get autoSizeCSSProperty(){return t(this,D)}get wheelMaxDeltaCSSProperty(){return t(this,st)}get dragInertionCSSProperty(){return t(this,vt)}get sectionsInViewCSSProperty(){return t(this,A)}get loopCSSProperty(){return t(this,y)}get dampingCSSProperty(){return t(this,Ct)}get massCSSProperty(){return t(this,wt)}get stiffnessCSSProperty(){return t(this,Pt)}get mouseDragCSSProperty(){return t(this,Et)}get sectionDistanceScaleCSSProperty(){return t(this,qt)}get autoplayCSSProperty(){return t(this,T)}get autoplayPauseDurationCSSProperty(){return t(this,xt)}get autoplayUserDirectionCSSProperty(){return t(this,it)}get classesCSSProperty(){return t(this,M)}get currentIndexStartOffsetCSSProperty(){return t(this,rt)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,nt)}get focusDurationCSSProperty(){return t(this,Lt)}get disabledCSSProperty(){return t(this,ht)}get hibernatedCSSProperty(){return t(this,ot)}get currentScrollValue(){return c(this,o,Ce).call(this,"current")}get targetScrollValue(){return c(this,o,Ce).call(this,"target")}get contentWrapperElement(){return t(this,lt)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,te)}get contentPosition(){return t(this,ee)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,A).current)}get distance(){return t(this,ut)}get loopDistance(){return t(this,y).current?t(this,ut)+t(this,k):t(this,ut)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,At)}get scrollLine(){return t(this,V)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,P).current,d=c(this,o,Te).call(this,e),b=t(this,l)[r],C=t(this,l)[d];if(b&&C){let I=0;const be=c(this,o,pe).call(this),Qt=t(this,l)[be],Ve=Qt?this.targetScrollValue-Qt.position:0;t(this,y).current?d===0&&r===t(this,l).length-1?I=t(this,m)+t(this,v)-b.position+t(this,k):d===t(this,l).length-1&&r===0?I=C.position-(t(this,m)+t(this,v)+t(this,k)):I=C.position-b.position:I=C.position-b.position,this.shiftPosition(I-Ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){c(this,o,ve).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,Z).set(t(this,a).current,{equalize:!0}),t(this,Z).set(e,Le({},i.tween)),n(this,at,setTimeout(()=>{n(this,at,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){mt.scrollEntries.register(this),n(this,a,new Ue.Damped(0,{damping:.01,min:0,order:ae.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),n(this,O,new ce.WheelControls({element:t(this,p)})),t(this,O).changeEvent.subscribe(t(this,_t)),n(this,ct,new ce.KeyboardControls({element:this})),t(this,ct).changeEvent.subscribe(t(this,_t)),n(this,B,new ce.DragControls({element:t(this,p)})),t(this,B).changeEvent.subscribe(t(this,_t)),n(this,w,new ce.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,se)),t(this,x).subscribe(()=>{c(this,o,me).call(this)}),t(this,Y).subscribe(()=>{c(this,o,me).call(this)}),t(this,st).subscribe(e=>{t(this,O).axis=e.current?"max":t(this,x).current}),t(this,vt).subscribe(e=>{t(this,B).inertion=typeof e.current=="number"?e.current:1}),t(this,F).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,q).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,kt).call(this):c(this,o,It).call(this))}),t(this,R).subscribe(e=>{t(this,O).debounce=e.current,t(this,B).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,kt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,It).call(this))}),t(this,D).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,kt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,It).call(this))}),t(this,A).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,ft).call(this))}),t(this,y).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,q).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(n(this,At,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Ct).subscribe(e=>{t(this,a).damping=e.current}),t(this,wt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,T).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,it).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,M).subscribe(e=>{t(this,E)&&c(this,o,ft).call(this)}),t(this,rt).subscribe(e=>{t(this,E)&&t(this,M).current&&c(this,o,ft).call(this)}),t(this,$).subscribe(e=>{t(this,E)&&t(this,M).current&&c(this,o,ft).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&c(this,o,ft).call(this)}),t(this,Z).subscribe(e=>{t(this,Z).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,de).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Se).call(this))}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,ge).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ye).call(this))}),t(this,yt).observe(),t(this,x).observe(),t(this,Y).observe(),t(this,W).observe(),t(this,F).observe(),t(this,q).observe(),t(this,R).observe(),t(this,tt).observe(),t(this,et).observe(),t(this,D).observe(),t(this,st).observe(),t(this,vt).observe(),t(this,A).observe(),t(this,y).observe(),t(this,Ct).observe(),t(this,wt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,qt).observe(),t(this,T).observe(),t(this,T).observe(),t(this,xt).observe(),t(this,it).observe(),t(this,M).observe(),t(this,rt).observe(),t(this,$).observe(),t(this,nt).observe(),t(this,Lt).observe(),t(this,ht).observe(),t(this,ot).observe(),Tt.windowResizer.subscribe(t(this,ie),ae.RESIZE_ORDER.LAST),t(this,Bt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,yt).unobserve(),t(this,x).unobserve(),t(this,Y).unobserve(),t(this,W).unobserve(),t(this,F).unobserve(),t(this,q).unobserve(),t(this,R).unobserve(),t(this,tt).unobserve(),t(this,et).unobserve(),t(this,D).unobserve(),t(this,st).unobserve(),t(this,vt).unobserve(),t(this,A).unobserve(),t(this,y).unobserve(),t(this,Ct).unobserve(),t(this,wt).unobserve(),t(this,Pt).unobserve(),t(this,Et).unobserve(),t(this,qt).unobserve(),t(this,T).unobserve(),t(this,xt).unobserve(),t(this,it).unobserve(),t(this,M).unobserve(),t(this,rt).unobserve(),t(this,$).unobserve(),t(this,nt).unobserve(),t(this,Lt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),Tt.windowResizer.unsubscribe(t(this,ie)),c(this,o,ge).call(this),t(this,Bt).disconnect()}}a=new WeakMap,yt=new WeakMap,x=new WeakMap,Y=new WeakMap,W=new WeakMap,F=new WeakMap,q=new WeakMap,R=new WeakMap,tt=new WeakMap,et=new WeakMap,D=new WeakMap,st=new WeakMap,vt=new WeakMap,A=new WeakMap,y=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Pt=new WeakMap,Et=new WeakMap,qt=new WeakMap,T=new WeakMap,xt=new WeakMap,it=new WeakMap,M=new WeakMap,rt=new WeakMap,$=new WeakMap,nt=new WeakMap,Lt=new WeakMap,ht=new WeakMap,ot=new WeakMap,lt=new WeakMap,p=new WeakMap,Dt=new WeakMap,l=new WeakMap,te=new WeakMap,ee=new WeakMap,v=new WeakMap,m=new WeakMap,k=new WeakMap,O=new WeakMap,ct=new WeakMap,B=new WeakMap,w=new WeakMap,P=new WeakMap,At=new WeakMap,ut=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Mt=new WeakMap,at=new WeakMap,Z=new WeakMap,Ot=new WeakMap,V=new WeakMap,E=new WeakMap,Bt=new WeakMap,o=new WeakSet,me=function(){const e=t(this,x).current,i=t(this,Y).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,O).axis=t(this,st).current?"max":e,t(this,ct).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},kt=function(){c(this,o,It).call(this),t(this,Dt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Qe(e,i,this))}),t(this,p).style.transform="",ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,ft).call(this)},It=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,P).reset(),t(this,a).reset(),ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},de=function(){t(this,U)||(n(this,U,!0),t(this,a).unsubscribe(t(this,Vt)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Mt)),clearInterval(t(this,at)),t(this,Z).unlistenAnimationFrame(),t(this,O).disconnect(),t(this,ct).disconnect(),t(this,B).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},Se=function(){t(this,U)&&(n(this,U,!1),t(this,a).subscribe(t(this,Vt)),t(this,O).connect(),t(this,ct).connect(),t(this,B).connect(),t(this,T).current&&t(this,w).connect())},ge=function(){t(this,G)||(n(this,G,!0),Tt.windowResizer.unsubscribe(t(this,L)),Xt.elementResizer.unsubscribe(t(this,L)),c(this,o,de).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,It).call(this):(t(this,P).reset(),t(this,a).reset()),mt.scrollEntries.unregister(this))},ye=function(){t(this,G)&&(n(this,G,!1),mt.scrollEntries.register(this),(t(this,y).current||t(this,q).current||t(this,y).current||t(this,D).current||t(this,R).current)&&c(this,o,kt).call(this),c(this,o,Se).call(this),Tt.windowResizer.subscribe(t(this,L),ae.RESIZE_ORDER.SCROLL),Xt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Vt=new WeakMap,Te=function(e){let i=t(this,P).current;return t(this,y).current?i=Ne.loopNumber(e,t(this,l).length):i=Ie.clamp(e,0,this.limit),i},_t=new WeakMap,se=new WeakMap,ve=function(e=1){t(this,it).current&&(t(this,w).direction=e),t(this,T).current&&t(this,w).pauseAndContinue(t(this,xt).current,this.sectionalCSSProperty.current)},Ce=function(e="current"){if(t(this,y).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,v)+t(this,k));return i<0?t(this,m)+i+t(this,v)+t(this,k):i}else return t(this,a)[e]},ft=function(){if(t(this,l).length){const e=t(this,P).current+t(this,rt).current;if(e===0?n(this,V,"start"):e===this.limit?n(this,V,"end"):n(this,V,null),ue.dispatchEvent(this,"scrollLine",{detail:{line:t(this,V)}}),t(this,M).current){this.classList.remove("end","start"),t(this,V)&&this.classList.add(t(this,V));const i=t(this,A).current+t(this,$).current;t(this,l).forEach((r,d)=>{const b=e-this.limit-1+t(this,$).current,C=e+i,I=this.sections.length-C;d>=e&&d<C||d<=b?r.mark("current"):d>=C&&d<C+I/2||d<=b+i?r.mark("next"):r.mark("previous")})}}},pe=function(){let e=this.targetScrollValue,i=1/0,r=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let I=t(this,Ot)?C.size*d*-1*.4:0,be=C.position;const Qt=Math.abs(be+I-e);Qt<i&&(i=Qt,r=b)}return r},ie=new WeakMap;_.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Jt);var re;class we extends HTMLElement{constructor(){super(...arguments);s(this,re,null)}get scrollElement(){return t(this,re)}connectedCallback(){const e=Re.findParentElement(this,Jt);e instanceof Jt?n(this,re,e):console.error(this,"e-scroll not found")}}re=new WeakMap;var dt,z,j,K,Ht,Wt,St,Ft,ne,he;class qe extends we{constructor(){super();s(this,dt,null);s(this,z,null);s(this,j,!1);s(this,K,0);s(this,Ht,0);s(this,Wt,0);s(this,St,()=>{n(this,j,this.offsetWidth>this.offsetHeight);const e=t(this,j)?this.offsetWidth:this.offsetHeight;n(this,K,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,K,Math.max(t(this,K),30)),t(this,j)?(t(this,z).style.width=t(this,K)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,K)+"px"),n(this,Ht,e-t(this,K)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ft).call(this)});s(this,Ft,()=>{n(this,Wt,this.scrollElement.currentProgress*t(this,Ht)),t(this,j)?t(this,z).style.transform=`translate3d(${t(this,Wt)}px, 0px, 0px)`:t(this,z).style.transform=`translate3d(0px, ${t(this,Wt)}px, 0px)`});s(this,ne,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,he,e=>{document.documentElement.classList.add("grabbing"),je.setupDrag(d=>{const b=t(this,j)?d.x:d.y,C=this.scrollElement.distance/t(this,Ht),I=(b-r)*C;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(_.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ke.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"}})],n(this,dt,document.createElement("slot")),t(this,dt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,dt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,dt).assignedElements()[0]||t(this,dt).firstElementChild;n(this,z,e),t(this,z).addEventListener("pointerdown",t(this,he)),Tt.windowResizer.subscribe(t(this,St),ae.RESIZE_ORDER.SCROLL),Xt.elementResizer.subscribe(this,t(this,St)),Xt.elementResizer.subscribe(this.scrollElement,t(this,St)),this.scrollElement.onScroll(t(this,Ft)),this.scrollElement.axisCSSProperty.subscribe(t(this,ne))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,he)),Tt.windowResizer.unsubscribe(t(this,St)),Xt.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Ft)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ne))}}dt=new WeakMap,z=new WeakMap,j=new WeakMap,K=new WeakMap,Ht=new WeakMap,Wt=new WeakMap,St=new WeakMap,Ft=new WeakMap,ne=new WeakMap,he=new WeakMap;_.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",qe);var $t,Nt,Ut;class De extends we{constructor(){super();s(this,$t,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Nt,new S.CSSProperty(this,"--tween-easing",!1));s(this,Ut,new S.CSSProperty(this,"--tween-duration",0));_.isBrowser&&this.addEventListener("click",()=>{const e=t(this,$t).current,i=t(this,Nt).current,r=t(this,Ut).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,$t).observe(),t(this,Nt).observe(),t(this,Ut).observe()}disconnectedCallback(){t(this,$t).close(),t(this,Nt).close(),t(this,Ut).close()}}$t=new WeakMap,Nt=new WeakMap,Ut=new WeakMap;var Gt;class Ae extends De{constructor(){super(...arguments);s(this,Gt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Gt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Gt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Gt).close()}}Gt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Ae);var J,Zt;class Me extends De{constructor(){super(...arguments);s(this,J,new S.CSSProperty(this,"--step",1));s(this,Zt,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,J).current>0&&this.scrollElement.scrollLine==="end"||t(this,J).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,J).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,J).subscribe(()=>{t(this,Zt).call(this)}),t(this,J).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Zt)),t(this,Zt).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,J).close(),this.removeAttribute("disabled")}}J=new WeakMap,Zt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Me);var Q,pt,jt,oe,le,Kt;class Ye{constructor(h,e,i){s(this,Q,null);s(this,pt,null);s(this,jt,null);s(this,oe,null);s(this,le,()=>{t(this,pt).scrollToSection(t(this,jt),{behaviour:t(this,oe)})});s(this,Kt,()=>{t(this,Q).classList.toggle("current",t(this,pt).counter.current===t(this,jt))});_.isBrowser&&(n(this,Q,document.createElement("button")),n(this,pt,h),n(this,oe,i),n(this,jt,e),t(this,Q).addEventListener("click",t(this,le)),t(this,pt).counter.subscribe(t(this,Kt)),t(this,Kt).call(this))}get element(){return t(this,Q)}destroy(){t(this,Q).removeEventListener("click",t(this,le)),t(this,pt).counter.unsubscribe(t(this,Kt)),t(this,Q).remove()}}Q=new WeakMap,pt=new WeakMap,jt=new WeakMap,oe=new WeakMap,le=new WeakMap,Kt=new WeakMap;var bt,zt;class Oe extends we{constructor(){super(...arguments);s(this,bt,[]);s(this,zt,Ke.debounce(()=>{t(this,bt).forEach(i=>i.destroy()),n(this,bt,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new Ye(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(r.element),t(this,bt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,zt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,zt)),t(this,bt).forEach(e=>e.destroy()),n(this,bt,[])}}bt=new WeakMap,zt=new WeakMap;_.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Oe);class Be extends Je.ScrollSegmentElement{connectedCallback(){const h=Re.findParentElement(this,Jt);h instanceof Jt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}_.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Be);exports.ScrollBulletButtonsElement=Oe;exports.ScrollElement=Jt;exports.ScrollSegmentElement=Be;exports.ScrollSetButtonElement=Ae;exports.ScrollStepButtonElement=Me;exports.ScrollbarElement=qe;
1
+ "use strict";var _e=Object.defineProperty;var Pe=Object.getOwnPropertySymbols;var He=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var xe=u=>{throw TypeError(u)};var Ee=(u,h,e)=>h in u?_e(u,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[h]=e,Le=(u,h)=>{for(var e in h||(h={}))He.call(h,e)&&Ee(u,e,h[e]);if(Pe)for(var e of Pe(h))We.call(h,e)&&Ee(u,e,h[e]);return u};var fe=(u,h,e)=>h.has(u)||xe("Cannot "+e);var t=(u,h,e)=>(fe(u,h,"read from private field"),e?e.call(u):h.get(u)),s=(u,h,e)=>h.has(u)?xe("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(u):h.set(u,e),n=(u,h,e,i)=>(fe(u,h,"write to private field"),i?i.call(u,e):h.set(u,e),e),c=(u,h,e)=>(fe(u,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Fe=require("../Store-DRp_K37w.cjs"),B=require("../index-Cqw2NKev.cjs"),$e=require("../easings-GegIwET5.cjs"),ue=require("../events-KVanG9sR.cjs"),ke=require("../jss-BXAMRO12.cjs"),Rt=require("../layout-Ctc2p3uz.cjs"),Re=require("../math-GDWEqu7y.cjs"),Ne=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const ae=require("../order/index.cjs"),Ue=require("../Damped-DbaLw6w1.cjs"),Ge=require("../Tweened-Dm6Avip9.cjs"),ce=require("../controls/index.cjs"),It=require("../window-resizer/index.cjs"),mt=require("../scroll-entries/index.cjs"),ze=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),Ze=require("../device/index.cjs"),Qt=require("../element-resizer/index.cjs"),je=require("../gestures-DHLrn6Q8.cjs"),Ie=require("../dom-JBOkFLTh.cjs"),Ke=require("../function-MthRj-GJ.cjs"),Je=require("../scroll-segment/index.cjs");var f,Xt,g,gt,V,X;class Qe{constructor(h,e,i){s(this,f);s(this,Xt);s(this,g);s(this,gt,0);s(this,V,0);s(this,X,null);n(this,f,h),n(this,Xt,e),n(this,g,i),mt.scrollEntries.register(t(this,f))}get index(){return t(this,Xt)}get size(){return t(this,gt)}get position(){return t(this,V)}destroy(){mt.scrollEntries.unregister(t(this,f)),this.unsetTransform()}unsetTransform(){t(this,f).style.transform="",this.mark(null),this.setSize()}setSize(h){h?(t(this,f).style.setProperty("--size",h+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,f).style.width=h+"px",t(this,f).style.height=""):(t(this,f).style.height=h+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){n(this,gt,t(this,g).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),n(this,V,t(this,g).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),n(this,V,t(this,V)-t(this,g).contentPosition)}transform(){let h=0;const e=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,g).overscroll&&t(this,V)+t(this,gt)<t(this,g).currentScrollValue&&(h=t(this,g).distance*-1-t(this,g).gap),mt.scrollEntries.update(t(this,f),t(this,g).axisCSSProperty.current,h);const i=t(this,g).currentScrollValue+h,r=t(this,V)-t(this,g).viewportSize-e,d=t(this,V)+t(this,gt)+e,b=Re.clamp(i,r,d);t(this,g).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(h){t(this,X)!==h&&(t(this,X)&&t(this,f).classList.remove(t(this,X)),h&&t(this,f).classList.add(h),n(this,X,h),ue.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,X)},custom:!0}))}}f=new WeakMap,Xt=new WeakMap,g=new WeakMap,gt=new WeakMap,V=new WeakMap,X=new WeakMap;const Xe=ke.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,yt,x,Y,_,H,W,T,tt,et,F,st,vt,q,v,Ct,wt,Pt,Et,Tt,I,xt,it,D,rt,$,nt,Lt,ht,ot,lt,p,qt,l,Yt,te,y,m,k,A,ct,M,w,P,Dt,ut,N,U,G,At,at,Z,Mt,O,E,ee,o,me,Jt,kt,de,Se,ge,ye,L,Ot,Te,Bt,se,ve,Ce,ft,pe,ie;class jt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,yt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,Y,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,W,new S.CSSProperty(this,"--split",!1));s(this,T,new S.CSSProperty(this,"--sectional",!1));s(this,tt,new S.CSSProperty(this,"--tween-easing",!1));s(this,et,new S.CSSProperty(this,"--tween-duration",!1));s(this,F,new S.CSSProperty(this,"--auto-size",!1));s(this,st,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,vt,new S.CSSProperty(this,"--drag-inertion",1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,v,new S.CSSProperty(this,"--loop",!1));s(this,Ct,new S.CSSProperty(this,"--damping",20));s(this,wt,new S.CSSProperty(this,"--mass",0));s(this,Pt,new S.CSSProperty(this,"--stiffness",0));s(this,Et,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Tt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,I,new S.CSSProperty(this,"--autoplay",0));s(this,xt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,it,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,D,new S.CSSProperty(this,"--classes",!1));s(this,rt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,$,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,nt,new S.CSSProperty(this,"--focus-delay",0));s(this,Lt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ht,new S.CSSProperty(this,"--disabled",!1));s(this,ot,new S.CSSProperty(this,"--hibernate",!1));s(this,lt,null);s(this,p,null);s(this,qt,null);s(this,l,[]);s(this,Yt,0);s(this,te,0);s(this,y,0);s(this,m,0);s(this,k,0);s(this,A,null);s(this,ct,null);s(this,M,null);s(this,w,null);s(this,P,new Fe.Store(0));s(this,Dt,0);s(this,ut,0);s(this,N,!1);s(this,U,!0);s(this,G,!0);s(this,At);s(this,at);s(this,Z,new Ge.Tweened);s(this,Mt,!1);s(this,O,null);s(this,E,!1);s(this,ee,null);s(this,L,()=>{if(t(this,ot).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,P).current;if(n(this,Yt,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),n(this,te,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),n(this,y,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):n(this,k,ze.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,F).current&&t(this,l).length){const r=t(this,q).current,d=(t(this,y)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(d)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){n(this,m,t(this,y)*t(this,H).current);const r=t(this,m)+t(this,y);this.vertical?(t(this,p).style.width=r+"px",t(this,p).style.height="100%"):(t(this,p).style.height=r+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",n(this,m,t(this,p).offsetHeight-t(this,y))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",n(this,m,t(this,p).offsetWidth-t(this,y)));if(!t(this,v).current){const r=getComputedStyle(this),d=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);n(this,m,t(this,m)+d),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],d=r.position+r.size-t(this,y),b=t(this,m)-d;n(this,ut,r.position+r.size+b)}else n(this,ut,t(this,m));if(t(this,T).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});n(this,N,(this.vertical?t(this,p).offsetHeight:t(this,p).offsetWidth)>t(this,y)),this.classList.toggle("has-overflow",t(this,N)),t(this,N)?t(this,ht).current||c(this,o,Se).call(this):c(this,o,de).call(this),t(this,Ot).call(this)});s(this,Ot,()=>{if(!t(this,N)||t(this,G)||t(this,U))return;const e=this.currentScrollValue;if(n(this,Dt,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,P).current=c(this,o,pe).call(this)}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;mt.scrollEntries.update(this,t(this,x).current,e)});s(this,Bt,(e,i)=>{t(this,yt).current&&(c(this,o,ve).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,at)||t(this,Z).unlistenAnimationFrame(),!t(this,I).current&&t(this,nt).current&&(clearInterval(t(this,At)),n(this,At,setTimeout(()=>{const r=t(this,l)[c(this,o,pe).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Lt).current,easing:$e.easeInOutExpo}})},t(this,nt).current))),!(e.includes("drag")&&!Ze.device.isTouch&&!t(this,Et).current)){if(t(this,T).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const d={tween:t(this,tt).current||t(this,et).current?{easing:t(this,tt).current||"easeInOutCubic",duration:t(this,et).current||500}:void 0};t(this,Mt)?this.scrollToSection(t(this,P).current,d):this.shiftSections(r,d)}else t(this,a).shift(r*t(this,y))}else t(this,a).shift(i);n(this,Mt,e==="drag")}});s(this,ie,()=>{n(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,ye).call(this)});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Xe];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),n(this,lt,document.createElement("div")),t(this,lt).className="content-wrapper",n(this,p,document.createElement("div")),t(this,p).className="content",n(this,qt,document.createElement("slot")),t(this,p).appendChild(t(this,qt)),t(this,lt).appendChild(t(this,p)),e.appendChild(t(this,lt)),n(this,ee,new MutationObserver(r=>{this.tryResplit()}))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,yt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,Y)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,T)}get easingCSSProperty(){return t(this,tt)}get durationCSSProperty(){return t(this,et)}get autoSizeCSSProperty(){return t(this,F)}get wheelMaxDeltaCSSProperty(){return t(this,st)}get dragInertionCSSProperty(){return t(this,vt)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,Ct)}get massCSSProperty(){return t(this,wt)}get stiffnessCSSProperty(){return t(this,Pt)}get mouseDragCSSProperty(){return t(this,Et)}get sectionDistanceScaleCSSProperty(){return t(this,Tt)}get autoplayCSSProperty(){return t(this,I)}get autoplayPauseDurationCSSProperty(){return t(this,xt)}get autoplayUserDirectionCSSProperty(){return t(this,it)}get classesCSSProperty(){return t(this,D)}get currentIndexStartOffsetCSSProperty(){return t(this,rt)}get currentIndexEndOffsetCSSProperty(){return t(this,$)}get focusDelayCSSProperty(){return t(this,nt)}get focusDurationCSSProperty(){return t(this,Lt)}get disabledCSSProperty(){return t(this,ht)}get hibernatedCSSProperty(){return t(this,ot)}get currentScrollValue(){return c(this,o,Ce).call(this,"current")}get targetScrollValue(){return c(this,o,Ce).call(this,"target")}get contentWrapperElement(){return t(this,lt)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,Yt)}get contentPosition(){return t(this,te)}get viewportSize(){return t(this,y)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,P)}get limit(){return Math.ceil(t(this,l).length-t(this,q).current)}get distance(){return t(this,ut)}get loopDistance(){return t(this,v).current?t(this,ut)+t(this,k):t(this,ut)}get hasOverflow(){return t(this,N)}get overscroll(){return t(this,Dt)}get scrollLine(){return t(this,O)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,G)&&(t(this,v).current||t(this,W).current||t(this,v).current||t(this,F).current||t(this,T).current)&&c(this,o,Jt).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress<d?0:this.currentProgress>b?1:(this.currentProgress-d)/(b-d)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const d=e-r,b=d+i+r*2;return this.currentProgress>=d&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,P).current,d=c(this,o,Te).call(this,e),b=t(this,l)[r],C=t(this,l)[d];if(b&&C){let R=0;const be=c(this,o,pe).call(this),Kt=t(this,l)[be],Ve=Kt?this.targetScrollValue-Kt.position:0;t(this,v).current?d===0&&r===t(this,l).length-1?R=t(this,m)+t(this,y)-b.position+t(this,k):d===t(this,l).length-1&&r===0?R=C.position-(t(this,m)+t(this,y)+t(this,k)):R=C.position-b.position:R=C.position-b.position,this.shiftPosition(R-Ve,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i){c(this,o,ve).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,at)||(t(this,Z).set(t(this,a).current,{equalize:!0}),t(this,Z).set(e,Le({},i.tween)),n(this,at,setTimeout(()=>{n(this,at,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}connectedCallback(){mt.scrollEntries.register(this),n(this,a,new Ue.Damped(0,{damping:.01,min:0,order:ae.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),n(this,A,new ce.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Bt)),n(this,ct,new ce.KeyboardControls({element:this})),t(this,ct).changeEvent.subscribe(t(this,Bt)),n(this,M,new ce.DragControls({element:t(this,p)})),t(this,M).changeEvent.subscribe(t(this,Bt)),n(this,w,new ce.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,se)),t(this,x).subscribe(()=>{c(this,o,me).call(this)}),t(this,Y).subscribe(()=>{c(this,o,me).call(this)}),t(this,st).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,vt).subscribe(e=>{t(this,M).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,W).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,Jt).call(this):c(this,o,kt).call(this))}),t(this,T).subscribe(e=>{t(this,A).debounce=e.current,t(this,M).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,F).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,Jt).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,kt).call(this))}),t(this,q).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,ft).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,E)&&(t(this,l).length||(t(this,W).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(n(this,Dt,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Ct).subscribe(e=>{t(this,a).damping=e.current}),t(this,wt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Pt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,I).subscribe(e=>{t(this,w).speed=e.current,!t(this,U)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,it).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,D).subscribe(e=>{t(this,E)&&c(this,o,ft).call(this)}),t(this,rt).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,$).subscribe(e=>{t(this,E)&&t(this,D).current&&c(this,o,ft).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,l).length&&c(this,o,ft).call(this)}),t(this,Z).subscribe(e=>{t(this,Z).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ht).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,de).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Se).call(this))}),t(this,ot).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,ge).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,ye).call(this))}),t(this,yt).observe(),t(this,x).observe(),t(this,Y).observe(),t(this,_).observe(),t(this,H).observe(),t(this,W).observe(),t(this,T).observe(),t(this,tt).observe(),t(this,et).observe(),t(this,F).observe(),t(this,st).observe(),t(this,vt).observe(),t(this,q).observe(),t(this,v).observe(),t(this,Ct).observe(),t(this,wt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,Tt).observe(),t(this,I).observe(),t(this,I).observe(),t(this,xt).observe(),t(this,it).observe(),t(this,D).observe(),t(this,rt).observe(),t(this,$).observe(),t(this,nt).observe(),t(this,Lt).observe(),t(this,ht).observe(),t(this,ot).observe(),It.windowResizer.subscribe(t(this,ie),ae.RESIZE_ORDER.LAST)}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,yt).unobserve(),t(this,x).unobserve(),t(this,Y).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,W).unobserve(),t(this,T).unobserve(),t(this,tt).unobserve(),t(this,et).unobserve(),t(this,F).unobserve(),t(this,st).unobserve(),t(this,vt).unobserve(),t(this,q).unobserve(),t(this,v).unobserve(),t(this,Ct).unobserve(),t(this,wt).unobserve(),t(this,Pt).unobserve(),t(this,Et).unobserve(),t(this,Tt).unobserve(),t(this,I).unobserve(),t(this,xt).unobserve(),t(this,it).unobserve(),t(this,D).unobserve(),t(this,rt).unobserve(),t(this,$).unobserve(),t(this,nt).unobserve(),t(this,Lt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),It.windowResizer.unsubscribe(t(this,ie)),c(this,o,ge).call(this),t(this,ee).disconnect()}}a=new WeakMap,yt=new WeakMap,x=new WeakMap,Y=new WeakMap,_=new WeakMap,H=new WeakMap,W=new WeakMap,T=new WeakMap,tt=new WeakMap,et=new WeakMap,F=new WeakMap,st=new WeakMap,vt=new WeakMap,q=new WeakMap,v=new WeakMap,Ct=new WeakMap,wt=new WeakMap,Pt=new WeakMap,Et=new WeakMap,Tt=new WeakMap,I=new WeakMap,xt=new WeakMap,it=new WeakMap,D=new WeakMap,rt=new WeakMap,$=new WeakMap,nt=new WeakMap,Lt=new WeakMap,ht=new WeakMap,ot=new WeakMap,lt=new WeakMap,p=new WeakMap,qt=new WeakMap,l=new WeakMap,Yt=new WeakMap,te=new WeakMap,y=new WeakMap,m=new WeakMap,k=new WeakMap,A=new WeakMap,ct=new WeakMap,M=new WeakMap,w=new WeakMap,P=new WeakMap,Dt=new WeakMap,ut=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,At=new WeakMap,at=new WeakMap,Z=new WeakMap,Mt=new WeakMap,O=new WeakMap,E=new WeakMap,ee=new WeakMap,o=new WeakSet,me=function(){const e=t(this,x).current,i=t(this,Y).current?"-reverse":"";t(this,p).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,A).axis=t(this,st).current?"max":e,t(this,ct).dimension=e==="x"?"width":"height",t(this,M).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},Jt=function(){c(this,o,kt).call(this),t(this,qt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new Qe(e,i,this))}),t(this,p).style.transform="",ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,ft).call(this)},kt=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,P).reset(),t(this,a).reset(),ue.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},de=function(){t(this,U)||(n(this,U,!0),t(this,a).unsubscribe(t(this,Ot)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,At)),clearInterval(t(this,at)),t(this,Z).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,ct).disconnect(),t(this,M).disconnect(),t(this,w).disconnect(),t(this,N)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},Se=function(){t(this,U)&&(n(this,U,!1),t(this,a).subscribe(t(this,Ot)),t(this,A).connect(),t(this,ct).connect(),t(this,M).connect(),t(this,I).current&&t(this,w).connect())},ge=function(){t(this,G)||(n(this,G,!0),It.windowResizer.unsubscribe(t(this,L)),Qt.elementResizer.unsubscribe(t(this,L)),c(this,o,de).call(this),t(this,p).style.transform="",t(this,p).style.height="",t(this,p).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,kt).call(this):(t(this,P).reset(),t(this,a).reset()),mt.scrollEntries.unregister(this))},ye=function(){t(this,G)&&(n(this,G,!1),mt.scrollEntries.register(this),this.tryResplit(),c(this,o,Se).call(this),It.windowResizer.subscribe(t(this,L),ae.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,L)))},L=new WeakMap,Ot=new WeakMap,Te=function(e){let i=t(this,P).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Re.clamp(e,0,this.limit),i},Bt=new WeakMap,se=new WeakMap,ve=function(e=1){t(this,it).current&&(t(this,w).direction=e),t(this,I).current&&t(this,w).pauseAndContinue(t(this,xt).current,this.sectionalCSSProperty.current)},Ce=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,m)+t(this,y)+t(this,k));return i<0?t(this,m)+i+t(this,y)+t(this,k):i}else return t(this,a)[e]},ft=function(){if(t(this,l).length){const e=t(this,P).current+t(this,rt).current;if(e===0?n(this,O,"start"):e===this.limit?n(this,O,"end"):n(this,O,null),ue.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,D).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,q).current+t(this,$).current;t(this,l).forEach((r,d)=>{const b=e-this.limit-1+t(this,$).current,C=e+i,R=this.sections.length-C;d>=e&&d<C||d<=b?r.mark("current"):d>=C&&d<C+R/2||d<=b+i?r.mark("next"):r.mark("previous")})}}},pe=function(){let e=this.targetScrollValue,i=1/0,r=0;const d=t(this,a).direction;for(let b=0;b<t(this,l).length;b++){const C=t(this,l)[b];let R=t(this,Mt)?C.size*d*-1*.4:0,be=C.position;const Kt=Math.abs(be+R-e);Kt<i&&(i=Kt,r=b)}return r},ie=new WeakMap;B.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",jt);var re;class we extends HTMLElement{constructor(){super(...arguments);s(this,re,null)}get scrollElement(){return t(this,re)}connectedCallback(){const e=Ie.findParentElement(this,jt);e instanceof jt?n(this,re,e):console.error(this,"e-scroll not found")}}re=new WeakMap;var dt,z,j,K,Vt,_t,St,Ht,ne,he;class qe extends we{constructor(){super();s(this,dt,null);s(this,z,null);s(this,j,!1);s(this,K,0);s(this,Vt,0);s(this,_t,0);s(this,St,()=>{n(this,j,this.offsetWidth>this.offsetHeight);const e=t(this,j)?this.offsetWidth:this.offsetHeight;n(this,K,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,K,Math.max(t(this,K),30)),t(this,j)?(t(this,z).style.width=t(this,K)+"px",t(this,z).style.height="100%"):(t(this,z).style.width="100%",t(this,z).style.height=t(this,K)+"px"),n(this,Vt,e-t(this,K)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Ht).call(this)});s(this,Ht,()=>{n(this,_t,this.scrollElement.currentProgress*t(this,Vt)),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)`});s(this,ne,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,he,e=>{document.documentElement.classList.add("grabbing"),je.setupDrag(d=>{const b=t(this,j)?d.x:d.y,C=this.scrollElement.distance/t(this,Vt),R=(b-r)*C;this.scrollElement.setPosition(i+R)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,j)?e.x:e.y});if(B.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[ke.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"}})],n(this,dt,document.createElement("slot")),t(this,dt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,dt))}}get thumbElement(){return t(this,z)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,dt).assignedElements()[0]||t(this,dt).firstElementChild;n(this,z,e),t(this,z).addEventListener("pointerdown",t(this,he)),It.windowResizer.subscribe(t(this,St),ae.RESIZE_ORDER.SCROLL),Qt.elementResizer.subscribe(this,t(this,St)),Qt.elementResizer.subscribe(this.scrollElement,t(this,St)),this.scrollElement.onScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.subscribe(t(this,ne))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,z).removeEventListener("pointerdown",t(this,he)),It.windowResizer.unsubscribe(t(this,St)),Qt.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Ht)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ne))}}dt=new WeakMap,z=new WeakMap,j=new WeakMap,K=new WeakMap,Vt=new WeakMap,_t=new WeakMap,St=new WeakMap,Ht=new WeakMap,ne=new WeakMap,he=new WeakMap;B.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",qe);var Wt,Ft,$t;class De extends we{constructor(){super();s(this,Wt,new S.CSSProperty(this,"--behaviour","smooth"));s(this,Ft,new S.CSSProperty(this,"--tween-easing",!1));s(this,$t,new S.CSSProperty(this,"--tween-duration",0));B.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Wt).current,i=t(this,Ft).current,r=t(this,$t).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Wt).observe(),t(this,Ft).observe(),t(this,$t).observe()}disconnectedCallback(){t(this,Wt).close(),t(this,Ft).close(),t(this,$t).close()}}Wt=new WeakMap,Ft=new WeakMap,$t=new WeakMap;var Nt;class Ae extends De{constructor(){super(...arguments);s(this,Nt,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,Nt).current,e)}connectedCallback(){super.connectedCallback(),t(this,Nt).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,Nt).close()}}Nt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Ae);var J,Ut;class Me extends De{constructor(){super(...arguments);s(this,J,new S.CSSProperty(this,"--step",1));s(this,Ut,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,J).current>0&&this.scrollElement.scrollLine==="end"||t(this,J).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,J).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,J).subscribe(()=>{t(this,Ut).call(this)}),t(this,J).observe(),this.scrollElement.addEventListener("scrollLine",t(this,Ut)),t(this,Ut).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,J).close(),this.removeAttribute("disabled")}}J=new WeakMap,Ut=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Me);var Q,pt,Gt,oe,le,Zt;class Ye{constructor(h,e,i){s(this,Q,null);s(this,pt,null);s(this,Gt,null);s(this,oe,null);s(this,le,()=>{t(this,pt).scrollToSection(t(this,Gt),{behaviour:t(this,oe)})});s(this,Zt,()=>{t(this,Q).classList.toggle("current",t(this,pt).counter.current===t(this,Gt))});B.isBrowser&&(n(this,Q,document.createElement("button")),n(this,pt,h),n(this,oe,i),n(this,Gt,e),t(this,Q).addEventListener("click",t(this,le)),t(this,pt).counter.subscribe(t(this,Zt)),t(this,Zt).call(this))}get element(){return t(this,Q)}destroy(){t(this,Q).removeEventListener("click",t(this,le)),t(this,pt).counter.unsubscribe(t(this,Zt)),t(this,Q).remove()}}Q=new WeakMap,pt=new WeakMap,Gt=new WeakMap,oe=new WeakMap,le=new WeakMap,Zt=new WeakMap;var bt,zt;class Oe extends we{constructor(){super(...arguments);s(this,bt,[]);s(this,zt,Ke.debounce(()=>{t(this,bt).forEach(i=>i.destroy()),n(this,bt,[]);const e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new Ye(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");this.appendChild(r.element),t(this,bt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,zt))}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,zt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,zt)),t(this,bt).forEach(e=>e.destroy()),n(this,bt,[])}}bt=new WeakMap,zt=new WeakMap;B.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Oe);class Be extends Je.ScrollSegmentElement{connectedCallback(){const h=Ie.findParentElement(this,jt);h instanceof jt?(this.scrollContainer=h,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}B.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Be);exports.ScrollBulletButtonsElement=Oe;exports.ScrollElement=jt;exports.ScrollSegmentElement=Be;exports.ScrollSetButtonElement=Ae;exports.ScrollStepButtonElement=Me;exports.ScrollbarElement=qe;
@@ -15,7 +15,7 @@ var Pe = (a, h, e) => h in a ? Ve(a, h, { enumerable: !0, configurable: !0, writ
15
15
  var pe = (a, h, e) => h.has(a) || xe("Cannot " + e);
16
16
  var t = (a, h, e) => (pe(a, h, "read from private field"), e ? e.call(a) : h.get(a)), s = (a, h, e) => h.has(a) ? xe("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(a) : h.set(a, e), n = (a, h, e, i) => (pe(a, h, "write to private field"), i ? i.call(a, e) : h.set(a, e), e), c = (a, h, e) => (pe(a, h, "access private method"), e);
17
17
  import { S as He } from "../Store-D2xCXENW.js";
18
- import { i as W } from "../index-euf5anj6.js";
18
+ import { i as H } from "../index-euf5anj6.js";
19
19
  import { a as Be } from "../easings-Bni3YAAW.js";
20
20
  import { d as le } from "../events-CsVF98U6.js";
21
21
  import { c as ze } from "../jss-Chm3yE5y.js";
@@ -27,35 +27,35 @@ import { TICK_ORDER as Fe, RESIZE_ORDER as be } from "../order/index.js";
27
27
  import { D as $e } from "../Damped-CucKOQsI.js";
28
28
  import { T as Ne } from "../Tweened-CcPeZ0UE.js";
29
29
  import { WheelControls as qe, KeyboardControls as Ue, DragControls as Ge, AutoplayControls as Ke } from "../controls/index.js";
30
- import { windowResizer as Tt } from "../window-resizer/index.js";
30
+ import { windowResizer as It } from "../window-resizer/index.js";
31
31
  import { scrollEntries as St } from "../scroll-entries/index.js";
32
32
  import { cssUnitParser as ke } from "../css-unit-parser/index.js";
33
33
  import { CSSProperty as p } from "../css-property/index.js";
34
34
  import { device as _e } from "../device/index.js";
35
- import { elementResizer as Jt } from "../element-resizer/index.js";
35
+ import { elementResizer as jt } from "../element-resizer/index.js";
36
36
  import { s as Ze } from "../gestures-D2Fdra_G.js";
37
37
  import { b as Te } from "../dom-CVWzyXPH.js";
38
38
  import { d as je } from "../function-C10DGppn.js";
39
39
  import { ScrollSegmentElement as Je } from "../scroll-segment/index.js";
40
- var b, Xt, g, gt, F, X;
40
+ var b, Qt, g, gt, B, X;
41
41
  class Qe {
42
42
  constructor(h, e, i) {
43
43
  s(this, b);
44
- s(this, Xt);
44
+ s(this, Qt);
45
45
  s(this, g);
46
46
  s(this, gt, 0);
47
- s(this, F, 0);
47
+ s(this, B, 0);
48
48
  s(this, X, null);
49
- n(this, b, h), n(this, Xt, e), n(this, g, i), St.register(t(this, b));
49
+ n(this, b, h), n(this, Qt, e), n(this, g, i), St.register(t(this, b));
50
50
  }
51
51
  get index() {
52
- return t(this, Xt);
52
+ return t(this, Qt);
53
53
  }
54
54
  get size() {
55
55
  return t(this, gt);
56
56
  }
57
57
  get position() {
58
- return t(this, F);
58
+ return t(this, B);
59
59
  }
60
60
  destroy() {
61
61
  St.unregister(t(this, b)), this.unsetTransform();
@@ -67,17 +67,17 @@ class Qe {
67
67
  h ? (t(this, b).style.setProperty("--size", h + "px"), t(this, g).axisCSSProperty.current === "x" ? (t(this, b).style.width = h + "px", t(this, b).style.height = "") : (t(this, b).style.height = h + "px", t(this, b).style.width = "")) : (t(this, b).style.width = "", t(this, b).style.height = "", t(this, b).style.removeProperty("--size"));
68
68
  }
69
69
  resize() {
70
- n(this, gt, t(this, g).vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth), n(this, F, t(this, g).vertical ? fe(t(this, b)) : me(t(this, b))), n(this, F, t(this, F) - t(this, g).contentPosition);
70
+ n(this, gt, t(this, g).vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth), n(this, B, t(this, g).vertical ? fe(t(this, b)) : me(t(this, b))), n(this, B, t(this, B) - t(this, g).contentPosition);
71
71
  }
72
72
  transform() {
73
73
  let h = 0;
74
74
  const e = t(this, g).viewportSize * t(this, g).sectionDistanceScaleCSSProperty.current;
75
- t(this, g).loopCSSProperty.current && t(this, g).overscroll && t(this, F) + t(this, gt) < t(this, g).currentScrollValue && (h = t(this, g).distance * -1 - t(this, g).gap), St.update(
75
+ t(this, g).loopCSSProperty.current && t(this, g).overscroll && t(this, B) + t(this, gt) < t(this, g).currentScrollValue && (h = t(this, g).distance * -1 - t(this, g).gap), St.update(
76
76
  t(this, b),
77
77
  t(this, g).axisCSSProperty.current,
78
78
  h
79
79
  );
80
- const i = t(this, g).currentScrollValue + h, r = t(this, F) - t(this, g).viewportSize - e, d = t(this, F) + t(this, gt) + e, m = Ie(i, r, d);
80
+ const i = t(this, g).currentScrollValue + h, r = t(this, B) - t(this, g).viewportSize - e, d = t(this, B) + t(this, gt) + e, m = Ie(i, r, d);
81
81
  t(this, g).vertical ? t(this, b).style.transform = `translate3d(0px, ${m * -1}px, 0px)` : t(this, b).style.transform = `translate3d(${m * -1}px, 0px, 0px)`;
82
82
  }
83
83
  mark(h) {
@@ -90,7 +90,7 @@ class Qe {
90
90
  }));
91
91
  }
92
92
  }
93
- b = new WeakMap(), Xt = new WeakMap(), g = new WeakMap(), gt = new WeakMap(), F = new WeakMap(), X = new WeakMap();
93
+ b = new WeakMap(), Qt = new WeakMap(), g = new WeakMap(), gt = new WeakMap(), B = new WeakMap(), X = new WeakMap();
94
94
  const Xe = ze({
95
95
  ":host": {
96
96
  position: "relative",
@@ -129,8 +129,8 @@ const Xe = ze({
129
129
  flexShrink: "0"
130
130
  }
131
131
  });
132
- var u, vt, x, Y, $, N, D, T, tt, et, M, st, yt, V, v, Ct, wt, Et, Pt, At, A, xt, it, O, rt, q, nt, Lt, ht, ot, lt, f, Dt, l, Yt, te, y, S, z, R, ct, H, w, E, Mt, at, U, G, K, Vt, ut, _, Ot, B, P, Rt, o, Se, zt, It, ce, ae, ge, ve, L, Ht, Ae, Bt, ee, ye, Ce, bt, ue, se;
133
- class Qt extends HTMLElement {
132
+ var u, vt, x, Y, W, F, $, A, tt, et, N, st, yt, D, y, Ct, wt, Et, Pt, Tt, T, xt, it, M, rt, q, nt, Lt, ht, ot, lt, f, At, l, Xt, Yt, v, S, z, V, ct, O, w, E, Dt, at, U, G, K, Mt, ut, _, Vt, R, P, te, o, Se, Zt, zt, ce, ae, ge, ve, L, Ot, Ae, Rt, ee, ye, Ce, bt, ue, se;
133
+ class Jt extends HTMLElement {
134
134
  constructor() {
135
135
  super();
136
136
  s(this, o);
@@ -138,12 +138,12 @@ class Qt extends HTMLElement {
138
138
  s(this, vt, new p(this, "--controls", !0));
139
139
  s(this, x, new p(this, "--axis", "y"));
140
140
  s(this, Y, new p(this, "--reverse", !1));
141
- s(this, $, new p(this, "--direction", 0));
142
- s(this, N, new p(this, "--pages", 0, {
141
+ s(this, W, new p(this, "--direction", 0));
142
+ s(this, F, new p(this, "--pages", 0, {
143
143
  validate: (e) => Math.max(0, e - 1)
144
144
  }));
145
- s(this, D, new p(this, "--split", !1));
146
- s(this, T, new p(this, "--sectional", !1));
145
+ s(this, $, new p(this, "--split", !1));
146
+ s(this, A, new p(this, "--sectional", !1));
147
147
  s(this, tt, new p(
148
148
  this,
149
149
  "--tween-easing",
@@ -154,29 +154,29 @@ class Qt extends HTMLElement {
154
154
  "--tween-duration",
155
155
  !1
156
156
  ));
157
- s(this, M, new p(this, "--auto-size", !1));
157
+ s(this, N, new p(this, "--auto-size", !1));
158
158
  s(this, st, new p(
159
159
  this,
160
160
  "--wheel-max-delta",
161
161
  !1
162
162
  ));
163
163
  s(this, yt, new p(this, "--drag-inertion", 1));
164
- s(this, V, new p(
164
+ s(this, D, new p(
165
165
  this,
166
166
  "--sections-in-view",
167
167
  1
168
168
  ));
169
- s(this, v, new p(this, "--loop", !1));
169
+ s(this, y, new p(this, "--loop", !1));
170
170
  s(this, Ct, new p(this, "--damping", 20));
171
171
  s(this, wt, new p(this, "--mass", 0));
172
172
  s(this, Et, new p(this, "--stiffness", 0));
173
173
  s(this, Pt, new p(this, "--mouse-drag", !1));
174
- s(this, At, new p(
174
+ s(this, Tt, new p(
175
175
  this,
176
176
  "--section-distance-scale",
177
177
  0.5
178
178
  ));
179
- s(this, A, new p(this, "--autoplay", 0));
179
+ s(this, T, new p(this, "--autoplay", 0));
180
180
  s(this, xt, new p(
181
181
  this,
182
182
  "--autoplay-pause-duration",
@@ -187,7 +187,7 @@ class Qt extends HTMLElement {
187
187
  "--autoplay-user-direction",
188
188
  !1
189
189
  ));
190
- s(this, O, new p(this, "--classes", !1));
190
+ s(this, M, new p(this, "--classes", !1));
191
191
  s(this, rt, new p(
192
192
  this,
193
193
  "--current-index-start-offset",
@@ -208,41 +208,41 @@ class Qt extends HTMLElement {
208
208
  s(this, ot, new p(this, "--hibernate", !1));
209
209
  s(this, lt, null);
210
210
  s(this, f, null);
211
- s(this, Dt, null);
211
+ s(this, At, null);
212
212
  s(this, l, []);
213
+ s(this, Xt, 0);
213
214
  s(this, Yt, 0);
214
- s(this, te, 0);
215
- s(this, y, 0);
215
+ s(this, v, 0);
216
216
  s(this, S, 0);
217
217
  s(this, z, 0);
218
- s(this, R, null);
218
+ s(this, V, null);
219
219
  s(this, ct, null);
220
- s(this, H, null);
220
+ s(this, O, null);
221
221
  s(this, w, null);
222
222
  s(this, E, new He(0));
223
- s(this, Mt, 0);
223
+ s(this, Dt, 0);
224
224
  s(this, at, 0);
225
225
  s(this, U, !1);
226
226
  s(this, G, !0);
227
227
  s(this, K, !0);
228
- s(this, Vt);
228
+ s(this, Mt);
229
229
  s(this, ut);
230
230
  s(this, _, new Ne());
231
- s(this, Ot, !1);
232
- s(this, B, null);
231
+ s(this, Vt, !1);
232
+ s(this, R, null);
233
233
  s(this, P, !1);
234
- s(this, Rt, null);
234
+ s(this, te, null);
235
235
  s(this, L, () => {
236
236
  if (t(this, ot).current)
237
237
  return;
238
238
  t(this, u).unlistenAnimationFrame();
239
239
  const e = this.currentScrollValue / t(this, S) || 0, i = t(this, E).current;
240
- if (n(this, Yt, this.vertical ? fe(this) : me(this)), n(this, te, this.vertical ? fe(t(this, f)) : me(t(this, f))), n(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? n(this, z, ke.parse(
240
+ if (n(this, Xt, this.vertical ? fe(this) : me(this)), n(this, Yt, this.vertical ? fe(t(this, f)) : me(t(this, f))), n(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? n(this, z, ke.parse(
241
241
  getComputedStyle(t(this, f)).rowGap
242
242
  )) : n(this, z, ke.parse(
243
243
  getComputedStyle(t(this, f)).columnGap
244
- )), t(this, M).current && t(this, l).length) {
245
- const r = t(this, V).current, d = (t(this, y) - t(this, z) * (r - 1)) / r;
244
+ )), t(this, N).current && t(this, l).length) {
245
+ const r = t(this, D).current, d = (t(this, v) - t(this, z) * (r - 1)) / r;
246
246
  t(this, l).forEach((m) => {
247
247
  m.setSize(d);
248
248
  });
@@ -252,22 +252,22 @@ class Qt extends HTMLElement {
252
252
  });
253
253
  if (t(this, l).forEach((r) => {
254
254
  r.resize();
255
- }), t(this, N).current) {
256
- n(this, S, t(this, y) * t(this, N).current);
257
- const r = t(this, S) + t(this, y);
255
+ }), t(this, F).current) {
256
+ n(this, S, t(this, v) * t(this, F).current);
257
+ const r = t(this, S) + t(this, v);
258
258
  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%");
259
259
  } else
260
- this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", n(this, S, t(this, f).offsetHeight - t(this, y))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", n(this, S, t(this, f).offsetWidth - t(this, y)));
261
- if (!t(this, v).current) {
260
+ this.vertical ? (t(this, f).style.width = "100%", t(this, f).style.height = "max-content", n(this, S, t(this, f).offsetHeight - t(this, v))) : (t(this, f).style.width = "max-content", t(this, f).style.height = "100%", n(this, S, t(this, f).offsetWidth - t(this, v)));
261
+ if (!t(this, y).current) {
262
262
  const r = getComputedStyle(this), d = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
263
263
  n(this, S, t(this, S) + d), t(this, u).max = t(this, S);
264
264
  }
265
- if (t(this, v).current && t(this, l).length) {
266
- const r = t(this, l)[t(this, l).length - 1], d = r.position + r.size - t(this, y), m = t(this, S) - d;
265
+ if (t(this, y).current && t(this, l).length) {
266
+ const r = t(this, l)[t(this, l).length - 1], d = r.position + r.size - t(this, v), m = t(this, S) - d;
267
267
  n(this, at, r.position + r.size + m);
268
268
  } else
269
269
  n(this, at, t(this, S));
270
- if (t(this, T).current && t(this, l).length) {
270
+ if (t(this, A).current && t(this, l).length) {
271
271
  const r = t(this, l)[i];
272
272
  t(this, u).set(r.position, {
273
273
  equalize: !0
@@ -276,13 +276,13 @@ class Qt extends HTMLElement {
276
276
  t(this, u).set(e * t(this, S), {
277
277
  equalize: !0
278
278
  });
279
- n(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, U)), t(this, U) ? t(this, ht).current || c(this, o, ae).call(this) : c(this, o, ce).call(this), t(this, Ht).call(this);
279
+ n(this, U, (this.vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, U)), t(this, U) ? t(this, ht).current || c(this, o, ae).call(this) : c(this, o, ce).call(this), t(this, Ot).call(this);
280
280
  });
281
- s(this, Ht, () => {
281
+ s(this, Ot, () => {
282
282
  if (!t(this, U) || t(this, K) || t(this, G))
283
283
  return;
284
284
  const e = this.currentScrollValue;
285
- if (n(this, Mt, Math.max(0, e - t(this, S))), t(this, l).length) {
285
+ if (n(this, Dt, Math.max(0, e - t(this, S))), t(this, l).length) {
286
286
  for (let i = 0; i < t(this, l).length; i++)
287
287
  t(this, l)[i].transform();
288
288
  t(this, E).current = c(this, o, ue).call(this);
@@ -294,17 +294,17 @@ class Qt extends HTMLElement {
294
294
  e
295
295
  );
296
296
  });
297
- s(this, Bt, (e, i) => {
297
+ s(this, Rt, (e, i) => {
298
298
  t(this, vt).current && (c(this, o, ye).call(this, Math.sign(i) || 1), t(this, ee).call(this, e, i));
299
299
  });
300
300
  s(this, ee, (e, i) => {
301
- if (t(this, $).current) {
302
- if (t(this, $).current < 0 && i > 0)
301
+ if (t(this, W).current) {
302
+ if (t(this, W).current < 0 && i > 0)
303
303
  return;
304
- if (t(this, $).current > 0 && i < 0)
304
+ if (t(this, W).current > 0 && i < 0)
305
305
  return;
306
306
  }
307
- if (t(this, ut) || t(this, _).unlistenAnimationFrame(), !t(this, A).current && t(this, nt).current && (clearInterval(t(this, Vt)), n(this, Vt, setTimeout(() => {
307
+ if (t(this, ut) || t(this, _).unlistenAnimationFrame(), !t(this, T).current && t(this, nt).current && (clearInterval(t(this, Mt)), n(this, Mt, setTimeout(() => {
308
308
  const r = t(this, l)[c(this, o, ue).call(this)];
309
309
  r && this.scrollToSection(r.index, {
310
310
  tween: {
@@ -313,7 +313,7 @@ class Qt extends HTMLElement {
313
313
  }
314
314
  });
315
315
  }, t(this, nt).current))), !(e.includes("drag") && !_e.isTouch && !t(this, Pt).current)) {
316
- if (t(this, T).current && e !== "drag") {
316
+ if (t(this, A).current && e !== "drag") {
317
317
  const r = Math.sign(i);
318
318
  if (t(this, l).length) {
319
319
  const d = {
@@ -322,23 +322,23 @@ class Qt extends HTMLElement {
322
322
  duration: t(this, et).current || 500
323
323
  } : void 0
324
324
  };
325
- t(this, Ot) ? this.scrollToSection(t(this, E).current, d) : this.shiftSections(r, d);
325
+ t(this, Vt) ? this.scrollToSection(t(this, E).current, d) : this.shiftSections(r, d);
326
326
  } else
327
- t(this, u).shift(r * t(this, y));
327
+ t(this, u).shift(r * t(this, v));
328
328
  } else
329
329
  t(this, u).shift(i);
330
- n(this, Ot, e === "drag");
330
+ n(this, Vt, e === "drag");
331
331
  }
332
332
  });
333
333
  s(this, se, () => {
334
334
  n(this, P, !0), this.hibernatedCSSProperty.current || c(this, o, ve).call(this);
335
335
  });
336
- if (W) {
336
+ if (H) {
337
337
  const e = this.attachShadow({ mode: "open" });
338
338
  e.adoptedStyleSheets = [Xe];
339
339
  const i = document.createElement("div");
340
- i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), n(this, lt, document.createElement("div")), t(this, lt).className = "content-wrapper", n(this, f, document.createElement("div")), t(this, f).className = "content", n(this, Dt, document.createElement("slot")), t(this, f).appendChild(t(this, Dt)), t(this, lt).appendChild(t(this, f)), e.appendChild(t(this, lt)), n(this, Rt, new MutationObserver((r) => {
341
- !t(this, K) && (t(this, v).current || t(this, D).current || t(this, v).current || t(this, M).current || t(this, T).current) && c(this, o, zt).call(this);
340
+ i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), n(this, lt, document.createElement("div")), t(this, lt).className = "content-wrapper", n(this, f, document.createElement("div")), t(this, f).className = "content", n(this, At, document.createElement("slot")), t(this, f).appendChild(t(this, At)), t(this, lt).appendChild(t(this, f)), e.appendChild(t(this, lt)), n(this, te, new MutationObserver((r) => {
341
+ this.tryResplit();
342
342
  }));
343
343
  }
344
344
  }
@@ -355,16 +355,16 @@ class Qt extends HTMLElement {
355
355
  return t(this, Y);
356
356
  }
357
357
  get directionCSSProperty() {
358
- return t(this, $);
358
+ return t(this, W);
359
359
  }
360
360
  get pagesCSSProperty() {
361
- return t(this, N);
361
+ return t(this, F);
362
362
  }
363
363
  get splitCSSProperty() {
364
- return t(this, D);
364
+ return t(this, $);
365
365
  }
366
366
  get sectionalCSSProperty() {
367
- return t(this, T);
367
+ return t(this, A);
368
368
  }
369
369
  get easingCSSProperty() {
370
370
  return t(this, tt);
@@ -373,7 +373,7 @@ class Qt extends HTMLElement {
373
373
  return t(this, et);
374
374
  }
375
375
  get autoSizeCSSProperty() {
376
- return t(this, M);
376
+ return t(this, N);
377
377
  }
378
378
  get wheelMaxDeltaCSSProperty() {
379
379
  return t(this, st);
@@ -382,10 +382,10 @@ class Qt extends HTMLElement {
382
382
  return t(this, yt);
383
383
  }
384
384
  get sectionsInViewCSSProperty() {
385
- return t(this, V);
385
+ return t(this, D);
386
386
  }
387
387
  get loopCSSProperty() {
388
- return t(this, v);
388
+ return t(this, y);
389
389
  }
390
390
  get dampingCSSProperty() {
391
391
  return t(this, Ct);
@@ -400,10 +400,10 @@ class Qt extends HTMLElement {
400
400
  return t(this, Pt);
401
401
  }
402
402
  get sectionDistanceScaleCSSProperty() {
403
- return t(this, At);
403
+ return t(this, Tt);
404
404
  }
405
405
  get autoplayCSSProperty() {
406
- return t(this, A);
406
+ return t(this, T);
407
407
  }
408
408
  get autoplayPauseDurationCSSProperty() {
409
409
  return t(this, xt);
@@ -412,7 +412,7 @@ class Qt extends HTMLElement {
412
412
  return t(this, it);
413
413
  }
414
414
  get classesCSSProperty() {
415
- return t(this, O);
415
+ return t(this, M);
416
416
  }
417
417
  get currentIndexStartOffsetCSSProperty() {
418
418
  return t(this, rt);
@@ -448,13 +448,13 @@ class Qt extends HTMLElement {
448
448
  return t(this, l);
449
449
  }
450
450
  get position() {
451
- return t(this, Yt);
451
+ return t(this, Xt);
452
452
  }
453
453
  get contentPosition() {
454
- return t(this, te);
454
+ return t(this, Yt);
455
455
  }
456
456
  get viewportSize() {
457
- return t(this, y);
457
+ return t(this, v);
458
458
  }
459
459
  get scrollSize() {
460
460
  return t(this, S);
@@ -467,23 +467,23 @@ class Qt extends HTMLElement {
467
467
  }
468
468
  get limit() {
469
469
  return Math.ceil(
470
- t(this, l).length - t(this, V).current
470
+ t(this, l).length - t(this, D).current
471
471
  );
472
472
  }
473
473
  get distance() {
474
474
  return t(this, at);
475
475
  }
476
476
  get loopDistance() {
477
- return t(this, v).current ? t(this, at) + t(this, z) : t(this, at);
477
+ return t(this, y).current ? t(this, at) + t(this, z) : t(this, at);
478
478
  }
479
479
  get hasOverflow() {
480
480
  return t(this, U);
481
481
  }
482
482
  get overscroll() {
483
- return t(this, Mt);
483
+ return t(this, Dt);
484
484
  }
485
485
  get scrollLine() {
486
- return t(this, B);
486
+ return t(this, R);
487
487
  }
488
488
  get vertical() {
489
489
  return t(this, x).current === "y";
@@ -500,6 +500,9 @@ class Qt extends HTMLElement {
500
500
  get scrollHeight() {
501
501
  return t(this, x).current === "x" ? 0 : t(this, u).distance;
502
502
  }
503
+ tryResplit() {
504
+ !t(this, K) && (t(this, y).current || t(this, $).current || t(this, y).current || t(this, N).current || t(this, A).current) && c(this, o, Zt).call(this);
505
+ }
503
506
  onScroll(...e) {
504
507
  return t(this, u).subscribe(...e);
505
508
  }
@@ -524,8 +527,8 @@ class Qt extends HTMLElement {
524
527
  const r = t(this, E).current, d = c(this, o, Ae).call(this, e), m = t(this, l)[r], C = t(this, l)[d];
525
528
  if (m && C) {
526
529
  let I = 0;
527
- const de = c(this, o, ue).call(this), jt = t(this, l)[de], Me = jt ? this.targetScrollValue - jt.position : 0;
528
- t(this, v).current ? d === 0 && r === t(this, l).length - 1 ? I = t(this, S) + t(this, y) - m.position + t(this, z) : d === t(this, l).length - 1 && r === 0 ? I = C.position - (t(this, S) + t(this, y) + t(this, z)) : I = C.position - m.position : I = C.position - m.position, this.shiftPosition(I - Me, i);
530
+ const de = c(this, o, ue).call(this), _t = t(this, l)[de], Me = _t ? this.targetScrollValue - _t.position : 0;
531
+ t(this, y).current ? d === 0 && r === t(this, l).length - 1 ? I = t(this, S) + t(this, v) - m.position + t(this, z) : d === t(this, l).length - 1 && r === 0 ? I = C.position - (t(this, S) + t(this, v) + t(this, z)) : I = C.position - m.position : I = C.position - m.position, this.shiftPosition(I - Me, i);
529
532
  }
530
533
  }
531
534
  shiftSections(e, i) {
@@ -546,48 +549,48 @@ class Qt extends HTMLElement {
546
549
  damping: 0.01,
547
550
  min: 0,
548
551
  order: Fe.SCROLL
549
- })), this.setAttribute("tabindex", "0"), n(this, R, new qe({ element: t(this, f) })), t(this, R).changeEvent.subscribe(t(this, Bt)), n(this, ct, new Ue({
552
+ })), this.setAttribute("tabindex", "0"), n(this, V, new qe({ element: t(this, f) })), t(this, V).changeEvent.subscribe(t(this, Rt)), n(this, ct, new Ue({
550
553
  element: this
551
554
  })), t(this, ct).changeEvent.subscribe(
552
- t(this, Bt)
553
- ), n(this, H, new Ge({ element: t(this, f) })), t(this, H).changeEvent.subscribe(t(this, Bt)), n(this, w, new Ke({
555
+ t(this, Rt)
556
+ ), n(this, O, new Ge({ element: t(this, f) })), t(this, O).changeEvent.subscribe(t(this, Rt)), n(this, w, new Ke({
554
557
  culling: this
555
558
  })), t(this, w).changeEvent.subscribe(t(this, ee)), t(this, x).subscribe(() => {
556
559
  c(this, o, Se).call(this);
557
560
  }), t(this, Y).subscribe(() => {
558
561
  c(this, o, Se).call(this);
559
562
  }), t(this, st).subscribe((e) => {
560
- t(this, R).axis = e.current ? "max" : t(this, x).current;
563
+ t(this, V).axis = e.current ? "max" : t(this, x).current;
561
564
  }), t(this, yt).subscribe((e) => {
562
- t(this, H).inertion = typeof e.current == "number" ? e.current : 1;
563
- }), t(this, N).subscribe(() => {
565
+ t(this, O).inertion = typeof e.current == "number" ? e.current : 1;
566
+ }), t(this, F).subscribe(() => {
564
567
  t(this, P) && t(this, L).call(this);
565
- }), t(this, D).subscribe(({ current: e }) => {
566
- t(this, P) && (e ? c(this, o, zt).call(this) : c(this, o, It).call(this));
567
- }), t(this, T).subscribe((e) => {
568
- t(this, R).debounce = e.current, t(this, H).swipe = e.current, t(this, w).interval = e.current, t(this, P) && (e.current && !e.previous && !t(this, l).length ? c(this, o, zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, It).call(this));
569
- }), t(this, M).subscribe((e) => {
570
- t(this, P) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, It).call(this));
571
- }), t(this, V).subscribe((e) => {
568
+ }), t(this, $).subscribe(({ current: e }) => {
569
+ t(this, P) && (e ? c(this, o, Zt).call(this) : c(this, o, zt).call(this));
570
+ }), t(this, A).subscribe((e) => {
571
+ t(this, V).debounce = e.current, t(this, O).swipe = e.current, t(this, w).interval = e.current, t(this, P) && (e.current && !e.previous && !t(this, l).length ? c(this, o, Zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, zt).call(this));
572
+ }), t(this, N).subscribe((e) => {
573
+ t(this, P) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, Zt).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, zt).call(this));
574
+ }), t(this, D).subscribe((e) => {
572
575
  t(this, P) && (t(this, L).call(this), c(this, o, bt).call(this));
573
- }), t(this, v).subscribe((e) => {
574
- e.current ? (t(this, P) && (t(this, l).length || (t(this, D).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (n(this, Mt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
576
+ }), t(this, y).subscribe((e) => {
577
+ e.current ? (t(this, P) && (t(this, l).length || (t(this, $).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (n(this, Dt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
575
578
  }), t(this, Ct).subscribe((e) => {
576
579
  t(this, u).damping = e.current;
577
580
  }), t(this, wt).subscribe((e) => {
578
581
  t(this, u).mass = e.current;
579
582
  }), t(this, Et).subscribe((e) => {
580
583
  t(this, u).stiffness = e.current;
581
- }), t(this, A).subscribe((e) => {
584
+ }), t(this, T).subscribe((e) => {
582
585
  t(this, w).speed = e.current, !t(this, G) && e.current && !e.previous ? t(this, w).connect() : !e.current && e.previous && t(this, w).disconnect();
583
586
  }), t(this, it).subscribe((e) => {
584
587
  e.current || (t(this, w).direction = 1);
585
- }), t(this, O).subscribe((e) => {
588
+ }), t(this, M).subscribe((e) => {
586
589
  t(this, P) && c(this, o, bt).call(this);
587
590
  }), t(this, rt).subscribe((e) => {
588
- t(this, P) && t(this, O).current && c(this, o, bt).call(this);
591
+ t(this, P) && t(this, M).current && c(this, o, bt).call(this);
589
592
  }), t(this, q).subscribe((e) => {
590
- t(this, P) && t(this, O).current && c(this, o, bt).call(this);
593
+ t(this, P) && t(this, M).current && c(this, o, bt).call(this);
591
594
  }), t(this, u).isRunning.subscribe((e) => {
592
595
  this.classList.toggle("active", e.current);
593
596
  }), t(this, E).subscribe((e) => {
@@ -598,23 +601,23 @@ class Qt extends HTMLElement {
598
601
  e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, ce).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, ae).call(this));
599
602
  }), t(this, ot).subscribe((e) => {
600
603
  e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, ge).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, ve).call(this));
601
- }), t(this, vt).observe(), t(this, x).observe(), t(this, Y).observe(), t(this, $).observe(), t(this, N).observe(), t(this, D).observe(), t(this, T).observe(), t(this, tt).observe(), t(this, et).observe(), t(this, M).observe(), t(this, st).observe(), t(this, yt).observe(), t(this, V).observe(), t(this, v).observe(), t(this, Ct).observe(), t(this, wt).observe(), t(this, Et).observe(), t(this, Pt).observe(), t(this, At).observe(), t(this, A).observe(), t(this, A).observe(), t(this, xt).observe(), t(this, it).observe(), t(this, O).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, Lt).observe(), t(this, ht).observe(), t(this, ot).observe(), Tt.subscribe(t(this, se), be.LAST), t(this, Rt).observe(this, { childList: !0 });
604
+ }), t(this, vt).observe(), t(this, x).observe(), t(this, Y).observe(), t(this, W).observe(), t(this, F).observe(), t(this, $).observe(), t(this, A).observe(), t(this, tt).observe(), t(this, et).observe(), t(this, N).observe(), t(this, st).observe(), t(this, yt).observe(), t(this, D).observe(), t(this, y).observe(), t(this, Ct).observe(), t(this, wt).observe(), t(this, Et).observe(), t(this, Pt).observe(), t(this, Tt).observe(), t(this, T).observe(), t(this, T).observe(), t(this, xt).observe(), t(this, it).observe(), t(this, M).observe(), t(this, rt).observe(), t(this, q).observe(), t(this, nt).observe(), t(this, Lt).observe(), t(this, ht).observe(), t(this, ot).observe(), It.subscribe(t(this, se), be.LAST);
602
605
  }
603
606
  disconnectedCallback() {
604
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, vt).unobserve(), t(this, x).unobserve(), t(this, Y).unobserve(), t(this, $).unobserve(), t(this, N).unobserve(), t(this, D).unobserve(), t(this, T).unobserve(), t(this, tt).unobserve(), t(this, et).unobserve(), t(this, M).unobserve(), t(this, st).unobserve(), t(this, yt).unobserve(), t(this, V).unobserve(), t(this, v).unobserve(), t(this, Ct).unobserve(), t(this, wt).unobserve(), t(this, Et).unobserve(), t(this, Pt).unobserve(), t(this, At).unobserve(), t(this, A).unobserve(), t(this, xt).unobserve(), t(this, it).unobserve(), t(this, O).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, Lt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), Tt.unsubscribe(t(this, se)), c(this, o, ge).call(this), t(this, Rt).disconnect();
607
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, vt).unobserve(), t(this, x).unobserve(), t(this, Y).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, $).unobserve(), t(this, A).unobserve(), t(this, tt).unobserve(), t(this, et).unobserve(), t(this, N).unobserve(), t(this, st).unobserve(), t(this, yt).unobserve(), t(this, D).unobserve(), t(this, y).unobserve(), t(this, Ct).unobserve(), t(this, wt).unobserve(), t(this, Et).unobserve(), t(this, Pt).unobserve(), t(this, Tt).unobserve(), t(this, T).unobserve(), t(this, xt).unobserve(), t(this, it).unobserve(), t(this, M).unobserve(), t(this, rt).unobserve(), t(this, q).unobserve(), t(this, nt).unobserve(), t(this, Lt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), It.unsubscribe(t(this, se)), c(this, o, ge).call(this), t(this, te).disconnect();
605
608
  }
606
609
  }
607
- u = new WeakMap(), vt = new WeakMap(), x = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), N = new WeakMap(), D = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), M = new WeakMap(), st = new WeakMap(), yt = new WeakMap(), V = new WeakMap(), v = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), Et = new WeakMap(), Pt = new WeakMap(), At = new WeakMap(), A = new WeakMap(), xt = new WeakMap(), it = new WeakMap(), O = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), f = new WeakMap(), Dt = new WeakMap(), l = new WeakMap(), Yt = new WeakMap(), te = new WeakMap(), y = new WeakMap(), S = new WeakMap(), z = new WeakMap(), R = new WeakMap(), ct = new WeakMap(), H = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Mt = new WeakMap(), at = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Vt = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), Ot = new WeakMap(), B = new WeakMap(), P = new WeakMap(), Rt = new WeakMap(), o = new WeakSet(), Se = function() {
610
+ u = new WeakMap(), vt = new WeakMap(), x = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), N = new WeakMap(), st = new WeakMap(), yt = new WeakMap(), D = new WeakMap(), y = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), Et = new WeakMap(), Pt = new WeakMap(), Tt = new WeakMap(), T = new WeakMap(), xt = new WeakMap(), it = new WeakMap(), M = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), f = new WeakMap(), At = new WeakMap(), l = new WeakMap(), Xt = new WeakMap(), Yt = new WeakMap(), v = new WeakMap(), S = new WeakMap(), z = new WeakMap(), V = new WeakMap(), ct = new WeakMap(), O = new WeakMap(), w = new WeakMap(), E = new WeakMap(), Dt = new WeakMap(), at = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Mt = new WeakMap(), ut = new WeakMap(), _ = new WeakMap(), Vt = new WeakMap(), R = new WeakMap(), P = new WeakMap(), te = new WeakMap(), o = new WeakSet(), Se = function() {
608
611
  const e = t(this, x).current, i = t(this, Y).current ? "-reverse" : "";
609
- t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, R).axis = t(this, st).current ? "max" : e, t(this, ct).dimension = e === "x" ? "width" : "height", t(this, H).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, P) && t(this, L).call(this);
610
- }, zt = function() {
611
- c(this, o, It).call(this), t(this, Dt).assignedElements().forEach((e, i) => {
612
+ t(this, f).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, st).current ? "max" : e, t(this, ct).dimension = e === "x" ? "width" : "height", t(this, O).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, P) && t(this, L).call(this);
613
+ }, Zt = function() {
614
+ c(this, o, zt).call(this), t(this, At).assignedElements().forEach((e, i) => {
612
615
  e instanceof HTMLElement && t(this, l).push(new Qe(e, i, this));
613
616
  }), t(this, f).style.transform = "", le(this, "scrollSectionsChange", {
614
617
  custom: !0,
615
618
  composed: !0
616
619
  }), t(this, L).call(this), c(this, o, bt).call(this);
617
- }, It = function() {
620
+ }, zt = function() {
618
621
  t(this, l).forEach((e) => {
619
622
  e.destroy();
620
623
  }), n(this, l, []), t(this, E).reset(), t(this, u).reset(), le(this, "scrollSectionsChange", {
@@ -622,37 +625,37 @@ u = new WeakMap(), vt = new WeakMap(), x = new WeakMap(), Y = new WeakMap(), $ =
622
625
  composed: !0
623
626
  });
624
627
  }, ce = function() {
625
- t(this, G) || (n(this, G, !0), t(this, u).unsubscribe(t(this, Ht)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Vt)), clearInterval(t(this, ut)), t(this, _).unlistenAnimationFrame(), t(this, R).disconnect(), t(this, ct).disconnect(), t(this, H).disconnect(), t(this, w).disconnect(), t(this, U) || (this.sections.forEach((e) => {
628
+ t(this, G) || (n(this, G, !0), t(this, u).unsubscribe(t(this, Ot)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Mt)), clearInterval(t(this, ut)), t(this, _).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, ct).disconnect(), t(this, O).disconnect(), t(this, w).disconnect(), t(this, U) || (this.sections.forEach((e) => {
626
629
  e.unsetTransform();
627
630
  }), t(this, L).call(this)));
628
631
  }, ae = function() {
629
- t(this, G) && (n(this, G, !1), t(this, u).subscribe(t(this, Ht)), t(this, R).connect(), t(this, ct).connect(), t(this, H).connect(), t(this, A).current && t(this, w).connect());
632
+ t(this, G) && (n(this, G, !1), t(this, u).subscribe(t(this, Ot)), t(this, V).connect(), t(this, ct).connect(), t(this, O).connect(), t(this, T).current && t(this, w).connect());
630
633
  }, ge = function() {
631
- t(this, K) || (n(this, K, !0), Tt.unsubscribe(t(this, L)), Jt.unsubscribe(t(this, L)), c(this, o, ce).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, It).call(this) : (t(this, E).reset(), t(this, u).reset()), St.unregister(this));
634
+ t(this, K) || (n(this, K, !0), It.unsubscribe(t(this, L)), jt.unsubscribe(t(this, L)), c(this, o, ce).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, zt).call(this) : (t(this, E).reset(), t(this, u).reset()), St.unregister(this));
632
635
  }, ve = function() {
633
- t(this, K) && (n(this, K, !1), St.register(this), (t(this, v).current || t(this, D).current || t(this, v).current || t(this, M).current || t(this, T).current) && c(this, o, zt).call(this), c(this, o, ae).call(this), Tt.subscribe(t(this, L), be.SCROLL), Jt.subscribe(this, t(this, L)));
634
- }, L = new WeakMap(), Ht = new WeakMap(), Ae = function(e) {
636
+ t(this, K) && (n(this, K, !1), St.register(this), this.tryResplit(), c(this, o, ae).call(this), It.subscribe(t(this, L), be.SCROLL), jt.subscribe(this, t(this, L)));
637
+ }, L = new WeakMap(), Ot = new WeakMap(), Ae = function(e) {
635
638
  let i = t(this, E).current;
636
- return t(this, v).current ? i = We(e, t(this, l).length) : i = Ie(e, 0, this.limit), i;
637
- }, Bt = new WeakMap(), ee = new WeakMap(), ye = function(e = 1) {
638
- t(this, it).current && (t(this, w).direction = e), t(this, A).current && t(this, w).pauseAndContinue(
639
+ return t(this, y).current ? i = We(e, t(this, l).length) : i = Ie(e, 0, this.limit), i;
640
+ }, Rt = new WeakMap(), ee = new WeakMap(), ye = function(e = 1) {
641
+ t(this, it).current && (t(this, w).direction = e), t(this, T).current && t(this, w).pauseAndContinue(
639
642
  t(this, xt).current,
640
643
  this.sectionalCSSProperty.current
641
644
  );
642
645
  }, Ce = function(e = "current") {
643
- if (t(this, v).current && t(this, l).length) {
644
- const i = t(this, u)[e] % (t(this, S) + t(this, y) + t(this, z));
645
- return i < 0 ? t(this, S) + i + t(this, y) + t(this, z) : i;
646
+ if (t(this, y).current && t(this, l).length) {
647
+ const i = t(this, u)[e] % (t(this, S) + t(this, v) + t(this, z));
648
+ return i < 0 ? t(this, S) + i + t(this, v) + t(this, z) : i;
646
649
  } else
647
650
  return t(this, u)[e];
648
651
  }, bt = function() {
649
652
  if (t(this, l).length) {
650
653
  const e = t(this, E).current + t(this, rt).current;
651
- if (e === 0 ? n(this, B, "start") : e === this.limit ? n(this, B, "end") : n(this, B, null), le(this, "scrollLine", {
652
- detail: { line: t(this, B) }
653
- }), t(this, O).current) {
654
- this.classList.remove("end", "start"), t(this, B) && this.classList.add(t(this, B));
655
- const i = t(this, V).current + t(this, q).current;
654
+ if (e === 0 ? n(this, R, "start") : e === this.limit ? n(this, R, "end") : n(this, R, null), le(this, "scrollLine", {
655
+ detail: { line: t(this, R) }
656
+ }), t(this, M).current) {
657
+ this.classList.remove("end", "start"), t(this, R) && this.classList.add(t(this, R));
658
+ const i = t(this, D).current + t(this, q).current;
656
659
  t(this, l).forEach((r, d) => {
657
660
  const m = e - this.limit - 1 + t(this, q).current, C = e + i, I = this.sections.length - C;
658
661
  d >= e && d < C || d <= m ? r.mark("current") : d >= C && d < C + I / 2 || d <= m + i ? r.mark("next") : r.mark("previous");
@@ -665,13 +668,13 @@ ue = function() {
665
668
  const d = t(this, u).direction;
666
669
  for (let m = 0; m < t(this, l).length; m++) {
667
670
  const C = t(this, l)[m];
668
- let I = t(this, Ot) ? C.size * d * -1 * 0.4 : 0, de = C.position;
669
- const jt = Math.abs(de + I - e);
670
- jt < i && (i = jt, r = m);
671
+ let I = t(this, Vt) ? C.size * d * -1 * 0.4 : 0, de = C.position;
672
+ const _t = Math.abs(de + I - e);
673
+ _t < i && (i = _t, r = m);
671
674
  }
672
675
  return r;
673
676
  }, se = new WeakMap();
674
- W && !customElements.get("e-scroll") && customElements.define("e-scroll", Qt);
677
+ H && !customElements.get("e-scroll") && customElements.define("e-scroll", Jt);
675
678
  var ie;
676
679
  class we extends HTMLElement {
677
680
  constructor() {
@@ -682,12 +685,12 @@ class we extends HTMLElement {
682
685
  return t(this, ie);
683
686
  }
684
687
  connectedCallback() {
685
- const e = Te(this, Qt);
686
- e instanceof Qt ? n(this, ie, e) : console.error(this, "e-scroll not found");
688
+ const e = Te(this, Jt);
689
+ e instanceof Jt ? n(this, ie, e) : console.error(this, "e-scroll not found");
687
690
  }
688
691
  }
689
692
  ie = new WeakMap();
690
- var dt, k, Z, j, Wt, Ft, pt, $t, re, ne;
693
+ var dt, k, Z, j, Ht, Bt, pt, Wt, re, ne;
691
694
  class Ye extends we {
692
695
  constructor() {
693
696
  super();
@@ -695,15 +698,15 @@ class Ye extends we {
695
698
  s(this, k, null);
696
699
  s(this, Z, !1);
697
700
  s(this, j, 0);
698
- s(this, Wt, 0);
699
- s(this, Ft, 0);
701
+ s(this, Ht, 0);
702
+ s(this, Bt, 0);
700
703
  s(this, pt, () => {
701
704
  n(this, Z, this.offsetWidth > this.offsetHeight);
702
705
  const e = t(this, Z) ? this.offsetWidth : this.offsetHeight;
703
- n(this, j, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), n(this, j, Math.max(t(this, j), 30)), t(this, Z) ? (t(this, k).style.width = t(this, j) + "px", t(this, k).style.height = "100%") : (t(this, k).style.width = "100%", t(this, k).style.height = t(this, j) + "px"), n(this, Wt, e - t(this, j)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, $t).call(this);
706
+ n(this, j, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), n(this, j, Math.max(t(this, j), 30)), t(this, Z) ? (t(this, k).style.width = t(this, j) + "px", t(this, k).style.height = "100%") : (t(this, k).style.width = "100%", t(this, k).style.height = t(this, j) + "px"), n(this, Ht, e - t(this, j)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Wt).call(this);
704
707
  });
705
- s(this, $t, () => {
706
- n(this, Ft, this.scrollElement.currentProgress * t(this, Wt)), t(this, Z) ? t(this, k).style.transform = `translate3d(${t(this, Ft)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Ft)}px, 0px)`;
708
+ s(this, Wt, () => {
709
+ n(this, Bt, this.scrollElement.currentProgress * t(this, Ht)), t(this, Z) ? t(this, k).style.transform = `translate3d(${t(this, Bt)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Bt)}px, 0px)`;
707
710
  });
708
711
  s(this, re, () => {
709
712
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
@@ -711,7 +714,7 @@ class Ye extends we {
711
714
  s(this, ne, (e) => {
712
715
  document.documentElement.classList.add("grabbing"), Ze(
713
716
  (d) => {
714
- const m = t(this, Z) ? d.x : d.y, C = this.scrollElement.distance / t(this, Wt), I = (m - r) * C;
717
+ const m = t(this, Z) ? d.x : d.y, C = this.scrollElement.distance / t(this, Ht), I = (m - r) * C;
715
718
  this.scrollElement.setPosition(i + I);
716
719
  },
717
720
  () => {
@@ -720,7 +723,7 @@ class Ye extends we {
720
723
  );
721
724
  const i = this.scrollElement.damped.target, r = t(this, Z) ? e.x : e.y;
722
725
  });
723
- if (W) {
726
+ if (H) {
724
727
  const e = this.attachShadow({ mode: "open" });
725
728
  e.adoptedStyleSheets = [
726
729
  ze({
@@ -761,27 +764,27 @@ class Ye extends we {
761
764
  connectedCallback() {
762
765
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
763
766
  const e = t(this, dt).assignedElements()[0] || t(this, dt).firstElementChild;
764
- n(this, k, e), t(this, k).addEventListener("pointerdown", t(this, ne)), Tt.subscribe(t(this, pt), be.SCROLL), Jt.subscribe(this, t(this, pt)), Jt.subscribe(this.scrollElement, t(this, pt)), this.scrollElement.onScroll(t(this, $t)), this.scrollElement.axisCSSProperty.subscribe(t(this, re));
767
+ n(this, k, e), t(this, k).addEventListener("pointerdown", t(this, ne)), It.subscribe(t(this, pt), be.SCROLL), jt.subscribe(this, t(this, pt)), jt.subscribe(this.scrollElement, t(this, pt)), this.scrollElement.onScroll(t(this, Wt)), this.scrollElement.axisCSSProperty.subscribe(t(this, re));
765
768
  }
766
769
  disconnectedCallback() {
767
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, ne)), Tt.unsubscribe(t(this, pt)), Jt.unsubscribe(t(this, pt)), this.scrollElement.offScroll(t(this, $t)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, re));
770
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, ne)), It.unsubscribe(t(this, pt)), jt.unsubscribe(t(this, pt)), this.scrollElement.offScroll(t(this, Wt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, re));
768
771
  }
769
772
  }
770
- dt = new WeakMap(), k = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), Wt = new WeakMap(), Ft = new WeakMap(), pt = new WeakMap(), $t = new WeakMap(), re = new WeakMap(), ne = new WeakMap();
771
- W && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", Ye);
772
- var Nt, qt, Ut;
773
+ dt = new WeakMap(), k = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), Ht = new WeakMap(), Bt = new WeakMap(), pt = new WeakMap(), Wt = new WeakMap(), re = new WeakMap(), ne = new WeakMap();
774
+ H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", Ye);
775
+ var Ft, $t, Nt;
773
776
  class De extends we {
774
777
  constructor() {
775
778
  super();
776
- s(this, Nt, new p(this, "--behaviour", "smooth"));
777
- s(this, qt, new p(
779
+ s(this, Ft, new p(this, "--behaviour", "smooth"));
780
+ s(this, $t, new p(
778
781
  this,
779
782
  "--tween-easing",
780
783
  !1
781
784
  ));
782
- s(this, Ut, new p(this, "--tween-duration", 0));
783
- W && this.addEventListener("click", () => {
784
- const e = t(this, Nt).current, i = t(this, qt).current, r = t(this, Ut).current;
785
+ s(this, Nt, new p(this, "--tween-duration", 0));
786
+ H && this.addEventListener("click", () => {
787
+ const e = t(this, Ft).current, i = t(this, $t).current, r = t(this, Nt).current;
785
788
  this.handleClick({
786
789
  behaviour: e,
787
790
  tween: i || r ? { easing: i, duration: r } : void 0
@@ -789,37 +792,37 @@ class De extends we {
789
792
  });
790
793
  }
791
794
  connectedCallback() {
792
- super.connectedCallback(), t(this, Nt).observe(), t(this, qt).observe(), t(this, Ut).observe();
795
+ super.connectedCallback(), t(this, Ft).observe(), t(this, $t).observe(), t(this, Nt).observe();
793
796
  }
794
797
  disconnectedCallback() {
795
- t(this, Nt).close(), t(this, qt).close(), t(this, Ut).close();
798
+ t(this, Ft).close(), t(this, $t).close(), t(this, Nt).close();
796
799
  }
797
800
  }
798
- Nt = new WeakMap(), qt = new WeakMap(), Ut = new WeakMap();
799
- var Gt;
801
+ Ft = new WeakMap(), $t = new WeakMap(), Nt = new WeakMap();
802
+ var qt;
800
803
  class ts extends De {
801
804
  constructor() {
802
805
  super(...arguments);
803
- s(this, Gt, new p(this, "--set", 1));
806
+ s(this, qt, new p(this, "--set", 1));
804
807
  }
805
808
  handleClick(e) {
806
- this.scrollElement.scrollToSection(t(this, Gt).current, e);
809
+ this.scrollElement.scrollToSection(t(this, qt).current, e);
807
810
  }
808
811
  connectedCallback() {
809
- super.connectedCallback(), t(this, Gt).observe();
812
+ super.connectedCallback(), t(this, qt).observe();
810
813
  }
811
814
  disconnectedCallback() {
812
- super.disconnectedCallback(), t(this, Gt).close();
815
+ super.disconnectedCallback(), t(this, qt).close();
813
816
  }
814
817
  }
815
- Gt = new WeakMap();
816
- W && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ts);
817
- var J, Kt;
818
+ qt = new WeakMap();
819
+ H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ts);
820
+ var J, Ut;
818
821
  class es extends De {
819
822
  constructor() {
820
823
  super(...arguments);
821
824
  s(this, J, new p(this, "--step", 1));
822
- s(this, Kt, () => {
825
+ s(this, Ut, () => {
823
826
  this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, J).current > 0 && this.scrollElement.scrollLine === "end" || t(this, J).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
824
827
  });
825
828
  }
@@ -828,46 +831,46 @@ class es extends De {
828
831
  }
829
832
  connectedCallback() {
830
833
  super.connectedCallback(), this.scrollElement && (t(this, J).subscribe(() => {
831
- t(this, Kt).call(this);
834
+ t(this, Ut).call(this);
832
835
  }), t(this, J).observe(), this.scrollElement.addEventListener(
833
836
  "scrollLine",
834
- t(this, Kt)
835
- ), t(this, Kt).call(this));
837
+ t(this, Ut)
838
+ ), t(this, Ut).call(this));
836
839
  }
837
840
  disconnectedCallback() {
838
841
  super.disconnectedCallback(), t(this, J).close(), this.removeAttribute("disabled");
839
842
  }
840
843
  }
841
- J = new WeakMap(), Kt = new WeakMap();
842
- W && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", es);
843
- var Q, ft, _t, he, oe, Zt;
844
+ J = new WeakMap(), Ut = new WeakMap();
845
+ H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", es);
846
+ var Q, ft, Gt, he, oe, Kt;
844
847
  class ss {
845
848
  constructor(h, e, i) {
846
849
  s(this, Q, null);
847
850
  s(this, ft, null);
848
- s(this, _t, null);
851
+ s(this, Gt, null);
849
852
  s(this, he, null);
850
853
  s(this, oe, () => {
851
- t(this, ft).scrollToSection(t(this, _t), {
854
+ t(this, ft).scrollToSection(t(this, Gt), {
852
855
  behaviour: t(this, he)
853
856
  });
854
857
  });
855
- s(this, Zt, () => {
858
+ s(this, Kt, () => {
856
859
  t(this, Q).classList.toggle(
857
860
  "current",
858
- t(this, ft).counter.current === t(this, _t)
861
+ t(this, ft).counter.current === t(this, Gt)
859
862
  );
860
863
  });
861
- W && (n(this, Q, document.createElement("button")), n(this, ft, h), n(this, he, i), n(this, _t, e), t(this, Q).addEventListener("click", t(this, oe)), t(this, ft).counter.subscribe(t(this, Zt)), t(this, Zt).call(this));
864
+ H && (n(this, Q, document.createElement("button")), n(this, ft, h), n(this, he, i), n(this, Gt, e), t(this, Q).addEventListener("click", t(this, oe)), t(this, ft).counter.subscribe(t(this, Kt)), t(this, Kt).call(this));
862
865
  }
863
866
  get element() {
864
867
  return t(this, Q);
865
868
  }
866
869
  destroy() {
867
- t(this, Q).removeEventListener("click", t(this, oe)), t(this, ft).counter.unsubscribe(t(this, Zt)), t(this, Q).remove();
870
+ t(this, Q).removeEventListener("click", t(this, oe)), t(this, ft).counter.unsubscribe(t(this, Kt)), t(this, Q).remove();
868
871
  }
869
872
  }
870
- Q = new WeakMap(), ft = new WeakMap(), _t = new WeakMap(), he = new WeakMap(), oe = new WeakMap(), Zt = new WeakMap();
873
+ Q = new WeakMap(), ft = new WeakMap(), Gt = new WeakMap(), he = new WeakMap(), oe = new WeakMap(), Kt = new WeakMap();
871
874
  var mt, kt;
872
875
  class is extends we {
873
876
  constructor() {
@@ -904,20 +907,20 @@ class is extends we {
904
907
  }
905
908
  }
906
909
  mt = new WeakMap(), kt = new WeakMap();
907
- W && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", is);
910
+ H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", is);
908
911
  class rs extends Je {
909
912
  connectedCallback() {
910
- const h = Te(this, Qt);
911
- h instanceof Qt ? (this.scrollContainer = h, this.scrollContainer.addEventListener(
913
+ const h = Te(this, Jt);
914
+ h instanceof Jt ? (this.scrollContainer = h, this.scrollContainer.addEventListener(
912
915
  "scrollSectionsChange",
913
916
  this.findAnotherScrollEntries
914
917
  )) : console.error(this, "e-scroll not found");
915
918
  }
916
919
  }
917
- W && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", rs);
920
+ H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", rs);
918
921
  export {
919
922
  is as ScrollBulletButtonsElement,
920
- Qt as ScrollElement,
923
+ Jt as ScrollElement,
921
924
  rs as ScrollSegmentElement,
922
925
  ts as ScrollSetButtonElement,
923
926
  es as ScrollStepButtonElement,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.50.7",
3
+ "version": "0.50.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"