aptechka 0.61.9 → 0.61.11

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,104 +1,120 @@
1
- var Ze = Object.defineProperty;
2
- var He = Object.getOwnPropertySymbols;
3
- var je = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable;
4
- var Be = (p) => {
5
- throw TypeError(p);
1
+ var Ye = Object.defineProperty;
2
+ var We = Object.getOwnPropertySymbols, ts = Object.getPrototypeOf, es = Object.prototype.hasOwnProperty, ss = Object.prototype.propertyIsEnumerable, is = Reflect.get;
3
+ var Ne = (u) => {
4
+ throw TypeError(u);
6
5
  };
7
- var $e = (p, n, e) => n in p ? Ze(p, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[n] = e, We = (p, n) => {
6
+ var Fe = (u, n, e) => n in u ? Ye(u, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[n] = e, qe = (u, n) => {
8
7
  for (var e in n || (n = {}))
9
- je.call(n, e) && $e(p, e, n[e]);
10
- if (He)
11
- for (var e of He(n))
12
- Je.call(n, e) && $e(p, e, n[e]);
13
- return p;
8
+ es.call(n, e) && Fe(u, e, n[e]);
9
+ if (We)
10
+ for (var e of We(n))
11
+ ss.call(n, e) && Fe(u, e, n[e]);
12
+ return u;
14
13
  };
15
- var Le = (p, n, e) => n.has(p) || Be("Cannot " + e);
16
- var t = (p, n, e) => (Le(p, n, "read from private field"), e ? e.call(p) : n.get(p)), s = (p, n, e) => n.has(p) ? Be("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(p) : n.set(p, e), h = (p, n, e, i) => (Le(p, n, "write to private field"), i ? i.call(p, e) : n.set(p, e), e), c = (p, n, e) => (Le(p, n, "access private method"), e);
17
- import { S as Qe } from "../Store-swP_0ymB.js";
18
- import { i as H } from "../index-euf5anj6.js";
19
- import { a as Xe } from "../easings-Bni3YAAW.js";
20
- import { d as ne } from "../events-CsVF98U6.js";
21
- import { d as ze } from "../function-C10DGppn.js";
22
- import { c as Ne } from "../jss-DtnXPEnq.js";
23
- import { a as Ie, g as ke } from "../layout-DpZo-I0y.js";
24
- import { c as qe } from "../math-BOBiC4TN.js";
25
- import { p as Ye, l as ts } from "../number-CbdpfO3u.js";
14
+ var ke = (u, n, e) => n.has(u) || Ne("Cannot " + e);
15
+ var t = (u, n, e) => (ke(u, n, "read from private field"), e ? e.call(u) : n.get(u)), s = (u, n, e) => n.has(u) ? Ne("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(u) : n.set(u, e), h = (u, n, e, i) => (ke(u, n, "write to private field"), i ? i.call(u, e) : n.set(u, e), e), a = (u, n, e) => (ke(u, n, "access private method"), e);
16
+ var Ue = (u, n, e) => is(ts(u), e, n);
17
+ var Ge = (u, n, e) => new Promise((i, r) => {
18
+ var l = (g) => {
19
+ try {
20
+ S(e.next(g));
21
+ } catch (gt) {
22
+ r(gt);
23
+ }
24
+ }, b = (g) => {
25
+ try {
26
+ S(e.throw(g));
27
+ } catch (gt) {
28
+ r(gt);
29
+ }
30
+ }, S = (g) => g.done ? i(g.value) : Promise.resolve(g.value).then(l, b);
31
+ S((e = e.apply(u, n)).next());
32
+ });
33
+ import { S as rs } from "../Store-swP_0ymB.js";
34
+ import { i as T } from "../index-euf5anj6.js";
35
+ import { a as ns } from "../easings-Bni3YAAW.js";
36
+ import { d as he } from "../events-CsVF98U6.js";
37
+ import { d as Ie } from "../function-C10DGppn.js";
38
+ import { c as Ze } from "../jss-DtnXPEnq.js";
39
+ import { a as Ae, g as Me } from "../layout-DpZo-I0y.js";
40
+ import { c as _e } from "../math-BOBiC4TN.js";
41
+ import { p as hs, l as os } from "../number-CbdpfO3u.js";
26
42
  import "../ticker/index.js";
27
- import { TICK_ORDER as es, RESIZE_ORDER as Ae } from "../order/index.js";
28
- import { D as ss } from "../Damped-ByZFbNSt.js";
29
- import { T as is } from "../Tweened-C4xgzPkR.js";
30
- import { WheelControls as rs, KeyboardControls as ns, DragControls as hs, AutoplayControls as os } from "../controls/index.js";
31
- import { windowResizer as $t } from "../window-resizer/index.js";
32
- import { scrollEntries as vt } from "../scroll-entries/index.js";
33
- import { cssUnitParser as Fe } from "../css-unit-parser/index.js";
34
- import { CSSProperty as d } from "../css-property/index.js";
35
- import { device as ls } from "../device/index.js";
36
- import { elementResizer as ce } from "../element-resizer/index.js";
37
- import { s as cs } from "../gestures-CcXV6fCp.js";
38
- import { b as Ue } from "../dom-CVWzyXPH.js";
39
- import { ScrollSegmentElement as as } from "../scroll-segment/index.js";
40
- var f, Wt, g, ae, ue, yt, $, et, Ct, wt, he;
41
- class us {
43
+ import { TICK_ORDER as ls, RESIZE_ORDER as Te } from "../order/index.js";
44
+ import { D as cs } from "../Damped-ByZFbNSt.js";
45
+ import { T as as } from "../Tweened-C4xgzPkR.js";
46
+ import { WheelControls as us, KeyboardControls as ds, DragControls as ps, AutoplayControls as fs } from "../controls/index.js";
47
+ import { windowResizer as Bt } from "../window-resizer/index.js";
48
+ import { scrollEntries as yt } from "../scroll-entries/index.js";
49
+ import { cssUnitParser as Ke } from "../css-unit-parser/index.js";
50
+ import { CSSProperty as p } from "../css-property/index.js";
51
+ import { device as ms } from "../device/index.js";
52
+ import { elementResizer as ae } from "../element-resizer/index.js";
53
+ import { s as bs } from "../gestures-CcXV6fCp.js";
54
+ import { b as je } from "../dom-CVWzyXPH.js";
55
+ import { ScrollSegmentElement as Ss } from "../scroll-segment/index.js";
56
+ var f, Ft, y, ue, de, Ct, $, et, wt, xt, oe;
57
+ class gs {
42
58
  constructor(n, e, i) {
43
- s(this, wt);
59
+ s(this, xt);
44
60
  s(this, f);
45
- s(this, Wt);
46
- s(this, g);
47
- s(this, ae, 0);
61
+ s(this, Ft);
62
+ s(this, y);
48
63
  s(this, ue, 0);
49
- s(this, yt, 0);
64
+ s(this, de, 0);
65
+ s(this, Ct, 0);
50
66
  s(this, $, 0);
51
67
  s(this, et, null);
52
- s(this, Ct, 0);
53
- h(this, f, n), h(this, Wt, e), h(this, g, i), vt.register(t(this, f)), this.setIndex(t(this, Wt));
68
+ s(this, wt, 0);
69
+ h(this, f, n), h(this, Ft, e), h(this, y, i), yt.register(t(this, f)), this.setIndex(t(this, Ft));
54
70
  }
55
71
  get element() {
56
72
  return t(this, f);
57
73
  }
58
74
  get index() {
59
- return t(this, Wt);
75
+ return t(this, Ft);
60
76
  }
61
77
  get size() {
62
- return t(this, yt);
78
+ return t(this, Ct);
63
79
  }
64
80
  get width() {
65
- return t(this, ae);
81
+ return t(this, ue);
66
82
  }
67
83
  get height() {
68
- return t(this, ue);
84
+ return t(this, de);
69
85
  }
70
86
  get position() {
71
87
  return t(this, $);
72
88
  }
73
89
  get transformPosition() {
74
- return t(this, Ct);
90
+ return t(this, wt);
75
91
  }
76
92
  destroy() {
77
- vt.unregister(t(this, f)), this.unsetTransform();
93
+ yt.unregister(t(this, f)), this.unsetTransform();
78
94
  }
79
95
  unsetTransform() {
80
96
  t(this, f).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setCurrentIndexArcAbs(null), this.setMiddle(!1), this.setSize();
81
97
  }
82
98
  setSize(n) {
83
- n ? (t(this, f).style.setProperty("--size", n + "px"), t(this, g).axisCSSProperty.current === "x" ? (t(this, f).style.width = n + "px", t(this, f).style.height = "") : (t(this, f).style.height = n + "px", t(this, f).style.width = "")) : (t(this, f).style.width = "", t(this, f).style.height = "", t(this, f).style.removeProperty("--size"));
99
+ n ? (t(this, f).style.setProperty("--size", n + "px"), t(this, y).axisCSSProperty.current === "x" ? (t(this, f).style.width = n + "px", t(this, f).style.height = "") : (t(this, f).style.height = n + "px", t(this, f).style.width = "")) : (t(this, f).style.width = "", t(this, f).style.height = "", t(this, f).style.removeProperty("--size"));
84
100
  }
85
101
  resize() {
86
- h(this, ae, t(this, f).offsetWidth), h(this, ue, t(this, f).offsetHeight), h(this, yt, t(this, g).vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth), h(this, $, t(this, g).vertical ? Ie(t(this, f)) : ke(t(this, f))), h(this, $, t(this, $) - t(this, g).contentPosition);
102
+ h(this, ue, t(this, f).offsetWidth), h(this, de, t(this, f).offsetHeight), h(this, Ct, t(this, y).vertical ? t(this, f).offsetHeight : t(this, f).offsetWidth), h(this, $, t(this, y).vertical ? Ae(t(this, f)) : Me(t(this, f))), h(this, $, t(this, $) - t(this, y).contentPosition);
87
103
  }
88
104
  transform() {
89
- const n = t(this, g).shiftSectionPositionCSSProperty.current;
105
+ const n = t(this, y).shiftSectionPositionCSSProperty.current;
90
106
  let e = n;
91
- const i = t(this, g).viewportSize * t(this, g).sectionDistanceScaleCSSProperty.current;
92
- t(this, g).loopCSSProperty.current && t(this, $) + t(this, yt) <= t(this, g).currentScrollValue - n / 2 && (e = (t(this, g).distance - n) * -1 - t(this, g).gap), vt.update(
107
+ const i = t(this, y).viewportSize * t(this, y).sectionDistanceScaleCSSProperty.current;
108
+ t(this, y).loopCSSProperty.current && t(this, $) + t(this, Ct) <= t(this, y).currentScrollValue - n / 2 && (e = (t(this, y).distance - n) * -1 - t(this, y).gap), yt.update(
93
109
  t(this, f),
94
- t(this, g).axisCSSProperty.current,
110
+ t(this, y).axisCSSProperty.current,
95
111
  e
96
112
  );
97
- const r = t(this, g).currentScrollValue + e, a = t(this, $) - t(this, g).viewportSize - i, b = t(this, $) + t(this, yt) + i, v = Ye(qe(r, a, b), 3);
98
- h(this, Ct, v * -1), t(this, g).vertical ? t(this, f).style.transform = `translate3d(0px, ${t(this, Ct)}px, 0px)` : t(this, f).style.transform = `translate3d(${t(this, Ct)}px, 0px, 0px)`;
113
+ const r = t(this, y).currentScrollValue + e, l = t(this, $) - t(this, y).viewportSize - i, b = t(this, $) + t(this, Ct) + i, S = hs(_e(r, l, b), 3);
114
+ h(this, wt, S * -1), t(this, y).vertical ? t(this, f).style.transform = `translate3d(0px, ${t(this, wt)}px, 0px)` : t(this, f).style.transform = `translate3d(${t(this, wt)}px, 0px, 0px)`;
99
115
  }
100
116
  setMark(n) {
101
- t(this, et) !== n && (t(this, et) && t(this, f).classList.remove(t(this, et)), n && t(this, f).classList.add(n), h(this, et, n), ne(t(this, f), "scrollSectionMarkChange", {
117
+ t(this, et) !== n && (t(this, et) && t(this, f).classList.remove(t(this, et)), n && t(this, f).classList.add(n), h(this, et, n), he(t(this, f), "scrollSectionMarkChange", {
102
118
  composed: !0,
103
119
  detail: {
104
120
  mark: t(this, et)
@@ -110,22 +126,22 @@ class us {
110
126
  t(this, f).classList.toggle("middle", n);
111
127
  }
112
128
  setIndex(n) {
113
- c(this, wt, he).call(this, "index", n);
129
+ a(this, xt, oe).call(this, "index", n);
114
130
  }
115
131
  setCurrentIndex(n) {
116
- c(this, wt, he).call(this, "current-index", n);
132
+ a(this, xt, oe).call(this, "current-index", n);
117
133
  }
118
134
  setCurrentIndexArc(n) {
119
- c(this, wt, he).call(this, "current-index-arc", n);
135
+ a(this, xt, oe).call(this, "current-index-arc", n);
120
136
  }
121
137
  setCurrentIndexArcAbs(n) {
122
- c(this, wt, he).call(this, "current-index-arc-abs", n);
138
+ a(this, xt, oe).call(this, "current-index-arc-abs", n);
123
139
  }
124
140
  }
125
- f = new WeakMap(), Wt = new WeakMap(), g = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), yt = new WeakMap(), $ = new WeakMap(), et = new WeakMap(), Ct = new WeakMap(), wt = new WeakSet(), he = function(n, e) {
141
+ f = new WeakMap(), Ft = new WeakMap(), y = new WeakMap(), ue = new WeakMap(), de = new WeakMap(), Ct = new WeakMap(), $ = new WeakMap(), et = new WeakMap(), wt = new WeakMap(), xt = new WeakSet(), oe = function(n, e) {
126
142
  e !== null ? (t(this, f).style.setProperty(`--${n}`, e.toString()), t(this, f).setAttribute(`data-${n}`, e.toString())) : (t(this, f).style.removeProperty(`--${n}`), t(this, f).removeAttribute(`data-${n}`));
127
143
  };
128
- const ds = Ne({
144
+ const vs = Ze({
129
145
  ":host": {
130
146
  position: "relative",
131
147
  width: "100%",
@@ -164,209 +180,209 @@ const ds = Ne({
164
180
  flexShrink: "0"
165
181
  }
166
182
  });
167
- var u, xt, E, st, B, W, F, T, it, rt, N, nt, Et, D, C, Pt, Lt, zt, It, Ft, kt, A, At, ht, M, ot, q, Mt, lt, Tt, ct, at, ut, m, Nt, l, de, pe, y, S, k, R, dt, V, x, P, qt, U, G, K, _, Ut, pt, Z, Dt, O, w, Gt, j, Rt, Kt, o, Me, oe, Ht, xe, Ee, Te, De, L, fe, Ge, _t, me, Re, Ve, gt, Ke, be, le, Se;
168
- class Bt extends HTMLElement {
183
+ var d, Et, P, st, B, W, F, D, it, rt, N, nt, Pt, R, w, Lt, zt, kt, It, Nt, At, A, Mt, ht, M, ot, q, Tt, lt, Dt, ct, at, ut, m, qt, c, pe, fe, C, v, I, V, dt, O, E, L, Ut, U, G, K, Z, Gt, pt, _, Rt, H, x, Kt, j, Vt, Zt, o, De, le, $t, Pe, Le, Re, Ve, z, me, Je, _t, be, Oe, He, vt, Qe, Se, ce, ge;
184
+ class Wt extends HTMLElement {
169
185
  constructor() {
170
186
  super();
171
187
  s(this, o);
172
- s(this, u, null);
173
- s(this, xt, new d(this, "--controls", !0));
174
- s(this, E, new d(this, "--axis", "y"));
175
- s(this, st, new d(this, "--reverse", !1));
176
- s(this, B, new d(this, "--direction", 0));
177
- s(this, W, new d(this, "--pages", 0, {
188
+ s(this, d, null);
189
+ s(this, Et, new p(this, "--controls", !0));
190
+ s(this, P, new p(this, "--axis", "y"));
191
+ s(this, st, new p(this, "--reverse", !1));
192
+ s(this, B, new p(this, "--direction", 0));
193
+ s(this, W, new p(this, "--pages", 0, {
178
194
  validate: (e) => Math.max(0, e - 1)
179
195
  }));
180
- s(this, F, new d(this, "--split", !1));
181
- s(this, T, new d(this, "--sectional", !1));
182
- s(this, it, new d(
196
+ s(this, F, new p(this, "--split", !1));
197
+ s(this, D, new p(this, "--sectional", !1));
198
+ s(this, it, new p(
183
199
  this,
184
200
  "--tween-easing",
185
201
  !1
186
202
  ));
187
- s(this, rt, new d(
203
+ s(this, rt, new p(
188
204
  this,
189
205
  "--tween-duration",
190
206
  !1
191
207
  ));
192
- s(this, N, new d(this, "--auto-size", !1));
193
- s(this, nt, new d(
208
+ s(this, N, new p(this, "--auto-size", !1));
209
+ s(this, nt, new p(
194
210
  this,
195
211
  "--wheel-max-delta",
196
212
  !1
197
213
  ));
198
- s(this, Et, new d(this, "--drag-inertion", 1));
199
- s(this, D, new d(
214
+ s(this, Pt, new p(this, "--drag-inertion", 1));
215
+ s(this, R, new p(
200
216
  this,
201
217
  "--sections-in-view",
202
218
  1
203
219
  ));
204
- s(this, C, new d(this, "--loop", !1));
205
- s(this, Pt, new d(this, "--damping", 20));
206
- s(this, Lt, new d(this, "--mass", 0));
207
- s(this, zt, new d(this, "--stiffness", 0));
208
- s(this, It, new d(this, "--mouse-drag", !1));
209
- s(this, Ft, new d(
220
+ s(this, w, new p(this, "--loop", !1));
221
+ s(this, Lt, new p(this, "--damping", 20));
222
+ s(this, zt, new p(this, "--mass", 0));
223
+ s(this, kt, new p(this, "--stiffness", 0));
224
+ s(this, It, new p(this, "--mouse-drag", !1));
225
+ s(this, Nt, new p(
210
226
  this,
211
227
  "--section-distance-scale",
212
228
  0.5
213
229
  ));
214
- s(this, kt, new d(this, "--start-section", 0));
215
- s(this, A, new d(this, "--autoplay", 0));
216
- s(this, At, new d(
230
+ s(this, At, new p(this, "--start-section", 0));
231
+ s(this, A, new p(this, "--autoplay", 0));
232
+ s(this, Mt, new p(
217
233
  this,
218
234
  "--autoplay-pause-duration",
219
235
  0
220
236
  ));
221
- s(this, ht, new d(
237
+ s(this, ht, new p(
222
238
  this,
223
239
  "--autoplay-user-direction",
224
240
  !1
225
241
  ));
226
- s(this, M, new d(this, "--classes", !1));
227
- s(this, ot, new d(
242
+ s(this, M, new p(this, "--classes", !1));
243
+ s(this, ot, new p(
228
244
  this,
229
245
  "--current-index-start-offset",
230
246
  0
231
247
  ));
232
- s(this, q, new d(
248
+ s(this, q, new p(
233
249
  this,
234
250
  "--current-index-end-offset",
235
251
  0
236
252
  ));
237
- s(this, Mt, new d(
253
+ s(this, Tt, new p(
238
254
  this,
239
255
  "--shift-section-position",
240
256
  0,
241
257
  { rawValueCheck: !1 }
242
258
  ));
243
- s(this, lt, new d(this, "--focus-delay", 0));
244
- s(this, Tt, new d(
259
+ s(this, lt, new p(this, "--focus-delay", 0));
260
+ s(this, Dt, new p(
245
261
  this,
246
262
  "--focus-duration",
247
263
  3e3
248
264
  ));
249
- s(this, ct, new d(this, "--disabled", !1));
250
- s(this, at, new d(this, "--hibernate", !1));
265
+ s(this, ct, new p(this, "--disabled", !1));
266
+ s(this, at, new p(this, "--hibernate", !1));
251
267
  s(this, ut, null);
252
268
  s(this, m, null);
253
- s(this, Nt, null);
254
- s(this, l, []);
255
- s(this, de, 0);
269
+ s(this, qt, null);
270
+ s(this, c, []);
256
271
  s(this, pe, 0);
257
- s(this, y, 0);
258
- s(this, S, 0);
259
- s(this, k, 0);
260
- s(this, R, null);
261
- s(this, dt, null);
272
+ s(this, fe, 0);
273
+ s(this, C, 0);
274
+ s(this, v, 0);
275
+ s(this, I, 0);
262
276
  s(this, V, null);
263
- s(this, x, null);
264
- s(this, P, new Qe(0));
265
- s(this, qt, 0);
277
+ s(this, dt, null);
278
+ s(this, O, null);
279
+ s(this, E, null);
280
+ s(this, L, new rs(0));
281
+ s(this, Ut, 0);
266
282
  s(this, U, 0);
267
283
  s(this, G, !1);
268
284
  s(this, K, !0);
269
- s(this, _, !0);
270
- s(this, Ut);
285
+ s(this, Z, !0);
286
+ s(this, Gt);
271
287
  s(this, pt);
272
- s(this, Z, new is());
273
- s(this, Dt, !1);
274
- s(this, O, null);
275
- s(this, w, !1);
276
- s(this, Gt, null);
277
- s(this, j, []);
288
+ s(this, _, new as());
278
289
  s(this, Rt, !1);
279
- s(this, Kt);
280
- s(this, L, (e) => {
281
- if (e && t(this, Rt)) {
282
- h(this, Rt, !1);
290
+ s(this, H, null);
291
+ s(this, x, !1);
292
+ s(this, Kt, null);
293
+ s(this, j, []);
294
+ s(this, Vt, !1);
295
+ s(this, Zt);
296
+ s(this, z, (e) => {
297
+ if (e && t(this, Vt)) {
298
+ h(this, Vt, !1);
283
299
  return;
284
300
  }
285
301
  this.resize();
286
302
  });
287
- s(this, fe, () => {
288
- if (!t(this, G) || t(this, _) || t(this, K))
303
+ s(this, me, () => {
304
+ if (!t(this, G) || t(this, Z) || t(this, K))
289
305
  return;
290
306
  const e = this.currentScrollValue;
291
- if (h(this, qt, Math.max(0, e - t(this, S))), t(this, l).length) {
292
- for (let i = 0; i < t(this, l).length; i++)
293
- t(this, l)[i].transform();
294
- t(this, P).current = c(this, o, le).call(this);
307
+ if (h(this, Ut, Math.max(0, e - t(this, v))), t(this, c).length) {
308
+ for (let i = 0; i < t(this, c).length; i++)
309
+ t(this, c)[i].transform();
310
+ t(this, L).current = a(this, o, ce).call(this);
295
311
  } else
296
312
  this.vertical ? t(this, m).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, m).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
297
- c(this, o, Ke).call(this), vt.update(
313
+ a(this, o, Qe).call(this), yt.update(
298
314
  this,
299
- t(this, E).current,
315
+ t(this, P).current,
300
316
  e
301
317
  );
302
318
  });
303
319
  s(this, _t, (e, i) => {
304
- t(this, xt).current && (c(this, o, Re).call(this, Math.sign(i) || 1), t(this, me).call(this, e, i));
320
+ t(this, Et).current && (a(this, o, Oe).call(this, Math.sign(i) || 1), t(this, be).call(this, e, i));
305
321
  });
306
- s(this, me, (e, i) => {
322
+ s(this, be, (e, i) => {
307
323
  if (t(this, B).current) {
308
324
  if (t(this, B).current < 0 && i > 0)
309
325
  return;
310
326
  if (t(this, B).current > 0 && i < 0)
311
327
  return;
312
328
  }
313
- if (t(this, pt) || t(this, Z).unlistenAnimationFrame(), !t(this, A).current && t(this, lt).current && (clearInterval(t(this, Ut)), h(this, Ut, setTimeout(() => {
314
- const r = t(this, l)[c(this, o, le).call(this)];
329
+ if (t(this, pt) || t(this, _).unlistenAnimationFrame(), !t(this, A).current && t(this, lt).current && (clearInterval(t(this, Gt)), h(this, Gt, setTimeout(() => {
330
+ const r = t(this, c)[a(this, o, ce).call(this)];
315
331
  r && this.scrollToSection(r.index, {
316
332
  tween: {
317
- duration: t(this, Tt).current,
318
- easing: Xe
333
+ duration: t(this, Dt).current,
334
+ easing: ns
319
335
  }
320
336
  });
321
- }, t(this, lt).current))), !(e.includes("drag") && !ls.isTouch && !t(this, It).current)) {
322
- if (t(this, T).current && e !== "drag") {
337
+ }, t(this, lt).current))), !(e.includes("drag") && !ms.isTouch && !t(this, It).current)) {
338
+ if (t(this, D).current && e !== "drag") {
323
339
  const r = Math.sign(i);
324
- if (t(this, l).length) {
325
- const a = {
340
+ if (t(this, c).length) {
341
+ const l = {
326
342
  tween: t(this, it).current || t(this, rt).current ? {
327
343
  easing: t(this, it).current || "easeInOutCubic",
328
344
  duration: t(this, rt).current || 500
329
345
  } : void 0
330
346
  };
331
- t(this, Dt) ? this.scrollToSection(c(this, o, le).call(this, !0), a) : this.shiftSections(r, a);
347
+ t(this, Rt) ? this.scrollToSection(a(this, o, ce).call(this, !0), l) : this.shiftSections(r, l);
332
348
  } else
333
- t(this, u).shift(r * t(this, y));
349
+ t(this, d).shift(r * t(this, C));
334
350
  } else
335
- t(this, u).shift(i);
336
- h(this, Dt, e === "drag");
351
+ t(this, d).shift(i);
352
+ h(this, Rt, e === "drag");
337
353
  }
338
354
  });
339
- s(this, be, ze(() => {
355
+ s(this, Se, Ie(() => {
340
356
  const e = t(this, j).reduce((i, r) => {
341
- const a = this.vertical ? r.width : r.height;
342
- return a > i ? a : i;
357
+ const l = this.vertical ? r.width : r.height;
358
+ return l > i ? l : i;
343
359
  }, 0);
344
- clearTimeout(t(this, Kt)), h(this, Rt, !0), this.style.setProperty("--max-section-size", ""), h(this, Kt, setTimeout(() => {
345
- h(this, Rt, !0), this.style.setProperty("--max-section-size", e + "px");
360
+ clearTimeout(t(this, Zt)), h(this, Vt, !0), this.style.setProperty("--max-section-size", ""), h(this, Zt, setTimeout(() => {
361
+ h(this, Vt, !0), this.style.setProperty("--max-section-size", e + "px");
346
362
  }, 10));
347
363
  }, 20));
348
- s(this, Se, () => {
349
- h(this, w, !0), this.hibernatedCSSProperty.current || c(this, o, De).call(this);
364
+ s(this, ge, () => {
365
+ h(this, x, !0), this.hibernatedCSSProperty.current || a(this, o, Ve).call(this);
350
366
  });
351
- if (H) {
367
+ if (T) {
352
368
  const e = this.attachShadow({ mode: "open" });
353
- e.adoptedStyleSheets = [ds];
369
+ e.adoptedStyleSheets = [vs];
354
370
  const i = document.createElement("div");
355
- i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, ut, document.createElement("div")), t(this, ut).className = "content-wrapper", h(this, m, document.createElement("div")), t(this, m).className = "content", h(this, Nt, document.createElement("slot")), t(this, m).appendChild(t(this, Nt)), t(this, ut).appendChild(t(this, m)), e.appendChild(t(this, ut)), h(this, Gt, new MutationObserver(
356
- ze(() => {
371
+ i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), h(this, ut, document.createElement("div")), t(this, ut).className = "content-wrapper", h(this, m, document.createElement("div")), t(this, m).className = "content", h(this, qt, document.createElement("slot")), t(this, m).appendChild(t(this, qt)), t(this, ut).appendChild(t(this, m)), e.appendChild(t(this, ut)), h(this, Kt, new MutationObserver(
372
+ Ie(() => {
357
373
  this.tryResplit();
358
374
  }, 10)
359
375
  ));
360
376
  }
361
377
  }
362
378
  get damped() {
363
- return t(this, u);
379
+ return t(this, d);
364
380
  }
365
381
  get controlsCSSProperty() {
366
- return t(this, xt);
382
+ return t(this, Et);
367
383
  }
368
384
  get axisCSSProperty() {
369
- return t(this, E);
385
+ return t(this, P);
370
386
  }
371
387
  get reverseCSSProperty() {
372
388
  return t(this, st);
@@ -381,7 +397,7 @@ class Bt extends HTMLElement {
381
397
  return t(this, F);
382
398
  }
383
399
  get sectionalCSSProperty() {
384
- return t(this, T);
400
+ return t(this, D);
385
401
  }
386
402
  get easingCSSProperty() {
387
403
  return t(this, it);
@@ -396,37 +412,37 @@ class Bt extends HTMLElement {
396
412
  return t(this, nt);
397
413
  }
398
414
  get dragInertionCSSProperty() {
399
- return t(this, Et);
415
+ return t(this, Pt);
400
416
  }
401
417
  get sectionsInViewCSSProperty() {
402
- return t(this, D);
418
+ return t(this, R);
403
419
  }
404
420
  get loopCSSProperty() {
405
- return t(this, C);
421
+ return t(this, w);
406
422
  }
407
423
  get dampingCSSProperty() {
408
- return t(this, Pt);
424
+ return t(this, Lt);
409
425
  }
410
426
  get massCSSProperty() {
411
- return t(this, Lt);
427
+ return t(this, zt);
412
428
  }
413
429
  get stiffnessCSSProperty() {
414
- return t(this, zt);
430
+ return t(this, kt);
415
431
  }
416
432
  get mouseDragCSSProperty() {
417
433
  return t(this, It);
418
434
  }
419
435
  get sectionDistanceScaleCSSProperty() {
420
- return t(this, Ft);
436
+ return t(this, Nt);
421
437
  }
422
438
  get startSectionCSSProperty() {
423
- return t(this, kt);
439
+ return t(this, At);
424
440
  }
425
441
  get autoplayCSSProperty() {
426
442
  return t(this, A);
427
443
  }
428
444
  get autoplayPauseDurationCSSProperty() {
429
- return t(this, At);
445
+ return t(this, Mt);
430
446
  }
431
447
  get autoplayUserDirectionCSSProperty() {
432
448
  return t(this, ht);
@@ -441,13 +457,13 @@ class Bt extends HTMLElement {
441
457
  return t(this, q);
442
458
  }
443
459
  get shiftSectionPositionCSSProperty() {
444
- return t(this, Mt);
460
+ return t(this, Tt);
445
461
  }
446
462
  get focusDelayCSSProperty() {
447
463
  return t(this, lt);
448
464
  }
449
465
  get focusDurationCSSProperty() {
450
- return t(this, Tt);
466
+ return t(this, Dt);
451
467
  }
452
468
  get disabledCSSProperty() {
453
469
  return t(this, ct);
@@ -456,10 +472,10 @@ class Bt extends HTMLElement {
456
472
  return t(this, at);
457
473
  }
458
474
  get currentScrollValue() {
459
- return c(this, o, Ve).call(this, "current");
475
+ return a(this, o, He).call(this, "current");
460
476
  }
461
477
  get targetScrollValue() {
462
- return c(this, o, Ve).call(this, "target");
478
+ return a(this, o, He).call(this, "target");
463
479
  }
464
480
  get contentWrapperElement() {
465
481
  return t(this, ut);
@@ -468,48 +484,48 @@ class Bt extends HTMLElement {
468
484
  return t(this, m);
469
485
  }
470
486
  get sections() {
471
- return t(this, l);
487
+ return t(this, c);
472
488
  }
473
489
  get position() {
474
- return t(this, de);
490
+ return t(this, pe);
475
491
  }
476
492
  get contentPosition() {
477
- return t(this, pe);
493
+ return t(this, fe);
478
494
  }
479
495
  get viewportSize() {
480
- return t(this, y);
496
+ return t(this, C);
481
497
  }
482
498
  get scrollSize() {
483
- return t(this, S);
499
+ return t(this, v);
484
500
  }
485
501
  get gap() {
486
- return t(this, k);
502
+ return t(this, I);
487
503
  }
488
504
  get counter() {
489
- return t(this, P);
505
+ return t(this, L);
490
506
  }
491
507
  get limit() {
492
508
  return Math.ceil(
493
- t(this, l).length - t(this, D).current
509
+ t(this, c).length - t(this, R).current
494
510
  );
495
511
  }
496
512
  get distance() {
497
513
  return t(this, U);
498
514
  }
499
515
  get loopDistance() {
500
- return t(this, C).current ? t(this, U) + t(this, k) : t(this, U);
516
+ return t(this, w).current ? t(this, U) + t(this, I) : t(this, U);
501
517
  }
502
518
  get hasOverflow() {
503
519
  return t(this, G);
504
520
  }
505
521
  get overscroll() {
506
- return t(this, qt);
522
+ return t(this, Ut);
507
523
  }
508
524
  get scrollLine() {
509
- return t(this, O);
525
+ return t(this, H);
510
526
  }
511
527
  get vertical() {
512
- return t(this, E).current === "y";
528
+ return t(this, P).current === "y";
513
529
  }
514
530
  get currentProgress() {
515
531
  return this.currentScrollValue / this.loopDistance || 0;
@@ -518,290 +534,290 @@ class Bt extends HTMLElement {
518
534
  return this.targetScrollValue / this.loopDistance || 0;
519
535
  }
520
536
  get scrollWidth() {
521
- return t(this, E).current === "y" ? 0 : t(this, u).distance;
537
+ return t(this, P).current === "y" ? 0 : t(this, d).distance;
522
538
  }
523
539
  get scrollHeight() {
524
- return t(this, E).current === "x" ? 0 : t(this, u).distance;
540
+ return t(this, P).current === "x" ? 0 : t(this, d).distance;
525
541
  }
526
542
  tryResplit() {
527
- !t(this, _) && (t(this, C).current || t(this, F).current || t(this, C).current || t(this, N).current || t(this, T).current) && c(this, o, oe).call(this);
543
+ !t(this, Z) && (t(this, w).current || t(this, F).current || t(this, w).current || t(this, N).current || t(this, D).current) && a(this, o, le).call(this);
528
544
  }
529
545
  onScroll(...e) {
530
- return t(this, u).subscribe(...e);
546
+ return t(this, d).subscribe(...e);
531
547
  }
532
548
  offScroll(...e) {
533
- t(this, u).unsubscribe(...e);
549
+ t(this, d).unsubscribe(...e);
534
550
  }
535
551
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
536
552
  range(e, i, r = 0) {
537
- const a = e - r, b = a + i + r * 2;
538
- return this.currentProgress < a ? 0 : this.currentProgress > b ? 1 : (this.currentProgress - a) / (b - a);
553
+ const l = e - r, b = l + i + r * 2;
554
+ return this.currentProgress < l ? 0 : this.currentProgress > b ? 1 : (this.currentProgress - l) / (b - l);
539
555
  }
540
556
  curve(e, i, r = 0) {
541
557
  return Math.sin(this.range(e, i, r) * Math.PI);
542
558
  }
543
559
  visible(e, i, r = 0) {
544
- const a = e - r, b = a + i + r * 2;
545
- return this.currentProgress >= a && this.currentProgress <= b;
560
+ const l = e - r, b = l + i + r * 2;
561
+ return this.currentProgress >= l && this.currentProgress <= b;
546
562
  }
547
563
  scrollToSection(e, i) {
548
- if (!t(this, l).length)
564
+ if (!t(this, c).length)
549
565
  return;
550
- const r = t(this, P).current, a = c(this, o, Ge).call(this, e), b = t(this, l)[r], v = t(this, l)[a];
551
- if (b && v) {
552
- let I = 0;
553
- const Pe = c(this, o, le).call(this), Ot = t(this, l)[Pe];
554
- let re = Ot ? this.targetScrollValue - Ot.position : 0;
555
- t(this, C).current ? a === 0 && r === t(this, l).length - 1 ? (I = t(this, S) + t(this, y) - b.position + t(this, k), t(this, Dt) || (re = 0)) : a === t(this, l).length - 1 && r === 0 ? I = v.position - (t(this, S) + t(this, y) + t(this, k)) : I = v.position - b.position : I = v.position - b.position, this.shiftPosition(I - re, i);
566
+ const r = t(this, L).current, l = a(this, o, Je).call(this, e), b = t(this, c)[r], S = t(this, c)[l];
567
+ if (b && S) {
568
+ let g = 0;
569
+ const gt = a(this, o, ce).call(this), Ht = t(this, c)[gt];
570
+ let ne = Ht ? this.targetScrollValue - Ht.position : 0;
571
+ t(this, w).current ? l === 0 && r === t(this, c).length - 1 ? (g = t(this, v) + t(this, C) - b.position + t(this, I), t(this, Rt) || (ne = 0)) : l === t(this, c).length - 1 && r === 0 ? g = S.position - (t(this, v) + t(this, C) + t(this, I)) : g = S.position - b.position : g = S.position - b.position, this.shiftPosition(g - ne, i);
556
572
  }
557
573
  }
558
574
  shiftSections(e, i) {
559
- t(this, l).length && this.scrollToSection(t(this, P).current + e, i);
575
+ t(this, c).length && this.scrollToSection(t(this, L).current + e, i);
560
576
  }
561
577
  setPosition(e, i) {
562
- c(this, o, Re).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, pt) || (t(this, Z).set(t(this, u).current, { equalize: !0 }), t(this, Z).set(e, We({}, i.tween)), h(this, pt, setTimeout(() => {
578
+ a(this, o, Oe).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, pt) || (t(this, _).set(t(this, d).current, { equalize: !0 }), t(this, _).set(e, qe({}, i.tween)), h(this, pt, setTimeout(() => {
563
579
  h(this, pt, void 0);
564
- }, i.tween.duration || 0))) : t(this, u).set(e, {
580
+ }, i.tween.duration || 0))) : t(this, d).set(e, {
565
581
  equalize: (i == null ? void 0 : i.behaviour) === "instant"
566
582
  });
567
583
  }
568
584
  shiftPosition(e, i) {
569
- this.setPosition(t(this, u).target + e, i);
585
+ this.setPosition(t(this, d).target + e, i);
570
586
  }
571
587
  resize() {
572
588
  if (t(this, at).current)
573
589
  return;
574
- t(this, u).unlistenAnimationFrame();
575
- const e = this.currentScrollValue / t(this, S) || 0, i = t(this, P).current;
576
- if (h(this, de, this.vertical ? Ie(this) : ke(this)), h(this, pe, this.vertical ? Ie(t(this, m)) : ke(t(this, m))), h(this, y, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, k, Fe.parse(
590
+ t(this, d).unlistenAnimationFrame();
591
+ const e = this.currentScrollValue / t(this, v) || 0, i = t(this, L).current;
592
+ if (h(this, pe, this.vertical ? Ae(this) : Me(this)), h(this, fe, this.vertical ? Ae(t(this, m)) : Me(t(this, m))), h(this, C, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? h(this, I, Ke.parse(
577
593
  getComputedStyle(t(this, m)).rowGap
578
- )) : h(this, k, Fe.parse(
594
+ )) : h(this, I, Ke.parse(
579
595
  getComputedStyle(t(this, m)).columnGap
580
- )), t(this, N).current && t(this, l).length) {
581
- const r = t(this, D).current, a = (t(this, y) - t(this, k) * (r - 1)) / r;
582
- t(this, l).forEach((b) => {
583
- b.setSize(a);
596
+ )), t(this, N).current && t(this, c).length) {
597
+ const r = t(this, R).current, l = (t(this, C) - t(this, I) * (r - 1)) / r;
598
+ t(this, c).forEach((b) => {
599
+ b.setSize(l);
584
600
  });
585
601
  } else
586
- t(this, l).forEach((r) => {
602
+ t(this, c).forEach((r) => {
587
603
  r.setSize();
588
604
  });
589
- if (t(this, l).forEach((r) => {
605
+ if (t(this, c).forEach((r) => {
590
606
  r.resize();
591
607
  }), t(this, W).current) {
592
- h(this, S, t(this, y) * t(this, W).current);
593
- const r = t(this, S) + t(this, y);
608
+ h(this, v, t(this, C) * t(this, W).current);
609
+ const r = t(this, v) + t(this, C);
594
610
  this.vertical ? (t(this, m).style.width = r + "px", t(this, m).style.height = "100%") : (t(this, m).style.height = r + "px", t(this, m).style.width = "100%");
595
611
  } else
596
- this.vertical ? (t(this, m).style.width = "100%", t(this, m).style.height = "max-content", h(this, S, t(this, m).offsetHeight - t(this, y))) : (t(this, m).style.width = "max-content", t(this, m).style.height = "100%", h(this, S, t(this, m).offsetWidth - t(this, y)));
597
- if (!t(this, C).current) {
598
- const r = getComputedStyle(this), a = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
599
- h(this, S, t(this, S) + a), t(this, u).max = t(this, S);
612
+ this.vertical ? (t(this, m).style.width = "100%", t(this, m).style.height = "max-content", h(this, v, t(this, m).offsetHeight - t(this, C))) : (t(this, m).style.width = "max-content", t(this, m).style.height = "100%", h(this, v, t(this, m).offsetWidth - t(this, C)));
613
+ if (!t(this, w).current) {
614
+ const r = getComputedStyle(this), l = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
615
+ h(this, v, t(this, v) + l), t(this, d).max = t(this, v);
600
616
  }
601
- if (t(this, C).current && t(this, l).length) {
602
- const r = t(this, l)[t(this, l).length - 1], a = r.position + r.size - t(this, y), b = t(this, S) - a;
617
+ if (t(this, w).current && t(this, c).length) {
618
+ const r = t(this, c)[t(this, c).length - 1], l = r.position + r.size - t(this, C), b = t(this, v) - l;
603
619
  h(this, U, r.position + r.size + b);
604
620
  } else
605
- h(this, U, t(this, S));
606
- if (t(this, T).current && t(this, l).length) {
607
- const r = t(this, l)[i];
608
- t(this, u).set(r.position, {
621
+ h(this, U, t(this, v));
622
+ if (t(this, D).current && t(this, c).length) {
623
+ const r = t(this, c)[i];
624
+ t(this, d).set(r.position, {
609
625
  equalize: !0
610
626
  });
611
627
  } else
612
- t(this, u).set(e * t(this, S), {
628
+ t(this, d).set(e * t(this, v), {
613
629
  equalize: !0
614
630
  });
615
- h(this, G, (this.vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth) > t(this, y)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, ct).current || c(this, o, Ee).call(this) : c(this, o, xe).call(this), t(this, be).call(this), ne(this, "scrollResize", { custom: !0 }), t(this, u).notify();
631
+ h(this, G, (this.vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth) > t(this, C)), this.classList.toggle("has-overflow", t(this, G)), t(this, G) ? t(this, ct).current || a(this, o, Le).call(this) : a(this, o, Pe).call(this), t(this, Se).call(this), he(this, "scrollResize", { custom: !0 }), t(this, d).notify();
616
632
  }
617
633
  connectedCallback() {
618
- vt.register(this), h(this, u, new ss(0, {
634
+ yt.register(this), h(this, d, new cs(0, {
619
635
  damping: 0.01,
620
636
  min: 0,
621
- order: es.SCROLL
622
- })), this.setAttribute("tabindex", "0"), h(this, R, new rs({ element: t(this, m) })), t(this, R).changeEvent.subscribe(t(this, _t)), h(this, dt, new ns({
637
+ order: ls.SCROLL
638
+ })), this.setAttribute("tabindex", "0"), h(this, V, new us({ element: t(this, m) })), t(this, V).changeEvent.subscribe(t(this, _t)), h(this, dt, new ds({
623
639
  element: this
624
640
  })), t(this, dt).changeEvent.subscribe(
625
641
  t(this, _t)
626
- ), h(this, V, new hs({
642
+ ), h(this, O, new ps({
627
643
  element: t(this, m),
628
644
  rootElement: this
629
- })), t(this, V).changeEvent.subscribe(t(this, _t)), h(this, x, new os({
645
+ })), t(this, O).changeEvent.subscribe(t(this, _t)), h(this, E, new fs({
630
646
  culling: this
631
- })), t(this, x).changeEvent.subscribe(t(this, me)), t(this, E).subscribe(() => {
632
- c(this, o, Me).call(this);
647
+ })), t(this, E).changeEvent.subscribe(t(this, be)), t(this, P).subscribe(() => {
648
+ a(this, o, De).call(this);
633
649
  }), t(this, st).subscribe(() => {
634
- c(this, o, Me).call(this);
650
+ a(this, o, De).call(this);
635
651
  }), t(this, nt).subscribe((e) => {
636
- t(this, R).axis = e.current ? "max" : t(this, E).current;
637
- }), t(this, Et).subscribe((e) => {
638
- t(this, V).inertion = typeof e.current == "number" ? e.current : 1;
652
+ t(this, V).axis = e.current ? "max" : t(this, P).current;
653
+ }), t(this, Pt).subscribe((e) => {
654
+ t(this, O).inertion = typeof e.current == "number" ? e.current : 1;
639
655
  }), t(this, W).subscribe(() => {
640
- t(this, w) && t(this, L).call(this);
656
+ t(this, x) && t(this, z).call(this);
641
657
  }), t(this, F).subscribe(({ current: e }) => {
642
- t(this, w) && (e ? c(this, o, oe).call(this) : c(this, o, Ht).call(this));
643
- }), t(this, T).subscribe((e) => {
644
- t(this, R).debounce = e.current, t(this, V).swipe = e.current, t(this, x).interval = e.current, t(this, w) && (e.current && !e.previous && !t(this, l).length ? c(this, o, oe).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Ht).call(this));
645
- }), t(this, N).subscribe((e) => {
646
- t(this, w) && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? c(this, o, oe).call(this) : !e.current && e.previous && t(this, l).length && c(this, o, Ht).call(this));
658
+ t(this, x) && (e ? a(this, o, le).call(this) : a(this, o, $t).call(this));
647
659
  }), t(this, D).subscribe((e) => {
648
- t(this, w) && (t(this, L).call(this), c(this, o, gt).call(this));
649
- }), t(this, C).subscribe((e) => {
650
- e.current ? (t(this, w) && (t(this, l).length || (t(this, F).current = !0)), t(this, u).max = 1 / 0, t(this, u).min = -1 / 0) : (h(this, qt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
651
- }), t(this, Pt).subscribe((e) => {
652
- t(this, u).damping = e.current;
660
+ t(this, V).debounce = e.current, t(this, O).swipe = e.current, t(this, E).interval = e.current, t(this, x) && (e.current && !e.previous && !t(this, c).length ? a(this, o, le).call(this) : !e.current && e.previous && t(this, c).length && a(this, o, $t).call(this));
661
+ }), t(this, N).subscribe((e) => {
662
+ t(this, x) && (t(this, z).call(this), e.current && !e.previous && !t(this, c).length ? a(this, o, le).call(this) : !e.current && e.previous && t(this, c).length && a(this, o, $t).call(this));
663
+ }), t(this, R).subscribe((e) => {
664
+ t(this, x) && (t(this, z).call(this), a(this, o, vt).call(this));
665
+ }), t(this, w).subscribe((e) => {
666
+ e.current ? (t(this, x) && (t(this, c).length || (t(this, F).current = !0)), t(this, d).max = 1 / 0, t(this, d).min = -1 / 0) : (h(this, Ut, 0), t(this, d).max = t(this, v), t(this, d).min = 0);
653
667
  }), t(this, Lt).subscribe((e) => {
654
- t(this, u).mass = e.current;
668
+ t(this, d).damping = e.current;
655
669
  }), t(this, zt).subscribe((e) => {
656
- t(this, u).stiffness = e.current;
670
+ t(this, d).mass = e.current;
671
+ }), t(this, kt).subscribe((e) => {
672
+ t(this, d).stiffness = e.current;
657
673
  }), t(this, A).subscribe((e) => {
658
- t(this, x).speed = e.current, !t(this, K) && e.current && !e.previous ? t(this, x).connect() : !e.current && e.previous && t(this, x).disconnect();
674
+ t(this, E).speed = e.current, !t(this, K) && e.current && !e.previous ? t(this, E).connect() : !e.current && e.previous && t(this, E).disconnect();
659
675
  }), t(this, ht).subscribe((e) => {
660
- e.current || (t(this, x).direction = 1);
676
+ e.current || (t(this, E).direction = 1);
661
677
  }), t(this, M).subscribe((e) => {
662
- t(this, w) && c(this, o, gt).call(this);
678
+ t(this, x) && a(this, o, vt).call(this);
663
679
  }), t(this, ot).subscribe((e) => {
664
- t(this, w) && t(this, M).current && c(this, o, gt).call(this);
680
+ t(this, x) && t(this, M).current && a(this, o, vt).call(this);
665
681
  }), t(this, q).subscribe((e) => {
666
- t(this, w) && t(this, M).current && c(this, o, gt).call(this);
667
- }), t(this, Mt).subscribe((e) => {
668
- t(this, w) && t(this, u).notify();
669
- }), t(this, u).isRunning.subscribe((e) => {
682
+ t(this, x) && t(this, M).current && a(this, o, vt).call(this);
683
+ }), t(this, Tt).subscribe((e) => {
684
+ t(this, x) && t(this, d).notify();
685
+ }), t(this, d).isRunning.subscribe((e) => {
670
686
  this.classList.toggle("active", e.current);
671
- }), t(this, P).subscribe((e) => {
672
- t(this, l).length && c(this, o, gt).call(this), this.style.setProperty("--counter", e.current + "");
673
- }), t(this, Z).subscribe((e) => {
674
- t(this, Z).isRunning.current && t(this, u).set(e.current, { equalize: !0 });
687
+ }), t(this, L).subscribe((e) => {
688
+ t(this, c).length && a(this, o, vt).call(this), this.style.setProperty("--counter", e.current + "");
689
+ }), t(this, _).subscribe((e) => {
690
+ t(this, _).isRunning.current && t(this, d).set(e.current, { equalize: !0 });
675
691
  }), t(this, ct).subscribe((e) => {
676
- e.current && !e.previous ? (this.classList.add("disabled"), c(this, o, xe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), c(this, o, Ee).call(this));
692
+ e.current && !e.previous ? (this.classList.add("disabled"), a(this, o, Pe).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), a(this, o, Le).call(this));
677
693
  }), t(this, at).subscribe((e) => {
678
- e.current && !e.previous ? (this.classList.add("hibernated"), c(this, o, Te).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), c(this, o, De).call(this));
679
- }), t(this, xt).observe(), t(this, E).observe(), t(this, st).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, T).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, N).observe(), t(this, nt).observe(), t(this, Et).observe(), t(this, D).observe(), t(this, C).observe(), t(this, Pt).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, It).observe(), t(this, Ft).observe(), t(this, kt).observe(), t(this, A).observe(), t(this, A).observe(), t(this, At).observe(), t(this, ht).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, q).observe(), t(this, Mt).observe(), t(this, lt).observe(), t(this, Tt).observe(), t(this, ct).observe(), t(this, at).observe(), $t.subscribe(t(this, Se), Ae.LAST), ce.subscribe(this, t(this, L)), t(this, Gt).observe(this, { childList: !0 });
694
+ e.current && !e.previous ? (this.classList.add("hibernated"), a(this, o, Re).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), a(this, o, Ve).call(this));
695
+ }), t(this, Et).observe(), t(this, P).observe(), t(this, st).observe(), t(this, B).observe(), t(this, W).observe(), t(this, F).observe(), t(this, D).observe(), t(this, it).observe(), t(this, rt).observe(), t(this, N).observe(), t(this, nt).observe(), t(this, Pt).observe(), t(this, R).observe(), t(this, w).observe(), t(this, Lt).observe(), t(this, zt).observe(), t(this, kt).observe(), t(this, It).observe(), t(this, Nt).observe(), t(this, At).observe(), t(this, A).observe(), t(this, A).observe(), t(this, Mt).observe(), t(this, ht).observe(), t(this, M).observe(), t(this, ot).observe(), t(this, q).observe(), t(this, Tt).observe(), t(this, lt).observe(), t(this, Dt).observe(), t(this, ct).observe(), t(this, at).observe(), Bt.subscribe(t(this, ge), Te.LAST), ae.subscribe(this, t(this, z)), t(this, Kt).observe(this, { childList: !0 });
680
696
  }
681
697
  disconnectedCallback() {
682
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, xt).unobserve(), t(this, E).unobserve(), t(this, st).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, T).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, N).unobserve(), t(this, nt).unobserve(), t(this, Et).unobserve(), t(this, D).unobserve(), t(this, C).unobserve(), t(this, Pt).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, It).unobserve(), t(this, Ft).unobserve(), t(this, kt).unobserve(), t(this, A).unobserve(), t(this, At).unobserve(), t(this, ht).unobserve(), t(this, M).unobserve(), t(this, ot).unobserve(), t(this, q).unobserve(), t(this, Mt).unobserve(), t(this, lt).unobserve(), t(this, Tt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), $t.unsubscribe(t(this, Se)), ce.unsubscribe(t(this, L)), c(this, o, Te).call(this), t(this, Gt).disconnect();
698
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, Et).unobserve(), t(this, P).unobserve(), t(this, st).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, F).unobserve(), t(this, D).unobserve(), t(this, it).unobserve(), t(this, rt).unobserve(), t(this, N).unobserve(), t(this, nt).unobserve(), t(this, Pt).unobserve(), t(this, R).unobserve(), t(this, w).unobserve(), t(this, Lt).unobserve(), t(this, zt).unobserve(), t(this, kt).unobserve(), t(this, It).unobserve(), t(this, Nt).unobserve(), t(this, At).unobserve(), t(this, A).unobserve(), t(this, Mt).unobserve(), t(this, ht).unobserve(), t(this, M).unobserve(), t(this, ot).unobserve(), t(this, q).unobserve(), t(this, Tt).unobserve(), t(this, lt).unobserve(), t(this, Dt).unobserve(), t(this, ct).unobserve(), t(this, at).unobserve(), Bt.unsubscribe(t(this, ge)), ae.unsubscribe(t(this, z)), a(this, o, Re).call(this), t(this, Kt).disconnect();
683
699
  }
684
700
  }
685
- u = new WeakMap(), xt = new WeakMap(), E = new WeakMap(), st = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), T = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), N = new WeakMap(), nt = new WeakMap(), Et = new WeakMap(), D = new WeakMap(), C = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), It = new WeakMap(), Ft = new WeakMap(), kt = new WeakMap(), A = new WeakMap(), At = new WeakMap(), ht = new WeakMap(), M = new WeakMap(), ot = new WeakMap(), q = new WeakMap(), Mt = new WeakMap(), lt = new WeakMap(), Tt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), m = new WeakMap(), Nt = new WeakMap(), l = new WeakMap(), de = new WeakMap(), pe = new WeakMap(), y = new WeakMap(), S = new WeakMap(), k = new WeakMap(), R = new WeakMap(), dt = new WeakMap(), V = new WeakMap(), x = new WeakMap(), P = new WeakMap(), qt = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), _ = new WeakMap(), Ut = new WeakMap(), pt = new WeakMap(), Z = new WeakMap(), Dt = new WeakMap(), O = new WeakMap(), w = new WeakMap(), Gt = new WeakMap(), j = new WeakMap(), Rt = new WeakMap(), Kt = new WeakMap(), o = new WeakSet(), Me = function() {
686
- const e = t(this, E).current, i = t(this, st).current ? "-reverse" : "";
687
- t(this, m).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, R).axis = t(this, nt).current ? "max" : e, t(this, dt).dimension = e === "x" ? "width" : "height", t(this, V).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, w) && t(this, L).call(this);
688
- }, oe = function() {
689
- c(this, o, Ht).call(this), t(this, Nt).assignedElements().forEach((e, i) => {
690
- e instanceof HTMLElement && t(this, l).push(new us(e, i, this));
691
- }), t(this, m).style.transform = "", this.style.setProperty("--sections", t(this, l).length.toString()), ne(this, "scrollSectionsChange", {
701
+ d = new WeakMap(), Et = new WeakMap(), P = new WeakMap(), st = new WeakMap(), B = new WeakMap(), W = new WeakMap(), F = new WeakMap(), D = new WeakMap(), it = new WeakMap(), rt = new WeakMap(), N = new WeakMap(), nt = new WeakMap(), Pt = new WeakMap(), R = new WeakMap(), w = new WeakMap(), Lt = new WeakMap(), zt = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), A = new WeakMap(), Mt = new WeakMap(), ht = new WeakMap(), M = new WeakMap(), ot = new WeakMap(), q = new WeakMap(), Tt = new WeakMap(), lt = new WeakMap(), Dt = new WeakMap(), ct = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), m = new WeakMap(), qt = new WeakMap(), c = new WeakMap(), pe = new WeakMap(), fe = new WeakMap(), C = new WeakMap(), v = new WeakMap(), I = new WeakMap(), V = new WeakMap(), dt = new WeakMap(), O = new WeakMap(), E = new WeakMap(), L = new WeakMap(), Ut = new WeakMap(), U = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Gt = new WeakMap(), pt = new WeakMap(), _ = new WeakMap(), Rt = new WeakMap(), H = new WeakMap(), x = new WeakMap(), Kt = new WeakMap(), j = new WeakMap(), Vt = new WeakMap(), Zt = new WeakMap(), o = new WeakSet(), De = function() {
702
+ const e = t(this, P).current, i = t(this, st).current ? "-reverse" : "";
703
+ t(this, m).style.flexDirection = e === "x" ? `row${i}` : `column${i}`, t(this, V).axis = t(this, nt).current ? "max" : e, t(this, dt).dimension = e === "x" ? "width" : "height", t(this, O).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, x) && t(this, z).call(this);
704
+ }, le = function() {
705
+ a(this, o, $t).call(this), t(this, qt).assignedElements().forEach((e, i) => {
706
+ e instanceof HTMLElement && t(this, c).push(new gs(e, i, this));
707
+ }), t(this, m).style.transform = "", this.style.setProperty("--sections", t(this, c).length.toString()), he(this, "scrollSectionsChange", {
692
708
  custom: !0,
693
709
  composed: !0
694
- }), t(this, L).call(this), c(this, o, gt).call(this);
695
- }, Ht = function() {
696
- t(this, l).forEach((e) => {
710
+ }), t(this, z).call(this), a(this, o, vt).call(this);
711
+ }, $t = function() {
712
+ t(this, c).forEach((e) => {
697
713
  e.destroy();
698
- }), h(this, l, []), t(this, P).reset(), t(this, u).reset(), this.style.removeProperty("--max-section-size"), ne(this, "scrollSectionsChange", {
714
+ }), h(this, c, []), t(this, L).reset(), t(this, d).reset(), this.style.removeProperty("--max-section-size"), he(this, "scrollSectionsChange", {
699
715
  custom: !0,
700
716
  composed: !0
701
717
  });
702
- }, xe = function() {
703
- t(this, K) || (h(this, K, !0), t(this, u).unsubscribe(t(this, fe)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, Ut)), clearInterval(t(this, pt)), t(this, Z).unlistenAnimationFrame(), t(this, R).disconnect(), t(this, dt).disconnect(), t(this, V).disconnect(), t(this, x).disconnect(), t(this, G) || (this.sections.forEach((e) => {
718
+ }, Pe = function() {
719
+ t(this, K) || (h(this, K, !0), t(this, d).unsubscribe(t(this, me)), t(this, d).unlistenAnimationFrame(), clearInterval(t(this, Gt)), clearInterval(t(this, pt)), t(this, _).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, dt).disconnect(), t(this, O).disconnect(), t(this, E).disconnect(), t(this, G) || (this.sections.forEach((e) => {
704
720
  e.unsetTransform();
705
- }), t(this, L).call(this)));
706
- }, Ee = function() {
707
- t(this, K) && (h(this, K, !1), t(this, u).subscribe(t(this, fe), -1e4), t(this, u).notify(), t(this, R).connect(), t(this, dt).connect(), t(this, V).connect(), t(this, A).current && t(this, x).connect());
708
- }, Te = function() {
709
- t(this, _) || (h(this, _, !0), clearTimeout(t(this, Kt)), $t.unsubscribe(t(this, L)), c(this, o, xe).call(this), t(this, m).style.transform = "", t(this, m).style.height = "", t(this, m).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, l).length ? c(this, o, Ht).call(this) : (t(this, P).reset(), t(this, u).reset()), vt.unregister(this));
710
- }, De = function() {
711
- t(this, _) && (h(this, _, !1), vt.register(this), this.tryResplit(), c(this, o, Ee).call(this), this.scrollToSection(t(this, kt).current, {
721
+ }), t(this, z).call(this)));
722
+ }, Le = function() {
723
+ t(this, K) && (h(this, K, !1), t(this, d).subscribe(t(this, me), -1e4), t(this, d).notify(), t(this, V).connect(), t(this, dt).connect(), t(this, O).connect(), t(this, A).current && t(this, E).connect());
724
+ }, Re = function() {
725
+ t(this, Z) || (h(this, Z, !0), clearTimeout(t(this, Zt)), Bt.unsubscribe(t(this, z)), a(this, o, Pe).call(this), t(this, m).style.transform = "", t(this, m).style.height = "", t(this, m).style.width = "", this.classList.remove("has-overflow", "start", "end"), t(this, c).length ? a(this, o, $t).call(this) : (t(this, L).reset(), t(this, d).reset()), yt.unregister(this));
726
+ }, Ve = function() {
727
+ t(this, Z) && (h(this, Z, !1), yt.register(this), this.tryResplit(), a(this, o, Le).call(this), this.scrollToSection(t(this, At).current, {
712
728
  behaviour: "instant"
713
- }), $t.subscribe(t(this, L), Ae.SCROLL));
714
- }, L = new WeakMap(), fe = new WeakMap(), Ge = function(e) {
715
- let i = t(this, P).current;
716
- return t(this, C).current ? i = ts(e, t(this, l).length) : i = qe(e, 0, this.limit), i;
717
- }, _t = new WeakMap(), me = new WeakMap(), Re = function(e = 1) {
718
- t(this, ht).current && (t(this, x).direction = e), t(this, A).current && t(this, x).pauseAndContinue(
719
- t(this, At).current,
729
+ }), Bt.subscribe(t(this, z), Te.SCROLL));
730
+ }, z = new WeakMap(), me = new WeakMap(), Je = function(e) {
731
+ let i = t(this, L).current;
732
+ return t(this, w).current ? i = os(e, t(this, c).length) : i = _e(e, 0, this.limit), i;
733
+ }, _t = new WeakMap(), be = new WeakMap(), Oe = function(e = 1) {
734
+ t(this, ht).current && (t(this, E).direction = e), t(this, A).current && t(this, E).pauseAndContinue(
735
+ t(this, Mt).current,
720
736
  this.sectionalCSSProperty.current
721
737
  );
722
- }, Ve = function(e = "current") {
723
- if (t(this, C).current && t(this, l).length) {
724
- const i = t(this, u)[e] % Math.round(t(this, S) + t(this, y) + t(this, k));
725
- return i < 0 ? t(this, S) + i + t(this, y) + t(this, k) : i;
738
+ }, He = function(e = "current") {
739
+ if (t(this, w).current && t(this, c).length) {
740
+ const i = t(this, d)[e] % Math.round(t(this, v) + t(this, C) + t(this, I));
741
+ return i < 0 ? t(this, v) + i + t(this, C) + t(this, I) : i;
726
742
  } else
727
- return t(this, u)[e];
728
- }, gt = function() {
729
- if (t(this, l).length) {
730
- const e = t(this, P).current + t(this, ot).current;
731
- if (e === 0 ? h(this, O, "start") : e === this.limit ? h(this, O, "end") : h(this, O, null), ne(this, "scrollLine", {
732
- detail: { line: t(this, O) }
743
+ return t(this, d)[e];
744
+ }, vt = function() {
745
+ if (t(this, c).length) {
746
+ const e = t(this, L).current + t(this, ot).current;
747
+ if (e === 0 ? h(this, H, "start") : e === this.limit ? h(this, H, "end") : h(this, H, null), he(this, "scrollLine", {
748
+ detail: { line: t(this, H) }
733
749
  }), t(this, M).current) {
734
- this.classList.remove("end", "start"), t(this, O) && this.classList.add(t(this, O));
735
- const i = t(this, D).current + t(this, q).current;
736
- h(this, j, []), t(this, l).forEach((r, a) => {
750
+ this.classList.remove("end", "start"), t(this, H) && this.classList.add(t(this, H));
751
+ const i = t(this, R).current + t(this, q).current;
752
+ h(this, j, []), t(this, c).forEach((r, l) => {
737
753
  r.setCurrentIndex(null), r.setCurrentIndexArc(null), r.setCurrentIndexArcAbs(null), r.setMiddle(!1);
738
- const b = e - this.limit - 1 + t(this, q).current, v = e + i, I = this.sections.length - v;
739
- a >= e && a < v || a <= b ? (r.setMark("current"), t(this, j).push(r)) : a >= v && a < v + I / 2 || a <= b + i ? r.setMark("next") : r.setMark("previous");
740
- }), t(this, be).call(this);
754
+ const b = e - this.limit - 1 + t(this, q).current, S = e + i, g = this.sections.length - S;
755
+ l >= e && l < S || l <= b ? (r.setMark("current"), t(this, j).push(r)) : l >= S && l < S + g / 2 || l <= b + i ? r.setMark("next") : r.setMark("previous");
756
+ }), t(this, Se).call(this);
741
757
  }
742
758
  }
743
- }, Ke = function() {
759
+ }, Qe = function() {
744
760
  if (t(this, M).current) {
745
761
  const e = Math.floor(t(this, j).length / 2);
746
762
  t(this, j).sort((i, r) => i.element.getBoundingClientRect().left - r.element.getBoundingClientRect().left), t(this, j).forEach((i, r) => {
747
- const a = r - e;
748
- i.setCurrentIndex(r), i.setCurrentIndexArc(a), i.setCurrentIndexArcAbs(Math.abs(a)), i.setMiddle(r === e);
763
+ const l = r - e;
764
+ i.setCurrentIndex(r), i.setCurrentIndexArc(l), i.setCurrentIndexArcAbs(Math.abs(l)), i.setMiddle(r === e);
749
765
  });
750
766
  }
751
- }, be = new WeakMap(), le = function(e = !1) {
752
- let i = this.targetScrollValue, r = 1 / 0, a = 0;
753
- const b = t(this, u).direction;
754
- for (let v = 0; v < t(this, l).length; v++) {
755
- const I = t(this, l)[v];
756
- let Pe = t(this, Dt) ? I.size * b * -1 * 0.4 : 0, Ot = I.position;
757
- this.overscroll && Ot === 0 && e && (Ot = t(this, U));
758
- let re = Math.abs(Ot + Pe - i);
759
- re <= r && (r = re, a = v);
760
- }
761
- return a;
762
- }, Se = new WeakMap();
763
- H && !customElements.get("e-scroll") && customElements.define("e-scroll", Bt);
764
- var ge;
765
- class Oe extends HTMLElement {
767
+ }, Se = new WeakMap(), ce = function(e = !1) {
768
+ let i = this.targetScrollValue, r = 1 / 0, l = 0;
769
+ const b = t(this, d).direction;
770
+ for (let S = 0; S < t(this, c).length; S++) {
771
+ const g = t(this, c)[S];
772
+ let gt = t(this, Rt) ? g.size * b * -1 * 0.4 : 0, Ht = g.position;
773
+ this.overscroll && Ht === 0 && e && (Ht = t(this, U));
774
+ let ne = Math.abs(Ht + gt - i);
775
+ ne <= r && (r = ne, l = S);
776
+ }
777
+ return l;
778
+ }, ge = new WeakMap();
779
+ T && !customElements.get("e-scroll") && customElements.define("e-scroll", Wt);
780
+ var ve;
781
+ class ze extends HTMLElement {
766
782
  constructor() {
767
783
  super(...arguments);
768
- s(this, ge, null);
784
+ s(this, ve, null);
769
785
  }
770
786
  get scrollElement() {
771
- return t(this, ge);
787
+ return t(this, ve);
772
788
  }
773
789
  connectedCallback() {
774
- const e = Ue(this, Bt);
775
- e instanceof Bt ? h(this, ge, e) : console.error(this, "e-scroll not found");
790
+ const e = je(this, Wt);
791
+ e instanceof Wt ? h(this, ve, e) : console.error(this, "e-scroll not found");
776
792
  }
777
793
  }
778
- ge = new WeakMap();
779
- var ft, z, J, Q, Zt, jt, mt, Jt, ve, ye;
780
- class ps extends Oe {
794
+ ve = new WeakMap();
795
+ var ft, k, J, Q, jt, Jt, mt, Qt, ye, Ce;
796
+ class ys extends ze {
781
797
  constructor() {
782
798
  super();
783
799
  s(this, ft, null);
784
- s(this, z, null);
800
+ s(this, k, null);
785
801
  s(this, J, !1);
786
802
  s(this, Q, 0);
787
- s(this, Zt, 0);
788
803
  s(this, jt, 0);
804
+ s(this, Jt, 0);
789
805
  s(this, mt, () => {
790
806
  h(this, J, this.offsetWidth > this.offsetHeight);
791
807
  const e = t(this, J) ? this.offsetWidth : this.offsetHeight;
792
- h(this, Q, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, Q, Math.max(t(this, Q), 30)), t(this, J) ? (t(this, z).style.width = t(this, Q) + "px", t(this, z).style.height = "100%") : (t(this, z).style.width = "100%", t(this, z).style.height = t(this, Q) + "px"), h(this, Zt, e - t(this, Q)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Jt).call(this);
808
+ h(this, Q, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), h(this, Q, Math.max(t(this, Q), 30)), t(this, J) ? (t(this, k).style.width = t(this, Q) + "px", t(this, k).style.height = "100%") : (t(this, k).style.width = "100%", t(this, k).style.height = t(this, Q) + "px"), h(this, jt, e - t(this, Q)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Qt).call(this);
793
809
  });
794
- s(this, Jt, () => {
795
- h(this, jt, this.scrollElement.currentProgress * t(this, Zt)), t(this, J) ? t(this, z).style.transform = `translate3d(${t(this, jt)}px, 0px, 0px)` : t(this, z).style.transform = `translate3d(0px, ${t(this, jt)}px, 0px)`;
810
+ s(this, Qt, () => {
811
+ h(this, Jt, this.scrollElement.currentProgress * t(this, jt)), t(this, J) ? t(this, k).style.transform = `translate3d(${t(this, Jt)}px, 0px, 0px)` : t(this, k).style.transform = `translate3d(0px, ${t(this, Jt)}px, 0px)`;
796
812
  });
797
- s(this, ve, () => {
813
+ s(this, ye, () => {
798
814
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
799
815
  });
800
- s(this, ye, (e) => {
801
- document.documentElement.classList.add("grabbing"), cs(
802
- (a) => {
803
- const b = t(this, J) ? a.x : a.y, v = this.scrollElement.distance / t(this, Zt), I = (b - r) * v;
804
- this.scrollElement.setPosition(i + I);
816
+ s(this, Ce, (e) => {
817
+ document.documentElement.classList.add("grabbing"), bs(
818
+ (l) => {
819
+ const b = t(this, J) ? l.x : l.y, S = this.scrollElement.distance / t(this, jt), g = (b - r) * S;
820
+ this.scrollElement.setPosition(i + g);
805
821
  },
806
822
  () => {
807
823
  document.documentElement.classList.remove("grabbing");
@@ -809,10 +825,10 @@ class ps extends Oe {
809
825
  );
810
826
  const i = this.scrollElement.damped.target, r = t(this, J) ? e.x : e.y;
811
827
  });
812
- if (H) {
828
+ if (T) {
813
829
  const e = this.attachShadow({ mode: "open" });
814
830
  e.adoptedStyleSheets = [
815
- Ne({
831
+ Ze({
816
832
  ":host": {
817
833
  display: "inline-block",
818
834
  zIndex: "1",
@@ -845,32 +861,32 @@ class ps extends Oe {
845
861
  }
846
862
  }
847
863
  get thumbElement() {
848
- return t(this, z);
864
+ return t(this, k);
849
865
  }
850
866
  connectedCallback() {
851
867
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
852
868
  const e = t(this, ft).assignedElements()[0] || t(this, ft).firstElementChild;
853
- h(this, z, e), t(this, z).addEventListener("pointerdown", t(this, ye)), $t.subscribe(t(this, mt), Ae.SCROLL), ce.subscribe(this, t(this, mt)), ce.subscribe(this.scrollElement, t(this, mt)), this.scrollElement.onScroll(t(this, Jt)), this.scrollElement.axisCSSProperty.subscribe(t(this, ve));
869
+ h(this, k, e), t(this, k).addEventListener("pointerdown", t(this, Ce)), Bt.subscribe(t(this, mt), Te.SCROLL), ae.subscribe(this, t(this, mt)), ae.subscribe(this.scrollElement, t(this, mt)), this.scrollElement.onScroll(t(this, Qt)), this.scrollElement.axisCSSProperty.subscribe(t(this, ye));
854
870
  }
855
871
  disconnectedCallback() {
856
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, z).removeEventListener("pointerdown", t(this, ye)), $t.unsubscribe(t(this, mt)), ce.unsubscribe(t(this, mt)), this.scrollElement.offScroll(t(this, Jt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, ve));
872
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, k).removeEventListener("pointerdown", t(this, Ce)), Bt.unsubscribe(t(this, mt)), ae.unsubscribe(t(this, mt)), this.scrollElement.offScroll(t(this, Qt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, ye));
857
873
  }
858
874
  }
859
- ft = new WeakMap(), z = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), Zt = new WeakMap(), jt = new WeakMap(), mt = new WeakMap(), Jt = new WeakMap(), ve = new WeakMap(), ye = new WeakMap();
860
- H && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", ps);
861
- var Qt, Xt, Yt;
862
- class _e extends Oe {
875
+ ft = new WeakMap(), k = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), jt = new WeakMap(), Jt = new WeakMap(), mt = new WeakMap(), Qt = new WeakMap(), ye = new WeakMap(), Ce = new WeakMap();
876
+ T && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", ys);
877
+ var Xt, Yt, te;
878
+ class Xe extends ze {
863
879
  constructor() {
864
880
  super();
865
- s(this, Qt, new d(this, "--behaviour", "smooth"));
866
- s(this, Xt, new d(
881
+ s(this, Xt, new p(this, "--behaviour", "smooth"));
882
+ s(this, Yt, new p(
867
883
  this,
868
884
  "--tween-easing",
869
885
  !1
870
886
  ));
871
- s(this, Yt, new d(this, "--tween-duration", 0));
872
- H && this.addEventListener("click", () => {
873
- const e = t(this, Qt).current, i = t(this, Xt).current, r = t(this, Yt).current;
887
+ s(this, te, new p(this, "--tween-duration", 0));
888
+ T && this.addEventListener("click", () => {
889
+ const e = t(this, Xt).current, i = t(this, Yt).current, r = t(this, te).current;
874
890
  this.handleClick({
875
891
  behaviour: e,
876
892
  tween: i || r ? { easing: i, duration: r } : void 0
@@ -878,37 +894,37 @@ class _e extends Oe {
878
894
  });
879
895
  }
880
896
  connectedCallback() {
881
- super.connectedCallback(), t(this, Qt).observe(), t(this, Xt).observe(), t(this, Yt).observe();
897
+ super.connectedCallback(), t(this, Xt).observe(), t(this, Yt).observe(), t(this, te).observe();
882
898
  }
883
899
  disconnectedCallback() {
884
- t(this, Qt).close(), t(this, Xt).close(), t(this, Yt).close();
900
+ t(this, Xt).close(), t(this, Yt).close(), t(this, te).close();
885
901
  }
886
902
  }
887
- Qt = new WeakMap(), Xt = new WeakMap(), Yt = new WeakMap();
888
- var te;
889
- class fs extends _e {
903
+ Xt = new WeakMap(), Yt = new WeakMap(), te = new WeakMap();
904
+ var ee;
905
+ class Cs extends Xe {
890
906
  constructor() {
891
907
  super(...arguments);
892
- s(this, te, new d(this, "--set", 1));
908
+ s(this, ee, new p(this, "--set", 1));
893
909
  }
894
910
  handleClick(e) {
895
- this.scrollElement.scrollToSection(t(this, te).current, e);
911
+ this.scrollElement.scrollToSection(t(this, ee).current, e);
896
912
  }
897
913
  connectedCallback() {
898
- super.connectedCallback(), t(this, te).observe();
914
+ super.connectedCallback(), t(this, ee).observe();
899
915
  }
900
916
  disconnectedCallback() {
901
- super.disconnectedCallback(), t(this, te).close();
917
+ super.disconnectedCallback(), t(this, ee).close();
902
918
  }
903
919
  }
904
- te = new WeakMap();
905
- H && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", fs);
906
- var X, ee;
907
- class ms extends _e {
920
+ ee = new WeakMap();
921
+ T && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", Cs);
922
+ var X, se;
923
+ class ws extends Xe {
908
924
  constructor() {
909
925
  super(...arguments);
910
- s(this, X, new d(this, "--step", 1));
911
- s(this, ee, () => {
926
+ s(this, X, new p(this, "--step", 1));
927
+ s(this, se, () => {
912
928
  this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, X).current > 0 && this.scrollElement.scrollLine === "end" || t(this, X).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
913
929
  });
914
930
  }
@@ -917,63 +933,63 @@ class ms extends _e {
917
933
  }
918
934
  connectedCallback() {
919
935
  super.connectedCallback(), this.scrollElement && (t(this, X).subscribe(() => {
920
- t(this, ee).call(this);
936
+ t(this, se).call(this);
921
937
  }), t(this, X).observe(), this.scrollElement.addEventListener(
922
938
  "scrollLine",
923
- t(this, ee)
924
- ), t(this, ee).call(this));
939
+ t(this, se)
940
+ ), t(this, se).call(this));
925
941
  }
926
942
  disconnectedCallback() {
927
943
  super.disconnectedCallback(), t(this, X).close(), this.removeAttribute("disabled");
928
944
  }
929
945
  }
930
- X = new WeakMap(), ee = new WeakMap();
931
- H && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ms);
932
- var Y, bt, se, Ce, we, ie;
933
- class bs {
946
+ X = new WeakMap(), se = new WeakMap();
947
+ T && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ws);
948
+ var Y, bt, ie, we, xe, re;
949
+ class xs {
934
950
  constructor(n, e, i) {
935
951
  s(this, Y, null);
936
952
  s(this, bt, null);
937
- s(this, se, null);
938
- s(this, Ce, null);
939
- s(this, we, () => {
940
- t(this, bt).scrollToSection(t(this, se), {
941
- behaviour: t(this, Ce)
953
+ s(this, ie, null);
954
+ s(this, we, null);
955
+ s(this, xe, () => {
956
+ t(this, bt).scrollToSection(t(this, ie), {
957
+ behaviour: t(this, we)
942
958
  });
943
959
  });
944
- s(this, ie, () => {
960
+ s(this, re, () => {
945
961
  t(this, Y).classList.toggle(
946
962
  "current",
947
- t(this, bt).counter.current === t(this, se)
963
+ t(this, bt).counter.current === t(this, ie)
948
964
  );
949
965
  });
950
- H && (h(this, Y, document.createElement("button")), h(this, bt, n), h(this, Ce, i), h(this, se, e), t(this, Y).addEventListener("click", t(this, we)), t(this, bt).counter.subscribe(t(this, ie)), t(this, ie).call(this));
966
+ T && (h(this, Y, document.createElement("button")), h(this, bt, n), h(this, we, i), h(this, ie, e), t(this, Y).addEventListener("click", t(this, xe)), t(this, bt).counter.subscribe(t(this, re)), t(this, re).call(this));
951
967
  }
952
968
  get element() {
953
969
  return t(this, Y);
954
970
  }
955
971
  destroy() {
956
- t(this, Y).removeEventListener("click", t(this, we)), t(this, bt).counter.unsubscribe(t(this, ie)), t(this, Y).remove();
972
+ t(this, Y).removeEventListener("click", t(this, xe)), t(this, bt).counter.unsubscribe(t(this, re)), t(this, Y).remove();
957
973
  }
958
974
  }
959
- Y = new WeakMap(), bt = new WeakMap(), se = new WeakMap(), Ce = new WeakMap(), we = new WeakMap(), ie = new WeakMap();
960
- var Vt, St, tt;
961
- class Ss extends Oe {
975
+ Y = new WeakMap(), bt = new WeakMap(), ie = new WeakMap(), we = new WeakMap(), xe = new WeakMap(), re = new WeakMap();
976
+ var Ot, St, tt;
977
+ class Es extends ze {
962
978
  constructor() {
963
979
  super(...arguments);
964
- s(this, Vt, null);
980
+ s(this, Ot, null);
965
981
  s(this, St, []);
966
- s(this, tt, ze(() => {
982
+ s(this, tt, Ie(() => {
967
983
  t(this, St).forEach((i) => i.destroy()), h(this, St, []);
968
984
  let e = 0;
969
985
  this.scrollElement.loopCSSProperty.current ? e = this.scrollElement.sections.length : e = this.scrollElement.sections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
970
986
  for (let i = 0; i < e; i++) {
971
- const r = new bs(
987
+ const r = new xs(
972
988
  this.scrollElement,
973
989
  i,
974
990
  this.getAttribute("behaviour") || "smooth"
975
991
  );
976
- t(this, Vt).appendChild(r.element), t(this, St).push(r);
992
+ t(this, Ot).appendChild(r.element), t(this, St).push(r);
977
993
  }
978
994
  }, 0));
979
995
  }
@@ -983,7 +999,7 @@ class Ss extends Oe {
983
999
  t(this, tt)
984
1000
  ), this.scrollElement.sectionsInViewCSSProperty.subscribe(
985
1001
  t(this, tt)
986
- ), this.scrollElement.loopCSSProperty.subscribe(t(this, tt)), h(this, Vt, document.createElement("div")), this.appendChild(t(this, Vt));
1002
+ ), this.scrollElement.loopCSSProperty.subscribe(t(this, tt)), h(this, Ot, document.createElement("div")), this.appendChild(t(this, Ot));
987
1003
  }
988
1004
  disconnectedCallback() {
989
1005
  this.scrollElement.removeEventListener(
@@ -991,32 +1007,53 @@ class Ss extends Oe {
991
1007
  t(this, tt)
992
1008
  ), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
993
1009
  t(this, tt)
994
- ), this.scrollElement.loopCSSProperty.unsubscribe(t(this, tt)), t(this, St).forEach((e) => e.destroy()), h(this, St, []), t(this, Vt).remove();
1010
+ ), this.scrollElement.loopCSSProperty.unsubscribe(t(this, tt)), t(this, St).forEach((e) => e.destroy()), h(this, St, []), t(this, Ot).remove();
995
1011
  }
996
1012
  }
997
- Vt = new WeakMap(), St = new WeakMap(), tt = new WeakMap();
998
- H && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", Ss);
999
- class gs extends as {
1013
+ Ot = new WeakMap(), St = new WeakMap(), tt = new WeakMap();
1014
+ T && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", Es);
1015
+ class Ps extends Ss {
1000
1016
  connectedCallback() {
1001
- const n = Ue(this, Bt);
1002
- n instanceof Bt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
1017
+ const n = je(this, Wt);
1018
+ n instanceof Wt ? (this.scrollContainer = n, this.scrollContainer.addEventListener(
1003
1019
  "scrollSectionsChange",
1004
1020
  this.findAnotherScrollEntries
1005
1021
  ), this.scrollContainer.addEventListener("scrollResize", this.resize), this.resize()) : console.error(this, "e-scroll not found");
1006
1022
  }
1007
1023
  disconnectedCallback() {
1008
- super.disconnectedCallback(), this.scrollContainer instanceof Bt && (this.scrollContainer.removeEventListener(
1024
+ super.disconnectedCallback(), this.scrollContainer instanceof Wt && (this.scrollContainer.removeEventListener(
1009
1025
  "scrollSectionsChange",
1010
1026
  this.findAnotherScrollEntries
1011
1027
  ), this.scrollContainer.removeEventListener("scrollResize", this.resize));
1012
1028
  }
1013
1029
  }
1014
- H && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", gs);
1030
+ T && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", Ps);
1031
+ var Ee;
1032
+ const Be = class Be extends ze {
1033
+ constructor() {
1034
+ super(...arguments);
1035
+ s(this, Ee, () => {
1036
+ this.textContent = `${this.scrollElement.counter.current + 1}`;
1037
+ });
1038
+ }
1039
+ connectedCallback() {
1040
+ return Ge(this, null, function* () {
1041
+ Ue(Be.prototype, this, "connectedCallback").call(this), this.scrollElement.counter.subscribe(t(this, Ee));
1042
+ });
1043
+ }
1044
+ disconnectedCallback() {
1045
+ this.scrollElement.counter.unsubscribe(t(this, Ee));
1046
+ }
1047
+ };
1048
+ Ee = new WeakMap();
1049
+ let $e = Be;
1050
+ T && !customElements.get("e-scroll-counter") && customElements.define("e-scroll-counter", $e);
1015
1051
  export {
1016
- Ss as ScrollBulletButtonsElement,
1017
- Bt as ScrollElement,
1018
- gs as ScrollSegmentElement,
1019
- fs as ScrollSetButtonElement,
1020
- ms as ScrollStepButtonElement,
1021
- ps as ScrollbarElement
1052
+ Es as ScrollBulletButtonsElement,
1053
+ $e as ScrollCounterElement,
1054
+ Wt as ScrollElement,
1055
+ Ps as ScrollSegmentElement,
1056
+ Cs as ScrollSetButtonElement,
1057
+ ws as ScrollStepButtonElement,
1058
+ ys as ScrollbarElement
1022
1059
  };