aptechka 0.84.4 → 0.84.5
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/lib/DragControls-XC4E7seK.cjs +1 -0
- package/lib/{DragControls-BgTBgiue.js → DragControls-owFuNKoh.js} +21 -11
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +1 -1
- package/lib/scroll/ScrollElement.d.ts +1 -1
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +5 -5
- package/package.json +1 -1
- package/lib/DragControls-FmiuZDKq.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);const intersector_index=require("./index-DZ44osDT.cjs"),dom=require("./dom-B40i6NXw.cjs");require("construct-style-sheets-polyfill");require("./Store-DZnOrofs.cjs");const easings=require("./easings-BWq0pPLq.cjs"),Tweened=require("./Tweened-3UYSwrvs.cjs"),gestures=require("./gestures-DtYbQr49.cjs"),number=require("./number-Bu4sGvW7.cjs"),order_index=require("./order/index.cjs"),notifier_index=require("./notifier/index.cjs");var _changeEvent;const _Controls=class _Controls{constructor(){__privateAdd(this,_changeEvent,new notifier_index.Notifier)}get changeEvent(){return __privateGet(this,_changeEvent)}};_changeEvent=new WeakMap,__name(_Controls,"Controls");let Controls=_Controls;var _element,_dimensionElement,_dimension,_keydownListener;const _KeyboardControls=class _KeyboardControls extends Controls{constructor(options){super();__privateAdd(this,_element,null);__privateAdd(this,_dimensionElement,null);__privateAdd(this,_dimension,"offsetHeight");__privateAdd(this,_keydownListener,__name(e=>{const dir=e.shiftKey?-1:1;let value;e.code==="Space"?value=dir*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.4:e.code==="ArrowLeft"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowRight"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="PageUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="PageDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="Home"?value=0:e.code==="End"&&(value=__privateGet(this,_dimension)==="offsetWidth"?__privateGet(this,_dimensionElement).scrollWidth:__privateGet(this,_dimensionElement).scrollHeight),value&&(e.stopPropagation(),this.changeEvent.notify("keyboard",value,e))},"#keydownListener"));intersector_index.isBrowser&&(__privateSet(this,_element,options!=null&&options.element&&dom.getElement(options.element)||window),__privateSet(this,_dimensionElement,__privateGet(this,_element)instanceof HTMLElement?__privateGet(this,_element):document.documentElement),this.dimension=options==null?void 0:options.dimension)}set dimension(value){__privateSet(this,_dimension,value==="width"?"offsetWidth":"offsetHeight")}connect(){intersector_index.isBrowser&&__privateGet(this,_element).addEventListener("keydown",__privateGet(this,_keydownListener))}disconnect(){intersector_index.isBrowser&&__privateGet(this,_element).removeEventListener("keydown",__privateGet(this,_keydownListener))}};_element=new WeakMap,_dimensionElement=new WeakMap,_dimension=new WeakMap,_keydownListener=new WeakMap,__name(_KeyboardControls,"KeyboardControls");let KeyboardControls=_KeyboardControls;var _speed,_interval,_options,_intervalId,_paused,_pauseTimeoutId,_connected,_isIntersecting,_AutoplayControls_instances,setup_fn,clear_fn,startInterval_fn,_animationFrameCallback,_intervalCallback,_documentVisibilityChangeListener,_intersectionListener;const _AutoplayControls=class _AutoplayControls extends Controls{constructor(options){super();__privateAdd(this,_AutoplayControls_instances);__privateAdd(this,_speed);__privateAdd(this,_interval);__privateAdd(this,_options);__privateAdd(this,_intervalId);__privateAdd(this,_paused);__privateAdd(this,_pauseTimeoutId);__privateAdd(this,_connected);__privateAdd(this,_isIntersecting);__privateAdd(this,_animationFrameCallback);__privateAdd(this,_intervalCallback);__privateAdd(this,_documentVisibilityChangeListener);__privateAdd(this,_intersectionListener);this.direction=1,__privateSet(this,_paused,new Tweened.Tweened(0,{easing:easings.easeInQuad})),__privateSet(this,_connected,!1),__privateSet(this,_isIntersecting,!1),__privateSet(this,_animationFrameCallback,e=>{__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",e.timeBetweenFrames*__privateGet(this,_speed)*this.direction*(1-__privateGet(this,_paused).current),e)}),__privateSet(this,_intervalCallback,()=>{__privateGet(this,_isIntersecting)&&__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",Math.sign(__privateGet(this,_speed))*this.direction*(1-__privateGet(this,_paused).current),null)}),__privateSet(this,_documentVisibilityChangeListener,()=>{__privateGet(this,_interval)&&(document.hidden?__privateGet(this,_paused).set(1,{equalize:!0}):__privateGet(this,_paused).set(0,{equalize:!0}))}),__privateSet(this,_intersectionListener,e=>{__privateSet(this,_isIntersecting,e.isIntersecting),__privateGet(this,_isIntersecting)?__privateMethod(this,_AutoplayControls_instances,startInterval_fn).call(this):clearInterval(__privateGet(this,_intervalId))}),__privateSet(this,_speed,(options==null?void 0:options.speed)||1),__privateSet(this,_interval,(options==null?void 0:options.interval)||!1),__privateSet(this,_options,options)}set interval(value){__privateSet(this,_interval,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}set speed(value){__privateSet(this,_speed,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}connect(){__privateGet(this,_connected)||(__privateSet(this,_connected,!0),__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this))}disconnect(){__privateGet(this,_connected)&&(__privateSet(this,_connected,!1),__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this))}pauseAndContinue(duration,instant){__privateGet(this,_connected)&&duration&&(clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).set(1,{duration:Math.min(duration,1e3),equalize:instant}),__privateSet(this,_pauseTimeoutId,setTimeout(()=>{__privateGet(this,_paused).set(0,{duration:Math.min(duration,5e3),equalize:instant})},duration)))}};_speed=new WeakMap,_interval=new WeakMap,_options=new WeakMap,_intervalId=new WeakMap,_paused=new WeakMap,_pauseTimeoutId=new WeakMap,_connected=new WeakMap,_isIntersecting=new WeakMap,_AutoplayControls_instances=new WeakSet,setup_fn=__name(function(){var _a,_b;__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this),__privateGet(this,_interval)?(_a=__privateGet(this,_options))!=null&&_a.culling?intersector_index.intersector.subscribe((_b=__privateGet(this,_options))==null?void 0:_b.culling,__privateGet(this,_intersectionListener)):__privateMethod(this,_AutoplayControls_instances,startInterval_fn).call(this):intersector_index.ticker.subscribe(__privateGet(this,_animationFrameCallback),__privateGet(this,_options)),document.addEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#setup"),clear_fn=__name(function(){clearInterval(__privateGet(this,_intervalId)),intersector_index.ticker.unsubscribe(__privateGet(this,_animationFrameCallback)),intersector_index.intersector.unsubscribe(__privateGet(this,_intersectionListener)),clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).close(),document.removeEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#clear"),startInterval_fn=__name(function(){clearInterval(__privateGet(this,_intervalId)),__privateSet(this,_intervalId,setInterval(__privateGet(this,_intervalCallback),Math.abs(__privateGet(this,_speed))))},"#startInterval"),_animationFrameCallback=new WeakMap,_intervalCallback=new WeakMap,_documentVisibilityChangeListener=new WeakMap,_intersectionListener=new WeakMap,__name(_AutoplayControls,"AutoplayControls");let AutoplayControls=_AutoplayControls;var _element2,_timeoutId,_prevEventDate,_wheelListener;const _WheelControls=class _WheelControls extends Controls{constructor(options){super();__privateAdd(this,_element2,null);__privateAdd(this,_timeoutId);__privateAdd(this,_prevEventDate);__privateAdd(this,_wheelListener,__name(event=>{let delta=0;const absY=Math.abs(event.deltaY),absX=Math.abs(event.deltaX);if(!(this.axis==="x"&&absY>absX||this.axis==="y"&&absX>absY)&&(event.preventDefault(),!(this.debounce&&this.axis==="x"&&absX<5||this.debounce&&this.axis==="y"&&absY<5)))if(delta=(this.axis==="max"?absX>absY?event.deltaX:event.deltaY:this.axis==="x"?event.deltaX:event.deltaY)*this.speed,event.stopPropagation(),this.debounce){const now=Date.now();if(now-__privateGet(this,_prevEventDate)>40&&(delta=100*Math.sign(delta)),__privateSet(this,_prevEventDate,now),Math.abs(delta)<100||__privateGet(this,_timeoutId))return;this.changeEvent.notify("wheel",delta,event),__privateSet(this,_timeoutId,setTimeout(()=>{__privateSet(this,_timeoutId,void 0)},80))}else this.changeEvent.notify("wheel",delta,event)},"#wheelListener"));this.axis=(options==null?void 0:options.axis)||"y",this.speed=(options==null?void 0:options.speed)||1,this.debounce=(options==null?void 0:options.debounce)||!1,__privateSet(this,_prevEventDate,Date.now()),intersector_index.isBrowser&&__privateSet(this,_element2,options!=null&&options.element&&dom.getElement(options.element)||window)}connect(){intersector_index.isBrowser&&__privateGet(this,_element2).addEventListener("wheel",__privateGet(this,_wheelListener),{passive:!1})}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_element2).removeEventListener("wheel",__privateGet(this,_wheelListener)),clearTimeout(__privateGet(this,_timeoutId)))}};_element2=new WeakMap,_timeoutId=new WeakMap,_prevEventDate=new WeakMap,_wheelListener=new WeakMap,__name(_WheelControls,"WheelControls");let WheelControls=_WheelControls;var _currentElement,_rootElement,_element3,_delta,_linkElements,_dragDelta,_linkClickListener,_pointerdownListener,_tickListener;const _DragControls=class _DragControls extends Controls{constructor(options){super();__privateAdd(this,_rootElement);__privateAdd(this,_element3);__privateAdd(this,_delta);__privateAdd(this,_linkElements);__privateAdd(this,_dragDelta);__privateAdd(this,_linkClickListener);__privateAdd(this,_pointerdownListener);__privateAdd(this,_tickListener);this.inertion=1,__privateSet(this,_rootElement,null),__privateSet(this,_element3,null),__privateSet(this,_delta,0),__privateSet(this,_linkElements,[]),__privateSet(this,_dragDelta,0),__privateSet(this,_linkClickListener,e=>{Math.abs(__privateGet(this,_dragDelta))>2&&e.preventDefault()}),__privateSet(this,_pointerdownListener,grabEvent=>{if(__privateSet(this,_dragDelta,0),__privateSet(this,_delta,0),grabEvent.button!==0||grabEvent.composedPath().find(p=>p instanceof HTMLElement&&p.hasAttribute("drag-dead-zone")))return;this.swipe||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener));let prev=grabEvent,okToNotify=!1;document.documentElement.classList.add("grabbing");let dx=0,dy=0,ddx=0,ddy=0;gestures.setupDrag(moveEvent=>{__privateGet(_DragControls,_currentElement)&&__privateGet(_DragControls,_currentElement)!==__privateGet(this,_element3)||(dx=prev.x-moveEvent.x,dy=prev.y-moveEvent.y,ddx=moveEvent.x-grabEvent.x,ddy=moveEvent.y-grabEvent.y,this.axis==="x"?(__privateSet(this,_dragDelta,ddx),__privateSet(this,_delta,dx)):(__privateSet(this,_dragDelta,ddy),__privateSet(this,_delta,dy)),prev=moveEvent,okToNotify=this.axis==="x"&&Math.abs(ddx)>Math.abs(ddy)||this.axis==="y"&&Math.abs(ddy)>Math.abs(ddx),okToNotify&&(document.documentElement.classList.add("dragging"),document.documentElement.classList.add("click-disabled"),__privateSet(_DragControls,_currentElement,__privateGet(this,_element3)),this.changeEvent.notify("drag",__privateGet(this,_delta),moveEvent)))},e=>{__privateSet(_DragControls,_currentElement,null),okToNotify&&(!this.swipe&&this.inertion?(__privateSet(this,_delta,__privateGet(this,_delta)*this.inertion),intersector_index.ticker.subscribe(__privateGet(this,_tickListener),{order:order_index.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",__privateGet(this,_delta),e)),setTimeout(()=>{document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging"),document.documentElement.classList.remove("click-disabled")})})}),__privateSet(this,_tickListener,()=>{Math.floor(Math.abs(__privateGet(this,_delta)))||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)),__privateSet(this,_delta,__privateGet(this,_delta)*.95),__privateSet(this,_delta,number.preciseNumber(__privateGet(this,_delta),3)),this.changeEvent.notify("drag",__privateGet(this,_delta),null)}),this.axis=(options==null?void 0:options.axis)||"y",this.swipe=(options==null?void 0:options.swipe)||!1,intersector_index.isBrowser&&(__privateSet(this,_element3,options!=null&&options.element&&dom.getElement(options.element)||document.documentElement),__privateSet(this,_rootElement,(options==null?void 0:options.rootElement)||__privateGet(this,_element3)))}connect(){intersector_index.isBrowser&&(__privateSet(this,_linkElements,[...__privateGet(this,_rootElement).querySelectorAll("a")]),__privateGet(this,_linkElements).forEach(element=>{element.addEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).addEventListener("pointerdown",__privateGet(this,_pointerdownListener)))}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_linkElements).forEach(element=>{element.removeEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).removeEventListener("pointerdown",__privateGet(this,_pointerdownListener)),intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)))}};_currentElement=new WeakMap,_rootElement=new WeakMap,_element3=new WeakMap,_delta=new WeakMap,_linkElements=new WeakMap,_dragDelta=new WeakMap,_linkClickListener=new WeakMap,_pointerdownListener=new WeakMap,_tickListener=new WeakMap,__name(_DragControls,"DragControls"),__privateAdd(_DragControls,_currentElement,null);let DragControls=_DragControls;exports.AutoplayControls=AutoplayControls;exports.Controls=Controls;exports.DragControls=DragControls;exports.KeyboardControls=KeyboardControls;exports.WheelControls=WheelControls;
|
|
@@ -5,7 +5,7 @@ var __typeError = (msg) => {
|
|
|
5
5
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
6
6
|
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
7
7
|
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value), __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
8
|
-
import { i as isBrowser, t as ticker } from "./index-ClTMVKJp.js";
|
|
8
|
+
import { i as isBrowser, a as intersector, t as ticker } from "./index-ClTMVKJp.js";
|
|
9
9
|
import { g as getElement } from "./dom-D8D-_9ty.js";
|
|
10
10
|
import "construct-style-sheets-polyfill";
|
|
11
11
|
import "./Store-BRTHeZmO.js";
|
|
@@ -58,7 +58,7 @@ const _KeyboardControls = class _KeyboardControls extends Controls {
|
|
|
58
58
|
};
|
|
59
59
|
_element = new WeakMap(), _dimensionElement = new WeakMap(), _dimension = new WeakMap(), _keydownListener = new WeakMap(), __name(_KeyboardControls, "KeyboardControls");
|
|
60
60
|
let KeyboardControls = _KeyboardControls;
|
|
61
|
-
var _speed, _interval, _options, _intervalId, _paused, _pauseTimeoutId, _connected, _AutoplayControls_instances, setup_fn, clear_fn, _animationFrameCallback, _intervalCallback, _documentVisibilityChangeListener;
|
|
61
|
+
var _speed, _interval, _options, _intervalId, _paused, _pauseTimeoutId, _connected, _isIntersecting, _AutoplayControls_instances, setup_fn, clear_fn, startInterval_fn, _animationFrameCallback, _intervalCallback, _documentVisibilityChangeListener, _intersectionListener;
|
|
62
62
|
const _AutoplayControls = class _AutoplayControls extends Controls {
|
|
63
63
|
constructor(options) {
|
|
64
64
|
super();
|
|
@@ -70,23 +70,27 @@ const _AutoplayControls = class _AutoplayControls extends Controls {
|
|
|
70
70
|
__privateAdd(this, _paused);
|
|
71
71
|
__privateAdd(this, _pauseTimeoutId);
|
|
72
72
|
__privateAdd(this, _connected);
|
|
73
|
+
__privateAdd(this, _isIntersecting);
|
|
73
74
|
__privateAdd(this, _animationFrameCallback);
|
|
74
75
|
__privateAdd(this, _intervalCallback);
|
|
75
76
|
__privateAdd(this, _documentVisibilityChangeListener);
|
|
76
|
-
|
|
77
|
+
__privateAdd(this, _intersectionListener);
|
|
78
|
+
this.direction = 1, __privateSet(this, _paused, new Tweened(0, { easing: easeInQuad })), __privateSet(this, _connected, !1), __privateSet(this, _isIntersecting, !1), __privateSet(this, _animationFrameCallback, (e) => {
|
|
77
79
|
__privateGet(this, _paused).current !== 1 && this.changeEvent.notify(
|
|
78
80
|
"autoplay",
|
|
79
81
|
e.timeBetweenFrames * __privateGet(this, _speed) * this.direction * (1 - __privateGet(this, _paused).current),
|
|
80
82
|
e
|
|
81
83
|
);
|
|
82
84
|
}), __privateSet(this, _intervalCallback, () => {
|
|
83
|
-
__privateGet(this, _paused).current !== 1 && this.changeEvent.notify(
|
|
85
|
+
__privateGet(this, _isIntersecting) && __privateGet(this, _paused).current !== 1 && this.changeEvent.notify(
|
|
84
86
|
"autoplay",
|
|
85
87
|
Math.sign(__privateGet(this, _speed)) * this.direction * (1 - __privateGet(this, _paused).current),
|
|
86
88
|
null
|
|
87
89
|
);
|
|
88
90
|
}), __privateSet(this, _documentVisibilityChangeListener, () => {
|
|
89
91
|
__privateGet(this, _interval) && (document.hidden ? __privateGet(this, _paused).set(1, { equalize: !0 }) : __privateGet(this, _paused).set(0, { equalize: !0 }));
|
|
92
|
+
}), __privateSet(this, _intersectionListener, (e) => {
|
|
93
|
+
__privateSet(this, _isIntersecting, e.isIntersecting), __privateGet(this, _isIntersecting) ? __privateMethod(this, _AutoplayControls_instances, startInterval_fn).call(this) : clearInterval(__privateGet(this, _intervalId));
|
|
90
94
|
}), __privateSet(this, _speed, (options == null ? void 0 : options.speed) || 1), __privateSet(this, _interval, (options == null ? void 0 : options.interval) || !1), __privateSet(this, _options, options);
|
|
91
95
|
}
|
|
92
96
|
set interval(value) {
|
|
@@ -113,20 +117,26 @@ const _AutoplayControls = class _AutoplayControls extends Controls {
|
|
|
113
117
|
}, duration)));
|
|
114
118
|
}
|
|
115
119
|
};
|
|
116
|
-
_speed = new WeakMap(), _interval = new WeakMap(), _options = new WeakMap(), _intervalId = new WeakMap(), _paused = new WeakMap(), _pauseTimeoutId = new WeakMap(), _connected = new WeakMap(), _AutoplayControls_instances = new WeakSet(), setup_fn = /* @__PURE__ */ __name(function() {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
_speed = new WeakMap(), _interval = new WeakMap(), _options = new WeakMap(), _intervalId = new WeakMap(), _paused = new WeakMap(), _pauseTimeoutId = new WeakMap(), _connected = new WeakMap(), _isIntersecting = new WeakMap(), _AutoplayControls_instances = new WeakSet(), setup_fn = /* @__PURE__ */ __name(function() {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
__privateMethod(this, _AutoplayControls_instances, clear_fn).call(this), __privateGet(this, _interval) ? (_a = __privateGet(this, _options)) != null && _a.culling ? intersector.subscribe(
|
|
123
|
+
(_b = __privateGet(this, _options)) == null ? void 0 : _b.culling,
|
|
124
|
+
__privateGet(this, _intersectionListener)
|
|
125
|
+
) : __privateMethod(this, _AutoplayControls_instances, startInterval_fn).call(this) : ticker.subscribe(__privateGet(this, _animationFrameCallback), __privateGet(this, _options)), document.addEventListener(
|
|
121
126
|
"visibilitychange",
|
|
122
127
|
__privateGet(this, _documentVisibilityChangeListener)
|
|
123
128
|
);
|
|
124
129
|
}, "#setup"), clear_fn = /* @__PURE__ */ __name(function() {
|
|
125
|
-
clearInterval(__privateGet(this, _intervalId)), ticker.unsubscribe(__privateGet(this, _animationFrameCallback)), clearTimeout(__privateGet(this, _pauseTimeoutId)), __privateGet(this, _paused).close(), document.removeEventListener(
|
|
130
|
+
clearInterval(__privateGet(this, _intervalId)), ticker.unsubscribe(__privateGet(this, _animationFrameCallback)), intersector.unsubscribe(__privateGet(this, _intersectionListener)), clearTimeout(__privateGet(this, _pauseTimeoutId)), __privateGet(this, _paused).close(), document.removeEventListener(
|
|
126
131
|
"visibilitychange",
|
|
127
132
|
__privateGet(this, _documentVisibilityChangeListener)
|
|
128
133
|
);
|
|
129
|
-
}, "#clear"),
|
|
134
|
+
}, "#clear"), startInterval_fn = /* @__PURE__ */ __name(function() {
|
|
135
|
+
clearInterval(__privateGet(this, _intervalId)), __privateSet(this, _intervalId, setInterval(
|
|
136
|
+
__privateGet(this, _intervalCallback),
|
|
137
|
+
Math.abs(__privateGet(this, _speed))
|
|
138
|
+
));
|
|
139
|
+
}, "#startInterval"), _animationFrameCallback = new WeakMap(), _intervalCallback = new WeakMap(), _documentVisibilityChangeListener = new WeakMap(), _intersectionListener = new WeakMap(), __name(_AutoplayControls, "AutoplayControls");
|
|
130
140
|
let AutoplayControls = _AutoplayControls;
|
|
131
141
|
var _element2, _timeoutId, _prevEventDate, _wheelListener;
|
|
132
142
|
const _WheelControls = class _WheelControls extends Controls {
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const DragControls=require("../DragControls-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const DragControls=require("../DragControls-XC4E7seK.cjs");exports.AutoplayControls=DragControls.AutoplayControls;exports.Controls=DragControls.Controls;exports.DragControls=DragControls.DragControls;exports.KeyboardControls=DragControls.KeyboardControls;exports.WheelControls=DragControls.WheelControls;
|
package/lib/controls/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Damped, TweenedOptions } from '../animation';
|
|
2
|
+
import { CSSProperty } from '../css-property';
|
|
2
3
|
import { Store } from '../store';
|
|
3
4
|
import { Axes2D } from '../utils';
|
|
4
|
-
import { CSSProperty } from '../css-property';
|
|
5
5
|
import { ScrollSection } from './ScrollSection';
|
|
6
6
|
export type ScrollLine = 'start' | 'end' | null;
|
|
7
7
|
export interface ScrollEvents {
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty;var __getOwnPropSymbols=Object.getOwnPropertySymbols,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__reflectGet=Reflect.get;var __typeError=msg=>{throw TypeError(msg)};var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);var __superGet=(cls,obj,key)=>__reflectGet(__getProtoOf(cls),key,obj);var __async=(__this,__arguments,generator)=>new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Store=require("../Store-DZnOrofs.cjs"),intersector_index=require("../index-DZ44osDT.cjs"),easings=require("../easings-BWq0pPLq.cjs"),element=require("../element-CqD0jqBJ.cjs"),events=require("../events-UlGk63iC.cjs"),_function=require("../function-H4b_gTg6.cjs"),layout=require("../layout-CnGLl7oe.cjs"),math=require("../math-C-knY2TL.cjs"),number=require("../number-Bu4sGvW7.cjs"),stylesheet$1=require("../stylesheet-xM7sMeuo.cjs"),order_index=require("../order/index.cjs"),Damped=require("../Damped-BHm2IuyN.cjs"),Tweened=require("../Tweened-3UYSwrvs.cjs"),DragControls=require("../DragControls-FmiuZDKq.cjs"),windowResizer_index=require("../window-resizer/index.cjs"),scrollEntries_index=require("../scroll-entries/index.cjs"),cssUnitParser_index=require("../css-unit-parser/index.cjs"),cssProperty_index=require("../css-property/index.cjs"),Viewport=require("../Viewport-D26fEJOk.cjs");require("construct-style-sheets-polyfill");const elementResizer_index=require("../element-resizer/index.cjs"),gestures=require("../gestures-DtYbQr49.cjs"),dom=require("../dom-B40i6NXw.cjs");var _element,_index,_scrollElement,_width,_height,_size,_position,_currentMark,_transformPosition,_ScrollSection_instances,setVar_fn;const _ScrollSection=class _ScrollSection{constructor(element2,index,scrollElement){__privateAdd(this,_ScrollSection_instances);__privateAdd(this,_element);__privateAdd(this,_index);__privateAdd(this,_scrollElement);__privateAdd(this,_width,0);__privateAdd(this,_height,0);__privateAdd(this,_size,0);__privateAdd(this,_position,0);__privateAdd(this,_currentMark,null);__privateAdd(this,_transformPosition,0);__privateSet(this,_element,element2),__privateSet(this,_index,index),__privateSet(this,_scrollElement,scrollElement),scrollEntries_index.scrollEntries.register(__privateGet(this,_element)),this.setIndex(__privateGet(this,_index))}get element(){return __privateGet(this,_element)}get index(){return __privateGet(this,_index)}get size(){return __privateGet(this,_size)}get width(){return __privateGet(this,_width)}get height(){return __privateGet(this,_height)}get position(){return __privateGet(this,_position)}get transformPosition(){return __privateGet(this,_transformPosition)}destroy(){scrollEntries_index.scrollEntries.unregister(__privateGet(this,_element)),this.unsetTransform()}unsetTransform(){__privateGet(this,_element).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setOffsetIndex(null),this.setMiddle(!1),this.setSize()}setSize(value){value?(__privateGet(this,_element).style.setProperty("--size",value+"px"),__privateGet(this,_scrollElement).axisCSSProperty.current==="x"?(__privateGet(this,_element).style.width=value+"px",__privateGet(this,_element).style.height=""):(__privateGet(this,_element).style.height=value+"px",__privateGet(this,_element).style.width="")):(__privateGet(this,_element).style.width="",__privateGet(this,_element).style.height="",__privateGet(this,_element).style.removeProperty("--size"))}resize(){__privateSet(this,_width,__privateGet(this,_element).offsetWidth),__privateSet(this,_height,__privateGet(this,_element).offsetHeight),__privateSet(this,_size,__privateGet(this,_scrollElement).vertical?__privateGet(this,_element).offsetHeight:__privateGet(this,_element).offsetWidth),__privateSet(this,_position,__privateGet(this,_scrollElement).vertical?layout.getCumulativeOffsetTop(__privateGet(this,_element)):layout.getCumulativeOffsetLeft(__privateGet(this,_element))),__privateSet(this,_position,__privateGet(this,_position)-__privateGet(this,_scrollElement).contentPosition)}transform(){const cssOffset=__privateGet(this,_scrollElement).shiftSectionPositionCSSProperty.current;let offset=cssOffset;const distanceAddition=__privateGet(this,_scrollElement).viewportSize*__privateGet(this,_scrollElement).sectionDistanceScaleCSSProperty.current;__privateGet(this,_scrollElement).loopCSSProperty.current&&__privateGet(this,_position)+__privateGet(this,_size)<=__privateGet(this,_scrollElement).currentScrollValue-cssOffset/2&&(offset=(__privateGet(this,_scrollElement).distance-cssOffset)*-1-__privateGet(this,_scrollElement).gap),scrollEntries_index.scrollEntries.update(__privateGet(this,_element),__privateGet(this,_scrollElement).axisCSSProperty.current,offset);const valueToClamp=__privateGet(this,_scrollElement).currentScrollValue+offset,min=__privateGet(this,_position)-__privateGet(this,_scrollElement).viewportSize-distanceAddition,max=__privateGet(this,_position)+__privateGet(this,_size)+distanceAddition,value=number.preciseNumber(math.clamp(valueToClamp,min,max),3);__privateSet(this,_transformPosition,value*-1),__privateGet(this,_scrollElement).vertical?__privateGet(this,_element).style.transform=`translate3d(0px, ${__privateGet(this,_transformPosition)}px, 0px)`:__privateGet(this,_element).style.transform=`translate3d(${__privateGet(this,_transformPosition)}px, 0px, 0px)`}setMark(mark){__privateGet(this,_currentMark)!==mark&&(__privateGet(this,_currentMark)&&__privateGet(this,_element).classList.remove(__privateGet(this,_currentMark)),mark&&__privateGet(this,_element).classList.add(mark),__privateSet(this,_currentMark,mark),events.dispatchEvent(__privateGet(this,_element),"scrollSectionMarkChange",{composed:!0,detail:{mark:__privateGet(this,_currentMark)},custom:!0}))}setMiddle(bool){__privateGet(this,_element).classList.toggle("middle",bool)}setIndex(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"index",value)}setCurrentIndex(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"current-index",value)}setCurrentIndexArc(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"current-index-arc",value)}setOffsetIndex(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"offset-index",value)}setCurrentIndexArcAbs(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"current-index-arc-abs",value)}};_element=new WeakMap,_index=new WeakMap,_scrollElement=new WeakMap,_width=new WeakMap,_height=new WeakMap,_size=new WeakMap,_position=new WeakMap,_currentMark=new WeakMap,_transformPosition=new WeakMap,_ScrollSection_instances=new WeakSet,setVar_fn=__name(function(name,value){value!==null?(__privateGet(this,_element).style.setProperty(`--${name}`,value.toString()),__privateGet(this,_element).setAttribute(`data-${name}`,value.toString())):(__privateGet(this,_element).style.removeProperty(`--${name}`),__privateGet(this,_element).removeAttribute(`data-${name}`))},"#setVar"),__name(_ScrollSection,"ScrollSection");let ScrollSection=_ScrollSection;const stylesheet=stylesheet$1.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var _damped,_controlsCSSProperty,_axisCSSProperty,_reverseCSSProperty,_directionCSSProperty,_pagesCSSProperty,_splitCSSProperty,_sectionalCSSProperty,_easingCSSProperty,_durationCSSProperty,_autoSizeCSSProperty,_wheelMaxDeltaCSSProperty,_dragInertionCSSProperty,_sectionsInViewCSSProperty,_loopCSSProperty,_dampingCSSProperty,_massCSSProperty,_stiffnessCSSProperty,_mouseDragCSSProperty,_sectionDistanceScaleCSSProperty,_startSectionCSSProperty,_autoplayCSSProperty,_autoplayPauseDurationCSSProperty,_autoplayUserDirectionCSSProperty,_classesCSSProperty,_currentIndexStartOffsetCSSProperty,_currentIndexEndOffsetCSSProperty,_shiftSectionPositionCSSProperty,_focusDelayCSSProperty,_focusDurationCSSProperty,_shiftLimitCSSProperty,_disabledCSSProperty,_hibernatedCSSProperty,_contentWrapperElement,_contentElement,_slotElement,_sections,_visibleSections,_position2,_contentPosition,_viewportSize,_scrollSize,_gap,_wheelControls,_keyboardControls,_dragControls,_autoplayControls,_counter,_overscroll,_distance,_hasOverflow,_disabled,_hibernated,_focusTimeoutId,_tweenTimeoutId,_setTween,_isGrabbing,_scrollLine,_isConnected,_mutationObserver,_currentSections,_skipNextResize,_maxSectionSizeTimeoutId,_ScrollElement_instances,updateAxis_fn,split_fn,unsplit_fn,disable_fn,enable_fn,hibernate_fn,awake_fn,_resizeListener,_animatedChangeListener,clampCounter_fn,_notAutoplayControlListener,_controlsListener,processAutoplay_fn,getScrollValue_fn,updateMarks_fn,updateIndexes_fn,_updateMaxSectionsSize,getNearestSectionIndex_fn,_connectListener;const _ScrollElement=class _ScrollElement extends HTMLElement{constructor(){super();__privateAdd(this,_ScrollElement_instances);__privateAdd(this,_damped,null);__privateAdd(this,_controlsCSSProperty,new cssProperty_index.CSSProperty(this,"--controls",!0));__privateAdd(this,_axisCSSProperty,new cssProperty_index.CSSProperty(this,"--axis","y"));__privateAdd(this,_reverseCSSProperty,new cssProperty_index.CSSProperty(this,"--reverse",!1));__privateAdd(this,_directionCSSProperty,new cssProperty_index.CSSProperty(this,"--direction",0));__privateAdd(this,_pagesCSSProperty,new cssProperty_index.CSSProperty(this,"--pages",0,{validate:__name(v=>Math.max(0,v-1),"validate")}));__privateAdd(this,_splitCSSProperty,new cssProperty_index.CSSProperty(this,"--split",!1));__privateAdd(this,_sectionalCSSProperty,new cssProperty_index.CSSProperty(this,"--sectional",!1));__privateAdd(this,_easingCSSProperty,new cssProperty_index.CSSProperty(this,"--tween-easing",!1));__privateAdd(this,_durationCSSProperty,new cssProperty_index.CSSProperty(this,"--tween-duration",!1));__privateAdd(this,_autoSizeCSSProperty,new cssProperty_index.CSSProperty(this,"--auto-size",!1));__privateAdd(this,_wheelMaxDeltaCSSProperty,new cssProperty_index.CSSProperty(this,"--wheel-max-delta",!1));__privateAdd(this,_dragInertionCSSProperty,new cssProperty_index.CSSProperty(this,"--drag-inertion",1));__privateAdd(this,_sectionsInViewCSSProperty,new cssProperty_index.CSSProperty(this,"--sections-in-view",1));__privateAdd(this,_loopCSSProperty,new cssProperty_index.CSSProperty(this,"--loop",!1));__privateAdd(this,_dampingCSSProperty,new cssProperty_index.CSSProperty(this,"--damping",20));__privateAdd(this,_massCSSProperty,new cssProperty_index.CSSProperty(this,"--mass",0));__privateAdd(this,_stiffnessCSSProperty,new cssProperty_index.CSSProperty(this,"--stiffness",0));__privateAdd(this,_mouseDragCSSProperty,new cssProperty_index.CSSProperty(this,"--mouse-drag",!1));__privateAdd(this,_sectionDistanceScaleCSSProperty,new cssProperty_index.CSSProperty(this,"--section-distance-scale",.5));__privateAdd(this,_startSectionCSSProperty,new cssProperty_index.CSSProperty(this,"--start-section",0));__privateAdd(this,_autoplayCSSProperty,new cssProperty_index.CSSProperty(this,"--autoplay",0));__privateAdd(this,_autoplayPauseDurationCSSProperty,new cssProperty_index.CSSProperty(this,"--autoplay-pause-duration",0));__privateAdd(this,_autoplayUserDirectionCSSProperty,new cssProperty_index.CSSProperty(this,"--autoplay-user-direction",!1));__privateAdd(this,_classesCSSProperty,new cssProperty_index.CSSProperty(this,"--classes",!1));__privateAdd(this,_currentIndexStartOffsetCSSProperty,new cssProperty_index.CSSProperty(this,"--current-index-start-offset",0));__privateAdd(this,_currentIndexEndOffsetCSSProperty,new cssProperty_index.CSSProperty(this,"--current-index-end-offset",0));__privateAdd(this,_shiftSectionPositionCSSProperty,new cssProperty_index.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));__privateAdd(this,_focusDelayCSSProperty,new cssProperty_index.CSSProperty(this,"--focus-delay",0));__privateAdd(this,_focusDurationCSSProperty,new cssProperty_index.CSSProperty(this,"--focus-duration",3e3));__privateAdd(this,_shiftLimitCSSProperty,new cssProperty_index.CSSProperty(this,"--shift-limit",0));__privateAdd(this,_disabledCSSProperty,new cssProperty_index.CSSProperty(this,"--disabled",!1));__privateAdd(this,_hibernatedCSSProperty,new cssProperty_index.CSSProperty(this,"--hibernate",!1));__privateAdd(this,_contentWrapperElement,null);__privateAdd(this,_contentElement,null);__privateAdd(this,_slotElement,null);__privateAdd(this,_sections,[]);__privateAdd(this,_visibleSections,[]);__privateAdd(this,_position2,0);__privateAdd(this,_contentPosition,0);__privateAdd(this,_viewportSize,0);__privateAdd(this,_scrollSize,0);__privateAdd(this,_gap,0);__privateAdd(this,_wheelControls,null);__privateAdd(this,_keyboardControls,null);__privateAdd(this,_dragControls,null);__privateAdd(this,_autoplayControls,null);__privateAdd(this,_counter,new Store.Store(0));__privateAdd(this,_overscroll,0);__privateAdd(this,_distance,0);__privateAdd(this,_hasOverflow,!1);__privateAdd(this,_disabled,!0);__privateAdd(this,_hibernated,!0);__privateAdd(this,_focusTimeoutId);__privateAdd(this,_tweenTimeoutId);__privateAdd(this,_setTween,new Tweened.Tweened);__privateAdd(this,_isGrabbing,!1);__privateAdd(this,_scrollLine,null);__privateAdd(this,_isConnected,!1);__privateAdd(this,_mutationObserver,null);__privateAdd(this,_currentSections,[]);__privateAdd(this,_skipNextResize,!1);__privateAdd(this,_maxSectionSizeTimeoutId);__privateAdd(this,_resizeListener,__name(e=>{if(e&&__privateGet(this,_skipNextResize)){__privateSet(this,_skipNextResize,!1);return}this.resize()},"#resizeListener"));__privateAdd(this,_animatedChangeListener,__name(()=>{if(!__privateGet(this,_hasOverflow)||__privateGet(this,_hibernated)||__privateGet(this,_disabled))return;const currentScrollValue=this.currentScrollValue;if(__privateSet(this,_overscroll,Math.max(0,currentScrollValue-__privateGet(this,_scrollSize))),__privateGet(this,_visibleSections).length){for(let i=0;i<__privateGet(this,_sections).length;i++)__privateGet(this,_sections)[i].transform();(__privateGet(this,_isGrabbing)||!__privateGet(this,_sectionalCSSProperty).current)&&(__privateGet(this,_counter).current=__privateMethod(this,_ScrollElement_instances,getNearestSectionIndex_fn).call(this))}else this.vertical?__privateGet(this,_contentElement).style.transform=`translate3d(0px, ${currentScrollValue*-1}px, 0px)`:__privateGet(this,_contentElement).style.transform=`translate3d(${currentScrollValue*-1}px, 0px, 0px)`;__privateMethod(this,_ScrollElement_instances,updateIndexes_fn).call(this),scrollEntries_index.scrollEntries.update(this,__privateGet(this,_axisCSSProperty).current,currentScrollValue)},"#animatedChangeListener"));__privateAdd(this,_notAutoplayControlListener,__name((type,value)=>{__privateGet(this,_controlsCSSProperty).current&&(__privateMethod(this,_ScrollElement_instances,processAutoplay_fn).call(this,Math.sign(value)||1),__privateGet(this,_controlsListener).call(this,type,value))},"#notAutoplayControlListener"));__privateAdd(this,_controlsListener,__name((type,value)=>{if(!__privateGet(this,_tweenTimeoutId)){if(__privateGet(this,_directionCSSProperty).current){if(__privateGet(this,_directionCSSProperty).current<0&&value>0)return;if(__privateGet(this,_directionCSSProperty).current>0&&value<0)return}if(!__privateGet(this,_autoplayCSSProperty).current&&__privateGet(this,_focusDelayCSSProperty).current&&(clearInterval(__privateGet(this,_focusTimeoutId)),__privateSet(this,_focusTimeoutId,setTimeout(()=>{const section=__privateGet(this,_visibleSections)[__privateMethod(this,_ScrollElement_instances,getNearestSectionIndex_fn).call(this)];section&&this.scrollToSection(section.index,{tween:{duration:__privateGet(this,_focusDurationCSSProperty).current,easing:easings.easeInOutExpo}})},__privateGet(this,_focusDelayCSSProperty).current))),!(type.includes("drag")&&!Viewport.device.isTouch&&!__privateGet(this,_mouseDragCSSProperty).current)){if(__privateGet(this,_sectionalCSSProperty).current&&type!=="drag"){const direction=Math.sign(value);__privateGet(this,_visibleSections).length?__privateGet(this,_isGrabbing)?this.scrollToSection(__privateMethod(this,_ScrollElement_instances,getNearestSectionIndex_fn).call(this,!0)):this.shiftSections(direction,{tween:__privateGet(this,_easingCSSProperty).current||__privateGet(this,_durationCSSProperty).current?{easing:__privateGet(this,_easingCSSProperty).current||"easeInOutCubic",duration:__privateGet(this,_durationCSSProperty).current||500}:void 0}):__privateGet(this,_damped).shift(direction*__privateGet(this,_viewportSize))}else __privateGet(this,_damped).shift(value);__privateSet(this,_isGrabbing,type==="drag")}}},"#controlsListener"));__privateAdd(this,_updateMaxSectionsSize,_function.debounce(()=>{const maxSectionSize=__privateGet(this,_currentSections).reduce((p,c)=>{const s=this.vertical?c.width:c.height;return s>p?s:p},0);clearTimeout(__privateGet(this,_maxSectionSizeTimeoutId)),__privateSet(this,_skipNextResize,!0),this.style.setProperty("--max-section-size",""),__privateSet(this,_maxSectionSizeTimeoutId,setTimeout(()=>{__privateSet(this,_skipNextResize,!0),this.style.setProperty("--max-section-size",maxSectionSize+"px")},10))},20));__privateAdd(this,_connectListener,__name(()=>{__privateSet(this,_isConnected,!0),this.hibernatedCSSProperty.current||__privateMethod(this,_ScrollElement_instances,awake_fn).call(this),elementResizer_index.elementResizer.subscribe(this,__privateGet(this,_resizeListener)),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_connectListener))},"#connectListener"));if(intersector_index.isBrowser){const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[stylesheet];const staticElement=document.createElement("div");staticElement.className="static",staticElement.innerHTML='<slot name="static"></slot>',shadow.appendChild(staticElement),__privateSet(this,_contentWrapperElement,document.createElement("div")),__privateGet(this,_contentWrapperElement).className="content-wrapper",__privateSet(this,_contentElement,document.createElement("div")),__privateGet(this,_contentElement).className="content",__privateSet(this,_slotElement,document.createElement("slot")),__privateGet(this,_contentElement).appendChild(__privateGet(this,_slotElement)),__privateGet(this,_contentWrapperElement).appendChild(__privateGet(this,_contentElement)),shadow.appendChild(__privateGet(this,_contentWrapperElement)),__privateSet(this,_mutationObserver,new MutationObserver(_function.debounce(()=>{this.tryResplit()},10)))}}get damped(){return __privateGet(this,_damped)}get controlsCSSProperty(){return __privateGet(this,_controlsCSSProperty)}get axisCSSProperty(){return __privateGet(this,_axisCSSProperty)}get reverseCSSProperty(){return __privateGet(this,_reverseCSSProperty)}get directionCSSProperty(){return __privateGet(this,_directionCSSProperty)}get pagesCSSProperty(){return __privateGet(this,_pagesCSSProperty)}get splitCSSProperty(){return __privateGet(this,_splitCSSProperty)}get sectionalCSSProperty(){return __privateGet(this,_sectionalCSSProperty)}get easingCSSProperty(){return __privateGet(this,_easingCSSProperty)}get durationCSSProperty(){return __privateGet(this,_durationCSSProperty)}get autoSizeCSSProperty(){return __privateGet(this,_autoSizeCSSProperty)}get wheelMaxDeltaCSSProperty(){return __privateGet(this,_wheelMaxDeltaCSSProperty)}get dragInertionCSSProperty(){return __privateGet(this,_dragInertionCSSProperty)}get sectionsInViewCSSProperty(){return __privateGet(this,_sectionsInViewCSSProperty)}get loopCSSProperty(){return __privateGet(this,_loopCSSProperty)}get dampingCSSProperty(){return __privateGet(this,_dampingCSSProperty)}get massCSSProperty(){return __privateGet(this,_massCSSProperty)}get stiffnessCSSProperty(){return __privateGet(this,_stiffnessCSSProperty)}get mouseDragCSSProperty(){return __privateGet(this,_mouseDragCSSProperty)}get sectionDistanceScaleCSSProperty(){return __privateGet(this,_sectionDistanceScaleCSSProperty)}get startSectionCSSProperty(){return __privateGet(this,_startSectionCSSProperty)}get autoplayCSSProperty(){return __privateGet(this,_autoplayCSSProperty)}get autoplayPauseDurationCSSProperty(){return __privateGet(this,_autoplayPauseDurationCSSProperty)}get autoplayUserDirectionCSSProperty(){return __privateGet(this,_autoplayUserDirectionCSSProperty)}get classesCSSProperty(){return __privateGet(this,_classesCSSProperty)}get currentIndexStartOffsetCSSProperty(){return __privateGet(this,_currentIndexStartOffsetCSSProperty)}get currentIndexEndOffsetCSSProperty(){return __privateGet(this,_currentIndexEndOffsetCSSProperty)}get shiftSectionPositionCSSProperty(){return __privateGet(this,_shiftSectionPositionCSSProperty)}get focusDelayCSSProperty(){return __privateGet(this,_focusDelayCSSProperty)}get focusDurationCSSProperty(){return __privateGet(this,_focusDurationCSSProperty)}get shiftLimitCSSProperty(){return __privateGet(this,_shiftLimitCSSProperty)}get disabledCSSProperty(){return __privateGet(this,_disabledCSSProperty)}get hibernatedCSSProperty(){return __privateGet(this,_hibernatedCSSProperty)}get currentScrollValue(){return __privateMethod(this,_ScrollElement_instances,getScrollValue_fn).call(this,"current")}get targetScrollValue(){return __privateMethod(this,_ScrollElement_instances,getScrollValue_fn).call(this,"target")}get contentWrapperElement(){return __privateGet(this,_contentWrapperElement)}get contentElement(){return __privateGet(this,_contentElement)}get sections(){return __privateGet(this,_sections)}get visibleSections(){return __privateGet(this,_visibleSections)}get position(){return __privateGet(this,_position2)}get contentPosition(){return __privateGet(this,_contentPosition)}get viewportSize(){return __privateGet(this,_viewportSize)}get scrollSize(){return __privateGet(this,_scrollSize)}get gap(){return __privateGet(this,_gap)}get counter(){return __privateGet(this,_counter)}get limit(){return Math.ceil(__privateGet(this,_visibleSections).length-__privateGet(this,_sectionsInViewCSSProperty).current+__privateGet(this,_shiftLimitCSSProperty).current)}get distance(){return __privateGet(this,_distance)}get loopDistance(){return __privateGet(this,_loopCSSProperty).current?__privateGet(this,_distance)+__privateGet(this,_gap):__privateGet(this,_distance)}get hasOverflow(){return __privateGet(this,_hasOverflow)}get overscroll(){return __privateGet(this,_overscroll)}get scrollLine(){return __privateGet(this,_scrollLine)}get vertical(){return __privateGet(this,_axisCSSProperty).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return __privateGet(this,_axisCSSProperty).current==="y"?0:__privateGet(this,_damped).distance}get scrollHeight(){return __privateGet(this,_axisCSSProperty).current==="x"?0:__privateGet(this,_damped).distance}tryResplit(){!__privateGet(this,_hibernated)&&(__privateGet(this,_loopCSSProperty).current||__privateGet(this,_splitCSSProperty).current||__privateGet(this,_loopCSSProperty).current||__privateGet(this,_autoSizeCSSProperty).current||__privateGet(this,_sectionalCSSProperty).current)&&__privateMethod(this,_ScrollElement_instances,split_fn).call(this)}onScroll(...parameters){return __privateGet(this,_damped).subscribe(...parameters)}offScroll(...parameters){__privateGet(this,_damped).unsubscribe(...parameters)}range(from,distance,margin=0){const start=from-margin,end=start+distance+margin*2;return this.currentProgress<start?0:this.currentProgress>end?1:(this.currentProgress-start)/(end-start)}curve(from,distance,margin=0){return Math.sin(this.range(from,distance,margin)*Math.PI)}visible(from,distance,margin=0){const start=from-margin,end=start+distance+margin*2;return this.currentProgress>=start&&this.currentProgress<=end}scrollToSection(sectionIndex,options){if(!__privateGet(this,_visibleSections).length||__privateGet(this,_hibernated)||__privateGet(this,_tweenTimeoutId))return;const previousCounter=__privateGet(this,_counter).current,newCounterValue=__privateMethod(this,_ScrollElement_instances,clampCounter_fn).call(this,sectionIndex);__privateGet(this,_isGrabbing)||(__privateGet(this,_counter).current=newCounterValue);const previousSection=__privateGet(this,_visibleSections)[previousCounter],currentSection=__privateGet(this,_visibleSections)[newCounterValue];if(previousSection&¤tSection){let shiftValue=0;const nearestSectionIndex=__privateMethod(this,_ScrollElement_instances,getNearestSectionIndex_fn).call(this),nearestSection=__privateGet(this,_visibleSections)[nearestSectionIndex];let scrolledFromNearestSection=nearestSection?this.targetScrollValue-nearestSection.position:0;__privateGet(this,_loopCSSProperty).current?newCounterValue===0&&previousCounter===__privateGet(this,_visibleSections).length-1?(shiftValue=__privateGet(this,_scrollSize)+__privateGet(this,_viewportSize)-previousSection.position+__privateGet(this,_gap),__privateGet(this,_isGrabbing)||(scrolledFromNearestSection=0)):newCounterValue===__privateGet(this,_visibleSections).length-1&&previousCounter===0?shiftValue=currentSection.position-(__privateGet(this,_scrollSize)+__privateGet(this,_viewportSize)+__privateGet(this,_gap)):shiftValue=currentSection.position-previousSection.position:shiftValue=currentSection.position-previousSection.position,this.shiftPosition(shiftValue-scrolledFromNearestSection,options)}}shiftSections(step,options){__privateGet(this,_visibleSections).length&&this.scrollToSection(__privateGet(this,_counter).current+step,options)}setPosition(value,options){__privateGet(this,_hibernated)||(__privateMethod(this,_ScrollElement_instances,processAutoplay_fn).call(this,Math.sign(value)||1),options!=null&&options.tween?(clearTimeout(__privateGet(this,_tweenTimeoutId)),__privateGet(this,_setTween).set(__privateGet(this,_damped).current,{equalize:!0}),__privateGet(this,_setTween).set(value,__spreadValues({},options.tween)),__privateSet(this,_tweenTimeoutId,setTimeout(()=>{__privateSet(this,_tweenTimeoutId,void 0)},options.tween.duration||0))):__privateGet(this,_damped).set(value,{equalize:(options==null?void 0:options.behaviour)==="instant"}))}shiftPosition(value,options){this.setPosition(__privateGet(this,_damped).target+value,options)}resize(){if(__privateGet(this,_hibernatedCSSProperty).current)return;__privateSet(this,_visibleSections,__privateGet(this,_sections).filter(s=>element.isElementVisible(s.element))),this.style.setProperty("--sections",__privateGet(this,_visibleSections).length.toString()),__privateGet(this,_damped).unlistenAnimationFrame();const prevProgress=this.currentScrollValue/__privateGet(this,_scrollSize)||0,prevCounter=__privateGet(this,_counter).current;if(__privateSet(this,_position2,this.vertical?layout.getCumulativeOffsetTop(this):layout.getCumulativeOffsetLeft(this)),__privateSet(this,_contentPosition,this.vertical?layout.getCumulativeOffsetTop(__privateGet(this,_contentElement)):layout.getCumulativeOffsetLeft(__privateGet(this,_contentElement))),__privateSet(this,_viewportSize,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?__privateSet(this,_gap,cssUnitParser_index.cssUnitParser.parse(getComputedStyle(__privateGet(this,_contentElement)).rowGap)):__privateSet(this,_gap,cssUnitParser_index.cssUnitParser.parse(getComputedStyle(__privateGet(this,_contentElement)).columnGap)),__privateGet(this,_autoSizeCSSProperty).current&&__privateGet(this,_visibleSections).length){const ivc=__privateGet(this,_sectionsInViewCSSProperty).current,sectionSize=(__privateGet(this,_viewportSize)-__privateGet(this,_gap)*(ivc-1))/ivc;__privateGet(this,_visibleSections).forEach(section=>{section.setSize(sectionSize)})}else __privateGet(this,_visibleSections).forEach(section=>{section.setSize()});if(__privateGet(this,_visibleSections).forEach(section=>{section.resize()}),__privateGet(this,_pagesCSSProperty).current){__privateSet(this,_scrollSize,__privateGet(this,_viewportSize)*__privateGet(this,_pagesCSSProperty).current);const contentSize=__privateGet(this,_scrollSize)+__privateGet(this,_viewportSize);this.vertical?(__privateGet(this,_contentElement).style.width=contentSize+"px",__privateGet(this,_contentElement).style.height="100%"):(__privateGet(this,_contentElement).style.height=contentSize+"px",__privateGet(this,_contentElement).style.width="100%")}else this.vertical?(__privateGet(this,_contentElement).style.width="100%",__privateGet(this,_contentElement).style.height="max-content",__privateSet(this,_scrollSize,__privateGet(this,_contentElement).offsetHeight-__privateGet(this,_viewportSize))):(__privateGet(this,_contentElement).style.width="max-content",__privateGet(this,_contentElement).style.height="100%",__privateSet(this,_scrollSize,__privateGet(this,_contentElement).offsetWidth-__privateGet(this,_viewportSize)));if(!__privateGet(this,_loopCSSProperty).current){const cs=getComputedStyle(this),padding=this.vertical?parseFloat(cs.paddingBlockStart)+parseFloat(cs.paddingBlockEnd):parseFloat(cs.paddingInlineStart)+parseFloat(cs.paddingInlineEnd);__privateSet(this,_scrollSize,__privateGet(this,_scrollSize)+padding),__privateGet(this,_damped).max=__privateGet(this,_scrollSize)}if(__privateGet(this,_loopCSSProperty).current&&__privateGet(this,_visibleSections).length){const lastSection=__privateGet(this,_visibleSections)[__privateGet(this,_visibleSections).length-1],lastSectionMax=lastSection.position+lastSection.size-__privateGet(this,_viewportSize),lastSectionMargin=__privateGet(this,_scrollSize)-lastSectionMax;__privateSet(this,_distance,lastSection.position+lastSection.size+lastSectionMargin)}else __privateSet(this,_distance,__privateGet(this,_scrollSize));if(__privateGet(this,_sectionalCSSProperty).current&&__privateGet(this,_visibleSections).length){const section=__privateGet(this,_visibleSections)[prevCounter];__privateGet(this,_damped).set(section.position,{equalize:!0})}else __privateGet(this,_damped).set(prevProgress*__privateGet(this,_scrollSize),{equalize:!0});__privateSet(this,_hasOverflow,(this.vertical?__privateGet(this,_contentElement).offsetHeight:__privateGet(this,_contentElement).offsetWidth)>__privateGet(this,_viewportSize)),this.classList.toggle("has-overflow",__privateGet(this,_hasOverflow)),__privateGet(this,_hasOverflow)?__privateGet(this,_disabledCSSProperty).current||__privateMethod(this,_ScrollElement_instances,enable_fn).call(this):__privateMethod(this,_ScrollElement_instances,disable_fn).call(this),__privateGet(this,_updateMaxSectionsSize).call(this),events.dispatchEvent(this,"scrollResize",{custom:!0}),__privateGet(this,_damped).notify()}connectedCallback(){scrollEntries_index.scrollEntries.register(this),__privateSet(this,_damped,new Damped.Damped(0,{damping:.01,min:0,order:order_index.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),__privateSet(this,_wheelControls,new DragControls.WheelControls({element:__privateGet(this,_contentElement)})),__privateGet(this,_wheelControls).changeEvent.subscribe(__privateGet(this,_notAutoplayControlListener)),__privateSet(this,_keyboardControls,new DragControls.KeyboardControls({element:this})),__privateGet(this,_keyboardControls).changeEvent.subscribe(__privateGet(this,_notAutoplayControlListener)),__privateSet(this,_dragControls,new DragControls.DragControls({element:__privateGet(this,_contentElement),rootElement:this})),__privateGet(this,_dragControls).changeEvent.subscribe(__privateGet(this,_notAutoplayControlListener)),__privateSet(this,_autoplayControls,new DragControls.AutoplayControls({culling:this})),__privateGet(this,_autoplayControls).changeEvent.subscribe(__privateGet(this,_controlsListener)),__privateGet(this,_axisCSSProperty).subscribe(()=>{__privateMethod(this,_ScrollElement_instances,updateAxis_fn).call(this)}),__privateGet(this,_reverseCSSProperty).subscribe(()=>{__privateMethod(this,_ScrollElement_instances,updateAxis_fn).call(this)}),__privateGet(this,_wheelMaxDeltaCSSProperty).subscribe(e=>{__privateGet(this,_wheelControls).axis=e.current?"max":__privateGet(this,_axisCSSProperty).current}),__privateGet(this,_dragInertionCSSProperty).subscribe(e=>{__privateGet(this,_dragControls).inertion=typeof e.current=="number"?e.current:1}),__privateGet(this,_pagesCSSProperty).subscribe(()=>{__privateGet(this,_isConnected)&&__privateGet(this,_resizeListener).call(this)}),__privateGet(this,_splitCSSProperty).subscribe(({current})=>{__privateGet(this,_isConnected)&&(current?__privateMethod(this,_ScrollElement_instances,split_fn).call(this):__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this))}),__privateGet(this,_sectionalCSSProperty).subscribe(e=>{__privateGet(this,_wheelControls).debounce=e.current,__privateGet(this,_dragControls).swipe=e.current,__privateGet(this,_autoplayControls).interval=e.current,__privateGet(this,_isConnected)&&(e.current&&!e.previous&&!__privateGet(this,_visibleSections).length?__privateMethod(this,_ScrollElement_instances,split_fn).call(this):!e.current&&e.previous&&__privateGet(this,_visibleSections).length&&__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this))}),__privateGet(this,_autoSizeCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&(__privateGet(this,_resizeListener).call(this),e.current&&!e.previous&&!__privateGet(this,_visibleSections).length?__privateMethod(this,_ScrollElement_instances,split_fn).call(this):!e.current&&e.previous&&__privateGet(this,_visibleSections).length&&__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this))}),__privateGet(this,_sectionsInViewCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&(__privateGet(this,_resizeListener).call(this),__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this))}),__privateGet(this,_loopCSSProperty).subscribe(e=>{e.current?(__privateGet(this,_isConnected)&&(__privateGet(this,_visibleSections).length||(__privateGet(this,_splitCSSProperty).current=!0)),__privateGet(this,_damped).max=1/0,__privateGet(this,_damped).min=-1/0):(__privateSet(this,_overscroll,0),__privateGet(this,_damped).max=__privateGet(this,_scrollSize),__privateGet(this,_damped).min=0),this.classList.toggle("loop",!!e.current)}),__privateGet(this,_dampingCSSProperty).subscribe(e=>{__privateGet(this,_damped).damping=e.current}),__privateGet(this,_massCSSProperty).subscribe(e=>{__privateGet(this,_damped).mass=e.current}),__privateGet(this,_stiffnessCSSProperty).subscribe(e=>{__privateGet(this,_damped).stiffness=e.current}),__privateGet(this,_autoplayCSSProperty).subscribe(e=>{__privateGet(this,_autoplayControls).speed=e.current,!__privateGet(this,_disabled)&&e.current&&!e.previous?__privateGet(this,_autoplayControls).connect():!e.current&&e.previous&&__privateGet(this,_autoplayControls).disconnect()}),__privateGet(this,_autoplayUserDirectionCSSProperty).subscribe(e=>{e.current||(__privateGet(this,_autoplayControls).direction=1)}),__privateGet(this,_classesCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this)}),__privateGet(this,_currentIndexStartOffsetCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&__privateGet(this,_classesCSSProperty).current&&__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this)}),__privateGet(this,_currentIndexEndOffsetCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&__privateGet(this,_classesCSSProperty).current&&__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this)}),__privateGet(this,_shiftSectionPositionCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&__privateGet(this,_damped).notify()}),__privateGet(this,_damped).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),__privateGet(this,_counter).subscribe(e=>{__privateGet(this,_hibernated)||(__privateGet(this,_visibleSections).length&&__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this),this.style.setProperty("--counter",e.current+""))}),__privateGet(this,_setTween).subscribe(e=>{__privateGet(this,_setTween).isRunning.current&&__privateGet(this,_damped).set(e.current,{equalize:!0})}),__privateGet(this,_disabledCSSProperty).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),__privateMethod(this,_ScrollElement_instances,disable_fn).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),__privateMethod(this,_ScrollElement_instances,enable_fn).call(this))}),__privateGet(this,_hibernatedCSSProperty).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),__privateMethod(this,_ScrollElement_instances,hibernate_fn).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),__privateMethod(this,_ScrollElement_instances,awake_fn).call(this))}),__privateGet(this,_controlsCSSProperty).observe(),__privateGet(this,_axisCSSProperty).observe(),__privateGet(this,_reverseCSSProperty).observe(),__privateGet(this,_directionCSSProperty).observe(),__privateGet(this,_pagesCSSProperty).observe(),__privateGet(this,_splitCSSProperty).observe(),__privateGet(this,_sectionalCSSProperty).observe(),__privateGet(this,_easingCSSProperty).observe(),__privateGet(this,_durationCSSProperty).observe(),__privateGet(this,_autoSizeCSSProperty).observe(),__privateGet(this,_wheelMaxDeltaCSSProperty).observe(),__privateGet(this,_dragInertionCSSProperty).observe(),__privateGet(this,_sectionsInViewCSSProperty).observe(),__privateGet(this,_loopCSSProperty).observe(),__privateGet(this,_dampingCSSProperty).observe(),__privateGet(this,_massCSSProperty).observe(),__privateGet(this,_stiffnessCSSProperty).observe(),__privateGet(this,_mouseDragCSSProperty).observe(),__privateGet(this,_sectionDistanceScaleCSSProperty).observe(),__privateGet(this,_startSectionCSSProperty).observe(),__privateGet(this,_autoplayCSSProperty).observe(),__privateGet(this,_autoplayCSSProperty).observe(),__privateGet(this,_autoplayPauseDurationCSSProperty).observe(),__privateGet(this,_autoplayUserDirectionCSSProperty).observe(),__privateGet(this,_classesCSSProperty).observe(),__privateGet(this,_currentIndexStartOffsetCSSProperty).observe(),__privateGet(this,_currentIndexEndOffsetCSSProperty).observe(),__privateGet(this,_shiftSectionPositionCSSProperty).observe(),__privateGet(this,_focusDelayCSSProperty).observe(),__privateGet(this,_focusDurationCSSProperty).observe(),__privateGet(this,_shiftLimitCSSProperty).observe(),__privateGet(this,_disabledCSSProperty).observe(),__privateGet(this,_hibernatedCSSProperty).observe(),windowResizer_index.windowResizer.subscribe(__privateGet(this,_connectListener),order_index.RESIZE_ORDER.LAST),__privateGet(this,_mutationObserver).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),__privateGet(this,_controlsCSSProperty).unobserve(),__privateGet(this,_axisCSSProperty).unobserve(),__privateGet(this,_reverseCSSProperty).unobserve(),__privateGet(this,_directionCSSProperty).unobserve(),__privateGet(this,_pagesCSSProperty).unobserve(),__privateGet(this,_splitCSSProperty).unobserve(),__privateGet(this,_sectionalCSSProperty).unobserve(),__privateGet(this,_easingCSSProperty).unobserve(),__privateGet(this,_durationCSSProperty).unobserve(),__privateGet(this,_autoSizeCSSProperty).unobserve(),__privateGet(this,_wheelMaxDeltaCSSProperty).unobserve(),__privateGet(this,_dragInertionCSSProperty).unobserve(),__privateGet(this,_sectionsInViewCSSProperty).unobserve(),__privateGet(this,_loopCSSProperty).unobserve(),__privateGet(this,_dampingCSSProperty).unobserve(),__privateGet(this,_massCSSProperty).unobserve(),__privateGet(this,_stiffnessCSSProperty).unobserve(),__privateGet(this,_mouseDragCSSProperty).unobserve(),__privateGet(this,_sectionDistanceScaleCSSProperty).unobserve(),__privateGet(this,_startSectionCSSProperty).unobserve(),__privateGet(this,_autoplayCSSProperty).unobserve(),__privateGet(this,_autoplayPauseDurationCSSProperty).unobserve(),__privateGet(this,_autoplayUserDirectionCSSProperty).unobserve(),__privateGet(this,_classesCSSProperty).unobserve(),__privateGet(this,_currentIndexStartOffsetCSSProperty).unobserve(),__privateGet(this,_currentIndexEndOffsetCSSProperty).unobserve(),__privateGet(this,_shiftSectionPositionCSSProperty).unobserve(),__privateGet(this,_focusDelayCSSProperty).unobserve(),__privateGet(this,_focusDurationCSSProperty).unobserve(),__privateGet(this,_shiftLimitCSSProperty).unobserve(),__privateGet(this,_disabledCSSProperty).unobserve(),__privateGet(this,_hibernatedCSSProperty).unobserve(),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_connectListener)),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener)),elementResizer_index.elementResizer.unsubscribe(__privateGet(this,_resizeListener)),__privateMethod(this,_ScrollElement_instances,hibernate_fn).call(this),__privateGet(this,_mutationObserver).disconnect()}};_damped=new WeakMap,_controlsCSSProperty=new WeakMap,_axisCSSProperty=new WeakMap,_reverseCSSProperty=new WeakMap,_directionCSSProperty=new WeakMap,_pagesCSSProperty=new WeakMap,_splitCSSProperty=new WeakMap,_sectionalCSSProperty=new WeakMap,_easingCSSProperty=new WeakMap,_durationCSSProperty=new WeakMap,_autoSizeCSSProperty=new WeakMap,_wheelMaxDeltaCSSProperty=new WeakMap,_dragInertionCSSProperty=new WeakMap,_sectionsInViewCSSProperty=new WeakMap,_loopCSSProperty=new WeakMap,_dampingCSSProperty=new WeakMap,_massCSSProperty=new WeakMap,_stiffnessCSSProperty=new WeakMap,_mouseDragCSSProperty=new WeakMap,_sectionDistanceScaleCSSProperty=new WeakMap,_startSectionCSSProperty=new WeakMap,_autoplayCSSProperty=new WeakMap,_autoplayPauseDurationCSSProperty=new WeakMap,_autoplayUserDirectionCSSProperty=new WeakMap,_classesCSSProperty=new WeakMap,_currentIndexStartOffsetCSSProperty=new WeakMap,_currentIndexEndOffsetCSSProperty=new WeakMap,_shiftSectionPositionCSSProperty=new WeakMap,_focusDelayCSSProperty=new WeakMap,_focusDurationCSSProperty=new WeakMap,_shiftLimitCSSProperty=new WeakMap,_disabledCSSProperty=new WeakMap,_hibernatedCSSProperty=new WeakMap,_contentWrapperElement=new WeakMap,_contentElement=new WeakMap,_slotElement=new WeakMap,_sections=new WeakMap,_visibleSections=new WeakMap,_position2=new WeakMap,_contentPosition=new WeakMap,_viewportSize=new WeakMap,_scrollSize=new WeakMap,_gap=new WeakMap,_wheelControls=new WeakMap,_keyboardControls=new WeakMap,_dragControls=new WeakMap,_autoplayControls=new WeakMap,_counter=new WeakMap,_overscroll=new WeakMap,_distance=new WeakMap,_hasOverflow=new WeakMap,_disabled=new WeakMap,_hibernated=new WeakMap,_focusTimeoutId=new WeakMap,_tweenTimeoutId=new WeakMap,_setTween=new WeakMap,_isGrabbing=new WeakMap,_scrollLine=new WeakMap,_isConnected=new WeakMap,_mutationObserver=new WeakMap,_currentSections=new WeakMap,_skipNextResize=new WeakMap,_maxSectionSizeTimeoutId=new WeakMap,_ScrollElement_instances=new WeakSet,updateAxis_fn=__name(function(){const axis=__privateGet(this,_axisCSSProperty).current,reverse=__privateGet(this,_reverseCSSProperty).current?"-reverse":"";__privateGet(this,_contentElement).style.flexDirection=axis==="x"?`row${reverse}`:`column${reverse}`,__privateGet(this,_wheelControls).axis=__privateGet(this,_wheelMaxDeltaCSSProperty).current?"max":axis,__privateGet(this,_keyboardControls).dimension=axis==="x"?"width":"height",__privateGet(this,_dragControls).axis=axis,axis==="x"?this.style.touchAction="pan-y":axis==="y"&&(this.style.touchAction="pan-x"),__privateGet(this,_isConnected)&&__privateGet(this,_resizeListener).call(this)},"#updateAxis"),split_fn=__name(function(){__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this),__privateGet(this,_slotElement).assignedElements().forEach((element2,i)=>{element2 instanceof HTMLElement&&element2.tagName!=="SCRIPT"&&__privateGet(this,_sections).push(new ScrollSection(element2,i,this))}),__privateSet(this,_visibleSections,[...__privateGet(this,_sections)]),__privateGet(this,_contentElement).style.transform="",events.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),__privateGet(this,_resizeListener).call(this),__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this)},"#split"),unsplit_fn=__name(function(){__privateGet(this,_sections).forEach(section=>{section.destroy()}),__privateSet(this,_sections,[]),__privateSet(this,_visibleSections,[]),__privateGet(this,_counter).reset(),__privateGet(this,_damped).reset(),this.style.removeProperty("--max-section-size"),events.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},"#unsplit"),disable_fn=__name(function(){__privateGet(this,_disabled)||(__privateSet(this,_disabled,!0),__privateGet(this,_damped).unsubscribe(__privateGet(this,_animatedChangeListener)),__privateGet(this,_damped).unlistenAnimationFrame(),clearInterval(__privateGet(this,_focusTimeoutId)),clearInterval(__privateGet(this,_tweenTimeoutId)),__privateGet(this,_setTween).unlistenAnimationFrame(),__privateGet(this,_wheelControls).disconnect(),__privateGet(this,_keyboardControls).disconnect(),__privateGet(this,_dragControls).disconnect(),__privateGet(this,_autoplayControls).disconnect(),__privateGet(this,_hasOverflow)||(this.sections.forEach(section=>{section.unsetTransform()}),__privateGet(this,_resizeListener).call(this)))},"#disable"),enable_fn=__name(function(){__privateGet(this,_disabled)&&(__privateSet(this,_disabled,!1),__privateGet(this,_damped).subscribe(__privateGet(this,_animatedChangeListener),-1e4),__privateGet(this,_damped).notify(),__privateGet(this,_wheelControls).connect(),__privateGet(this,_keyboardControls).connect(),__privateGet(this,_dragControls).connect(),__privateGet(this,_autoplayCSSProperty).current&&__privateGet(this,_autoplayControls).connect())},"#enable"),hibernate_fn=__name(function(){__privateGet(this,_hibernated)||(__privateSet(this,_hibernated,!0),clearTimeout(__privateGet(this,_maxSectionSizeTimeoutId)),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener)),__privateMethod(this,_ScrollElement_instances,disable_fn).call(this),__privateGet(this,_contentElement).style.transform="",__privateGet(this,_contentElement).style.height="",__privateGet(this,_contentElement).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),__privateGet(this,_sections).length?__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this):(__privateGet(this,_counter).reset(),__privateGet(this,_damped).reset()),scrollEntries_index.scrollEntries.unregister(this))},"#hibernate"),awake_fn=__name(function(){__privateGet(this,_hibernated)&&(__privateSet(this,_hibernated,!1),scrollEntries_index.scrollEntries.register(this),this.tryResplit(),__privateMethod(this,_ScrollElement_instances,enable_fn).call(this),this.scrollToSection(__privateGet(this,_startSectionCSSProperty).current,{behaviour:"instant"}),windowResizer_index.windowResizer.subscribe(__privateGet(this,_resizeListener),order_index.RESIZE_ORDER.SCROLL))},"#awake"),_resizeListener=new WeakMap,_animatedChangeListener=new WeakMap,clampCounter_fn=__name(function(value){let counter=__privateGet(this,_counter).current;return __privateGet(this,_loopCSSProperty).current?counter=number.loopNumber(value,__privateGet(this,_visibleSections).length):counter=math.clamp(value,0,this.limit),counter},"#clampCounter"),_notAutoplayControlListener=new WeakMap,_controlsListener=new WeakMap,processAutoplay_fn=__name(function(direction=1){__privateGet(this,_autoplayUserDirectionCSSProperty).current&&(__privateGet(this,_autoplayControls).direction=direction),__privateGet(this,_autoplayCSSProperty).current&&__privateGet(this,_autoplayControls).pauseAndContinue(__privateGet(this,_autoplayPauseDurationCSSProperty).current,this.sectionalCSSProperty.current)},"#processAutoplay"),getScrollValue_fn=__name(function(type="current"){if(__privateGet(this,_loopCSSProperty).current&&__privateGet(this,_visibleSections).length){const mod=Math.floor(__privateGet(this,_damped)[type])%Math.floor(__privateGet(this,_scrollSize)+__privateGet(this,_viewportSize)+__privateGet(this,_gap));return mod<0?__privateGet(this,_scrollSize)+mod+__privateGet(this,_viewportSize)+__privateGet(this,_gap):mod}else return __privateGet(this,_damped)[type]},"#getScrollValue"),updateMarks_fn=__name(function(){if(__privateGet(this,_visibleSections).length){const counter=__privateGet(this,_counter).current+__privateGet(this,_currentIndexStartOffsetCSSProperty).current;if(counter===__privateGet(this,_currentIndexStartOffsetCSSProperty).current?__privateSet(this,_scrollLine,"start"):counter===this.limit?__privateSet(this,_scrollLine,"end"):__privateSet(this,_scrollLine,null),events.dispatchEvent(this,"scrollLine",{detail:{line:__privateGet(this,_scrollLine)}}),__privateGet(this,_classesCSSProperty).current){this.classList.remove("end","start"),__privateGet(this,_scrollLine)&&this.classList.add(__privateGet(this,_scrollLine));const sectionsInView=__privateGet(this,_sectionsInViewCSSProperty).current+__privateGet(this,_currentIndexEndOffsetCSSProperty).current;__privateSet(this,_currentSections,[]),__privateGet(this,_visibleSections).forEach((section,index)=>{section.setCurrentIndex(null),section.setCurrentIndexArc(null),section.setCurrentIndexArcAbs(null),section.setMiddle(!1);const overflow=counter-this.limit-1+__privateGet(this,_currentIndexEndOffsetCSSProperty).current,currentRange=counter+sectionsInView,vv=this.sections.length-currentRange;index>=counter&&index<currentRange||index<=overflow?(section.setMark("current"),__privateGet(this,_currentSections).push(section)):index>=currentRange&&index<currentRange+vv/2||index<=overflow+sectionsInView?section.setMark("next"):section.setMark("previous")}),__privateGet(this,_updateMaxSectionsSize).call(this)}}},"#updateMarks"),updateIndexes_fn=__name(function(){if(__privateGet(this,_classesCSSProperty).current){const middle=Math.floor(__privateGet(this,_currentSections).length/2);__privateGet(this,_currentSections).sort((a,b)=>a.element.getBoundingClientRect().left-b.element.getBoundingClientRect().left),__privateGet(this,_currentSections).forEach((section,i)=>{const arcIndex=i-middle;section.setCurrentIndex(i),section.setCurrentIndexArc(arcIndex),section.setCurrentIndexArcAbs(Math.abs(arcIndex)),section.setMiddle(i===middle)}),__privateGet(this,_visibleSections).forEach((section,i)=>{section.setOffsetIndex(i-(__privateGet(this,_counter).current+__privateGet(this,_sectionsInViewCSSProperty).current))})}},"#updateIndexes"),_updateMaxSectionsSize=new WeakMap,getNearestSectionIndex_fn=__name(function(NAMEIT=!1){let scrollValue=this.targetScrollValue,minDiff=1/0,nearestIndex=0;const dir=__privateGet(this,_damped).direction;for(let i=0;i<__privateGet(this,_visibleSections).length;i++){const section=__privateGet(this,_visibleSections)[i];let offset=__privateGet(this,_isGrabbing)?section.size*dir*-1*.4:0,position=section.position;this.overscroll&&position===0&&NAMEIT&&(position=__privateGet(this,_distance));let diff=Math.abs(position+offset-scrollValue);diff<=minDiff&&(minDiff=diff,nearestIndex=i)}return nearestIndex},"#getNearestSectionIndex"),_connectListener=new WeakMap,__name(_ScrollElement,"ScrollElement");let ScrollElement=_ScrollElement;intersector_index.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",ScrollElement);var _scrollElement2;const _ScrollUserElement=class _ScrollUserElement extends HTMLElement{constructor(){super(...arguments);__privateAdd(this,_scrollElement2,null)}get scrollElement(){return __privateGet(this,_scrollElement2)}connectedCallback(){const scrollElement=dom.findParentElement(this,ScrollElement);scrollElement instanceof ScrollElement?__privateSet(this,_scrollElement2,scrollElement):console.error(this,"e-scroll not found")}};_scrollElement2=new WeakMap,__name(_ScrollUserElement,"ScrollUserElement");let ScrollUserElement=_ScrollUserElement;var _slotElement2,_thumbElement,_isHorisontal,_thumbSize,_thumbScrollSize,_position3,_resizeListener2,_scrollListener,_axisListener,_grabListener;const _ScrollScrollbarElement=class _ScrollScrollbarElement extends ScrollUserElement{constructor(){super();__privateAdd(this,_slotElement2,null);__privateAdd(this,_thumbElement,null);__privateAdd(this,_isHorisontal,!1);__privateAdd(this,_thumbSize,0);__privateAdd(this,_thumbScrollSize,0);__privateAdd(this,_position3,0);__privateAdd(this,_resizeListener2,__name(()=>{__privateSet(this,_isHorisontal,this.offsetWidth>this.offsetHeight);const barSize=__privateGet(this,_isHorisontal)?this.offsetWidth:this.offsetHeight;__privateSet(this,_thumbSize,barSize/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/barSize)),__privateSet(this,_thumbSize,Math.max(__privateGet(this,_thumbSize),30)),__privateGet(this,_isHorisontal)?(__privateGet(this,_thumbElement).style.width=__privateGet(this,_thumbSize)+"px",__privateGet(this,_thumbElement).style.height="100%"):(__privateGet(this,_thumbElement).style.width="100%",__privateGet(this,_thumbElement).style.height=__privateGet(this,_thumbSize)+"px"),__privateSet(this,_thumbScrollSize,barSize-__privateGet(this,_thumbSize)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",__privateGet(this,_scrollListener).call(this)},"#resizeListener"));__privateAdd(this,_scrollListener,__name(()=>{__privateSet(this,_position3,this.scrollElement.currentProgress*__privateGet(this,_thumbScrollSize)),__privateGet(this,_isHorisontal)?__privateGet(this,_thumbElement).style.transform=`translate3d(${__privateGet(this,_position3)}px, 0px, 0px)`:__privateGet(this,_thumbElement).style.transform=`translate3d(0px, ${__privateGet(this,_position3)}px, 0px)`},"#scrollListener"));__privateAdd(this,_axisListener,__name(()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)},"#axisListener"));__privateAdd(this,_grabListener,__name(grabEvent=>{gestures.setupDrag(moveEvent=>{const moveCursor=__privateGet(this,_isHorisontal)?moveEvent.x:moveEvent.y,mult=this.scrollElement.distance/__privateGet(this,_thumbScrollSize),delta=(moveCursor-grabCursor)*mult;this.scrollElement.setPosition(startValue+delta)});const startValue=this.scrollElement.damped.target,grabCursor=__privateGet(this,_isHorisontal)?grabEvent.x:grabEvent.y},"#grabListener"));if(intersector_index.isBrowser){const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[stylesheet$1.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],__privateSet(this,_slotElement2,document.createElement("slot")),__privateGet(this,_slotElement2).innerHTML='<div class="default-thumb"></div>',shadow.appendChild(__privateGet(this,_slotElement2))}}get thumbElement(){return __privateGet(this,_thumbElement)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const slottedThumb=__privateGet(this,_slotElement2).assignedElements()[0]||__privateGet(this,_slotElement2).firstElementChild;__privateSet(this,_thumbElement,slottedThumb),__privateGet(this,_thumbElement).addEventListener("pointerdown",__privateGet(this,_grabListener)),windowResizer_index.windowResizer.subscribe(__privateGet(this,_resizeListener2),order_index.RESIZE_ORDER.SCROLL),elementResizer_index.elementResizer.subscribe(this,__privateGet(this,_resizeListener2)),elementResizer_index.elementResizer.subscribe(this.scrollElement,__privateGet(this,_resizeListener2)),this.scrollElement.onScroll(__privateGet(this,_scrollListener)),this.scrollElement.axisCSSProperty.subscribe(__privateGet(this,_axisListener))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",__privateGet(this,_thumbElement).removeEventListener("pointerdown",__privateGet(this,_grabListener)),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener2)),elementResizer_index.elementResizer.unsubscribe(__privateGet(this,_resizeListener2)),this.scrollElement.offScroll(__privateGet(this,_scrollListener)),this.scrollElement.axisCSSProperty.unsubscribe(__privateGet(this,_axisListener))}};_slotElement2=new WeakMap,_thumbElement=new WeakMap,_isHorisontal=new WeakMap,_thumbSize=new WeakMap,_thumbScrollSize=new WeakMap,_position3=new WeakMap,_resizeListener2=new WeakMap,_scrollListener=new WeakMap,_axisListener=new WeakMap,_grabListener=new WeakMap,__name(_ScrollScrollbarElement,"ScrollScrollbarElement");let ScrollScrollbarElement=_ScrollScrollbarElement;intersector_index.isBrowser&&!customElements.get("e-scroll-scrollbar")&&customElements.define("e-scroll-scrollbar",ScrollScrollbarElement);var _behaviour,_easing,_duration;const _ScrollButtonElement=class _ScrollButtonElement extends ScrollUserElement{constructor(){super();__privateAdd(this,_behaviour,new cssProperty_index.CSSProperty(this,"--behaviour","smooth"));__privateAdd(this,_easing,new cssProperty_index.CSSProperty(this,"--tween-easing",!1));__privateAdd(this,_duration,new cssProperty_index.CSSProperty(this,"--tween-duration",0));intersector_index.isBrowser&&this.addEventListener("click",()=>{const behaviour=__privateGet(this,_behaviour).current,easing=__privateGet(this,_easing).current,duration=__privateGet(this,_duration).current;this.handleClick({behaviour,tween:easing||duration?{easing,duration}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),__privateGet(this,_behaviour).observe(),__privateGet(this,_easing).observe(),__privateGet(this,_duration).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),__privateGet(this,_behaviour).close(),__privateGet(this,_easing).close(),__privateGet(this,_duration).close()}};_behaviour=new WeakMap,_easing=new WeakMap,_duration=new WeakMap,__name(_ScrollButtonElement,"ScrollButtonElement");let ScrollButtonElement=_ScrollButtonElement;var _set;const _ScrollSetButtonElement=class _ScrollSetButtonElement extends ScrollButtonElement{constructor(){super(...arguments);__privateAdd(this,_set,new cssProperty_index.CSSProperty(this,"--set",1))}handleClick(options){this.scrollElement.scrollToSection(__privateGet(this,_set).current,options)}connectedCallback(){super.connectedCallback(),__privateGet(this,_set).observe()}disconnectedCallback(){super.disconnectedCallback(),__privateGet(this,_set).close()}};_set=new WeakMap,__name(_ScrollSetButtonElement,"ScrollSetButtonElement");let ScrollSetButtonElement=_ScrollSetButtonElement;intersector_index.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ScrollSetButtonElement);var _step,_scrollLineListener;const _ScrollStepButtonElement=class _ScrollStepButtonElement extends ScrollButtonElement{constructor(){super(...arguments);__privateAdd(this,_step,new cssProperty_index.CSSProperty(this,"--step",1));__privateAdd(this,_scrollLineListener,__name(()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):__privateGet(this,_step).current>0&&this.scrollElement.scrollLine==="end"||__privateGet(this,_step).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")},"#scrollLineListener"))}handleClick(options){this.scrollElement.shiftSections(__privateGet(this,_step).current,options)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(__privateGet(this,_step).subscribe(()=>{__privateGet(this,_scrollLineListener).call(this)}),__privateGet(this,_step).observe(),this.scrollElement.addEventListener("scrollLine",__privateGet(this,_scrollLineListener)),__privateGet(this,_scrollLineListener).call(this))}disconnectedCallback(){super.disconnectedCallback(),__privateGet(this,_step).close(),this.removeAttribute("disabled")}};_step=new WeakMap,_scrollLineListener=new WeakMap,__name(_ScrollStepButtonElement,"ScrollStepButtonElement");let ScrollStepButtonElement=_ScrollStepButtonElement;intersector_index.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",ScrollStepButtonElement);var _element2,_scrollElement3,_index2,_behaviour2,_clickListener,_counterChangeListener;const _BulletButton=class _BulletButton{constructor(scrollElement,index,behaviour){__privateAdd(this,_element2,null);__privateAdd(this,_scrollElement3,null);__privateAdd(this,_index2,null);__privateAdd(this,_behaviour2,null);__privateAdd(this,_clickListener,__name(()=>{__privateGet(this,_scrollElement3).scrollToSection(__privateGet(this,_index2),{behaviour:__privateGet(this,_behaviour2)})},"#clickListener"));__privateAdd(this,_counterChangeListener,__name(()=>{__privateGet(this,_element2).classList.toggle("current",__privateGet(this,_scrollElement3).counter.current===__privateGet(this,_index2))},"#counterChangeListener"));intersector_index.isBrowser&&(__privateSet(this,_element2,document.createElement("button")),__privateGet(this,_element2).setAttribute("aria-label",`Go to section ${index+1}`),__privateSet(this,_scrollElement3,scrollElement),__privateSet(this,_behaviour2,behaviour),__privateSet(this,_index2,index),__privateGet(this,_element2).addEventListener("click",__privateGet(this,_clickListener)),__privateGet(this,_scrollElement3).counter.subscribe(__privateGet(this,_counterChangeListener)),__privateGet(this,_counterChangeListener).call(this))}get element(){return __privateGet(this,_element2)}destroy(){__privateGet(this,_element2).removeEventListener("click",__privateGet(this,_clickListener)),__privateGet(this,_scrollElement3).counter.unsubscribe(__privateGet(this,_counterChangeListener)),__privateGet(this,_element2).remove()}};_element2=new WeakMap,_scrollElement3=new WeakMap,_index2=new WeakMap,_behaviour2=new WeakMap,_clickListener=new WeakMap,_counterChangeListener=new WeakMap,__name(_BulletButton,"BulletButton");let BulletButton=_BulletButton;var _contentElement2,_buttons,_sectionsChangeListener;const _ScrollBulletButtonsElement=class _ScrollBulletButtonsElement extends ScrollUserElement{constructor(){super(...arguments);__privateAdd(this,_contentElement2,null);__privateAdd(this,_buttons,[]);__privateAdd(this,_sectionsChangeListener,_function.debounce(()=>{__privateGet(this,_buttons).forEach(b=>b.destroy()),__privateSet(this,_buttons,[]);let length=0;this.scrollElement.loopCSSProperty.current?length=this.scrollElement.visibleSections.length:length=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let index=0;index<length;index++){const button=new BulletButton(this.scrollElement,index,this.getAttribute("behaviour")||"smooth");__privateGet(this,_contentElement2).appendChild(button.element),__privateGet(this,_buttons).push(button)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",__privateSet(this,_contentElement2,document.createElement("div")),this.appendChild(__privateGet(this,_contentElement2)),this.scrollElement.addEventListener("scrollSectionsChange",__privateGet(this,_sectionsChangeListener)),this.scrollElement.sectionsInViewCSSProperty.subscribe(__privateGet(this,_sectionsChangeListener)),this.scrollElement.loopCSSProperty.subscribe(__privateGet(this,_sectionsChangeListener)),__privateGet(this,_sectionsChangeListener).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",__privateGet(this,_sectionsChangeListener)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(__privateGet(this,_sectionsChangeListener)),this.scrollElement.loopCSSProperty.unsubscribe(__privateGet(this,_sectionsChangeListener)),__privateGet(this,_buttons).forEach(b=>b.destroy()),__privateSet(this,_buttons,[]),__privateGet(this,_contentElement2).remove()}};_contentElement2=new WeakMap,_buttons=new WeakMap,_sectionsChangeListener=new WeakMap,__name(_ScrollBulletButtonsElement,"ScrollBulletButtonsElement");let ScrollBulletButtonsElement=_ScrollBulletButtonsElement;intersector_index.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",ScrollBulletButtonsElement);var _dampingCSSProperty2,_massCSSProperty2,_stiffnessCSSProperty2,_targetCSSProperty,_disabledCSSProperty2,_distanceOffsetCSSProperty,_startOffsetCSSProperty,_captureOnceCSSProperty,_capturedCSSProperty,_releasedCSSProperty,_capturedFromStartCSSProperty,_capturedFromFinishCSSProperty,_releasedFromStartCSSProperty,_releasedFromFinishCSSProperty,_passedVarCSSProperty,_progressVarCSSProperty,_progressArcVarCSSProperty,_progressArcMultCSSProperty,_animationVarTypeCSSProperty,_distanceVarCSSProperty,_startVarCSSProperty,_finishVarCSSProperty,_isCaptured,_isReleased,_isCapturedFromStart,_isReleasedFromStart,_isCapturedFromFinish,_isReleasedFromFinish,_anotherScrollEntries,_targetElement,_directionPosition,_directionSize,_moverDirectionSize,_passed,_progress,_start,_distance2,_finish,_isResized,_isCapturedOnce,_isDisabled,_skipPassNotification,_ScrollSegmentElement_instances,captureListener_fn,releaseListener_fn,captureFromStartListener_fn,captureFromFinishListener_fn,releaseFromStartListener_fn,releaseFromFinishListener_fn,_resizeListener3,_tickListener,updateProgress_fn,handleClassSetting_fn,removeClasses_fn,removeVars_fn,removeCurrentMarks_fn;const _ScrollSegmentElement=class _ScrollSegmentElement extends ScrollUserElement{constructor(){super(...arguments);__privateAdd(this,_ScrollSegmentElement_instances);__privateAdd(this,_dampingCSSProperty2);__privateAdd(this,_massCSSProperty2);__privateAdd(this,_stiffnessCSSProperty2);__privateAdd(this,_targetCSSProperty);__privateAdd(this,_disabledCSSProperty2);__privateAdd(this,_distanceOffsetCSSProperty);__privateAdd(this,_startOffsetCSSProperty);__privateAdd(this,_captureOnceCSSProperty);__privateAdd(this,_capturedCSSProperty);__privateAdd(this,_releasedCSSProperty);__privateAdd(this,_capturedFromStartCSSProperty);__privateAdd(this,_capturedFromFinishCSSProperty);__privateAdd(this,_releasedFromStartCSSProperty);__privateAdd(this,_releasedFromFinishCSSProperty);__privateAdd(this,_passedVarCSSProperty);__privateAdd(this,_progressVarCSSProperty);__privateAdd(this,_progressArcVarCSSProperty);__privateAdd(this,_progressArcMultCSSProperty);__privateAdd(this,_animationVarTypeCSSProperty);__privateAdd(this,_distanceVarCSSProperty);__privateAdd(this,_startVarCSSProperty);__privateAdd(this,_finishVarCSSProperty);__privateAdd(this,_isCaptured);__privateAdd(this,_isReleased);__privateAdd(this,_isCapturedFromStart);__privateAdd(this,_isReleasedFromStart);__privateAdd(this,_isCapturedFromFinish);__privateAdd(this,_isReleasedFromFinish);__privateAdd(this,_anotherScrollEntries);__privateAdd(this,_targetElement);__privateAdd(this,_directionPosition);__privateAdd(this,_directionSize);__privateAdd(this,_moverDirectionSize);__privateAdd(this,_passed);__privateAdd(this,_progress);__privateAdd(this,_start);__privateAdd(this,_distance2);__privateAdd(this,_finish);__privateAdd(this,_isResized);__privateAdd(this,_isCapturedOnce);__privateAdd(this,_isDisabled);__privateAdd(this,_skipPassNotification);__privateAdd(this,_resizeListener3);__privateAdd(this,_tickListener);__privateSet(this,_dampingCSSProperty2,new cssProperty_index.CSSProperty(this,"--damping",20)),__privateSet(this,_massCSSProperty2,new cssProperty_index.CSSProperty(this,"--mass",0)),__privateSet(this,_stiffnessCSSProperty2,new cssProperty_index.CSSProperty(this,"--stiffness",0)),__privateSet(this,_targetCSSProperty,new cssProperty_index.CSSProperty(this,"--target","")),__privateSet(this,_disabledCSSProperty2,new cssProperty_index.CSSProperty(this,"--disabled",!1)),__privateSet(this,_distanceOffsetCSSProperty,new cssProperty_index.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),__privateSet(this,_startOffsetCSSProperty,new cssProperty_index.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),__privateSet(this,_captureOnceCSSProperty,new cssProperty_index.CSSProperty(this,"--capture-once",!1)),__privateSet(this,_capturedCSSProperty,new cssProperty_index.CSSProperty(this,"--captured","")),__privateSet(this,_releasedCSSProperty,new cssProperty_index.CSSProperty(this,"--released","")),__privateSet(this,_capturedFromStartCSSProperty,new cssProperty_index.CSSProperty(this,"--captured-from-start","")),__privateSet(this,_capturedFromFinishCSSProperty,new cssProperty_index.CSSProperty(this,"--captured-from-finish","")),__privateSet(this,_releasedFromStartCSSProperty,new cssProperty_index.CSSProperty(this,"--released-from-start","")),__privateSet(this,_releasedFromFinishCSSProperty,new cssProperty_index.CSSProperty(this,"--released-from-finish","")),__privateSet(this,_passedVarCSSProperty,new cssProperty_index.CSSProperty(this,"--passed-var","")),__privateSet(this,_progressVarCSSProperty,new cssProperty_index.CSSProperty(this,"--progress-var","")),__privateSet(this,_progressArcVarCSSProperty,new cssProperty_index.CSSProperty(this,"--progress-arc-var","")),__privateSet(this,_progressArcMultCSSProperty,new cssProperty_index.CSSProperty(this,"--progress-arc-mult",1)),__privateSet(this,_animationVarTypeCSSProperty,new cssProperty_index.CSSProperty(this,"--animation-var-type","target")),__privateSet(this,_distanceVarCSSProperty,new cssProperty_index.CSSProperty(this,"--distance-var","")),__privateSet(this,_startVarCSSProperty,new cssProperty_index.CSSProperty(this,"--start-var","")),__privateSet(this,_finishVarCSSProperty,new cssProperty_index.CSSProperty(this,"--finish-var","")),__privateSet(this,_isCaptured,new Store.Store(!1)),__privateSet(this,_isReleased,new Store.Store(!1)),__privateSet(this,_isCapturedFromStart,new Store.Store(!1)),__privateSet(this,_isReleasedFromStart,new Store.Store(!1)),__privateSet(this,_isCapturedFromFinish,new Store.Store(!1)),__privateSet(this,_isReleasedFromFinish,new Store.Store(!1)),__privateSet(this,_anotherScrollEntries,[]),__privateSet(this,_targetElement,this),__privateSet(this,_directionPosition,0),__privateSet(this,_directionSize,0),__privateSet(this,_moverDirectionSize,0),__privateSet(this,_passed,new Damped.Damped(0,{order:order_index.TICK_ORDER.SEGMENT,min:0,max:1})),__privateSet(this,_progress,0),__privateSet(this,_start,0),__privateSet(this,_distance2,0),__privateSet(this,_finish,0),__privateSet(this,_isResized,!1),__privateSet(this,_isCapturedOnce,!1),__privateSet(this,_isDisabled,!0),__privateSet(this,_skipPassNotification,!1),this.resize=()=>{__privateSet(this,_directionSize,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),__privateSet(this,_directionPosition,this.scrollElement.vertical?layout.getCumulativeOffsetTop(this,this.scrollElement):layout.getCumulativeOffsetLeft(this,this.scrollElement));const stickyOffset=layout.getStickyOffset(this,this.scrollElement.vertical?"top":"left");__privateSet(this,_directionPosition,__privateGet(this,_directionPosition)-stickyOffset),__privateSet(this,_start,this.getStart()),__privateSet(this,_distance2,this.getDistance()),__privateSet(this,_start,__privateGet(this,_start)+__privateGet(this,_startOffsetCSSProperty).current),__privateSet(this,_distance2,__privateGet(this,_distance2)+__privateGet(this,_distanceOffsetCSSProperty).current),__privateSet(this,_finish,__privateGet(this,_start)+__privateGet(this,_distance2)),this.scrollElement.currentScrollValue>__privateGet(this,_finish)&&!__privateGet(this,_isCaptured).current&&!__privateGet(this,_isReleased).current&&(__privateGet(this,_isCaptured).current=!0),this.setVar(__privateGet(this,_startVarCSSProperty).current,__privateGet(this,_start)),this.setVar(__privateGet(this,_finishVarCSSProperty).current,__privateGet(this,_finish)),this.setVar(__privateGet(this,_distanceVarCSSProperty).current,__privateGet(this,_distance2)),__privateGet(this,_passed).max=__privateGet(this,_distance2),__privateSet(this,_isResized,!0),__privateGet(this,_tickListener).call(this)},this.findAnotherScrollEntries=_function.debounce(()=>{const allScrollEntriesAbove=scrollEntries_index.scrollEntries.getAll(this).reverse();let scrollIndex=0;allScrollEntriesAbove.forEach((entry,i)=>{entry.element===this.scrollElement&&(scrollIndex=i)}),__privateSet(this,_anotherScrollEntries,allScrollEntriesAbove.slice(scrollIndex+1)),this.tick()},0),__privateSet(this,_resizeListener3,()=>{__privateGet(this,_isDisabled)||this.resize()}),__privateSet(this,_tickListener,()=>{!__privateGet(this,_isDisabled)&&__privateGet(this,_isResized)&&this.tick()})}get distanceOffsetCSSProperty(){return __privateGet(this,_distanceOffsetCSSProperty)}get startOffsetCSSProperty(){return __privateGet(this,_startOffsetCSSProperty)}get captureOnceCSSProperty(){return __privateGet(this,_captureOnceCSSProperty)}get capturedCSSProperty(){return __privateGet(this,_capturedCSSProperty)}get releasedCSSProperty(){return __privateGet(this,_releasedCSSProperty)}get capturedFromStartCSSProperty(){return __privateGet(this,_capturedFromStartCSSProperty)}get capturedFromFinishCSSProperty(){return __privateGet(this,_capturedFromFinishCSSProperty)}get releasedFromStartCSSProperty(){return __privateGet(this,_releasedFromStartCSSProperty)}get releasedFromFinishCSSProperty(){return __privateGet(this,_releasedFromFinishCSSProperty)}get passedVarCSSProperty(){return __privateGet(this,_passedVarCSSProperty)}get progressVarCSSProperty(){return __privateGet(this,_progressVarCSSProperty)}get progressArcVarCSSProperty(){return __privateGet(this,_progressArcVarCSSProperty)}get progressArcMultCSSProperty(){return __privateGet(this,_progressArcMultCSSProperty)}get animationVarTypeCSSProperty(){return __privateGet(this,_animationVarTypeCSSProperty)}get distanceVarCSSProperty(){return __privateGet(this,_distanceVarCSSProperty)}get startVarCSSProperty(){return __privateGet(this,_startVarCSSProperty)}get finishVarCSSProperty(){return __privateGet(this,_finishVarCSSProperty)}get disabledCSSProperty(){return __privateGet(this,_disabledCSSProperty2)}get dampingCSSProperty(){return __privateGet(this,_dampingCSSProperty2)}get massCSSProperty(){return __privateGet(this,_massCSSProperty2)}get stiffnessCSSProperty(){return __privateGet(this,_stiffnessCSSProperty2)}get targetCSSProperty(){return __privateGet(this,_targetCSSProperty)}get isCaptured(){return __privateGet(this,_isCaptured)}get isReleased(){return __privateGet(this,_isReleased)}get isCapturedFromStart(){return __privateGet(this,_isCapturedFromStart)}get isReleasedFromStart(){return __privateGet(this,_isReleasedFromStart)}get isCapturedFromFinish(){return __privateGet(this,_isCapturedFromFinish)}get isReleasedFromFinish(){return __privateGet(this,_isReleasedFromFinish)}get directionPosition(){return __privateGet(this,_directionPosition)}get directionSize(){return __privateGet(this,_directionSize)}get passed(){return __privateGet(this,_passed)}get progress(){return __privateGet(this,_progress)}get progressArc(){return Math.abs(Math.cos(__privateGet(this,_progress)*Math.PI))*__privateGet(this,_progressArcMultCSSProperty).current}get start(){return __privateGet(this,_start)}get finish(){return __privateGet(this,_finish)}get distance(){return __privateGet(this,_distance2)}get isCapturedOnce(){return __privateGet(this,_isCapturedOnce)}get isDisabled(){return __privateGet(this,_isDisabled)}tick(){let scrollValue=this.scrollElement.currentScrollValue;__privateGet(this,_anotherScrollEntries).forEach(se=>{scrollValue+=se.value});const delta=scrollValue-__privateGet(this,_start);__privateGet(this,_skipPassNotification)||__privateSet(this,_skipPassNotification,__privateGet(this,_passed).previous?Math.abs(__privateGet(this,_passed).previous-delta)>1e3:!1),__privateGet(this,_passed).set(delta);const fscrollValue=Math.round(scrollValue);__privateGet(this,_isCaptured).current&&(fscrollValue>=__privateGet(this,_start)?__privateGet(this,_isCapturedFromStart).current||__privateMethod(this,_ScrollSegmentElement_instances,captureFromStartListener_fn).call(this):__privateGet(this,_isCapturedFromStart).current&&!__privateGet(this,_isReleasedFromStart).current&&__privateMethod(this,_ScrollSegmentElement_instances,releaseFromStartListener_fn).call(this),fscrollValue<__privateGet(this,_finish)?__privateGet(this,_isReleasedFromFinish).current&&!__privateGet(this,_isCapturedFromFinish).current&&__privateMethod(this,_ScrollSegmentElement_instances,captureFromFinishListener_fn).call(this):__privateGet(this,_isCapturedFromStart).current&&!__privateGet(this,_isReleasedFromFinish).current&&__privateMethod(this,_ScrollSegmentElement_instances,releaseFromFinishListener_fn).call(this)),fscrollValue>=__privateGet(this,_start)&&fscrollValue<__privateGet(this,_finish)?__privateGet(this,_isCaptured).current||__privateMethod(this,_ScrollSegmentElement_instances,captureListener_fn).call(this):__privateGet(this,_isCaptured).current&&(__privateGet(this,_passed).set(math.step(__privateGet(this,_distance2)/2,__privateGet(this,_passed).target,0,__privateGet(this,_distance2))),__privateMethod(this,_ScrollSegmentElement_instances,releaseListener_fn).call(this)),__privateGet(this,_isCapturedOnce)&&__privateGet(this,_captureOnceCSSProperty).current&&(__privateGet(this,_capturedCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_capturedCSSProperty).current),__privateSet(this,_isDisabled,!0))}disable(){this.style.cssText="",__privateSet(this,_directionPosition,0),__privateSet(this,_directionSize,0),__privateGet(this,_passed).reset(),__privateSet(this,_progress,0),__privateSet(this,_start,0),__privateSet(this,_distance2,0),__privateSet(this,_finish,0),__privateSet(this,_isResized,!1),__privateGet(this,_isCaptured).current=!1,__privateGet(this,_isReleased).current=!1,__privateGet(this,_isCapturedFromStart).current=!1,__privateGet(this,_isReleasedFromStart).current=!1,__privateGet(this,_isCapturedFromFinish).current=!1,__privateGet(this,_isReleasedFromFinish).current=!1,__privateSet(this,_isCapturedOnce,!1),__privateSet(this,_isDisabled,!0),__privateMethod(this,_ScrollSegmentElement_instances,removeCurrentMarks_fn).call(this)}enable(){__privateSet(this,_isDisabled,!1)}connectedCallback(){super.connectedCallback(),__privateGet(this,_isCaptured).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),__privateGet(this,_isCapturedFromStart).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),__privateGet(this,_isCapturedFromFinish).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),__privateGet(this,_isReleased).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),__privateGet(this,_isReleasedFromStart).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),__privateGet(this,_isReleasedFromFinish).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),__privateGet(this,_dampingCSSProperty2).observe(),__privateGet(this,_massCSSProperty2).observe(),__privateGet(this,_stiffnessCSSProperty2).observe(),__privateGet(this,_targetCSSProperty).observe(),__privateGet(this,_disabledCSSProperty2).observe(),__privateGet(this,_distanceOffsetCSSProperty).observe(),__privateGet(this,_startOffsetCSSProperty).observe(),__privateGet(this,_captureOnceCSSProperty).observe(),__privateGet(this,_capturedCSSProperty).observe(),__privateGet(this,_releasedCSSProperty).observe(),__privateGet(this,_capturedFromStartCSSProperty).observe(),__privateGet(this,_capturedFromFinishCSSProperty).observe(),__privateGet(this,_releasedFromStartCSSProperty).observe(),__privateGet(this,_releasedFromFinishCSSProperty).observe(),__privateGet(this,_passedVarCSSProperty).observe(),__privateGet(this,_progressVarCSSProperty).observe(),__privateGet(this,_progressArcVarCSSProperty).observe(),__privateGet(this,_progressArcMultCSSProperty).observe(),__privateGet(this,_animationVarTypeCSSProperty).observe(),__privateGet(this,_distanceVarCSSProperty).observe(),__privateGet(this,_startVarCSSProperty).observe(),__privateGet(this,_finishVarCSSProperty).observe();let isConnected=!1;this.findAnotherScrollEntries(),__privateGet(this,_disabledCSSProperty2).current||this.enable(),__privateGet(this,_dampingCSSProperty2).subscribe(e=>{__privateGet(this,_passed).damping=e.current}),__privateGet(this,_massCSSProperty2).subscribe(e=>{__privateGet(this,_passed).mass=e.current}),__privateGet(this,_stiffnessCSSProperty2).subscribe(e=>{__privateGet(this,_passed).stiffness=e.current}),__privateGet(this,_targetCSSProperty).subscribe(e=>{e.previous&&__privateMethod(this,_ScrollSegmentElement_instances,removeCurrentMarks_fn).call(this),e.current?e.current==="parent"?__privateSet(this,_targetElement,this.parentElement||this):__privateSet(this,_targetElement,document.querySelector(e.current)||this):__privateSet(this,_targetElement,this)}),__privateGet(this,_disabledCSSProperty2).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),__privateGet(this,_startOffsetCSSProperty).subscribe(()=>{isConnected&&!__privateGet(this,_isDisabled)&&this.resize()}),__privateGet(this,_distanceOffsetCSSProperty).subscribe(()=>{isConnected&&!__privateGet(this,_isDisabled)&&this.resize()}),__privateGet(this,_capturedCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_capturedFromStartCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_capturedFromFinishCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_releasedCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_releasedFromStartCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_releasedFromFinishCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_captureOnceCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||!v.current&&v.previous&&(this.resize(),this.enable())}),__privateGet(this,_passedVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,this.passed.current))}),__privateGet(this,_progressVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,__privateGet(this,_progress)))}),__privateGet(this,_progressArcVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,this.progressArc))}),__privateGet(this,_progressArcMultCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||__privateMethod(this,_ScrollSegmentElement_instances,updateProgress_fn).call(this)}),__privateGet(this,_startVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,__privateGet(this,_start)))}),__privateGet(this,_finishVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,__privateGet(this,_finish)))}),__privateGet(this,_distanceVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,__privateGet(this,_distance2)))}),__privateGet(this,_passed).subscribe(e=>{if(__privateGet(this,_skipPassNotification)){__privateSet(this,_skipPassNotification,!1);return}__privateMethod(this,_ScrollSegmentElement_instances,updateProgress_fn).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),windowResizer_index.windowResizer.subscribe(__privateGet(this,_resizeListener3),order_index.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(__privateGet(this,_tickListener)),isConnected=!0}disconnectedCallback(){windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener3)),this.scrollElement.offScroll(__privateGet(this,_tickListener)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),__privateGet(this,_dampingCSSProperty2).close(),__privateGet(this,_massCSSProperty2).close(),__privateGet(this,_stiffnessCSSProperty2).close(),__privateGet(this,_targetCSSProperty).close(),__privateGet(this,_disabledCSSProperty2).close(),__privateGet(this,_distanceOffsetCSSProperty).close(),__privateGet(this,_startOffsetCSSProperty).close(),__privateGet(this,_captureOnceCSSProperty).close(),__privateGet(this,_capturedCSSProperty).close(),__privateGet(this,_releasedCSSProperty).close(),__privateGet(this,_capturedFromStartCSSProperty).close(),__privateGet(this,_capturedFromFinishCSSProperty).close(),__privateGet(this,_releasedFromStartCSSProperty).close(),__privateGet(this,_releasedFromFinishCSSProperty).close(),__privateGet(this,_passedVarCSSProperty).close(),__privateGet(this,_progressVarCSSProperty).close(),__privateGet(this,_progressArcVarCSSProperty).close(),__privateGet(this,_progressArcMultCSSProperty).close(),__privateGet(this,_distanceVarCSSProperty).close(),__privateGet(this,_startVarCSSProperty).close(),__privateGet(this,_finishVarCSSProperty).close(),__privateGet(this,_isCaptured).close(),__privateGet(this,_isReleased).close(),__privateGet(this,_isCapturedFromStart).close(),__privateGet(this,_isReleasedFromStart).close(),__privateGet(this,_isCapturedFromFinish).close(),__privateGet(this,_isReleasedFromFinish).close(),this.disable(),__privateGet(this,_passed).close()}removeVar(name){name&&__privateGet(this,_targetElement).style.removeProperty(`--${name}`)}setVar(name,value){if(name){const v=typeof value=="number"?value.toFixed(6):value;__privateGet(this,_targetElement).style.setProperty(`--${name}`,v)}}getDistance(){return __privateGet(this,_directionSize)+__privateGet(this,_moverDirectionSize)}getStart(){return __privateGet(this,_directionPosition)-__privateGet(this,_moverDirectionSize)}};_dampingCSSProperty2=new WeakMap,_massCSSProperty2=new WeakMap,_stiffnessCSSProperty2=new WeakMap,_targetCSSProperty=new WeakMap,_disabledCSSProperty2=new WeakMap,_distanceOffsetCSSProperty=new WeakMap,_startOffsetCSSProperty=new WeakMap,_captureOnceCSSProperty=new WeakMap,_capturedCSSProperty=new WeakMap,_releasedCSSProperty=new WeakMap,_capturedFromStartCSSProperty=new WeakMap,_capturedFromFinishCSSProperty=new WeakMap,_releasedFromStartCSSProperty=new WeakMap,_releasedFromFinishCSSProperty=new WeakMap,_passedVarCSSProperty=new WeakMap,_progressVarCSSProperty=new WeakMap,_progressArcVarCSSProperty=new WeakMap,_progressArcMultCSSProperty=new WeakMap,_animationVarTypeCSSProperty=new WeakMap,_distanceVarCSSProperty=new WeakMap,_startVarCSSProperty=new WeakMap,_finishVarCSSProperty=new WeakMap,_isCaptured=new WeakMap,_isReleased=new WeakMap,_isCapturedFromStart=new WeakMap,_isReleasedFromStart=new WeakMap,_isCapturedFromFinish=new WeakMap,_isReleasedFromFinish=new WeakMap,_anotherScrollEntries=new WeakMap,_targetElement=new WeakMap,_directionPosition=new WeakMap,_directionSize=new WeakMap,_moverDirectionSize=new WeakMap,_passed=new WeakMap,_progress=new WeakMap,_start=new WeakMap,_distance2=new WeakMap,_finish=new WeakMap,_isResized=new WeakMap,_isCapturedOnce=new WeakMap,_isDisabled=new WeakMap,_skipPassNotification=new WeakMap,_ScrollSegmentElement_instances=new WeakSet,captureListener_fn=__name(function(){__privateGet(this,_isCaptured).current=!0,__privateGet(this,_isReleased).current=!1,__privateSet(this,_isCapturedOnce,!0),__privateGet(this,_releasedCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_releasedCSSProperty).current),__privateGet(this,_releasedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_releasedFromFinishCSSProperty).current),__privateGet(this,_releasedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_releasedFromFinishCSSProperty).current),__privateGet(this,_capturedCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_capturedCSSProperty).current)},"#captureListener"),releaseListener_fn=__name(function(){__privateGet(this,_isReleased).current=!0,__privateGet(this,_isCaptured).current=!1,__privateSet(this,_isCapturedOnce,!0),__privateGet(this,_capturedCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_capturedCSSProperty).current),__privateGet(this,_capturedFromStartCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_capturedFromStartCSSProperty).current),__privateGet(this,_capturedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_capturedFromFinishCSSProperty).current),__privateGet(this,_releasedCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_releasedCSSProperty).current)},"#releaseListener"),captureFromStartListener_fn=__name(function(){__privateGet(this,_isCaptured).current=!0,__privateGet(this,_isCapturedFromStart).current=!0,__privateGet(this,_isReleasedFromStart).current=!1,__privateGet(this,_capturedFromStartCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_capturedFromStartCSSProperty).current)},"#captureFromStartListener"),captureFromFinishListener_fn=__name(function(){__privateGet(this,_isCaptured).current=!0,__privateGet(this,_isCapturedFromFinish).current=!0,__privateGet(this,_isReleasedFromFinish).current=!1,__privateGet(this,_capturedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_capturedFromFinishCSSProperty).current)},"#captureFromFinishListener"),releaseFromStartListener_fn=__name(function(){__privateGet(this,_isReleased).current=!0,__privateGet(this,_isReleasedFromStart).current=!0,__privateGet(this,_isCapturedFromStart).current=!1,__privateGet(this,_releasedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_releasedFromFinishCSSProperty).current)},"#releaseFromStartListener"),releaseFromFinishListener_fn=__name(function(){__privateGet(this,_isReleased).current=!0,__privateGet(this,_isReleasedFromFinish).current=!0,__privateGet(this,_isCapturedFromFinish).current=!1,__privateGet(this,_releasedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_releasedFromFinishCSSProperty).current)},"#releaseFromFinishListener"),_resizeListener3=new WeakMap,_tickListener=new WeakMap,updateProgress_fn=__name(function(){const passedValue=__privateGet(this,_passed)[__privateGet(this,_animationVarTypeCSSProperty).current];this.setVar(__privateGet(this,_passedVarCSSProperty).current,passedValue),__privateSet(this,_progress,passedValue/__privateGet(this,_distance2)||0),this.setVar(__privateGet(this,_progressVarCSSProperty).current,__privateGet(this,_progress)),__privateGet(this,_progressArcVarCSSProperty).current&&this.setVar(__privateGet(this,_progressArcVarCSSProperty).current,this.progressArc)},"#updateProgress"),handleClassSetting_fn=__name(function(e){if(__privateGet(this,_isDisabled)){e.previous&&__privateGet(this,_targetElement).classList.remove(e.previous),e.current&&__privateGet(this,_targetElement).classList.remove(e.current);return}e.current&&__privateGet(this,_isCaptured).current?(e.previous&&__privateGet(this,_targetElement).classList.remove(e.previous),__privateGet(this,_targetElement).classList.add(e.current)):!e.current&&e.previous&&__privateGet(this,_targetElement).classList.remove(e.previous)},"#handleClassSetting"),removeClasses_fn=__name(function(...className){className.forEach(c=>{c&&__privateGet(this,_targetElement).classList.remove(c)})},"#removeClasses"),removeVars_fn=__name(function(...vars){vars.forEach(v=>{v&&__privateGet(this,_targetElement).style.removeProperty(`--${v}`)})},"#removeVars"),removeCurrentMarks_fn=__name(function(){__privateMethod(this,_ScrollSegmentElement_instances,removeClasses_fn).call(this,__privateGet(this,_capturedCSSProperty).current,__privateGet(this,_capturedFromStartCSSProperty).current,__privateGet(this,_capturedFromFinishCSSProperty).current,__privateGet(this,_releasedCSSProperty).current,__privateGet(this,_releasedFromStartCSSProperty).current,__privateGet(this,_releasedFromFinishCSSProperty).current),__privateMethod(this,_ScrollSegmentElement_instances,removeVars_fn).call(this,__privateGet(this,_passedVarCSSProperty).current,__privateGet(this,_progressVarCSSProperty).current,__privateGet(this,_progressArcVarCSSProperty).current,__privateGet(this,_distanceVarCSSProperty).current,__privateGet(this,_startVarCSSProperty).current,__privateGet(this,_finishVarCSSProperty).current)},"#removeCurrentMarks"),__name(_ScrollSegmentElement,"ScrollSegmentElement");let ScrollSegmentElement=_ScrollSegmentElement;intersector_index.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ScrollSegmentElement);const _ScrollSectionButtonElement=class _ScrollSectionButtonElement extends ScrollButtonElement{handleClick(options){this.scrollElement.setPosition(this.scrollElement.vertical?layout.getCumulativeOffsetTop(this):layout.getCumulativeOffsetLeft(this),options)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}};__name(_ScrollSectionButtonElement,"ScrollSectionButtonElement");let ScrollSectionButtonElement=_ScrollSectionButtonElement;intersector_index.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",ScrollSectionButtonElement);var _counterChangeListener2;const _ScrollCounterElement=class _ScrollCounterElement extends ScrollUserElement{constructor(){super(...arguments);__privateAdd(this,_counterChangeListener2,__name(()=>{const value=this.scrollElement.counter.current+1,pad=parseInt(this.getAttribute("pad")||"0");this.textContent=value.toString().padStart(pad,"0")},"#counterChangeListener"))}connectedCallback(){return __async(this,null,function*(){__superGet(_ScrollCounterElement.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(__privateGet(this,_counterChangeListener2))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(__privateGet(this,_counterChangeListener2))}};_counterChangeListener2=new WeakMap,__name(_ScrollCounterElement,"ScrollCounterElement");let ScrollCounterElement=_ScrollCounterElement;intersector_index.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",ScrollCounterElement);var _sectionsChangeListener2;const _ScrollTotalElement=class _ScrollTotalElement extends ScrollUserElement{constructor(){super(...arguments);__privateAdd(this,_sectionsChangeListener2,__name(()=>{const value=this.scrollElement.limit+1,pad=parseInt(this.getAttribute("pad")||"0");this.textContent=value.toString().padStart(pad,"0")},"#sectionsChangeListener"))}connectedCallback(){return __async(this,null,function*(){__superGet(_ScrollTotalElement.prototype,this,"connectedCallback").call(this),this.scrollElement.sectionsInViewCSSProperty.subscribe(__privateGet(this,_sectionsChangeListener2)),this.scrollElement.addEventListener("scrollSectionsChange",__privateGet(this,_sectionsChangeListener2)),__privateGet(this,_sectionsChangeListener2).call(this)})}disconnectedCallback(){this.scrollElement.sectionsInViewCSSProperty.unsubscribe(__privateGet(this,_sectionsChangeListener2)),this.scrollElement.removeEventListener("scrollSectionsChange",__privateGet(this,_sectionsChangeListener2))}};_sectionsChangeListener2=new WeakMap,__name(_ScrollTotalElement,"ScrollTotalElement");let ScrollTotalElement=_ScrollTotalElement;intersector_index.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",ScrollTotalElement);exports.ScrollBulletButtonsElement=ScrollBulletButtonsElement;exports.ScrollCounterElement=ScrollCounterElement;exports.ScrollElement=ScrollElement;exports.ScrollScrollbarElement=ScrollScrollbarElement;exports.ScrollSectionButtonElement=ScrollSectionButtonElement;exports.ScrollSegmentElement=ScrollSegmentElement;exports.ScrollSetButtonElement=ScrollSetButtonElement;exports.ScrollStepButtonElement=ScrollStepButtonElement;exports.ScrollTotalElement=ScrollTotalElement;
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty;var __getOwnPropSymbols=Object.getOwnPropertySymbols,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__reflectGet=Reflect.get;var __typeError=msg=>{throw TypeError(msg)};var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);var __superGet=(cls,obj,key)=>__reflectGet(__getProtoOf(cls),key,obj);var __async=(__this,__arguments,generator)=>new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Store=require("../Store-DZnOrofs.cjs"),intersector_index=require("../index-DZ44osDT.cjs"),easings=require("../easings-BWq0pPLq.cjs"),element=require("../element-CqD0jqBJ.cjs"),events=require("../events-UlGk63iC.cjs"),_function=require("../function-H4b_gTg6.cjs"),layout=require("../layout-CnGLl7oe.cjs"),math=require("../math-C-knY2TL.cjs"),number=require("../number-Bu4sGvW7.cjs"),stylesheet$1=require("../stylesheet-xM7sMeuo.cjs"),order_index=require("../order/index.cjs"),Damped=require("../Damped-BHm2IuyN.cjs"),Tweened=require("../Tweened-3UYSwrvs.cjs"),DragControls=require("../DragControls-XC4E7seK.cjs"),cssProperty_index=require("../css-property/index.cjs"),cssUnitParser_index=require("../css-unit-parser/index.cjs"),Viewport=require("../Viewport-D26fEJOk.cjs"),elementResizer_index=require("../element-resizer/index.cjs"),scrollEntries_index=require("../scroll-entries/index.cjs"),windowResizer_index=require("../window-resizer/index.cjs");require("construct-style-sheets-polyfill");const gestures=require("../gestures-DtYbQr49.cjs"),dom=require("../dom-B40i6NXw.cjs");var _element,_index,_scrollElement,_width,_height,_size,_position,_currentMark,_transformPosition,_ScrollSection_instances,setVar_fn;const _ScrollSection=class _ScrollSection{constructor(element2,index,scrollElement){__privateAdd(this,_ScrollSection_instances);__privateAdd(this,_element);__privateAdd(this,_index);__privateAdd(this,_scrollElement);__privateAdd(this,_width,0);__privateAdd(this,_height,0);__privateAdd(this,_size,0);__privateAdd(this,_position,0);__privateAdd(this,_currentMark,null);__privateAdd(this,_transformPosition,0);__privateSet(this,_element,element2),__privateSet(this,_index,index),__privateSet(this,_scrollElement,scrollElement),scrollEntries_index.scrollEntries.register(__privateGet(this,_element)),this.setIndex(__privateGet(this,_index))}get element(){return __privateGet(this,_element)}get index(){return __privateGet(this,_index)}get size(){return __privateGet(this,_size)}get width(){return __privateGet(this,_width)}get height(){return __privateGet(this,_height)}get position(){return __privateGet(this,_position)}get transformPosition(){return __privateGet(this,_transformPosition)}destroy(){scrollEntries_index.scrollEntries.unregister(__privateGet(this,_element)),this.unsetTransform()}unsetTransform(){__privateGet(this,_element).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setOffsetIndex(null),this.setMiddle(!1),this.setSize()}setSize(value){value?(__privateGet(this,_element).style.setProperty("--size",value+"px"),__privateGet(this,_scrollElement).axisCSSProperty.current==="x"?(__privateGet(this,_element).style.width=value+"px",__privateGet(this,_element).style.height=""):(__privateGet(this,_element).style.height=value+"px",__privateGet(this,_element).style.width="")):(__privateGet(this,_element).style.width="",__privateGet(this,_element).style.height="",__privateGet(this,_element).style.removeProperty("--size"))}resize(){__privateSet(this,_width,__privateGet(this,_element).offsetWidth),__privateSet(this,_height,__privateGet(this,_element).offsetHeight),__privateSet(this,_size,__privateGet(this,_scrollElement).vertical?__privateGet(this,_element).offsetHeight:__privateGet(this,_element).offsetWidth),__privateSet(this,_position,__privateGet(this,_scrollElement).vertical?layout.getCumulativeOffsetTop(__privateGet(this,_element)):layout.getCumulativeOffsetLeft(__privateGet(this,_element))),__privateSet(this,_position,__privateGet(this,_position)-__privateGet(this,_scrollElement).contentPosition)}transform(){const cssOffset=__privateGet(this,_scrollElement).shiftSectionPositionCSSProperty.current;let offset=cssOffset;const distanceAddition=__privateGet(this,_scrollElement).viewportSize*__privateGet(this,_scrollElement).sectionDistanceScaleCSSProperty.current;__privateGet(this,_scrollElement).loopCSSProperty.current&&__privateGet(this,_position)+__privateGet(this,_size)<=__privateGet(this,_scrollElement).currentScrollValue-cssOffset/2&&(offset=(__privateGet(this,_scrollElement).distance-cssOffset)*-1-__privateGet(this,_scrollElement).gap),scrollEntries_index.scrollEntries.update(__privateGet(this,_element),__privateGet(this,_scrollElement).axisCSSProperty.current,offset);const valueToClamp=__privateGet(this,_scrollElement).currentScrollValue+offset,min=__privateGet(this,_position)-__privateGet(this,_scrollElement).viewportSize-distanceAddition,max=__privateGet(this,_position)+__privateGet(this,_size)+distanceAddition,value=number.preciseNumber(math.clamp(valueToClamp,min,max),3);__privateSet(this,_transformPosition,value*-1),__privateGet(this,_scrollElement).vertical?__privateGet(this,_element).style.transform=`translate3d(0px, ${__privateGet(this,_transformPosition)}px, 0px)`:__privateGet(this,_element).style.transform=`translate3d(${__privateGet(this,_transformPosition)}px, 0px, 0px)`}setMark(mark){__privateGet(this,_currentMark)!==mark&&(__privateGet(this,_currentMark)&&__privateGet(this,_element).classList.remove(__privateGet(this,_currentMark)),mark&&__privateGet(this,_element).classList.add(mark),__privateSet(this,_currentMark,mark),events.dispatchEvent(__privateGet(this,_element),"scrollSectionMarkChange",{composed:!0,detail:{mark:__privateGet(this,_currentMark)},custom:!0}))}setMiddle(bool){__privateGet(this,_element).classList.toggle("middle",bool)}setIndex(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"index",value)}setCurrentIndex(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"current-index",value)}setCurrentIndexArc(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"current-index-arc",value)}setOffsetIndex(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"offset-index",value)}setCurrentIndexArcAbs(value){__privateMethod(this,_ScrollSection_instances,setVar_fn).call(this,"current-index-arc-abs",value)}};_element=new WeakMap,_index=new WeakMap,_scrollElement=new WeakMap,_width=new WeakMap,_height=new WeakMap,_size=new WeakMap,_position=new WeakMap,_currentMark=new WeakMap,_transformPosition=new WeakMap,_ScrollSection_instances=new WeakSet,setVar_fn=__name(function(name,value){value!==null?(__privateGet(this,_element).style.setProperty(`--${name}`,value.toString()),__privateGet(this,_element).setAttribute(`data-${name}`,value.toString())):(__privateGet(this,_element).style.removeProperty(`--${name}`),__privateGet(this,_element).removeAttribute(`data-${name}`))},"#setVar"),__name(_ScrollSection,"ScrollSection");let ScrollSection=_ScrollSection;const stylesheet=stylesheet$1.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var _damped,_controlsCSSProperty,_axisCSSProperty,_reverseCSSProperty,_directionCSSProperty,_pagesCSSProperty,_splitCSSProperty,_sectionalCSSProperty,_easingCSSProperty,_durationCSSProperty,_autoSizeCSSProperty,_wheelMaxDeltaCSSProperty,_dragInertionCSSProperty,_sectionsInViewCSSProperty,_loopCSSProperty,_dampingCSSProperty,_massCSSProperty,_stiffnessCSSProperty,_mouseDragCSSProperty,_sectionDistanceScaleCSSProperty,_startSectionCSSProperty,_autoplayCSSProperty,_autoplayPauseDurationCSSProperty,_autoplayUserDirectionCSSProperty,_classesCSSProperty,_currentIndexStartOffsetCSSProperty,_currentIndexEndOffsetCSSProperty,_shiftSectionPositionCSSProperty,_focusDelayCSSProperty,_focusDurationCSSProperty,_shiftLimitCSSProperty,_disabledCSSProperty,_hibernatedCSSProperty,_contentWrapperElement,_contentElement,_slotElement,_sections,_visibleSections,_position2,_contentPosition,_viewportSize,_scrollSize,_gap,_wheelControls,_keyboardControls,_dragControls,_autoplayControls,_counter,_overscroll,_distance,_hasOverflow,_disabled,_hibernated,_focusTimeoutId,_tweenTimeoutId,_setTween,_isGrabbing,_scrollLine,_isConnected,_mutationObserver,_currentSections,_skipNextResize,_maxSectionSizeTimeoutId,_ScrollElement_instances,updateAxis_fn,split_fn,unsplit_fn,disable_fn,enable_fn,hibernate_fn,awake_fn,_resizeListener,_animatedChangeListener,clampCounter_fn,_notAutoplayControlListener,_controlsListener,processAutoplay_fn,getScrollValue_fn,updateMarks_fn,updateIndexes_fn,_updateMaxSectionsSize,getNearestSectionIndex_fn,_connectListener;const _ScrollElement=class _ScrollElement extends HTMLElement{constructor(){super();__privateAdd(this,_ScrollElement_instances);__privateAdd(this,_damped,null);__privateAdd(this,_controlsCSSProperty,new cssProperty_index.CSSProperty(this,"--controls",!0));__privateAdd(this,_axisCSSProperty,new cssProperty_index.CSSProperty(this,"--axis","y"));__privateAdd(this,_reverseCSSProperty,new cssProperty_index.CSSProperty(this,"--reverse",!1));__privateAdd(this,_directionCSSProperty,new cssProperty_index.CSSProperty(this,"--direction",0));__privateAdd(this,_pagesCSSProperty,new cssProperty_index.CSSProperty(this,"--pages",0,{validate:__name(v=>Math.max(0,v-1),"validate")}));__privateAdd(this,_splitCSSProperty,new cssProperty_index.CSSProperty(this,"--split",!1));__privateAdd(this,_sectionalCSSProperty,new cssProperty_index.CSSProperty(this,"--sectional",!1));__privateAdd(this,_easingCSSProperty,new cssProperty_index.CSSProperty(this,"--tween-easing",!1));__privateAdd(this,_durationCSSProperty,new cssProperty_index.CSSProperty(this,"--tween-duration",!1));__privateAdd(this,_autoSizeCSSProperty,new cssProperty_index.CSSProperty(this,"--auto-size",!1));__privateAdd(this,_wheelMaxDeltaCSSProperty,new cssProperty_index.CSSProperty(this,"--wheel-max-delta",!1));__privateAdd(this,_dragInertionCSSProperty,new cssProperty_index.CSSProperty(this,"--drag-inertion",1));__privateAdd(this,_sectionsInViewCSSProperty,new cssProperty_index.CSSProperty(this,"--sections-in-view",1));__privateAdd(this,_loopCSSProperty,new cssProperty_index.CSSProperty(this,"--loop",!1));__privateAdd(this,_dampingCSSProperty,new cssProperty_index.CSSProperty(this,"--damping",20));__privateAdd(this,_massCSSProperty,new cssProperty_index.CSSProperty(this,"--mass",0));__privateAdd(this,_stiffnessCSSProperty,new cssProperty_index.CSSProperty(this,"--stiffness",0));__privateAdd(this,_mouseDragCSSProperty,new cssProperty_index.CSSProperty(this,"--mouse-drag",!1));__privateAdd(this,_sectionDistanceScaleCSSProperty,new cssProperty_index.CSSProperty(this,"--section-distance-scale",.5));__privateAdd(this,_startSectionCSSProperty,new cssProperty_index.CSSProperty(this,"--start-section",0));__privateAdd(this,_autoplayCSSProperty,new cssProperty_index.CSSProperty(this,"--autoplay",0));__privateAdd(this,_autoplayPauseDurationCSSProperty,new cssProperty_index.CSSProperty(this,"--autoplay-pause-duration",0));__privateAdd(this,_autoplayUserDirectionCSSProperty,new cssProperty_index.CSSProperty(this,"--autoplay-user-direction",!1));__privateAdd(this,_classesCSSProperty,new cssProperty_index.CSSProperty(this,"--classes",!1));__privateAdd(this,_currentIndexStartOffsetCSSProperty,new cssProperty_index.CSSProperty(this,"--current-index-start-offset",0));__privateAdd(this,_currentIndexEndOffsetCSSProperty,new cssProperty_index.CSSProperty(this,"--current-index-end-offset",0));__privateAdd(this,_shiftSectionPositionCSSProperty,new cssProperty_index.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));__privateAdd(this,_focusDelayCSSProperty,new cssProperty_index.CSSProperty(this,"--focus-delay",0));__privateAdd(this,_focusDurationCSSProperty,new cssProperty_index.CSSProperty(this,"--focus-duration",3e3));__privateAdd(this,_shiftLimitCSSProperty,new cssProperty_index.CSSProperty(this,"--shift-limit",0));__privateAdd(this,_disabledCSSProperty,new cssProperty_index.CSSProperty(this,"--disabled",!1));__privateAdd(this,_hibernatedCSSProperty,new cssProperty_index.CSSProperty(this,"--hibernate",!1));__privateAdd(this,_contentWrapperElement,null);__privateAdd(this,_contentElement,null);__privateAdd(this,_slotElement,null);__privateAdd(this,_sections,[]);__privateAdd(this,_visibleSections,[]);__privateAdd(this,_position2,0);__privateAdd(this,_contentPosition,0);__privateAdd(this,_viewportSize,0);__privateAdd(this,_scrollSize,0);__privateAdd(this,_gap,0);__privateAdd(this,_wheelControls,null);__privateAdd(this,_keyboardControls,null);__privateAdd(this,_dragControls,null);__privateAdd(this,_autoplayControls,null);__privateAdd(this,_counter,new Store.Store(0));__privateAdd(this,_overscroll,0);__privateAdd(this,_distance,0);__privateAdd(this,_hasOverflow,!1);__privateAdd(this,_disabled,!0);__privateAdd(this,_hibernated,!0);__privateAdd(this,_focusTimeoutId);__privateAdd(this,_tweenTimeoutId);__privateAdd(this,_setTween,new Tweened.Tweened);__privateAdd(this,_isGrabbing,!1);__privateAdd(this,_scrollLine,null);__privateAdd(this,_isConnected,!1);__privateAdd(this,_mutationObserver,null);__privateAdd(this,_currentSections,[]);__privateAdd(this,_skipNextResize,!1);__privateAdd(this,_maxSectionSizeTimeoutId);__privateAdd(this,_resizeListener,__name(e=>{if(e&&__privateGet(this,_skipNextResize)){__privateSet(this,_skipNextResize,!1);return}this.resize()},"#resizeListener"));__privateAdd(this,_animatedChangeListener,__name(()=>{if(!__privateGet(this,_hasOverflow)||__privateGet(this,_hibernated)||__privateGet(this,_disabled))return;const currentScrollValue=this.currentScrollValue;if(__privateSet(this,_overscroll,Math.max(0,currentScrollValue-__privateGet(this,_scrollSize))),__privateGet(this,_visibleSections).length){for(let i=0;i<__privateGet(this,_sections).length;i++)__privateGet(this,_sections)[i].transform();(__privateGet(this,_isGrabbing)||!__privateGet(this,_sectionalCSSProperty).current)&&(__privateGet(this,_counter).current=__privateMethod(this,_ScrollElement_instances,getNearestSectionIndex_fn).call(this))}else this.vertical?__privateGet(this,_contentElement).style.transform=`translate3d(0px, ${currentScrollValue*-1}px, 0px)`:__privateGet(this,_contentElement).style.transform=`translate3d(${currentScrollValue*-1}px, 0px, 0px)`;__privateMethod(this,_ScrollElement_instances,updateIndexes_fn).call(this),scrollEntries_index.scrollEntries.update(this,__privateGet(this,_axisCSSProperty).current,currentScrollValue)},"#animatedChangeListener"));__privateAdd(this,_notAutoplayControlListener,__name((type,value)=>{__privateGet(this,_controlsCSSProperty).current&&(__privateMethod(this,_ScrollElement_instances,processAutoplay_fn).call(this,Math.sign(value)||1),__privateGet(this,_controlsListener).call(this,type,value))},"#notAutoplayControlListener"));__privateAdd(this,_controlsListener,__name((type,value)=>{if(!__privateGet(this,_tweenTimeoutId)){if(__privateGet(this,_directionCSSProperty).current){if(__privateGet(this,_directionCSSProperty).current<0&&value>0)return;if(__privateGet(this,_directionCSSProperty).current>0&&value<0)return}if(!__privateGet(this,_autoplayCSSProperty).current&&__privateGet(this,_focusDelayCSSProperty).current&&(clearInterval(__privateGet(this,_focusTimeoutId)),__privateSet(this,_focusTimeoutId,setTimeout(()=>{const section=__privateGet(this,_visibleSections)[__privateMethod(this,_ScrollElement_instances,getNearestSectionIndex_fn).call(this)];section&&this.scrollToSection(section.index,{tween:{duration:__privateGet(this,_focusDurationCSSProperty).current,easing:easings.easeInOutExpo}})},__privateGet(this,_focusDelayCSSProperty).current))),!(type.includes("drag")&&!Viewport.device.isTouch&&!__privateGet(this,_mouseDragCSSProperty).current)){if(__privateGet(this,_sectionalCSSProperty).current&&type!=="drag"){const direction=Math.sign(value);__privateGet(this,_visibleSections).length?__privateGet(this,_isGrabbing)?this.scrollToSection(__privateMethod(this,_ScrollElement_instances,getNearestSectionIndex_fn).call(this,!0)):this.shiftSections(direction,{tween:__privateGet(this,_easingCSSProperty).current||__privateGet(this,_durationCSSProperty).current?{easing:__privateGet(this,_easingCSSProperty).current||"easeInOutCubic",duration:__privateGet(this,_durationCSSProperty).current||500}:void 0}):__privateGet(this,_damped).shift(direction*__privateGet(this,_viewportSize))}else __privateGet(this,_damped).shift(value);__privateSet(this,_isGrabbing,type==="drag")}}},"#controlsListener"));__privateAdd(this,_updateMaxSectionsSize,_function.debounce(()=>{const maxSectionSize=__privateGet(this,_currentSections).reduce((p,c)=>{const s=this.vertical?c.width:c.height;return s>p?s:p},0);clearTimeout(__privateGet(this,_maxSectionSizeTimeoutId)),__privateSet(this,_skipNextResize,!0),this.style.setProperty("--max-section-size",""),__privateSet(this,_maxSectionSizeTimeoutId,setTimeout(()=>{__privateSet(this,_skipNextResize,!0),this.style.setProperty("--max-section-size",maxSectionSize+"px")},10))},20));__privateAdd(this,_connectListener,__name(()=>{__privateSet(this,_isConnected,!0),this.hibernatedCSSProperty.current||__privateMethod(this,_ScrollElement_instances,awake_fn).call(this),elementResizer_index.elementResizer.subscribe(this,__privateGet(this,_resizeListener)),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_connectListener))},"#connectListener"));if(intersector_index.isBrowser){const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[stylesheet];const staticElement=document.createElement("div");staticElement.className="static",staticElement.innerHTML='<slot name="static"></slot>',shadow.appendChild(staticElement),__privateSet(this,_contentWrapperElement,document.createElement("div")),__privateGet(this,_contentWrapperElement).className="content-wrapper",__privateSet(this,_contentElement,document.createElement("div")),__privateGet(this,_contentElement).className="content",__privateSet(this,_slotElement,document.createElement("slot")),__privateGet(this,_contentElement).appendChild(__privateGet(this,_slotElement)),__privateGet(this,_contentWrapperElement).appendChild(__privateGet(this,_contentElement)),shadow.appendChild(__privateGet(this,_contentWrapperElement)),__privateSet(this,_mutationObserver,new MutationObserver(_function.debounce(()=>{this.tryResplit()},10)))}}get damped(){return __privateGet(this,_damped)}get controlsCSSProperty(){return __privateGet(this,_controlsCSSProperty)}get axisCSSProperty(){return __privateGet(this,_axisCSSProperty)}get reverseCSSProperty(){return __privateGet(this,_reverseCSSProperty)}get directionCSSProperty(){return __privateGet(this,_directionCSSProperty)}get pagesCSSProperty(){return __privateGet(this,_pagesCSSProperty)}get splitCSSProperty(){return __privateGet(this,_splitCSSProperty)}get sectionalCSSProperty(){return __privateGet(this,_sectionalCSSProperty)}get easingCSSProperty(){return __privateGet(this,_easingCSSProperty)}get durationCSSProperty(){return __privateGet(this,_durationCSSProperty)}get autoSizeCSSProperty(){return __privateGet(this,_autoSizeCSSProperty)}get wheelMaxDeltaCSSProperty(){return __privateGet(this,_wheelMaxDeltaCSSProperty)}get dragInertionCSSProperty(){return __privateGet(this,_dragInertionCSSProperty)}get sectionsInViewCSSProperty(){return __privateGet(this,_sectionsInViewCSSProperty)}get loopCSSProperty(){return __privateGet(this,_loopCSSProperty)}get dampingCSSProperty(){return __privateGet(this,_dampingCSSProperty)}get massCSSProperty(){return __privateGet(this,_massCSSProperty)}get stiffnessCSSProperty(){return __privateGet(this,_stiffnessCSSProperty)}get mouseDragCSSProperty(){return __privateGet(this,_mouseDragCSSProperty)}get sectionDistanceScaleCSSProperty(){return __privateGet(this,_sectionDistanceScaleCSSProperty)}get startSectionCSSProperty(){return __privateGet(this,_startSectionCSSProperty)}get autoplayCSSProperty(){return __privateGet(this,_autoplayCSSProperty)}get autoplayPauseDurationCSSProperty(){return __privateGet(this,_autoplayPauseDurationCSSProperty)}get autoplayUserDirectionCSSProperty(){return __privateGet(this,_autoplayUserDirectionCSSProperty)}get classesCSSProperty(){return __privateGet(this,_classesCSSProperty)}get currentIndexStartOffsetCSSProperty(){return __privateGet(this,_currentIndexStartOffsetCSSProperty)}get currentIndexEndOffsetCSSProperty(){return __privateGet(this,_currentIndexEndOffsetCSSProperty)}get shiftSectionPositionCSSProperty(){return __privateGet(this,_shiftSectionPositionCSSProperty)}get focusDelayCSSProperty(){return __privateGet(this,_focusDelayCSSProperty)}get focusDurationCSSProperty(){return __privateGet(this,_focusDurationCSSProperty)}get shiftLimitCSSProperty(){return __privateGet(this,_shiftLimitCSSProperty)}get disabledCSSProperty(){return __privateGet(this,_disabledCSSProperty)}get hibernatedCSSProperty(){return __privateGet(this,_hibernatedCSSProperty)}get currentScrollValue(){return __privateMethod(this,_ScrollElement_instances,getScrollValue_fn).call(this,"current")}get targetScrollValue(){return __privateMethod(this,_ScrollElement_instances,getScrollValue_fn).call(this,"target")}get contentWrapperElement(){return __privateGet(this,_contentWrapperElement)}get contentElement(){return __privateGet(this,_contentElement)}get sections(){return __privateGet(this,_sections)}get visibleSections(){return __privateGet(this,_visibleSections)}get position(){return __privateGet(this,_position2)}get contentPosition(){return __privateGet(this,_contentPosition)}get viewportSize(){return __privateGet(this,_viewportSize)}get scrollSize(){return __privateGet(this,_scrollSize)}get gap(){return __privateGet(this,_gap)}get counter(){return __privateGet(this,_counter)}get limit(){return Math.ceil(__privateGet(this,_visibleSections).length-__privateGet(this,_sectionsInViewCSSProperty).current+__privateGet(this,_shiftLimitCSSProperty).current)}get distance(){return __privateGet(this,_distance)}get loopDistance(){return __privateGet(this,_loopCSSProperty).current?__privateGet(this,_distance)+__privateGet(this,_gap):__privateGet(this,_distance)}get hasOverflow(){return __privateGet(this,_hasOverflow)}get overscroll(){return __privateGet(this,_overscroll)}get scrollLine(){return __privateGet(this,_scrollLine)}get vertical(){return __privateGet(this,_axisCSSProperty).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return __privateGet(this,_axisCSSProperty).current==="y"?0:__privateGet(this,_damped).distance}get scrollHeight(){return __privateGet(this,_axisCSSProperty).current==="x"?0:__privateGet(this,_damped).distance}tryResplit(){!__privateGet(this,_hibernated)&&(__privateGet(this,_loopCSSProperty).current||__privateGet(this,_splitCSSProperty).current||__privateGet(this,_loopCSSProperty).current||__privateGet(this,_autoSizeCSSProperty).current||__privateGet(this,_sectionalCSSProperty).current)&&__privateMethod(this,_ScrollElement_instances,split_fn).call(this)}onScroll(...parameters){return __privateGet(this,_damped).subscribe(...parameters)}offScroll(...parameters){__privateGet(this,_damped).unsubscribe(...parameters)}range(from,distance,margin=0){const start=from-margin,end=start+distance+margin*2;return this.currentProgress<start?0:this.currentProgress>end?1:(this.currentProgress-start)/(end-start)}curve(from,distance,margin=0){return Math.sin(this.range(from,distance,margin)*Math.PI)}visible(from,distance,margin=0){const start=from-margin,end=start+distance+margin*2;return this.currentProgress>=start&&this.currentProgress<=end}scrollToSection(sectionIndex,options){if(!__privateGet(this,_visibleSections).length||__privateGet(this,_hibernated)||__privateGet(this,_tweenTimeoutId))return;const previousCounter=__privateGet(this,_counter).current,newCounterValue=__privateMethod(this,_ScrollElement_instances,clampCounter_fn).call(this,sectionIndex);__privateGet(this,_isGrabbing)||(__privateGet(this,_counter).current=newCounterValue);const previousSection=__privateGet(this,_visibleSections)[previousCounter],currentSection=__privateGet(this,_visibleSections)[newCounterValue];if(previousSection&¤tSection){let shiftValue=0;const nearestSectionIndex=__privateMethod(this,_ScrollElement_instances,getNearestSectionIndex_fn).call(this),nearestSection=__privateGet(this,_visibleSections)[nearestSectionIndex];let scrolledFromNearestSection=nearestSection?this.targetScrollValue-nearestSection.position:0;__privateGet(this,_loopCSSProperty).current?newCounterValue===0&&previousCounter===__privateGet(this,_visibleSections).length-1?(shiftValue=__privateGet(this,_scrollSize)+__privateGet(this,_viewportSize)-previousSection.position+__privateGet(this,_gap),__privateGet(this,_isGrabbing)||(scrolledFromNearestSection=0)):newCounterValue===__privateGet(this,_visibleSections).length-1&&previousCounter===0?shiftValue=currentSection.position-(__privateGet(this,_scrollSize)+__privateGet(this,_viewportSize)+__privateGet(this,_gap)):shiftValue=currentSection.position-previousSection.position:shiftValue=currentSection.position-previousSection.position,this.shiftPosition(shiftValue-scrolledFromNearestSection,options)}}shiftSections(step,options){__privateGet(this,_visibleSections).length&&this.scrollToSection(__privateGet(this,_counter).current+step,options)}setPosition(value,options){__privateGet(this,_hibernated)||(__privateMethod(this,_ScrollElement_instances,processAutoplay_fn).call(this,Math.sign(value)||1),options!=null&&options.tween?(clearTimeout(__privateGet(this,_tweenTimeoutId)),__privateGet(this,_setTween).set(__privateGet(this,_damped).current,{equalize:!0}),__privateGet(this,_setTween).set(value,__spreadValues({},options.tween)),__privateSet(this,_tweenTimeoutId,setTimeout(()=>{__privateSet(this,_tweenTimeoutId,void 0)},options.tween.duration||0))):__privateGet(this,_damped).set(value,{equalize:(options==null?void 0:options.behaviour)==="instant"}))}shiftPosition(value,options){this.setPosition(__privateGet(this,_damped).target+value,options)}resize(){if(__privateGet(this,_hibernatedCSSProperty).current)return;__privateSet(this,_visibleSections,__privateGet(this,_sections).filter(s=>element.isElementVisible(s.element))),this.style.setProperty("--sections",__privateGet(this,_visibleSections).length.toString()),__privateGet(this,_damped).unlistenAnimationFrame();const prevProgress=this.currentScrollValue/__privateGet(this,_scrollSize)||0,prevCounter=__privateGet(this,_counter).current;if(__privateSet(this,_position2,this.vertical?layout.getCumulativeOffsetTop(this):layout.getCumulativeOffsetLeft(this)),__privateSet(this,_contentPosition,this.vertical?layout.getCumulativeOffsetTop(__privateGet(this,_contentElement)):layout.getCumulativeOffsetLeft(__privateGet(this,_contentElement))),__privateSet(this,_viewportSize,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?__privateSet(this,_gap,cssUnitParser_index.cssUnitParser.parse(getComputedStyle(__privateGet(this,_contentElement)).rowGap)):__privateSet(this,_gap,cssUnitParser_index.cssUnitParser.parse(getComputedStyle(__privateGet(this,_contentElement)).columnGap)),__privateGet(this,_autoSizeCSSProperty).current&&__privateGet(this,_visibleSections).length){const ivc=__privateGet(this,_sectionsInViewCSSProperty).current,sectionSize=(__privateGet(this,_viewportSize)-__privateGet(this,_gap)*(ivc-1))/ivc;__privateGet(this,_visibleSections).forEach(section=>{section.setSize(sectionSize)})}else __privateGet(this,_visibleSections).forEach(section=>{section.setSize()});if(__privateGet(this,_visibleSections).forEach(section=>{section.resize()}),__privateGet(this,_pagesCSSProperty).current){__privateSet(this,_scrollSize,__privateGet(this,_viewportSize)*__privateGet(this,_pagesCSSProperty).current);const contentSize=__privateGet(this,_scrollSize)+__privateGet(this,_viewportSize);this.vertical?(__privateGet(this,_contentElement).style.width=contentSize+"px",__privateGet(this,_contentElement).style.height="100%"):(__privateGet(this,_contentElement).style.height=contentSize+"px",__privateGet(this,_contentElement).style.width="100%")}else this.vertical?(__privateGet(this,_contentElement).style.width="100%",__privateGet(this,_contentElement).style.height="max-content",__privateSet(this,_scrollSize,__privateGet(this,_contentElement).offsetHeight-__privateGet(this,_viewportSize))):(__privateGet(this,_contentElement).style.width="max-content",__privateGet(this,_contentElement).style.height="100%",__privateSet(this,_scrollSize,__privateGet(this,_contentElement).offsetWidth-__privateGet(this,_viewportSize)));if(!__privateGet(this,_loopCSSProperty).current){const cs=getComputedStyle(this),padding=this.vertical?parseFloat(cs.paddingBlockStart)+parseFloat(cs.paddingBlockEnd):parseFloat(cs.paddingInlineStart)+parseFloat(cs.paddingInlineEnd);__privateSet(this,_scrollSize,__privateGet(this,_scrollSize)+padding),__privateGet(this,_damped).max=__privateGet(this,_scrollSize)}if(__privateGet(this,_loopCSSProperty).current&&__privateGet(this,_visibleSections).length){const lastSection=__privateGet(this,_visibleSections)[__privateGet(this,_visibleSections).length-1],lastSectionMax=lastSection.position+lastSection.size-__privateGet(this,_viewportSize),lastSectionMargin=__privateGet(this,_scrollSize)-lastSectionMax;__privateSet(this,_distance,lastSection.position+lastSection.size+lastSectionMargin)}else __privateSet(this,_distance,__privateGet(this,_scrollSize));if(__privateGet(this,_sectionalCSSProperty).current&&__privateGet(this,_visibleSections).length){const section=__privateGet(this,_visibleSections)[prevCounter];__privateGet(this,_damped).set(section.position,{equalize:!0})}else __privateGet(this,_damped).set(prevProgress*__privateGet(this,_scrollSize),{equalize:!0});__privateSet(this,_hasOverflow,(this.vertical?__privateGet(this,_contentElement).offsetHeight:__privateGet(this,_contentElement).offsetWidth)>__privateGet(this,_viewportSize)),this.classList.toggle("has-overflow",__privateGet(this,_hasOverflow)),__privateGet(this,_hasOverflow)?__privateGet(this,_disabledCSSProperty).current||__privateMethod(this,_ScrollElement_instances,enable_fn).call(this):__privateMethod(this,_ScrollElement_instances,disable_fn).call(this),__privateGet(this,_updateMaxSectionsSize).call(this),events.dispatchEvent(this,"scrollResize",{custom:!0}),__privateGet(this,_damped).notify()}connectedCallback(){scrollEntries_index.scrollEntries.register(this),__privateSet(this,_damped,new Damped.Damped(0,{damping:.01,min:0,order:order_index.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),__privateSet(this,_wheelControls,new DragControls.WheelControls({element:__privateGet(this,_contentElement)})),__privateGet(this,_wheelControls).changeEvent.subscribe(__privateGet(this,_notAutoplayControlListener)),__privateSet(this,_keyboardControls,new DragControls.KeyboardControls({element:this})),__privateGet(this,_keyboardControls).changeEvent.subscribe(__privateGet(this,_notAutoplayControlListener)),__privateSet(this,_dragControls,new DragControls.DragControls({element:__privateGet(this,_contentElement),rootElement:this})),__privateGet(this,_dragControls).changeEvent.subscribe(__privateGet(this,_notAutoplayControlListener)),__privateSet(this,_autoplayControls,new DragControls.AutoplayControls({culling:this})),__privateGet(this,_autoplayControls).changeEvent.subscribe(__privateGet(this,_controlsListener)),__privateGet(this,_axisCSSProperty).subscribe(()=>{__privateMethod(this,_ScrollElement_instances,updateAxis_fn).call(this)}),__privateGet(this,_reverseCSSProperty).subscribe(()=>{__privateMethod(this,_ScrollElement_instances,updateAxis_fn).call(this)}),__privateGet(this,_wheelMaxDeltaCSSProperty).subscribe(e=>{__privateGet(this,_wheelControls).axis=e.current?"max":__privateGet(this,_axisCSSProperty).current}),__privateGet(this,_dragInertionCSSProperty).subscribe(e=>{__privateGet(this,_dragControls).inertion=typeof e.current=="number"?e.current:1}),__privateGet(this,_pagesCSSProperty).subscribe(()=>{__privateGet(this,_isConnected)&&__privateGet(this,_resizeListener).call(this)}),__privateGet(this,_splitCSSProperty).subscribe(({current})=>{__privateGet(this,_isConnected)&&(current?__privateMethod(this,_ScrollElement_instances,split_fn).call(this):__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this))}),__privateGet(this,_sectionalCSSProperty).subscribe(e=>{__privateGet(this,_wheelControls).debounce=e.current,__privateGet(this,_dragControls).swipe=e.current,__privateGet(this,_autoplayControls).interval=e.current,__privateGet(this,_isConnected)&&(e.current&&!e.previous&&!__privateGet(this,_visibleSections).length?__privateMethod(this,_ScrollElement_instances,split_fn).call(this):!e.current&&e.previous&&__privateGet(this,_visibleSections).length&&__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this))}),__privateGet(this,_autoSizeCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&(__privateGet(this,_resizeListener).call(this),e.current&&!e.previous&&!__privateGet(this,_visibleSections).length?__privateMethod(this,_ScrollElement_instances,split_fn).call(this):!e.current&&e.previous&&__privateGet(this,_visibleSections).length&&__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this))}),__privateGet(this,_sectionsInViewCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&(__privateGet(this,_resizeListener).call(this),__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this))}),__privateGet(this,_loopCSSProperty).subscribe(e=>{e.current?(__privateGet(this,_isConnected)&&(__privateGet(this,_visibleSections).length||(__privateGet(this,_splitCSSProperty).current=!0)),__privateGet(this,_damped).max=1/0,__privateGet(this,_damped).min=-1/0):(__privateSet(this,_overscroll,0),__privateGet(this,_damped).max=__privateGet(this,_scrollSize),__privateGet(this,_damped).min=0),this.classList.toggle("loop",!!e.current)}),__privateGet(this,_dampingCSSProperty).subscribe(e=>{__privateGet(this,_damped).damping=e.current}),__privateGet(this,_massCSSProperty).subscribe(e=>{__privateGet(this,_damped).mass=e.current}),__privateGet(this,_stiffnessCSSProperty).subscribe(e=>{__privateGet(this,_damped).stiffness=e.current}),__privateGet(this,_autoplayCSSProperty).subscribe(e=>{__privateGet(this,_autoplayControls).speed=e.current,!__privateGet(this,_disabled)&&e.current&&!e.previous?__privateGet(this,_autoplayControls).connect():!e.current&&e.previous&&__privateGet(this,_autoplayControls).disconnect()}),__privateGet(this,_autoplayUserDirectionCSSProperty).subscribe(e=>{e.current||(__privateGet(this,_autoplayControls).direction=1)}),__privateGet(this,_classesCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this)}),__privateGet(this,_currentIndexStartOffsetCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&__privateGet(this,_classesCSSProperty).current&&__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this)}),__privateGet(this,_currentIndexEndOffsetCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&__privateGet(this,_classesCSSProperty).current&&__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this)}),__privateGet(this,_shiftSectionPositionCSSProperty).subscribe(e=>{__privateGet(this,_isConnected)&&__privateGet(this,_damped).notify()}),__privateGet(this,_damped).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),__privateGet(this,_counter).subscribe(e=>{__privateGet(this,_hibernated)||(__privateGet(this,_visibleSections).length&&__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this),this.style.setProperty("--counter",e.current+""))}),__privateGet(this,_setTween).subscribe(e=>{__privateGet(this,_setTween).isRunning.current&&__privateGet(this,_damped).set(e.current,{equalize:!0})}),__privateGet(this,_disabledCSSProperty).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),__privateMethod(this,_ScrollElement_instances,disable_fn).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),__privateMethod(this,_ScrollElement_instances,enable_fn).call(this))}),__privateGet(this,_hibernatedCSSProperty).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),__privateMethod(this,_ScrollElement_instances,hibernate_fn).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),__privateMethod(this,_ScrollElement_instances,awake_fn).call(this))}),__privateGet(this,_controlsCSSProperty).observe(),__privateGet(this,_axisCSSProperty).observe(),__privateGet(this,_reverseCSSProperty).observe(),__privateGet(this,_directionCSSProperty).observe(),__privateGet(this,_pagesCSSProperty).observe(),__privateGet(this,_splitCSSProperty).observe(),__privateGet(this,_sectionalCSSProperty).observe(),__privateGet(this,_easingCSSProperty).observe(),__privateGet(this,_durationCSSProperty).observe(),__privateGet(this,_autoSizeCSSProperty).observe(),__privateGet(this,_wheelMaxDeltaCSSProperty).observe(),__privateGet(this,_dragInertionCSSProperty).observe(),__privateGet(this,_sectionsInViewCSSProperty).observe(),__privateGet(this,_loopCSSProperty).observe(),__privateGet(this,_dampingCSSProperty).observe(),__privateGet(this,_massCSSProperty).observe(),__privateGet(this,_stiffnessCSSProperty).observe(),__privateGet(this,_mouseDragCSSProperty).observe(),__privateGet(this,_sectionDistanceScaleCSSProperty).observe(),__privateGet(this,_startSectionCSSProperty).observe(),__privateGet(this,_autoplayCSSProperty).observe(),__privateGet(this,_autoplayCSSProperty).observe(),__privateGet(this,_autoplayPauseDurationCSSProperty).observe(),__privateGet(this,_autoplayUserDirectionCSSProperty).observe(),__privateGet(this,_classesCSSProperty).observe(),__privateGet(this,_currentIndexStartOffsetCSSProperty).observe(),__privateGet(this,_currentIndexEndOffsetCSSProperty).observe(),__privateGet(this,_shiftSectionPositionCSSProperty).observe(),__privateGet(this,_focusDelayCSSProperty).observe(),__privateGet(this,_focusDurationCSSProperty).observe(),__privateGet(this,_shiftLimitCSSProperty).observe(),__privateGet(this,_disabledCSSProperty).observe(),__privateGet(this,_hibernatedCSSProperty).observe(),windowResizer_index.windowResizer.subscribe(__privateGet(this,_connectListener),order_index.RESIZE_ORDER.LAST),__privateGet(this,_mutationObserver).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),__privateGet(this,_controlsCSSProperty).unobserve(),__privateGet(this,_axisCSSProperty).unobserve(),__privateGet(this,_reverseCSSProperty).unobserve(),__privateGet(this,_directionCSSProperty).unobserve(),__privateGet(this,_pagesCSSProperty).unobserve(),__privateGet(this,_splitCSSProperty).unobserve(),__privateGet(this,_sectionalCSSProperty).unobserve(),__privateGet(this,_easingCSSProperty).unobserve(),__privateGet(this,_durationCSSProperty).unobserve(),__privateGet(this,_autoSizeCSSProperty).unobserve(),__privateGet(this,_wheelMaxDeltaCSSProperty).unobserve(),__privateGet(this,_dragInertionCSSProperty).unobserve(),__privateGet(this,_sectionsInViewCSSProperty).unobserve(),__privateGet(this,_loopCSSProperty).unobserve(),__privateGet(this,_dampingCSSProperty).unobserve(),__privateGet(this,_massCSSProperty).unobserve(),__privateGet(this,_stiffnessCSSProperty).unobserve(),__privateGet(this,_mouseDragCSSProperty).unobserve(),__privateGet(this,_sectionDistanceScaleCSSProperty).unobserve(),__privateGet(this,_startSectionCSSProperty).unobserve(),__privateGet(this,_autoplayCSSProperty).unobserve(),__privateGet(this,_autoplayPauseDurationCSSProperty).unobserve(),__privateGet(this,_autoplayUserDirectionCSSProperty).unobserve(),__privateGet(this,_classesCSSProperty).unobserve(),__privateGet(this,_currentIndexStartOffsetCSSProperty).unobserve(),__privateGet(this,_currentIndexEndOffsetCSSProperty).unobserve(),__privateGet(this,_shiftSectionPositionCSSProperty).unobserve(),__privateGet(this,_focusDelayCSSProperty).unobserve(),__privateGet(this,_focusDurationCSSProperty).unobserve(),__privateGet(this,_shiftLimitCSSProperty).unobserve(),__privateGet(this,_disabledCSSProperty).unobserve(),__privateGet(this,_hibernatedCSSProperty).unobserve(),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_connectListener)),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener)),elementResizer_index.elementResizer.unsubscribe(__privateGet(this,_resizeListener)),__privateMethod(this,_ScrollElement_instances,hibernate_fn).call(this),__privateGet(this,_mutationObserver).disconnect()}};_damped=new WeakMap,_controlsCSSProperty=new WeakMap,_axisCSSProperty=new WeakMap,_reverseCSSProperty=new WeakMap,_directionCSSProperty=new WeakMap,_pagesCSSProperty=new WeakMap,_splitCSSProperty=new WeakMap,_sectionalCSSProperty=new WeakMap,_easingCSSProperty=new WeakMap,_durationCSSProperty=new WeakMap,_autoSizeCSSProperty=new WeakMap,_wheelMaxDeltaCSSProperty=new WeakMap,_dragInertionCSSProperty=new WeakMap,_sectionsInViewCSSProperty=new WeakMap,_loopCSSProperty=new WeakMap,_dampingCSSProperty=new WeakMap,_massCSSProperty=new WeakMap,_stiffnessCSSProperty=new WeakMap,_mouseDragCSSProperty=new WeakMap,_sectionDistanceScaleCSSProperty=new WeakMap,_startSectionCSSProperty=new WeakMap,_autoplayCSSProperty=new WeakMap,_autoplayPauseDurationCSSProperty=new WeakMap,_autoplayUserDirectionCSSProperty=new WeakMap,_classesCSSProperty=new WeakMap,_currentIndexStartOffsetCSSProperty=new WeakMap,_currentIndexEndOffsetCSSProperty=new WeakMap,_shiftSectionPositionCSSProperty=new WeakMap,_focusDelayCSSProperty=new WeakMap,_focusDurationCSSProperty=new WeakMap,_shiftLimitCSSProperty=new WeakMap,_disabledCSSProperty=new WeakMap,_hibernatedCSSProperty=new WeakMap,_contentWrapperElement=new WeakMap,_contentElement=new WeakMap,_slotElement=new WeakMap,_sections=new WeakMap,_visibleSections=new WeakMap,_position2=new WeakMap,_contentPosition=new WeakMap,_viewportSize=new WeakMap,_scrollSize=new WeakMap,_gap=new WeakMap,_wheelControls=new WeakMap,_keyboardControls=new WeakMap,_dragControls=new WeakMap,_autoplayControls=new WeakMap,_counter=new WeakMap,_overscroll=new WeakMap,_distance=new WeakMap,_hasOverflow=new WeakMap,_disabled=new WeakMap,_hibernated=new WeakMap,_focusTimeoutId=new WeakMap,_tweenTimeoutId=new WeakMap,_setTween=new WeakMap,_isGrabbing=new WeakMap,_scrollLine=new WeakMap,_isConnected=new WeakMap,_mutationObserver=new WeakMap,_currentSections=new WeakMap,_skipNextResize=new WeakMap,_maxSectionSizeTimeoutId=new WeakMap,_ScrollElement_instances=new WeakSet,updateAxis_fn=__name(function(){const axis=__privateGet(this,_axisCSSProperty).current,reverse=__privateGet(this,_reverseCSSProperty).current?"-reverse":"";__privateGet(this,_contentElement).style.flexDirection=axis==="x"?`row${reverse}`:`column${reverse}`,__privateGet(this,_wheelControls).axis=__privateGet(this,_wheelMaxDeltaCSSProperty).current?"max":axis,__privateGet(this,_keyboardControls).dimension=axis==="x"?"width":"height",__privateGet(this,_dragControls).axis=axis,axis==="x"?this.style.touchAction="pan-y":axis==="y"&&(this.style.touchAction="pan-x"),__privateGet(this,_isConnected)&&__privateGet(this,_resizeListener).call(this)},"#updateAxis"),split_fn=__name(function(){__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this),__privateGet(this,_slotElement).assignedElements().forEach((element2,i)=>{element2 instanceof HTMLElement&&element2.tagName!=="SCRIPT"&&__privateGet(this,_sections).push(new ScrollSection(element2,i,this))}),__privateSet(this,_visibleSections,[...__privateGet(this,_sections)]),__privateGet(this,_contentElement).style.transform="",events.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),__privateGet(this,_resizeListener).call(this),__privateMethod(this,_ScrollElement_instances,updateMarks_fn).call(this)},"#split"),unsplit_fn=__name(function(){__privateGet(this,_sections).forEach(section=>{section.destroy()}),__privateSet(this,_sections,[]),__privateSet(this,_visibleSections,[]),__privateGet(this,_counter).reset(),__privateGet(this,_damped).reset(),this.style.removeProperty("--max-section-size"),events.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},"#unsplit"),disable_fn=__name(function(){__privateGet(this,_disabled)||(__privateSet(this,_disabled,!0),__privateGet(this,_damped).unsubscribe(__privateGet(this,_animatedChangeListener)),__privateGet(this,_damped).unlistenAnimationFrame(),clearInterval(__privateGet(this,_focusTimeoutId)),clearInterval(__privateGet(this,_tweenTimeoutId)),__privateGet(this,_setTween).unlistenAnimationFrame(),__privateGet(this,_wheelControls).disconnect(),__privateGet(this,_keyboardControls).disconnect(),__privateGet(this,_dragControls).disconnect(),__privateGet(this,_autoplayControls).disconnect(),__privateGet(this,_hasOverflow)||(this.sections.forEach(section=>{section.unsetTransform()}),__privateGet(this,_resizeListener).call(this)))},"#disable"),enable_fn=__name(function(){__privateGet(this,_disabled)&&(__privateSet(this,_disabled,!1),__privateGet(this,_damped).subscribe(__privateGet(this,_animatedChangeListener),-1e4),__privateGet(this,_damped).notify(),__privateGet(this,_wheelControls).connect(),__privateGet(this,_keyboardControls).connect(),__privateGet(this,_dragControls).connect(),__privateGet(this,_autoplayCSSProperty).current&&__privateGet(this,_autoplayControls).connect())},"#enable"),hibernate_fn=__name(function(){__privateGet(this,_hibernated)||(__privateSet(this,_hibernated,!0),clearTimeout(__privateGet(this,_maxSectionSizeTimeoutId)),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener)),__privateMethod(this,_ScrollElement_instances,disable_fn).call(this),__privateGet(this,_contentElement).style.transform="",__privateGet(this,_contentElement).style.height="",__privateGet(this,_contentElement).style.width="",this.classList.remove("has-overflow","start","end"),this.style.removeProperty("--counter"),__privateGet(this,_sections).length?__privateMethod(this,_ScrollElement_instances,unsplit_fn).call(this):(__privateGet(this,_counter).reset(),__privateGet(this,_damped).reset()),scrollEntries_index.scrollEntries.unregister(this))},"#hibernate"),awake_fn=__name(function(){__privateGet(this,_hibernated)&&(__privateSet(this,_hibernated,!1),scrollEntries_index.scrollEntries.register(this),this.tryResplit(),__privateMethod(this,_ScrollElement_instances,enable_fn).call(this),this.scrollToSection(__privateGet(this,_startSectionCSSProperty).current,{behaviour:"instant"}),windowResizer_index.windowResizer.subscribe(__privateGet(this,_resizeListener),order_index.RESIZE_ORDER.SCROLL))},"#awake"),_resizeListener=new WeakMap,_animatedChangeListener=new WeakMap,clampCounter_fn=__name(function(value){let counter=__privateGet(this,_counter).current;return __privateGet(this,_loopCSSProperty).current?counter=number.loopNumber(value,__privateGet(this,_visibleSections).length):counter=math.clamp(value,0,this.limit),counter},"#clampCounter"),_notAutoplayControlListener=new WeakMap,_controlsListener=new WeakMap,processAutoplay_fn=__name(function(direction=1){__privateGet(this,_autoplayUserDirectionCSSProperty).current&&(__privateGet(this,_autoplayControls).direction=direction),__privateGet(this,_autoplayCSSProperty).current&&__privateGet(this,_autoplayControls).pauseAndContinue(__privateGet(this,_autoplayPauseDurationCSSProperty).current,this.sectionalCSSProperty.current)},"#processAutoplay"),getScrollValue_fn=__name(function(type="current"){if(__privateGet(this,_loopCSSProperty).current&&__privateGet(this,_visibleSections).length){const mod=Math.floor(__privateGet(this,_damped)[type])%Math.floor(__privateGet(this,_scrollSize)+__privateGet(this,_viewportSize)+__privateGet(this,_gap));return mod<0?__privateGet(this,_scrollSize)+mod+__privateGet(this,_viewportSize)+__privateGet(this,_gap):mod}else return __privateGet(this,_damped)[type]},"#getScrollValue"),updateMarks_fn=__name(function(){if(__privateGet(this,_visibleSections).length){const counter=__privateGet(this,_counter).current+__privateGet(this,_currentIndexStartOffsetCSSProperty).current;if(counter===__privateGet(this,_currentIndexStartOffsetCSSProperty).current?__privateSet(this,_scrollLine,"start"):counter===this.limit?__privateSet(this,_scrollLine,"end"):__privateSet(this,_scrollLine,null),events.dispatchEvent(this,"scrollLine",{detail:{line:__privateGet(this,_scrollLine)}}),__privateGet(this,_classesCSSProperty).current){this.classList.remove("end","start"),__privateGet(this,_scrollLine)&&this.classList.add(__privateGet(this,_scrollLine));const sectionsInView=__privateGet(this,_sectionsInViewCSSProperty).current+__privateGet(this,_currentIndexEndOffsetCSSProperty).current;__privateSet(this,_currentSections,[]),__privateGet(this,_visibleSections).forEach((section,index)=>{section.setCurrentIndex(null),section.setCurrentIndexArc(null),section.setCurrentIndexArcAbs(null),section.setMiddle(!1);const overflow=counter-this.limit-1+__privateGet(this,_currentIndexEndOffsetCSSProperty).current,currentRange=counter+sectionsInView,vv=this.sections.length-currentRange;index>=counter&&index<currentRange||index<=overflow?(section.setMark("current"),__privateGet(this,_currentSections).push(section)):index>=currentRange&&index<currentRange+vv/2||index<=overflow+sectionsInView?section.setMark("next"):section.setMark("previous")}),__privateGet(this,_updateMaxSectionsSize).call(this)}}},"#updateMarks"),updateIndexes_fn=__name(function(){if(__privateGet(this,_classesCSSProperty).current){const middle=Math.floor(__privateGet(this,_currentSections).length/2);__privateGet(this,_currentSections).sort((a,b)=>a.element.getBoundingClientRect().left-b.element.getBoundingClientRect().left),__privateGet(this,_currentSections).forEach((section,i)=>{const arcIndex=i-middle;section.setCurrentIndex(i),section.setCurrentIndexArc(arcIndex),section.setCurrentIndexArcAbs(Math.abs(arcIndex)),section.setMiddle(i===middle)}),__privateGet(this,_visibleSections).forEach((section,i)=>{section.setOffsetIndex(i-(__privateGet(this,_counter).current+__privateGet(this,_sectionsInViewCSSProperty).current))})}},"#updateIndexes"),_updateMaxSectionsSize=new WeakMap,getNearestSectionIndex_fn=__name(function(NAMEIT=!1){let scrollValue=this.targetScrollValue,minDiff=1/0,nearestIndex=0;const dir=__privateGet(this,_damped).direction;for(let i=0;i<__privateGet(this,_visibleSections).length;i++){const section=__privateGet(this,_visibleSections)[i];let offset=__privateGet(this,_isGrabbing)?section.size*dir*-1*.4:0,position=section.position;this.overscroll&&position===0&&NAMEIT&&(position=__privateGet(this,_distance));let diff=Math.abs(position+offset-scrollValue);diff<=minDiff&&(minDiff=diff,nearestIndex=i)}return nearestIndex},"#getNearestSectionIndex"),_connectListener=new WeakMap,__name(_ScrollElement,"ScrollElement");let ScrollElement=_ScrollElement;intersector_index.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",ScrollElement);var _scrollElement2;const _ScrollUserElement=class _ScrollUserElement extends HTMLElement{constructor(){super(...arguments);__privateAdd(this,_scrollElement2,null)}get scrollElement(){return __privateGet(this,_scrollElement2)}connectedCallback(){const scrollElement=dom.findParentElement(this,ScrollElement);scrollElement instanceof ScrollElement?__privateSet(this,_scrollElement2,scrollElement):console.error(this,"e-scroll not found")}};_scrollElement2=new WeakMap,__name(_ScrollUserElement,"ScrollUserElement");let ScrollUserElement=_ScrollUserElement;var _slotElement2,_thumbElement,_isHorisontal,_thumbSize,_thumbScrollSize,_position3,_resizeListener2,_scrollListener,_axisListener,_grabListener;const _ScrollScrollbarElement=class _ScrollScrollbarElement extends ScrollUserElement{constructor(){super();__privateAdd(this,_slotElement2,null);__privateAdd(this,_thumbElement,null);__privateAdd(this,_isHorisontal,!1);__privateAdd(this,_thumbSize,0);__privateAdd(this,_thumbScrollSize,0);__privateAdd(this,_position3,0);__privateAdd(this,_resizeListener2,__name(()=>{__privateSet(this,_isHorisontal,this.offsetWidth>this.offsetHeight);const barSize=__privateGet(this,_isHorisontal)?this.offsetWidth:this.offsetHeight;__privateSet(this,_thumbSize,barSize/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/barSize)),__privateSet(this,_thumbSize,Math.max(__privateGet(this,_thumbSize),30)),__privateGet(this,_isHorisontal)?(__privateGet(this,_thumbElement).style.width=__privateGet(this,_thumbSize)+"px",__privateGet(this,_thumbElement).style.height="100%"):(__privateGet(this,_thumbElement).style.width="100%",__privateGet(this,_thumbElement).style.height=__privateGet(this,_thumbSize)+"px"),__privateSet(this,_thumbScrollSize,barSize-__privateGet(this,_thumbSize)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",__privateGet(this,_scrollListener).call(this)},"#resizeListener"));__privateAdd(this,_scrollListener,__name(()=>{__privateSet(this,_position3,this.scrollElement.currentProgress*__privateGet(this,_thumbScrollSize)),__privateGet(this,_isHorisontal)?__privateGet(this,_thumbElement).style.transform=`translate3d(${__privateGet(this,_position3)}px, 0px, 0px)`:__privateGet(this,_thumbElement).style.transform=`translate3d(0px, ${__privateGet(this,_position3)}px, 0px)`},"#scrollListener"));__privateAdd(this,_axisListener,__name(()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)},"#axisListener"));__privateAdd(this,_grabListener,__name(grabEvent=>{gestures.setupDrag(moveEvent=>{const moveCursor=__privateGet(this,_isHorisontal)?moveEvent.x:moveEvent.y,mult=this.scrollElement.distance/__privateGet(this,_thumbScrollSize),delta=(moveCursor-grabCursor)*mult;this.scrollElement.setPosition(startValue+delta)});const startValue=this.scrollElement.damped.target,grabCursor=__privateGet(this,_isHorisontal)?grabEvent.x:grabEvent.y},"#grabListener"));if(intersector_index.isBrowser){const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[stylesheet$1.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],__privateSet(this,_slotElement2,document.createElement("slot")),__privateGet(this,_slotElement2).innerHTML='<div class="default-thumb"></div>',shadow.appendChild(__privateGet(this,_slotElement2))}}get thumbElement(){return __privateGet(this,_thumbElement)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const slottedThumb=__privateGet(this,_slotElement2).assignedElements()[0]||__privateGet(this,_slotElement2).firstElementChild;__privateSet(this,_thumbElement,slottedThumb),__privateGet(this,_thumbElement).addEventListener("pointerdown",__privateGet(this,_grabListener)),windowResizer_index.windowResizer.subscribe(__privateGet(this,_resizeListener2),order_index.RESIZE_ORDER.SCROLL),elementResizer_index.elementResizer.subscribe(this,__privateGet(this,_resizeListener2)),elementResizer_index.elementResizer.subscribe(this.scrollElement,__privateGet(this,_resizeListener2)),this.scrollElement.onScroll(__privateGet(this,_scrollListener)),this.scrollElement.axisCSSProperty.subscribe(__privateGet(this,_axisListener))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",__privateGet(this,_thumbElement).removeEventListener("pointerdown",__privateGet(this,_grabListener)),windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener2)),elementResizer_index.elementResizer.unsubscribe(__privateGet(this,_resizeListener2)),this.scrollElement.offScroll(__privateGet(this,_scrollListener)),this.scrollElement.axisCSSProperty.unsubscribe(__privateGet(this,_axisListener))}};_slotElement2=new WeakMap,_thumbElement=new WeakMap,_isHorisontal=new WeakMap,_thumbSize=new WeakMap,_thumbScrollSize=new WeakMap,_position3=new WeakMap,_resizeListener2=new WeakMap,_scrollListener=new WeakMap,_axisListener=new WeakMap,_grabListener=new WeakMap,__name(_ScrollScrollbarElement,"ScrollScrollbarElement");let ScrollScrollbarElement=_ScrollScrollbarElement;intersector_index.isBrowser&&!customElements.get("e-scroll-scrollbar")&&customElements.define("e-scroll-scrollbar",ScrollScrollbarElement);var _behaviour,_easing,_duration;const _ScrollButtonElement=class _ScrollButtonElement extends ScrollUserElement{constructor(){super();__privateAdd(this,_behaviour,new cssProperty_index.CSSProperty(this,"--behaviour","smooth"));__privateAdd(this,_easing,new cssProperty_index.CSSProperty(this,"--tween-easing",!1));__privateAdd(this,_duration,new cssProperty_index.CSSProperty(this,"--tween-duration",0));intersector_index.isBrowser&&this.addEventListener("click",()=>{const behaviour=__privateGet(this,_behaviour).current,easing=__privateGet(this,_easing).current,duration=__privateGet(this,_duration).current;this.handleClick({behaviour,tween:easing||duration?{easing,duration}:void 0})})}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),__privateGet(this,_behaviour).observe(),__privateGet(this,_easing).observe(),__privateGet(this,_duration).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),this.removeAttribute("role"),__privateGet(this,_behaviour).close(),__privateGet(this,_easing).close(),__privateGet(this,_duration).close()}};_behaviour=new WeakMap,_easing=new WeakMap,_duration=new WeakMap,__name(_ScrollButtonElement,"ScrollButtonElement");let ScrollButtonElement=_ScrollButtonElement;var _set;const _ScrollSetButtonElement=class _ScrollSetButtonElement extends ScrollButtonElement{constructor(){super(...arguments);__privateAdd(this,_set,new cssProperty_index.CSSProperty(this,"--set",1))}handleClick(options){this.scrollElement.scrollToSection(__privateGet(this,_set).current,options)}connectedCallback(){super.connectedCallback(),__privateGet(this,_set).observe()}disconnectedCallback(){super.disconnectedCallback(),__privateGet(this,_set).close()}};_set=new WeakMap,__name(_ScrollSetButtonElement,"ScrollSetButtonElement");let ScrollSetButtonElement=_ScrollSetButtonElement;intersector_index.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ScrollSetButtonElement);var _step,_scrollLineListener;const _ScrollStepButtonElement=class _ScrollStepButtonElement extends ScrollButtonElement{constructor(){super(...arguments);__privateAdd(this,_step,new cssProperty_index.CSSProperty(this,"--step",1));__privateAdd(this,_scrollLineListener,__name(()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):__privateGet(this,_step).current>0&&this.scrollElement.scrollLine==="end"||__privateGet(this,_step).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")},"#scrollLineListener"))}handleClick(options){this.scrollElement.shiftSections(__privateGet(this,_step).current,options)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(__privateGet(this,_step).subscribe(()=>{__privateGet(this,_scrollLineListener).call(this)}),__privateGet(this,_step).observe(),this.scrollElement.addEventListener("scrollLine",__privateGet(this,_scrollLineListener)),__privateGet(this,_scrollLineListener).call(this))}disconnectedCallback(){super.disconnectedCallback(),__privateGet(this,_step).close(),this.removeAttribute("disabled")}};_step=new WeakMap,_scrollLineListener=new WeakMap,__name(_ScrollStepButtonElement,"ScrollStepButtonElement");let ScrollStepButtonElement=_ScrollStepButtonElement;intersector_index.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",ScrollStepButtonElement);var _element2,_scrollElement3,_index2,_behaviour2,_clickListener,_counterChangeListener;const _BulletButton=class _BulletButton{constructor(scrollElement,index,behaviour){__privateAdd(this,_element2,null);__privateAdd(this,_scrollElement3,null);__privateAdd(this,_index2,null);__privateAdd(this,_behaviour2,null);__privateAdd(this,_clickListener,__name(()=>{__privateGet(this,_scrollElement3).scrollToSection(__privateGet(this,_index2),{behaviour:__privateGet(this,_behaviour2)})},"#clickListener"));__privateAdd(this,_counterChangeListener,__name(()=>{__privateGet(this,_element2).classList.toggle("current",__privateGet(this,_scrollElement3).counter.current===__privateGet(this,_index2))},"#counterChangeListener"));intersector_index.isBrowser&&(__privateSet(this,_element2,document.createElement("button")),__privateGet(this,_element2).setAttribute("aria-label",`Go to section ${index+1}`),__privateSet(this,_scrollElement3,scrollElement),__privateSet(this,_behaviour2,behaviour),__privateSet(this,_index2,index),__privateGet(this,_element2).addEventListener("click",__privateGet(this,_clickListener)),__privateGet(this,_scrollElement3).counter.subscribe(__privateGet(this,_counterChangeListener)),__privateGet(this,_counterChangeListener).call(this))}get element(){return __privateGet(this,_element2)}destroy(){__privateGet(this,_element2).removeEventListener("click",__privateGet(this,_clickListener)),__privateGet(this,_scrollElement3).counter.unsubscribe(__privateGet(this,_counterChangeListener)),__privateGet(this,_element2).remove()}};_element2=new WeakMap,_scrollElement3=new WeakMap,_index2=new WeakMap,_behaviour2=new WeakMap,_clickListener=new WeakMap,_counterChangeListener=new WeakMap,__name(_BulletButton,"BulletButton");let BulletButton=_BulletButton;var _contentElement2,_buttons,_sectionsChangeListener;const _ScrollBulletButtonsElement=class _ScrollBulletButtonsElement extends ScrollUserElement{constructor(){super(...arguments);__privateAdd(this,_contentElement2,null);__privateAdd(this,_buttons,[]);__privateAdd(this,_sectionsChangeListener,_function.debounce(()=>{__privateGet(this,_buttons).forEach(b=>b.destroy()),__privateSet(this,_buttons,[]);let length=0;this.scrollElement.loopCSSProperty.current?length=this.scrollElement.visibleSections.length:length=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let index=0;index<length;index++){const button=new BulletButton(this.scrollElement,index,this.getAttribute("behaviour")||"smooth");__privateGet(this,_contentElement2).appendChild(button.element),__privateGet(this,_buttons).push(button)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",__privateSet(this,_contentElement2,document.createElement("div")),this.appendChild(__privateGet(this,_contentElement2)),this.scrollElement.addEventListener("scrollSectionsChange",__privateGet(this,_sectionsChangeListener)),this.scrollElement.sectionsInViewCSSProperty.subscribe(__privateGet(this,_sectionsChangeListener)),this.scrollElement.loopCSSProperty.subscribe(__privateGet(this,_sectionsChangeListener)),__privateGet(this,_sectionsChangeListener).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",__privateGet(this,_sectionsChangeListener)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(__privateGet(this,_sectionsChangeListener)),this.scrollElement.loopCSSProperty.unsubscribe(__privateGet(this,_sectionsChangeListener)),__privateGet(this,_buttons).forEach(b=>b.destroy()),__privateSet(this,_buttons,[]),__privateGet(this,_contentElement2).remove()}};_contentElement2=new WeakMap,_buttons=new WeakMap,_sectionsChangeListener=new WeakMap,__name(_ScrollBulletButtonsElement,"ScrollBulletButtonsElement");let ScrollBulletButtonsElement=_ScrollBulletButtonsElement;intersector_index.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",ScrollBulletButtonsElement);var _dampingCSSProperty2,_massCSSProperty2,_stiffnessCSSProperty2,_targetCSSProperty,_disabledCSSProperty2,_distanceOffsetCSSProperty,_startOffsetCSSProperty,_captureOnceCSSProperty,_capturedCSSProperty,_releasedCSSProperty,_capturedFromStartCSSProperty,_capturedFromFinishCSSProperty,_releasedFromStartCSSProperty,_releasedFromFinishCSSProperty,_passedVarCSSProperty,_progressVarCSSProperty,_progressArcVarCSSProperty,_progressArcMultCSSProperty,_animationVarTypeCSSProperty,_distanceVarCSSProperty,_startVarCSSProperty,_finishVarCSSProperty,_isCaptured,_isReleased,_isCapturedFromStart,_isReleasedFromStart,_isCapturedFromFinish,_isReleasedFromFinish,_anotherScrollEntries,_targetElement,_directionPosition,_directionSize,_moverDirectionSize,_passed,_progress,_start,_distance2,_finish,_isResized,_isCapturedOnce,_isDisabled,_skipPassNotification,_ScrollSegmentElement_instances,captureListener_fn,releaseListener_fn,captureFromStartListener_fn,captureFromFinishListener_fn,releaseFromStartListener_fn,releaseFromFinishListener_fn,_resizeListener3,_tickListener,updateProgress_fn,handleClassSetting_fn,removeClasses_fn,removeVars_fn,removeCurrentMarks_fn;const _ScrollSegmentElement=class _ScrollSegmentElement extends ScrollUserElement{constructor(){super(...arguments);__privateAdd(this,_ScrollSegmentElement_instances);__privateAdd(this,_dampingCSSProperty2);__privateAdd(this,_massCSSProperty2);__privateAdd(this,_stiffnessCSSProperty2);__privateAdd(this,_targetCSSProperty);__privateAdd(this,_disabledCSSProperty2);__privateAdd(this,_distanceOffsetCSSProperty);__privateAdd(this,_startOffsetCSSProperty);__privateAdd(this,_captureOnceCSSProperty);__privateAdd(this,_capturedCSSProperty);__privateAdd(this,_releasedCSSProperty);__privateAdd(this,_capturedFromStartCSSProperty);__privateAdd(this,_capturedFromFinishCSSProperty);__privateAdd(this,_releasedFromStartCSSProperty);__privateAdd(this,_releasedFromFinishCSSProperty);__privateAdd(this,_passedVarCSSProperty);__privateAdd(this,_progressVarCSSProperty);__privateAdd(this,_progressArcVarCSSProperty);__privateAdd(this,_progressArcMultCSSProperty);__privateAdd(this,_animationVarTypeCSSProperty);__privateAdd(this,_distanceVarCSSProperty);__privateAdd(this,_startVarCSSProperty);__privateAdd(this,_finishVarCSSProperty);__privateAdd(this,_isCaptured);__privateAdd(this,_isReleased);__privateAdd(this,_isCapturedFromStart);__privateAdd(this,_isReleasedFromStart);__privateAdd(this,_isCapturedFromFinish);__privateAdd(this,_isReleasedFromFinish);__privateAdd(this,_anotherScrollEntries);__privateAdd(this,_targetElement);__privateAdd(this,_directionPosition);__privateAdd(this,_directionSize);__privateAdd(this,_moverDirectionSize);__privateAdd(this,_passed);__privateAdd(this,_progress);__privateAdd(this,_start);__privateAdd(this,_distance2);__privateAdd(this,_finish);__privateAdd(this,_isResized);__privateAdd(this,_isCapturedOnce);__privateAdd(this,_isDisabled);__privateAdd(this,_skipPassNotification);__privateAdd(this,_resizeListener3);__privateAdd(this,_tickListener);__privateSet(this,_dampingCSSProperty2,new cssProperty_index.CSSProperty(this,"--damping",20)),__privateSet(this,_massCSSProperty2,new cssProperty_index.CSSProperty(this,"--mass",0)),__privateSet(this,_stiffnessCSSProperty2,new cssProperty_index.CSSProperty(this,"--stiffness",0)),__privateSet(this,_targetCSSProperty,new cssProperty_index.CSSProperty(this,"--target","")),__privateSet(this,_disabledCSSProperty2,new cssProperty_index.CSSProperty(this,"--disabled",!1)),__privateSet(this,_distanceOffsetCSSProperty,new cssProperty_index.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),__privateSet(this,_startOffsetCSSProperty,new cssProperty_index.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),__privateSet(this,_captureOnceCSSProperty,new cssProperty_index.CSSProperty(this,"--capture-once",!1)),__privateSet(this,_capturedCSSProperty,new cssProperty_index.CSSProperty(this,"--captured","")),__privateSet(this,_releasedCSSProperty,new cssProperty_index.CSSProperty(this,"--released","")),__privateSet(this,_capturedFromStartCSSProperty,new cssProperty_index.CSSProperty(this,"--captured-from-start","")),__privateSet(this,_capturedFromFinishCSSProperty,new cssProperty_index.CSSProperty(this,"--captured-from-finish","")),__privateSet(this,_releasedFromStartCSSProperty,new cssProperty_index.CSSProperty(this,"--released-from-start","")),__privateSet(this,_releasedFromFinishCSSProperty,new cssProperty_index.CSSProperty(this,"--released-from-finish","")),__privateSet(this,_passedVarCSSProperty,new cssProperty_index.CSSProperty(this,"--passed-var","")),__privateSet(this,_progressVarCSSProperty,new cssProperty_index.CSSProperty(this,"--progress-var","")),__privateSet(this,_progressArcVarCSSProperty,new cssProperty_index.CSSProperty(this,"--progress-arc-var","")),__privateSet(this,_progressArcMultCSSProperty,new cssProperty_index.CSSProperty(this,"--progress-arc-mult",1)),__privateSet(this,_animationVarTypeCSSProperty,new cssProperty_index.CSSProperty(this,"--animation-var-type","target")),__privateSet(this,_distanceVarCSSProperty,new cssProperty_index.CSSProperty(this,"--distance-var","")),__privateSet(this,_startVarCSSProperty,new cssProperty_index.CSSProperty(this,"--start-var","")),__privateSet(this,_finishVarCSSProperty,new cssProperty_index.CSSProperty(this,"--finish-var","")),__privateSet(this,_isCaptured,new Store.Store(!1)),__privateSet(this,_isReleased,new Store.Store(!1)),__privateSet(this,_isCapturedFromStart,new Store.Store(!1)),__privateSet(this,_isReleasedFromStart,new Store.Store(!1)),__privateSet(this,_isCapturedFromFinish,new Store.Store(!1)),__privateSet(this,_isReleasedFromFinish,new Store.Store(!1)),__privateSet(this,_anotherScrollEntries,[]),__privateSet(this,_targetElement,this),__privateSet(this,_directionPosition,0),__privateSet(this,_directionSize,0),__privateSet(this,_moverDirectionSize,0),__privateSet(this,_passed,new Damped.Damped(0,{order:order_index.TICK_ORDER.SEGMENT,min:0,max:1})),__privateSet(this,_progress,0),__privateSet(this,_start,0),__privateSet(this,_distance2,0),__privateSet(this,_finish,0),__privateSet(this,_isResized,!1),__privateSet(this,_isCapturedOnce,!1),__privateSet(this,_isDisabled,!0),__privateSet(this,_skipPassNotification,!1),this.resize=()=>{__privateSet(this,_directionSize,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),__privateSet(this,_directionPosition,this.scrollElement.vertical?layout.getCumulativeOffsetTop(this,this.scrollElement):layout.getCumulativeOffsetLeft(this,this.scrollElement));const stickyOffset=layout.getStickyOffset(this,this.scrollElement.vertical?"top":"left");__privateSet(this,_directionPosition,__privateGet(this,_directionPosition)-stickyOffset),__privateSet(this,_start,this.getStart()),__privateSet(this,_distance2,this.getDistance()),__privateSet(this,_start,__privateGet(this,_start)+__privateGet(this,_startOffsetCSSProperty).current),__privateSet(this,_distance2,__privateGet(this,_distance2)+__privateGet(this,_distanceOffsetCSSProperty).current),__privateSet(this,_finish,__privateGet(this,_start)+__privateGet(this,_distance2)),this.scrollElement.currentScrollValue>__privateGet(this,_finish)&&!__privateGet(this,_isCaptured).current&&!__privateGet(this,_isReleased).current&&(__privateGet(this,_isCaptured).current=!0),this.setVar(__privateGet(this,_startVarCSSProperty).current,__privateGet(this,_start)),this.setVar(__privateGet(this,_finishVarCSSProperty).current,__privateGet(this,_finish)),this.setVar(__privateGet(this,_distanceVarCSSProperty).current,__privateGet(this,_distance2)),__privateGet(this,_passed).max=__privateGet(this,_distance2),__privateSet(this,_isResized,!0),__privateGet(this,_tickListener).call(this)},this.findAnotherScrollEntries=_function.debounce(()=>{const allScrollEntriesAbove=scrollEntries_index.scrollEntries.getAll(this).reverse();let scrollIndex=0;allScrollEntriesAbove.forEach((entry,i)=>{entry.element===this.scrollElement&&(scrollIndex=i)}),__privateSet(this,_anotherScrollEntries,allScrollEntriesAbove.slice(scrollIndex+1)),this.tick()},0),__privateSet(this,_resizeListener3,()=>{__privateGet(this,_isDisabled)||this.resize()}),__privateSet(this,_tickListener,()=>{!__privateGet(this,_isDisabled)&&__privateGet(this,_isResized)&&this.tick()})}get distanceOffsetCSSProperty(){return __privateGet(this,_distanceOffsetCSSProperty)}get startOffsetCSSProperty(){return __privateGet(this,_startOffsetCSSProperty)}get captureOnceCSSProperty(){return __privateGet(this,_captureOnceCSSProperty)}get capturedCSSProperty(){return __privateGet(this,_capturedCSSProperty)}get releasedCSSProperty(){return __privateGet(this,_releasedCSSProperty)}get capturedFromStartCSSProperty(){return __privateGet(this,_capturedFromStartCSSProperty)}get capturedFromFinishCSSProperty(){return __privateGet(this,_capturedFromFinishCSSProperty)}get releasedFromStartCSSProperty(){return __privateGet(this,_releasedFromStartCSSProperty)}get releasedFromFinishCSSProperty(){return __privateGet(this,_releasedFromFinishCSSProperty)}get passedVarCSSProperty(){return __privateGet(this,_passedVarCSSProperty)}get progressVarCSSProperty(){return __privateGet(this,_progressVarCSSProperty)}get progressArcVarCSSProperty(){return __privateGet(this,_progressArcVarCSSProperty)}get progressArcMultCSSProperty(){return __privateGet(this,_progressArcMultCSSProperty)}get animationVarTypeCSSProperty(){return __privateGet(this,_animationVarTypeCSSProperty)}get distanceVarCSSProperty(){return __privateGet(this,_distanceVarCSSProperty)}get startVarCSSProperty(){return __privateGet(this,_startVarCSSProperty)}get finishVarCSSProperty(){return __privateGet(this,_finishVarCSSProperty)}get disabledCSSProperty(){return __privateGet(this,_disabledCSSProperty2)}get dampingCSSProperty(){return __privateGet(this,_dampingCSSProperty2)}get massCSSProperty(){return __privateGet(this,_massCSSProperty2)}get stiffnessCSSProperty(){return __privateGet(this,_stiffnessCSSProperty2)}get targetCSSProperty(){return __privateGet(this,_targetCSSProperty)}get isCaptured(){return __privateGet(this,_isCaptured)}get isReleased(){return __privateGet(this,_isReleased)}get isCapturedFromStart(){return __privateGet(this,_isCapturedFromStart)}get isReleasedFromStart(){return __privateGet(this,_isReleasedFromStart)}get isCapturedFromFinish(){return __privateGet(this,_isCapturedFromFinish)}get isReleasedFromFinish(){return __privateGet(this,_isReleasedFromFinish)}get directionPosition(){return __privateGet(this,_directionPosition)}get directionSize(){return __privateGet(this,_directionSize)}get passed(){return __privateGet(this,_passed)}get progress(){return __privateGet(this,_progress)}get progressArc(){return Math.abs(Math.cos(__privateGet(this,_progress)*Math.PI))*__privateGet(this,_progressArcMultCSSProperty).current}get start(){return __privateGet(this,_start)}get finish(){return __privateGet(this,_finish)}get distance(){return __privateGet(this,_distance2)}get isCapturedOnce(){return __privateGet(this,_isCapturedOnce)}get isDisabled(){return __privateGet(this,_isDisabled)}tick(){let scrollValue=this.scrollElement.currentScrollValue;__privateGet(this,_anotherScrollEntries).forEach(se=>{scrollValue+=se.value});const delta=scrollValue-__privateGet(this,_start);__privateGet(this,_skipPassNotification)||__privateSet(this,_skipPassNotification,__privateGet(this,_passed).previous?Math.abs(__privateGet(this,_passed).previous-delta)>1e3:!1),__privateGet(this,_passed).set(delta);const fscrollValue=Math.round(scrollValue);__privateGet(this,_isCaptured).current&&(fscrollValue>=__privateGet(this,_start)?__privateGet(this,_isCapturedFromStart).current||__privateMethod(this,_ScrollSegmentElement_instances,captureFromStartListener_fn).call(this):__privateGet(this,_isCapturedFromStart).current&&!__privateGet(this,_isReleasedFromStart).current&&__privateMethod(this,_ScrollSegmentElement_instances,releaseFromStartListener_fn).call(this),fscrollValue<__privateGet(this,_finish)?__privateGet(this,_isReleasedFromFinish).current&&!__privateGet(this,_isCapturedFromFinish).current&&__privateMethod(this,_ScrollSegmentElement_instances,captureFromFinishListener_fn).call(this):__privateGet(this,_isCapturedFromStart).current&&!__privateGet(this,_isReleasedFromFinish).current&&__privateMethod(this,_ScrollSegmentElement_instances,releaseFromFinishListener_fn).call(this)),fscrollValue>=__privateGet(this,_start)&&fscrollValue<__privateGet(this,_finish)?__privateGet(this,_isCaptured).current||__privateMethod(this,_ScrollSegmentElement_instances,captureListener_fn).call(this):__privateGet(this,_isCaptured).current&&(__privateGet(this,_passed).set(math.step(__privateGet(this,_distance2)/2,__privateGet(this,_passed).target,0,__privateGet(this,_distance2))),__privateMethod(this,_ScrollSegmentElement_instances,releaseListener_fn).call(this)),__privateGet(this,_isCapturedOnce)&&__privateGet(this,_captureOnceCSSProperty).current&&(__privateGet(this,_capturedCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_capturedCSSProperty).current),__privateSet(this,_isDisabled,!0))}disable(){this.style.cssText="",__privateSet(this,_directionPosition,0),__privateSet(this,_directionSize,0),__privateGet(this,_passed).reset(),__privateSet(this,_progress,0),__privateSet(this,_start,0),__privateSet(this,_distance2,0),__privateSet(this,_finish,0),__privateSet(this,_isResized,!1),__privateGet(this,_isCaptured).current=!1,__privateGet(this,_isReleased).current=!1,__privateGet(this,_isCapturedFromStart).current=!1,__privateGet(this,_isReleasedFromStart).current=!1,__privateGet(this,_isCapturedFromFinish).current=!1,__privateGet(this,_isReleasedFromFinish).current=!1,__privateSet(this,_isCapturedOnce,!1),__privateSet(this,_isDisabled,!0),__privateMethod(this,_ScrollSegmentElement_instances,removeCurrentMarks_fn).call(this)}enable(){__privateSet(this,_isDisabled,!1)}connectedCallback(){super.connectedCallback(),__privateGet(this,_isCaptured).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),__privateGet(this,_isCapturedFromStart).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),__privateGet(this,_isCapturedFromFinish).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),__privateGet(this,_isReleased).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),__privateGet(this,_isReleasedFromStart).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),__privateGet(this,_isReleasedFromFinish).subscribe(state=>{state.current&&events.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),__privateGet(this,_dampingCSSProperty2).observe(),__privateGet(this,_massCSSProperty2).observe(),__privateGet(this,_stiffnessCSSProperty2).observe(),__privateGet(this,_targetCSSProperty).observe(),__privateGet(this,_disabledCSSProperty2).observe(),__privateGet(this,_distanceOffsetCSSProperty).observe(),__privateGet(this,_startOffsetCSSProperty).observe(),__privateGet(this,_captureOnceCSSProperty).observe(),__privateGet(this,_capturedCSSProperty).observe(),__privateGet(this,_releasedCSSProperty).observe(),__privateGet(this,_capturedFromStartCSSProperty).observe(),__privateGet(this,_capturedFromFinishCSSProperty).observe(),__privateGet(this,_releasedFromStartCSSProperty).observe(),__privateGet(this,_releasedFromFinishCSSProperty).observe(),__privateGet(this,_passedVarCSSProperty).observe(),__privateGet(this,_progressVarCSSProperty).observe(),__privateGet(this,_progressArcVarCSSProperty).observe(),__privateGet(this,_progressArcMultCSSProperty).observe(),__privateGet(this,_animationVarTypeCSSProperty).observe(),__privateGet(this,_distanceVarCSSProperty).observe(),__privateGet(this,_startVarCSSProperty).observe(),__privateGet(this,_finishVarCSSProperty).observe();let isConnected=!1;this.findAnotherScrollEntries(),__privateGet(this,_disabledCSSProperty2).current||this.enable(),__privateGet(this,_dampingCSSProperty2).subscribe(e=>{__privateGet(this,_passed).damping=e.current}),__privateGet(this,_massCSSProperty2).subscribe(e=>{__privateGet(this,_passed).mass=e.current}),__privateGet(this,_stiffnessCSSProperty2).subscribe(e=>{__privateGet(this,_passed).stiffness=e.current}),__privateGet(this,_targetCSSProperty).subscribe(e=>{e.previous&&__privateMethod(this,_ScrollSegmentElement_instances,removeCurrentMarks_fn).call(this),e.current?e.current==="parent"?__privateSet(this,_targetElement,this.parentElement||this):__privateSet(this,_targetElement,document.querySelector(e.current)||this):__privateSet(this,_targetElement,this)}),__privateGet(this,_disabledCSSProperty2).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),__privateGet(this,_startOffsetCSSProperty).subscribe(()=>{isConnected&&!__privateGet(this,_isDisabled)&&this.resize()}),__privateGet(this,_distanceOffsetCSSProperty).subscribe(()=>{isConnected&&!__privateGet(this,_isDisabled)&&this.resize()}),__privateGet(this,_capturedCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_capturedFromStartCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_capturedFromFinishCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_releasedCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_releasedFromStartCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_releasedFromFinishCSSProperty).subscribe(e=>{__privateMethod(this,_ScrollSegmentElement_instances,handleClassSetting_fn).call(this,e)}),__privateGet(this,_captureOnceCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||!v.current&&v.previous&&(this.resize(),this.enable())}),__privateGet(this,_passedVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,this.passed.current))}),__privateGet(this,_progressVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,__privateGet(this,_progress)))}),__privateGet(this,_progressArcVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,this.progressArc))}),__privateGet(this,_progressArcMultCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||__privateMethod(this,_ScrollSegmentElement_instances,updateProgress_fn).call(this)}),__privateGet(this,_startVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,__privateGet(this,_start)))}),__privateGet(this,_finishVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,__privateGet(this,_finish)))}),__privateGet(this,_distanceVarCSSProperty).subscribe(v=>{__privateGet(this,_isDisabled)||(this.removeVar(v.previous),this.setVar(v.current,__privateGet(this,_distance2)))}),__privateGet(this,_passed).subscribe(e=>{if(__privateGet(this,_skipPassNotification)){__privateSet(this,_skipPassNotification,!1);return}__privateMethod(this,_ScrollSegmentElement_instances,updateProgress_fn).call(this)}),this.scrollElement.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.addEventListener("scrollResize",this.resize),windowResizer_index.windowResizer.subscribe(__privateGet(this,_resizeListener3),order_index.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(__privateGet(this,_tickListener)),isConnected=!0}disconnectedCallback(){windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener3)),this.scrollElement.offScroll(__privateGet(this,_tickListener)),this.scrollElement.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollElement.removeEventListener("scrollResize",this.resize),__privateGet(this,_dampingCSSProperty2).close(),__privateGet(this,_massCSSProperty2).close(),__privateGet(this,_stiffnessCSSProperty2).close(),__privateGet(this,_targetCSSProperty).close(),__privateGet(this,_disabledCSSProperty2).close(),__privateGet(this,_distanceOffsetCSSProperty).close(),__privateGet(this,_startOffsetCSSProperty).close(),__privateGet(this,_captureOnceCSSProperty).close(),__privateGet(this,_capturedCSSProperty).close(),__privateGet(this,_releasedCSSProperty).close(),__privateGet(this,_capturedFromStartCSSProperty).close(),__privateGet(this,_capturedFromFinishCSSProperty).close(),__privateGet(this,_releasedFromStartCSSProperty).close(),__privateGet(this,_releasedFromFinishCSSProperty).close(),__privateGet(this,_passedVarCSSProperty).close(),__privateGet(this,_progressVarCSSProperty).close(),__privateGet(this,_progressArcVarCSSProperty).close(),__privateGet(this,_progressArcMultCSSProperty).close(),__privateGet(this,_distanceVarCSSProperty).close(),__privateGet(this,_startVarCSSProperty).close(),__privateGet(this,_finishVarCSSProperty).close(),__privateGet(this,_isCaptured).close(),__privateGet(this,_isReleased).close(),__privateGet(this,_isCapturedFromStart).close(),__privateGet(this,_isReleasedFromStart).close(),__privateGet(this,_isCapturedFromFinish).close(),__privateGet(this,_isReleasedFromFinish).close(),this.disable(),__privateGet(this,_passed).close()}removeVar(name){name&&__privateGet(this,_targetElement).style.removeProperty(`--${name}`)}setVar(name,value){if(name){const v=typeof value=="number"?value.toFixed(6):value;__privateGet(this,_targetElement).style.setProperty(`--${name}`,v)}}getDistance(){return __privateGet(this,_directionSize)+__privateGet(this,_moverDirectionSize)}getStart(){return __privateGet(this,_directionPosition)-__privateGet(this,_moverDirectionSize)}};_dampingCSSProperty2=new WeakMap,_massCSSProperty2=new WeakMap,_stiffnessCSSProperty2=new WeakMap,_targetCSSProperty=new WeakMap,_disabledCSSProperty2=new WeakMap,_distanceOffsetCSSProperty=new WeakMap,_startOffsetCSSProperty=new WeakMap,_captureOnceCSSProperty=new WeakMap,_capturedCSSProperty=new WeakMap,_releasedCSSProperty=new WeakMap,_capturedFromStartCSSProperty=new WeakMap,_capturedFromFinishCSSProperty=new WeakMap,_releasedFromStartCSSProperty=new WeakMap,_releasedFromFinishCSSProperty=new WeakMap,_passedVarCSSProperty=new WeakMap,_progressVarCSSProperty=new WeakMap,_progressArcVarCSSProperty=new WeakMap,_progressArcMultCSSProperty=new WeakMap,_animationVarTypeCSSProperty=new WeakMap,_distanceVarCSSProperty=new WeakMap,_startVarCSSProperty=new WeakMap,_finishVarCSSProperty=new WeakMap,_isCaptured=new WeakMap,_isReleased=new WeakMap,_isCapturedFromStart=new WeakMap,_isReleasedFromStart=new WeakMap,_isCapturedFromFinish=new WeakMap,_isReleasedFromFinish=new WeakMap,_anotherScrollEntries=new WeakMap,_targetElement=new WeakMap,_directionPosition=new WeakMap,_directionSize=new WeakMap,_moverDirectionSize=new WeakMap,_passed=new WeakMap,_progress=new WeakMap,_start=new WeakMap,_distance2=new WeakMap,_finish=new WeakMap,_isResized=new WeakMap,_isCapturedOnce=new WeakMap,_isDisabled=new WeakMap,_skipPassNotification=new WeakMap,_ScrollSegmentElement_instances=new WeakSet,captureListener_fn=__name(function(){__privateGet(this,_isCaptured).current=!0,__privateGet(this,_isReleased).current=!1,__privateSet(this,_isCapturedOnce,!0),__privateGet(this,_releasedCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_releasedCSSProperty).current),__privateGet(this,_releasedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_releasedFromFinishCSSProperty).current),__privateGet(this,_releasedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_releasedFromFinishCSSProperty).current),__privateGet(this,_capturedCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_capturedCSSProperty).current)},"#captureListener"),releaseListener_fn=__name(function(){__privateGet(this,_isReleased).current=!0,__privateGet(this,_isCaptured).current=!1,__privateSet(this,_isCapturedOnce,!0),__privateGet(this,_capturedCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_capturedCSSProperty).current),__privateGet(this,_capturedFromStartCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_capturedFromStartCSSProperty).current),__privateGet(this,_capturedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.remove(__privateGet(this,_capturedFromFinishCSSProperty).current),__privateGet(this,_releasedCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_releasedCSSProperty).current)},"#releaseListener"),captureFromStartListener_fn=__name(function(){__privateGet(this,_isCaptured).current=!0,__privateGet(this,_isCapturedFromStart).current=!0,__privateGet(this,_isReleasedFromStart).current=!1,__privateGet(this,_capturedFromStartCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_capturedFromStartCSSProperty).current)},"#captureFromStartListener"),captureFromFinishListener_fn=__name(function(){__privateGet(this,_isCaptured).current=!0,__privateGet(this,_isCapturedFromFinish).current=!0,__privateGet(this,_isReleasedFromFinish).current=!1,__privateGet(this,_capturedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_capturedFromFinishCSSProperty).current)},"#captureFromFinishListener"),releaseFromStartListener_fn=__name(function(){__privateGet(this,_isReleased).current=!0,__privateGet(this,_isReleasedFromStart).current=!0,__privateGet(this,_isCapturedFromStart).current=!1,__privateGet(this,_releasedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_releasedFromFinishCSSProperty).current)},"#releaseFromStartListener"),releaseFromFinishListener_fn=__name(function(){__privateGet(this,_isReleased).current=!0,__privateGet(this,_isReleasedFromFinish).current=!0,__privateGet(this,_isCapturedFromFinish).current=!1,__privateGet(this,_releasedFromFinishCSSProperty).current&&__privateGet(this,_targetElement).classList.add(__privateGet(this,_releasedFromFinishCSSProperty).current)},"#releaseFromFinishListener"),_resizeListener3=new WeakMap,_tickListener=new WeakMap,updateProgress_fn=__name(function(){const passedValue=__privateGet(this,_passed)[__privateGet(this,_animationVarTypeCSSProperty).current];this.setVar(__privateGet(this,_passedVarCSSProperty).current,passedValue),__privateSet(this,_progress,passedValue/__privateGet(this,_distance2)||0),this.setVar(__privateGet(this,_progressVarCSSProperty).current,__privateGet(this,_progress)),__privateGet(this,_progressArcVarCSSProperty).current&&this.setVar(__privateGet(this,_progressArcVarCSSProperty).current,this.progressArc)},"#updateProgress"),handleClassSetting_fn=__name(function(e){if(__privateGet(this,_isDisabled)){e.previous&&__privateGet(this,_targetElement).classList.remove(e.previous),e.current&&__privateGet(this,_targetElement).classList.remove(e.current);return}e.current&&__privateGet(this,_isCaptured).current?(e.previous&&__privateGet(this,_targetElement).classList.remove(e.previous),__privateGet(this,_targetElement).classList.add(e.current)):!e.current&&e.previous&&__privateGet(this,_targetElement).classList.remove(e.previous)},"#handleClassSetting"),removeClasses_fn=__name(function(...className){className.forEach(c=>{c&&__privateGet(this,_targetElement).classList.remove(c)})},"#removeClasses"),removeVars_fn=__name(function(...vars){vars.forEach(v=>{v&&__privateGet(this,_targetElement).style.removeProperty(`--${v}`)})},"#removeVars"),removeCurrentMarks_fn=__name(function(){__privateMethod(this,_ScrollSegmentElement_instances,removeClasses_fn).call(this,__privateGet(this,_capturedCSSProperty).current,__privateGet(this,_capturedFromStartCSSProperty).current,__privateGet(this,_capturedFromFinishCSSProperty).current,__privateGet(this,_releasedCSSProperty).current,__privateGet(this,_releasedFromStartCSSProperty).current,__privateGet(this,_releasedFromFinishCSSProperty).current),__privateMethod(this,_ScrollSegmentElement_instances,removeVars_fn).call(this,__privateGet(this,_passedVarCSSProperty).current,__privateGet(this,_progressVarCSSProperty).current,__privateGet(this,_progressArcVarCSSProperty).current,__privateGet(this,_distanceVarCSSProperty).current,__privateGet(this,_startVarCSSProperty).current,__privateGet(this,_finishVarCSSProperty).current)},"#removeCurrentMarks"),__name(_ScrollSegmentElement,"ScrollSegmentElement");let ScrollSegmentElement=_ScrollSegmentElement;intersector_index.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ScrollSegmentElement);const _ScrollSectionButtonElement=class _ScrollSectionButtonElement extends ScrollButtonElement{handleClick(options){this.scrollElement.setPosition(this.scrollElement.vertical?layout.getCumulativeOffsetTop(this):layout.getCumulativeOffsetLeft(this),options)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}};__name(_ScrollSectionButtonElement,"ScrollSectionButtonElement");let ScrollSectionButtonElement=_ScrollSectionButtonElement;intersector_index.isBrowser&&!customElements.get("e-scroll-section-button")&&customElements.define("e-scroll-section-button",ScrollSectionButtonElement);var _counterChangeListener2;const _ScrollCounterElement=class _ScrollCounterElement extends ScrollUserElement{constructor(){super(...arguments);__privateAdd(this,_counterChangeListener2,__name(()=>{const value=this.scrollElement.counter.current+1,pad=parseInt(this.getAttribute("pad")||"0");this.textContent=value.toString().padStart(pad,"0")},"#counterChangeListener"))}connectedCallback(){return __async(this,null,function*(){__superGet(_ScrollCounterElement.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(__privateGet(this,_counterChangeListener2))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(__privateGet(this,_counterChangeListener2))}};_counterChangeListener2=new WeakMap,__name(_ScrollCounterElement,"ScrollCounterElement");let ScrollCounterElement=_ScrollCounterElement;intersector_index.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",ScrollCounterElement);var _sectionsChangeListener2;const _ScrollTotalElement=class _ScrollTotalElement extends ScrollUserElement{constructor(){super(...arguments);__privateAdd(this,_sectionsChangeListener2,__name(()=>{const value=this.scrollElement.limit+1,pad=parseInt(this.getAttribute("pad")||"0");this.textContent=value.toString().padStart(pad,"0")},"#sectionsChangeListener"))}connectedCallback(){return __async(this,null,function*(){__superGet(_ScrollTotalElement.prototype,this,"connectedCallback").call(this),this.scrollElement.sectionsInViewCSSProperty.subscribe(__privateGet(this,_sectionsChangeListener2)),this.scrollElement.addEventListener("scrollSectionsChange",__privateGet(this,_sectionsChangeListener2)),__privateGet(this,_sectionsChangeListener2).call(this)})}disconnectedCallback(){this.scrollElement.sectionsInViewCSSProperty.unsubscribe(__privateGet(this,_sectionsChangeListener2)),this.scrollElement.removeEventListener("scrollSectionsChange",__privateGet(this,_sectionsChangeListener2))}};_sectionsChangeListener2=new WeakMap,__name(_ScrollTotalElement,"ScrollTotalElement");let ScrollTotalElement=_ScrollTotalElement;intersector_index.isBrowser&&!customElements.get("e-scroll-total")&&customElements.define("e-scroll-total",ScrollTotalElement);exports.ScrollBulletButtonsElement=ScrollBulletButtonsElement;exports.ScrollCounterElement=ScrollCounterElement;exports.ScrollElement=ScrollElement;exports.ScrollScrollbarElement=ScrollScrollbarElement;exports.ScrollSectionButtonElement=ScrollSectionButtonElement;exports.ScrollSegmentElement=ScrollSegmentElement;exports.ScrollSetButtonElement=ScrollSetButtonElement;exports.ScrollStepButtonElement=ScrollStepButtonElement;exports.ScrollTotalElement=ScrollTotalElement;
|
package/lib/scroll/index.js
CHANGED
|
@@ -44,14 +44,14 @@ import { c as createStylesheet } from "../stylesheet-CBTuup4f.js";
|
|
|
44
44
|
import { TICK_ORDER, RESIZE_ORDER } from "../order/index.js";
|
|
45
45
|
import { D as Damped } from "../Damped-Ds17AUU-.js";
|
|
46
46
|
import { T as Tweened } from "../Tweened-DabaFaHX.js";
|
|
47
|
-
import { W as WheelControls, K as KeyboardControls, D as DragControls, A as AutoplayControls } from "../DragControls-
|
|
48
|
-
import { windowResizer } from "../window-resizer/index.js";
|
|
49
|
-
import { scrollEntries } from "../scroll-entries/index.js";
|
|
50
|
-
import { cssUnitParser } from "../css-unit-parser/index.js";
|
|
47
|
+
import { W as WheelControls, K as KeyboardControls, D as DragControls, A as AutoplayControls } from "../DragControls-owFuNKoh.js";
|
|
51
48
|
import { CSSProperty } from "../css-property/index.js";
|
|
49
|
+
import { cssUnitParser } from "../css-unit-parser/index.js";
|
|
52
50
|
import { d as device } from "../Viewport-0n1C_IoN.js";
|
|
53
|
-
import "construct-style-sheets-polyfill";
|
|
54
51
|
import { elementResizer } from "../element-resizer/index.js";
|
|
52
|
+
import { scrollEntries } from "../scroll-entries/index.js";
|
|
53
|
+
import { windowResizer } from "../window-resizer/index.js";
|
|
54
|
+
import "construct-style-sheets-polyfill";
|
|
55
55
|
import { s as setupDrag } from "../gestures-DmKKNnh4.js";
|
|
56
56
|
import { b as findParentElement } from "../dom-D8D-_9ty.js";
|
|
57
57
|
var _element, _index, _scrollElement, _width, _height, _size, _position, _currentMark, _transformPosition, _ScrollSection_instances, setVar_fn;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);const intersector_index=require("./index-DZ44osDT.cjs"),dom=require("./dom-B40i6NXw.cjs");require("construct-style-sheets-polyfill");require("./Store-DZnOrofs.cjs");const easings=require("./easings-BWq0pPLq.cjs"),Tweened=require("./Tweened-3UYSwrvs.cjs"),gestures=require("./gestures-DtYbQr49.cjs"),number=require("./number-Bu4sGvW7.cjs"),order_index=require("./order/index.cjs"),notifier_index=require("./notifier/index.cjs");var _changeEvent;const _Controls=class _Controls{constructor(){__privateAdd(this,_changeEvent,new notifier_index.Notifier)}get changeEvent(){return __privateGet(this,_changeEvent)}};_changeEvent=new WeakMap,__name(_Controls,"Controls");let Controls=_Controls;var _element,_dimensionElement,_dimension,_keydownListener;const _KeyboardControls=class _KeyboardControls extends Controls{constructor(options){super();__privateAdd(this,_element,null);__privateAdd(this,_dimensionElement,null);__privateAdd(this,_dimension,"offsetHeight");__privateAdd(this,_keydownListener,__name(e=>{const dir=e.shiftKey?-1:1;let value;e.code==="Space"?value=dir*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.4:e.code==="ArrowLeft"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowRight"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="PageUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="PageDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="Home"?value=0:e.code==="End"&&(value=__privateGet(this,_dimension)==="offsetWidth"?__privateGet(this,_dimensionElement).scrollWidth:__privateGet(this,_dimensionElement).scrollHeight),value&&(e.stopPropagation(),this.changeEvent.notify("keyboard",value,e))},"#keydownListener"));intersector_index.isBrowser&&(__privateSet(this,_element,options!=null&&options.element&&dom.getElement(options.element)||window),__privateSet(this,_dimensionElement,__privateGet(this,_element)instanceof HTMLElement?__privateGet(this,_element):document.documentElement),this.dimension=options==null?void 0:options.dimension)}set dimension(value){__privateSet(this,_dimension,value==="width"?"offsetWidth":"offsetHeight")}connect(){intersector_index.isBrowser&&__privateGet(this,_element).addEventListener("keydown",__privateGet(this,_keydownListener))}disconnect(){intersector_index.isBrowser&&__privateGet(this,_element).removeEventListener("keydown",__privateGet(this,_keydownListener))}};_element=new WeakMap,_dimensionElement=new WeakMap,_dimension=new WeakMap,_keydownListener=new WeakMap,__name(_KeyboardControls,"KeyboardControls");let KeyboardControls=_KeyboardControls;var _speed,_interval,_options,_intervalId,_paused,_pauseTimeoutId,_connected,_AutoplayControls_instances,setup_fn,clear_fn,_animationFrameCallback,_intervalCallback,_documentVisibilityChangeListener;const _AutoplayControls=class _AutoplayControls extends Controls{constructor(options){super();__privateAdd(this,_AutoplayControls_instances);__privateAdd(this,_speed);__privateAdd(this,_interval);__privateAdd(this,_options);__privateAdd(this,_intervalId);__privateAdd(this,_paused);__privateAdd(this,_pauseTimeoutId);__privateAdd(this,_connected);__privateAdd(this,_animationFrameCallback);__privateAdd(this,_intervalCallback);__privateAdd(this,_documentVisibilityChangeListener);this.direction=1,__privateSet(this,_paused,new Tweened.Tweened(0,{easing:easings.easeInQuad})),__privateSet(this,_connected,!1),__privateSet(this,_animationFrameCallback,e=>{__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",e.timeBetweenFrames*__privateGet(this,_speed)*this.direction*(1-__privateGet(this,_paused).current),e)}),__privateSet(this,_intervalCallback,()=>{__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",Math.sign(__privateGet(this,_speed))*this.direction*(1-__privateGet(this,_paused).current),null)}),__privateSet(this,_documentVisibilityChangeListener,()=>{__privateGet(this,_interval)&&(document.hidden?__privateGet(this,_paused).set(1,{equalize:!0}):__privateGet(this,_paused).set(0,{equalize:!0}))}),__privateSet(this,_speed,(options==null?void 0:options.speed)||1),__privateSet(this,_interval,(options==null?void 0:options.interval)||!1),__privateSet(this,_options,options)}set interval(value){__privateSet(this,_interval,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}set speed(value){__privateSet(this,_speed,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}connect(){__privateGet(this,_connected)||(__privateSet(this,_connected,!0),__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this))}disconnect(){__privateGet(this,_connected)&&(__privateSet(this,_connected,!1),__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this))}pauseAndContinue(duration,instant){__privateGet(this,_connected)&&duration&&(clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).set(1,{duration:Math.min(duration,1e3),equalize:instant}),__privateSet(this,_pauseTimeoutId,setTimeout(()=>{__privateGet(this,_paused).set(0,{duration:Math.min(duration,5e3),equalize:instant})},duration)))}};_speed=new WeakMap,_interval=new WeakMap,_options=new WeakMap,_intervalId=new WeakMap,_paused=new WeakMap,_pauseTimeoutId=new WeakMap,_connected=new WeakMap,_AutoplayControls_instances=new WeakSet,setup_fn=__name(function(){__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this),__privateGet(this,_interval)?__privateSet(this,_intervalId,setInterval(__privateGet(this,_intervalCallback),Math.abs(__privateGet(this,_speed)))):intersector_index.ticker.subscribe(__privateGet(this,_animationFrameCallback),__privateGet(this,_options)),document.addEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#setup"),clear_fn=__name(function(){clearInterval(__privateGet(this,_intervalId)),intersector_index.ticker.unsubscribe(__privateGet(this,_animationFrameCallback)),clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).close(),document.removeEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#clear"),_animationFrameCallback=new WeakMap,_intervalCallback=new WeakMap,_documentVisibilityChangeListener=new WeakMap,__name(_AutoplayControls,"AutoplayControls");let AutoplayControls=_AutoplayControls;var _element2,_timeoutId,_prevEventDate,_wheelListener;const _WheelControls=class _WheelControls extends Controls{constructor(options){super();__privateAdd(this,_element2,null);__privateAdd(this,_timeoutId);__privateAdd(this,_prevEventDate);__privateAdd(this,_wheelListener,__name(event=>{let delta=0;const absY=Math.abs(event.deltaY),absX=Math.abs(event.deltaX);if(!(this.axis==="x"&&absY>absX||this.axis==="y"&&absX>absY)&&(event.preventDefault(),!(this.debounce&&this.axis==="x"&&absX<5||this.debounce&&this.axis==="y"&&absY<5)))if(delta=(this.axis==="max"?absX>absY?event.deltaX:event.deltaY:this.axis==="x"?event.deltaX:event.deltaY)*this.speed,event.stopPropagation(),this.debounce){const now=Date.now();if(now-__privateGet(this,_prevEventDate)>40&&(delta=100*Math.sign(delta)),__privateSet(this,_prevEventDate,now),Math.abs(delta)<100||__privateGet(this,_timeoutId))return;this.changeEvent.notify("wheel",delta,event),__privateSet(this,_timeoutId,setTimeout(()=>{__privateSet(this,_timeoutId,void 0)},80))}else this.changeEvent.notify("wheel",delta,event)},"#wheelListener"));this.axis=(options==null?void 0:options.axis)||"y",this.speed=(options==null?void 0:options.speed)||1,this.debounce=(options==null?void 0:options.debounce)||!1,__privateSet(this,_prevEventDate,Date.now()),intersector_index.isBrowser&&__privateSet(this,_element2,options!=null&&options.element&&dom.getElement(options.element)||window)}connect(){intersector_index.isBrowser&&__privateGet(this,_element2).addEventListener("wheel",__privateGet(this,_wheelListener),{passive:!1})}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_element2).removeEventListener("wheel",__privateGet(this,_wheelListener)),clearTimeout(__privateGet(this,_timeoutId)))}};_element2=new WeakMap,_timeoutId=new WeakMap,_prevEventDate=new WeakMap,_wheelListener=new WeakMap,__name(_WheelControls,"WheelControls");let WheelControls=_WheelControls;var _currentElement,_rootElement,_element3,_delta,_linkElements,_dragDelta,_linkClickListener,_pointerdownListener,_tickListener;const _DragControls=class _DragControls extends Controls{constructor(options){super();__privateAdd(this,_rootElement);__privateAdd(this,_element3);__privateAdd(this,_delta);__privateAdd(this,_linkElements);__privateAdd(this,_dragDelta);__privateAdd(this,_linkClickListener);__privateAdd(this,_pointerdownListener);__privateAdd(this,_tickListener);this.inertion=1,__privateSet(this,_rootElement,null),__privateSet(this,_element3,null),__privateSet(this,_delta,0),__privateSet(this,_linkElements,[]),__privateSet(this,_dragDelta,0),__privateSet(this,_linkClickListener,e=>{Math.abs(__privateGet(this,_dragDelta))>2&&e.preventDefault()}),__privateSet(this,_pointerdownListener,grabEvent=>{if(__privateSet(this,_dragDelta,0),__privateSet(this,_delta,0),grabEvent.button!==0||grabEvent.composedPath().find(p=>p instanceof HTMLElement&&p.hasAttribute("drag-dead-zone")))return;this.swipe||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener));let prev=grabEvent,okToNotify=!1;document.documentElement.classList.add("grabbing");let dx=0,dy=0,ddx=0,ddy=0;gestures.setupDrag(moveEvent=>{__privateGet(_DragControls,_currentElement)&&__privateGet(_DragControls,_currentElement)!==__privateGet(this,_element3)||(dx=prev.x-moveEvent.x,dy=prev.y-moveEvent.y,ddx=moveEvent.x-grabEvent.x,ddy=moveEvent.y-grabEvent.y,this.axis==="x"?(__privateSet(this,_dragDelta,ddx),__privateSet(this,_delta,dx)):(__privateSet(this,_dragDelta,ddy),__privateSet(this,_delta,dy)),prev=moveEvent,okToNotify=this.axis==="x"&&Math.abs(ddx)>Math.abs(ddy)||this.axis==="y"&&Math.abs(ddy)>Math.abs(ddx),okToNotify&&(document.documentElement.classList.add("dragging"),document.documentElement.classList.add("click-disabled"),__privateSet(_DragControls,_currentElement,__privateGet(this,_element3)),this.changeEvent.notify("drag",__privateGet(this,_delta),moveEvent)))},e=>{__privateSet(_DragControls,_currentElement,null),okToNotify&&(!this.swipe&&this.inertion?(__privateSet(this,_delta,__privateGet(this,_delta)*this.inertion),intersector_index.ticker.subscribe(__privateGet(this,_tickListener),{order:order_index.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",__privateGet(this,_delta),e)),setTimeout(()=>{document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging"),document.documentElement.classList.remove("click-disabled")})})}),__privateSet(this,_tickListener,()=>{Math.floor(Math.abs(__privateGet(this,_delta)))||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)),__privateSet(this,_delta,__privateGet(this,_delta)*.95),__privateSet(this,_delta,number.preciseNumber(__privateGet(this,_delta),3)),this.changeEvent.notify("drag",__privateGet(this,_delta),null)}),this.axis=(options==null?void 0:options.axis)||"y",this.swipe=(options==null?void 0:options.swipe)||!1,intersector_index.isBrowser&&(__privateSet(this,_element3,options!=null&&options.element&&dom.getElement(options.element)||document.documentElement),__privateSet(this,_rootElement,(options==null?void 0:options.rootElement)||__privateGet(this,_element3)))}connect(){intersector_index.isBrowser&&(__privateSet(this,_linkElements,[...__privateGet(this,_rootElement).querySelectorAll("a")]),__privateGet(this,_linkElements).forEach(element=>{element.addEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).addEventListener("pointerdown",__privateGet(this,_pointerdownListener)))}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_linkElements).forEach(element=>{element.removeEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).removeEventListener("pointerdown",__privateGet(this,_pointerdownListener)),intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)))}};_currentElement=new WeakMap,_rootElement=new WeakMap,_element3=new WeakMap,_delta=new WeakMap,_linkElements=new WeakMap,_dragDelta=new WeakMap,_linkClickListener=new WeakMap,_pointerdownListener=new WeakMap,_tickListener=new WeakMap,__name(_DragControls,"DragControls"),__privateAdd(_DragControls,_currentElement,null);let DragControls=_DragControls;exports.AutoplayControls=AutoplayControls;exports.Controls=Controls;exports.DragControls=DragControls;exports.KeyboardControls=KeyboardControls;exports.WheelControls=WheelControls;
|