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