aptechka 0.34.2 → 0.35.1

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