aptechka 0.64.0 → 0.64.3
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.
- package/lib/Animation-BRqj4VfN.cjs +1 -0
- package/lib/{Animation-Cb-klopb.js → Animation-D29tc5VS.js} +5 -4
- package/lib/Damped-BD1OQ1fH.cjs +1 -0
- package/lib/{Damped-ByZFbNSt.js → Damped-YrqW5V4w.js} +5 -4
- package/lib/DragControls-D8BXtKVu.cjs +1 -0
- package/lib/DragControls-DGDUw6bM.js +226 -0
- package/lib/ScrollSegmentElement-B6gp1q_z.js +459 -0
- package/lib/ScrollSegmentElement-DtMMAirz.cjs +1 -0
- package/lib/SourceElement-D_YeNqsI.cjs +5 -0
- package/lib/SourceElement-jbviggZp.js +217 -0
- package/lib/{Store-swP_0ymB.js → Store-0BVty6AZ.js} +2 -1
- package/lib/Store-Cd1GlEmZ.cjs +1 -0
- package/lib/Tweened-B-AHx93m.cjs +1 -0
- package/lib/{Tweened-DzZwfKNm.js → Tweened-_pF0zXXN.js} +9 -8
- package/lib/Viewport-DA10iWAO.js +109 -0
- package/lib/Viewport-DB0qAZPJ.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +2 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +5 -4
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +2 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +5 -5
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +6 -223
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +15 -14
- package/lib/custom-scrollbar/index.cjs +1 -1
- package/lib/custom-scrollbar/index.js +25 -24
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +7 -6
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -106
- package/lib/element-linked-store/index.cjs +1 -1
- package/lib/element-linked-store/index.js +5 -4
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +22 -21
- package/lib/en3/En3View.d.ts +2 -2
- package/lib/en3/en3.d.ts +3 -2
- package/lib/en3/index.cjs +3 -3
- package/lib/en3/index.js +93 -91
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +4 -3
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +5 -4
- package/lib/{index-euf5anj6.js → index-Bv9zgfdb.js} +3 -2
- package/lib/index-DekP7OZe.cjs +1 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +4 -3
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +41 -40
- package/lib/{layout-DpZo-I0y.js → layout-BSMtwCga.js} +2 -2
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +18 -17
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +4 -3
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +2 -2
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +12 -11
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +3 -2
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +368 -340
- package/lib/pixel-perfect/index.cjs +1 -1
- package/lib/pixel-perfect/index.js +2 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +19 -18
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +3 -2
- package/lib/radio/index.cjs +1 -1
- package/lib/radio/index.js +2 -1
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +11 -10
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +66 -65
- package/lib/{scroll-Benkuq-t.js → scroll-BWF48oHS.js} +11 -10
- package/lib/scroll-CFDCeArT.cjs +1 -0
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +3 -456
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +4 -3
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +2 -1
- package/lib/slicer/index.cjs +3 -3
- package/lib/slicer/index.js +31 -30
- package/lib/source/SourceElement.d.ts +1 -1
- package/lib/source/index.cjs +1 -5
- package/lib/source/index.js +5 -214
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +14 -13
- package/lib/stylesheet-DpnWNVyD.js +24 -0
- package/lib/stylesheet-HWF2a3nr.cjs +1 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +14 -13
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +5 -5
- package/lib/utils/jss.d.ts +0 -1
- package/lib/utils/stylesheet.d.ts +2 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +11 -10
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +9 -8
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +12 -11
- package/package.json +4 -4
- package/lib/Animation-dD_idtTU.cjs +0 -1
- package/lib/Damped-B8bmTxAr.cjs +0 -1
- package/lib/Store-GokLe_g-.cjs +0 -1
- package/lib/Tweened-BsL9FamJ.cjs +0 -1
- package/lib/index-Cqw2NKev.cjs +0 -1
- package/lib/jss-CRBgdvJ3.cjs +0 -1
- package/lib/jss-DtnXPEnq.js +0 -23
- package/lib/scroll-DAhSpkhR.cjs +0 -1
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
var St = (l) => {
|
|
2
|
+
throw TypeError(l);
|
|
3
|
+
};
|
|
4
|
+
var lt = (l, u, r) => u.has(l) || St("Cannot " + r);
|
|
5
|
+
var t = (l, u, r) => (lt(l, u, "read from private field"), r ? r.call(l) : u.get(l)), i = (l, u, r) => u.has(l) ? St("Cannot add the same private member more than once") : u instanceof WeakSet ? u.add(l) : u.set(l, r), e = (l, u, r, s) => (lt(l, u, "write to private field"), s ? s.call(l, r) : u.set(l, r), r), c = (l, u, r) => (lt(l, u, "access private method"), r);
|
|
6
|
+
import { CSSProperty as o } from "./css-property/index.js";
|
|
7
|
+
import { TICK_ORDER as Rt, RESIZE_ORDER as Ot } from "./order/index.js";
|
|
8
|
+
import { windowResizer as ut } from "./window-resizer/index.js";
|
|
9
|
+
import { i as zt } from "./index-Bv9zgfdb.js";
|
|
10
|
+
import { d as et } from "./events-CsVF98U6.js";
|
|
11
|
+
import { d as kt } from "./function-C10DGppn.js";
|
|
12
|
+
import { a as At, g as Mt, b as Dt } from "./layout-BSMtwCga.js";
|
|
13
|
+
import { s as Tt } from "./math-BOBiC4TN.js";
|
|
14
|
+
import "construct-style-sheets-polyfill";
|
|
15
|
+
import { S as rt } from "./Store-0BVty6AZ.js";
|
|
16
|
+
import { scrollEntries as xt } from "./scroll-entries/index.js";
|
|
17
|
+
import "./ticker/index.js";
|
|
18
|
+
import { D as It } from "./Damped-YrqW5V4w.js";
|
|
19
|
+
import { f as $t } from "./dom-CVWzyXPH.js";
|
|
20
|
+
import { elementResizer as dt } from "./element-resizer/index.js";
|
|
21
|
+
var F, ot, it, G;
|
|
22
|
+
class bt {
|
|
23
|
+
constructor(u) {
|
|
24
|
+
i(this, F, null);
|
|
25
|
+
i(this, ot);
|
|
26
|
+
i(this, it, !1);
|
|
27
|
+
i(this, G, () => {
|
|
28
|
+
e(this, it, !(t(this, F).scrollWidth > t(this, F).clientWidth));
|
|
29
|
+
});
|
|
30
|
+
e(this, ot, u), e(this, F, $t(t(this, ot))), dt.subscribe(t(this, F), t(this, G)), ut.subscribe(t(this, G)), t(this, G).call(this);
|
|
31
|
+
}
|
|
32
|
+
get element() {
|
|
33
|
+
return t(this, F);
|
|
34
|
+
}
|
|
35
|
+
get currentScrollValue() {
|
|
36
|
+
return t(this, it) ? t(this, F).scrollTop : t(this, F).scrollLeft;
|
|
37
|
+
}
|
|
38
|
+
get vertical() {
|
|
39
|
+
return t(this, it);
|
|
40
|
+
}
|
|
41
|
+
destroy() {
|
|
42
|
+
dt.unsubscribe(t(this, G)), ut.unsubscribe(t(this, G));
|
|
43
|
+
}
|
|
44
|
+
onScroll(u) {
|
|
45
|
+
t(this, F).addEventListener("scroll", u);
|
|
46
|
+
}
|
|
47
|
+
offScroll(u) {
|
|
48
|
+
t(this, F).removeEventListener("scroll", u);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
F = new WeakMap(), ot = new WeakMap(), it = new WeakMap(), G = new WeakMap();
|
|
52
|
+
var f, K, Z, j, J, x, I, $, H, d, v, C, y, W, S, z, k, E, N, Y, A, M, D, p, P, V, R, O, L, ht, n, _, Q, nt, m, T, g, b, w, tt, q, a, U, h, vt, ft, Ct, yt, Pt, Vt, Ft, Lt, ct, st, pt, X, wt, Et, mt, gt;
|
|
53
|
+
let Ht = (gt = class extends HTMLElement {
|
|
54
|
+
constructor() {
|
|
55
|
+
super(...arguments);
|
|
56
|
+
i(this, h);
|
|
57
|
+
i(this, f);
|
|
58
|
+
i(this, K);
|
|
59
|
+
i(this, Z);
|
|
60
|
+
i(this, j);
|
|
61
|
+
i(this, J);
|
|
62
|
+
i(this, x);
|
|
63
|
+
i(this, I);
|
|
64
|
+
i(this, $);
|
|
65
|
+
i(this, H);
|
|
66
|
+
i(this, d);
|
|
67
|
+
i(this, v);
|
|
68
|
+
i(this, C);
|
|
69
|
+
i(this, y);
|
|
70
|
+
i(this, W);
|
|
71
|
+
i(this, S);
|
|
72
|
+
i(this, z);
|
|
73
|
+
i(this, k);
|
|
74
|
+
i(this, E);
|
|
75
|
+
i(this, N);
|
|
76
|
+
i(this, Y);
|
|
77
|
+
i(this, A);
|
|
78
|
+
i(this, M);
|
|
79
|
+
i(this, D);
|
|
80
|
+
i(this, p);
|
|
81
|
+
i(this, P);
|
|
82
|
+
i(this, V);
|
|
83
|
+
i(this, R);
|
|
84
|
+
i(this, O);
|
|
85
|
+
i(this, L);
|
|
86
|
+
i(this, ht);
|
|
87
|
+
i(this, n);
|
|
88
|
+
i(this, _);
|
|
89
|
+
i(this, Q);
|
|
90
|
+
i(this, nt);
|
|
91
|
+
i(this, m);
|
|
92
|
+
i(this, T);
|
|
93
|
+
i(this, g);
|
|
94
|
+
i(this, b);
|
|
95
|
+
i(this, w);
|
|
96
|
+
i(this, tt);
|
|
97
|
+
i(this, q);
|
|
98
|
+
i(this, a);
|
|
99
|
+
i(this, U);
|
|
100
|
+
i(this, ct);
|
|
101
|
+
i(this, st);
|
|
102
|
+
e(this, f, null), e(this, K, new o(this, "--damping", 20)), e(this, Z, new o(this, "--mass", 0)), e(this, j, new o(this, "--stiffness", 0)), e(this, J, new o(this, "--target", "")), e(this, x, new o(this, "--disabled", !1)), e(this, I, new o(
|
|
103
|
+
this,
|
|
104
|
+
"--distance-offset",
|
|
105
|
+
0,
|
|
106
|
+
{ rawValueCheck: !1 }
|
|
107
|
+
)), e(this, $, new o(this, "--start-offset", 0, {
|
|
108
|
+
rawValueCheck: !1
|
|
109
|
+
})), e(this, H, new o(
|
|
110
|
+
this,
|
|
111
|
+
"--capture-once",
|
|
112
|
+
!1
|
|
113
|
+
)), e(this, d, new o(this, "--captured", "")), e(this, v, new o(this, "--released", "")), e(this, C, new o(
|
|
114
|
+
this,
|
|
115
|
+
"--captured-from-start",
|
|
116
|
+
""
|
|
117
|
+
)), e(this, y, new o(
|
|
118
|
+
this,
|
|
119
|
+
"--captured-from-finish",
|
|
120
|
+
""
|
|
121
|
+
)), e(this, W, new o(
|
|
122
|
+
this,
|
|
123
|
+
"--released-from-start",
|
|
124
|
+
""
|
|
125
|
+
)), e(this, S, new o(
|
|
126
|
+
this,
|
|
127
|
+
"--released-from-finish",
|
|
128
|
+
""
|
|
129
|
+
)), e(this, z, new o(this, "--passed-var", "")), e(this, k, new o(this, "--progress-var", "")), e(this, E, new o(
|
|
130
|
+
this,
|
|
131
|
+
"--progress-arc-var",
|
|
132
|
+
""
|
|
133
|
+
)), e(this, N, new o(
|
|
134
|
+
this,
|
|
135
|
+
"--progress-arc-mult",
|
|
136
|
+
1
|
|
137
|
+
)), e(this, Y, new o(
|
|
138
|
+
this,
|
|
139
|
+
"--animation-var-type",
|
|
140
|
+
"target"
|
|
141
|
+
)), e(this, A, new o(this, "--distance-var", "")), e(this, M, new o(this, "--start-var", "")), e(this, D, new o(this, "--finish-var", "")), e(this, p, new rt(!1)), e(this, P, new rt(!1)), e(this, V, new rt(!1)), e(this, R, new rt(!1)), e(this, O, new rt(!1)), e(this, L, new rt(!1)), e(this, ht, []), e(this, n, this), e(this, _, 0), e(this, Q, 0), e(this, nt, 0), e(this, m, new It(0, { order: Rt.SEGMENT, min: 0, max: 1 })), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), e(this, q, !1), e(this, a, !0), e(this, U, !1), this.resize = () => {
|
|
142
|
+
e(this, Q, t(this, f).vertical ? this.offsetHeight : this.offsetWidth);
|
|
143
|
+
const r = t(this, f) instanceof HTMLElement ? t(this, f) : t(this, f).element;
|
|
144
|
+
e(this, _, t(this, f).vertical ? At(this, r) : Mt(this, r));
|
|
145
|
+
const s = Dt(
|
|
146
|
+
this,
|
|
147
|
+
t(this, f).vertical ? "top" : "left"
|
|
148
|
+
);
|
|
149
|
+
e(this, _, t(this, _) - s), e(this, g, this.getStart()), e(this, b, this.getDistance()), e(this, g, t(this, g) + t(this, $).current), e(this, b, t(this, b) + t(this, I).current), e(this, w, t(this, g) + t(this, b)), t(this, f).currentScrollValue > t(this, w) && !t(this, p).current && !t(this, P).current && (t(this, p).current = !0), this.setVar(t(this, M).current, t(this, g)), this.setVar(t(this, D).current, t(this, w)), this.setVar(t(this, A).current, t(this, b)), t(this, m).max = t(this, b), e(this, tt, !0), t(this, st).call(this);
|
|
150
|
+
}, this.findAnotherScrollEntries = kt(() => {
|
|
151
|
+
const r = xt.getAll(this).reverse();
|
|
152
|
+
let s = 0;
|
|
153
|
+
r.forEach((B, at) => {
|
|
154
|
+
B.element === t(this, f) && (s = at);
|
|
155
|
+
}), e(this, ht, r.slice(s + 1)), this.tick();
|
|
156
|
+
}, 0), e(this, ct, () => {
|
|
157
|
+
t(this, a) || this.resize();
|
|
158
|
+
}), e(this, st, () => {
|
|
159
|
+
!t(this, a) && t(this, tt) && this.tick();
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
get scrollContainer() {
|
|
163
|
+
return t(this, f);
|
|
164
|
+
}
|
|
165
|
+
set scrollContainer(r) {
|
|
166
|
+
c(this, h, ft).call(this), e(this, f, r), c(this, h, vt).call(this);
|
|
167
|
+
}
|
|
168
|
+
get distanceOffsetCSSProperty() {
|
|
169
|
+
return t(this, I);
|
|
170
|
+
}
|
|
171
|
+
get startOffsetCSSProperty() {
|
|
172
|
+
return t(this, $);
|
|
173
|
+
}
|
|
174
|
+
get captureOnceCSSProperty() {
|
|
175
|
+
return t(this, H);
|
|
176
|
+
}
|
|
177
|
+
get capturedCSSProperty() {
|
|
178
|
+
return t(this, d);
|
|
179
|
+
}
|
|
180
|
+
get releasedCSSProperty() {
|
|
181
|
+
return t(this, v);
|
|
182
|
+
}
|
|
183
|
+
get capturedFromStartCSSProperty() {
|
|
184
|
+
return t(this, C);
|
|
185
|
+
}
|
|
186
|
+
get capturedFromFinishCSSProperty() {
|
|
187
|
+
return t(this, y);
|
|
188
|
+
}
|
|
189
|
+
get releasedFromStartCSSProperty() {
|
|
190
|
+
return t(this, W);
|
|
191
|
+
}
|
|
192
|
+
get releasedFromFinishCSSProperty() {
|
|
193
|
+
return t(this, S);
|
|
194
|
+
}
|
|
195
|
+
get passedVarCSSProperty() {
|
|
196
|
+
return t(this, z);
|
|
197
|
+
}
|
|
198
|
+
get progressVarCSSProperty() {
|
|
199
|
+
return t(this, k);
|
|
200
|
+
}
|
|
201
|
+
get progressArcVarCSSProperty() {
|
|
202
|
+
return t(this, E);
|
|
203
|
+
}
|
|
204
|
+
get progressArcMultCSSProperty() {
|
|
205
|
+
return t(this, N);
|
|
206
|
+
}
|
|
207
|
+
get animationVarTypeCSSProperty() {
|
|
208
|
+
return t(this, Y);
|
|
209
|
+
}
|
|
210
|
+
get distanceVarCSSProperty() {
|
|
211
|
+
return t(this, A);
|
|
212
|
+
}
|
|
213
|
+
get startVarCSSProperty() {
|
|
214
|
+
return t(this, M);
|
|
215
|
+
}
|
|
216
|
+
get finishVarCSSProperty() {
|
|
217
|
+
return t(this, D);
|
|
218
|
+
}
|
|
219
|
+
get disabledCSSProperty() {
|
|
220
|
+
return t(this, x);
|
|
221
|
+
}
|
|
222
|
+
get dampingCSSProperty() {
|
|
223
|
+
return t(this, K);
|
|
224
|
+
}
|
|
225
|
+
get massCSSProperty() {
|
|
226
|
+
return t(this, Z);
|
|
227
|
+
}
|
|
228
|
+
get stiffnessCSSProperty() {
|
|
229
|
+
return t(this, j);
|
|
230
|
+
}
|
|
231
|
+
get targetCSSProperty() {
|
|
232
|
+
return t(this, J);
|
|
233
|
+
}
|
|
234
|
+
get isCaptured() {
|
|
235
|
+
return t(this, p);
|
|
236
|
+
}
|
|
237
|
+
get isReleased() {
|
|
238
|
+
return t(this, P);
|
|
239
|
+
}
|
|
240
|
+
get isCapturedFromStart() {
|
|
241
|
+
return t(this, V);
|
|
242
|
+
}
|
|
243
|
+
get isReleasedFromStart() {
|
|
244
|
+
return t(this, R);
|
|
245
|
+
}
|
|
246
|
+
get isCapturedFromFinish() {
|
|
247
|
+
return t(this, O);
|
|
248
|
+
}
|
|
249
|
+
get isReleasedFromFinish() {
|
|
250
|
+
return t(this, L);
|
|
251
|
+
}
|
|
252
|
+
get directionPosition() {
|
|
253
|
+
return t(this, _);
|
|
254
|
+
}
|
|
255
|
+
get directionSize() {
|
|
256
|
+
return t(this, Q);
|
|
257
|
+
}
|
|
258
|
+
get passed() {
|
|
259
|
+
return t(this, m);
|
|
260
|
+
}
|
|
261
|
+
get progress() {
|
|
262
|
+
return t(this, T);
|
|
263
|
+
}
|
|
264
|
+
get progressArc() {
|
|
265
|
+
return Math.abs(Math.cos(t(this, T) * Math.PI)) * t(this, N).current;
|
|
266
|
+
}
|
|
267
|
+
get start() {
|
|
268
|
+
return t(this, g);
|
|
269
|
+
}
|
|
270
|
+
get finish() {
|
|
271
|
+
return t(this, w);
|
|
272
|
+
}
|
|
273
|
+
get distance() {
|
|
274
|
+
return t(this, b);
|
|
275
|
+
}
|
|
276
|
+
get isCapturedOnce() {
|
|
277
|
+
return t(this, q);
|
|
278
|
+
}
|
|
279
|
+
get isDisabled() {
|
|
280
|
+
return t(this, a);
|
|
281
|
+
}
|
|
282
|
+
tick() {
|
|
283
|
+
let r = t(this, f).currentScrollValue;
|
|
284
|
+
t(this, ht).forEach((at) => {
|
|
285
|
+
r += at.value;
|
|
286
|
+
});
|
|
287
|
+
const s = r - t(this, g);
|
|
288
|
+
t(this, U) || e(this, U, t(this, m).previous ? Math.abs(t(this, m).previous - s) > 1e3 : !1), t(this, m).set(s);
|
|
289
|
+
const B = Math.round(r);
|
|
290
|
+
t(this, p).current && (B >= t(this, g) ? t(this, V).current || c(this, h, Pt).call(this) : t(this, V).current && !t(this, R).current && c(this, h, Ft).call(this), B < t(this, w) ? t(this, L).current && !t(this, O).current && c(this, h, Vt).call(this) : t(this, V).current && !t(this, L).current && c(this, h, Lt).call(this)), B >= t(this, g) && B < t(this, w) ? t(this, p).current || c(this, h, Ct).call(this) : t(this, p).current && (t(this, m).set(
|
|
291
|
+
Tt(t(this, b) / 2, t(this, m).target, 0, t(this, b))
|
|
292
|
+
), c(this, h, yt).call(this)), t(this, q) && t(this, H).current && (t(this, d).current && t(this, n).classList.add(t(this, d).current), e(this, a, !0));
|
|
293
|
+
}
|
|
294
|
+
disable() {
|
|
295
|
+
this.style.cssText = "", e(this, _, 0), e(this, Q, 0), t(this, m).reset(), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), t(this, p).current = !1, t(this, P).current = !1, t(this, V).current = !1, t(this, R).current = !1, t(this, O).current = !1, t(this, L).current = !1, e(this, q, !1), e(this, a, !0), c(this, h, mt).call(this);
|
|
296
|
+
}
|
|
297
|
+
enable() {
|
|
298
|
+
e(this, a, !1);
|
|
299
|
+
}
|
|
300
|
+
connectedCallback() {
|
|
301
|
+
this.scrollContainer = new bt(this);
|
|
302
|
+
}
|
|
303
|
+
disconnectedCallback() {
|
|
304
|
+
t(this, f) instanceof bt && t(this, f).destroy(), c(this, h, ft).call(this);
|
|
305
|
+
}
|
|
306
|
+
removeVar(r) {
|
|
307
|
+
r && t(this, n).style.removeProperty(`--${r}`);
|
|
308
|
+
}
|
|
309
|
+
setVar(r, s) {
|
|
310
|
+
if (r) {
|
|
311
|
+
const B = typeof s == "number" ? s.toFixed(6) : s;
|
|
312
|
+
t(this, n).style.setProperty(`--${r}`, B);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
getDistance() {
|
|
316
|
+
return t(this, Q) + t(this, nt);
|
|
317
|
+
}
|
|
318
|
+
getStart() {
|
|
319
|
+
return t(this, _) - t(this, nt);
|
|
320
|
+
}
|
|
321
|
+
}, f = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), x = new WeakMap(), I = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), d = new WeakMap(), v = new WeakMap(), C = new WeakMap(), y = new WeakMap(), W = new WeakMap(), S = new WeakMap(), z = new WeakMap(), k = new WeakMap(), E = new WeakMap(), N = new WeakMap(), Y = new WeakMap(), A = new WeakMap(), M = new WeakMap(), D = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), O = new WeakMap(), L = new WeakMap(), ht = new WeakMap(), n = new WeakMap(), _ = new WeakMap(), Q = new WeakMap(), nt = new WeakMap(), m = new WeakMap(), T = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), tt = new WeakMap(), q = new WeakMap(), a = new WeakMap(), U = new WeakMap(), h = new WeakSet(), vt = function() {
|
|
322
|
+
if (!t(this, f))
|
|
323
|
+
return;
|
|
324
|
+
t(this, p).subscribe((s) => {
|
|
325
|
+
s.current && et(this, "scrollSegmentCapture", {
|
|
326
|
+
composed: !0,
|
|
327
|
+
custom: !0
|
|
328
|
+
});
|
|
329
|
+
}), t(this, V).subscribe((s) => {
|
|
330
|
+
s.current && et(this, "scrollSegmentCaptureFromStart", {
|
|
331
|
+
composed: !0,
|
|
332
|
+
custom: !0
|
|
333
|
+
});
|
|
334
|
+
}), t(this, O).subscribe((s) => {
|
|
335
|
+
s.current && et(this, "scrollSegmentCaptureFromFinish", {
|
|
336
|
+
composed: !0,
|
|
337
|
+
custom: !0
|
|
338
|
+
});
|
|
339
|
+
}), t(this, P).subscribe((s) => {
|
|
340
|
+
s.current && et(this, "scrollSegmentRelease", {
|
|
341
|
+
composed: !0,
|
|
342
|
+
custom: !0
|
|
343
|
+
});
|
|
344
|
+
}), t(this, R).subscribe((s) => {
|
|
345
|
+
s.current && et(this, "scrollSegmentReleaseFromStart", {
|
|
346
|
+
composed: !0,
|
|
347
|
+
custom: !0
|
|
348
|
+
});
|
|
349
|
+
}), t(this, L).subscribe((s) => {
|
|
350
|
+
s.current && et(this, "scrollSegmentReleaseFromFinish", {
|
|
351
|
+
composed: !0,
|
|
352
|
+
custom: !0
|
|
353
|
+
});
|
|
354
|
+
}), t(this, K).observe(), t(this, Z).observe(), t(this, j).observe(), t(this, J).observe(), t(this, x).observe(), t(this, I).observe(), t(this, $).observe(), t(this, H).observe(), t(this, d).observe(), t(this, v).observe(), t(this, C).observe(), t(this, y).observe(), t(this, W).observe(), t(this, S).observe(), t(this, z).observe(), t(this, k).observe(), t(this, E).observe(), t(this, N).observe(), t(this, Y).observe(), t(this, A).observe(), t(this, M).observe(), t(this, D).observe();
|
|
355
|
+
let r = !1;
|
|
356
|
+
this.findAnotherScrollEntries(), t(this, x).current || this.enable(), t(this, K).subscribe((s) => {
|
|
357
|
+
t(this, m).damping = s.current;
|
|
358
|
+
}), t(this, Z).subscribe((s) => {
|
|
359
|
+
t(this, m).mass = s.current;
|
|
360
|
+
}), t(this, j).subscribe((s) => {
|
|
361
|
+
t(this, m).stiffness = s.current;
|
|
362
|
+
}), t(this, J).subscribe((s) => {
|
|
363
|
+
s.previous && c(this, h, mt).call(this), s.current ? s.current === "parent" ? e(this, n, this.parentElement || this) : e(this, n, document.querySelector(s.current) || this) : e(this, n, this);
|
|
364
|
+
}), t(this, x).subscribe((s) => {
|
|
365
|
+
s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
|
|
366
|
+
}), t(this, $).subscribe(() => {
|
|
367
|
+
r && !t(this, a) && this.resize();
|
|
368
|
+
}), t(this, I).subscribe(() => {
|
|
369
|
+
r && !t(this, a) && this.resize();
|
|
370
|
+
}), t(this, d).subscribe((s) => {
|
|
371
|
+
c(this, h, X).call(this, s);
|
|
372
|
+
}), t(this, C).subscribe((s) => {
|
|
373
|
+
c(this, h, X).call(this, s);
|
|
374
|
+
}), t(this, y).subscribe((s) => {
|
|
375
|
+
c(this, h, X).call(this, s);
|
|
376
|
+
}), t(this, v).subscribe((s) => {
|
|
377
|
+
c(this, h, X).call(this, s);
|
|
378
|
+
}), t(this, W).subscribe((s) => {
|
|
379
|
+
c(this, h, X).call(this, s);
|
|
380
|
+
}), t(this, S).subscribe((s) => {
|
|
381
|
+
c(this, h, X).call(this, s);
|
|
382
|
+
}), t(this, H).subscribe((s) => {
|
|
383
|
+
t(this, a) || !s.current && s.previous && (this.resize(), this.enable());
|
|
384
|
+
}), t(this, z).subscribe((s) => {
|
|
385
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
|
|
386
|
+
}), t(this, k).subscribe((s) => {
|
|
387
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, T)));
|
|
388
|
+
}), t(this, E).subscribe((s) => {
|
|
389
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.progressArc));
|
|
390
|
+
}), t(this, N).subscribe((s) => {
|
|
391
|
+
t(this, a) || c(this, h, pt).call(this);
|
|
392
|
+
}), t(this, M).subscribe((s) => {
|
|
393
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, g)));
|
|
394
|
+
}), t(this, D).subscribe((s) => {
|
|
395
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, w)));
|
|
396
|
+
}), t(this, A).subscribe((s) => {
|
|
397
|
+
t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, b)));
|
|
398
|
+
}), t(this, m).subscribe((s) => {
|
|
399
|
+
if (t(this, U)) {
|
|
400
|
+
e(this, U, !1);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
c(this, h, pt).call(this);
|
|
404
|
+
}), ut.subscribe(t(this, ct), Ot.SCROLL + 1), this.scrollContainer.onScroll(t(this, st)), r = !0;
|
|
405
|
+
}, ft = function() {
|
|
406
|
+
t(this, f) && (ut.unsubscribe(t(this, ct)), this.scrollContainer.offScroll(t(this, st)), t(this, K).close(), t(this, Z).close(), t(this, j).close(), t(this, J).close(), t(this, x).close(), t(this, I).close(), t(this, $).close(), t(this, H).close(), t(this, d).close(), t(this, v).close(), t(this, C).close(), t(this, y).close(), t(this, W).close(), t(this, S).close(), t(this, z).close(), t(this, k).close(), t(this, E).close(), t(this, N).close(), t(this, A).close(), t(this, M).close(), t(this, D).close(), t(this, p).close(), t(this, P).close(), t(this, V).close(), t(this, R).close(), t(this, O).close(), t(this, L).close(), this.disable(), t(this, m).close());
|
|
407
|
+
}, Ct = function() {
|
|
408
|
+
t(this, p).current = !0, t(this, P).current = !1, e(this, q, !0), t(this, v).current && t(this, n).classList.remove(t(this, v).current), t(this, S).current && t(this, n).classList.remove(
|
|
409
|
+
t(this, S).current
|
|
410
|
+
), t(this, S).current && t(this, n).classList.remove(
|
|
411
|
+
t(this, S).current
|
|
412
|
+
), t(this, d).current && t(this, n).classList.add(t(this, d).current);
|
|
413
|
+
}, yt = function() {
|
|
414
|
+
t(this, P).current = !0, t(this, p).current = !1, e(this, q, !0), t(this, d).current && t(this, n).classList.remove(t(this, d).current), t(this, C).current && t(this, n).classList.remove(
|
|
415
|
+
t(this, C).current
|
|
416
|
+
), t(this, y).current && t(this, n).classList.remove(
|
|
417
|
+
t(this, y).current
|
|
418
|
+
), t(this, v).current && t(this, n).classList.add(t(this, v).current);
|
|
419
|
+
}, Pt = function() {
|
|
420
|
+
t(this, p).current = !0, t(this, V).current = !0, t(this, R).current = !1, t(this, C).current && t(this, n).classList.add(
|
|
421
|
+
t(this, C).current
|
|
422
|
+
);
|
|
423
|
+
}, Vt = function() {
|
|
424
|
+
t(this, p).current = !0, t(this, O).current = !0, t(this, L).current = !1, t(this, y).current && t(this, n).classList.add(
|
|
425
|
+
t(this, y).current
|
|
426
|
+
);
|
|
427
|
+
}, Ft = function() {
|
|
428
|
+
t(this, P).current = !0, t(this, R).current = !0, t(this, V).current = !1, t(this, S).current && t(this, n).classList.add(
|
|
429
|
+
t(this, S).current
|
|
430
|
+
);
|
|
431
|
+
}, Lt = function() {
|
|
432
|
+
t(this, P).current = !0, t(this, L).current = !0, t(this, O).current = !1, t(this, S).current && t(this, n).classList.add(
|
|
433
|
+
t(this, S).current
|
|
434
|
+
);
|
|
435
|
+
}, ct = new WeakMap(), st = new WeakMap(), pt = function() {
|
|
436
|
+
const r = t(this, m)[t(this, Y).current];
|
|
437
|
+
this.setVar(t(this, z).current, r), e(this, T, r / t(this, b) || 0), this.setVar(t(this, k).current, t(this, T)), t(this, E).current && this.setVar(t(this, E).current, this.progressArc);
|
|
438
|
+
}, X = function(r) {
|
|
439
|
+
if (t(this, a)) {
|
|
440
|
+
r.previous && t(this, n).classList.remove(r.previous), r.current && t(this, n).classList.remove(r.current);
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
r.current && t(this, p).current ? (r.previous && t(this, n).classList.remove(r.previous), t(this, n).classList.add(r.current)) : !r.current && r.previous && t(this, n).classList.remove(r.previous);
|
|
444
|
+
}, wt = function(...r) {
|
|
445
|
+
r.forEach((s) => {
|
|
446
|
+
s && t(this, n).classList.remove(s);
|
|
447
|
+
});
|
|
448
|
+
}, Et = function(...r) {
|
|
449
|
+
r.forEach((s) => {
|
|
450
|
+
s && t(this, n).style.removeProperty(`--${s}`);
|
|
451
|
+
});
|
|
452
|
+
}, mt = function() {
|
|
453
|
+
c(this, h, wt).call(this, t(this, d).current, t(this, C).current, t(this, y).current, t(this, v).current, t(this, W).current, t(this, S).current), c(this, h, Et).call(this, t(this, z).current, t(this, k).current, t(this, E).current, t(this, A).current, t(this, M).current, t(this, D).current);
|
|
454
|
+
}, gt);
|
|
455
|
+
zt && !customElements.get("scroll-segment") && customElements.define("scroll-segment", Ht);
|
|
456
|
+
export {
|
|
457
|
+
bt as S,
|
|
458
|
+
Ht as a
|
|
459
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var bt=l=>{throw TypeError(l)};var lt=(l,u,r)=>u.has(l)||bt("Cannot "+r);var t=(l,u,r)=>(lt(l,u,"read from private field"),r?r.call(l):u.get(l)),i=(l,u,r)=>u.has(l)?bt("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,r),e=(l,u,r,s)=>(lt(l,u,"write to private field"),s?s.call(l,r):u.set(l,r),r),c=(l,u,r)=>(lt(l,u,"access private method"),r);const o=require("./css-property/index.cjs"),Ct=require("./order/index.cjs"),ut=require("./window-resizer/index.cjs"),Ot=require("./index-DekP7OZe.cjs"),et=require("./events-KVanG9sR.cjs"),kt=require("./function-MthRj-GJ.cjs"),St=require("./layout-Ctc2p3uz.cjs"),xt=require("./math-GDWEqu7y.cjs");require("construct-style-sheets-polyfill");const rt=require("./Store-Cd1GlEmZ.cjs"),At=require("./scroll-entries/index.cjs");require("./ticker/index.cjs");const Dt=require("./Damped-BD1OQ1fH.cjs"),Mt=require("./dom-JBOkFLTh.cjs"),gt=require("./element-resizer/index.cjs");var w,ot,it,G;class pt{constructor(u){i(this,w,null);i(this,ot);i(this,it,!1);i(this,G,()=>{e(this,it,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ot,u),e(this,w,Mt.findScrollParentElement(t(this,ot))),gt.elementResizer.subscribe(t(this,w),t(this,G)),ut.windowResizer.subscribe(t(this,G)),t(this,G).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,it)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,it)}destroy(){gt.elementResizer.unsubscribe(t(this,G)),ut.windowResizer.unsubscribe(t(this,G))}onScroll(u){t(this,w).addEventListener("scroll",u)}offScroll(u){t(this,w).removeEventListener("scroll",u)}}w=new WeakMap,ot=new WeakMap,it=new WeakMap,G=new WeakMap;var S,K,Z,j,J,M,T,_,I,m,g,y,v,$,d,q,O,L,H,Y,k,x,A,p,P,V,R,z,F,ht,n,W,Q,nt,f,D,C,b,E,tt,N,a,U,h,Pt,ft,Vt,wt,Ft,Et,Lt,Rt,ct,st,dt,X,zt,qt,mt,yt;let vt=(yt=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,K);i(this,Z);i(this,j);i(this,J);i(this,M);i(this,T);i(this,_);i(this,I);i(this,m);i(this,g);i(this,y);i(this,v);i(this,$);i(this,d);i(this,q);i(this,O);i(this,L);i(this,H);i(this,Y);i(this,k);i(this,x);i(this,A);i(this,p);i(this,P);i(this,V);i(this,R);i(this,z);i(this,F);i(this,ht);i(this,n);i(this,W);i(this,Q);i(this,nt);i(this,f);i(this,D);i(this,C);i(this,b);i(this,E);i(this,tt);i(this,N);i(this,a);i(this,U);i(this,ct);i(this,st);e(this,S,null),e(this,K,new o.CSSProperty(this,"--damping",20)),e(this,Z,new o.CSSProperty(this,"--mass",0)),e(this,j,new o.CSSProperty(this,"--stiffness",0)),e(this,J,new o.CSSProperty(this,"--target","")),e(this,M,new o.CSSProperty(this,"--disabled",!1)),e(this,T,new o.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,_,new o.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,I,new o.CSSProperty(this,"--capture-once",!1)),e(this,m,new o.CSSProperty(this,"--captured","")),e(this,g,new o.CSSProperty(this,"--released","")),e(this,y,new o.CSSProperty(this,"--captured-from-start","")),e(this,v,new o.CSSProperty(this,"--captured-from-finish","")),e(this,$,new o.CSSProperty(this,"--released-from-start","")),e(this,d,new o.CSSProperty(this,"--released-from-finish","")),e(this,q,new o.CSSProperty(this,"--passed-var","")),e(this,O,new o.CSSProperty(this,"--progress-var","")),e(this,L,new o.CSSProperty(this,"--progress-arc-var","")),e(this,H,new o.CSSProperty(this,"--progress-arc-mult",1)),e(this,Y,new o.CSSProperty(this,"--animation-var-type","target")),e(this,k,new o.CSSProperty(this,"--distance-var","")),e(this,x,new o.CSSProperty(this,"--start-var","")),e(this,A,new o.CSSProperty(this,"--finish-var","")),e(this,p,new rt.Store(!1)),e(this,P,new rt.Store(!1)),e(this,V,new rt.Store(!1)),e(this,R,new rt.Store(!1)),e(this,z,new rt.Store(!1)),e(this,F,new rt.Store(!1)),e(this,ht,[]),e(this,n,this),e(this,W,0),e(this,Q,0),e(this,nt,0),e(this,f,new Dt.Damped(0,{order:Ct.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,D,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),e(this,N,!1),e(this,a,!0),e(this,U,!1),this.resize=()=>{e(this,Q,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?St.getCumulativeOffsetTop(this,r):St.getCumulativeOffsetLeft(this,r));const s=St.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,_).current),e(this,b,t(this,b)+t(this,T).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,p).current&&!t(this,P).current&&(t(this,p).current=!0),this.setVar(t(this,x).current,t(this,C)),this.setVar(t(this,A).current,t(this,E)),this.setVar(t(this,k).current,t(this,b)),t(this,f).max=t(this,b),e(this,tt,!0),t(this,st).call(this)},this.findAnotherScrollEntries=kt.debounce(()=>{const r=At.scrollEntries.getAll(this).reverse();let s=0;r.forEach((B,at)=>{B.element===t(this,S)&&(s=at)}),e(this,ht,r.slice(s+1)),this.tick()},0),e(this,ct,()=>{t(this,a)||this.resize()}),e(this,st,()=>{!t(this,a)&&t(this,tt)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){c(this,h,ft).call(this),e(this,S,r),c(this,h,Pt).call(this)}get distanceOffsetCSSProperty(){return t(this,T)}get startOffsetCSSProperty(){return t(this,_)}get captureOnceCSSProperty(){return t(this,I)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,y)}get capturedFromFinishCSSProperty(){return t(this,v)}get releasedFromStartCSSProperty(){return t(this,$)}get releasedFromFinishCSSProperty(){return t(this,d)}get passedVarCSSProperty(){return t(this,q)}get progressVarCSSProperty(){return t(this,O)}get progressArcVarCSSProperty(){return t(this,L)}get progressArcMultCSSProperty(){return t(this,H)}get animationVarTypeCSSProperty(){return t(this,Y)}get distanceVarCSSProperty(){return t(this,k)}get startVarCSSProperty(){return t(this,x)}get finishVarCSSProperty(){return t(this,A)}get disabledCSSProperty(){return t(this,M)}get dampingCSSProperty(){return t(this,K)}get massCSSProperty(){return t(this,Z)}get stiffnessCSSProperty(){return t(this,j)}get targetCSSProperty(){return t(this,J)}get isCaptured(){return t(this,p)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,R)}get isCapturedFromFinish(){return t(this,z)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,Q)}get passed(){return t(this,f)}get progress(){return t(this,D)}get progressArc(){return Math.abs(Math.cos(t(this,D)*Math.PI))*t(this,H).current}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}tick(){let r=t(this,S).currentScrollValue;t(this,ht).forEach(at=>{r+=at.value});const s=r-t(this,C);t(this,U)||e(this,U,t(this,f).previous?Math.abs(t(this,f).previous-s)>1e3:!1),t(this,f).set(s);const B=Math.round(r);t(this,p).current&&(B>=t(this,C)?t(this,V).current||c(this,h,Ft).call(this):t(this,V).current&&!t(this,R).current&&c(this,h,Lt).call(this),B<t(this,E)?t(this,F).current&&!t(this,z).current&&c(this,h,Et).call(this):t(this,V).current&&!t(this,F).current&&c(this,h,Rt).call(this)),B>=t(this,C)&&B<t(this,E)?t(this,p).current||c(this,h,Vt).call(this):t(this,p).current&&(t(this,f).set(xt.step(t(this,b)/2,t(this,f).target,0,t(this,b))),c(this,h,wt).call(this)),t(this,N)&&t(this,I).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,Q,0),t(this,f).reset(),e(this,D,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),t(this,p).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,R).current=!1,t(this,z).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),c(this,h,mt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new pt(this)}disconnectedCallback(){t(this,S)instanceof pt&&t(this,S).destroy(),c(this,h,ft).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){if(r){const B=typeof s=="number"?s.toFixed(6):s;t(this,n).style.setProperty(`--${r}`,B)}}getDistance(){return t(this,Q)+t(this,nt)}getStart(){return t(this,W)-t(this,nt)}},S=new WeakMap,K=new WeakMap,Z=new WeakMap,j=new WeakMap,J=new WeakMap,M=new WeakMap,T=new WeakMap,_=new WeakMap,I=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,$=new WeakMap,d=new WeakMap,q=new WeakMap,O=new WeakMap,L=new WeakMap,H=new WeakMap,Y=new WeakMap,k=new WeakMap,x=new WeakMap,A=new WeakMap,p=new WeakMap,P=new WeakMap,V=new WeakMap,R=new WeakMap,z=new WeakMap,F=new WeakMap,ht=new WeakMap,n=new WeakMap,W=new WeakMap,Q=new WeakMap,nt=new WeakMap,f=new WeakMap,D=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,tt=new WeakMap,N=new WeakMap,a=new WeakMap,U=new WeakMap,h=new WeakSet,Pt=function(){if(!t(this,S))return;t(this,p).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,z).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,K).observe(),t(this,Z).observe(),t(this,j).observe(),t(this,J).observe(),t(this,M).observe(),t(this,T).observe(),t(this,_).observe(),t(this,I).observe(),t(this,m).observe(),t(this,g).observe(),t(this,y).observe(),t(this,v).observe(),t(this,$).observe(),t(this,d).observe(),t(this,q).observe(),t(this,O).observe(),t(this,L).observe(),t(this,H).observe(),t(this,Y).observe(),t(this,k).observe(),t(this,x).observe(),t(this,A).observe();let r=!1;this.findAnotherScrollEntries(),t(this,M).current||this.enable(),t(this,K).subscribe(s=>{t(this,f).damping=s.current}),t(this,Z).subscribe(s=>{t(this,f).mass=s.current}),t(this,j).subscribe(s=>{t(this,f).stiffness=s.current}),t(this,J).subscribe(s=>{s.previous&&c(this,h,mt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,M).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,_).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,T).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,y).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,v).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,g).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,$).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,d).subscribe(s=>{c(this,h,X).call(this,s)}),t(this,I).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,O).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,D)))}),t(this,L).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,H).subscribe(s=>{t(this,a)||c(this,h,dt).call(this)}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,A).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,f).subscribe(s=>{if(t(this,U)){e(this,U,!1);return}c(this,h,dt).call(this)}),ut.windowResizer.subscribe(t(this,ct),Ct.RESIZE_ORDER.SCROLL+1),this.scrollContainer.onScroll(t(this,st)),r=!0},ft=function(){t(this,S)&&(ut.windowResizer.unsubscribe(t(this,ct)),this.scrollContainer.offScroll(t(this,st)),t(this,K).close(),t(this,Z).close(),t(this,j).close(),t(this,J).close(),t(this,M).close(),t(this,T).close(),t(this,_).close(),t(this,I).close(),t(this,m).close(),t(this,g).close(),t(this,y).close(),t(this,v).close(),t(this,$).close(),t(this,d).close(),t(this,q).close(),t(this,O).close(),t(this,L).close(),t(this,H).close(),t(this,k).close(),t(this,x).close(),t(this,A).close(),t(this,p).close(),t(this,P).close(),t(this,V).close(),t(this,R).close(),t(this,z).close(),t(this,F).close(),this.disable(),t(this,f).close())},Vt=function(){t(this,p).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},wt=function(){t(this,P).current=!0,t(this,p).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Ft=function(){t(this,p).current=!0,t(this,V).current=!0,t(this,R).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Et=function(){t(this,p).current=!0,t(this,z).current=!0,t(this,F).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},Lt=function(){t(this,P).current=!0,t(this,R).current=!0,t(this,V).current=!1,t(this,d).current&&t(this,n).classList.add(t(this,d).current)},Rt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,z).current=!1,t(this,d).current&&t(this,n).classList.add(t(this,d).current)},ct=new WeakMap,st=new WeakMap,dt=function(){const r=t(this,f)[t(this,Y).current];this.setVar(t(this,q).current,r),e(this,D,r/t(this,b)||0),this.setVar(t(this,O).current,t(this,D)),t(this,L).current&&this.setVar(t(this,L).current,this.progressArc)},X=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,p).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},zt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},qt=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},mt=function(){c(this,h,zt).call(this,t(this,m).current,t(this,y).current,t(this,v).current,t(this,g).current,t(this,$).current,t(this,d).current),c(this,h,qt).call(this,t(this,q).current,t(this,O).current,t(this,L).current,t(this,k).current,t(this,x).current,t(this,A).current)},yt);Ot.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",vt);exports.ScrollSegmentDefaultContainer=pt;exports.ScrollSegmentElement=vt;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";var Z=h=>{throw TypeError(h)};var G=(h,r,e)=>r.has(h)||Z("Cannot "+e);var t=(h,r,e)=>(G(h,r,"read from private field"),e?e.call(h):r.get(h)),i=(h,r,e)=>r.has(h)?Z("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),s=(h,r,e,o)=>(G(h,r,"write to private field"),o?o.call(h,e):r.set(h,e),e),P=(h,r,e)=>(G(h,r,"access private method"),e);const Y=require("./element-linked-store/index.cjs"),tt=require("./index-DekP7OZe.cjs"),U=require("./events-KVanG9sR.cjs"),et=require("./string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");const K=require("./loading/index.cjs"),st=require("./order/index.cjs"),J=require("./window-resizer/index.cjs"),it=require("./Store-Cd1GlEmZ.cjs");var T,w,z,q,u,f,R;class Q{constructor(r){i(this,T);i(this,w);i(this,z);i(this,q);i(this,u);i(this,f);i(this,R);s(this,T,r);let e=r.split(".");const o=/\b\d{1,2}x\b/g,d=e.find(g=>g.match(o)&&parseInt(g));s(this,z,d?parseInt(d):1),d&&(e=e.slice(0,-1)),s(this,w,e.length>1?e.slice(0,-1).join("."):e.join("."));const l=/\d+max/g,x=/\d+min/g,B=/\d+mar/g,_=/\d+mir/g,j=e.find(g=>g.match(l)),n=e.find(g=>g.match(x)),b=e.find(g=>g.match(B)),W=e.find(g=>g.match(_));b?(s(this,u,parseInt(b)),s(this,f,"max"),s(this,q,`(max-aspect-ratio: ${t(this,u)})`)):W?(s(this,u,parseInt(W)),s(this,f,"max"),s(this,q,`(min-aspect-ratio: ${t(this,u)})`)):j?(s(this,u,parseInt(j)),s(this,f,"max"),s(this,q,`(max-width: ${t(this,u)}px)`)):n?(s(this,u,parseInt(n)),s(this,q,`(min-width: ${t(this,u)}px)`),s(this,f,"min")):(s(this,u,0),s(this,q,`(min-width: ${t(this,u)}px)`),s(this,f,"min")),s(this,w,t(this,w).replace(`.${t(this,u)}${t(this,f)}`,"")),s(this,R,e[e.length-1]===t(this,w)?"":"."+e[e.length-1]),s(this,R,t(this,R).replace(`.${t(this,u)}${t(this,f)}`,""))}get url(){return t(this,T)}get name(){return t(this,w)}get density(){return t(this,z)}get query(){return t(this,q)}get extension(){return t(this,R)}get queryType(){return t(this,f)}get queryValue(){return t(this,u)}}T=new WeakMap,w=new WeakMap,z=new WeakMap,q=new WeakMap,u=new WeakMap,f=new WeakMap,R=new WeakMap;var S;class N{constructor(r,e){i(this,S);s(this,S,new Map);const o=(e==null?void 0:e.mediaBuckets)!==!1,d=typeof r=="string"?o?r.trim().split(",").map(n=>n.trim()).filter(n=>!!n):[r]:r,l=[];d.forEach(n=>{const b=new Q(n);l.push([b.query,b])});const x=l.filter(n=>n[1].queryType.includes("max")).sort((n,b)=>b[1].queryValue-n[1].queryValue),B=l.filter(n=>n[1].queryType.includes("min")&&n[1].queryValue!==0).sort((n,b)=>n[1].queryValue-b[1].queryValue),_=l.filter(n=>n[0]==="(min-width: 0px)");(_?[..._,...x,...B]:[...x,...B]).forEach(n=>{t(this,S).has(n[0])||t(this,S).set(n[0],[]),t(this,S).get(n[0]).push(n[1])})}get mediaBuckets(){return t(this,S)}}S=new WeakMap;var A,k;class X extends it.Store{constructor(e){super(void 0);i(this,A);i(this,k,()=>{let e;t(this,A).mediaBuckets.forEach((l,x)=>{matchMedia(x).matches&&(e=l)});let o,d=0;e==null||e.forEach(l=>{l.density>d&&l.density<=Math.max(devicePixelRatio,1)&&(d=l.density,o=l)}),e!=null&&e.length&&!o&&(o=e[0]),this.current=o});s(this,A,new N(e.srcset,e.sourceSetOptions))}updateSource(e){s(this,A,new N(e.srcset,e.sourceSetOptions)),t(this,k).call(this)}close(){super.close(),this.disconnect()}connect(){J.windowResizer.subscribe(t(this,k),st.RESIZE_ORDER.SOURCE_MANAGER),t(this,k).call(this)}disconnect(){J.windowResizer.unsubscribe(t(this,k))}}A=new WeakMap,k=new WeakMap;let rt=0;var m,a,y,E,p,O,M,c,I,$,L,C,v,D,F,V,H;class nt extends HTMLElement{constructor(e){super();i(this,v);i(this,m,null);i(this,a,null);i(this,y,!1);i(this,E,!1);i(this,p,!1);i(this,O,"");i(this,M,"");i(this,c,new Y.ElementLinkedStore(this,{loading:!1,loaded:!1,error:!1,clear:!1}));i(this,I,null);i(this,$);i(this,L,null);i(this,C);i(this,F,e=>{const o=e[0];t(this,p)&&(!t(this,E)||this.hasAttribute("reload-source"))&&o.isIntersecting&&this.triggerLazyLoad(),o.isIntersecting?U.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(P(this,v,D).call(this,void 0),s(this,E,!1)),U.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,V,()=>{t(this,c).set("loaded",!0),t(this,c).set("error",!1),t(this,c).set("loading",!1),!t(this,p)&&!t(this,y)&&K.loading.complete(t(this,M)),U.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,$,setTimeout(()=>{t(this,c).set("clear",!0)},parseFloat(e)*1e3)):t(this,c).set("clear",!0),s(this,y,!0)});i(this,H,e=>{t(this,c).set("loaded",!1),t(this,c).set("error",!0),t(this,c).set("loading",!1),!t(this,p)&&!t(this,y)&&K.loading.error(t(this,M)),U.dispatchEvent(this,"sourceError",{custom:!0}),s(this,y,!0)});s(this,C,e==null?void 0:e.sourceSetOptions),tt.isBrowser&&window.IntersectionObserver&&s(this,I,new IntersectionObserver(t(this,F)))}get consumerElement(){return t(this,a)}get sourceManager(){return t(this,m)}get status(){return t(this,c)}get isLazy(){return t(this,p)}get currentURL(){return t(this,L)}get isFirstLoadHappened(){return t(this,y)}triggerLazyLoad(){!t(this,E)&&t(this,m).current&&t(this,m).current!==t(this,m).previous&&(s(this,E,!0),P(this,v,D).call(this,t(this,m).current))}connectedCallback(){s(this,O,`source-consumer-${++rt}`);const e=this.getAttribute("srcset")||"",o=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;o&&t(this,c).addElement(o),s(this,a,this.createConsumer()),t(this,a).style.cssText=`
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
`,t(this,a).classList.add("source-consumer"),Array.from(this.attributes).forEach(d=>{if(d.name!=="srcset"){const l=d.nodeValue||"",x=et.kebabToCamel(d.name);x in t(this,a)&&(t(this,a)[x]=l||!0)}}),this.appendChild(t(this,a)),s(this,m,new X({srcset:e,sourceSetOptions:t(this,C)})),s(this,p,this.hasAttribute("lazy")),t(this,m).subscribe(d=>{(!t(this,p)||t(this,p)&&t(this,E))&&P(this,v,D).call(this,d.current)}),t(this,m).connect(),t(this,I).observe(this)}disconnectedCallback(){var e;clearTimeout(t(this,$)),t(this,I).disconnect(),(e=t(this,m))==null||e.close(),t(this,a)&&(t(this,a).onloadeddata=null,t(this,a).onload=null,t(this,a).onerror=null,t(this,a).remove()),s(this,y,!1),s(this,E,!1),t(this,c).reset()}}m=new WeakMap,a=new WeakMap,y=new WeakMap,E=new WeakMap,p=new WeakMap,O=new WeakMap,M=new WeakMap,c=new WeakMap,I=new WeakMap,$=new WeakMap,L=new WeakMap,C=new WeakMap,v=new WeakSet,D=function(e){if(clearTimeout(t(this,$)),t(this,a).onloadeddata=null,t(this,a).onload=null,t(this,a).onerror=null,t(this,c).set("loaded",!1),t(this,c).set("error",!1),t(this,c).set("loading",!1),t(this,c).set("clear",!1),e){s(this,M,`${t(this,O)}-${e.url}`);const o=this.hasAttribute("keep-source-parameters");t(this,c).set("loading",!0),s(this,L,o?e.url:e.name+e.extension),this.consumeSource(t(this,L)),!t(this,p)&&!t(this,y)&&K.loading.add(t(this,M)),t(this,a).onloadeddata=()=>{t(this,V).call(this)},t(this,a).onload=()=>{t(this,V).call(this)},t(this,a).onerror=()=>{t(this,H).call(this,t(this,L))}}else s(this,L,null),this.consumeSource(null)},F=new WeakMap,V=new WeakMap,H=new WeakMap;exports.Source=Q;exports.SourceElement=nt;exports.SourceManager=X;exports.SourceSet=N;
|