aptechka 0.5.31 → 0.5.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
- import { RoundedBoxGeometry } from 'three/examples/jsm/Addons.js';
2
1
  import { En3SourceConsumer } from './En3SourceConsumer';
3
2
  import { En3SourceManager, En3SourceManagerLoader, En3SourceManagerParameters } from '../attachments/En3SourceManager';
4
- import { Material, Mesh, Texture } from 'three';
3
+ import { BufferGeometry, Material, Mesh, Texture } from 'three';
5
4
 
6
5
  export type En3ImageLikeMaterial<TTexture extends Texture> = Material & {
7
6
  map: TTexture | null;
@@ -16,7 +15,7 @@ export interface En3ImageLikeParameters<TTexture extends Texture, TMaterial exte
16
15
  fit?: En3ImageLikeFit;
17
16
  loader: En3SourceManagerLoader<TTexture>;
18
17
  }
19
- export declare class En3ImageLike<TTexture extends Texture, TMaterial extends En3ImageLikeMaterial<TTexture>> extends Mesh<RoundedBoxGeometry, TMaterial> implements En3SourceConsumer<TTexture> {
18
+ export declare class En3ImageLike<TTexture extends Texture, TMaterial extends En3ImageLikeMaterial<TTexture>> extends Mesh<BufferGeometry, TMaterial> implements En3SourceConsumer<TTexture> {
20
19
  #private;
21
20
  constructor(parameters: En3ImageLikeParameters<TTexture, TMaterial>);
22
21
  get sourceManager(): En3SourceManager<TTexture>;
@@ -0,0 +1,30 @@
1
+ import { ShaderPass } from './ShaderPass';
2
+ import { Texture, Vector2, WebGLRenderTarget } from 'three';
3
+
4
+ export interface AdvectionParameters {
5
+ cellScale: Vector2;
6
+ fboSize: Vector2;
7
+ dt: number;
8
+ src: WebGLRenderTarget<Texture>;
9
+ dst: WebGLRenderTarget<Texture>;
10
+ BFECC: boolean;
11
+ }
12
+ export interface AdvectionUpdateParameters {
13
+ dt: number;
14
+ isBounce: boolean;
15
+ BFECC: boolean;
16
+ }
17
+ export interface AdvectionUniforms {
18
+ boundarySpace: Vector2;
19
+ px: Vector2;
20
+ fboSize: Vector2;
21
+ velocity: Texture;
22
+ dt: number;
23
+ isBFECC: boolean;
24
+ }
25
+ export declare class Advection extends ShaderPass<AdvectionUniforms> {
26
+ #private;
27
+ constructor(parameters: AdvectionParameters);
28
+ update(parameters: AdvectionUpdateParameters): void;
29
+ protected init(): void;
30
+ }
@@ -0,0 +1,23 @@
1
+ import { ShaderPass } from './ShaderPass';
2
+ import { Texture, Vector2, WebGLRenderTarget } from 'three';
3
+
4
+ export interface DivergenceParameters {
5
+ boundarySpace: Vector2;
6
+ src: WebGLRenderTarget<Texture>;
7
+ cellScale: Vector2;
8
+ dt: number;
9
+ dst: WebGLRenderTarget<Texture>;
10
+ }
11
+ export interface DivergenceUpdateParameters {
12
+ vel: WebGLRenderTarget<Texture>;
13
+ }
14
+ export interface DivergenceUniforms {
15
+ boundarySpace: Vector2;
16
+ velocity: Texture;
17
+ px: Vector2;
18
+ dt: number;
19
+ }
20
+ export declare class Divergence extends ShaderPass<DivergenceUniforms> {
21
+ constructor(parameters: DivergenceParameters);
22
+ update(parameters: DivergenceUpdateParameters): void;
23
+ }
@@ -0,0 +1,16 @@
1
+ import { Store } from '../../../store';
2
+ import { Mesh, PlaneGeometry, RawShaderMaterial } from 'three';
3
+
4
+ export declare class En3Fluid extends Mesh<PlaneGeometry, RawShaderMaterial> {
5
+ #private;
6
+ colorTweenDuration: number;
7
+ constructor();
8
+ get backgroundColor(): Store<string, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<string>>;
9
+ get backgroundMixThreshold(): Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
10
+ get backgroundOpacity(): Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
11
+ get fluidColor(): Store<string, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<string>>;
12
+ get fluidOpacity(): Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
13
+ resize(): void;
14
+ update(): void;
15
+ dispose(): void;
16
+ }
@@ -0,0 +1,14 @@
1
+ import { En3Fluid } from './En3Fluid';
2
+ import { CustomElement } from '../../../custom-element';
3
+
4
+ export declare class En3FluidElement extends CustomElement {
5
+ #private;
6
+ get fluid(): En3Fluid;
7
+ protected connectedCallback(): void;
8
+ protected disconnectedCallback(): void;
9
+ }
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ 'e-fluid': En3FluidElement;
13
+ }
14
+ }
@@ -0,0 +1,13 @@
1
+ import * as THREE from 'three';
2
+ declare class En3FluidPointer {
3
+ #private;
4
+ disabled: boolean;
5
+ init(): void;
6
+ dispose(): void;
7
+ get coords(): THREE.Vector2;
8
+ get diff(): THREE.Vector2;
9
+ updateCoords(x?: number, y?: number): void;
10
+ update(): void;
11
+ }
12
+ export declare const en3FluidPointer: En3FluidPointer;
13
+ export {};
@@ -0,0 +1,19 @@
1
+ import { ShaderPass } from './ShaderPass';
2
+ import { Texture, Vector2, WebGLRenderTarget } from 'three';
3
+
4
+ export interface ExternalForceParameters {
5
+ cellScale: Vector2;
6
+ pointerSize: number;
7
+ dst: WebGLRenderTarget<Texture>;
8
+ }
9
+ export interface ExternalForceUpdateParameters {
10
+ cellScale: Vector2;
11
+ pointerForce: number;
12
+ pointerSize: number;
13
+ }
14
+ export declare class ExternalForce extends ShaderPass {
15
+ #private;
16
+ constructor(parameters: ExternalForceParameters);
17
+ update(parameters: ExternalForceUpdateParameters): void;
18
+ protected init(parameters: ExternalForceParameters): void;
19
+ }
@@ -0,0 +1,24 @@
1
+ import { ShaderPass } from './ShaderPass';
2
+ import { Texture, Vector2, WebGLRenderTarget } from 'three';
3
+
4
+ export interface PoissonParameters {
5
+ boundarySpace: Vector2;
6
+ dst: WebGLRenderTarget<Texture>;
7
+ dst_: WebGLRenderTarget<Texture>;
8
+ src: WebGLRenderTarget<Texture>;
9
+ cellScale: Vector2;
10
+ }
11
+ export interface PoissonUpdateParameters {
12
+ iterations: number;
13
+ }
14
+ export interface PoissonUniforms {
15
+ boundarySpace: Vector2;
16
+ pressure: Texture;
17
+ divergence: Texture;
18
+ px: Vector2;
19
+ }
20
+ export declare class Poisson extends ShaderPass<PoissonUniforms> {
21
+ #private;
22
+ constructor(parameters: PoissonParameters);
23
+ update(parameters: PoissonUpdateParameters): WebGLRenderTarget<Texture>;
24
+ }
@@ -0,0 +1,26 @@
1
+ import { ShaderPass } from './ShaderPass';
2
+ import { Texture, Vector2, WebGLRenderTarget } from 'three';
3
+
4
+ export interface PressureParameters {
5
+ boundarySpace: Vector2;
6
+ srcP: WebGLRenderTarget<Texture>;
7
+ srcV: WebGLRenderTarget<Texture>;
8
+ dst: WebGLRenderTarget<Texture>;
9
+ cellScale: Vector2;
10
+ dt: number;
11
+ }
12
+ export interface PressureUpdateParameters {
13
+ vel: WebGLRenderTarget<Texture>;
14
+ pressure: WebGLRenderTarget<Texture>;
15
+ }
16
+ export interface PressureUniforms {
17
+ boundarySpace: Vector2;
18
+ pressure: Texture;
19
+ velocity: Texture;
20
+ px: Vector2;
21
+ dt: number;
22
+ }
23
+ export declare class Pressure extends ShaderPass<PressureUniforms> {
24
+ constructor(parameters: PressureParameters);
25
+ update(parameters: PressureUpdateParameters): void;
26
+ }
@@ -0,0 +1,24 @@
1
+ import { Camera, Scene, ShaderMaterialParameters, Texture, WebGLRenderTarget } from 'three';
2
+
3
+ export interface ShaderPassParameters<Uniforms extends ShaderPassDefaultUniforms = ShaderPassDefaultUniforms> {
4
+ material?: Omit<ShaderMaterialParameters, 'uniforms'> & {
5
+ uniforms?: Uniforms;
6
+ };
7
+ output: WebGLRenderTarget<Texture>;
8
+ }
9
+ export type ShaderPassDefaultUniforms = {
10
+ [key: string]: any;
11
+ };
12
+ export declare class ShaderPass<Uniforms extends ShaderPassDefaultUniforms = ShaderPassDefaultUniforms> {
13
+ #private;
14
+ output: WebGLRenderTarget<Texture>;
15
+ constructor(parameters: ShaderPassParameters<Uniforms>);
16
+ get scene(): Scene;
17
+ get camera(): Camera;
18
+ get uniforms(): { [K in keyof Uniforms]: {
19
+ value: Uniforms[K];
20
+ }; };
21
+ update(..._args: any[]): void;
22
+ dispose(): void;
23
+ protected init(..._args: any[]): void;
24
+ }
@@ -0,0 +1,33 @@
1
+ import { WebGLRenderTarget } from 'three';
2
+ import { Store } from '../../../store';
3
+
4
+ export interface SimulationFBOS {
5
+ vel0: WebGLRenderTarget;
6
+ vel1: WebGLRenderTarget;
7
+ velViscous0: WebGLRenderTarget;
8
+ velViscous1: WebGLRenderTarget;
9
+ div: WebGLRenderTarget;
10
+ pressure0: WebGLRenderTarget;
11
+ pressure1: WebGLRenderTarget;
12
+ }
13
+ export declare class Simulation {
14
+ #private;
15
+ constructor();
16
+ get parameters(): {
17
+ isViscous: Store<boolean, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<boolean>>;
18
+ viscous: Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
19
+ iterationsViscous: Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
20
+ pointerForce: Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
21
+ pointerSize: Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
22
+ dt: Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
23
+ iterationsPoisson: Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
24
+ resolution: Store<number, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<number>>;
25
+ isBounce: Store<boolean, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<boolean>>;
26
+ BFECC: Store<boolean, keyof import('../../../store').StoreManagers, import('../../../store').StoreEntry<boolean>>;
27
+ };
28
+ get fbos(): SimulationFBOS;
29
+ resize(): void;
30
+ update(): void;
31
+ dispose(): void;
32
+ protected init(): void;
33
+ }
@@ -0,0 +1,30 @@
1
+ import { Texture, Vector2, WebGLRenderTarget } from 'three';
2
+ import { ShaderPass } from './ShaderPass';
3
+
4
+ export interface ViscousParameters {
5
+ boundarySpace: Vector2;
6
+ src: WebGLRenderTarget<Texture>;
7
+ dst_: WebGLRenderTarget<Texture>;
8
+ viscous: number;
9
+ cellScale: Vector2;
10
+ dt: number;
11
+ dst: WebGLRenderTarget<Texture>;
12
+ }
13
+ export interface ViscousUpdateParameters {
14
+ viscous: number;
15
+ iterations: number;
16
+ dt: number;
17
+ }
18
+ export interface ViscousUniforms {
19
+ boundarySpace: Vector2;
20
+ velocity: Texture;
21
+ velocity_new: Texture;
22
+ v: number;
23
+ px: Vector2;
24
+ dt: number;
25
+ }
26
+ export declare class Viscous extends ShaderPass<ViscousUniforms> {
27
+ #private;
28
+ constructor(parameters: ViscousParameters);
29
+ update(parameters: ViscousUpdateParameters): WebGLRenderTarget<Texture>;
30
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Based on https://github.com/mnmxmx/fluid-three
3
+ */
4
+ export { En3Fluid } from './En3Fluid';
5
+ export { En3FluidElement } from './En3FluidElement';
6
+ export { en3FluidPointer } from './En3FluidPointer';
@@ -1 +1 @@
1
- "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-DxwUBxOC.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),S=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),x=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s),h,b,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),x(this,h,void 0),x(this,b,new S.CSSProperty(this,"--damping",20)),x(this,g,new S.CSSProperty(this,"--mass",0)),x(this,z,new S.CSSProperty(this,"--stiffness",0)),x(this,W,new S.CSSProperty(this,"--cartesian",!1)),x(this,R,new S.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,b).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,b).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,b).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;b=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
1
+ "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-3daHRLIW.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),S=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),x=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s),h,b,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),x(this,h,void 0),x(this,b,new S.CSSProperty(this,"--damping",20)),x(this,g,new S.CSSProperty(this,"--mass",0)),x(this,z,new S.CSSProperty(this,"--stiffness",0)),x(this,W,new S.CSSProperty(this,"--cartesian",!1)),x(this,R,new S.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,b).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,b).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,b).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;b=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
@@ -23,7 +23,7 @@ import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
23
23
  import { g as U } from "../dom-0S_WDL4g.js";
24
24
  import { c as A } from "../math-BOBiC4TN.js";
25
25
  import "../ticker/index.js";
26
- import { D as W } from "../Damped-QZAoXO5Z.js";
26
+ import { D as W } from "../Damped-CH96byE8.js";
27
27
  import { elementResizer as B } from "../element-resizer/index.js";
28
28
  import { windowResizer as G } from "../window-resizer/index.js";
29
29
  import { CustomElement as V, define as X } from "../custom-element/index.js";
@@ -1 +1 @@
1
- "use strict";var ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(ms(r,e,"read from private field"),i?i.call(r):e.get(r)),V=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},F=(r,e,i,n)=>(ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Et=require("../Store-C-1ruEIm.cjs"),qs=require("../Derived-B-g8dYgh.cjs"),as=require("../browser-CpzFX2xg.cjs"),yt=require("../layout-8ryRAMGJ.cjs"),ls=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Pe=require("../order/index.cjs"),ys=require("../Damped-DxwUBxOC.cjs"),xe=require("../controls/index.cjs"),_t=require("../custom-element/index.cjs"),ue=require("../window-resizer/index.cjs"),Gt=require("../scroll-entries/index.cjs"),I=require("../tags-Djb6mb1o.cjs"),cs=require("../createStylesheet-CqHU9_qv.cjs"),ws=require("../css-unit-parser/index.cjs"),u=require("../css-property/index.cjs"),Ts=require("../Viewport-DMB0dO-s.cjs"),Ge=require("../element-resizer/index.cjs"),Bs=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Is=require("../dom-JBOkFLTh.cjs"),_s=require("../function-MthRj-GJ.cjs");var As=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Gs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Hs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&As(e,i,h),h},us=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(us(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},C=(r,e,i,n)=>(us(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),v=(r,e,i)=>(us(r,e,"access private method"),i),d,Nt,R,it,rt,Y,nt,kt,Wt,Q,T,Kt,Zt,Jt,Qt,fe,lt,Xt,Mt,X,Rt,vt,Yt,jt,b,Ue,p,Le,ze,W,y,B,j,Bt,mt,$,P,de,xt,pe,Se,oe,_e,It,ae,Ne,ps,Ke,Ss,Ve,Qe,Oe,Xe,A,Ze,Ye,Ps,ve,$e,De,je,ct,qt,ts,Es,g,_,Ht,et,gt;class Us{constructor(e,i){V(this,g,void 0);V(this,_,void 0);V(this,Ht,0);V(this,et,0);V(this,gt,null);F(this,g,e),F(this,_,i),Gt.scrollEntries.register(o(this,g))}get size(){return o(this,Ht)}get position(){return o(this,et)}destroy(){Gt.scrollEntries.unregister(o(this,g)),o(this,g).style.transform="",this.mark(null)}setSize(e){e?(o(this,g).style.setProperty("--size",e+"px"),o(this,_).axisCSSProperty.current==="x"?(o(this,g).style.width=e+"px",o(this,g).style.height=""):(o(this,g).style.height=e+"px",o(this,g).style.width="")):(o(this,g).style.width="",o(this,g).style.height="",o(this,g).style.removeProperty("--size"))}resize(){F(this,Ht,o(this,_).vertical?o(this,g).offsetHeight:o(this,g).offsetWidth),F(this,et,o(this,_).vertical?yt.getCumulativeOffsetTop(o(this,g)):yt.getCumulativeOffsetLeft(o(this,g))),F(this,et,o(this,et)-o(this,_).contentPosition)}transform(){let e=0;const i=o(this,_).viewportSize*o(this,_).sectionDistanceScaleCSSProperty.current;o(this,_).infiniteCSSProperty.current&&o(this,_).overscroll&&o(this,et)+o(this,Ht)<o(this,_).currentScrollValue&&(e=o(this,_).distance*-1-o(this,_).gap),Gt.scrollEntries.update(o(this,g),o(this,_).axisCSSProperty.current,e);const n=o(this,_).currentScrollValue+e,h=o(this,et)-o(this,_).viewportSize-i,c=o(this,et)+o(this,Ht)+i,S=ls.clamp(n,h,c);o(this,_).vertical?o(this,g).style.transform=`translate3d(0px, ${S*-1}px, 0px)`:o(this,g).style.transform=`translate3d(${S*-1}px, 0px, 0px)`}mark(e){o(this,gt)!==e&&(o(this,gt)&&o(this,g).classList.remove(o(this,gt)),e&&o(this,g).classList.add(e),F(this,gt,e),o(this,g).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,gt)}})))}}g=new WeakMap,_=new WeakMap,Ht=new WeakMap,et=new WeakMap,gt=new WeakMap;const Ns=cs.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends _t.CustomElement{constructor(){super(),a(this,oe),a(this,It),a(this,Ne),a(this,Ke),a(this,Ve),a(this,Oe),a(this,Ye),a(this,De),a(this,ct),a(this,ts),a(this,d,null),a(this,Nt,new u.CSSProperty(this,"--controls",!0)),a(this,R,new u.CSSProperty(this,"--axis","y")),a(this,it,new u.CSSProperty(this,"--direction",0)),a(this,rt,new u.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,Y,new u.CSSProperty(this,"--split",!1)),a(this,nt,new u.CSSProperty(this,"--sectional",!1)),a(this,kt,new u.CSSProperty(this,"--auto-size",!1)),a(this,Wt,new u.CSSProperty(this,"--wheel-max-delta",!1)),a(this,Q,new u.CSSProperty(this,"--sections-in-view",1)),a(this,T,new u.CSSProperty(this,"--infinite",!1)),a(this,Kt,new u.CSSProperty(this,"--damping",20)),a(this,Zt,new u.CSSProperty(this,"--mass",0)),a(this,Jt,new u.CSSProperty(this,"--stiffness",0)),a(this,Qt,new u.CSSProperty(this,"--mouse-drag",!1)),a(this,fe,new u.CSSProperty(this,"--section-distance-scale",.5)),a(this,lt,new u.CSSProperty(this,"--autoplay",0)),a(this,Xt,new u.CSSProperty(this,"--autoplay-pause-duration",0)),a(this,Mt,new u.CSSProperty(this,"--autoplay-user-direction",!1)),a(this,X,new u.CSSProperty(this,"--classes",0)),a(this,Rt,new u.CSSProperty(this,"--current-index-start-offset",0)),a(this,vt,new u.CSSProperty(this,"--current-index-end-offset",0)),a(this,Yt,new u.CSSProperty(this,"--disabled",!1)),a(this,jt,new u.CSSProperty(this,"--hibernated",!1)),a(this,b,null),a(this,Ue,null),a(this,p,[]),a(this,Le,0),a(this,ze,0),a(this,W,0),a(this,y,0),a(this,B,0),a(this,j,null),a(this,Bt,null),a(this,mt,null),a(this,$,null),a(this,P,new Et.Store(0)),a(this,de,0),a(this,xt,0),a(this,pe,!0),a(this,Se,!0),a(this,A,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,P).current;if(C(this,Le,this.vertical?yt.getCumulativeOffsetTop(this):yt.getCumulativeOffsetLeft(this)),C(this,ze,this.vertical?yt.getCumulativeOffsetTop(t(this,b)):yt.getCumulativeOffsetLeft(t(this,b))),C(this,W,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,kt).current&&t(this,p).length){const n=t(this,Q).current,h=(t(this,W)-t(this,B)*(n-1))/n;t(this,p).forEach(c=>{c.setSize(h)})}else t(this,p).forEach(n=>{n.setSize()});if(t(this,p).forEach(n=>{n.resize()}),t(this,rt).current){C(this,y,t(this,W)*t(this,rt).current);const n=t(this,y)+t(this,W);this.vertical?(t(this,b).style.width=n+"px",t(this,b).style.height="100%"):(t(this,b).style.height=n+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",C(this,y,t(this,b).offsetHeight-t(this,W))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",C(this,y,t(this,b).offsetWidth-t(this,W)));if(!t(this,T).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);C(this,y,t(this,y)+h),t(this,d).max=t(this,y)}if(t(this,T).current&&t(this,p).length){const n=t(this,p)[t(this,p).length-1],h=n.position+n.size-t(this,W),c=t(this,y)-h;C(this,xt,n.position+n.size+c)}else C(this,xt,t(this,y));if(t(this,nt).current&&t(this,p).length){const n=t(this,p)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0})}),a(this,Ze,()=>{const e=this.currentScrollValue;if(C(this,de,Math.max(0,e-t(this,y))),t(this,p).length){let i=0;for(let n=0;n<t(this,p).length;n++){const h=t(this,p)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,P).current=i}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Gt.scrollEntries.update(this,t(this,R).current,e)}),a(this,ve,(e,i)=>{t(this,Nt).current&&(t(this,$).pauseAndContinue(t(this,Xt).current),t(this,Mt).current&&(t(this,$).direction=Math.sign(i)||1),t(this,$e).call(this,e,i))}),a(this,$e,(e,i)=>{if(t(this,it).current){if(t(this,it).current<0&&i>0)return;if(t(this,it).current>0&&i<0)return}if(!(e==="drag"&&!Ts.device.isMobile&&!t(this,Qt).current))if(t(this,nt).current){const n=Math.sign(i);t(this,p).length?this.shiftSections(n):t(this,d).shift(n*t(this,W))}else t(this,d).shift(i)}),as.isBrowser&&(C(this,d,new ys.Damped(0,{damping:.01,min:0,order:Pe.TICK_ORDER.SCROLL})),this.openShadow(Ns),I.element(this,{tabIndex:0,children:[I.div({class:"static",children:[I.slot({name:"static"})]}),I.div({class:"content",children:[I.slot({ref:e=>C(this,Ue,e)})],style:{flexDirection:new qs.Derived(t(this,R),e=>e==="x"?"row":"column")},ref:e=>C(this,b,e)})]}),C(this,j,new xe.WheelControls({element:t(this,b)})),t(this,j).changeEvent.subscribe(t(this,ve)),C(this,Bt,new xe.KeyboardControls({element:this})),t(this,Bt).changeEvent.subscribe(t(this,ve)),C(this,mt,new xe.DragControls({element:t(this,b)})),t(this,mt).changeEvent.subscribe(t(this,ve)),C(this,$,new xe.AutoplayControls),t(this,$).changeEvent.subscribe(t(this,$e)),t(this,R).subscribe(({current:e})=>{t(this,b).style.flexDirection=e==="x"?"row":"column",t(this,j).axis=t(this,Wt).current?"max":e,t(this,Bt).dimension=e==="x"?"width":"height",t(this,mt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,A).call(this)}),t(this,Wt).subscribe(e=>{t(this,j).axis=e.current?"max":t(this,R).current}),t(this,rt).subscribe(()=>{this.isConnected&&t(this,A).call(this)}),t(this,Y).subscribe(({current:e})=>{this.isConnected&&(e?v(this,oe,_e).call(this):v(this,It,ae).call(this))}),t(this,nt).subscribe(e=>{t(this,j).debounce=e.current,t(this,mt).swipe=e.current,t(this,$).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,kt).subscribe(e=>{this.isConnected&&(t(this,A).call(this),e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,Q).subscribe(e=>{this.isConnected&&(t(this,A).call(this),v(this,ct,qt).call(this))}),t(this,T).subscribe(e=>{e.current?(this.isConnected&&(t(this,p).length||(t(this,Y).current=!0)),t(this,p).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(C(this,de,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Kt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Zt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Jt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Yt).subscribe(e=>{e.current&&!e.previous?v(this,Ne,ps).call(this):!e.current&&e.previous&&v(this,Ke,Ss).call(this)}),t(this,jt).subscribe(e=>{e.current&&!e.previous?v(this,Ve,Qe).call(this):!e.current&&e.previous&&v(this,Oe,Xe).call(this)}),t(this,lt).subscribe(e=>{t(this,$).speed=e.current,e.current&&!e.previous?t(this,$).connect():!e.current&&e.previous&&t(this,$).disconnect()}),t(this,Mt).subscribe(e=>{e.current||(t(this,$).direction=1)}),t(this,X).subscribe(e=>{this.isConnected&&v(this,ct,qt).call(this)}),t(this,Rt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,vt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,p).length&&v(this,ct,qt).call(this)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Nt)}get axisCSSProperty(){return t(this,R)}get directionCSSProperty(){return t(this,it)}get pagesCSSProperty(){return t(this,rt)}get splitCSSProperty(){return t(this,Y)}get sectionalCSSProperty(){return t(this,nt)}get autoSizeCSSProperty(){return t(this,kt)}get wheelMaxDeltaCSSProperty(){return t(this,Wt)}get sectionsInViewCSSProperty(){return t(this,Q)}get infiniteCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,Kt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,Jt)}get mouseDragCSSProperty(){return t(this,Qt)}get sectionDistanceScaleCSSProperty(){return t(this,fe)}get autoplayCSSProperty(){return t(this,lt)}get autoplayPauseDurationCSSProperty(){return t(this,Xt)}get autoplayUserDirectionCSSProperty(){return t(this,Mt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,Rt)}get currentIndexEndOffsetCSSProperty(){return t(this,vt)}get disabledCSSProperty(){return t(this,Yt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return v(this,De,je).call(this,"current")}get targetScrollValue(){return v(this,De,je).call(this,"target")}get contentElement(){return t(this,b)}get sections(){return t(this,p)}get position(){return t(this,Le)}get contentPosition(){return t(this,ze)}get viewportSize(){return t(this,W)}get scrollSize(){return t(this,y)}get gap(){return t(this,B)}get counter(){return t(this,P)}get limit(){return t(this,p).length-t(this,Q).current}get distance(){return t(this,xt)}get infiniteDistance(){return t(this,T).current?t(this,xt)+t(this,B):t(this,xt)}get overscroll(){return t(this,de)}get vertical(){return t(this,R).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get scrollWidth(){return t(this,R).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,R).current==="x"?0:t(this,d).distance}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!t(this,p).length)return;const n=t(this,P).current;v(this,Ye,Ps).call(this,e);const h=t(this,p)[n],c=t(this,p)[t(this,P).current];if(h&&c){let S=0;const Me=v(this,ts,Es).call(this),Rs=Me?this.targetScrollValue-Me.position:0;t(this,T).current?t(this,P).current===0&&n===t(this,p).length-1?S=t(this,y)+t(this,W)-h.position+t(this,B):t(this,P).current===t(this,p).length-1&&n===0?S=c.position-(t(this,y)+t(this,W)+t(this,B)):S=c.position-h.position:S=c.position-h.position,t(this,d).shift(S-Rs,{equalize:i==="instant"})}}shiftSections(e,i="smooth"){t(this,p).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i="smooth"){t(this,d).set(e,{equalize:i==="instant"})}connectedCallback(){t(this,Nt).observe(),t(this,R).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,Y).observe(),t(this,nt).observe(),t(this,kt).observe(),t(this,Wt).observe(),t(this,Q).observe(),t(this,T).observe(),t(this,Kt).observe(),t(this,Zt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,fe).observe(),t(this,lt).observe(),t(this,lt).observe(),t(this,Xt).observe(),t(this,Mt).observe(),t(this,X).observe(),t(this,Rt).observe(),t(this,vt).observe(),t(this,Yt).observe(),t(this,jt).observe(),v(this,Oe,Xe).call(this)}disconnectedCallback(){t(this,Nt).unobserve(),t(this,R).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,Y).unobserve(),t(this,nt).unobserve(),t(this,kt).unobserve(),t(this,Wt).unobserve(),t(this,Q).unobserve(),t(this,T).unobserve(),t(this,Kt).unobserve(),t(this,Zt).unobserve(),t(this,Jt).unobserve(),t(this,Qt).unobserve(),t(this,fe).unobserve(),t(this,lt).unobserve(),t(this,Xt).unobserve(),t(this,Mt).unobserve(),t(this,X).unobserve(),t(this,Rt).unobserve(),t(this,vt).unobserve(),t(this,Yt).unobserve(),t(this,jt).unobserve(),v(this,Ve,Qe).call(this)}};d=new WeakMap;Nt=new WeakMap;R=new WeakMap;it=new WeakMap;rt=new WeakMap;Y=new WeakMap;nt=new WeakMap;kt=new WeakMap;Wt=new WeakMap;Q=new WeakMap;T=new WeakMap;Kt=new WeakMap;Zt=new WeakMap;Jt=new WeakMap;Qt=new WeakMap;fe=new WeakMap;lt=new WeakMap;Xt=new WeakMap;Mt=new WeakMap;X=new WeakMap;Rt=new WeakMap;vt=new WeakMap;Yt=new WeakMap;jt=new WeakMap;b=new WeakMap;Ue=new WeakMap;p=new WeakMap;Le=new WeakMap;ze=new WeakMap;W=new WeakMap;y=new WeakMap;B=new WeakMap;j=new WeakMap;Bt=new WeakMap;mt=new WeakMap;$=new WeakMap;P=new WeakMap;de=new WeakMap;xt=new WeakMap;pe=new WeakMap;Se=new WeakMap;oe=new WeakSet;_e=function(){v(this,It,ae).call(this),t(this,Ue).assignedElements().forEach(r=>{r instanceof HTMLElement&&t(this,p).push(new Us(r,this))}),t(this,b).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,A).call(this),v(this,ct,qt).call(this)};It=new WeakSet;ae=function(){t(this,p).forEach(r=>{r.destroy()}),C(this,p,[]),t(this,P).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Ne=new WeakSet;ps=function(){t(this,pe)||(C(this,pe,!0),t(this,d).unsubscribe(t(this,Ze)),t(this,d).unlistenAnimationFrame(),t(this,j).disconnect(),t(this,Bt).disconnect(),t(this,mt).disconnect(),t(this,$).disconnect())};Ke=new WeakSet;Ss=function(){t(this,pe)&&(C(this,pe,!1),t(this,d).subscribe(t(this,Ze)),t(this,j).connect(),t(this,Bt).connect(),t(this,mt).connect(),t(this,lt).current&&t(this,$).connect())};Ve=new WeakSet;Qe=function(){t(this,Se)||(C(this,Se,!0),ue.windowResizer.unsubscribe(t(this,A)),Ge.elementResizer.unsubscribe(t(this,A)),t(this,d).reset(),v(this,Ne,ps).call(this),t(this,b).style.transform="",t(this,Y).current&&v(this,It,ae).call(this),Gt.scrollEntries.unregister(this))};Oe=new WeakSet;Xe=function(){t(this,Se)&&(C(this,Se,!1),t(this,Y).current&&v(this,oe,_e).call(this),Gt.scrollEntries.register(this),ue.windowResizer.subscribe(t(this,A),Pe.RESIZE_ORDER.SCROLL),Ge.elementResizer.subscribe(this,t(this,A)),v(this,Ke,Ss).call(this))};A=new WeakMap;Ze=new WeakMap;Ye=new WeakSet;Ps=function(r){t(this,T).current?(t(this,P).current=r%t(this,p).length,t(this,P).current=t(this,P).current<0?t(this,p).length+t(this,P).current:t(this,P).current):t(this,P).current=ls.clamp(r,0,this.limit)};ve=new WeakMap;$e=new WeakMap;De=new WeakSet;je=function(r="current"){if(t(this,T).current&&t(this,p).length){const e=t(this,d)[r]%(t(this,y)+t(this,W)+t(this,B));return e<0?t(this,y)+e+t(this,W)+t(this,B):e}else return t(this,d)[r]};ct=new WeakSet;qt=function(){if(t(this,X).current&&t(this,p).length){const r=t(this,P).current+t(this,Rt).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,Q).current+t(this,vt).current;t(this,p).forEach((i,n)=>{const h=r-this.limit-1+t(this,vt).current,c=r+e,S=this.sections.length-c;n>=r&&n<c||n<=h?i.mark("current"):n>=c&&n<c+S/2||n<=h+e?i.mark("next"):i.mark("previous")})}};ts=new WeakSet;Es=function(){let r=null,e=1/0;for(let i=0;i<t(this,p).length;i++){const n=Math.abs(t(this,p)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,p)[r]:null};exports.ScrollElement=Gs([_t.define("e-scroll")],exports.ScrollElement);var Ee;class Je extends _t.CustomElement{constructor(){super(...arguments);V(this,Ee,null)}get scrollElement(){return o(this,Ee)}connectedCallback(){const i=Is.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?F(this,Ee,i):console.error(this,"e-scroll not found")}}Ee=new WeakMap;var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Js=(r,e,i,n)=>{for(var h=n>1?void 0:n?Zs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ks(e,i,h),h},ks=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},f=(r,e,i)=>(ks(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Pt=(r,e,i,n)=>(ks(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),me,q,ht,ot,we,be,te,Fe,Re,qe;const Qs=cs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorLight.var},':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:bs.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Je{constructor(){super(),N(this,me,null),N(this,q,null),N(this,ht,!1),N(this,ot,0),N(this,we,0),N(this,be,0),N(this,te,()=>{Pt(this,ht,this.offsetWidth>this.offsetHeight);const e=f(this,ht)?this.offsetWidth:this.offsetHeight;Pt(this,ot,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),Pt(this,ot,Math.max(f(this,ot),30)),f(this,ht)?(f(this,q).style.width=f(this,ot)+"px",f(this,q).style.height="100%"):(f(this,q).style.width="100%",f(this,q).style.height=f(this,ot)+"px"),Pt(this,we,e-f(this,ot)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,Fe,()=>{Pt(this,be,this.scrollElement.currentProgress*f(this,we)),f(this,ht)?f(this,q).style.transform=`translate3d(${f(this,be)}px, 0px, 0px)`:f(this,q).style.transform=`translate3d(0px, ${f(this,be)}px, 0px)`}),N(this,Re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,qe,e=>{document.documentElement.classList.add("grabbing"),Bs.setupDrag(h=>{const c=f(this,ht)?h.x:h.y,S=this.scrollElement.distance/f(this,we),Me=(c-n)*S;this.scrollElement.setPosition(i+Me)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=f(this,ht)?e.x:e.y}),as.isBrowser&&(this.openShadow(Qs),I.element(this,{slot:"static","drag-dead-zone":"",children:[I.slot({ref:e=>Pt(this,me,e),children:I.div({class:"default-thumb"})})]}))}get thumbElement(){return f(this,q)}connectedCallback(){super.connectedCallback();const e=f(this,me).assignedElements()[0]||f(this,me).firstElementChild;Pt(this,q,e),f(this,q).addEventListener("pointerdown",f(this,qe)),ue.windowResizer.subscribe(f(this,te),Pe.RESIZE_ORDER.SCROLL+1),Ge.elementResizer.subscribe(this,f(this,te)),this.scrollElement.onScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.subscribe(f(this,Re))}disconnectedCallback(){f(this,q).removeEventListener("pointerdown",f(this,qe)),ue.windowResizer.unsubscribe(f(this,te)),Ge.elementResizer.unsubscribe(f(this,te)),this.scrollElement.offScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.unsubscribe(f(this,Re))}};me=new WeakMap;q=new WeakMap;ht=new WeakMap;ot=new WeakMap;we=new WeakMap;be=new WeakMap;te=new WeakMap;Fe=new WeakMap;Re=new WeakMap;qe=new WeakMap;exports.ScrollbarElement=Js([_t.define("e-scrollbar")],exports.ScrollbarElement);const Xs=cs.createStylesheet({button:{all:"inherit"}});class Ws extends Je{constructor(){super(),this.openShadow(Xs),as.isBrowser&&I.element(this,{children:[I.button({onClick:()=>{this.handleClick()},children:[I.slot()]})]})}}var Ys=Object.defineProperty,js=Object.getOwnPropertyDescriptor,ti=(r,e,i,n)=>{for(var h=n>1?void 0:n?js(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ys(e,i,h),h};exports.ScrollSetButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=ti([_t.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var ei=Object.defineProperty,si=Object.getOwnPropertyDescriptor,ii=(r,e,i,n)=>{for(var h=n>1?void 0:n?si(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ei(e,i,h),h};exports.ScrollStepButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=ii([_t.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,hi=(r,e,i,n)=>{for(var h=n>1?void 0:n?ni(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ri(e,i,h),h},Ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ut=(r,e,i)=>(Ms(r,e,"read from private field"),i?i.call(r):e.get(r)),gs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Cs=(r,e,i,n)=>(Ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Lt,ge,st,Ct,le,ke,We,ce;class oi{constructor(e,i,n){V(this,st,void 0);V(this,Ct,void 0);V(this,le,void 0);V(this,ke,void 0);V(this,We,()=>{o(this,Ct).scrollToSection(o(this,le),o(this,ke))});V(this,ce,()=>{o(this,st).classList.toggle("current",o(this,Ct).counter.current===o(this,le))});F(this,st,document.createElement("button")),F(this,Ct,e),F(this,ke,n),F(this,le,i),o(this,st).addEventListener("click",o(this,We)),o(this,Ct).counter.subscribe(o(this,ce)),o(this,ce).call(this)}get element(){return o(this,st)}destroy(){o(this,st).removeEventListener("click",o(this,We)),o(this,Ct).counter.unsubscribe(o(this,ce)),o(this,st).remove()}}st=new WeakMap,Ct=new WeakMap,le=new WeakMap,ke=new WeakMap,We=new WeakMap,ce=new WeakMap;exports.ScrollBulletButtonsElement=class extends Je{constructor(){super(...arguments),gs(this,Lt,[]),gs(this,ge,_s.debounce(()=>{Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new oi(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ut(this,Lt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ut(this,ge)),Ut(this,ge).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ut(this,ge)),Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[])}};Lt=new WeakMap;ge=new WeakMap;exports.ScrollBulletButtonsElement=hi([_t.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var ai=Object.defineProperty,li=Object.getOwnPropertyDescriptor,ci=(r,e,i,n)=>{for(var h=n>1?void 0:n?li(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ai(e,i,h),h},fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(fs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},w=(r,e,i,n)=>(fs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),k=(r,e,i)=>(fs(r,e,"access private method"),i),ee,se,ie,re,zt,Vt,Ot,$t,D,H,G,U,Tt,x,ut,pt,St,ft,dt,M,J,Z,wt,bt,tt,Te,m,ne,he,Be,L,Dt,O,z,K,Ce,At,E,es,xs,ss,Ls,is,zs,rs,Vs,ns,Os,hs,$s,Ie,ye,at,Ft,ds,Ds,vs,Fs,Ae,os,He;exports.ScrollSegmentElement=class extends Je{constructor(){super(),l(this,es),l(this,ss),l(this,is),l(this,rs),l(this,ns),l(this,hs),l(this,at),l(this,ds),l(this,vs),l(this,Ae),l(this,ee,new u.CSSProperty(this,"--damping",20)),l(this,se,new u.CSSProperty(this,"--mass",0)),l(this,ie,new u.CSSProperty(this,"--stiffness",0)),l(this,re,new u.CSSProperty(this,"--target","")),l(this,zt,new u.CSSProperty(this,"--disabled",!1)),l(this,Vt,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),l(this,Ot,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),l(this,$t,new u.CSSProperty(this,"--capture-once",!1)),l(this,D,new u.CSSProperty(this,"--captured","")),l(this,H,new u.CSSProperty(this,"--released","")),l(this,G,new u.CSSProperty(this,"--captured-from-start","")),l(this,U,new u.CSSProperty(this,"--captured-from-finish","")),l(this,Tt,new u.CSSProperty(this,"--released-from-start","")),l(this,x,new u.CSSProperty(this,"--released-from-finish","")),l(this,ut,new u.CSSProperty(this,"--passed-var","")),l(this,pt,new u.CSSProperty(this,"--progress-var","")),l(this,St,new u.CSSProperty(this,"--distance-var","")),l(this,ft,new u.CSSProperty(this,"--start-var","")),l(this,dt,new u.CSSProperty(this,"--finish-var","")),l(this,M,new Et.Store(!1)),l(this,J,new Et.Store(!1)),l(this,Z,new Et.Store(!1)),l(this,wt,new Et.Store(!1)),l(this,bt,new Et.Store(!1)),l(this,tt,new Et.Store(!1)),l(this,Te,[]),l(this,m,this),l(this,ne,0),l(this,he,0),l(this,Be,0),l(this,L,new ys.Damped(0,{order:Pe.TICK_ORDER.SCROLL-1,min:0,max:1})),l(this,Dt,0),l(this,O,0),l(this,z,0),l(this,K,0),l(this,Ce,!1),l(this,At,!1),l(this,E,!0),l(this,Ie,()=>{s(this,E)||(this.resize(),s(this,ye).call(this))}),l(this,ye,()=>{!s(this,E)&&s(this,Ce)&&this.tick()}),l(this,He,_s.debounce(()=>{const e=Gt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),w(this,Te,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,Vt)}get startOffsetCSSProperty(){return s(this,Ot)}get captureOnceCSSProperty(){return s(this,$t)}get capturedCSSProperty(){return s(this,D)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,Tt)}get releasedFromFinishCSSProperty(){return s(this,x)}get passedVarCSSProperty(){return s(this,ut)}get progressVarCSSProperty(){return s(this,pt)}get distanceVarCSSProperty(){return s(this,St)}get startVarCSSProperty(){return s(this,ft)}get finishVarCSSProperty(){return s(this,dt)}get disabledCSSProperty(){return s(this,zt)}get dampingCSSProperty(){return s(this,ee)}get massCSSProperty(){return s(this,se)}get stiffnessCSSProperty(){return s(this,ie)}get targetCSSProperty(){return s(this,re)}get isCaptured(){return s(this,M)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,Z)}get isReleasedFromStart(){return s(this,wt)}get isCapturedFromFinish(){return s(this,bt)}get isReleasedFromFinish(){return s(this,tt)}get directionPosition(){return s(this,ne)}get directionSize(){return s(this,he)}get passed(){return s(this,L)}get progress(){return s(this,Dt)}get start(){return s(this,O)}get finish(){return s(this,K)}get distance(){return s(this,z)}get isCapturedOnce(){return s(this,At)}get isDisabled(){return s(this,E)}resize(){w(this,he,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),w(this,ne,this.scrollElement.vertical?yt.getCumulativeOffsetTop(this,this.scrollElement):yt.getCumulativeOffsetLeft(this,this.scrollElement)),w(this,O,this.getStart()),w(this,z,this.getDistance()),w(this,O,s(this,O)+s(this,Ot).current),w(this,z,s(this,z)+s(this,Vt).current),w(this,K,s(this,O)+s(this,z)),this.scrollElement.currentScrollValue>s(this,K)&&!s(this,M).current&&!s(this,J).current&&(s(this,M).current=!0),this.setVar(s(this,ft).current,s(this,O)),this.setVar(s(this,dt).current,s(this,K)),this.setVar(s(this,St).current,s(this,z)),s(this,L).max=s(this,z),w(this,Ce,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,Te).forEach(n=>{e+=n.value}),s(this,L).set(e-s(this,O));const i=Math.round(e);s(this,M).current&&(i>s(this,O)?s(this,Z).current||k(this,is,zs).call(this):s(this,Z).current&&!s(this,wt).current&&k(this,ns,Os).call(this),i<s(this,K)?s(this,tt).current&&!s(this,bt).current&&k(this,rs,Vs).call(this):s(this,Z).current&&!s(this,tt).current&&k(this,hs,$s).call(this)),i>s(this,O)&&i<s(this,K)?s(this,M).current||k(this,es,xs).call(this):s(this,M).current&&(s(this,L).set(ls.step(s(this,z)/2,s(this,L).current,0,s(this,z))),k(this,ss,Ls).call(this)),s(this,At)&&s(this,$t).current&&(s(this,D).current&&s(this,m).classList.add(s(this,D).current),w(this,E,!0))}disable(){this.style.cssText="",w(this,ne,0),w(this,he,0),s(this,L).reset(),w(this,Dt,0),w(this,O,0),w(this,z,0),w(this,K,0),w(this,Ce,!1),s(this,M).current=!1,s(this,J).current=!1,s(this,Z).current=!1,s(this,wt).current=!1,s(this,bt).current=!1,s(this,tt).current=!1,w(this,At,!1),w(this,E,!0),k(this,Ae,os).call(this)}enable(){w(this,E,!1)}connectedCallback(){super.connectedCallback(),s(this,ee).observe(),s(this,se).observe(),s(this,ie).observe(),s(this,re).observe(),s(this,zt).observe(),s(this,Vt).observe(),s(this,Ot).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,Tt).observe(),s(this,x).observe(),s(this,ut).observe(),s(this,pt).observe(),s(this,St).observe(),s(this,ft).observe(),s(this,dt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,He)),s(this,He).call(this),s(this,zt).current||this.enable(),s(this,ee).subscribe(i=>{s(this,L).damping=i.current}),s(this,se).subscribe(i=>{s(this,L).mass=i.current}),s(this,ie).subscribe(i=>{s(this,L).stiffness=i.current}),s(this,re).subscribe(i=>{i.previous&&k(this,Ae,os).call(this),i.current?i.current==="parent"?w(this,m,this.parentElement||this):w(this,m,document.querySelector(i.current)||this):w(this,m,this)}),s(this,zt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,Ot).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,Vt).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,D).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,G).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,U).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,H).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,Tt).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,x).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,$t).subscribe(i=>{s(this,E)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,ut).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,this.passed.current))}),s(this,pt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,Dt)))}),s(this,ft).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,O)))}),s(this,dt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,K)))}),s(this,St).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,z)))}),s(this,L).subscribe(i=>{w(this,Dt,s(this,L).current/s(this,z)||0),this.setVar(s(this,ut).current,s(this,L).current.toFixed(6)),this.setVar(s(this,pt).current,s(this,Dt).toFixed(6))}),ue.windowResizer.subscribe(s(this,Ie),Pe.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,ye)),e=!0}disconnectedCallback(){ue.windowResizer.unsubscribe(s(this,Ie)),this.scrollElement.offScroll(s(this,ye)),s(this,ee).close(),s(this,se).close(),s(this,ie).close(),s(this,re).close(),s(this,zt).close(),s(this,Vt).close(),s(this,Ot).close(),s(this,$t).close(),s(this,D).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,Tt).close(),s(this,x).close(),s(this,ut).close(),s(this,pt).close(),s(this,St).close(),s(this,ft).close(),s(this,dt).close(),s(this,M).close(),s(this,J).close(),s(this,Z).close(),s(this,wt).close(),s(this,bt).close(),s(this,tt).close(),this.disable()}removeVar(e){e&&s(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,m).style.setProperty(`--${e}`,i.toString())}getDistance(){return s(this,he)+s(this,Be)}getStart(){return s(this,ne)-s(this,Be)}};ee=new WeakMap;se=new WeakMap;ie=new WeakMap;re=new WeakMap;zt=new WeakMap;Vt=new WeakMap;Ot=new WeakMap;$t=new WeakMap;D=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;Tt=new WeakMap;x=new WeakMap;ut=new WeakMap;pt=new WeakMap;St=new WeakMap;ft=new WeakMap;dt=new WeakMap;M=new WeakMap;J=new WeakMap;Z=new WeakMap;wt=new WeakMap;bt=new WeakMap;tt=new WeakMap;Te=new WeakMap;m=new WeakMap;ne=new WeakMap;he=new WeakMap;Be=new WeakMap;L=new WeakMap;Dt=new WeakMap;O=new WeakMap;z=new WeakMap;K=new WeakMap;Ce=new WeakMap;At=new WeakMap;E=new WeakMap;es=new WeakSet;xs=function(){s(this,M).current=!0,s(this,J).current=!1,w(this,At,!0),s(this,H).current&&s(this,m).classList.remove(s(this,H).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,D).current&&s(this,m).classList.add(s(this,D).current)};ss=new WeakSet;Ls=function(){s(this,J).current=!0,s(this,M).current=!1,w(this,At,!0),s(this,D).current&&s(this,m).classList.remove(s(this,D).current),s(this,G).current&&s(this,m).classList.remove(s(this,G).current),s(this,U).current&&s(this,m).classList.remove(s(this,U).current),s(this,H).current&&s(this,m).classList.add(s(this,H).current)};is=new WeakSet;zs=function(){s(this,M).current=!0,s(this,Z).current=!0,s(this,wt).current=!1,s(this,G).current&&s(this,m).classList.add(s(this,G).current)};rs=new WeakSet;Vs=function(){s(this,M).current=!0,s(this,bt).current=!0,s(this,tt).current=!1,s(this,U).current&&s(this,m).classList.add(s(this,U).current)};ns=new WeakSet;Os=function(){s(this,J).current=!0,s(this,wt).current=!0,s(this,Z).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};hs=new WeakSet;$s=function(){s(this,J).current=!0,s(this,tt).current=!0,s(this,bt).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};Ie=new WeakMap;ye=new WeakMap;at=new WeakSet;Ft=function(r){if(s(this,E)){r.previous&&s(this,m).classList.remove(r.previous),r.current&&s(this,m).classList.remove(r.current);return}r.current&&s(this,M).current?(r.previous&&s(this,m).classList.remove(r.previous),s(this,m).classList.add(r.current)):!r.current&&r.previous&&s(this,m).classList.remove(r.previous)};ds=new WeakSet;Ds=function(...r){r.forEach(e=>{e&&s(this,m).classList.remove(e)})};vs=new WeakSet;Fs=function(...r){r.forEach(e=>{e&&s(this,m).style.removeProperty(`--${e}`)})};Ae=new WeakSet;os=function(){k(this,ds,Ds).call(this,s(this,D).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,Tt).current,s(this,x).current),k(this,vs,Fs).call(this,s(this,ut).current,s(this,pt).current,s(this,St).current,s(this,ft).current,s(this,dt).current)};He=new WeakMap;exports.ScrollSegmentElement=ci([_t.define("e-scroll-segment")],exports.ScrollSegmentElement);
1
+ "use strict";var ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(ms(r,e,"read from private field"),i?i.call(r):e.get(r)),V=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},F=(r,e,i,n)=>(ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Et=require("../Store-C-1ruEIm.cjs"),qs=require("../Derived-B-g8dYgh.cjs"),as=require("../browser-CpzFX2xg.cjs"),yt=require("../layout-8ryRAMGJ.cjs"),ls=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Pe=require("../order/index.cjs"),ys=require("../Damped-3daHRLIW.cjs"),xe=require("../controls/index.cjs"),_t=require("../custom-element/index.cjs"),ue=require("../window-resizer/index.cjs"),Gt=require("../scroll-entries/index.cjs"),I=require("../tags-Djb6mb1o.cjs"),cs=require("../createStylesheet-CqHU9_qv.cjs"),ws=require("../css-unit-parser/index.cjs"),u=require("../css-property/index.cjs"),Ts=require("../Viewport-DMB0dO-s.cjs"),Ge=require("../element-resizer/index.cjs"),Bs=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Is=require("../dom-JBOkFLTh.cjs"),_s=require("../function-MthRj-GJ.cjs");var As=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Gs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Hs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&As(e,i,h),h},us=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(us(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},C=(r,e,i,n)=>(us(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),v=(r,e,i)=>(us(r,e,"access private method"),i),d,Nt,R,it,rt,Y,nt,kt,Wt,Q,T,Kt,Zt,Jt,Qt,fe,lt,Xt,Mt,X,Rt,vt,Yt,jt,b,Ue,p,Le,ze,W,y,B,j,Bt,mt,$,P,de,xt,pe,Se,oe,_e,It,ae,Ne,ps,Ke,Ss,Ve,Qe,Oe,Xe,A,Ze,Ye,Ps,ve,$e,De,je,ct,qt,ts,Es,g,_,Ht,et,gt;class Us{constructor(e,i){V(this,g,void 0);V(this,_,void 0);V(this,Ht,0);V(this,et,0);V(this,gt,null);F(this,g,e),F(this,_,i),Gt.scrollEntries.register(o(this,g))}get size(){return o(this,Ht)}get position(){return o(this,et)}destroy(){Gt.scrollEntries.unregister(o(this,g)),o(this,g).style.transform="",this.mark(null)}setSize(e){e?(o(this,g).style.setProperty("--size",e+"px"),o(this,_).axisCSSProperty.current==="x"?(o(this,g).style.width=e+"px",o(this,g).style.height=""):(o(this,g).style.height=e+"px",o(this,g).style.width="")):(o(this,g).style.width="",o(this,g).style.height="",o(this,g).style.removeProperty("--size"))}resize(){F(this,Ht,o(this,_).vertical?o(this,g).offsetHeight:o(this,g).offsetWidth),F(this,et,o(this,_).vertical?yt.getCumulativeOffsetTop(o(this,g)):yt.getCumulativeOffsetLeft(o(this,g))),F(this,et,o(this,et)-o(this,_).contentPosition)}transform(){let e=0;const i=o(this,_).viewportSize*o(this,_).sectionDistanceScaleCSSProperty.current;o(this,_).infiniteCSSProperty.current&&o(this,_).overscroll&&o(this,et)+o(this,Ht)<o(this,_).currentScrollValue&&(e=o(this,_).distance*-1-o(this,_).gap),Gt.scrollEntries.update(o(this,g),o(this,_).axisCSSProperty.current,e);const n=o(this,_).currentScrollValue+e,h=o(this,et)-o(this,_).viewportSize-i,c=o(this,et)+o(this,Ht)+i,S=ls.clamp(n,h,c);o(this,_).vertical?o(this,g).style.transform=`translate3d(0px, ${S*-1}px, 0px)`:o(this,g).style.transform=`translate3d(${S*-1}px, 0px, 0px)`}mark(e){o(this,gt)!==e&&(o(this,gt)&&o(this,g).classList.remove(o(this,gt)),e&&o(this,g).classList.add(e),F(this,gt,e),o(this,g).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,gt)}})))}}g=new WeakMap,_=new WeakMap,Ht=new WeakMap,et=new WeakMap,gt=new WeakMap;const Ns=cs.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends _t.CustomElement{constructor(){super(),a(this,oe),a(this,It),a(this,Ne),a(this,Ke),a(this,Ve),a(this,Oe),a(this,Ye),a(this,De),a(this,ct),a(this,ts),a(this,d,null),a(this,Nt,new u.CSSProperty(this,"--controls",!0)),a(this,R,new u.CSSProperty(this,"--axis","y")),a(this,it,new u.CSSProperty(this,"--direction",0)),a(this,rt,new u.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,Y,new u.CSSProperty(this,"--split",!1)),a(this,nt,new u.CSSProperty(this,"--sectional",!1)),a(this,kt,new u.CSSProperty(this,"--auto-size",!1)),a(this,Wt,new u.CSSProperty(this,"--wheel-max-delta",!1)),a(this,Q,new u.CSSProperty(this,"--sections-in-view",1)),a(this,T,new u.CSSProperty(this,"--infinite",!1)),a(this,Kt,new u.CSSProperty(this,"--damping",20)),a(this,Zt,new u.CSSProperty(this,"--mass",0)),a(this,Jt,new u.CSSProperty(this,"--stiffness",0)),a(this,Qt,new u.CSSProperty(this,"--mouse-drag",!1)),a(this,fe,new u.CSSProperty(this,"--section-distance-scale",.5)),a(this,lt,new u.CSSProperty(this,"--autoplay",0)),a(this,Xt,new u.CSSProperty(this,"--autoplay-pause-duration",0)),a(this,Mt,new u.CSSProperty(this,"--autoplay-user-direction",!1)),a(this,X,new u.CSSProperty(this,"--classes",0)),a(this,Rt,new u.CSSProperty(this,"--current-index-start-offset",0)),a(this,vt,new u.CSSProperty(this,"--current-index-end-offset",0)),a(this,Yt,new u.CSSProperty(this,"--disabled",!1)),a(this,jt,new u.CSSProperty(this,"--hibernated",!1)),a(this,b,null),a(this,Ue,null),a(this,p,[]),a(this,Le,0),a(this,ze,0),a(this,W,0),a(this,y,0),a(this,B,0),a(this,j,null),a(this,Bt,null),a(this,mt,null),a(this,$,null),a(this,P,new Et.Store(0)),a(this,de,0),a(this,xt,0),a(this,pe,!0),a(this,Se,!0),a(this,A,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,P).current;if(C(this,Le,this.vertical?yt.getCumulativeOffsetTop(this):yt.getCumulativeOffsetLeft(this)),C(this,ze,this.vertical?yt.getCumulativeOffsetTop(t(this,b)):yt.getCumulativeOffsetLeft(t(this,b))),C(this,W,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):C(this,B,ws.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,kt).current&&t(this,p).length){const n=t(this,Q).current,h=(t(this,W)-t(this,B)*(n-1))/n;t(this,p).forEach(c=>{c.setSize(h)})}else t(this,p).forEach(n=>{n.setSize()});if(t(this,p).forEach(n=>{n.resize()}),t(this,rt).current){C(this,y,t(this,W)*t(this,rt).current);const n=t(this,y)+t(this,W);this.vertical?(t(this,b).style.width=n+"px",t(this,b).style.height="100%"):(t(this,b).style.height=n+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",C(this,y,t(this,b).offsetHeight-t(this,W))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",C(this,y,t(this,b).offsetWidth-t(this,W)));if(!t(this,T).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);C(this,y,t(this,y)+h),t(this,d).max=t(this,y)}if(t(this,T).current&&t(this,p).length){const n=t(this,p)[t(this,p).length-1],h=n.position+n.size-t(this,W),c=t(this,y)-h;C(this,xt,n.position+n.size+c)}else C(this,xt,t(this,y));if(t(this,nt).current&&t(this,p).length){const n=t(this,p)[i];t(this,d).set(n.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0})}),a(this,Ze,()=>{const e=this.currentScrollValue;if(C(this,de,Math.max(0,e-t(this,y))),t(this,p).length){let i=0;for(let n=0;n<t(this,p).length;n++){const h=t(this,p)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,P).current=i}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Gt.scrollEntries.update(this,t(this,R).current,e)}),a(this,ve,(e,i)=>{t(this,Nt).current&&(t(this,$).pauseAndContinue(t(this,Xt).current),t(this,Mt).current&&(t(this,$).direction=Math.sign(i)||1),t(this,$e).call(this,e,i))}),a(this,$e,(e,i)=>{if(t(this,it).current){if(t(this,it).current<0&&i>0)return;if(t(this,it).current>0&&i<0)return}if(!(e==="drag"&&!Ts.device.isMobile&&!t(this,Qt).current))if(t(this,nt).current){const n=Math.sign(i);t(this,p).length?this.shiftSections(n):t(this,d).shift(n*t(this,W))}else t(this,d).shift(i)}),as.isBrowser&&(C(this,d,new ys.Damped(0,{damping:.01,min:0,order:Pe.TICK_ORDER.SCROLL})),this.openShadow(Ns),I.element(this,{tabIndex:0,children:[I.div({class:"static",children:[I.slot({name:"static"})]}),I.div({class:"content",children:[I.slot({ref:e=>C(this,Ue,e)})],style:{flexDirection:new qs.Derived(t(this,R),e=>e==="x"?"row":"column")},ref:e=>C(this,b,e)})]}),C(this,j,new xe.WheelControls({element:t(this,b)})),t(this,j).changeEvent.subscribe(t(this,ve)),C(this,Bt,new xe.KeyboardControls({element:this})),t(this,Bt).changeEvent.subscribe(t(this,ve)),C(this,mt,new xe.DragControls({element:t(this,b)})),t(this,mt).changeEvent.subscribe(t(this,ve)),C(this,$,new xe.AutoplayControls),t(this,$).changeEvent.subscribe(t(this,$e)),t(this,R).subscribe(({current:e})=>{t(this,b).style.flexDirection=e==="x"?"row":"column",t(this,j).axis=t(this,Wt).current?"max":e,t(this,Bt).dimension=e==="x"?"width":"height",t(this,mt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,A).call(this)}),t(this,Wt).subscribe(e=>{t(this,j).axis=e.current?"max":t(this,R).current}),t(this,rt).subscribe(()=>{this.isConnected&&t(this,A).call(this)}),t(this,Y).subscribe(({current:e})=>{this.isConnected&&(e?v(this,oe,_e).call(this):v(this,It,ae).call(this))}),t(this,nt).subscribe(e=>{t(this,j).debounce=e.current,t(this,mt).swipe=e.current,t(this,$).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,kt).subscribe(e=>{this.isConnected&&(t(this,A).call(this),e.current&&!e.previous&&!t(this,p).length?v(this,oe,_e).call(this):!e.current&&e.previous&&t(this,p).length&&v(this,It,ae).call(this))}),t(this,Q).subscribe(e=>{this.isConnected&&(t(this,A).call(this),v(this,ct,qt).call(this))}),t(this,T).subscribe(e=>{e.current?(this.isConnected&&(t(this,p).length||(t(this,Y).current=!0)),t(this,p).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(C(this,de,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Kt).subscribe(e=>{t(this,d).damping=e.current}),t(this,Zt).subscribe(e=>{t(this,d).mass=e.current}),t(this,Jt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Yt).subscribe(e=>{e.current&&!e.previous?v(this,Ne,ps).call(this):!e.current&&e.previous&&v(this,Ke,Ss).call(this)}),t(this,jt).subscribe(e=>{e.current&&!e.previous?v(this,Ve,Qe).call(this):!e.current&&e.previous&&v(this,Oe,Xe).call(this)}),t(this,lt).subscribe(e=>{t(this,$).speed=e.current,e.current&&!e.previous?t(this,$).connect():!e.current&&e.previous&&t(this,$).disconnect()}),t(this,Mt).subscribe(e=>{e.current||(t(this,$).direction=1)}),t(this,X).subscribe(e=>{this.isConnected&&v(this,ct,qt).call(this)}),t(this,Rt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,vt).subscribe(e=>{this.isConnected&&t(this,X).current&&v(this,ct,qt).call(this)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,P).subscribe(e=>{t(this,p).length&&v(this,ct,qt).call(this)}))}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,Nt)}get axisCSSProperty(){return t(this,R)}get directionCSSProperty(){return t(this,it)}get pagesCSSProperty(){return t(this,rt)}get splitCSSProperty(){return t(this,Y)}get sectionalCSSProperty(){return t(this,nt)}get autoSizeCSSProperty(){return t(this,kt)}get wheelMaxDeltaCSSProperty(){return t(this,Wt)}get sectionsInViewCSSProperty(){return t(this,Q)}get infiniteCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,Kt)}get massCSSProperty(){return t(this,Zt)}get stiffnessCSSProperty(){return t(this,Jt)}get mouseDragCSSProperty(){return t(this,Qt)}get sectionDistanceScaleCSSProperty(){return t(this,fe)}get autoplayCSSProperty(){return t(this,lt)}get autoplayPauseDurationCSSProperty(){return t(this,Xt)}get autoplayUserDirectionCSSProperty(){return t(this,Mt)}get classesCSSProperty(){return t(this,X)}get currentIndexStartOffsetCSSProperty(){return t(this,Rt)}get currentIndexEndOffsetCSSProperty(){return t(this,vt)}get disabledCSSProperty(){return t(this,Yt)}get hibernatedCSSProperty(){return t(this,jt)}get currentScrollValue(){return v(this,De,je).call(this,"current")}get targetScrollValue(){return v(this,De,je).call(this,"target")}get contentElement(){return t(this,b)}get sections(){return t(this,p)}get position(){return t(this,Le)}get contentPosition(){return t(this,ze)}get viewportSize(){return t(this,W)}get scrollSize(){return t(this,y)}get gap(){return t(this,B)}get counter(){return t(this,P)}get limit(){return t(this,p).length-t(this,Q).current}get distance(){return t(this,xt)}get infiniteDistance(){return t(this,T).current?t(this,xt)+t(this,B):t(this,xt)}get overscroll(){return t(this,de)}get vertical(){return t(this,R).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get scrollWidth(){return t(this,R).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,R).current==="x"?0:t(this,d).distance}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!t(this,p).length)return;const n=t(this,P).current;v(this,Ye,Ps).call(this,e);const h=t(this,p)[n],c=t(this,p)[t(this,P).current];if(h&&c){let S=0;const Me=v(this,ts,Es).call(this),Rs=Me?this.targetScrollValue-Me.position:0;t(this,T).current?t(this,P).current===0&&n===t(this,p).length-1?S=t(this,y)+t(this,W)-h.position+t(this,B):t(this,P).current===t(this,p).length-1&&n===0?S=c.position-(t(this,y)+t(this,W)+t(this,B)):S=c.position-h.position:S=c.position-h.position,t(this,d).shift(S-Rs,{equalize:i==="instant"})}}shiftSections(e,i="smooth"){t(this,p).length&&this.scrollToSection(t(this,P).current+e,i)}setPosition(e,i="smooth"){t(this,d).set(e,{equalize:i==="instant"})}connectedCallback(){t(this,Nt).observe(),t(this,R).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,Y).observe(),t(this,nt).observe(),t(this,kt).observe(),t(this,Wt).observe(),t(this,Q).observe(),t(this,T).observe(),t(this,Kt).observe(),t(this,Zt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,fe).observe(),t(this,lt).observe(),t(this,lt).observe(),t(this,Xt).observe(),t(this,Mt).observe(),t(this,X).observe(),t(this,Rt).observe(),t(this,vt).observe(),t(this,Yt).observe(),t(this,jt).observe(),v(this,Oe,Xe).call(this)}disconnectedCallback(){t(this,Nt).unobserve(),t(this,R).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,Y).unobserve(),t(this,nt).unobserve(),t(this,kt).unobserve(),t(this,Wt).unobserve(),t(this,Q).unobserve(),t(this,T).unobserve(),t(this,Kt).unobserve(),t(this,Zt).unobserve(),t(this,Jt).unobserve(),t(this,Qt).unobserve(),t(this,fe).unobserve(),t(this,lt).unobserve(),t(this,Xt).unobserve(),t(this,Mt).unobserve(),t(this,X).unobserve(),t(this,Rt).unobserve(),t(this,vt).unobserve(),t(this,Yt).unobserve(),t(this,jt).unobserve(),v(this,Ve,Qe).call(this)}};d=new WeakMap;Nt=new WeakMap;R=new WeakMap;it=new WeakMap;rt=new WeakMap;Y=new WeakMap;nt=new WeakMap;kt=new WeakMap;Wt=new WeakMap;Q=new WeakMap;T=new WeakMap;Kt=new WeakMap;Zt=new WeakMap;Jt=new WeakMap;Qt=new WeakMap;fe=new WeakMap;lt=new WeakMap;Xt=new WeakMap;Mt=new WeakMap;X=new WeakMap;Rt=new WeakMap;vt=new WeakMap;Yt=new WeakMap;jt=new WeakMap;b=new WeakMap;Ue=new WeakMap;p=new WeakMap;Le=new WeakMap;ze=new WeakMap;W=new WeakMap;y=new WeakMap;B=new WeakMap;j=new WeakMap;Bt=new WeakMap;mt=new WeakMap;$=new WeakMap;P=new WeakMap;de=new WeakMap;xt=new WeakMap;pe=new WeakMap;Se=new WeakMap;oe=new WeakSet;_e=function(){v(this,It,ae).call(this),t(this,Ue).assignedElements().forEach(r=>{r instanceof HTMLElement&&t(this,p).push(new Us(r,this))}),t(this,b).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,A).call(this),v(this,ct,qt).call(this)};It=new WeakSet;ae=function(){t(this,p).forEach(r=>{r.destroy()}),C(this,p,[]),t(this,P).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Ne=new WeakSet;ps=function(){t(this,pe)||(C(this,pe,!0),t(this,d).unsubscribe(t(this,Ze)),t(this,d).unlistenAnimationFrame(),t(this,j).disconnect(),t(this,Bt).disconnect(),t(this,mt).disconnect(),t(this,$).disconnect())};Ke=new WeakSet;Ss=function(){t(this,pe)&&(C(this,pe,!1),t(this,d).subscribe(t(this,Ze)),t(this,j).connect(),t(this,Bt).connect(),t(this,mt).connect(),t(this,lt).current&&t(this,$).connect())};Ve=new WeakSet;Qe=function(){t(this,Se)||(C(this,Se,!0),ue.windowResizer.unsubscribe(t(this,A)),Ge.elementResizer.unsubscribe(t(this,A)),t(this,d).reset(),v(this,Ne,ps).call(this),t(this,b).style.transform="",t(this,Y).current&&v(this,It,ae).call(this),Gt.scrollEntries.unregister(this))};Oe=new WeakSet;Xe=function(){t(this,Se)&&(C(this,Se,!1),t(this,Y).current&&v(this,oe,_e).call(this),Gt.scrollEntries.register(this),ue.windowResizer.subscribe(t(this,A),Pe.RESIZE_ORDER.SCROLL),Ge.elementResizer.subscribe(this,t(this,A)),v(this,Ke,Ss).call(this))};A=new WeakMap;Ze=new WeakMap;Ye=new WeakSet;Ps=function(r){t(this,T).current?(t(this,P).current=r%t(this,p).length,t(this,P).current=t(this,P).current<0?t(this,p).length+t(this,P).current:t(this,P).current):t(this,P).current=ls.clamp(r,0,this.limit)};ve=new WeakMap;$e=new WeakMap;De=new WeakSet;je=function(r="current"){if(t(this,T).current&&t(this,p).length){const e=t(this,d)[r]%(t(this,y)+t(this,W)+t(this,B));return e<0?t(this,y)+e+t(this,W)+t(this,B):e}else return t(this,d)[r]};ct=new WeakSet;qt=function(){if(t(this,X).current&&t(this,p).length){const r=t(this,P).current+t(this,Rt).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,Q).current+t(this,vt).current;t(this,p).forEach((i,n)=>{const h=r-this.limit-1+t(this,vt).current,c=r+e,S=this.sections.length-c;n>=r&&n<c||n<=h?i.mark("current"):n>=c&&n<c+S/2||n<=h+e?i.mark("next"):i.mark("previous")})}};ts=new WeakSet;Es=function(){let r=null,e=1/0;for(let i=0;i<t(this,p).length;i++){const n=Math.abs(t(this,p)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,p)[r]:null};exports.ScrollElement=Gs([_t.define("e-scroll")],exports.ScrollElement);var Ee;class Je extends _t.CustomElement{constructor(){super(...arguments);V(this,Ee,null)}get scrollElement(){return o(this,Ee)}connectedCallback(){const i=Is.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?F(this,Ee,i):console.error(this,"e-scroll not found")}}Ee=new WeakMap;var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Js=(r,e,i,n)=>{for(var h=n>1?void 0:n?Zs(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ks(e,i,h),h},ks=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},f=(r,e,i)=>(ks(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Pt=(r,e,i,n)=>(ks(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),me,q,ht,ot,we,be,te,Fe,Re,qe;const Qs=cs.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorLight.var},':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:bs.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Je{constructor(){super(),N(this,me,null),N(this,q,null),N(this,ht,!1),N(this,ot,0),N(this,we,0),N(this,be,0),N(this,te,()=>{Pt(this,ht,this.offsetWidth>this.offsetHeight);const e=f(this,ht)?this.offsetWidth:this.offsetHeight;Pt(this,ot,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),Pt(this,ot,Math.max(f(this,ot),30)),f(this,ht)?(f(this,q).style.width=f(this,ot)+"px",f(this,q).style.height="100%"):(f(this,q).style.width="100%",f(this,q).style.height=f(this,ot)+"px"),Pt(this,we,e-f(this,ot)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,Fe,()=>{Pt(this,be,this.scrollElement.currentProgress*f(this,we)),f(this,ht)?f(this,q).style.transform=`translate3d(${f(this,be)}px, 0px, 0px)`:f(this,q).style.transform=`translate3d(0px, ${f(this,be)}px, 0px)`}),N(this,Re,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,qe,e=>{document.documentElement.classList.add("grabbing"),Bs.setupDrag(h=>{const c=f(this,ht)?h.x:h.y,S=this.scrollElement.distance/f(this,we),Me=(c-n)*S;this.scrollElement.setPosition(i+Me)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=f(this,ht)?e.x:e.y}),as.isBrowser&&(this.openShadow(Qs),I.element(this,{slot:"static","drag-dead-zone":"",children:[I.slot({ref:e=>Pt(this,me,e),children:I.div({class:"default-thumb"})})]}))}get thumbElement(){return f(this,q)}connectedCallback(){super.connectedCallback();const e=f(this,me).assignedElements()[0]||f(this,me).firstElementChild;Pt(this,q,e),f(this,q).addEventListener("pointerdown",f(this,qe)),ue.windowResizer.subscribe(f(this,te),Pe.RESIZE_ORDER.SCROLL+1),Ge.elementResizer.subscribe(this,f(this,te)),this.scrollElement.onScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.subscribe(f(this,Re))}disconnectedCallback(){f(this,q).removeEventListener("pointerdown",f(this,qe)),ue.windowResizer.unsubscribe(f(this,te)),Ge.elementResizer.unsubscribe(f(this,te)),this.scrollElement.offScroll(f(this,Fe)),this.scrollElement.axisCSSProperty.unsubscribe(f(this,Re))}};me=new WeakMap;q=new WeakMap;ht=new WeakMap;ot=new WeakMap;we=new WeakMap;be=new WeakMap;te=new WeakMap;Fe=new WeakMap;Re=new WeakMap;qe=new WeakMap;exports.ScrollbarElement=Js([_t.define("e-scrollbar")],exports.ScrollbarElement);const Xs=cs.createStylesheet({button:{all:"inherit"}});class Ws extends Je{constructor(){super(),this.openShadow(Xs),as.isBrowser&&I.element(this,{children:[I.button({onClick:()=>{this.handleClick()},children:[I.slot()]})]})}}var Ys=Object.defineProperty,js=Object.getOwnPropertyDescriptor,ti=(r,e,i,n)=>{for(var h=n>1?void 0:n?js(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&Ys(e,i,h),h};exports.ScrollSetButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=ti([_t.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var ei=Object.defineProperty,si=Object.getOwnPropertyDescriptor,ii=(r,e,i,n)=>{for(var h=n>1?void 0:n?si(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ei(e,i,h),h};exports.ScrollStepButtonElement=class extends Ws{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=ii([_t.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var ri=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,hi=(r,e,i,n)=>{for(var h=n>1?void 0:n?ni(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ri(e,i,h),h},Ms=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ut=(r,e,i)=>(Ms(r,e,"read from private field"),i?i.call(r):e.get(r)),gs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Cs=(r,e,i,n)=>(Ms(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Lt,ge,st,Ct,le,ke,We,ce;class oi{constructor(e,i,n){V(this,st,void 0);V(this,Ct,void 0);V(this,le,void 0);V(this,ke,void 0);V(this,We,()=>{o(this,Ct).scrollToSection(o(this,le),o(this,ke))});V(this,ce,()=>{o(this,st).classList.toggle("current",o(this,Ct).counter.current===o(this,le))});F(this,st,document.createElement("button")),F(this,Ct,e),F(this,ke,n),F(this,le,i),o(this,st).addEventListener("click",o(this,We)),o(this,Ct).counter.subscribe(o(this,ce)),o(this,ce).call(this)}get element(){return o(this,st)}destroy(){o(this,st).removeEventListener("click",o(this,We)),o(this,Ct).counter.unsubscribe(o(this,ce)),o(this,st).remove()}}st=new WeakMap,Ct=new WeakMap,le=new WeakMap,ke=new WeakMap,We=new WeakMap,ce=new WeakMap;exports.ScrollBulletButtonsElement=class extends Je{constructor(){super(...arguments),gs(this,Lt,[]),gs(this,ge,_s.debounce(()=>{Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new oi(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ut(this,Lt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ut(this,ge)),Ut(this,ge).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ut(this,ge)),Ut(this,Lt).forEach(e=>e.destroy()),Cs(this,Lt,[])}};Lt=new WeakMap;ge=new WeakMap;exports.ScrollBulletButtonsElement=hi([_t.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var ai=Object.defineProperty,li=Object.getOwnPropertyDescriptor,ci=(r,e,i,n)=>{for(var h=n>1?void 0:n?li(e,i):e,c=r.length-1,S;c>=0;c--)(S=r[c])&&(h=(n?S(e,i,h):S(h))||h);return n&&h&&ai(e,i,h),h},fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(fs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},w=(r,e,i,n)=>(fs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),k=(r,e,i)=>(fs(r,e,"access private method"),i),ee,se,ie,re,zt,Vt,Ot,$t,D,H,G,U,Tt,x,ut,pt,St,ft,dt,M,J,Z,wt,bt,tt,Te,m,ne,he,Be,L,Dt,O,z,K,Ce,At,E,es,xs,ss,Ls,is,zs,rs,Vs,ns,Os,hs,$s,Ie,ye,at,Ft,ds,Ds,vs,Fs,Ae,os,He;exports.ScrollSegmentElement=class extends Je{constructor(){super(),l(this,es),l(this,ss),l(this,is),l(this,rs),l(this,ns),l(this,hs),l(this,at),l(this,ds),l(this,vs),l(this,Ae),l(this,ee,new u.CSSProperty(this,"--damping",20)),l(this,se,new u.CSSProperty(this,"--mass",0)),l(this,ie,new u.CSSProperty(this,"--stiffness",0)),l(this,re,new u.CSSProperty(this,"--target","")),l(this,zt,new u.CSSProperty(this,"--disabled",!1)),l(this,Vt,new u.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),l(this,Ot,new u.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),l(this,$t,new u.CSSProperty(this,"--capture-once",!1)),l(this,D,new u.CSSProperty(this,"--captured","")),l(this,H,new u.CSSProperty(this,"--released","")),l(this,G,new u.CSSProperty(this,"--captured-from-start","")),l(this,U,new u.CSSProperty(this,"--captured-from-finish","")),l(this,Tt,new u.CSSProperty(this,"--released-from-start","")),l(this,x,new u.CSSProperty(this,"--released-from-finish","")),l(this,ut,new u.CSSProperty(this,"--passed-var","")),l(this,pt,new u.CSSProperty(this,"--progress-var","")),l(this,St,new u.CSSProperty(this,"--distance-var","")),l(this,ft,new u.CSSProperty(this,"--start-var","")),l(this,dt,new u.CSSProperty(this,"--finish-var","")),l(this,M,new Et.Store(!1)),l(this,J,new Et.Store(!1)),l(this,Z,new Et.Store(!1)),l(this,wt,new Et.Store(!1)),l(this,bt,new Et.Store(!1)),l(this,tt,new Et.Store(!1)),l(this,Te,[]),l(this,m,this),l(this,ne,0),l(this,he,0),l(this,Be,0),l(this,L,new ys.Damped(0,{order:Pe.TICK_ORDER.SCROLL-1,min:0,max:1})),l(this,Dt,0),l(this,O,0),l(this,z,0),l(this,K,0),l(this,Ce,!1),l(this,At,!1),l(this,E,!0),l(this,Ie,()=>{s(this,E)||(this.resize(),s(this,ye).call(this))}),l(this,ye,()=>{!s(this,E)&&s(this,Ce)&&this.tick()}),l(this,He,_s.debounce(()=>{const e=Gt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),w(this,Te,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,Vt)}get startOffsetCSSProperty(){return s(this,Ot)}get captureOnceCSSProperty(){return s(this,$t)}get capturedCSSProperty(){return s(this,D)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,Tt)}get releasedFromFinishCSSProperty(){return s(this,x)}get passedVarCSSProperty(){return s(this,ut)}get progressVarCSSProperty(){return s(this,pt)}get distanceVarCSSProperty(){return s(this,St)}get startVarCSSProperty(){return s(this,ft)}get finishVarCSSProperty(){return s(this,dt)}get disabledCSSProperty(){return s(this,zt)}get dampingCSSProperty(){return s(this,ee)}get massCSSProperty(){return s(this,se)}get stiffnessCSSProperty(){return s(this,ie)}get targetCSSProperty(){return s(this,re)}get isCaptured(){return s(this,M)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,Z)}get isReleasedFromStart(){return s(this,wt)}get isCapturedFromFinish(){return s(this,bt)}get isReleasedFromFinish(){return s(this,tt)}get directionPosition(){return s(this,ne)}get directionSize(){return s(this,he)}get passed(){return s(this,L)}get progress(){return s(this,Dt)}get start(){return s(this,O)}get finish(){return s(this,K)}get distance(){return s(this,z)}get isCapturedOnce(){return s(this,At)}get isDisabled(){return s(this,E)}resize(){w(this,he,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),w(this,ne,this.scrollElement.vertical?yt.getCumulativeOffsetTop(this,this.scrollElement):yt.getCumulativeOffsetLeft(this,this.scrollElement)),w(this,O,this.getStart()),w(this,z,this.getDistance()),w(this,O,s(this,O)+s(this,Ot).current),w(this,z,s(this,z)+s(this,Vt).current),w(this,K,s(this,O)+s(this,z)),this.scrollElement.currentScrollValue>s(this,K)&&!s(this,M).current&&!s(this,J).current&&(s(this,M).current=!0),this.setVar(s(this,ft).current,s(this,O)),this.setVar(s(this,dt).current,s(this,K)),this.setVar(s(this,St).current,s(this,z)),s(this,L).max=s(this,z),w(this,Ce,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,Te).forEach(n=>{e+=n.value}),s(this,L).set(e-s(this,O));const i=Math.round(e);s(this,M).current&&(i>s(this,O)?s(this,Z).current||k(this,is,zs).call(this):s(this,Z).current&&!s(this,wt).current&&k(this,ns,Os).call(this),i<s(this,K)?s(this,tt).current&&!s(this,bt).current&&k(this,rs,Vs).call(this):s(this,Z).current&&!s(this,tt).current&&k(this,hs,$s).call(this)),i>s(this,O)&&i<s(this,K)?s(this,M).current||k(this,es,xs).call(this):s(this,M).current&&(s(this,L).set(ls.step(s(this,z)/2,s(this,L).current,0,s(this,z))),k(this,ss,Ls).call(this)),s(this,At)&&s(this,$t).current&&(s(this,D).current&&s(this,m).classList.add(s(this,D).current),w(this,E,!0))}disable(){this.style.cssText="",w(this,ne,0),w(this,he,0),s(this,L).reset(),w(this,Dt,0),w(this,O,0),w(this,z,0),w(this,K,0),w(this,Ce,!1),s(this,M).current=!1,s(this,J).current=!1,s(this,Z).current=!1,s(this,wt).current=!1,s(this,bt).current=!1,s(this,tt).current=!1,w(this,At,!1),w(this,E,!0),k(this,Ae,os).call(this)}enable(){w(this,E,!1)}connectedCallback(){super.connectedCallback(),s(this,ee).observe(),s(this,se).observe(),s(this,ie).observe(),s(this,re).observe(),s(this,zt).observe(),s(this,Vt).observe(),s(this,Ot).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,Tt).observe(),s(this,x).observe(),s(this,ut).observe(),s(this,pt).observe(),s(this,St).observe(),s(this,ft).observe(),s(this,dt).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,He)),s(this,He).call(this),s(this,zt).current||this.enable(),s(this,ee).subscribe(i=>{s(this,L).damping=i.current}),s(this,se).subscribe(i=>{s(this,L).mass=i.current}),s(this,ie).subscribe(i=>{s(this,L).stiffness=i.current}),s(this,re).subscribe(i=>{i.previous&&k(this,Ae,os).call(this),i.current?i.current==="parent"?w(this,m,this.parentElement||this):w(this,m,document.querySelector(i.current)||this):w(this,m,this)}),s(this,zt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,Ot).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,Vt).subscribe(()=>{e&&!s(this,E)&&this.resize()}),s(this,D).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,G).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,U).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,H).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,Tt).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,x).subscribe(i=>{k(this,at,Ft).call(this,i)}),s(this,$t).subscribe(i=>{s(this,E)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,ut).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,this.passed.current))}),s(this,pt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,Dt)))}),s(this,ft).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,O)))}),s(this,dt).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,K)))}),s(this,St).subscribe(i=>{s(this,E)||(this.removeVar(i.previous),this.setVar(i.current,s(this,z)))}),s(this,L).subscribe(i=>{w(this,Dt,s(this,L).current/s(this,z)||0),this.setVar(s(this,ut).current,s(this,L).current.toFixed(6)),this.setVar(s(this,pt).current,s(this,Dt).toFixed(6))}),ue.windowResizer.subscribe(s(this,Ie),Pe.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,ye)),e=!0}disconnectedCallback(){ue.windowResizer.unsubscribe(s(this,Ie)),this.scrollElement.offScroll(s(this,ye)),s(this,ee).close(),s(this,se).close(),s(this,ie).close(),s(this,re).close(),s(this,zt).close(),s(this,Vt).close(),s(this,Ot).close(),s(this,$t).close(),s(this,D).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,Tt).close(),s(this,x).close(),s(this,ut).close(),s(this,pt).close(),s(this,St).close(),s(this,ft).close(),s(this,dt).close(),s(this,M).close(),s(this,J).close(),s(this,Z).close(),s(this,wt).close(),s(this,bt).close(),s(this,tt).close(),this.disable()}removeVar(e){e&&s(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,m).style.setProperty(`--${e}`,i.toString())}getDistance(){return s(this,he)+s(this,Be)}getStart(){return s(this,ne)-s(this,Be)}};ee=new WeakMap;se=new WeakMap;ie=new WeakMap;re=new WeakMap;zt=new WeakMap;Vt=new WeakMap;Ot=new WeakMap;$t=new WeakMap;D=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;Tt=new WeakMap;x=new WeakMap;ut=new WeakMap;pt=new WeakMap;St=new WeakMap;ft=new WeakMap;dt=new WeakMap;M=new WeakMap;J=new WeakMap;Z=new WeakMap;wt=new WeakMap;bt=new WeakMap;tt=new WeakMap;Te=new WeakMap;m=new WeakMap;ne=new WeakMap;he=new WeakMap;Be=new WeakMap;L=new WeakMap;Dt=new WeakMap;O=new WeakMap;z=new WeakMap;K=new WeakMap;Ce=new WeakMap;At=new WeakMap;E=new WeakMap;es=new WeakSet;xs=function(){s(this,M).current=!0,s(this,J).current=!1,w(this,At,!0),s(this,H).current&&s(this,m).classList.remove(s(this,H).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,x).current&&s(this,m).classList.remove(s(this,x).current),s(this,D).current&&s(this,m).classList.add(s(this,D).current)};ss=new WeakSet;Ls=function(){s(this,J).current=!0,s(this,M).current=!1,w(this,At,!0),s(this,D).current&&s(this,m).classList.remove(s(this,D).current),s(this,G).current&&s(this,m).classList.remove(s(this,G).current),s(this,U).current&&s(this,m).classList.remove(s(this,U).current),s(this,H).current&&s(this,m).classList.add(s(this,H).current)};is=new WeakSet;zs=function(){s(this,M).current=!0,s(this,Z).current=!0,s(this,wt).current=!1,s(this,G).current&&s(this,m).classList.add(s(this,G).current)};rs=new WeakSet;Vs=function(){s(this,M).current=!0,s(this,bt).current=!0,s(this,tt).current=!1,s(this,U).current&&s(this,m).classList.add(s(this,U).current)};ns=new WeakSet;Os=function(){s(this,J).current=!0,s(this,wt).current=!0,s(this,Z).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};hs=new WeakSet;$s=function(){s(this,J).current=!0,s(this,tt).current=!0,s(this,bt).current=!1,s(this,x).current&&s(this,m).classList.add(s(this,x).current)};Ie=new WeakMap;ye=new WeakMap;at=new WeakSet;Ft=function(r){if(s(this,E)){r.previous&&s(this,m).classList.remove(r.previous),r.current&&s(this,m).classList.remove(r.current);return}r.current&&s(this,M).current?(r.previous&&s(this,m).classList.remove(r.previous),s(this,m).classList.add(r.current)):!r.current&&r.previous&&s(this,m).classList.remove(r.previous)};ds=new WeakSet;Ds=function(...r){r.forEach(e=>{e&&s(this,m).classList.remove(e)})};vs=new WeakSet;Fs=function(...r){r.forEach(e=>{e&&s(this,m).style.removeProperty(`--${e}`)})};Ae=new WeakSet;os=function(){k(this,ds,Ds).call(this,s(this,D).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,Tt).current,s(this,x).current),k(this,vs,Fs).call(this,s(this,ut).current,s(this,pt).current,s(this,St).current,s(this,ft).current,s(this,dt).current)};He=new WeakMap;exports.ScrollSegmentElement=ci([_t.define("e-scroll-segment")],exports.ScrollSegmentElement);
@@ -14,7 +14,7 @@ import { a as Re, g as Te } from "../layout-HoBT_Da2.js";
14
14
  import { c as Es, s as Zs } from "../math-BOBiC4TN.js";
15
15
  import "../ticker/index.js";
16
16
  import { TICK_ORDER as xs, RESIZE_ORDER as ls } from "../order/index.js";
17
- import { D as Ls } from "../Damped-QZAoXO5Z.js";
17
+ import { D as Ls } from "../Damped-CH96byE8.js";
18
18
  import { WheelControls as Js, KeyboardControls as Qs, DragControls as Xs, AutoplayControls as Ys } from "../controls/index.js";
19
19
  import { CustomElement as Vs, define as ue } from "../custom-element/index.js";
20
20
  import { windowResizer as oe } from "../window-resizer/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.5.31",
3
+ "version": "0.5.33",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1 +0,0 @@
1
- "use strict";var tt=Object.defineProperty,st=Object.defineProperties;var it=Object.getOwnPropertyDescriptors;var H=Object.getOwnPropertySymbols;var et=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;var J=(r,i,t)=>i in r?tt(r,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[i]=t,R=(r,i)=>{for(var t in i||(i={}))et.call(i,t)&&J(r,t,i[t]);if(H)for(var t of H(i))rt.call(i,t)&&J(r,t,i[t]);return r},B=(r,i)=>st(r,it(i));var j=(r,i,t)=>{if(!i.has(r))throw TypeError("Cannot "+t)};var s=(r,i,t)=>(j(r,i,"read from private field"),t?t.call(r):i.get(r)),e=(r,i,t)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,t)},h=(r,i,t,n)=>(j(r,i,"write to private field"),n?n.call(r,t):i.set(r,t),t);var x=(r,i,t)=>(j(r,i,"access private method"),t);const U=require("./math-GDWEqu7y.cjs"),E=require("./number-yVpzMdbQ.cjs"),g=require("./polyfills-CrcS4RcO.cjs"),_=require("./Store-C-1ruEIm.cjs"),Q=require("./ticker/index.cjs"),ht=require("./order/index.cjs");var u,d,F,w,y,C,O,S,v,W,V,X,T,G,K,Y,z;class nt{constructor(i,t,n,P,A){e(this,v);e(this,V);e(this,T);e(this,K);e(this,u,void 0);e(this,d,void 0);e(this,F,void 0);e(this,w,void 0);e(this,y,!1);e(this,C,!1);e(this,O,!1);e(this,S,void 0);e(this,z,i=>{!s(this,O)&&s(this,u).initial!==s(this,u).current&&h(this,O,!0),s(this,O)&&(i.direction>0&&i.progress>=s(this,F).current?x(this,v,W).call(this):i.direction<0&&i.progress<=s(this,F).current&&x(this,V,X).call(this))});h(this,u,i),h(this,d,t),h(this,F,new _.Store(n,{passport:t.passport?{name:t.passport+"-start",manager:{type:"number"}}:void 0})),h(this,w,new _.Store(P,{passport:t.passport?{name:t.passport+"-set",manager:{type:"number"}}:void 0})),h(this,S,A),s(this,u).subscribe(s(this,z)),s(this,u).linked.add(this)}get targetAnimation(){return s(this,d)}get triggerAnimation(){return s(this,u)}destroy(){s(this,w).close(),s(this,F).close(),s(this,u).unsubscribe(s(this,z)),s(this,u).linked.delete(this)}}u=new WeakMap,d=new WeakMap,F=new WeakMap,w=new WeakMap,y=new WeakMap,C=new WeakMap,O=new WeakMap,S=new WeakMap,v=new WeakSet,W=function(){s(this,y)||(h(this,C,!1),h(this,y,!0),x(this,T,G).call(this,s(this,w).current))},V=new WeakSet,X=function(){s(this,y)&&!s(this,C)&&(h(this,y,!1),h(this,C,!0),x(this,T,G).call(this,s(this,d).initial))},T=new WeakSet,G=function(i){x(this,K,Y).call(this),s(this,d).updateOptions(s(this,S)),s(this,d).set(i)},K=new WeakSet,Y=function(){var i;(i=s(this,S))!=null&&i.once&&this.destroy()},z=new WeakMap;var D,M,N,f,o,b,I,a,c,l,k,p,L;class Z extends _.Store{constructor(t,n){super(t||0,n);e(this,D,void 0);e(this,M,ht.TICK_ORDER.ANIMATION);e(this,N,void 0);e(this,f,new _.Store(!1));e(this,o,new Set);e(this,b,null);e(this,I,0);e(this,a,0);e(this,c,-1/0);e(this,l,1/0);e(this,k,0);e(this,p,1);e(this,L,t=>{this.handleAnimationFrame(t)})}get linked(){return s(this,o)}get animationLink(){return s(this,b)}get direction(){return s(this,I)}get target(){return s(this,a)}get min(){return s(this,c)}set min(t){h(this,c,t),this.set(s(this,a),{equalize:!0})}get max(){return s(this,l)}set max(t){h(this,l,t),this.set(s(this,a),{equalize:!0})}get from(){return s(this,k)}get to(){return s(this,p)}get isRunning(){return s(this,f)}get currentDistance(){return Math.abs(s(this,p)-s(this,k))}get distance(){return Math.abs(s(this,l)-s(this,c))}get currentProgress(){return this.currentDistance?E.preciseNumber(Math.abs(this.current-s(this,k))/this.currentDistance,6):0}get progress(){return this.distance?E.preciseNumber(Math.abs(this.current-s(this,c))/this.distance,6):0}get entry(){return B(R({},super.entry),{from:s(this,k),to:s(this,p),currentDistance:this.currentDistance,distance:this.distance,direction:this.direction,currentProgress:this.currentProgress,progress:this.progress})}setTarget(t){h(this,I,Math.sign(t-s(this,a))),h(this,a,U.clamp(t,s(this,c),s(this,l))),h(this,k,this.current),h(this,p,t)}set(t,n){s(this,a)!==t&&(this.setTarget(t),n&&this.updateOptions(n),s(this,a)!==this.current&&this.start())}shift(t,n){this.set(s(this,a)+t,n)}reset(){this.set(this.initial,{equalize:!0}),super.reset(),s(this,o).forEach(t=>{t.targetAnimation.reset()})}close(){super.close(),this.unlistenAnimationFrame(),this.unlink(),s(this,o).clear()}listenAnimationFrame(){s(this,f).current||(s(this,f).current=!0,Q.ticker.subscribe(s(this,L),{maxFPS:s(this,D),order:s(this,M),culling:s(this,N)}))}unlistenAnimationFrame(){s(this,f).current&&(s(this,f).current=!1,Q.ticker.unsubscribe(s(this,L)),s(this,o).forEach(t=>{t.targetAnimation.unlistenAnimationFrame()}))}updateOptions(t){h(this,D,g.nullishCoalescing(t==null?void 0:t.maxFPS,s(this,D))),h(this,M,g.nullishCoalescing(t==null?void 0:t.order,s(this,M))),h(this,N,g.nullishCoalescing(t==null?void 0:t.culling,s(this,N))),h(this,c,g.nullishCoalescing(t==null?void 0:t.min,s(this,c))),h(this,l,g.nullishCoalescing(t==null?void 0:t.max,s(this,l))),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=s(this,a))}linkTo(t,n,P,A){this.unlink(),h(this,b,new nt(t,this,n,P,A))}unlink(){s(this,b)&&(s(this,b).destroy(),h(this,b,null))}start(){this.listenAnimationFrame()}}D=new WeakMap,M=new WeakMap,N=new WeakMap,f=new WeakMap,o=new WeakMap,b=new WeakMap,I=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,k=new WeakMap,p=new WeakMap,L=new WeakMap;var m,q;class at extends Z{constructor(t,n){super(t,n);e(this,m,void 0);e(this,q,void 0);this.damping=20,this.stiffness=0,this.mass=0,h(this,m,0),h(this,q,0),this.updateOptions(B(R({},n),{equalize:!0}))}get velocity(){return s(this,m)}get speed(){return s(this,q)}get entry(){return B(R({},super.entry),{velocity:s(this,m),speed:s(this,q)})}updateOptions(t){this.damping=g.nullishCoalescing(t==null?void 0:t.damping,this.damping),this.mass=g.nullishCoalescing(t==null?void 0:t.mass,this.mass),this.stiffness=g.nullishCoalescing(t==null?void 0:t.stiffness,this.stiffness),super.updateOptions(t)}updateManually(t){this.setTarget(t),this.current=this.target}handleAnimationFrame(t){E.preciseNumber(this.current,4)===E.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target);const n=this.current,P=Math.abs(n-this.target);h(this,q,P/t.timeBetweenFrames);const A=t.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const $=(this.target-this.current)*this.stiffness-s(this,m)*this.damping;h(this,m,s(this,m)+$/this.mass*A),this.current+=s(this,m)*A}else this.current=U.damp(this.current,this.target,this.damping,A)}}m=new WeakMap,q=new WeakMap;exports.Animation=Z;exports.Damped=at;