aptechka 0.30.7 → 0.30.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.
@@ -1 +1 @@
1
- "use strict";var ge=Object.defineProperty;var se=Object.getOwnPropertySymbols;var ye=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var re=u=>{throw TypeError(u)};var ie=(u,n,e)=>n in u?ge(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,ne=(u,n)=>{for(var e in n||(n={}))ye.call(n,e)&&ie(u,e,n[e]);if(se)for(var e of se(n))ve.call(n,e)&&ie(u,e,n[e]);return u};var jt=(u,n,e)=>n.has(u)||re("Cannot "+e);var t=(u,n,e)=>(jt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?re("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(jt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(jt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce=require("../../Store-CDb6RMce.cjs"),Nt=require("../../browser-CpzFX2xg.cjs"),Ee=require("../../easings-DsS5-Kqc.cjs"),Gt=require("../../events-KVanG9sR.cjs"),oe=require("../../jss-GJLvaNfT.cjs"),bt=require("../../layout-8ryRAMGJ.cjs"),le=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Kt=require("../../order/index.cjs"),Pe=require("../../Damped-CTsV8tl_.cjs"),we=require("../../Tweened-BttGiyB0.cjs"),Wt=require("../../controls/index.cjs"),Ut=require("../../window-resizer/vanilla/index.cjs"),gt=require("../../scroll-entries/index.cjs"),he=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),xe=require("../../device/index.cjs"),$t=require("../../element-resizer/vanilla/index.cjs"),ze=require("../../gestures-DHLrn6Q8.cjs"),ce=require("../../dom-JBOkFLTh.cjs"),Le=require("../../function-MthRj-GJ.cjs"),ke=require("../../scroll-segment/index.cjs");var f,Rt,y,st,A,U;class De{constructor(n,e,i){s(this,f);s(this,Rt);s(this,y);s(this,st,0);s(this,A,0);s(this,U,null);h(this,f,n),h(this,Rt,e),h(this,y,i),gt.scrollEntries.register(t(this,f))}get index(){return t(this,Rt)}get size(){return t(this,st)}get position(){return t(this,A)}destroy(){gt.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,st,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,A,t(this,y).vertical?bt.getCumulativeOffsetTop(t(this,f)):bt.getCumulativeOffsetLeft(t(this,f))),h(this,A,t(this,A)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,A)+t(this,st)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),gt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,A)-t(this,y).viewportSize-e,c=t(this,A)+t(this,st)+e,m=le.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,U)!==n&&(t(this,U)&&t(this,f).classList.remove(t(this,U)),n&&t(this,f).classList.add(n),h(this,U,n),Gt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,U)},custom:!0}))}}f=new WeakMap,Rt=new WeakMap,y=new WeakMap,st=new WeakMap,A=new WeakMap,U=new WeakMap;const qe=oe.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".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="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,it,x,M,T,D,O,$,N,q,E,rt,nt,ht,ot,yt,k,lt,j,R,G,V,K,ct,ut,at,Z,p,vt,o,It,At,v,b,z,I,J,B,C,g,Ct,Q,dt,pt,Et,_,l,qt,mt,Zt,Jt,Qt,Xt,L,Mt,ue,Pt,Tt,Yt,et,te;class Dt extends HTMLElement{constructor(){super();s(this,l);s(this,a,null);s(this,it,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,M,new S.CSSProperty(this,"--direction",0));s(this,T,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,D,new S.CSSProperty(this,"--split",!1));s(this,O,new S.CSSProperty(this,"--sectional",!1));s(this,$,new S.CSSProperty(this,"--auto-size",!1));s(this,N,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,E,new S.CSSProperty(this,"--loop",!1));s(this,rt,new S.CSSProperty(this,"--damping",20));s(this,nt,new S.CSSProperty(this,"--mass",0));s(this,ht,new S.CSSProperty(this,"--stiffness",0));s(this,ot,new S.CSSProperty(this,"--mouse-drag",!1));s(this,yt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,lt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,j,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,G,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,V,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,K,new S.CSSProperty(this,"--focus-delay",0));s(this,ct,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ut,new S.CSSProperty(this,"--disabled",!1));s(this,at,new S.CSSProperty(this,"--hibernated",!1));s(this,Z,null);s(this,p,null);s(this,vt,null);s(this,o,[]);s(this,It,0);s(this,At,0);s(this,v,0);s(this,b,0);s(this,z,0);s(this,I,null);s(this,J,null);s(this,B,null);s(this,C,null);s(this,g,new Ce.Store(0));s(this,Ct,0);s(this,Q,0);s(this,dt,!0);s(this,pt,!0);s(this,Et);s(this,_,new we.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,b)||0,i=t(this,g).current;if(h(this,It,this.vertical?bt.getCumulativeOffsetTop(this):bt.getCumulativeOffsetLeft(this)),h(this,At,this.vertical?bt.getCumulativeOffsetTop(t(this,p)):bt.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,he.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,he.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,$).current&&t(this,o).length){const r=t(this,q).current,c=(t(this,v)-t(this,z)*(r-1))/r;t(this,o).forEach(m=>{m.setSize(c)})}else t(this,o).forEach(r=>{r.setSize()});if(t(this,o).forEach(r=>{r.resize()}),t(this,T).current){h(this,b,t(this,v)*t(this,T).current);const r=t(this,b)+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",h(this,b,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,b,t(this,p).offsetWidth-t(this,v)));if(!t(this,E).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,b,t(this,b)+c),t(this,a).max=t(this,b)}if(t(this,E).current&&t(this,o).length){const r=t(this,o)[t(this,o).length-1],c=r.position+r.size-t(this,v),m=t(this,b)-c;h(this,Q,r.position+r.size+m)}else h(this,Q,t(this,b));if(t(this,O).current&&t(this,o).length){const r=t(this,o)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,b),{equalize:!0})});s(this,Mt,()=>{const e=this.currentScrollValue;if(h(this,Ct,Math.max(0,e-t(this,b))),t(this,o).length){let i=0;for(let r=0;r<t(this,o).length;r++){const c=t(this,o)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,g).current=i}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)`;gt.scrollEntries.update(this,t(this,x).current,e)});s(this,Pt,(e,i)=>{t(this,it).current&&(t(this,j).current&&(t(this,C).direction=Math.sign(i)||1),t(this,k).current&&t(this,C).pauseAndContinue(t(this,lt).current,this.sectionalCSSProperty.current),t(this,Tt).call(this,e,i))});s(this,Tt,(e,i)=>{if(t(this,M).current){if(t(this,M).current<0&&i>0)return;if(t(this,M).current>0&&i<0)return}if(t(this,_).unlistenAnimationFrame(),!t(this,k).current&&t(this,K).current&&(clearInterval(t(this,Et)),h(this,Et,setTimeout(()=>{const r=d(this,l,te).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,ct).current,easing:Ee.easeInOutExpo}})},t(this,K).current))),!(e==="drag"&&!xe.device.isMobile&&!t(this,ot).current))if(t(this,O).current){const r=Math.sign(i);t(this,o).length?this.shiftSections(r):t(this,a).shift(r*t(this,v))}else t(this,a).shift(i)});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(qe);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Z,document.createElement("div")),t(this,Z).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,vt,document.createElement("slot")),t(this,p).appendChild(t(this,vt)),t(this,Z).appendChild(t(this,p)),e.appendChild(t(this,Z))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,it)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,M)}get pagesCSSProperty(){return t(this,T)}get splitCSSProperty(){return t(this,D)}get sectionalCSSProperty(){return t(this,O)}get autoSizeCSSProperty(){return t(this,$)}get wheelMaxDeltaCSSProperty(){return t(this,N)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,E)}get dampingCSSProperty(){return t(this,rt)}get massCSSProperty(){return t(this,nt)}get stiffnessCSSProperty(){return t(this,ht)}get mouseDragCSSProperty(){return t(this,ot)}get sectionDistanceScaleCSSProperty(){return t(this,yt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,lt)}get autoplayUserDirectionCSSProperty(){return t(this,j)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,G)}get currentIndexEndOffsetCSSProperty(){return t(this,V)}get focusDelayCSSProperty(){return t(this,K)}get focusDurationCSSProperty(){return t(this,ct)}get disabledCSSProperty(){return t(this,ut)}get hibernatedCSSProperty(){return t(this,at)}get currentScrollValue(){return d(this,l,Yt).call(this,"current")}get targetScrollValue(){return d(this,l,Yt).call(this,"target")}get contentWrapperElement(){return t(this,Z)}get contentElement(){return t(this,p)}get sections(){return t(this,o)}get position(){return t(this,It)}get contentPosition(){return t(this,At)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,b)}get gap(){return t(this,z)}get counter(){return t(this,g)}get limit(){return t(this,o).length-t(this,q).current}get distance(){return t(this,Q)}get loopDistance(){return t(this,E).current?t(this,Q)+t(this,z):t(this,Q)}get overscroll(){return t(this,Ct)}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 c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,o).length)return;const r=t(this,g).current;d(this,l,ue).call(this,e);const c=t(this,o)[r],m=t(this,o)[t(this,g).current];if(c&&m){let w=0;const ft=d(this,l,te).call(this),be=ft?this.targetScrollValue-ft.position:0;t(this,E).current?t(this,g).current===0&&r===t(this,o).length-1?w=t(this,b)+t(this,v)-c.position+t(this,z):t(this,g).current===t(this,o).length-1&&r===0?w=m.position-(t(this,b)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-be,i)}}shiftSections(e,i){t(this,o).length&&this.scrollToSection(t(this,g).current+e,i)}setPosition(e,i){i!=null&&i.tween?(t(this,_).set(t(this,a).current,{equalize:!0}),t(this,_).set(e,ne({},i.tween))):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(){h(this,a,new Pe.Damped(0,{damping:.01,min:0,order:Kt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,I,new Wt.WheelControls({element:t(this,p)})),t(this,I).changeEvent.subscribe(t(this,Pt)),h(this,J,new Wt.KeyboardControls({element:this})),t(this,J).changeEvent.subscribe(t(this,Pt)),h(this,B,new Wt.DragControls({element:t(this,p)})),t(this,B).changeEvent.subscribe(t(this,Pt)),h(this,C,new Wt.AutoplayControls({culling:this})),t(this,C).changeEvent.subscribe(t(this,Tt)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,I).axis=t(this,N).current?"max":e,t(this,J).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,N).subscribe(e=>{t(this,I).axis=e.current?"max":t(this,x).current}),t(this,T).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,D).subscribe(({current:e})=>{this.isConnected&&(e?d(this,l,qt).call(this):d(this,l,mt).call(this))}),t(this,O).subscribe(e=>{t(this,I).debounce=e.current,t(this,B).swipe=e.current,t(this,C).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,$).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,o).length?d(this,l,qt).call(this):!e.current&&e.previous&&t(this,o).length&&d(this,l,mt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,l,et).call(this))}),t(this,E).subscribe(e=>{e.current?(this.isConnected&&(t(this,o).length||(t(this,D).current=!0)),t(this,o).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Ct,0),t(this,a).max=t(this,b),t(this,a).min=0)}),t(this,rt).subscribe(e=>{t(this,a).damping=e.current}),t(this,nt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ht).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,ut).subscribe(e=>{e.current&&!e.previous?d(this,l,Zt).call(this):!e.current&&e.previous&&d(this,l,Jt).call(this)}),t(this,at).subscribe(e=>{e.current&&!e.previous?d(this,l,Qt).call(this):!e.current&&e.previous&&d(this,l,Xt).call(this)}),t(this,k).subscribe(e=>{t(this,C).speed=e.current,e.current&&!e.previous?t(this,C).connect():!e.current&&e.previous&&t(this,C).disconnect()}),t(this,j).subscribe(e=>{e.current||(t(this,C).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,l,et).call(this)}),t(this,G).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,et).call(this)}),t(this,V).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,l,et).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,o).length&&d(this,l,et).call(this)}),t(this,_).subscribe(e=>{t(this,_).isRunning.current&&t(this,a).set(e.current)}),t(this,it).observe(),t(this,x).observe(),t(this,M).observe(),t(this,T).observe(),t(this,D).observe(),t(this,O).observe(),t(this,$).observe(),t(this,N).observe(),t(this,q).observe(),t(this,E).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,yt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,lt).observe(),t(this,j).observe(),t(this,R).observe(),t(this,G).observe(),t(this,V).observe(),t(this,K).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,at).observe(),d(this,l,Xt).call(this)}disconnectedCallback(){this.setAttribute("tabindex",""),t(this,it).unobserve(),t(this,x).unobserve(),t(this,M).unobserve(),t(this,T).unobserve(),t(this,D).unobserve(),t(this,O).unobserve(),t(this,$).unobserve(),t(this,N).unobserve(),t(this,q).unobserve(),t(this,E).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),t(this,yt).unobserve(),t(this,k).unobserve(),t(this,lt).unobserve(),t(this,j).unobserve(),t(this,R).unobserve(),t(this,G).unobserve(),t(this,V).unobserve(),t(this,K).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),d(this,l,Qt).call(this)}}a=new WeakMap,it=new WeakMap,x=new WeakMap,M=new WeakMap,T=new WeakMap,D=new WeakMap,O=new WeakMap,$=new WeakMap,N=new WeakMap,q=new WeakMap,E=new WeakMap,rt=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,yt=new WeakMap,k=new WeakMap,lt=new WeakMap,j=new WeakMap,R=new WeakMap,G=new WeakMap,V=new WeakMap,K=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,Z=new WeakMap,p=new WeakMap,vt=new WeakMap,o=new WeakMap,It=new WeakMap,At=new WeakMap,v=new WeakMap,b=new WeakMap,z=new WeakMap,I=new WeakMap,J=new WeakMap,B=new WeakMap,C=new WeakMap,g=new WeakMap,Ct=new WeakMap,Q=new WeakMap,dt=new WeakMap,pt=new WeakMap,Et=new WeakMap,_=new WeakMap,l=new WeakSet,qt=function(){d(this,l,mt).call(this),t(this,vt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,o).push(new De(e,i,this))}),t(this,p).style.transform="",Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,l,et).call(this)},mt=function(){t(this,o).forEach(e=>{e.destroy()}),h(this,o,[]),t(this,g).current=0,t(this,a).reset(),Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Zt=function(){t(this,dt)||(h(this,dt,!0),t(this,a).unsubscribe(t(this,Mt)),t(this,a).unlistenAnimationFrame(),t(this,I).disconnect(),t(this,J).disconnect(),t(this,B).disconnect(),t(this,C).disconnect(),clearInterval(t(this,Et)),t(this,_).unlistenAnimationFrame())},Jt=function(){t(this,dt)&&(h(this,dt,!1),t(this,a).subscribe(t(this,Mt)),t(this,I).connect(),t(this,J).connect(),t(this,B).connect(),t(this,k).current&&t(this,C).connect())},Qt=function(){t(this,pt)||(h(this,pt,!0),Ut.windowResizer.unsubscribe(t(this,L)),$t.elementResizer.unsubscribe(t(this,L)),t(this,a).reset(),d(this,l,Zt).call(this),t(this,p).style.transform="",t(this,D).current&&d(this,l,mt).call(this),gt.scrollEntries.unregister(this))},Xt=function(){t(this,pt)&&(h(this,pt,!1),t(this,D).current&&d(this,l,qt).call(this),gt.scrollEntries.register(this),Ut.windowResizer.subscribe(t(this,L),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,L)),d(this,l,Jt).call(this))},L=new WeakMap,Mt=new WeakMap,ue=function(e){t(this,E).current?(t(this,g).current=e%t(this,o).length,t(this,g).current=t(this,g).current<0?t(this,o).length+t(this,g).current:t(this,g).current):t(this,g).current=le.clamp(e,0,this.limit)},Pt=new WeakMap,Tt=new WeakMap,Yt=function(e="current"){if(t(this,E).current&&t(this,o).length){const i=t(this,a)[e]%(t(this,b)+t(this,v)+t(this,z));return i<0?t(this,b)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},et=function(){if(t(this,R).current&&t(this,o).length){const e=t(this,g).current+t(this,G).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,q).current+t(this,V).current;t(this,o).forEach((r,c)=>{const m=e-this.limit-1+t(this,V).current,w=e+i,ft=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+ft/2||c<=m+i?r.mark("next"):r.mark("previous")})}},te=function(){let e=null,i=1/0;for(let r=0;r<t(this,o).length;r++){const c=Math.abs(t(this,o)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,o)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Dt);var Ot;class ee extends HTMLElement{constructor(){super(...arguments);s(this,Ot,null)}get scrollElement(){return t(this,Ot)}connectedCallback(){const e=ce.findParentElement(this,Dt);e instanceof Dt?h(this,Ot,e):console.error(this,"e-scroll not found")}}Ot=new WeakMap;var X,P,H,F,wt,xt,St,Vt,Bt,_t;class ae extends ee{constructor(){super();s(this,X,null);s(this,P,null);s(this,H,!1);s(this,F,0);s(this,wt,0);s(this,xt,0);s(this,St,()=>{h(this,H,this.offsetWidth>this.offsetHeight);const e=t(this,H)?this.offsetWidth:this.offsetHeight;h(this,F,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,F,Math.max(t(this,F),30)),t(this,H)?(t(this,P).style.width=t(this,F)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,F)+"px"),h(this,wt,e-t(this,F)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Vt,()=>{h(this,xt,this.scrollElement.currentProgress*t(this,wt)),t(this,H)?t(this,P).style.transform=`translate3d(${t(this,xt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,xt)}px, 0px)`});s(this,Bt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,_t,e=>{document.documentElement.classList.add("grabbing"),ze.setupDrag(c=>{const m=t(this,H)?c.x:c.y,w=this.scrollElement.distance/t(this,wt),ft=(m-r)*w;this.scrollElement.setPosition(i+ft)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,H)?e.x:e.y});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(oe.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:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,X,document.createElement("slot")),t(this,X).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,X))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,X).assignedElements()[0]||t(this,X).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,_t)),Ut.windowResizer.subscribe(t(this,St),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,St)),this.scrollElement.onScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Bt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,_t)),Ut.windowResizer.unsubscribe(t(this,St)),$t.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Bt))}}X=new WeakMap,P=new WeakMap,H=new WeakMap,F=new WeakMap,wt=new WeakMap,xt=new WeakMap,St=new WeakMap,Vt=new WeakMap,Bt=new WeakMap,_t=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",ae);class de extends ee{constructor(){super(),Nt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class pe extends de{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",pe);class Se extends de{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",Se);var W,Y,zt,Ht,Ft,Lt;class Re{constructor(n,e,i){s(this,W,null);s(this,Y,null);s(this,zt,null);s(this,Ht,null);s(this,Ft,()=>{t(this,Y).scrollToSection(t(this,zt),{behaviour:t(this,Ht)})});s(this,Lt,()=>{t(this,W).classList.toggle("current",t(this,Y).counter.current===t(this,zt))});Nt.isBrowser&&(h(this,W,document.createElement("button")),h(this,Y,n),h(this,Ht,i),h(this,zt,e),t(this,W).addEventListener("click",t(this,Ft)),t(this,Y).counter.subscribe(t(this,Lt)),t(this,Lt).call(this))}get element(){return t(this,W)}destroy(){t(this,W).removeEventListener("click",t(this,Ft)),t(this,Y).counter.unsubscribe(t(this,Lt)),t(this,W).remove()}}W=new WeakMap,Y=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Ft=new WeakMap,Lt=new WeakMap;var tt,kt;class fe extends ee{constructor(){super(...arguments);s(this,tt,[]);s(this,kt,Le.debounce(()=>{t(this,tt).forEach(e=>e.destroy()),h(this,tt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Re(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,tt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,kt)),t(this,kt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,kt)),t(this,tt).forEach(e=>e.destroy()),h(this,tt,[])}}tt=new WeakMap,kt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",fe);class me extends ke.ScrollSegmentElement{connectedCallback(){const n=ce.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",me);exports.ScrollBulletButtonsElement=fe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=me;exports.ScrollSetButtonElement=pe;exports.ScrollStepButtonElement=Se;exports.ScrollbarElement=ae;
1
+ "use strict";var ye=Object.defineProperty;var ie=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable;var ne=u=>{throw TypeError(u)};var re=(u,n,e)=>n in u?ye(u,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[n]=e,he=(u,n)=>{for(var e in n||(n={}))ve.call(n,e)&&re(u,e,n[e]);if(ie)for(var e of ie(n))Ce.call(n,e)&&re(u,e,n[e]);return u};var jt=(u,n,e)=>n.has(u)||ne("Cannot "+e);var t=(u,n,e)=>(jt(u,n,"read from private field"),e?e.call(u):n.get(u)),s=(u,n,e)=>n.has(u)?ne("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(u):n.set(u,e),h=(u,n,e,i)=>(jt(u,n,"write to private field"),i?i.call(u,e):n.set(u,e),e),d=(u,n,e)=>(jt(u,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ee=require("../../Store-CDb6RMce.cjs"),Nt=require("../../browser-CpzFX2xg.cjs"),Pe=require("../../easings-DsS5-Kqc.cjs"),Gt=require("../../events-KVanG9sR.cjs"),le=require("../../jss-GJLvaNfT.cjs"),bt=require("../../layout-8ryRAMGJ.cjs"),ce=require("../../math-GDWEqu7y.cjs");require("../../ticker/vanilla/index.cjs");const Kt=require("../../order/index.cjs"),we=require("../../Damped-CTsV8tl_.cjs"),xe=require("../../Tweened-BttGiyB0.cjs"),Wt=require("../../controls/index.cjs"),Ut=require("../../window-resizer/vanilla/index.cjs"),gt=require("../../scroll-entries/index.cjs"),oe=require("../../css-unit-parser/index.cjs"),S=require("../../css-property/index.cjs"),ze=require("../../device/index.cjs"),$t=require("../../element-resizer/vanilla/index.cjs"),Le=require("../../gestures-DHLrn6Q8.cjs"),ue=require("../../dom-JBOkFLTh.cjs"),ke=require("../../function-MthRj-GJ.cjs"),De=require("../../scroll-segment/index.cjs");var f,Rt,y,st,I,U;class qe{constructor(n,e,i){s(this,f);s(this,Rt);s(this,y);s(this,st,0);s(this,I,0);s(this,U,null);h(this,f,n),h(this,Rt,e),h(this,y,i),gt.scrollEntries.register(t(this,f))}get index(){return t(this,Rt)}get size(){return t(this,st)}get position(){return t(this,I)}destroy(){gt.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){h(this,st,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),h(this,I,t(this,y).vertical?bt.getCumulativeOffsetTop(t(this,f)):bt.getCumulativeOffsetLeft(t(this,f))),h(this,I,t(this,I)-t(this,y).contentPosition)}transform(){let n=0;const e=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,I)+t(this,st)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),gt.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const i=t(this,y).currentScrollValue+n,r=t(this,I)-t(this,y).viewportSize-e,c=t(this,I)+t(this,st)+e,m=ce.clamp(i,r,c);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${m*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${m*-1}px, 0px, 0px)`}mark(n){t(this,U)!==n&&(t(this,U)&&t(this,f).classList.remove(t(this,U)),n&&t(this,f).classList.add(n),h(this,U,n),Gt.dispatchEvent(t(this,f),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,U)},custom:!0}))}}f=new WeakMap,Rt=new WeakMap,y=new WeakMap,st=new WeakMap,I=new WeakMap,U=new WeakMap;const Re=le.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".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="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,it,x,T,M,D,O,$,N,q,E,rt,nt,ht,ot,yt,k,lt,j,R,G,V,K,ct,ut,at,Z,p,vt,l,At,It,v,b,z,A,J,B,C,g,Ct,Q,dt,pt,Et,_,o,qt,mt,Zt,Jt,Qt,Xt,L,Tt,ae,Pt,Mt,Yt,te,et,ee;class Dt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,it,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,T,new S.CSSProperty(this,"--direction",0));s(this,M,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,D,new S.CSSProperty(this,"--split",!1));s(this,O,new S.CSSProperty(this,"--sectional",!1));s(this,$,new S.CSSProperty(this,"--auto-size",!1));s(this,N,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,q,new S.CSSProperty(this,"--sections-in-view",1));s(this,E,new S.CSSProperty(this,"--loop",!1));s(this,rt,new S.CSSProperty(this,"--damping",20));s(this,nt,new S.CSSProperty(this,"--mass",0));s(this,ht,new S.CSSProperty(this,"--stiffness",0));s(this,ot,new S.CSSProperty(this,"--mouse-drag",!1));s(this,yt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,k,new S.CSSProperty(this,"--autoplay",0));s(this,lt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,j,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new S.CSSProperty(this,"--classes",!1));s(this,G,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,V,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,K,new S.CSSProperty(this,"--focus-delay",0));s(this,ct,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ut,new S.CSSProperty(this,"--disabled",!1));s(this,at,new S.CSSProperty(this,"--hibernated",!1));s(this,Z,null);s(this,p,null);s(this,vt,null);s(this,l,[]);s(this,At,0);s(this,It,0);s(this,v,0);s(this,b,0);s(this,z,0);s(this,A,null);s(this,J,null);s(this,B,null);s(this,C,null);s(this,g,new Ee.Store(0));s(this,Ct,0);s(this,Q,0);s(this,dt,!0);s(this,pt,!0);s(this,Et);s(this,_,new xe.Tweened);s(this,L,()=>{t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,b)||0,i=t(this,g).current;if(h(this,At,this.vertical?bt.getCumulativeOffsetTop(this):bt.getCumulativeOffsetLeft(this)),h(this,It,this.vertical?bt.getCumulativeOffsetTop(t(this,p)):bt.getCumulativeOffsetLeft(t(this,p))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,z,oe.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):h(this,z,oe.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,$).current&&t(this,l).length){const r=t(this,q).current,c=(t(this,v)-t(this,z)*(r-1))/r;t(this,l).forEach(m=>{m.setSize(c)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,M).current){h(this,b,t(this,v)*t(this,M).current);const r=t(this,b)+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",h(this,b,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",h(this,b,t(this,p).offsetWidth-t(this,v)));if(!t(this,E).current){const r=getComputedStyle(this),c=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,b,t(this,b)+c),t(this,a).max=t(this,b)}if(t(this,E).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],c=r.position+r.size-t(this,v),m=t(this,b)-c;h(this,Q,r.position+r.size+m)}else h(this,Q,t(this,b));if(t(this,O).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,b),{equalize:!0})});s(this,Tt,()=>{const e=this.currentScrollValue;if(h(this,Ct,Math.max(0,e-t(this,b))),t(this,l).length){let i=0;for(let r=0;r<t(this,l).length;r++){const c=t(this,l)[r];c.transform(),this.targetScrollValue+c.size/2>=c.position&&(i=r)}t(this,g).current=i}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)`;gt.scrollEntries.update(this,t(this,x).current,e)});s(this,Pt,(e,i)=>{t(this,it).current&&(d(this,o,Yt).call(this),t(this,Mt).call(this,e,i))});s(this,Mt,(e,i)=>{if(t(this,T).current){if(t(this,T).current<0&&i>0)return;if(t(this,T).current>0&&i<0)return}if(t(this,_).unlistenAnimationFrame(),!t(this,k).current&&t(this,K).current&&(clearInterval(t(this,Et)),h(this,Et,setTimeout(()=>{const r=d(this,o,ee).call(this);r&&this.scrollToSection(r.index,{tween:{duration:t(this,ct).current,easing:Pe.easeInOutExpo}})},t(this,K).current))),!(e==="drag"&&!ze.device.isMobile&&!t(this,ot).current))if(t(this,O).current){const r=Math.sign(i);t(this,l).length?this.shiftSections(r):t(this,a).shift(r*t(this,v))}else t(this,a).shift(i)});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Re);const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,Z,document.createElement("div")),t(this,Z).className="content-wrapper",h(this,p,document.createElement("div")),t(this,p).className="content",h(this,vt,document.createElement("slot")),t(this,p).appendChild(t(this,vt)),t(this,Z).appendChild(t(this,p)),e.appendChild(t(this,Z))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,it)}get axisCSSProperty(){return t(this,x)}get directionCSSProperty(){return t(this,T)}get pagesCSSProperty(){return t(this,M)}get splitCSSProperty(){return t(this,D)}get sectionalCSSProperty(){return t(this,O)}get autoSizeCSSProperty(){return t(this,$)}get wheelMaxDeltaCSSProperty(){return t(this,N)}get sectionsInViewCSSProperty(){return t(this,q)}get loopCSSProperty(){return t(this,E)}get dampingCSSProperty(){return t(this,rt)}get massCSSProperty(){return t(this,nt)}get stiffnessCSSProperty(){return t(this,ht)}get mouseDragCSSProperty(){return t(this,ot)}get sectionDistanceScaleCSSProperty(){return t(this,yt)}get autoplayCSSProperty(){return t(this,k)}get autoplayPauseDurationCSSProperty(){return t(this,lt)}get autoplayUserDirectionCSSProperty(){return t(this,j)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,G)}get currentIndexEndOffsetCSSProperty(){return t(this,V)}get focusDelayCSSProperty(){return t(this,K)}get focusDurationCSSProperty(){return t(this,ct)}get disabledCSSProperty(){return t(this,ut)}get hibernatedCSSProperty(){return t(this,at)}get currentScrollValue(){return d(this,o,te).call(this,"current")}get targetScrollValue(){return d(this,o,te).call(this,"target")}get contentWrapperElement(){return t(this,Z)}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,At)}get contentPosition(){return t(this,It)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,b)}get gap(){return t(this,z)}get counter(){return t(this,g)}get limit(){return t(this,l).length-t(this,q).current}get distance(){return t(this,Q)}get loopDistance(){return t(this,E).current?t(this,Q)+t(this,z):t(this,Q)}get overscroll(){return t(this,Ct)}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 c=e-r,m=c+i+r*2;return this.currentProgress<c?0:this.currentProgress>m?1:(this.currentProgress-c)/(m-c)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const c=e-r,m=c+i+r*2;return this.currentProgress>=c&&this.currentProgress<=m}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,g).current;d(this,o,ae).call(this,e);const c=t(this,l)[r],m=t(this,l)[t(this,g).current];if(c&&m){let w=0;const ft=d(this,o,ee).call(this),ge=ft?this.targetScrollValue-ft.position:0;t(this,E).current?t(this,g).current===0&&r===t(this,l).length-1?w=t(this,b)+t(this,v)-c.position+t(this,z):t(this,g).current===t(this,l).length-1&&r===0?w=m.position-(t(this,b)+t(this,v)+t(this,z)):w=m.position-c.position:w=m.position-c.position,this.shiftPosition(w-ge,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,g).current+e,i)}setPosition(e,i){d(this,o,Yt).call(this),i!=null&&i.tween?(t(this,_).set(t(this,a).current,{equalize:!0}),t(this,_).set(e,he({},i.tween))):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(){h(this,a,new we.Damped(0,{damping:.01,min:0,order:Kt.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,A,new Wt.WheelControls({element:t(this,p)})),t(this,A).changeEvent.subscribe(t(this,Pt)),h(this,J,new Wt.KeyboardControls({element:this})),t(this,J).changeEvent.subscribe(t(this,Pt)),h(this,B,new Wt.DragControls({element:t(this,p)})),t(this,B).changeEvent.subscribe(t(this,Pt)),h(this,C,new Wt.AutoplayControls({culling:this})),t(this,C).changeEvent.subscribe(t(this,Mt)),t(this,x).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,A).axis=t(this,N).current?"max":e,t(this,J).dimension=e==="x"?"width":"height",t(this,B).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,L).call(this)}),t(this,N).subscribe(e=>{t(this,A).axis=e.current?"max":t(this,x).current}),t(this,M).subscribe(()=>{this.isConnected&&t(this,L).call(this)}),t(this,D).subscribe(({current:e})=>{this.isConnected&&(e?d(this,o,qt).call(this):d(this,o,mt).call(this))}),t(this,O).subscribe(e=>{t(this,A).debounce=e.current,t(this,B).swipe=e.current,t(this,C).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?d(this,o,qt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,mt).call(this))}),t(this,$).subscribe(e=>{this.isConnected&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,l).length?d(this,o,qt).call(this):!e.current&&e.previous&&t(this,l).length&&d(this,o,mt).call(this))}),t(this,q).subscribe(e=>{this.isConnected&&(t(this,L).call(this),d(this,o,et).call(this))}),t(this,E).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,D).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(h(this,Ct,0),t(this,a).max=t(this,b),t(this,a).min=0)}),t(this,rt).subscribe(e=>{t(this,a).damping=e.current}),t(this,nt).subscribe(e=>{t(this,a).mass=e.current}),t(this,ht).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,ut).subscribe(e=>{e.current&&!e.previous?d(this,o,Zt).call(this):!e.current&&e.previous&&d(this,o,Jt).call(this)}),t(this,at).subscribe(e=>{e.current&&!e.previous?d(this,o,Qt).call(this):!e.current&&e.previous&&d(this,o,Xt).call(this)}),t(this,k).subscribe(e=>{t(this,C).speed=e.current,e.current&&!e.previous?t(this,C).connect():!e.current&&e.previous&&t(this,C).disconnect()}),t(this,j).subscribe(e=>{e.current||(t(this,C).direction=1)}),t(this,R).subscribe(e=>{this.isConnected&&d(this,o,et).call(this)}),t(this,G).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,et).call(this)}),t(this,V).subscribe(e=>{this.isConnected&&t(this,R).current&&d(this,o,et).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,l).length&&d(this,o,et).call(this)}),t(this,_).subscribe(e=>{t(this,_).isRunning.current&&t(this,a).set(e.current)}),t(this,it).observe(),t(this,x).observe(),t(this,T).observe(),t(this,M).observe(),t(this,D).observe(),t(this,O).observe(),t(this,$).observe(),t(this,N).observe(),t(this,q).observe(),t(this,E).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,yt).observe(),t(this,k).observe(),t(this,k).observe(),t(this,lt).observe(),t(this,j).observe(),t(this,R).observe(),t(this,G).observe(),t(this,V).observe(),t(this,K).observe(),t(this,ct).observe(),t(this,ut).observe(),t(this,at).observe(),d(this,o,Xt).call(this)}disconnectedCallback(){this.setAttribute("tabindex",""),t(this,it).unobserve(),t(this,x).unobserve(),t(this,T).unobserve(),t(this,M).unobserve(),t(this,D).unobserve(),t(this,O).unobserve(),t(this,$).unobserve(),t(this,N).unobserve(),t(this,q).unobserve(),t(this,E).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,ht).unobserve(),t(this,ot).unobserve(),t(this,yt).unobserve(),t(this,k).unobserve(),t(this,lt).unobserve(),t(this,j).unobserve(),t(this,R).unobserve(),t(this,G).unobserve(),t(this,V).unobserve(),t(this,K).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),d(this,o,Qt).call(this)}}a=new WeakMap,it=new WeakMap,x=new WeakMap,T=new WeakMap,M=new WeakMap,D=new WeakMap,O=new WeakMap,$=new WeakMap,N=new WeakMap,q=new WeakMap,E=new WeakMap,rt=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,yt=new WeakMap,k=new WeakMap,lt=new WeakMap,j=new WeakMap,R=new WeakMap,G=new WeakMap,V=new WeakMap,K=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,Z=new WeakMap,p=new WeakMap,vt=new WeakMap,l=new WeakMap,At=new WeakMap,It=new WeakMap,v=new WeakMap,b=new WeakMap,z=new WeakMap,A=new WeakMap,J=new WeakMap,B=new WeakMap,C=new WeakMap,g=new WeakMap,Ct=new WeakMap,Q=new WeakMap,dt=new WeakMap,pt=new WeakMap,Et=new WeakMap,_=new WeakMap,o=new WeakSet,qt=function(){d(this,o,mt).call(this),t(this,vt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new qe(e,i,this))}),t(this,p).style.transform="",Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),d(this,o,et).call(this)},mt=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,g).current=0,t(this,a).reset(),Gt.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},Zt=function(){t(this,dt)||(h(this,dt,!0),t(this,a).unsubscribe(t(this,Tt)),t(this,a).unlistenAnimationFrame(),t(this,A).disconnect(),t(this,J).disconnect(),t(this,B).disconnect(),t(this,C).disconnect(),clearInterval(t(this,Et)),t(this,_).unlistenAnimationFrame())},Jt=function(){t(this,dt)&&(h(this,dt,!1),t(this,a).subscribe(t(this,Tt)),t(this,A).connect(),t(this,J).connect(),t(this,B).connect(),t(this,k).current&&t(this,C).connect())},Qt=function(){t(this,pt)||(h(this,pt,!0),Ut.windowResizer.unsubscribe(t(this,L)),$t.elementResizer.unsubscribe(t(this,L)),t(this,a).reset(),d(this,o,Zt).call(this),t(this,p).style.transform="",t(this,D).current&&d(this,o,mt).call(this),gt.scrollEntries.unregister(this))},Xt=function(){t(this,pt)&&(h(this,pt,!1),t(this,D).current&&d(this,o,qt).call(this),gt.scrollEntries.register(this),Ut.windowResizer.subscribe(t(this,L),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,L)),d(this,o,Jt).call(this))},L=new WeakMap,Tt=new WeakMap,ae=function(e){t(this,E).current?(t(this,g).current=e%t(this,l).length,t(this,g).current=t(this,g).current<0?t(this,l).length+t(this,g).current:t(this,g).current):t(this,g).current=ce.clamp(e,0,this.limit)},Pt=new WeakMap,Mt=new WeakMap,Yt=function(e=1){t(this,j).current&&(t(this,C).direction=e),t(this,k).current&&t(this,C).pauseAndContinue(t(this,lt).current,this.sectionalCSSProperty.current)},te=function(e="current"){if(t(this,E).current&&t(this,l).length){const i=t(this,a)[e]%(t(this,b)+t(this,v)+t(this,z));return i<0?t(this,b)+i+t(this,v)+t(this,z):i}else return t(this,a)[e]},et=function(){if(t(this,R).current&&t(this,l).length){const e=t(this,g).current+t(this,G).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const i=t(this,q).current+t(this,V).current;t(this,l).forEach((r,c)=>{const m=e-this.limit-1+t(this,V).current,w=e+i,ft=this.sections.length-w;c>=e&&c<w||c<=m?r.mark("current"):c>=w&&c<w+ft/2||c<=m+i?r.mark("next"):r.mark("previous")})}},ee=function(){let e=null,i=1/0;for(let r=0;r<t(this,l).length;r++){const c=Math.abs(t(this,l)[r].position-this.targetScrollValue);c<i&&(i=c,e=r)}return e!==null?t(this,l)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Dt);var Ot;class se extends HTMLElement{constructor(){super(...arguments);s(this,Ot,null)}get scrollElement(){return t(this,Ot)}connectedCallback(){const e=ue.findParentElement(this,Dt);e instanceof Dt?h(this,Ot,e):console.error(this,"e-scroll not found")}}Ot=new WeakMap;var X,P,H,F,wt,xt,St,Vt,Bt,_t;class de extends se{constructor(){super();s(this,X,null);s(this,P,null);s(this,H,!1);s(this,F,0);s(this,wt,0);s(this,xt,0);s(this,St,()=>{h(this,H,this.offsetWidth>this.offsetHeight);const e=t(this,H)?this.offsetWidth:this.offsetHeight;h(this,F,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,F,Math.max(t(this,F),30)),t(this,H)?(t(this,P).style.width=t(this,F)+"px",t(this,P).style.height="100%"):(t(this,P).style.width="100%",t(this,P).style.height=t(this,F)+"px"),h(this,wt,e-t(this,F)),this.scrollElement.scrollSize||(this.style.display="none")});s(this,Vt,()=>{h(this,xt,this.scrollElement.currentProgress*t(this,wt)),t(this,H)?t(this,P).style.transform=`translate3d(${t(this,xt)}px, 0px, 0px)`:t(this,P).style.transform=`translate3d(0px, ${t(this,xt)}px, 0px)`});s(this,Bt,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,_t,e=>{document.documentElement.classList.add("grabbing"),Le.setupDrag(c=>{const m=t(this,H)?c.x:c.y,w=this.scrollElement.distance/t(this,wt),ft=(m-r)*w;this.scrollElement.setPosition(i+ft)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,H)?e.x:e.y});if(Nt.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(le.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:"black",borderRadius:"0.3vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})),h(this,X,document.createElement("slot")),t(this,X).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,X))}}get thumbElement(){return t(this,P)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,X).assignedElements()[0]||t(this,X).firstElementChild;h(this,P,e),t(this,P).addEventListener("pointerdown",t(this,_t)),Ut.windowResizer.subscribe(t(this,St),Kt.RESIZE_ORDER.SCROLL),$t.elementResizer.subscribe(this,t(this,St)),this.scrollElement.onScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Bt))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),t(this,P).removeEventListener("pointerdown",t(this,_t)),Ut.windowResizer.unsubscribe(t(this,St)),$t.elementResizer.unsubscribe(t(this,St)),this.scrollElement.offScroll(t(this,Vt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Bt))}}X=new WeakMap,P=new WeakMap,H=new WeakMap,F=new WeakMap,wt=new WeakMap,xt=new WeakMap,St=new WeakMap,Vt=new WeakMap,Bt=new WeakMap,_t=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",de);class pe extends se{constructor(){super(),Nt.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class Se extends pe{handleClick(){const n=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",Se);class fe extends pe{handleClick(){const n=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",fe);var W,Y,zt,Ht,Ft,Lt;class Ae{constructor(n,e,i){s(this,W,null);s(this,Y,null);s(this,zt,null);s(this,Ht,null);s(this,Ft,()=>{t(this,Y).scrollToSection(t(this,zt),{behaviour:t(this,Ht)})});s(this,Lt,()=>{t(this,W).classList.toggle("current",t(this,Y).counter.current===t(this,zt))});Nt.isBrowser&&(h(this,W,document.createElement("button")),h(this,Y,n),h(this,Ht,i),h(this,zt,e),t(this,W).addEventListener("click",t(this,Ft)),t(this,Y).counter.subscribe(t(this,Lt)),t(this,Lt).call(this))}get element(){return t(this,W)}destroy(){t(this,W).removeEventListener("click",t(this,Ft)),t(this,Y).counter.unsubscribe(t(this,Lt)),t(this,W).remove()}}W=new WeakMap,Y=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Ft=new WeakMap,Lt=new WeakMap;var tt,kt;class me extends se{constructor(){super(...arguments);s(this,tt,[]);s(this,kt,ke.debounce(()=>{t(this,tt).forEach(e=>e.destroy()),h(this,tt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Ae(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),t(this,tt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,kt)),t(this,kt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,kt)),t(this,tt).forEach(e=>e.destroy()),h(this,tt,[])}}tt=new WeakMap,kt=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",me);class be extends De.ScrollSegmentElement{connectedCallback(){const n=ue.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries)):console.error(this,"e-scroll not found")}}customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",be);exports.ScrollBulletButtonsElement=me;exports.ScrollElement=Dt;exports.ScrollSegmentElement=be;exports.ScrollSetButtonElement=Se;exports.ScrollStepButtonElement=fe;exports.ScrollbarElement=de;
@@ -1,43 +1,43 @@
1
- var pe = Object.defineProperty;
2
- var ee = Object.getOwnPropertySymbols;
3
- var me = Object.prototype.hasOwnProperty, fe = Object.prototype.propertyIsEnumerable;
4
- var ie = (a) => {
1
+ var me = Object.defineProperty;
2
+ var se = Object.getOwnPropertySymbols;
3
+ var fe = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
4
+ var re = (a) => {
5
5
  throw TypeError(a);
6
6
  };
7
- var se = (a, n, e) => n in a ? pe(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, re = (a, n) => {
7
+ var ie = (a, n, e) => n in a ? me(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, ne = (a, n) => {
8
8
  for (var e in n || (n = {}))
9
- me.call(n, e) && se(a, e, n[e]);
10
- if (ee)
11
- for (var e of ee(n))
12
- fe.call(n, e) && se(a, e, n[e]);
9
+ fe.call(n, e) && ie(a, e, n[e]);
10
+ if (se)
11
+ for (var e of se(n))
12
+ be.call(n, e) && ie(a, e, n[e]);
13
13
  return a;
14
14
  };
15
- var Ut = (a, n, e) => n.has(a) || ie("Cannot " + e);
16
- var t = (a, n, e) => (Ut(a, n, "read from private field"), e ? e.call(a) : n.get(a)), s = (a, n, e) => n.has(a) ? ie("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(a) : n.set(a, e), h = (a, n, e, i) => (Ut(a, n, "write to private field"), i ? i.call(a, e) : n.set(a, e), e), d = (a, n, e) => (Ut(a, n, "access private method"), e);
17
- import { S as be } from "../../Store-OTdcl6SX.js";
15
+ var Ut = (a, n, e) => n.has(a) || re("Cannot " + e);
16
+ var t = (a, n, e) => (Ut(a, n, "read from private field"), e ? e.call(a) : n.get(a)), s = (a, n, e) => n.has(a) ? re("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(a) : n.set(a, e), h = (a, n, e, i) => (Ut(a, n, "write to private field"), i ? i.call(a, e) : n.set(a, e), e), d = (a, n, e) => (Ut(a, n, "access private method"), e);
17
+ import { S as Se } from "../../Store-OTdcl6SX.js";
18
18
  import { i as qt } from "../../browser-0zX67oeU.js";
19
- import { p as Se } from "../../easings-BKi40vHz.js";
19
+ import { p as ge } from "../../easings-BKi40vHz.js";
20
20
  import { d as Gt } from "../../events-CsVF98U6.js";
21
- import { c as he } from "../../jss-CjccJC-K.js";
21
+ import { c as oe } from "../../jss-CjccJC-K.js";
22
22
  import { a as Kt, g as _t } from "../../layout-HoBT_Da2.js";
23
- import { c as oe } from "../../math-BOBiC4TN.js";
23
+ import { c as le } from "../../math-BOBiC4TN.js";
24
24
  import "../../ticker/vanilla/index.js";
25
- import { TICK_ORDER as ge, RESIZE_ORDER as le } from "../../order/index.js";
26
- import { D as ve } from "../../Damped-Chu29wn-.js";
27
- import { T as ye } from "../../Tweened-BUuSLSF7.js";
28
- import { WheelControls as Ce, KeyboardControls as Ee, DragControls as xe, AutoplayControls as we } from "../../controls/index.js";
25
+ import { TICK_ORDER as ve, RESIZE_ORDER as ce } from "../../order/index.js";
26
+ import { D as ye } from "../../Damped-Chu29wn-.js";
27
+ import { T as Ce } from "../../Tweened-BUuSLSF7.js";
28
+ import { WheelControls as Ee, KeyboardControls as xe, DragControls as we, AutoplayControls as Pe } from "../../controls/index.js";
29
29
  import { windowResizer as $t } from "../../window-resizer/vanilla/index.js";
30
30
  import { scrollEntries as St } from "../../scroll-entries/index.js";
31
- import { cssUnitParser as ne } from "../../css-unit-parser/index.js";
31
+ import { cssUnitParser as he } from "../../css-unit-parser/index.js";
32
32
  import { CSSProperty as m } from "../../css-property/index.js";
33
- import { device as Pe } from "../../device/index.js";
33
+ import { device as Le } from "../../device/index.js";
34
34
  import { elementResizer as Nt } from "../../element-resizer/vanilla/index.js";
35
- import { s as Le } from "../../gestures-D2Fdra_G.js";
36
- import { f as ce } from "../../dom-0S_WDL4g.js";
37
- import { d as ze } from "../../function-C10DGppn.js";
38
- import { ScrollSegmentElement as ke } from "../../scroll-segment/index.js";
35
+ import { s as ze } from "../../gestures-D2Fdra_G.js";
36
+ import { f as ae } from "../../dom-0S_WDL4g.js";
37
+ import { d as ke } from "../../function-C10DGppn.js";
38
+ import { ScrollSegmentElement as De } from "../../scroll-segment/index.js";
39
39
  var f, At, v, st, T, q;
40
- class De {
40
+ class Ae {
41
41
  constructor(n, e, i) {
42
42
  s(this, f);
43
43
  s(this, At);
@@ -73,7 +73,7 @@ class De {
73
73
  t(this, v).axisCSSProperty.current,
74
74
  n
75
75
  );
76
- const i = t(this, v).currentScrollValue + n, r = t(this, T) - t(this, v).viewportSize - e, c = t(this, T) + t(this, st) + e, b = oe(i, r, c);
76
+ const i = t(this, v).currentScrollValue + n, r = t(this, T) - t(this, v).viewportSize - e, c = t(this, T) + t(this, st) + e, b = le(i, r, c);
77
77
  t(this, v).vertical ? t(this, f).style.transform = `translate3d(0px, ${b * -1}px, 0px)` : t(this, f).style.transform = `translate3d(${b * -1}px, 0px, 0px)`;
78
78
  }
79
79
  mark(n) {
@@ -87,7 +87,7 @@ class De {
87
87
  }
88
88
  }
89
89
  f = new WeakMap(), At = new WeakMap(), v = new WeakMap(), st = new WeakMap(), T = new WeakMap(), q = new WeakMap();
90
- const Ae = he({
90
+ const Ie = oe({
91
91
  ":host": {
92
92
  position: "relative",
93
93
  width: "100%",
@@ -125,11 +125,11 @@ const Ae = he({
125
125
  flexShrink: "0"
126
126
  }
127
127
  });
128
- var u, it, P, V, R, D, H, U, G, A, E, rt, nt, ht, ot, gt, k, lt, K, I, _, O, Z, ct, at, ut, j, p, vt, o, It, Mt, y, S, L, M, J, B, C, g, yt, Q, dt, pt, Ct, F, l, kt, bt, Zt, jt, Jt, Qt, z, Tt, ae, Et, Vt, Xt, et, Yt;
128
+ var u, it, P, V, R, D, H, U, G, A, E, rt, nt, ht, ot, gt, k, lt, K, I, _, O, Z, ct, at, ut, j, p, vt, l, It, Mt, y, S, L, M, J, B, C, g, yt, Q, dt, pt, Ct, F, o, kt, bt, Zt, jt, Jt, Qt, z, Tt, ue, Et, Vt, Xt, Yt, et, te;
129
129
  class Dt extends HTMLElement {
130
130
  constructor() {
131
131
  super();
132
- s(this, l);
132
+ s(this, o);
133
133
  s(this, u, null);
134
134
  s(this, it, new m(this, "--controls", !0));
135
135
  s(this, P, new m(this, "--axis", "y"));
@@ -193,7 +193,7 @@ class Dt extends HTMLElement {
193
193
  s(this, j, null);
194
194
  s(this, p, null);
195
195
  s(this, vt, null);
196
- s(this, o, []);
196
+ s(this, l, []);
197
197
  s(this, It, 0);
198
198
  s(this, Mt, 0);
199
199
  s(this, y, 0);
@@ -203,30 +203,30 @@ class Dt extends HTMLElement {
203
203
  s(this, J, null);
204
204
  s(this, B, null);
205
205
  s(this, C, null);
206
- s(this, g, new be(0));
206
+ s(this, g, new Se(0));
207
207
  s(this, yt, 0);
208
208
  s(this, Q, 0);
209
209
  s(this, dt, !0);
210
210
  s(this, pt, !0);
211
211
  s(this, Ct);
212
- s(this, F, new ye());
212
+ s(this, F, new Ce());
213
213
  s(this, z, () => {
214
214
  t(this, u).unlistenAnimationFrame();
215
215
  const e = this.currentScrollValue / t(this, S) || 0, i = t(this, g).current;
216
- if (h(this, It, this.vertical ? Kt(this) : _t(this)), h(this, Mt, this.vertical ? Kt(t(this, p)) : _t(t(this, p))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, L, ne.parse(
216
+ if (h(this, It, this.vertical ? Kt(this) : _t(this)), h(this, Mt, this.vertical ? Kt(t(this, p)) : _t(t(this, p))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, L, he.parse(
217
217
  getComputedStyle(t(this, p)).rowGap
218
- )) : h(this, L, ne.parse(
218
+ )) : h(this, L, he.parse(
219
219
  getComputedStyle(t(this, p)).columnGap
220
- )), t(this, U).current && t(this, o).length) {
220
+ )), t(this, U).current && t(this, l).length) {
221
221
  const r = t(this, A).current, c = (t(this, y) - t(this, L) * (r - 1)) / r;
222
- t(this, o).forEach((b) => {
222
+ t(this, l).forEach((b) => {
223
223
  b.setSize(c);
224
224
  });
225
225
  } else
226
- t(this, o).forEach((r) => {
226
+ t(this, l).forEach((r) => {
227
227
  r.setSize();
228
228
  });
229
- if (t(this, o).forEach((r) => {
229
+ if (t(this, l).forEach((r) => {
230
230
  r.resize();
231
231
  }), t(this, R).current) {
232
232
  h(this, S, t(this, y) * t(this, R).current);
@@ -238,13 +238,13 @@ class Dt extends HTMLElement {
238
238
  const r = getComputedStyle(this), c = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
239
239
  h(this, S, t(this, S) + c), t(this, u).max = t(this, S);
240
240
  }
241
- if (t(this, E).current && t(this, o).length) {
242
- const r = t(this, o)[t(this, o).length - 1], c = r.position + r.size - t(this, y), b = t(this, S) - c;
241
+ if (t(this, E).current && t(this, l).length) {
242
+ const r = t(this, l)[t(this, l).length - 1], c = r.position + r.size - t(this, y), b = t(this, S) - c;
243
243
  h(this, Q, r.position + r.size + b);
244
244
  } else
245
245
  h(this, Q, t(this, S));
246
- if (t(this, H).current && t(this, o).length) {
247
- const r = t(this, o)[i];
246
+ if (t(this, H).current && t(this, l).length) {
247
+ const r = t(this, l)[i];
248
248
  t(this, u).set(r.position, {
249
249
  equalize: !0
250
250
  });
@@ -255,10 +255,10 @@ class Dt extends HTMLElement {
255
255
  });
256
256
  s(this, Tt, () => {
257
257
  const e = this.currentScrollValue;
258
- if (h(this, yt, Math.max(0, e - t(this, S))), t(this, o).length) {
258
+ if (h(this, yt, Math.max(0, e - t(this, S))), t(this, l).length) {
259
259
  let i = 0;
260
- for (let r = 0; r < t(this, o).length; r++) {
261
- const c = t(this, o)[r];
260
+ for (let r = 0; r < t(this, l).length; r++) {
261
+ const c = t(this, l)[r];
262
262
  c.transform(), this.targetScrollValue + c.size / 2 >= c.position && (i = r);
263
263
  }
264
264
  t(this, g).current = i;
@@ -271,10 +271,7 @@ class Dt extends HTMLElement {
271
271
  );
272
272
  });
273
273
  s(this, Et, (e, i) => {
274
- t(this, it).current && (t(this, K).current && (t(this, C).direction = Math.sign(i) || 1), t(this, k).current && t(this, C).pauseAndContinue(
275
- t(this, lt).current,
276
- this.sectionalCSSProperty.current
277
- ), t(this, Vt).call(this, e, i));
274
+ t(this, it).current && (d(this, o, Xt).call(this), t(this, Vt).call(this, e, i));
278
275
  });
279
276
  s(this, Vt, (e, i) => {
280
277
  if (t(this, V).current) {
@@ -284,23 +281,23 @@ class Dt extends HTMLElement {
284
281
  return;
285
282
  }
286
283
  if (t(this, F).unlistenAnimationFrame(), !t(this, k).current && t(this, Z).current && (clearInterval(t(this, Ct)), h(this, Ct, setTimeout(() => {
287
- const r = d(this, l, Yt).call(this);
284
+ const r = d(this, o, te).call(this);
288
285
  r && this.scrollToSection(r.index, {
289
286
  tween: {
290
287
  duration: t(this, ct).current,
291
- easing: Se
288
+ easing: ge
292
289
  }
293
290
  });
294
- }, t(this, Z).current))), !(e === "drag" && !Pe.isMobile && !t(this, ot).current))
291
+ }, t(this, Z).current))), !(e === "drag" && !Le.isMobile && !t(this, ot).current))
295
292
  if (t(this, H).current) {
296
293
  const r = Math.sign(i);
297
- t(this, o).length ? this.shiftSections(r) : t(this, u).shift(r * t(this, y));
294
+ t(this, l).length ? this.shiftSections(r) : t(this, u).shift(r * t(this, y));
298
295
  } else
299
296
  t(this, u).shift(i);
300
297
  });
301
298
  if (qt) {
302
299
  const e = this.attachShadow({ mode: "open" });
303
- e.adoptedStyleSheets.push(Ae);
300
+ e.adoptedStyleSheets.push(Ie);
304
301
  const i = document.createElement("div");
305
302
  i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, j, document.createElement("div")), t(this, j).className = "content-wrapper", h(this, p, document.createElement("div")), t(this, p).className = "content", h(this, vt, document.createElement("slot")), t(this, p).appendChild(t(this, vt)), t(this, j).appendChild(t(this, p)), e.appendChild(t(this, j));
306
303
  }
@@ -384,10 +381,10 @@ class Dt extends HTMLElement {
384
381
  return t(this, ut);
385
382
  }
386
383
  get currentScrollValue() {
387
- return d(this, l, Xt).call(this, "current");
384
+ return d(this, o, Yt).call(this, "current");
388
385
  }
389
386
  get targetScrollValue() {
390
- return d(this, l, Xt).call(this, "target");
387
+ return d(this, o, Yt).call(this, "target");
391
388
  }
392
389
  get contentWrapperElement() {
393
390
  return t(this, j);
@@ -396,7 +393,7 @@ class Dt extends HTMLElement {
396
393
  return t(this, p);
397
394
  }
398
395
  get sections() {
399
- return t(this, o);
396
+ return t(this, l);
400
397
  }
401
398
  get position() {
402
399
  return t(this, It);
@@ -417,7 +414,7 @@ class Dt extends HTMLElement {
417
414
  return t(this, g);
418
415
  }
419
416
  get limit() {
420
- return t(this, o).length - t(this, A).current;
417
+ return t(this, l).length - t(this, A).current;
421
418
  }
422
419
  get distance() {
423
420
  return t(this, Q);
@@ -462,22 +459,22 @@ class Dt extends HTMLElement {
462
459
  return this.currentProgress >= c && this.currentProgress <= b;
463
460
  }
464
461
  scrollToSection(e, i) {
465
- if (!t(this, o).length)
462
+ if (!t(this, l).length)
466
463
  return;
467
464
  const r = t(this, g).current;
468
- d(this, l, ae).call(this, e);
469
- const c = t(this, o)[r], b = t(this, o)[t(this, g).current];
465
+ d(this, o, ue).call(this, e);
466
+ const c = t(this, l)[r], b = t(this, l)[t(this, g).current];
470
467
  if (c && b) {
471
468
  let w = 0;
472
- const ft = d(this, l, Yt).call(this), de = ft ? this.targetScrollValue - ft.position : 0;
473
- t(this, E).current ? t(this, g).current === 0 && r === t(this, o).length - 1 ? w = t(this, S) + t(this, y) - c.position + t(this, L) : t(this, g).current === t(this, o).length - 1 && r === 0 ? w = b.position - (t(this, S) + t(this, y) + t(this, L)) : w = b.position - c.position : w = b.position - c.position, this.shiftPosition(w - de, i);
469
+ const ft = d(this, o, te).call(this), pe = ft ? this.targetScrollValue - ft.position : 0;
470
+ t(this, E).current ? t(this, g).current === 0 && r === t(this, l).length - 1 ? w = t(this, S) + t(this, y) - c.position + t(this, L) : t(this, g).current === t(this, l).length - 1 && r === 0 ? w = b.position - (t(this, S) + t(this, y) + t(this, L)) : w = b.position - c.position : w = b.position - c.position, this.shiftPosition(w - pe, i);
474
471
  }
475
472
  }
476
473
  shiftSections(e, i) {
477
- t(this, o).length && this.scrollToSection(t(this, g).current + e, i);
474
+ t(this, l).length && this.scrollToSection(t(this, g).current + e, i);
478
475
  }
479
476
  setPosition(e, i) {
480
- i != null && i.tween ? (t(this, F).set(t(this, u).current, { equalize: !0 }), t(this, F).set(e, re({}, i.tween))) : t(this, u).set(e, {
477
+ d(this, o, Xt).call(this), i != null && i.tween ? (t(this, F).set(t(this, u).current, { equalize: !0 }), t(this, F).set(e, ne({}, i.tween))) : t(this, u).set(e, {
481
478
  equalize: (i == null ? void 0 : i.behaviour) === "instant"
482
479
  });
483
480
  }
@@ -485,15 +482,15 @@ class Dt extends HTMLElement {
485
482
  this.setPosition(t(this, u).target + e, i);
486
483
  }
487
484
  connectedCallback() {
488
- h(this, u, new ve(0, {
485
+ h(this, u, new ye(0, {
489
486
  damping: 0.01,
490
487
  min: 0,
491
- order: ge.SCROLL
492
- })), this.setAttribute("tabindex", "0"), h(this, M, new Ce({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, Et)), h(this, J, new Ee({
488
+ order: ve.SCROLL
489
+ })), this.setAttribute("tabindex", "0"), h(this, M, new Ee({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, Et)), h(this, J, new xe({
493
490
  element: this
494
491
  })), t(this, J).changeEvent.subscribe(
495
492
  t(this, Et)
496
- ), h(this, B, new xe({ element: t(this, p) })), t(this, B).changeEvent.subscribe(t(this, Et)), h(this, C, new we({
493
+ ), h(this, B, new we({ element: t(this, p) })), t(this, B).changeEvent.subscribe(t(this, Et)), h(this, C, new Pe({
497
494
  culling: this
498
495
  })), t(this, C).changeEvent.subscribe(t(this, Vt)), t(this, P).subscribe(({ current: e }) => {
499
496
  t(this, p).style.flexDirection = e === "x" ? "row" : "column", t(this, M).axis = t(this, G).current ? "max" : e, t(this, J).dimension = e === "x" ? "width" : "height", t(this, B).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, z).call(this);
@@ -502,15 +499,15 @@ class Dt extends HTMLElement {
502
499
  }), t(this, R).subscribe(() => {
503
500
  this.isConnected && t(this, z).call(this);
504
501
  }), t(this, D).subscribe(({ current: e }) => {
505
- this.isConnected && (e ? d(this, l, kt).call(this) : d(this, l, bt).call(this));
502
+ this.isConnected && (e ? d(this, o, kt).call(this) : d(this, o, bt).call(this));
506
503
  }), t(this, H).subscribe((e) => {
507
- t(this, M).debounce = e.current, t(this, B).swipe = e.current, t(this, C).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, o).length ? d(this, l, kt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, bt).call(this));
504
+ t(this, M).debounce = e.current, t(this, B).swipe = e.current, t(this, C).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, l).length ? d(this, o, kt).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, bt).call(this));
508
505
  }), t(this, U).subscribe((e) => {
509
- this.isConnected && (t(this, z).call(this), e.current && !e.previous && !t(this, o).length ? d(this, l, kt).call(this) : !e.current && e.previous && t(this, o).length && d(this, l, bt).call(this));
506
+ this.isConnected && (t(this, z).call(this), e.current && !e.previous && !t(this, l).length ? d(this, o, kt).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, bt).call(this));
510
507
  }), t(this, A).subscribe((e) => {
511
- this.isConnected && (t(this, z).call(this), d(this, l, et).call(this));
508
+ this.isConnected && (t(this, z).call(this), d(this, o, et).call(this));
512
509
  }), t(this, E).subscribe((e) => {
513
- e.current ? (this.isConnected && (t(this, o).length || (t(this, D).current = !0)), t(this, o).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (h(this, yt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
510
+ e.current ? (this.isConnected && (t(this, l).length || (t(this, D).current = !0)), t(this, l).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (h(this, yt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
514
511
  }), t(this, rt).subscribe((e) => {
515
512
  t(this, u).damping = e.current;
516
513
  }), t(this, nt).subscribe((e) => {
@@ -518,42 +515,42 @@ class Dt extends HTMLElement {
518
515
  }), t(this, ht).subscribe((e) => {
519
516
  t(this, u).stiffness = e.current;
520
517
  }), t(this, at).subscribe((e) => {
521
- e.current && !e.previous ? d(this, l, Zt).call(this) : !e.current && e.previous && d(this, l, jt).call(this);
518
+ e.current && !e.previous ? d(this, o, Zt).call(this) : !e.current && e.previous && d(this, o, jt).call(this);
522
519
  }), t(this, ut).subscribe((e) => {
523
- e.current && !e.previous ? d(this, l, Jt).call(this) : !e.current && e.previous && d(this, l, Qt).call(this);
520
+ e.current && !e.previous ? d(this, o, Jt).call(this) : !e.current && e.previous && d(this, o, Qt).call(this);
524
521
  }), t(this, k).subscribe((e) => {
525
522
  t(this, C).speed = e.current, e.current && !e.previous ? t(this, C).connect() : !e.current && e.previous && t(this, C).disconnect();
526
523
  }), t(this, K).subscribe((e) => {
527
524
  e.current || (t(this, C).direction = 1);
528
525
  }), t(this, I).subscribe((e) => {
529
- this.isConnected && d(this, l, et).call(this);
526
+ this.isConnected && d(this, o, et).call(this);
530
527
  }), t(this, _).subscribe((e) => {
531
- this.isConnected && t(this, I).current && d(this, l, et).call(this);
528
+ this.isConnected && t(this, I).current && d(this, o, et).call(this);
532
529
  }), t(this, O).subscribe((e) => {
533
- this.isConnected && t(this, I).current && d(this, l, et).call(this);
530
+ this.isConnected && t(this, I).current && d(this, o, et).call(this);
534
531
  }), t(this, u).isRunning.subscribe((e) => {
535
532
  this.classList.toggle("active", e.current);
536
533
  }), t(this, g).subscribe((e) => {
537
- t(this, o).length && d(this, l, et).call(this);
534
+ t(this, l).length && d(this, o, et).call(this);
538
535
  }), t(this, F).subscribe((e) => {
539
536
  t(this, F).isRunning.current && t(this, u).set(e.current);
540
- }), t(this, it).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, D).observe(), t(this, H).observe(), t(this, U).observe(), t(this, G).observe(), t(this, A).observe(), t(this, E).observe(), t(this, rt).observe(), t(this, nt).observe(), t(this, ht).observe(), t(this, ot).observe(), t(this, gt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, lt).observe(), t(this, K).observe(), t(this, I).observe(), t(this, _).observe(), t(this, O).observe(), t(this, Z).observe(), t(this, ct).observe(), t(this, at).observe(), t(this, ut).observe(), d(this, l, Qt).call(this);
537
+ }), t(this, it).observe(), t(this, P).observe(), t(this, V).observe(), t(this, R).observe(), t(this, D).observe(), t(this, H).observe(), t(this, U).observe(), t(this, G).observe(), t(this, A).observe(), t(this, E).observe(), t(this, rt).observe(), t(this, nt).observe(), t(this, ht).observe(), t(this, ot).observe(), t(this, gt).observe(), t(this, k).observe(), t(this, k).observe(), t(this, lt).observe(), t(this, K).observe(), t(this, I).observe(), t(this, _).observe(), t(this, O).observe(), t(this, Z).observe(), t(this, ct).observe(), t(this, at).observe(), t(this, ut).observe(), d(this, o, Qt).call(this);
541
538
  }
542
539
  disconnectedCallback() {
543
- this.setAttribute("tabindex", ""), t(this, it).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, D).unobserve(), t(this, H).unobserve(), t(this, U).unobserve(), t(this, G).unobserve(), t(this, A).unobserve(), t(this, E).unobserve(), t(this, rt).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), t(this, gt).unobserve(), t(this, k).unobserve(), t(this, lt).unobserve(), t(this, K).unobserve(), t(this, I).unobserve(), t(this, _).unobserve(), t(this, O).unobserve(), t(this, Z).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), t(this, ut).unobserve(), d(this, l, Jt).call(this);
540
+ this.setAttribute("tabindex", ""), t(this, it).unobserve(), t(this, P).unobserve(), t(this, V).unobserve(), t(this, R).unobserve(), t(this, D).unobserve(), t(this, H).unobserve(), t(this, U).unobserve(), t(this, G).unobserve(), t(this, A).unobserve(), t(this, E).unobserve(), t(this, rt).unobserve(), t(this, nt).unobserve(), t(this, ht).unobserve(), t(this, ot).unobserve(), t(this, gt).unobserve(), t(this, k).unobserve(), t(this, lt).unobserve(), t(this, K).unobserve(), t(this, I).unobserve(), t(this, _).unobserve(), t(this, O).unobserve(), t(this, Z).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), t(this, ut).unobserve(), d(this, o, Jt).call(this);
544
541
  }
545
542
  }
546
- u = new WeakMap(), it = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), D = new WeakMap(), H = new WeakMap(), U = new WeakMap(), G = new WeakMap(), A = new WeakMap(), E = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), k = new WeakMap(), lt = new WeakMap(), K = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), j = new WeakMap(), p = new WeakMap(), vt = new WeakMap(), o = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), M = new WeakMap(), J = new WeakMap(), B = new WeakMap(), C = new WeakMap(), g = new WeakMap(), yt = new WeakMap(), Q = new WeakMap(), dt = new WeakMap(), pt = new WeakMap(), Ct = new WeakMap(), F = new WeakMap(), l = new WeakSet(), kt = function() {
547
- d(this, l, bt).call(this), t(this, vt).assignedElements().forEach((e, i) => {
548
- e instanceof HTMLElement && t(this, o).push(new De(e, i, this));
543
+ u = new WeakMap(), it = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), D = new WeakMap(), H = new WeakMap(), U = new WeakMap(), G = new WeakMap(), A = new WeakMap(), E = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ht = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), k = new WeakMap(), lt = new WeakMap(), K = new WeakMap(), I = new WeakMap(), _ = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), j = new WeakMap(), p = new WeakMap(), vt = new WeakMap(), l = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), y = new WeakMap(), S = new WeakMap(), L = new WeakMap(), M = new WeakMap(), J = new WeakMap(), B = new WeakMap(), C = new WeakMap(), g = new WeakMap(), yt = new WeakMap(), Q = new WeakMap(), dt = new WeakMap(), pt = new WeakMap(), Ct = new WeakMap(), F = new WeakMap(), o = new WeakSet(), kt = function() {
544
+ d(this, o, bt).call(this), t(this, vt).assignedElements().forEach((e, i) => {
545
+ e instanceof HTMLElement && t(this, l).push(new Ae(e, i, this));
549
546
  }), t(this, p).style.transform = "", Gt(this, "scrollSectionsChange", {
550
547
  custom: !0,
551
548
  composed: !0
552
- }), t(this, z).call(this), d(this, l, et).call(this);
549
+ }), t(this, z).call(this), d(this, o, et).call(this);
553
550
  }, bt = function() {
554
- t(this, o).forEach((e) => {
551
+ t(this, l).forEach((e) => {
555
552
  e.destroy();
556
- }), h(this, o, []), t(this, g).current = 0, t(this, u).reset(), Gt(this, "scrollSectionsChange", {
553
+ }), h(this, l, []), t(this, g).current = 0, t(this, u).reset(), Gt(this, "scrollSectionsChange", {
557
554
  custom: !0,
558
555
  composed: !0
559
556
  });
@@ -562,38 +559,43 @@ u = new WeakMap(), it = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R =
562
559
  }, jt = function() {
563
560
  t(this, dt) && (h(this, dt, !1), t(this, u).subscribe(t(this, Tt)), t(this, M).connect(), t(this, J).connect(), t(this, B).connect(), t(this, k).current && t(this, C).connect());
564
561
  }, Jt = function() {
565
- t(this, pt) || (h(this, pt, !0), $t.unsubscribe(t(this, z)), Nt.unsubscribe(t(this, z)), t(this, u).reset(), d(this, l, Zt).call(this), t(this, p).style.transform = "", t(this, D).current && d(this, l, bt).call(this), St.unregister(this));
562
+ t(this, pt) || (h(this, pt, !0), $t.unsubscribe(t(this, z)), Nt.unsubscribe(t(this, z)), t(this, u).reset(), d(this, o, Zt).call(this), t(this, p).style.transform = "", t(this, D).current && d(this, o, bt).call(this), St.unregister(this));
566
563
  }, Qt = function() {
567
- t(this, pt) && (h(this, pt, !1), t(this, D).current && d(this, l, kt).call(this), St.register(this), $t.subscribe(t(this, z), le.SCROLL), Nt.subscribe(this, t(this, z)), d(this, l, jt).call(this));
568
- }, z = new WeakMap(), Tt = new WeakMap(), ae = function(e) {
569
- t(this, E).current ? (t(this, g).current = e % t(this, o).length, t(this, g).current = t(this, g).current < 0 ? t(this, o).length + t(this, g).current : t(this, g).current) : t(this, g).current = oe(e, 0, this.limit);
570
- }, Et = new WeakMap(), Vt = new WeakMap(), Xt = function(e = "current") {
571
- if (t(this, E).current && t(this, o).length) {
564
+ t(this, pt) && (h(this, pt, !1), t(this, D).current && d(this, o, kt).call(this), St.register(this), $t.subscribe(t(this, z), ce.SCROLL), Nt.subscribe(this, t(this, z)), d(this, o, jt).call(this));
565
+ }, z = new WeakMap(), Tt = new WeakMap(), ue = function(e) {
566
+ t(this, E).current ? (t(this, g).current = e % t(this, l).length, t(this, g).current = t(this, g).current < 0 ? t(this, l).length + t(this, g).current : t(this, g).current) : t(this, g).current = le(e, 0, this.limit);
567
+ }, Et = new WeakMap(), Vt = new WeakMap(), Xt = function(e = 1) {
568
+ t(this, K).current && (t(this, C).direction = e), t(this, k).current && t(this, C).pauseAndContinue(
569
+ t(this, lt).current,
570
+ this.sectionalCSSProperty.current
571
+ );
572
+ }, Yt = function(e = "current") {
573
+ if (t(this, E).current && t(this, l).length) {
572
574
  const i = t(this, u)[e] % (t(this, S) + t(this, y) + t(this, L));
573
575
  return i < 0 ? t(this, S) + i + t(this, y) + t(this, L) : i;
574
576
  } else
575
577
  return t(this, u)[e];
576
578
  }, et = function() {
577
- if (t(this, I).current && t(this, o).length) {
579
+ if (t(this, I).current && t(this, l).length) {
578
580
  const e = t(this, g).current + t(this, _).current;
579
581
  e === 0 ? this.classList.add("start") : this.classList.remove("start"), e === this.limit ? this.classList.add("end") : this.classList.remove("end");
580
582
  const i = t(this, A).current + t(this, O).current;
581
- t(this, o).forEach((r, c) => {
583
+ t(this, l).forEach((r, c) => {
582
584
  const b = e - this.limit - 1 + t(this, O).current, w = e + i, ft = this.sections.length - w;
583
585
  c >= e && c < w || c <= b ? r.mark("current") : c >= w && c < w + ft / 2 || c <= b + i ? r.mark("next") : r.mark("previous");
584
586
  });
585
587
  }
586
- }, Yt = function() {
588
+ }, te = function() {
587
589
  let e = null, i = 1 / 0;
588
- for (let r = 0; r < t(this, o).length; r++) {
589
- const c = Math.abs(t(this, o)[r].position - this.targetScrollValue);
590
+ for (let r = 0; r < t(this, l).length; r++) {
591
+ const c = Math.abs(t(this, l)[r].position - this.targetScrollValue);
590
592
  c < i && (i = c, e = r);
591
593
  }
592
- return e !== null ? t(this, o)[e] : null;
594
+ return e !== null ? t(this, l)[e] : null;
593
595
  };
594
596
  customElements.get("e-scroll") || customElements.define("e-scroll", Dt);
595
597
  var Rt;
596
- class te extends HTMLElement {
598
+ class ee extends HTMLElement {
597
599
  constructor() {
598
600
  super(...arguments);
599
601
  s(this, Rt, null);
@@ -602,13 +604,13 @@ class te extends HTMLElement {
602
604
  return t(this, Rt);
603
605
  }
604
606
  connectedCallback() {
605
- const e = ce(this, Dt);
607
+ const e = ae(this, Dt);
606
608
  e instanceof Dt ? h(this, Rt, e) : console.error(this, "e-scroll not found");
607
609
  }
608
610
  }
609
611
  Rt = new WeakMap();
610
612
  var X, x, W, $, xt, wt, mt, Ht, Ot, Bt;
611
- class Ie extends te {
613
+ class Me extends ee {
612
614
  constructor() {
613
615
  super();
614
616
  s(this, X, null);
@@ -629,7 +631,7 @@ class Ie extends te {
629
631
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
630
632
  });
631
633
  s(this, Bt, (e) => {
632
- document.documentElement.classList.add("grabbing"), Le(
634
+ document.documentElement.classList.add("grabbing"), ze(
633
635
  (c) => {
634
636
  const b = t(this, W) ? c.x : c.y, w = this.scrollElement.distance / t(this, xt), ft = (b - r) * w;
635
637
  this.scrollElement.setPosition(i + ft);
@@ -643,7 +645,7 @@ class Ie extends te {
643
645
  if (qt) {
644
646
  const e = this.attachShadow({ mode: "open" });
645
647
  e.adoptedStyleSheets.push(
646
- he({
648
+ oe({
647
649
  ":host": {
648
650
  display: "inline-block",
649
651
  zIndex: "1",
@@ -681,37 +683,37 @@ class Ie extends te {
681
683
  connectedCallback() {
682
684
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
683
685
  const e = t(this, X).assignedElements()[0] || t(this, X).firstElementChild;
684
- h(this, x, e), t(this, x).addEventListener("pointerdown", t(this, Bt)), $t.subscribe(t(this, mt), le.SCROLL), Nt.subscribe(this, t(this, mt)), this.scrollElement.onScroll(t(this, Ht)), this.scrollElement.axisCSSProperty.subscribe(t(this, Ot));
686
+ h(this, x, e), t(this, x).addEventListener("pointerdown", t(this, Bt)), $t.subscribe(t(this, mt), ce.SCROLL), Nt.subscribe(this, t(this, mt)), this.scrollElement.onScroll(t(this, Ht)), this.scrollElement.axisCSSProperty.subscribe(t(this, Ot));
685
687
  }
686
688
  disconnectedCallback() {
687
689
  this.removeAttribute("drag-dead-zone"), t(this, x).removeEventListener("pointerdown", t(this, Bt)), $t.unsubscribe(t(this, mt)), Nt.unsubscribe(t(this, mt)), this.scrollElement.offScroll(t(this, Ht)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Ot));
688
690
  }
689
691
  }
690
692
  X = new WeakMap(), x = new WeakMap(), W = new WeakMap(), $ = new WeakMap(), xt = new WeakMap(), wt = new WeakMap(), mt = new WeakMap(), Ht = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap();
691
- customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Ie);
692
- class ue extends te {
693
+ customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Me);
694
+ class de extends ee {
693
695
  constructor() {
694
696
  super(), qt && this.addEventListener("click", () => {
695
697
  this.handleClick();
696
698
  });
697
699
  }
698
700
  }
699
- class Me extends ue {
701
+ class Te extends de {
700
702
  handleClick() {
701
703
  const n = this.getAttribute("index"), e = this.getAttribute("behaviour");
702
704
  this.scrollElement.scrollToSection(parseInt(n || "0"), { behaviour: e });
703
705
  }
704
706
  }
705
- customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", Me);
706
- class Te extends ue {
707
+ customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", Te);
708
+ class Ve extends de {
707
709
  handleClick() {
708
710
  const n = this.getAttribute("step"), e = this.getAttribute("behaviour");
709
711
  this.scrollElement.shiftSections(parseInt(n || "1"), { behaviour: e });
710
712
  }
711
713
  }
712
- customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", Te);
714
+ customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", Ve);
713
715
  var N, Y, Pt, Ft, Wt, Lt;
714
- class Ve {
716
+ class Re {
715
717
  constructor(n, e, i) {
716
718
  s(this, N, null);
717
719
  s(this, Y, null);
@@ -739,14 +741,14 @@ class Ve {
739
741
  }
740
742
  N = new WeakMap(), Y = new WeakMap(), Pt = new WeakMap(), Ft = new WeakMap(), Wt = new WeakMap(), Lt = new WeakMap();
741
743
  var tt, zt;
742
- class Re extends te {
744
+ class He extends ee {
743
745
  constructor() {
744
746
  super(...arguments);
745
747
  s(this, tt, []);
746
- s(this, zt, ze(() => {
748
+ s(this, zt, ke(() => {
747
749
  t(this, tt).forEach((e) => e.destroy()), h(this, tt, []);
748
750
  for (let e = 0; e < this.scrollElement.sections.length; e++) {
749
- const i = new Ve(
751
+ const i = new Re(
750
752
  this.scrollElement,
751
753
  e,
752
754
  this.getAttribute("behaviour") || "smooth"
@@ -769,22 +771,22 @@ class Re extends te {
769
771
  }
770
772
  }
771
773
  tt = new WeakMap(), zt = new WeakMap();
772
- customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", Re);
773
- class He extends ke {
774
+ customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", He);
775
+ class Oe extends De {
774
776
  connectedCallback() {
775
- const n = ce(this, Dt);
777
+ const n = ae(this, Dt);
776
778
  n instanceof Dt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
777
779
  "scrollSectionsChange",
778
780
  this.findAnotherScrollEntries
779
781
  )) : console.error(this, "e-scroll not found");
780
782
  }
781
783
  }
782
- customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", He);
784
+ customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", Oe);
783
785
  export {
784
- Re as ScrollBulletButtonsElement,
786
+ He as ScrollBulletButtonsElement,
785
787
  Dt as ScrollElement,
786
- He as ScrollSegmentElement,
787
- Me as ScrollSetButtonElement,
788
- Te as ScrollStepButtonElement,
789
- Ie as ScrollbarElement
788
+ Oe as ScrollSegmentElement,
789
+ Te as ScrollSetButtonElement,
790
+ Ve as ScrollStepButtonElement,
791
+ Me as ScrollbarElement
790
792
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.30.7",
3
+ "version": "0.30.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"