aptechka 0.18.0 → 0.19.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -128,11 +128,6 @@
128
128
  "default": "./lib/popover/index.js",
129
129
  "types": "./lib/popover/index.d.ts"
130
130
  },
131
- "./scroll": {
132
- "require": "./lib/scroll/index.cjs",
133
- "default": "./lib/scroll/index.js",
134
- "types": "./lib/scroll/index.d.ts"
135
- },
136
131
  "./scroll-entries": {
137
132
  "require": "./lib/scroll-entries/index.cjs",
138
133
  "default": "./lib/scroll-entries/index.js",
@@ -255,9 +250,6 @@
255
250
  "popover": [
256
251
  "lib/popover/index.d.ts"
257
252
  ],
258
- "scroll": [
259
- "lib/scroll/index.d.ts"
260
- ],
261
253
  "scroll-entries": [
262
254
  "lib/scroll-entries/index.d.ts"
263
255
  ],
@@ -1,11 +0,0 @@
1
- import { ScrollUserElement } from './ScrollUserElement';
2
- export declare class ScrollBulletButtonsElement extends ScrollUserElement {
3
- #private;
4
- protected connectedCallback(): void;
5
- protected disconnectedCallback(): void;
6
- }
7
- declare global {
8
- interface HTMLElementTagNameMap {
9
- 'e-scroll-bullet-buttons': ScrollBulletButtonsElement;
10
- }
11
- }
@@ -1,5 +0,0 @@
1
- import { ScrollUserElement } from './ScrollUserElement';
2
- export declare abstract class ScrollButtonElement extends ScrollUserElement {
3
- constructor();
4
- protected abstract handleClick(): void;
5
- }
@@ -1,81 +0,0 @@
1
- import { Damped } from '../animation';
2
- import { Store } from '../store';
3
- import { Axes2D, EasingFunction } from '../utils';
4
- import { CSSProperty } from '../css-property';
5
- import { ScrollSection } from './ScrollSection';
6
- export type ScrollBehaviour = 'smooth' | 'instant';
7
- export interface ScrollSetOptions {
8
- behaviour?: ScrollBehaviour;
9
- tween?: {
10
- easing?: EasingFunction;
11
- duration: number;
12
- };
13
- }
14
- export declare class ScrollElement extends HTMLElement {
15
- #private;
16
- constructor();
17
- get damped(): Damped;
18
- get controlsCSSProperty(): CSSProperty<boolean>;
19
- get axisCSSProperty(): CSSProperty<Axes2D>;
20
- get directionCSSProperty(): CSSProperty<number>;
21
- get pagesCSSProperty(): CSSProperty<number>;
22
- get splitCSSProperty(): CSSProperty<boolean>;
23
- get sectionalCSSProperty(): CSSProperty<boolean>;
24
- get autoSizeCSSProperty(): CSSProperty<boolean>;
25
- get wheelMaxDeltaCSSProperty(): CSSProperty<boolean>;
26
- get sectionsInViewCSSProperty(): CSSProperty<number>;
27
- get loopCSSProperty(): CSSProperty<boolean>;
28
- get dampingCSSProperty(): CSSProperty<number>;
29
- get massCSSProperty(): CSSProperty<number>;
30
- get stiffnessCSSProperty(): CSSProperty<number>;
31
- get mouseDragCSSProperty(): CSSProperty<boolean>;
32
- get sectionDistanceScaleCSSProperty(): CSSProperty<number>;
33
- get autoplayCSSProperty(): CSSProperty<number>;
34
- get autoplayPauseDurationCSSProperty(): CSSProperty<number>;
35
- get autoplayUserDirectionCSSProperty(): CSSProperty<boolean>;
36
- get classesCSSProperty(): CSSProperty<number>;
37
- get currentIndexStartOffsetCSSProperty(): CSSProperty<number>;
38
- get currentIndexEndOffsetCSSProperty(): CSSProperty<number>;
39
- get focusDelayCSSProperty(): CSSProperty<number>;
40
- get focusDurationCSSProperty(): CSSProperty<number>;
41
- get disabledCSSProperty(): CSSProperty<boolean>;
42
- get hibernatedCSSProperty(): CSSProperty<boolean>;
43
- get currentScrollValue(): number;
44
- get targetScrollValue(): number;
45
- get contentElement(): HTMLElement;
46
- get sections(): ScrollSection[];
47
- get position(): number;
48
- get contentPosition(): number;
49
- get viewportSize(): number;
50
- get scrollSize(): number;
51
- get gap(): number;
52
- get counter(): Store<number>;
53
- get limit(): number;
54
- get distance(): number;
55
- get loopDistance(): number;
56
- get overscroll(): number;
57
- get vertical(): boolean;
58
- get currentProgress(): number;
59
- get targetProgress(): number;
60
- get scrollWidth(): number;
61
- get scrollHeight(): number;
62
- onScroll(...parameters: Parameters<Damped['subscribe']>): () => void;
63
- offScroll(...parameters: Parameters<Damped['unsubscribe']>): void;
64
- range(from: number, distance: number, margin?: number): number;
65
- curve(from: number, distance: number, margin?: number): number;
66
- visible(from: number, distance: number, margin?: number): boolean;
67
- scrollToSection(sectionIndex: number, options?: ScrollSetOptions): void;
68
- shiftSections(step: number, options?: ScrollSetOptions): void;
69
- setPosition(value: number, options?: ScrollSetOptions): void;
70
- shiftPosition(value: number, options?: ScrollSetOptions): void;
71
- protected connectedCallback(): void;
72
- protected disconnectedCallback(): void;
73
- }
74
- declare global {
75
- interface HTMLElementTagNameMap {
76
- 'e-scroll': ScrollElement;
77
- }
78
- interface HTMLElementEventMap {
79
- sectionsChange: CustomEvent;
80
- }
81
- }
@@ -1,22 +0,0 @@
1
- import { ScrollElement } from './ScrollElement';
2
- export type ScrollSectionMark = 'current' | 'previous' | 'next' | null;
3
- export type ScrollSectionMarkChangeEvent = CustomEvent<{
4
- mark: ScrollSectionMark;
5
- }>;
6
- export declare class ScrollSection {
7
- #private;
8
- constructor(element: HTMLElement, index: number, scrollElement: ScrollElement);
9
- get index(): number;
10
- get size(): number;
11
- get position(): number;
12
- destroy(): void;
13
- setSize(value?: number): void;
14
- resize(): void;
15
- transform(): void;
16
- mark(mark: ScrollSectionMark): void;
17
- }
18
- declare global {
19
- interface HTMLElementEventMap {
20
- sectionMarkChange: ScrollSectionMarkChangeEvent;
21
- }
22
- }
@@ -1,62 +0,0 @@
1
- import { CSSProperty } from '../css-property';
2
- import { Store } from '../store';
3
- import { Damped } from '../animation';
4
- import { ScrollUserElement } from './ScrollUserElement';
5
- export interface ScrollSegmentResizeDetail {
6
- start: number;
7
- distance: number;
8
- finish: number;
9
- }
10
- export declare class ScrollSegmentElement extends ScrollUserElement {
11
- #private;
12
- constructor();
13
- get distanceOffsetCSSProperty(): CSSProperty<number>;
14
- get startOffsetCSSProperty(): CSSProperty<number>;
15
- get captureOnceCSSProperty(): CSSProperty<boolean>;
16
- get capturedCSSProperty(): CSSProperty<string>;
17
- get releasedCSSProperty(): CSSProperty<string>;
18
- get capturedFromStartCSSProperty(): CSSProperty<string>;
19
- get capturedFromFinishCSSProperty(): CSSProperty<string>;
20
- get releasedFromStartCSSProperty(): CSSProperty<string>;
21
- get releasedFromFinishCSSProperty(): CSSProperty<string>;
22
- get passedVarCSSProperty(): CSSProperty<string>;
23
- get progressVarCSSProperty(): CSSProperty<string>;
24
- get distanceVarCSSProperty(): CSSProperty<string>;
25
- get startVarCSSProperty(): CSSProperty<string>;
26
- get finishVarCSSProperty(): CSSProperty<string>;
27
- get disabledCSSProperty(): CSSProperty<boolean>;
28
- get dampingCSSProperty(): CSSProperty<number>;
29
- get massCSSProperty(): CSSProperty<number>;
30
- get stiffnessCSSProperty(): CSSProperty<number>;
31
- get targetCSSProperty(): CSSProperty<string>;
32
- get isCaptured(): Store<boolean>;
33
- get isReleased(): Store<boolean>;
34
- get isCapturedFromStart(): Store<boolean>;
35
- get isReleasedFromStart(): Store<boolean>;
36
- get isCapturedFromFinish(): Store<boolean>;
37
- get isReleasedFromFinish(): Store<boolean>;
38
- get directionPosition(): number;
39
- get directionSize(): number;
40
- get passed(): Damped;
41
- get progress(): number;
42
- get start(): number;
43
- get finish(): number;
44
- get distance(): number;
45
- get isCapturedOnce(): boolean;
46
- get isDisabled(): boolean;
47
- resize(): void;
48
- tick(): void;
49
- disable(): void;
50
- enable(): void;
51
- protected connectedCallback(): void;
52
- protected disconnectedCallback(): void;
53
- protected removeVar(name: string | undefined): void;
54
- protected setVar(name: string | undefined, value: string | number): void;
55
- protected getDistance(): number;
56
- protected getStart(): number;
57
- }
58
- declare global {
59
- interface HTMLElementTagNameMap {
60
- 'e-scroll-segment': ScrollSegmentElement;
61
- }
62
- }
@@ -1,9 +0,0 @@
1
- import { ScrollButtonElement } from './ScrollButtonElement';
2
- export declare class ScrollSetButtonElement extends ScrollButtonElement {
3
- protected handleClick(): void;
4
- }
5
- declare global {
6
- interface HTMLElementTagNameMap {
7
- 'e-scroll-set-button': ScrollSetButtonElement;
8
- }
9
- }
@@ -1,9 +0,0 @@
1
- import { ScrollButtonElement } from './ScrollButtonElement';
2
- export declare class ScrollStepButtonElement extends ScrollButtonElement {
3
- protected handleClick(): void;
4
- }
5
- declare global {
6
- interface HTMLElementTagNameMap {
7
- 'e-scroll-step-button': ScrollStepButtonElement;
8
- }
9
- }
@@ -1,6 +0,0 @@
1
- import { ScrollElement } from './ScrollElement';
2
- export declare class ScrollUserElement extends HTMLElement {
3
- #private;
4
- get scrollElement(): ScrollElement;
5
- protected connectedCallback(): void;
6
- }
@@ -1,13 +0,0 @@
1
- import { ScrollUserElement } from './ScrollUserElement';
2
- export declare class ScrollbarElement extends ScrollUserElement {
3
- #private;
4
- constructor();
5
- get thumbElement(): HTMLElement;
6
- protected connectedCallback(): void;
7
- protected disconnectedCallback(): void;
8
- }
9
- declare global {
10
- interface HTMLElementTagNameMap {
11
- 'e-scrollbar': ScrollbarElement;
12
- }
13
- }
@@ -1 +0,0 @@
1
- "use strict";var bs=Object.defineProperty;var Ge=Object.getOwnPropertySymbols;var ms=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable;var Ze=S=>{throw TypeError(S)};var Ke=(S,h,e)=>h in S?bs(S,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[h]=e,je=(S,h)=>{for(var e in h||(h={}))ms.call(h,e)&&Ke(S,e,h[e]);if(Ge)for(var e of Ge(h))gs.call(h,e)&&Ke(S,e,h[e]);return S};var Me=(S,h,e)=>h.has(S)||Ze("Cannot "+e);var t=(S,h,e)=>(Me(S,h,"read from private field"),e?e.call(S):h.get(S)),r=(S,h,e)=>h.has(S)?Ze("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(S):h.set(S,e),n=(S,h,e,s)=>(Me(S,h,"write to private field"),s?s.call(S,e):h.set(S,e),e),o=(S,h,e)=>(Me(S,h,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Rt=require("../Store-CDb6RMce.cjs"),Te=require("../browser-CpzFX2xg.cjs"),Cs=require("../easings-DsS5-Kqc.cjs"),Qe=require("../jss-GJLvaNfT.cjs"),kt=require("../layout-8ryRAMGJ.cjs"),Ne=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const be=require("../order/index.cjs"),Xe=require("../Damped-ipnDc0iX.cjs"),ys=require("../Tweened-B1TfANfR.cjs"),De=require("../controls/index.cjs"),de=require("../window-resizer/index.cjs"),Yt=require("../scroll-entries/index.cjs"),Je=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),vs=require("../Viewport-BDPsnAF4.cjs"),Oe=require("../element-resizer/index.cjs"),Ps=require("../gestures-DHLrn6Q8.cjs"),Es=require("../dom-JBOkFLTh.cjs"),Ye=require("../function-MthRj-GJ.cjs");var m,me,v,It,j,St;class ws{constructor(h,e,s){r(this,m);r(this,me);r(this,v);r(this,It,0);r(this,j,0);r(this,St,null);n(this,m,h),n(this,me,e),n(this,v,s),Yt.scrollEntries.register(t(this,m))}get index(){return t(this,me)}get size(){return t(this,It)}get position(){return t(this,j)}destroy(){Yt.scrollEntries.unregister(t(this,m)),t(this,m).style.transform="",this.mark(null)}setSize(h){h?(t(this,m).style.setProperty("--size",h+"px"),t(this,v).axisCSSProperty.current==="x"?(t(this,m).style.width=h+"px",t(this,m).style.height=""):(t(this,m).style.height=h+"px",t(this,m).style.width="")):(t(this,m).style.width="",t(this,m).style.height="",t(this,m).style.removeProperty("--size"))}resize(){n(this,It,t(this,v).vertical?t(this,m).offsetHeight:t(this,m).offsetWidth),n(this,j,t(this,v).vertical?kt.getCumulativeOffsetTop(t(this,m)):kt.getCumulativeOffsetLeft(t(this,m))),n(this,j,t(this,j)-t(this,v).contentPosition)}transform(){let h=0;const e=t(this,v).viewportSize*t(this,v).sectionDistanceScaleCSSProperty.current;t(this,v).loopCSSProperty.current&&t(this,v).overscroll&&t(this,j)+t(this,It)<t(this,v).currentScrollValue&&(h=t(this,v).distance*-1-t(this,v).gap),Yt.scrollEntries.update(t(this,m),t(this,v).axisCSSProperty.current,h);const s=t(this,v).currentScrollValue+h,i=t(this,j)-t(this,v).viewportSize-e,a=t(this,j)+t(this,It)+e,g=Ne.clamp(s,i,a);t(this,v).vertical?t(this,m).style.transform=`translate3d(0px, ${g*-1}px, 0px)`:t(this,m).style.transform=`translate3d(${g*-1}px, 0px, 0px)`}mark(h){t(this,St)!==h&&(t(this,St)&&t(this,m).classList.remove(t(this,St)),h&&t(this,m).classList.add(h),n(this,St,h),t(this,m).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,St)}})))}}m=new WeakMap,me=new WeakMap,v=new WeakMap,It=new WeakMap,j=new WeakMap,St=new WeakMap;const xs=Qe.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":{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 p,Tt,I,J,Q,W,X,pt,dt,U,k,qt,Mt,At,Bt,se,N,Ht,ft,G,bt,Y,mt,_t,$t,Wt,d,ie,l,ge,Ce,E,C,T,K,gt,tt,z,y,re,Ct,Ut,Nt,ne,et,u,fe,ee,Ae,Be,He,_e,q,ye,ts,he,ve,$e,Dt,We;class Ie extends HTMLElement{constructor(){super();r(this,u);r(this,p,null);r(this,Tt,new c.CSSProperty(this,"--controls",!0));r(this,I,new c.CSSProperty(this,"--axis","y"));r(this,J,new c.CSSProperty(this,"--direction",0));r(this,Q,new c.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));r(this,W,new c.CSSProperty(this,"--split",!1));r(this,X,new c.CSSProperty(this,"--sectional",!1));r(this,pt,new c.CSSProperty(this,"--auto-size",!1));r(this,dt,new c.CSSProperty(this,"--wheel-max-delta",!1));r(this,U,new c.CSSProperty(this,"--sections-in-view",1));r(this,k,new c.CSSProperty(this,"--loop",!1));r(this,qt,new c.CSSProperty(this,"--damping",20));r(this,Mt,new c.CSSProperty(this,"--mass",0));r(this,At,new c.CSSProperty(this,"--stiffness",0));r(this,Bt,new c.CSSProperty(this,"--mouse-drag",!1));r(this,se,new c.CSSProperty(this,"--section-distance-scale",.5));r(this,N,new c.CSSProperty(this,"--autoplay",0));r(this,Ht,new c.CSSProperty(this,"--autoplay-pause-duration",0));r(this,ft,new c.CSSProperty(this,"--autoplay-user-direction",!1));r(this,G,new c.CSSProperty(this,"--classes",0));r(this,bt,new c.CSSProperty(this,"--current-index-start-offset",0));r(this,Y,new c.CSSProperty(this,"--current-index-end-offset",0));r(this,mt,new c.CSSProperty(this,"--focus-delay",0));r(this,_t,new c.CSSProperty(this,"--focus-duration",3e3));r(this,$t,new c.CSSProperty(this,"--disabled",!1));r(this,Wt,new c.CSSProperty(this,"--hibernated",!1));r(this,d,null);r(this,ie,null);r(this,l,[]);r(this,ge,0);r(this,Ce,0);r(this,E,0);r(this,C,0);r(this,T,0);r(this,K,null);r(this,gt,null);r(this,tt,null);r(this,z,null);r(this,y,new Rt.Store(0));r(this,re,0);r(this,Ct,0);r(this,Ut,!0);r(this,Nt,!0);r(this,ne);r(this,et,new ys.Tweened);r(this,q,()=>{t(this,p).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,C)||0,s=t(this,y).current;if(n(this,ge,this.vertical?kt.getCumulativeOffsetTop(this):kt.getCumulativeOffsetLeft(this)),n(this,Ce,this.vertical?kt.getCumulativeOffsetTop(t(this,d)):kt.getCumulativeOffsetLeft(t(this,d))),n(this,E,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?n(this,T,Je.cssUnitParser.parse(getComputedStyle(t(this,d)).rowGap)):n(this,T,Je.cssUnitParser.parse(getComputedStyle(t(this,d)).columnGap)),t(this,pt).current&&t(this,l).length){const i=t(this,U).current,a=(t(this,E)-t(this,T)*(i-1))/i;t(this,l).forEach(g=>{g.setSize(a)})}else t(this,l).forEach(i=>{i.setSize()});if(t(this,l).forEach(i=>{i.resize()}),t(this,Q).current){n(this,C,t(this,E)*t(this,Q).current);const i=t(this,C)+t(this,E);this.vertical?(t(this,d).style.width=i+"px",t(this,d).style.height="100%"):(t(this,d).style.height=i+"px",t(this,d).style.width="100%")}else this.vertical?(t(this,d).style.width="100%",t(this,d).style.height="max-content",n(this,C,t(this,d).offsetHeight-t(this,E))):(t(this,d).style.width="max-content",t(this,d).style.height="100%",n(this,C,t(this,d).offsetWidth-t(this,E)));if(!t(this,k).current){const i=getComputedStyle(this),a=this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd);n(this,C,t(this,C)+a),t(this,p).max=t(this,C)}if(t(this,k).current&&t(this,l).length){const i=t(this,l)[t(this,l).length-1],a=i.position+i.size-t(this,E),g=t(this,C)-a;n(this,Ct,i.position+i.size+g)}else n(this,Ct,t(this,C));if(t(this,X).current&&t(this,l).length){const i=t(this,l)[s];t(this,p).set(i.position,{equalize:!0})}else t(this,p).set(e*t(this,C),{equalize:!0})});r(this,ye,()=>{const e=this.currentScrollValue;if(n(this,re,Math.max(0,e-t(this,C))),t(this,l).length){let s=0;for(let i=0;i<t(this,l).length;i++){const a=t(this,l)[i];a.transform(),this.targetScrollValue+a.size/2>=a.position&&(s=i)}t(this,y).current=s}else this.vertical?t(this,d).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,d).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Yt.scrollEntries.update(this,t(this,I).current,e)});r(this,he,(e,s)=>{t(this,Tt).current&&(t(this,ft).current&&(t(this,z).pauseAndContinue(t(this,Ht).current),t(this,z).direction=Math.sign(s)||1),t(this,ve).call(this,e,s))});r(this,ve,(e,s)=>{if(t(this,J).current){if(t(this,J).current<0&&s>0)return;if(t(this,J).current>0&&s<0)return}if(t(this,et).unlistenAnimationFrame(),!t(this,N).current&&t(this,mt).current&&(clearInterval(t(this,ne)),n(this,ne,setTimeout(()=>{const i=o(this,u,We).call(this);i&&this.scrollToSection(i.index,{tween:{duration:t(this,_t).current,easing:Cs.easeInOutExpo}})},t(this,mt).current))),!(e==="drag"&&!vs.device.isMobile&&!t(this,Bt).current))if(t(this,X).current){const i=Math.sign(s);t(this,l).length?this.shiftSections(i):t(this,p).shift(i*t(this,E))}else t(this,p).shift(s)});if(Te.isBrowser){n(this,p,new Xe.Damped(0,{damping:.01,min:0,order:be.TICK_ORDER.SCROLL}));const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(xs),this.tabIndex=0;const s=document.createElement("div");s.className="static",s.innerHTML='<slot name="static"></slot>',e.appendChild(s),n(this,d,document.createElement("div")),t(this,d).className="content",n(this,ie,document.createElement("slot")),t(this,d).appendChild(t(this,ie)),e.appendChild(t(this,d)),n(this,K,new De.WheelControls({element:t(this,d)})),t(this,K).changeEvent.subscribe(t(this,he)),n(this,gt,new De.KeyboardControls({element:this})),t(this,gt).changeEvent.subscribe(t(this,he)),n(this,tt,new De.DragControls({element:t(this,d)})),t(this,tt).changeEvent.subscribe(t(this,he)),n(this,z,new De.AutoplayControls({culling:this})),t(this,z).changeEvent.subscribe(t(this,ve)),t(this,I).subscribe(({current:i})=>{t(this,d).style.flexDirection=i==="x"?"row":"column",t(this,K).axis=t(this,dt).current?"max":i,t(this,gt).dimension=i==="x"?"width":"height",t(this,tt).axis=i,i==="x"?this.style.touchAction="pan-y":i==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,q).call(this)}),t(this,dt).subscribe(i=>{t(this,K).axis=i.current?"max":t(this,I).current}),t(this,Q).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,W).subscribe(({current:i})=>{this.isConnected&&(i?o(this,u,fe).call(this):o(this,u,ee).call(this))}),t(this,X).subscribe(i=>{t(this,K).debounce=i.current,t(this,tt).swipe=i.current,t(this,z).interval=i.current,this.isConnected&&(i.current&&!i.previous&&!t(this,l).length?o(this,u,fe).call(this):!i.current&&i.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,pt).subscribe(i=>{this.isConnected&&(t(this,q).call(this),i.current&&!i.previous&&!t(this,l).length?o(this,u,fe).call(this):!i.current&&i.previous&&t(this,l).length&&o(this,u,ee).call(this))}),t(this,U).subscribe(i=>{this.isConnected&&(t(this,q).call(this),o(this,u,Dt).call(this))}),t(this,k).subscribe(i=>{i.current?(this.isConnected&&(t(this,l).length||(t(this,W).current=!0)),t(this,l).length&&(t(this,p).max=1/0,t(this,p).min=-1/0)):(n(this,re,0),t(this,p).max=t(this,C),t(this,p).min=0)}),t(this,qt).subscribe(i=>{t(this,p).damping=i.current}),t(this,Mt).subscribe(i=>{t(this,p).mass=i.current}),t(this,At).subscribe(i=>{t(this,p).stiffness=i.current}),t(this,$t).subscribe(i=>{i.current&&!i.previous?o(this,u,Ae).call(this):!i.current&&i.previous&&o(this,u,Be).call(this)}),t(this,Wt).subscribe(i=>{i.current&&!i.previous?o(this,u,He).call(this):!i.current&&i.previous&&o(this,u,_e).call(this)}),t(this,N).subscribe(i=>{t(this,z).speed=i.current,i.current&&!i.previous?t(this,z).connect():!i.current&&i.previous&&t(this,z).disconnect()}),t(this,ft).subscribe(i=>{i.current||(t(this,z).direction=1)}),t(this,G).subscribe(i=>{this.isConnected&&o(this,u,Dt).call(this)}),t(this,bt).subscribe(i=>{this.isConnected&&t(this,G).current&&o(this,u,Dt).call(this)}),t(this,Y).subscribe(i=>{this.isConnected&&t(this,G).current&&o(this,u,Dt).call(this)}),t(this,p).isRunning.subscribe(i=>{this.classList.toggle("active",i.current)}),t(this,y).subscribe(i=>{t(this,l).length&&o(this,u,Dt).call(this)}),t(this,et).subscribe(i=>{t(this,et).isRunning.current&&t(this,p).set(i.current)})}}get damped(){return t(this,p)}get controlsCSSProperty(){return t(this,Tt)}get axisCSSProperty(){return t(this,I)}get directionCSSProperty(){return t(this,J)}get pagesCSSProperty(){return t(this,Q)}get splitCSSProperty(){return t(this,W)}get sectionalCSSProperty(){return t(this,X)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,dt)}get sectionsInViewCSSProperty(){return t(this,U)}get loopCSSProperty(){return t(this,k)}get dampingCSSProperty(){return t(this,qt)}get massCSSProperty(){return t(this,Mt)}get stiffnessCSSProperty(){return t(this,At)}get mouseDragCSSProperty(){return t(this,Bt)}get sectionDistanceScaleCSSProperty(){return t(this,se)}get autoplayCSSProperty(){return t(this,N)}get autoplayPauseDurationCSSProperty(){return t(this,Ht)}get autoplayUserDirectionCSSProperty(){return t(this,ft)}get classesCSSProperty(){return t(this,G)}get currentIndexStartOffsetCSSProperty(){return t(this,bt)}get currentIndexEndOffsetCSSProperty(){return t(this,Y)}get focusDelayCSSProperty(){return t(this,mt)}get focusDurationCSSProperty(){return t(this,_t)}get disabledCSSProperty(){return t(this,$t)}get hibernatedCSSProperty(){return t(this,Wt)}get currentScrollValue(){return o(this,u,$e).call(this,"current")}get targetScrollValue(){return o(this,u,$e).call(this,"target")}get contentElement(){return t(this,d)}get sections(){return t(this,l)}get position(){return t(this,ge)}get contentPosition(){return t(this,Ce)}get viewportSize(){return t(this,E)}get scrollSize(){return t(this,C)}get gap(){return t(this,T)}get counter(){return t(this,y)}get limit(){return t(this,l).length-t(this,U).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,k).current?t(this,Ct)+t(this,T):t(this,Ct)}get overscroll(){return t(this,re)}get vertical(){return t(this,I).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,I).current==="y"?0:t(this,p).distance}get scrollHeight(){return t(this,I).current==="x"?0:t(this,p).distance}onScroll(...e){return t(this,p).subscribe(...e)}offScroll(...e){t(this,p).unsubscribe(...e)}range(e,s,i=0){const a=e-i,g=a+s+i*2;return this.currentProgress<a?0:this.currentProgress>g?1:(this.currentProgress-a)/(g-a)}curve(e,s,i=0){return Math.sin(this.range(e,s,i)*Math.PI)}visible(e,s,i=0){const a=e-i,g=a+s+i*2;return this.currentProgress>=a&&this.currentProgress<=g}scrollToSection(e,s){if(!t(this,l).length)return;const i=t(this,y).current;o(this,u,ts).call(this,e);const a=t(this,l)[i],g=t(this,l)[t(this,y).current];if(a&&g){let O=0;const te=o(this,u,We).call(this),fs=te?this.targetScrollValue-te.position:0;t(this,k).current?t(this,y).current===0&&i===t(this,l).length-1?O=t(this,C)+t(this,E)-a.position+t(this,T):t(this,y).current===t(this,l).length-1&&i===0?O=g.position-(t(this,C)+t(this,E)+t(this,T)):O=g.position-a.position:O=g.position-a.position,this.shiftPosition(O-fs,s)}}shiftSections(e,s){t(this,l).length&&this.scrollToSection(t(this,y).current+e,s)}setPosition(e,s){s!=null&&s.tween?(t(this,et).set(t(this,p).current,{equalize:!0}),t(this,et).set(e,je({},s.tween))):t(this,p).set(e,{equalize:(s==null?void 0:s.behaviour)==="instant"})}shiftPosition(e,s){this.setPosition(t(this,p).target+e,s)}connectedCallback(){t(this,Tt).observe(),t(this,I).observe(),t(this,J).observe(),t(this,Q).observe(),t(this,W).observe(),t(this,X).observe(),t(this,pt).observe(),t(this,dt).observe(),t(this,U).observe(),t(this,k).observe(),t(this,qt).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,se).observe(),t(this,N).observe(),t(this,N).observe(),t(this,Ht).observe(),t(this,ft).observe(),t(this,G).observe(),t(this,bt).observe(),t(this,Y).observe(),t(this,mt).observe(),t(this,_t).observe(),t(this,$t).observe(),t(this,Wt).observe(),o(this,u,_e).call(this)}disconnectedCallback(){t(this,Tt).unobserve(),t(this,I).unobserve(),t(this,J).unobserve(),t(this,Q).unobserve(),t(this,W).unobserve(),t(this,X).unobserve(),t(this,pt).unobserve(),t(this,dt).unobserve(),t(this,U).unobserve(),t(this,k).unobserve(),t(this,qt).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,se).unobserve(),t(this,N).unobserve(),t(this,Ht).unobserve(),t(this,ft).unobserve(),t(this,G).unobserve(),t(this,bt).unobserve(),t(this,Y).unobserve(),t(this,mt).unobserve(),t(this,_t).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),o(this,u,He).call(this)}}p=new WeakMap,Tt=new WeakMap,I=new WeakMap,J=new WeakMap,Q=new WeakMap,W=new WeakMap,X=new WeakMap,pt=new WeakMap,dt=new WeakMap,U=new WeakMap,k=new WeakMap,qt=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,se=new WeakMap,N=new WeakMap,Ht=new WeakMap,ft=new WeakMap,G=new WeakMap,bt=new WeakMap,Y=new WeakMap,mt=new WeakMap,_t=new WeakMap,$t=new WeakMap,Wt=new WeakMap,d=new WeakMap,ie=new WeakMap,l=new WeakMap,ge=new WeakMap,Ce=new WeakMap,E=new WeakMap,C=new WeakMap,T=new WeakMap,K=new WeakMap,gt=new WeakMap,tt=new WeakMap,z=new WeakMap,y=new WeakMap,re=new WeakMap,Ct=new WeakMap,Ut=new WeakMap,Nt=new WeakMap,ne=new WeakMap,et=new WeakMap,u=new WeakSet,fe=function(){o(this,u,ee).call(this),t(this,ie).assignedElements().forEach((e,s)=>{e instanceof HTMLElement&&t(this,l).push(new ws(e,s,this))}),t(this,d).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,q).call(this),o(this,u,Dt).call(this)},ee=function(){t(this,l).forEach(e=>{e.destroy()}),n(this,l,[]),t(this,y).current=0,t(this,p).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},Ae=function(){t(this,Ut)||(n(this,Ut,!0),t(this,p).unsubscribe(t(this,ye)),t(this,p).unlistenAnimationFrame(),t(this,K).disconnect(),t(this,gt).disconnect(),t(this,tt).disconnect(),t(this,z).disconnect(),clearInterval(t(this,ne)),t(this,et).unlistenAnimationFrame())},Be=function(){t(this,Ut)&&(n(this,Ut,!1),t(this,p).subscribe(t(this,ye)),t(this,K).connect(),t(this,gt).connect(),t(this,tt).connect(),t(this,N).current&&t(this,z).connect())},He=function(){t(this,Nt)||(n(this,Nt,!0),de.windowResizer.unsubscribe(t(this,q)),Oe.elementResizer.unsubscribe(t(this,q)),t(this,p).reset(),o(this,u,Ae).call(this),t(this,d).style.transform="",t(this,W).current&&o(this,u,ee).call(this),Yt.scrollEntries.unregister(this))},_e=function(){t(this,Nt)&&(n(this,Nt,!1),t(this,W).current&&o(this,u,fe).call(this),Yt.scrollEntries.register(this),de.windowResizer.subscribe(t(this,q),be.RESIZE_ORDER.SCROLL),Oe.elementResizer.subscribe(this,t(this,q)),o(this,u,Be).call(this))},q=new WeakMap,ye=new WeakMap,ts=function(e){t(this,k).current?(t(this,y).current=e%t(this,l).length,t(this,y).current=t(this,y).current<0?t(this,l).length+t(this,y).current:t(this,y).current):t(this,y).current=Ne.clamp(e,0,this.limit)},he=new WeakMap,ve=new WeakMap,$e=function(e="current"){if(t(this,k).current&&t(this,l).length){const s=t(this,p)[e]%(t(this,C)+t(this,E)+t(this,T));return s<0?t(this,C)+s+t(this,E)+t(this,T):s}else return t(this,p)[e]},Dt=function(){if(t(this,G).current&&t(this,l).length){const e=t(this,y).current+t(this,bt).current;e===0?this.classList.add("start"):this.classList.remove("start"),e===this.limit?this.classList.add("end"):this.classList.remove("end");const s=t(this,U).current+t(this,Y).current;t(this,l).forEach((i,a)=>{const g=e-this.limit-1+t(this,Y).current,O=e+s,te=this.sections.length-O;a>=e&&a<O||a<=g?i.mark("current"):a>=O&&a<O+te/2||a<=g+s?i.mark("next"):i.mark("previous")})}},We=function(){let e=null,s=1/0;for(let i=0;i<t(this,l).length;i++){const a=Math.abs(t(this,l)[i].position-this.targetScrollValue);a<s&&(s=a,e=i)}return e!==null?t(this,l)[e]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ie);var Pe;class qe extends HTMLElement{constructor(){super(...arguments);r(this,Pe,null)}get scrollElement(){return t(this,Pe)}connectedCallback(){const e=Es.findParentElement(this,Ie);e instanceof Ie?n(this,Pe,e):console.error(this,"e-scroll not found")}}Pe=new WeakMap;var yt,R,st,it,oe,ce,Gt,Ee,we,xe;class es extends qe{constructor(){super();r(this,yt,null);r(this,R,null);r(this,st,!1);r(this,it,0);r(this,oe,0);r(this,ce,0);r(this,Gt,()=>{n(this,st,this.offsetWidth>this.offsetHeight);const e=t(this,st)?this.offsetWidth:this.offsetHeight;n(this,it,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),n(this,it,Math.max(t(this,it),30)),t(this,st)?(t(this,R).style.width=t(this,it)+"px",t(this,R).style.height="100%"):(t(this,R).style.width="100%",t(this,R).style.height=t(this,it)+"px"),n(this,oe,e-t(this,it)),this.scrollElement.scrollSize||(this.style.display="none")});r(this,Ee,()=>{n(this,ce,this.scrollElement.currentProgress*t(this,oe)),t(this,st)?t(this,R).style.transform=`translate3d(${t(this,ce)}px, 0px, 0px)`:t(this,R).style.transform=`translate3d(0px, ${t(this,ce)}px, 0px)`});r(this,we,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});r(this,xe,e=>{document.documentElement.classList.add("grabbing"),Ps.setupDrag(a=>{const g=t(this,st)?a.x:a.y,O=this.scrollElement.distance/t(this,oe),te=(g-i)*O;this.scrollElement.setPosition(s+te)},()=>{document.documentElement.classList.remove("grabbing")});const s=this.scrollElement.damped.target,i=t(this,st)?e.x:e.y});if(Te.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets.push(Qe.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"}})),this.setAttribute("drag-dead-zone",""),n(this,yt,document.createElement("slot")),t(this,yt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,yt))}}get thumbElement(){return t(this,R)}connectedCallback(){super.connectedCallback();const e=t(this,yt).assignedElements()[0]||t(this,yt).firstElementChild;n(this,R,e),t(this,R).addEventListener("pointerdown",t(this,xe)),de.windowResizer.subscribe(t(this,Gt),be.RESIZE_ORDER.SCROLL+1),Oe.elementResizer.subscribe(this,t(this,Gt)),this.scrollElement.onScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.subscribe(t(this,we))}disconnectedCallback(){t(this,R).removeEventListener("pointerdown",t(this,xe)),de.windowResizer.unsubscribe(t(this,Gt)),Oe.elementResizer.unsubscribe(t(this,Gt)),this.scrollElement.offScroll(t(this,Ee)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,we))}}yt=new WeakMap,R=new WeakMap,st=new WeakMap,it=new WeakMap,oe=new WeakMap,ce=new WeakMap,Gt=new WeakMap,Ee=new WeakMap,we=new WeakMap,xe=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",es);class ss extends qe{constructor(){super(),Te.isBrowser&&this.addEventListener("click",()=>{this.handleClick()})}}class is extends ss{handleClick(){const h=this.getAttribute("index"),e=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(h||"0"),{behaviour:e})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",is);class rs extends ss{handleClick(){const h=this.getAttribute("step"),e=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(h||"1"),{behaviour:e})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",rs);var rt,vt,le,Le,ze,ue;class Ls{constructor(h,e,s){r(this,rt,null);r(this,vt,null);r(this,le,null);r(this,Le,null);r(this,ze,()=>{t(this,vt).scrollToSection(t(this,le),{behaviour:t(this,Le)})});r(this,ue,()=>{t(this,rt).classList.toggle("current",t(this,vt).counter.current===t(this,le))});Te.isBrowser&&(n(this,rt,document.createElement("button")),n(this,vt,h),n(this,Le,s),n(this,le,e),t(this,rt).addEventListener("click",t(this,ze)),t(this,vt).counter.subscribe(t(this,ue)),t(this,ue).call(this))}get element(){return t(this,rt)}destroy(){t(this,rt).removeEventListener("click",t(this,ze)),t(this,vt).counter.unsubscribe(t(this,ue)),t(this,rt).remove()}}rt=new WeakMap,vt=new WeakMap,le=new WeakMap,Le=new WeakMap,ze=new WeakMap,ue=new WeakMap;var Pt,ae;class ns extends qe{constructor(){super(...arguments);r(this,Pt,[]);r(this,ae,Ye.debounce(()=>{t(this,Pt).forEach(e=>e.destroy()),n(this,Pt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const s=new Ls(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(s.element),t(this,Pt).push(s)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,ae)),t(this,ae).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,ae)),t(this,Pt).forEach(e=>e.destroy()),n(this,Pt,[])}}Pt=new WeakMap,ae=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",ns);var Kt,Zt,jt,Jt,Et,wt,xt,Lt,V,M,A,B,zt,w,nt,ht,ot,ct,lt,x,H,_,ut,at,Z,Ve,f,Qt,Xt,Fe,L,Vt,D,F,$,Se,Ft,P,b,os,cs,ls,us,as,Ss,ke,pe,Ot,ps,ds,Ue,Re;class hs extends qe{constructor(){super();r(this,b);r(this,Kt,new c.CSSProperty(this,"--damping",20));r(this,Zt,new c.CSSProperty(this,"--mass",0));r(this,jt,new c.CSSProperty(this,"--stiffness",0));r(this,Jt,new c.CSSProperty(this,"--target",""));r(this,Et,new c.CSSProperty(this,"--disabled",!1));r(this,wt,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));r(this,xt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));r(this,Lt,new c.CSSProperty(this,"--capture-once",!1));r(this,V,new c.CSSProperty(this,"--captured",""));r(this,M,new c.CSSProperty(this,"--released",""));r(this,A,new c.CSSProperty(this,"--captured-from-start",""));r(this,B,new c.CSSProperty(this,"--captured-from-finish",""));r(this,zt,new c.CSSProperty(this,"--released-from-start",""));r(this,w,new c.CSSProperty(this,"--released-from-finish",""));r(this,nt,new c.CSSProperty(this,"--passed-var",""));r(this,ht,new c.CSSProperty(this,"--progress-var",""));r(this,ot,new c.CSSProperty(this,"--distance-var",""));r(this,ct,new c.CSSProperty(this,"--start-var",""));r(this,lt,new c.CSSProperty(this,"--finish-var",""));r(this,x,new Rt.Store(!1));r(this,H,new Rt.Store(!1));r(this,_,new Rt.Store(!1));r(this,ut,new Rt.Store(!1));r(this,at,new Rt.Store(!1));r(this,Z,new Rt.Store(!1));r(this,Ve,[]);r(this,f,this);r(this,Qt,0);r(this,Xt,0);r(this,Fe,0);r(this,L,new Xe.Damped(0,{order:be.TICK_ORDER.SCROLL-1,min:0,max:1}));r(this,Vt,0);r(this,D,0);r(this,F,0);r(this,$,0);r(this,Se,!1);r(this,Ft,!1);r(this,P,!0);r(this,ke,()=>{t(this,P)||(this.resize(),t(this,pe).call(this))});r(this,pe,()=>{!t(this,P)&&t(this,Se)&&this.tick()});r(this,Re,Ye.debounce(()=>{const e=Yt.scrollEntries.getAll(this).reverse();let s=0;e.forEach((i,a)=>{i.element===this.scrollElement&&(s=a)}),n(this,Ve,e.slice(s+1))},0))}get distanceOffsetCSSProperty(){return t(this,wt)}get startOffsetCSSProperty(){return t(this,xt)}get captureOnceCSSProperty(){return t(this,Lt)}get capturedCSSProperty(){return t(this,V)}get releasedCSSProperty(){return t(this,M)}get capturedFromStartCSSProperty(){return t(this,A)}get capturedFromFinishCSSProperty(){return t(this,B)}get releasedFromStartCSSProperty(){return t(this,zt)}get releasedFromFinishCSSProperty(){return t(this,w)}get passedVarCSSProperty(){return t(this,nt)}get progressVarCSSProperty(){return t(this,ht)}get distanceVarCSSProperty(){return t(this,ot)}get startVarCSSProperty(){return t(this,ct)}get finishVarCSSProperty(){return t(this,lt)}get disabledCSSProperty(){return t(this,Et)}get dampingCSSProperty(){return t(this,Kt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,jt)}get targetCSSProperty(){return t(this,Jt)}get isCaptured(){return t(this,x)}get isReleased(){return t(this,H)}get isCapturedFromStart(){return t(this,_)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,at)}get isReleasedFromFinish(){return t(this,Z)}get directionPosition(){return t(this,Qt)}get directionSize(){return t(this,Xt)}get passed(){return t(this,L)}get progress(){return t(this,Vt)}get start(){return t(this,D)}get finish(){return t(this,$)}get distance(){return t(this,F)}get isCapturedOnce(){return t(this,Ft)}get isDisabled(){return t(this,P)}resize(){n(this,Xt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),n(this,Qt,this.scrollElement.vertical?kt.getCumulativeOffsetTop(this,this.scrollElement):kt.getCumulativeOffsetLeft(this,this.scrollElement)),n(this,D,this.getStart()),n(this,F,this.getDistance()),n(this,D,t(this,D)+t(this,xt).current),n(this,F,t(this,F)+t(this,wt).current),n(this,$,t(this,D)+t(this,F)),this.scrollElement.currentScrollValue>t(this,$)&&!t(this,x).current&&!t(this,H).current&&(t(this,x).current=!0),this.setVar(t(this,ct).current,t(this,D)),this.setVar(t(this,lt).current,t(this,$)),this.setVar(t(this,ot).current,t(this,F)),t(this,L).max=t(this,F),n(this,Se,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,Ve).forEach(i=>{e+=i.value}),t(this,L).set(e-t(this,D));const s=Math.round(e);t(this,x).current&&(s>t(this,D)?t(this,_).current||o(this,b,ls).call(this):t(this,_).current&&!t(this,ut).current&&o(this,b,as).call(this),s<t(this,$)?t(this,Z).current&&!t(this,at).current&&o(this,b,us).call(this):t(this,_).current&&!t(this,Z).current&&o(this,b,Ss).call(this)),s>t(this,D)&&s<t(this,$)?t(this,x).current||o(this,b,os).call(this):t(this,x).current&&(t(this,L).set(Ne.step(t(this,F)/2,t(this,L).current,0,t(this,F))),o(this,b,cs).call(this)),t(this,Ft)&&t(this,Lt).current&&(t(this,V).current&&t(this,f).classList.add(t(this,V).current),n(this,P,!0))}disable(){this.style.cssText="",n(this,Qt,0),n(this,Xt,0),t(this,L).reset(),n(this,Vt,0),n(this,D,0),n(this,F,0),n(this,$,0),n(this,Se,!1),t(this,x).current=!1,t(this,H).current=!1,t(this,_).current=!1,t(this,ut).current=!1,t(this,at).current=!1,t(this,Z).current=!1,n(this,Ft,!1),n(this,P,!0),o(this,b,Ue).call(this)}enable(){n(this,P,!1)}connectedCallback(){super.connectedCallback(),t(this,Kt).observe(),t(this,Zt).observe(),t(this,jt).observe(),t(this,Jt).observe(),t(this,Et).observe(),t(this,wt).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,V).observe(),t(this,M).observe(),t(this,A).observe(),t(this,B).observe(),t(this,zt).observe(),t(this,w).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,Re)),t(this,Re).call(this),t(this,Et).current||this.enable(),t(this,Kt).subscribe(s=>{t(this,L).damping=s.current}),t(this,Zt).subscribe(s=>{t(this,L).mass=s.current}),t(this,jt).subscribe(s=>{t(this,L).stiffness=s.current}),t(this,Jt).subscribe(s=>{s.previous&&o(this,b,Ue).call(this),s.current?s.current==="parent"?n(this,f,this.parentElement||this):n(this,f,document.querySelector(s.current)||this):n(this,f,this)}),t(this,Et).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,xt).subscribe(()=>{e&&!t(this,P)&&this.resize()}),t(this,wt).subscribe(()=>{e&&!t(this,P)&&this.resize()}),t(this,V).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,A).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,B).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,M).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,zt).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,w).subscribe(s=>{o(this,b,Ot).call(this,s)}),t(this,Lt).subscribe(s=>{t(this,P)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,nt).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,ht).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,t(this,Vt)))}),t(this,ct).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,t(this,D)))}),t(this,lt).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,t(this,$)))}),t(this,ot).subscribe(s=>{t(this,P)||(this.removeVar(s.previous),this.setVar(s.current,t(this,F)))}),t(this,L).subscribe(s=>{n(this,Vt,t(this,L).current/t(this,F)||0),this.setVar(t(this,nt).current,t(this,L).current.toFixed(6)),this.setVar(t(this,ht).current,t(this,Vt).toFixed(6))}),de.windowResizer.subscribe(t(this,ke),be.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,pe)),e=!0}disconnectedCallback(){de.windowResizer.unsubscribe(t(this,ke)),this.scrollElement.offScroll(t(this,pe)),t(this,Kt).close(),t(this,Zt).close(),t(this,jt).close(),t(this,Jt).close(),t(this,Et).close(),t(this,wt).close(),t(this,xt).close(),t(this,Lt).close(),t(this,V).close(),t(this,M).close(),t(this,A).close(),t(this,B).close(),t(this,zt).close(),t(this,w).close(),t(this,nt).close(),t(this,ht).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,x).close(),t(this,H).close(),t(this,_).close(),t(this,ut).close(),t(this,at).close(),t(this,Z).close(),this.disable()}removeVar(e){e&&t(this,f).style.removeProperty(`--${e}`)}setVar(e,s){e&&t(this,f).style.setProperty(`--${e}`,s.toString())}getDistance(){return t(this,Xt)+t(this,Fe)}getStart(){return t(this,Qt)-t(this,Fe)}}Kt=new WeakMap,Zt=new WeakMap,jt=new WeakMap,Jt=new WeakMap,Et=new WeakMap,wt=new WeakMap,xt=new WeakMap,Lt=new WeakMap,V=new WeakMap,M=new WeakMap,A=new WeakMap,B=new WeakMap,zt=new WeakMap,w=new WeakMap,nt=new WeakMap,ht=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,x=new WeakMap,H=new WeakMap,_=new WeakMap,ut=new WeakMap,at=new WeakMap,Z=new WeakMap,Ve=new WeakMap,f=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,Fe=new WeakMap,L=new WeakMap,Vt=new WeakMap,D=new WeakMap,F=new WeakMap,$=new WeakMap,Se=new WeakMap,Ft=new WeakMap,P=new WeakMap,b=new WeakSet,os=function(){t(this,x).current=!0,t(this,H).current=!1,n(this,Ft,!0),t(this,M).current&&t(this,f).classList.remove(t(this,M).current),t(this,w).current&&t(this,f).classList.remove(t(this,w).current),t(this,w).current&&t(this,f).classList.remove(t(this,w).current),t(this,V).current&&t(this,f).classList.add(t(this,V).current)},cs=function(){t(this,H).current=!0,t(this,x).current=!1,n(this,Ft,!0),t(this,V).current&&t(this,f).classList.remove(t(this,V).current),t(this,A).current&&t(this,f).classList.remove(t(this,A).current),t(this,B).current&&t(this,f).classList.remove(t(this,B).current),t(this,M).current&&t(this,f).classList.add(t(this,M).current)},ls=function(){t(this,x).current=!0,t(this,_).current=!0,t(this,ut).current=!1,t(this,A).current&&t(this,f).classList.add(t(this,A).current)},us=function(){t(this,x).current=!0,t(this,at).current=!0,t(this,Z).current=!1,t(this,B).current&&t(this,f).classList.add(t(this,B).current)},as=function(){t(this,H).current=!0,t(this,ut).current=!0,t(this,_).current=!1,t(this,w).current&&t(this,f).classList.add(t(this,w).current)},Ss=function(){t(this,H).current=!0,t(this,Z).current=!0,t(this,at).current=!1,t(this,w).current&&t(this,f).classList.add(t(this,w).current)},ke=new WeakMap,pe=new WeakMap,Ot=function(e){if(t(this,P)){e.previous&&t(this,f).classList.remove(e.previous),e.current&&t(this,f).classList.remove(e.current);return}e.current&&t(this,x).current?(e.previous&&t(this,f).classList.remove(e.previous),t(this,f).classList.add(e.current)):!e.current&&e.previous&&t(this,f).classList.remove(e.previous)},ps=function(...e){e.forEach(s=>{s&&t(this,f).classList.remove(s)})},ds=function(...e){e.forEach(s=>{s&&t(this,f).style.removeProperty(`--${s}`)})},Ue=function(){o(this,b,ps).call(this,t(this,V).current,t(this,A).current,t(this,B).current,t(this,M).current,t(this,zt).current,t(this,w).current),o(this,b,ds).call(this,t(this,nt).current,t(this,ht).current,t(this,ot).current,t(this,ct).current,t(this,lt).current)},Re=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",hs);exports.ScrollBulletButtonsElement=ns;exports.ScrollElement=Ie;exports.ScrollSegmentElement=hs;exports.ScrollSetButtonElement=is;exports.ScrollStepButtonElement=rs;exports.ScrollbarElement=es;
@@ -1,6 +0,0 @@
1
- export { ScrollElement, type ScrollBehaviour } from './ScrollElement';
2
- export { ScrollbarElement } from './ScrollbarElement';
3
- export { ScrollSetButtonElement } from './ScrollSetButtonElement';
4
- export { ScrollStepButtonElement } from './ScrollStepButtonElement';
5
- export { ScrollBulletButtonsElement } from './ScrollBulletButtonsElement';
6
- export { ScrollSegmentElement } from './ScrollSegmentElement';