aptechka 0.50.21 → 0.50.22

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 mt=l=>{throw TypeError(l)};var lt=(l,c,r)=>c.has(l)||mt("Cannot "+r);var t=(l,c,r)=>(lt(l,c,"read from private field"),r?r.call(l):c.get(l)),i=(l,c,r)=>c.has(l)?mt("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(l):c.set(l,r),e=(l,c,r,s)=>(lt(l,c,"write to private field"),s?s.call(l,r):c.set(l,r),r),u=(l,c,r)=>(lt(l,c,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const zt=require("../dom-JBOkFLTh.cjs"),Ot=require("../index-Cqw2NKev.cjs"),ot=require("../element-resizer/index.cjs"),ut=require("../window-resizer/index.cjs"),o=require("../css-property/index.cjs"),bt=require("../order/index.cjs"),et=require("../events-KVanG9sR.cjs"),qt=require("../function-MthRj-GJ.cjs"),St=require("../layout-Ctc2p3uz.cjs"),xt=require("../math-GDWEqu7y.cjs"),rt=require("../Store-DRp_K37w.cjs"),kt=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Dt=require("../Damped-B1lXa9nb.cjs");var w,ct,it,j;class ft{constructor(c){i(this,w,null);i(this,ct);i(this,it,!1);i(this,j,()=>{e(this,it,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ct,c),e(this,w,zt.findScrollParentElement(t(this,ct))),ot.elementResizer.subscribe(t(this,w),t(this,j)),ut.windowResizer.subscribe(t(this,j)),t(this,j).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,it)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,it)}destroy(){ot.elementResizer.unsubscribe(t(this,j)),ut.windowResizer.unsubscribe(t(this,j))}onScroll(c){t(this,w).addEventListener("scroll",c)}offScroll(c){t(this,w).removeEventListener("scroll",c)}}w=new WeakMap,ct=new WeakMap,it=new WeakMap,j=new WeakMap;var S,B,G,K,Z,_,A,I,$,m,g,v,y,H,p,q,x,L,Y,k,D,M,f,P,V,R,z,F,ht,n,W,J,nt,d,O,C,b,E,tt,N,a,Q,h,vt,pt,yt,Pt,Vt,wt,Ft,Et,U,st,X,Lt,Rt,dt,Ct;let gt=(Ct=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,B);i(this,G);i(this,K);i(this,Z);i(this,_);i(this,A);i(this,I);i(this,$);i(this,m);i(this,g);i(this,v);i(this,y);i(this,H);i(this,p);i(this,q);i(this,x);i(this,L);i(this,Y);i(this,k);i(this,D);i(this,M);i(this,f);i(this,P);i(this,V);i(this,R);i(this,z);i(this,F);i(this,ht);i(this,n);i(this,W);i(this,J);i(this,nt);i(this,d);i(this,O);i(this,C);i(this,b);i(this,E);i(this,tt);i(this,N);i(this,a);i(this,Q);i(this,U);i(this,st);e(this,S,null),e(this,B,new o.CSSProperty(this,"--damping",20)),e(this,G,new o.CSSProperty(this,"--mass",0)),e(this,K,new o.CSSProperty(this,"--stiffness",0)),e(this,Z,new o.CSSProperty(this,"--target","")),e(this,_,new o.CSSProperty(this,"--disabled",!1)),e(this,A,new o.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,I,new o.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,$,new o.CSSProperty(this,"--capture-once",!1)),e(this,m,new o.CSSProperty(this,"--captured","")),e(this,g,new o.CSSProperty(this,"--released","")),e(this,v,new o.CSSProperty(this,"--captured-from-start","")),e(this,y,new o.CSSProperty(this,"--captured-from-finish","")),e(this,H,new o.CSSProperty(this,"--released-from-start","")),e(this,p,new o.CSSProperty(this,"--released-from-finish","")),e(this,q,new o.CSSProperty(this,"--passed-var","")),e(this,x,new o.CSSProperty(this,"--progress-var","")),e(this,L,new o.CSSProperty(this,"--progress-arc-var","")),e(this,Y,new o.CSSProperty(this,"--animation-var-type","target")),e(this,k,new o.CSSProperty(this,"--distance-var","")),e(this,D,new o.CSSProperty(this,"--start-var","")),e(this,M,new o.CSSProperty(this,"--finish-var","")),e(this,f,new rt.Store(!1)),e(this,P,new rt.Store(!1)),e(this,V,new rt.Store(!1)),e(this,R,new rt.Store(!1)),e(this,z,new rt.Store(!1)),e(this,F,new rt.Store(!1)),e(this,ht,[]),e(this,n,this),e(this,W,0),e(this,J,0),e(this,nt,0),e(this,d,new Dt.Damped(0,{order:bt.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,O,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),e(this,N,!1),e(this,a,!0),e(this,Q,!1),this.findAnotherScrollEntries=qt.debounce(()=>{const r=kt.scrollEntries.getAll(this).reverse();let s=0;r.forEach((T,at)=>{T.element===t(this,S)&&(s=at)}),e(this,ht,r.slice(s+1))},0),e(this,U,()=>{t(this,a)||(this.resize(),t(this,st).call(this))}),e(this,st,()=>{!t(this,a)&&t(this,tt)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){u(this,h,pt).call(this),e(this,S,r),u(this,h,vt).call(this)}get distanceOffsetCSSProperty(){return t(this,A)}get startOffsetCSSProperty(){return t(this,I)}get captureOnceCSSProperty(){return t(this,$)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,v)}get capturedFromFinishCSSProperty(){return t(this,y)}get releasedFromStartCSSProperty(){return t(this,H)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,q)}get progressVarCSSProperty(){return t(this,x)}get progressArcVarCSSProperty(){return t(this,L)}get animationVarTypeCSSProperty(){return t(this,Y)}get distanceVarCSSProperty(){return t(this,k)}get startVarCSSProperty(){return t(this,D)}get finishVarCSSProperty(){return t(this,M)}get disabledCSSProperty(){return t(this,_)}get dampingCSSProperty(){return t(this,B)}get massCSSProperty(){return t(this,G)}get stiffnessCSSProperty(){return t(this,K)}get targetCSSProperty(){return t(this,Z)}get isCaptured(){return t(this,f)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,R)}get isCapturedFromFinish(){return t(this,z)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,J)}get passed(){return t(this,d)}get progress(){return t(this,O)}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}resize(){e(this,J,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?St.getCumulativeOffsetTop(this,r):St.getCumulativeOffsetLeft(this,r));const s=St.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,I).current),e(this,b,t(this,b)+t(this,A).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,f).current&&!t(this,P).current&&(t(this,f).current=!0),this.setVar(t(this,D).current,t(this,C)),this.setVar(t(this,M).current,t(this,E)),this.setVar(t(this,k).current,t(this,b)),t(this,d).max=t(this,b),e(this,tt,!0)}tick(){let r=t(this,S).currentScrollValue;t(this,ht).forEach(at=>{r+=at.value});const s=r-t(this,C);t(this,Q)||e(this,Q,t(this,d).previous?Math.abs(t(this,d).previous-s)>1e3:!1),t(this,d).set(s);const T=Math.round(r);t(this,f).current&&(T>=t(this,C)?t(this,V).current||u(this,h,Vt).call(this):t(this,V).current&&!t(this,R).current&&u(this,h,Ft).call(this),T<t(this,E)?t(this,F).current&&!t(this,z).current&&u(this,h,wt).call(this):t(this,V).current&&!t(this,F).current&&u(this,h,Et).call(this)),T>=t(this,C)&&T<t(this,E)?t(this,f).current||u(this,h,yt).call(this):t(this,f).current&&(t(this,d).set(xt.step(t(this,b)/2,t(this,d).target,0,t(this,b))),u(this,h,Pt).call(this)),t(this,N)&&t(this,$).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,J,0),t(this,d).reset(),e(this,O,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),t(this,f).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,R).current=!1,t(this,z).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),u(this,h,dt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new ft(this)}disconnectedCallback(){t(this,S)instanceof ft&&t(this,S).destroy(),u(this,h,pt).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,J)+t(this,nt)}getStart(){return t(this,W)-t(this,nt)}},S=new WeakMap,B=new WeakMap,G=new WeakMap,K=new WeakMap,Z=new WeakMap,_=new WeakMap,A=new WeakMap,I=new WeakMap,$=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,H=new WeakMap,p=new WeakMap,q=new WeakMap,x=new WeakMap,L=new WeakMap,Y=new WeakMap,k=new WeakMap,D=new WeakMap,M=new WeakMap,f=new WeakMap,P=new WeakMap,V=new WeakMap,R=new WeakMap,z=new WeakMap,F=new WeakMap,ht=new WeakMap,n=new WeakMap,W=new WeakMap,J=new WeakMap,nt=new WeakMap,d=new WeakMap,O=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,tt=new WeakMap,N=new WeakMap,a=new WeakMap,Q=new WeakMap,h=new WeakSet,vt=function(){if(!t(this,S))return;t(this,f).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,z).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,B).observe(),t(this,G).observe(),t(this,K).observe(),t(this,Z).observe(),t(this,_).observe(),t(this,A).observe(),t(this,I).observe(),t(this,$).observe(),t(this,m).observe(),t(this,g).observe(),t(this,v).observe(),t(this,y).observe(),t(this,H).observe(),t(this,p).observe(),t(this,q).observe(),t(this,x).observe(),t(this,L).observe(),t(this,Y).observe(),t(this,k).observe(),t(this,D).observe(),t(this,M).observe();let r=!1;this.findAnotherScrollEntries(),t(this,_).current||this.enable(),t(this,B).subscribe(s=>{t(this,d).damping=s.current}),t(this,G).subscribe(s=>{t(this,d).mass=s.current}),t(this,K).subscribe(s=>{t(this,d).stiffness=s.current}),t(this,Z).subscribe(s=>{s.previous&&u(this,h,dt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,_).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,I).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,A).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,v).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,y).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,g).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,H).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,p).subscribe(s=>{u(this,h,X).call(this,s)}),t(this,$).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,O)))}),t(this,L).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,O)))}),t(this,D).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,M).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,d).subscribe(s=>{if(t(this,Q)){e(this,Q,!1);return}const T=t(this,d)[t(this,Y).current];e(this,O,T/t(this,b)||0),this.setVar(t(this,q).current,T.toFixed(6)),this.setVar(t(this,x).current,t(this,O).toFixed(6)),t(this,L).current&&this.setVar(t(this,L).current,Math.abs(Math.cos(t(this,O)*Math.PI)).toFixed(6))}),ut.windowResizer.subscribe(t(this,U),bt.RESIZE_ORDER.SCROLL+1),ot.elementResizer.subscribe(this,t(this,U)),this.scrollContainer.onScroll(t(this,st)),r=!0},pt=function(){t(this,S)&&(ut.windowResizer.unsubscribe(t(this,U)),ot.elementResizer.unsubscribe(t(this,U)),this.scrollContainer.offScroll(t(this,st)),t(this,B).close(),t(this,G).close(),t(this,K).close(),t(this,Z).close(),t(this,_).close(),t(this,A).close(),t(this,I).close(),t(this,$).close(),t(this,m).close(),t(this,g).close(),t(this,v).close(),t(this,y).close(),t(this,H).close(),t(this,p).close(),t(this,q).close(),t(this,x).close(),t(this,L).close(),t(this,k).close(),t(this,D).close(),t(this,M).close(),t(this,f).close(),t(this,P).close(),t(this,V).close(),t(this,R).close(),t(this,z).close(),t(this,F).close(),this.disable())},yt=function(){t(this,f).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},Pt=function(){t(this,P).current=!0,t(this,f).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Vt=function(){t(this,f).current=!0,t(this,V).current=!0,t(this,R).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},wt=function(){t(this,f).current=!0,t(this,z).current=!0,t(this,F).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Ft=function(){t(this,P).current=!0,t(this,R).current=!0,t(this,V).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},Et=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,z).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},U=new WeakMap,st=new WeakMap,X=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,f).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},Lt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},Rt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},dt=function(){u(this,h,Lt).call(this,t(this,m).current,t(this,v).current,t(this,y).current,t(this,g).current,t(this,H).current,t(this,p).current),u(this,h,Rt).call(this,t(this,q).current,t(this,x).current,t(this,L).current,t(this,k).current,t(this,D).current,t(this,M).current)},Ct);Ot.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",gt);exports.ScrollSegmentDefaultContainer=ft;exports.ScrollSegmentElement=gt;
1
+ "use strict";var bt=l=>{throw TypeError(l)};var lt=(l,o,r)=>o.has(l)||bt("Cannot "+r);var t=(l,o,r)=>(lt(l,o,"read from private field"),r?r.call(l):o.get(l)),i=(l,o,r)=>o.has(l)?bt("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(l):o.set(l,r),e=(l,o,r,s)=>(lt(l,o,"write to private field"),s?s.call(l,r):o.set(l,r),r),c=(l,o,r)=>(lt(l,o,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ot=require("../dom-JBOkFLTh.cjs"),qt=require("../index-Cqw2NKev.cjs"),ot=require("../element-resizer/index.cjs"),ut=require("../window-resizer/index.cjs"),u=require("../css-property/index.cjs"),Ct=require("../order/index.cjs"),et=require("../events-KVanG9sR.cjs"),xt=require("../function-MthRj-GJ.cjs"),St=require("../layout-Ctc2p3uz.cjs"),kt=require("../math-GDWEqu7y.cjs"),rt=require("../Store-DRp_K37w.cjs"),Dt=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Mt=require("../Damped-B1lXa9nb.cjs");var w,ct,it,j;class ft{constructor(o){i(this,w,null);i(this,ct);i(this,it,!1);i(this,j,()=>{e(this,it,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ct,o),e(this,w,Ot.findScrollParentElement(t(this,ct))),ot.elementResizer.subscribe(t(this,w),t(this,j)),ut.windowResizer.subscribe(t(this,j)),t(this,j).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,it)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,it)}destroy(){ot.elementResizer.unsubscribe(t(this,j)),ut.windowResizer.unsubscribe(t(this,j))}onScroll(o){t(this,w).addEventListener("scroll",o)}offScroll(o){t(this,w).removeEventListener("scroll",o)}}w=new WeakMap,ct=new WeakMap,it=new WeakMap,j=new WeakMap;var S,B,G,K,Z,_,A,I,$,m,g,v,y,H,p,O,q,L,Y,x,k,D,f,P,V,R,z,F,ht,n,W,J,nt,d,M,C,b,E,tt,N,a,Q,h,yt,pt,Pt,Vt,wt,Ft,Et,Lt,U,st,dt,X,Rt,zt,mt,gt;let vt=(gt=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,B);i(this,G);i(this,K);i(this,Z);i(this,_);i(this,A);i(this,I);i(this,$);i(this,m);i(this,g);i(this,v);i(this,y);i(this,H);i(this,p);i(this,O);i(this,q);i(this,L);i(this,Y);i(this,x);i(this,k);i(this,D);i(this,f);i(this,P);i(this,V);i(this,R);i(this,z);i(this,F);i(this,ht);i(this,n);i(this,W);i(this,J);i(this,nt);i(this,d);i(this,M);i(this,C);i(this,b);i(this,E);i(this,tt);i(this,N);i(this,a);i(this,Q);i(this,U);i(this,st);e(this,S,null),e(this,B,new u.CSSProperty(this,"--damping",20)),e(this,G,new u.CSSProperty(this,"--mass",0)),e(this,K,new u.CSSProperty(this,"--stiffness",0)),e(this,Z,new u.CSSProperty(this,"--target","")),e(this,_,new u.CSSProperty(this,"--disabled",!1)),e(this,A,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,I,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,$,new u.CSSProperty(this,"--capture-once",!1)),e(this,m,new u.CSSProperty(this,"--captured","")),e(this,g,new u.CSSProperty(this,"--released","")),e(this,v,new u.CSSProperty(this,"--captured-from-start","")),e(this,y,new u.CSSProperty(this,"--captured-from-finish","")),e(this,H,new u.CSSProperty(this,"--released-from-start","")),e(this,p,new u.CSSProperty(this,"--released-from-finish","")),e(this,O,new u.CSSProperty(this,"--passed-var","")),e(this,q,new u.CSSProperty(this,"--progress-var","")),e(this,L,new u.CSSProperty(this,"--progress-arc-var","")),e(this,Y,new u.CSSProperty(this,"--animation-var-type","target")),e(this,x,new u.CSSProperty(this,"--distance-var","")),e(this,k,new u.CSSProperty(this,"--start-var","")),e(this,D,new u.CSSProperty(this,"--finish-var","")),e(this,f,new rt.Store(!1)),e(this,P,new rt.Store(!1)),e(this,V,new rt.Store(!1)),e(this,R,new rt.Store(!1)),e(this,z,new rt.Store(!1)),e(this,F,new rt.Store(!1)),e(this,ht,[]),e(this,n,this),e(this,W,0),e(this,J,0),e(this,nt,0),e(this,d,new Mt.Damped(0,{order:Ct.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,M,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),e(this,N,!1),e(this,a,!0),e(this,Q,!1),this.findAnotherScrollEntries=xt.debounce(()=>{const r=Dt.scrollEntries.getAll(this).reverse();let s=0;r.forEach((T,at)=>{T.element===t(this,S)&&(s=at)}),e(this,ht,r.slice(s+1))},0),e(this,U,()=>{t(this,a)||(this.resize(),t(this,st).call(this))}),e(this,st,()=>{!t(this,a)&&t(this,tt)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){c(this,h,pt).call(this),e(this,S,r),c(this,h,yt).call(this)}get distanceOffsetCSSProperty(){return t(this,A)}get startOffsetCSSProperty(){return t(this,I)}get captureOnceCSSProperty(){return t(this,$)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,v)}get capturedFromFinishCSSProperty(){return t(this,y)}get releasedFromStartCSSProperty(){return t(this,H)}get releasedFromFinishCSSProperty(){return t(this,p)}get passedVarCSSProperty(){return t(this,O)}get progressVarCSSProperty(){return t(this,q)}get progressArcVarCSSProperty(){return t(this,L)}get animationVarTypeCSSProperty(){return t(this,Y)}get distanceVarCSSProperty(){return t(this,x)}get startVarCSSProperty(){return t(this,k)}get finishVarCSSProperty(){return t(this,D)}get disabledCSSProperty(){return t(this,_)}get dampingCSSProperty(){return t(this,B)}get massCSSProperty(){return t(this,G)}get stiffnessCSSProperty(){return t(this,K)}get targetCSSProperty(){return t(this,Z)}get isCaptured(){return t(this,f)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,R)}get isCapturedFromFinish(){return t(this,z)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,J)}get passed(){return t(this,d)}get progress(){return t(this,M)}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}resize(){e(this,J,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?St.getCumulativeOffsetTop(this,r):St.getCumulativeOffsetLeft(this,r));const s=St.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,I).current),e(this,b,t(this,b)+t(this,A).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,f).current&&!t(this,P).current&&(t(this,f).current=!0),this.setVar(t(this,k).current,t(this,C)),this.setVar(t(this,D).current,t(this,E)),this.setVar(t(this,x).current,t(this,b)),t(this,d).max=t(this,b),e(this,tt,!0)}tick(){let r=t(this,S).currentScrollValue;t(this,ht).forEach(at=>{r+=at.value});const s=r-t(this,C);t(this,Q)||e(this,Q,t(this,d).previous?Math.abs(t(this,d).previous-s)>1e3:!1),t(this,d).set(s);const T=Math.round(r);t(this,f).current&&(T>=t(this,C)?t(this,V).current||c(this,h,wt).call(this):t(this,V).current&&!t(this,R).current&&c(this,h,Et).call(this),T<t(this,E)?t(this,F).current&&!t(this,z).current&&c(this,h,Ft).call(this):t(this,V).current&&!t(this,F).current&&c(this,h,Lt).call(this)),T>=t(this,C)&&T<t(this,E)?t(this,f).current||c(this,h,Pt).call(this):t(this,f).current&&(t(this,d).set(kt.step(t(this,b)/2,t(this,d).target,0,t(this,b))),c(this,h,Vt).call(this)),t(this,N)&&t(this,$).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,J,0),t(this,d).reset(),e(this,M,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),t(this,f).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,R).current=!1,t(this,z).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),c(this,h,mt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new ft(this)}disconnectedCallback(){t(this,S)instanceof ft&&t(this,S).destroy(),c(this,h,pt).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){r&&t(this,n).style.setProperty(`--${r}`,s.toString())}getDistance(){return t(this,J)+t(this,nt)}getStart(){return t(this,W)-t(this,nt)}},S=new WeakMap,B=new WeakMap,G=new WeakMap,K=new WeakMap,Z=new WeakMap,_=new WeakMap,A=new WeakMap,I=new WeakMap,$=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,H=new WeakMap,p=new WeakMap,O=new WeakMap,q=new WeakMap,L=new WeakMap,Y=new WeakMap,x=new WeakMap,k=new WeakMap,D=new WeakMap,f=new WeakMap,P=new WeakMap,V=new WeakMap,R=new WeakMap,z=new WeakMap,F=new WeakMap,ht=new WeakMap,n=new WeakMap,W=new WeakMap,J=new WeakMap,nt=new WeakMap,d=new WeakMap,M=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,tt=new WeakMap,N=new WeakMap,a=new WeakMap,Q=new WeakMap,h=new WeakSet,yt=function(){if(!t(this,S))return;t(this,f).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,z).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,B).observe(),t(this,G).observe(),t(this,K).observe(),t(this,Z).observe(),t(this,_).observe(),t(this,A).observe(),t(this,I).observe(),t(this,$).observe(),t(this,m).observe(),t(this,g).observe(),t(this,v).observe(),t(this,y).observe(),t(this,H).observe(),t(this,p).observe(),t(this,O).observe(),t(this,q).observe(),t(this,L).observe(),t(this,Y).observe(),t(this,x).observe(),t(this,k).observe(),t(this,D).observe();let r=!1;this.findAnotherScrollEntries(),t(this,_).current||this.enable(),t(this,B).subscribe(s=>{t(this,d).damping=s.current}),t(this,G).subscribe(s=>{t(this,d).mass=s.current}),t(this,K).subscribe(s=>{t(this,d).stiffness=s.current}),t(this,Z).subscribe(s=>{s.previous&&c(this,h,mt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,_).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,I).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,A).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,v).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,y).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,g).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,H).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,p).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,$).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,O).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,M)))}),t(this,L).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,c(this,h,dt).call(this)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,D).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,d).subscribe(s=>{if(t(this,Q)){e(this,Q,!1);return}const T=t(this,d)[t(this,Y).current];e(this,M,T/t(this,b)||0),this.setVar(t(this,O).current,T.toFixed(6)),this.setVar(t(this,q).current,t(this,M).toFixed(6)),t(this,L).current&&this.setVar(t(this,L).current,c(this,h,dt).call(this).toFixed(6))}),ut.windowResizer.subscribe(t(this,U),Ct.RESIZE_ORDER.SCROLL+1),ot.elementResizer.subscribe(this,t(this,U)),this.scrollContainer.onScroll(t(this,st)),r=!0},pt=function(){t(this,S)&&(ut.windowResizer.unsubscribe(t(this,U)),ot.elementResizer.unsubscribe(t(this,U)),this.scrollContainer.offScroll(t(this,st)),t(this,B).close(),t(this,G).close(),t(this,K).close(),t(this,Z).close(),t(this,_).close(),t(this,A).close(),t(this,I).close(),t(this,$).close(),t(this,m).close(),t(this,g).close(),t(this,v).close(),t(this,y).close(),t(this,H).close(),t(this,p).close(),t(this,O).close(),t(this,q).close(),t(this,L).close(),t(this,x).close(),t(this,k).close(),t(this,D).close(),t(this,f).close(),t(this,P).close(),t(this,V).close(),t(this,R).close(),t(this,z).close(),t(this,F).close(),this.disable())},Pt=function(){t(this,f).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,p).current&&t(this,n).classList.remove(t(this,p).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},Vt=function(){t(this,P).current=!0,t(this,f).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},wt=function(){t(this,f).current=!0,t(this,V).current=!0,t(this,R).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},Ft=function(){t(this,f).current=!0,t(this,z).current=!0,t(this,F).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Et=function(){t(this,P).current=!0,t(this,R).current=!0,t(this,V).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},Lt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,z).current=!1,t(this,p).current&&t(this,n).classList.add(t(this,p).current)},U=new WeakMap,st=new WeakMap,dt=function(){return Math.abs(Math.cos(t(this,M)*Math.PI))},X=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,f).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},Rt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},zt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},mt=function(){c(this,h,Rt).call(this,t(this,m).current,t(this,v).current,t(this,y).current,t(this,g).current,t(this,H).current,t(this,p).current),c(this,h,zt).call(this,t(this,O).current,t(this,q).current,t(this,L).current,t(this,x).current,t(this,k).current,t(this,D).current)},gt);qt.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",vt);exports.ScrollSegmentDefaultContainer=ft;exports.ScrollSegmentElement=vt;
@@ -1,32 +1,32 @@
1
- var mt = (l) => {
1
+ var St = (l) => {
2
2
  throw TypeError(l);
3
3
  };
4
- var lt = (l, c, r) => c.has(l) || mt("Cannot " + r);
5
- var t = (l, c, r) => (lt(l, c, "read from private field"), r ? r.call(l) : c.get(l)), i = (l, c, r) => c.has(l) ? mt("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(l) : c.set(l, r), e = (l, c, r, s) => (lt(l, c, "write to private field"), s ? s.call(l, r) : c.set(l, r), r), u = (l, c, r) => (lt(l, c, "access private method"), r);
6
- import { f as wt } from "../dom-CVWzyXPH.js";
7
- import { i as Et } from "../index-euf5anj6.js";
4
+ var lt = (l, o, r) => o.has(l) || St("Cannot " + r);
5
+ var t = (l, o, r) => (lt(l, o, "read from private field"), r ? r.call(l) : o.get(l)), i = (l, o, r) => o.has(l) ? St("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(l) : o.set(l, r), e = (l, o, r, s) => (lt(l, o, "write to private field"), s ? s.call(l, r) : o.set(l, r), r), c = (l, o, r) => (lt(l, o, "access private method"), r);
6
+ import { f as Et } from "../dom-CVWzyXPH.js";
7
+ import { i as Rt } from "../index-euf5anj6.js";
8
8
  import { elementResizer as ot } from "../element-resizer/index.js";
9
9
  import { windowResizer as ut } from "../window-resizer/index.js";
10
- import { CSSProperty as o } from "../css-property/index.js";
11
- import { TICK_ORDER as Rt, RESIZE_ORDER as Ot } from "../order/index.js";
10
+ import { CSSProperty as u } from "../css-property/index.js";
11
+ import { TICK_ORDER as Ot, RESIZE_ORDER as zt } from "../order/index.js";
12
12
  import { d as et } from "../events-CsVF98U6.js";
13
- import { d as zt } from "../function-C10DGppn.js";
14
- import { a as kt, g as Dt, c as xt } from "../layout-DpZo-I0y.js";
15
- import { s as Mt } from "../math-BOBiC4TN.js";
13
+ import { d as kt } from "../function-C10DGppn.js";
14
+ import { a as Dt, g as xt, c as Mt } from "../layout-DpZo-I0y.js";
15
+ import { s as Tt } from "../math-BOBiC4TN.js";
16
16
  import { S as rt } from "../Store-D2xCXENW.js";
17
- import { scrollEntries as Tt } from "../scroll-entries/index.js";
17
+ import { scrollEntries as At } from "../scroll-entries/index.js";
18
18
  import "../ticker/index.js";
19
- import { D as At } from "../Damped-BXsGpI-B.js";
19
+ import { D as It } from "../Damped-BXsGpI-B.js";
20
20
  var F, ct, it, B;
21
- class St {
22
- constructor(c) {
21
+ class dt {
22
+ constructor(o) {
23
23
  i(this, F, null);
24
24
  i(this, ct);
25
25
  i(this, it, !1);
26
26
  i(this, B, () => {
27
27
  e(this, it, !(t(this, F).scrollWidth > t(this, F).clientWidth));
28
28
  });
29
- e(this, ct, c), e(this, F, wt(t(this, ct))), ot.subscribe(t(this, F), t(this, B)), ut.subscribe(t(this, B)), t(this, B).call(this);
29
+ e(this, ct, o), e(this, F, Et(t(this, ct))), ot.subscribe(t(this, F), t(this, B)), ut.subscribe(t(this, B)), t(this, B).call(this);
30
30
  }
31
31
  get element() {
32
32
  return t(this, F);
@@ -40,16 +40,16 @@ class St {
40
40
  destroy() {
41
41
  ot.unsubscribe(t(this, B)), ut.unsubscribe(t(this, B));
42
42
  }
43
- onScroll(c) {
44
- t(this, F).addEventListener("scroll", c);
43
+ onScroll(o) {
44
+ t(this, F).addEventListener("scroll", o);
45
45
  }
46
- offScroll(c) {
47
- t(this, F).removeEventListener("scroll", c);
46
+ offScroll(o) {
47
+ t(this, F).removeEventListener("scroll", o);
48
48
  }
49
49
  }
50
50
  F = new WeakMap(), ct = new WeakMap(), it = new WeakMap(), B = new WeakMap();
51
- var f, G, K, Z, j, I, $, H, W, d, v, C, y, N, m, k, D, E, Y, x, M, T, p, P, V, R, O, L, ht, n, _, J, nt, S, z, g, b, w, tt, q, a, Q, h, bt, ft, gt, vt, Ct, yt, Pt, Vt, U, st, X, Ft, Lt, pt, dt;
52
- let It = (dt = class extends HTMLElement {
51
+ var f, G, K, Z, j, I, $, H, W, d, v, C, y, N, m, z, k, E, Y, D, x, M, p, P, V, R, O, L, ht, n, _, J, nt, S, T, g, b, w, tt, q, a, Q, h, gt, ft, vt, Ct, yt, Pt, Vt, Ft, U, st, pt, X, Lt, wt, mt, bt;
52
+ let $t = (bt = class extends HTMLElement {
53
53
  constructor() {
54
54
  super(...arguments);
55
55
  i(this, h);
@@ -68,13 +68,13 @@ let It = (dt = class extends HTMLElement {
68
68
  i(this, y);
69
69
  i(this, N);
70
70
  i(this, m);
71
+ i(this, z);
71
72
  i(this, k);
72
- i(this, D);
73
73
  i(this, E);
74
74
  i(this, Y);
75
+ i(this, D);
75
76
  i(this, x);
76
77
  i(this, M);
77
- i(this, T);
78
78
  i(this, p);
79
79
  i(this, P);
80
80
  i(this, V);
@@ -87,7 +87,7 @@ let It = (dt = class extends HTMLElement {
87
87
  i(this, J);
88
88
  i(this, nt);
89
89
  i(this, S);
90
- i(this, z);
90
+ i(this, T);
91
91
  i(this, g);
92
92
  i(this, b);
93
93
  i(this, w);
@@ -97,43 +97,43 @@ let It = (dt = class extends HTMLElement {
97
97
  i(this, Q);
98
98
  i(this, U);
99
99
  i(this, st);
100
- e(this, f, null), e(this, G, new o(this, "--damping", 20)), e(this, K, new o(this, "--mass", 0)), e(this, Z, new o(this, "--stiffness", 0)), e(this, j, new o(this, "--target", "")), e(this, I, new o(this, "--disabled", !1)), e(this, $, new o(
100
+ e(this, f, null), e(this, G, new u(this, "--damping", 20)), e(this, K, new u(this, "--mass", 0)), e(this, Z, new u(this, "--stiffness", 0)), e(this, j, new u(this, "--target", "")), e(this, I, new u(this, "--disabled", !1)), e(this, $, new u(
101
101
  this,
102
102
  "--distance-offset",
103
103
  0,
104
104
  { rawValueCheck: !1 }
105
- )), e(this, H, new o(this, "--start-offset", 0, {
105
+ )), e(this, H, new u(this, "--start-offset", 0, {
106
106
  rawValueCheck: !1
107
- })), e(this, W, new o(
107
+ })), e(this, W, new u(
108
108
  this,
109
109
  "--capture-once",
110
110
  !1
111
- )), e(this, d, new o(this, "--captured", "")), e(this, v, new o(this, "--released", "")), e(this, C, new o(
111
+ )), e(this, d, new u(this, "--captured", "")), e(this, v, new u(this, "--released", "")), e(this, C, new u(
112
112
  this,
113
113
  "--captured-from-start",
114
114
  ""
115
- )), e(this, y, new o(
115
+ )), e(this, y, new u(
116
116
  this,
117
117
  "--captured-from-finish",
118
118
  ""
119
- )), e(this, N, new o(
119
+ )), e(this, N, new u(
120
120
  this,
121
121
  "--released-from-start",
122
122
  ""
123
- )), e(this, m, new o(
123
+ )), e(this, m, new u(
124
124
  this,
125
125
  "--released-from-finish",
126
126
  ""
127
- )), e(this, k, new o(this, "--passed-var", "")), e(this, D, new o(this, "--progress-var", "")), e(this, E, new o(
127
+ )), e(this, z, new u(this, "--passed-var", "")), e(this, k, new u(this, "--progress-var", "")), e(this, E, new u(
128
128
  this,
129
129
  "--progress-arc-var",
130
130
  ""
131
- )), e(this, Y, new o(
131
+ )), e(this, Y, new u(
132
132
  this,
133
133
  "--animation-var-type",
134
134
  "target"
135
- )), e(this, x, new o(this, "--distance-var", "")), e(this, M, new o(this, "--start-var", "")), e(this, T, new o(this, "--finish-var", "")), e(this, p, new rt(!1)), e(this, P, new rt(!1)), e(this, V, new rt(!1)), e(this, R, new rt(!1)), e(this, O, new rt(!1)), e(this, L, new rt(!1)), e(this, ht, []), e(this, n, this), e(this, _, 0), e(this, J, 0), e(this, nt, 0), e(this, S, new At(0, { order: Rt.SEGMENT, min: 0, max: 1 })), e(this, z, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), e(this, q, !1), e(this, a, !0), e(this, Q, !1), this.findAnotherScrollEntries = zt(() => {
136
- const r = Tt.getAll(this).reverse();
135
+ )), e(this, D, new u(this, "--distance-var", "")), e(this, x, new u(this, "--start-var", "")), e(this, M, new u(this, "--finish-var", "")), e(this, p, new rt(!1)), e(this, P, new rt(!1)), e(this, V, new rt(!1)), e(this, R, new rt(!1)), e(this, O, new rt(!1)), e(this, L, new rt(!1)), e(this, ht, []), e(this, n, this), e(this, _, 0), e(this, J, 0), e(this, nt, 0), e(this, S, new It(0, { order: Ot.SEGMENT, min: 0, max: 1 })), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), e(this, q, !1), e(this, a, !0), e(this, Q, !1), this.findAnotherScrollEntries = kt(() => {
136
+ const r = At.getAll(this).reverse();
137
137
  let s = 0;
138
138
  r.forEach((A, at) => {
139
139
  A.element === t(this, f) && (s = at);
@@ -148,7 +148,7 @@ let It = (dt = class extends HTMLElement {
148
148
  return t(this, f);
149
149
  }
150
150
  set scrollContainer(r) {
151
- u(this, h, ft).call(this), e(this, f, r), u(this, h, bt).call(this);
151
+ c(this, h, ft).call(this), e(this, f, r), c(this, h, gt).call(this);
152
152
  }
153
153
  get distanceOffsetCSSProperty() {
154
154
  return t(this, $);
@@ -178,10 +178,10 @@ let It = (dt = class extends HTMLElement {
178
178
  return t(this, m);
179
179
  }
180
180
  get passedVarCSSProperty() {
181
- return t(this, k);
181
+ return t(this, z);
182
182
  }
183
183
  get progressVarCSSProperty() {
184
- return t(this, D);
184
+ return t(this, k);
185
185
  }
186
186
  get progressArcVarCSSProperty() {
187
187
  return t(this, E);
@@ -190,13 +190,13 @@ let It = (dt = class extends HTMLElement {
190
190
  return t(this, Y);
191
191
  }
192
192
  get distanceVarCSSProperty() {
193
- return t(this, x);
193
+ return t(this, D);
194
194
  }
195
195
  get startVarCSSProperty() {
196
- return t(this, M);
196
+ return t(this, x);
197
197
  }
198
198
  get finishVarCSSProperty() {
199
- return t(this, T);
199
+ return t(this, M);
200
200
  }
201
201
  get disabledCSSProperty() {
202
202
  return t(this, I);
@@ -241,7 +241,7 @@ let It = (dt = class extends HTMLElement {
241
241
  return t(this, S);
242
242
  }
243
243
  get progress() {
244
- return t(this, z);
244
+ return t(this, T);
245
245
  }
246
246
  get start() {
247
247
  return t(this, g);
@@ -261,12 +261,12 @@ let It = (dt = class extends HTMLElement {
261
261
  resize() {
262
262
  e(this, J, t(this, f).vertical ? this.offsetHeight : this.offsetWidth);
263
263
  const r = t(this, f) instanceof HTMLElement ? t(this, f) : t(this, f).element;
264
- e(this, _, t(this, f).vertical ? kt(this, r) : Dt(this, r));
265
- const s = xt(
264
+ e(this, _, t(this, f).vertical ? Dt(this, r) : xt(this, r));
265
+ const s = Mt(
266
266
  this,
267
267
  t(this, f).vertical ? "top" : "left"
268
268
  );
269
- e(this, _, t(this, _) - s), e(this, g, this.getStart()), e(this, b, this.getDistance()), e(this, g, t(this, g) + t(this, H).current), e(this, b, t(this, b) + t(this, $).current), e(this, w, t(this, g) + t(this, b)), t(this, f).currentScrollValue > t(this, w) && !t(this, p).current && !t(this, P).current && (t(this, p).current = !0), this.setVar(t(this, M).current, t(this, g)), this.setVar(t(this, T).current, t(this, w)), this.setVar(t(this, x).current, t(this, b)), t(this, S).max = t(this, b), e(this, tt, !0);
269
+ e(this, _, t(this, _) - s), e(this, g, this.getStart()), e(this, b, this.getDistance()), e(this, g, t(this, g) + t(this, H).current), e(this, b, t(this, b) + t(this, $).current), e(this, w, t(this, g) + t(this, b)), t(this, f).currentScrollValue > t(this, w) && !t(this, p).current && !t(this, P).current && (t(this, p).current = !0), this.setVar(t(this, x).current, t(this, g)), this.setVar(t(this, M).current, t(this, w)), this.setVar(t(this, D).current, t(this, b)), t(this, S).max = t(this, b), e(this, tt, !0);
270
270
  }
271
271
  tick() {
272
272
  let r = t(this, f).currentScrollValue;
@@ -276,21 +276,21 @@ let It = (dt = class extends HTMLElement {
276
276
  const s = r - t(this, g);
277
277
  t(this, Q) || e(this, Q, t(this, S).previous ? Math.abs(t(this, S).previous - s) > 1e3 : !1), t(this, S).set(s);
278
278
  const A = Math.round(r);
279
- t(this, p).current && (A >= t(this, g) ? t(this, V).current || u(this, h, Ct).call(this) : t(this, V).current && !t(this, R).current && u(this, h, Pt).call(this), A < t(this, w) ? t(this, L).current && !t(this, O).current && u(this, h, yt).call(this) : t(this, V).current && !t(this, L).current && u(this, h, Vt).call(this)), A >= t(this, g) && A < t(this, w) ? t(this, p).current || u(this, h, gt).call(this) : t(this, p).current && (t(this, S).set(
280
- Mt(t(this, b) / 2, t(this, S).target, 0, t(this, b))
281
- ), u(this, h, vt).call(this)), t(this, q) && t(this, W).current && (t(this, d).current && t(this, n).classList.add(t(this, d).current), e(this, a, !0));
279
+ t(this, p).current && (A >= t(this, g) ? t(this, V).current || c(this, h, yt).call(this) : t(this, V).current && !t(this, R).current && c(this, h, Vt).call(this), A < t(this, w) ? t(this, L).current && !t(this, O).current && c(this, h, Pt).call(this) : t(this, V).current && !t(this, L).current && c(this, h, Ft).call(this)), A >= t(this, g) && A < t(this, w) ? t(this, p).current || c(this, h, vt).call(this) : t(this, p).current && (t(this, S).set(
280
+ Tt(t(this, b) / 2, t(this, S).target, 0, t(this, b))
281
+ ), c(this, h, Ct).call(this)), t(this, q) && t(this, W).current && (t(this, d).current && t(this, n).classList.add(t(this, d).current), e(this, a, !0));
282
282
  }
283
283
  disable() {
284
- this.style.cssText = "", e(this, _, 0), e(this, J, 0), t(this, S).reset(), e(this, z, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), t(this, p).current = !1, t(this, P).current = !1, t(this, V).current = !1, t(this, R).current = !1, t(this, O).current = !1, t(this, L).current = !1, e(this, q, !1), e(this, a, !0), u(this, h, pt).call(this);
284
+ this.style.cssText = "", e(this, _, 0), e(this, J, 0), t(this, S).reset(), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), t(this, p).current = !1, t(this, P).current = !1, t(this, V).current = !1, t(this, R).current = !1, t(this, O).current = !1, t(this, L).current = !1, e(this, q, !1), e(this, a, !0), c(this, h, mt).call(this);
285
285
  }
286
286
  enable() {
287
287
  e(this, a, !1);
288
288
  }
289
289
  connectedCallback() {
290
- this.scrollContainer = new St(this);
290
+ this.scrollContainer = new dt(this);
291
291
  }
292
292
  disconnectedCallback() {
293
- t(this, f) instanceof St && t(this, f).destroy(), u(this, h, ft).call(this);
293
+ t(this, f) instanceof dt && t(this, f).destroy(), c(this, h, ft).call(this);
294
294
  }
295
295
  removeVar(r) {
296
296
  r && t(this, n).style.removeProperty(`--${r}`);
@@ -304,7 +304,7 @@ let It = (dt = class extends HTMLElement {
304
304
  getStart() {
305
305
  return t(this, _) - t(this, nt);
306
306
  }
307
- }, f = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), I = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), W = new WeakMap(), d = new WeakMap(), v = new WeakMap(), C = new WeakMap(), y = new WeakMap(), N = new WeakMap(), m = new WeakMap(), k = new WeakMap(), D = new WeakMap(), E = new WeakMap(), Y = new WeakMap(), x = new WeakMap(), M = new WeakMap(), T = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), O = new WeakMap(), L = new WeakMap(), ht = new WeakMap(), n = new WeakMap(), _ = new WeakMap(), J = new WeakMap(), nt = new WeakMap(), S = new WeakMap(), z = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), tt = new WeakMap(), q = new WeakMap(), a = new WeakMap(), Q = new WeakMap(), h = new WeakSet(), bt = function() {
307
+ }, f = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), I = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), W = new WeakMap(), d = new WeakMap(), v = new WeakMap(), C = new WeakMap(), y = new WeakMap(), N = new WeakMap(), m = new WeakMap(), z = new WeakMap(), k = new WeakMap(), E = new WeakMap(), Y = new WeakMap(), D = new WeakMap(), x = new WeakMap(), M = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), O = new WeakMap(), L = new WeakMap(), ht = new WeakMap(), n = new WeakMap(), _ = new WeakMap(), J = new WeakMap(), nt = new WeakMap(), S = new WeakMap(), T = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), tt = new WeakMap(), q = new WeakMap(), a = new WeakMap(), Q = new WeakMap(), h = new WeakSet(), gt = function() {
308
308
  if (!t(this, f))
309
309
  return;
310
310
  t(this, p).subscribe((s) => {
@@ -337,7 +337,7 @@ let It = (dt = class extends HTMLElement {
337
337
  composed: !0,
338
338
  custom: !0
339
339
  });
340
- }), t(this, G).observe(), t(this, K).observe(), t(this, Z).observe(), t(this, j).observe(), t(this, I).observe(), t(this, $).observe(), t(this, H).observe(), t(this, W).observe(), t(this, d).observe(), t(this, v).observe(), t(this, C).observe(), t(this, y).observe(), t(this, N).observe(), t(this, m).observe(), t(this, k).observe(), t(this, D).observe(), t(this, E).observe(), t(this, Y).observe(), t(this, x).observe(), t(this, M).observe(), t(this, T).observe();
340
+ }), t(this, G).observe(), t(this, K).observe(), t(this, Z).observe(), t(this, j).observe(), t(this, I).observe(), t(this, $).observe(), t(this, H).observe(), t(this, W).observe(), t(this, d).observe(), t(this, v).observe(), t(this, C).observe(), t(this, y).observe(), t(this, N).observe(), t(this, m).observe(), t(this, z).observe(), t(this, k).observe(), t(this, E).observe(), t(this, Y).observe(), t(this, D).observe(), t(this, x).observe(), t(this, M).observe();
341
341
  let r = !1;
342
342
  this.findAnotherScrollEntries(), t(this, I).current || this.enable(), t(this, G).subscribe((s) => {
343
343
  t(this, S).damping = s.current;
@@ -346,7 +346,7 @@ let It = (dt = class extends HTMLElement {
346
346
  }), t(this, Z).subscribe((s) => {
347
347
  t(this, S).stiffness = s.current;
348
348
  }), t(this, j).subscribe((s) => {
349
- s.previous && u(this, h, pt).call(this), s.current ? s.current === "parent" ? e(this, n, this.parentElement || this) : e(this, n, document.querySelector(s.current) || this) : e(this, n, this);
349
+ s.previous && c(this, h, mt).call(this), s.current ? s.current === "parent" ? e(this, n, this.parentElement || this) : e(this, n, document.querySelector(s.current) || this) : e(this, n, this);
350
350
  }), t(this, I).subscribe((s) => {
351
351
  s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
352
352
  }), t(this, H).subscribe(() => {
@@ -354,30 +354,30 @@ let It = (dt = class extends HTMLElement {
354
354
  }), t(this, $).subscribe(() => {
355
355
  r && !t(this, a) && this.resize();
356
356
  }), t(this, d).subscribe((s) => {
357
- u(this, h, X).call(this, s);
357
+ c(this, h, X).call(this, s);
358
358
  }), t(this, C).subscribe((s) => {
359
- u(this, h, X).call(this, s);
359
+ c(this, h, X).call(this, s);
360
360
  }), t(this, y).subscribe((s) => {
361
- u(this, h, X).call(this, s);
361
+ c(this, h, X).call(this, s);
362
362
  }), t(this, v).subscribe((s) => {
363
- u(this, h, X).call(this, s);
363
+ c(this, h, X).call(this, s);
364
364
  }), t(this, N).subscribe((s) => {
365
- u(this, h, X).call(this, s);
365
+ c(this, h, X).call(this, s);
366
366
  }), t(this, m).subscribe((s) => {
367
- u(this, h, X).call(this, s);
367
+ c(this, h, X).call(this, s);
368
368
  }), t(this, W).subscribe((s) => {
369
369
  t(this, a) || !s.current && s.previous && (this.resize(), this.enable());
370
- }), t(this, k).subscribe((s) => {
370
+ }), t(this, z).subscribe((s) => {
371
371
  t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
372
- }), t(this, D).subscribe((s) => {
373
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, z)));
372
+ }), t(this, k).subscribe((s) => {
373
+ t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, T)));
374
374
  }), t(this, E).subscribe((s) => {
375
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, z)));
376
- }), t(this, M).subscribe((s) => {
375
+ t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, c(this, h, pt).call(this)));
376
+ }), t(this, x).subscribe((s) => {
377
377
  t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, g)));
378
- }), t(this, T).subscribe((s) => {
378
+ }), t(this, M).subscribe((s) => {
379
379
  t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, w)));
380
- }), t(this, x).subscribe((s) => {
380
+ }), t(this, D).subscribe((s) => {
381
381
  t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, b)));
382
382
  }), t(this, S).subscribe((s) => {
383
383
  if (t(this, Q)) {
@@ -385,63 +385,65 @@ let It = (dt = class extends HTMLElement {
385
385
  return;
386
386
  }
387
387
  const A = t(this, S)[t(this, Y).current];
388
- e(this, z, A / t(this, b) || 0), this.setVar(t(this, k).current, A.toFixed(6)), this.setVar(
389
- t(this, D).current,
390
- t(this, z).toFixed(6)
388
+ e(this, T, A / t(this, b) || 0), this.setVar(t(this, z).current, A.toFixed(6)), this.setVar(
389
+ t(this, k).current,
390
+ t(this, T).toFixed(6)
391
391
  ), t(this, E).current && this.setVar(
392
392
  t(this, E).current,
393
- Math.abs(Math.cos(t(this, z) * Math.PI)).toFixed(6)
393
+ c(this, h, pt).call(this).toFixed(6)
394
394
  );
395
- }), ut.subscribe(t(this, U), Ot.SCROLL + 1), ot.subscribe(this, t(this, U)), this.scrollContainer.onScroll(t(this, st)), r = !0;
395
+ }), ut.subscribe(t(this, U), zt.SCROLL + 1), ot.subscribe(this, t(this, U)), this.scrollContainer.onScroll(t(this, st)), r = !0;
396
396
  }, ft = function() {
397
- t(this, f) && (ut.unsubscribe(t(this, U)), ot.unsubscribe(t(this, U)), this.scrollContainer.offScroll(t(this, st)), t(this, G).close(), t(this, K).close(), t(this, Z).close(), t(this, j).close(), t(this, I).close(), t(this, $).close(), t(this, H).close(), t(this, W).close(), t(this, d).close(), t(this, v).close(), t(this, C).close(), t(this, y).close(), t(this, N).close(), t(this, m).close(), t(this, k).close(), t(this, D).close(), t(this, E).close(), t(this, x).close(), t(this, M).close(), t(this, T).close(), t(this, p).close(), t(this, P).close(), t(this, V).close(), t(this, R).close(), t(this, O).close(), t(this, L).close(), this.disable());
398
- }, gt = function() {
397
+ t(this, f) && (ut.unsubscribe(t(this, U)), ot.unsubscribe(t(this, U)), this.scrollContainer.offScroll(t(this, st)), t(this, G).close(), t(this, K).close(), t(this, Z).close(), t(this, j).close(), t(this, I).close(), t(this, $).close(), t(this, H).close(), t(this, W).close(), t(this, d).close(), t(this, v).close(), t(this, C).close(), t(this, y).close(), t(this, N).close(), t(this, m).close(), t(this, z).close(), t(this, k).close(), t(this, E).close(), t(this, D).close(), t(this, x).close(), t(this, M).close(), t(this, p).close(), t(this, P).close(), t(this, V).close(), t(this, R).close(), t(this, O).close(), t(this, L).close(), this.disable());
398
+ }, vt = function() {
399
399
  t(this, p).current = !0, t(this, P).current = !1, e(this, q, !0), t(this, v).current && t(this, n).classList.remove(t(this, v).current), t(this, m).current && t(this, n).classList.remove(
400
400
  t(this, m).current
401
401
  ), t(this, m).current && t(this, n).classList.remove(
402
402
  t(this, m).current
403
403
  ), t(this, d).current && t(this, n).classList.add(t(this, d).current);
404
- }, vt = function() {
404
+ }, Ct = function() {
405
405
  t(this, P).current = !0, t(this, p).current = !1, e(this, q, !0), t(this, d).current && t(this, n).classList.remove(t(this, d).current), t(this, C).current && t(this, n).classList.remove(
406
406
  t(this, C).current
407
407
  ), t(this, y).current && t(this, n).classList.remove(
408
408
  t(this, y).current
409
409
  ), t(this, v).current && t(this, n).classList.add(t(this, v).current);
410
- }, Ct = function() {
410
+ }, yt = function() {
411
411
  t(this, p).current = !0, t(this, V).current = !0, t(this, R).current = !1, t(this, C).current && t(this, n).classList.add(
412
412
  t(this, C).current
413
413
  );
414
- }, yt = function() {
414
+ }, Pt = function() {
415
415
  t(this, p).current = !0, t(this, O).current = !0, t(this, L).current = !1, t(this, y).current && t(this, n).classList.add(
416
416
  t(this, y).current
417
417
  );
418
- }, Pt = function() {
418
+ }, Vt = function() {
419
419
  t(this, P).current = !0, t(this, R).current = !0, t(this, V).current = !1, t(this, m).current && t(this, n).classList.add(
420
420
  t(this, m).current
421
421
  );
422
- }, Vt = function() {
422
+ }, Ft = function() {
423
423
  t(this, P).current = !0, t(this, L).current = !0, t(this, O).current = !1, t(this, m).current && t(this, n).classList.add(
424
424
  t(this, m).current
425
425
  );
426
- }, U = new WeakMap(), st = new WeakMap(), X = function(r) {
426
+ }, U = new WeakMap(), st = new WeakMap(), pt = function() {
427
+ return Math.abs(Math.cos(t(this, T) * Math.PI));
428
+ }, X = function(r) {
427
429
  if (t(this, a)) {
428
430
  r.previous && t(this, n).classList.remove(r.previous), r.current && t(this, n).classList.remove(r.current);
429
431
  return;
430
432
  }
431
433
  r.current && t(this, p).current ? (r.previous && t(this, n).classList.remove(r.previous), t(this, n).classList.add(r.current)) : !r.current && r.previous && t(this, n).classList.remove(r.previous);
432
- }, Ft = function(...r) {
434
+ }, Lt = function(...r) {
433
435
  r.forEach((s) => {
434
436
  s && t(this, n).classList.remove(s);
435
437
  });
436
- }, Lt = function(...r) {
438
+ }, wt = function(...r) {
437
439
  r.forEach((s) => {
438
440
  s && t(this, n).style.removeProperty(`--${s}`);
439
441
  });
440
- }, pt = function() {
441
- u(this, h, Ft).call(this, t(this, d).current, t(this, C).current, t(this, y).current, t(this, v).current, t(this, N).current, t(this, m).current), u(this, h, Lt).call(this, t(this, k).current, t(this, D).current, t(this, E).current, t(this, x).current, t(this, M).current, t(this, T).current);
442
- }, dt);
443
- Et && !customElements.get("scroll-segment") && customElements.define("scroll-segment", It);
442
+ }, mt = function() {
443
+ c(this, h, Lt).call(this, t(this, d).current, t(this, C).current, t(this, y).current, t(this, v).current, t(this, N).current, t(this, m).current), c(this, h, wt).call(this, t(this, z).current, t(this, k).current, t(this, E).current, t(this, D).current, t(this, x).current, t(this, M).current);
444
+ }, bt);
445
+ Rt && !customElements.get("scroll-segment") && customElements.define("scroll-segment", $t);
444
446
  export {
445
- St as ScrollSegmentDefaultContainer,
446
- It as ScrollSegmentElement
447
+ dt as ScrollSegmentDefaultContainer,
448
+ $t as ScrollSegmentElement
447
449
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.50.21",
3
+ "version": "0.50.22",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"