aptechka 0.52.2 → 0.53.0

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