@fasttrack-solutions/rewards 0.0.0 → 1.44.0-beta.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.
- package/README.md +62 -1
- package/dist/chunks/mini-game-engine-Cozt9wr9.js +3034 -0
- package/dist/chunks/sdkCallback-Cqvlcjc0.js +11365 -0
- package/dist/rewards.js +14982 -0
- package/index.d.ts +6 -0
- package/package.json +41 -5
- package/ssr.js +4 -0
|
@@ -0,0 +1,3034 @@
|
|
|
1
|
+
import { Dr as e, t } from "./sdkCallback-Cqvlcjc0.js";
|
|
2
|
+
//#region node_modules/.pnpm/gsap@3.15.0/node_modules/gsap/gsap-core.js
|
|
3
|
+
function n(e) {
|
|
4
|
+
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
5
|
+
return e;
|
|
6
|
+
}
|
|
7
|
+
function r(e, t) {
|
|
8
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
|
|
9
|
+
}
|
|
10
|
+
var a = {
|
|
11
|
+
autoSleep: 120,
|
|
12
|
+
force3D: "auto",
|
|
13
|
+
nullTargetWarn: 1,
|
|
14
|
+
units: { lineHeight: "" }
|
|
15
|
+
}, o = {
|
|
16
|
+
duration: .5,
|
|
17
|
+
overwrite: !1,
|
|
18
|
+
delay: 0
|
|
19
|
+
}, s, c, l, u = 1e8, d = 1 / u, f = Math.PI * 2, p = f / 4, m = 0, h = Math.sqrt, g = Math.cos, _ = Math.sin, v = function(e) {
|
|
20
|
+
return typeof e == "string";
|
|
21
|
+
}, b = function(e) {
|
|
22
|
+
return typeof e == "function";
|
|
23
|
+
}, x = function(e) {
|
|
24
|
+
return typeof e == "number";
|
|
25
|
+
}, S = function(e) {
|
|
26
|
+
return e === void 0;
|
|
27
|
+
}, C = function(e) {
|
|
28
|
+
return typeof e == "object";
|
|
29
|
+
}, w = function(e) {
|
|
30
|
+
return e !== !1;
|
|
31
|
+
}, T = function() {
|
|
32
|
+
return typeof window < "u";
|
|
33
|
+
}, E = function(e) {
|
|
34
|
+
return b(e) || v(e);
|
|
35
|
+
}, D = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {}, O = Array.isArray, k = /random\([^)]+\)/g, A = /,\s*/g, j = /(?:-?\.?\d|\.)+/gi, M = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, N = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, P = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, F = /[+-]=-?[.\d]+/, I = /[^,'"\[\]\s]+/gi, ee = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, L, R, z, te, B = {}, ne = {}, re, ie = function(e) {
|
|
36
|
+
return (ne = Ne(e, B)) && X;
|
|
37
|
+
}, ae = function(e, t) {
|
|
38
|
+
return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()");
|
|
39
|
+
}, oe = function(e, t) {
|
|
40
|
+
return !t && console.warn(e);
|
|
41
|
+
}, se = function(e, t) {
|
|
42
|
+
return e && (B[e] = t) && ne && (ne[e] = t) || B;
|
|
43
|
+
}, ce = function() {
|
|
44
|
+
return 0;
|
|
45
|
+
}, le = {
|
|
46
|
+
suppressEvents: !0,
|
|
47
|
+
isStart: !0,
|
|
48
|
+
kill: !1
|
|
49
|
+
}, ue = {
|
|
50
|
+
suppressEvents: !0,
|
|
51
|
+
kill: !1
|
|
52
|
+
}, de = { suppressEvents: !0 }, fe = {}, pe = [], me = {}, he, ge = {}, _e = {}, ve = 30, ye = [], be = "", xe = function(e) {
|
|
53
|
+
var t = e[0], n, r;
|
|
54
|
+
if (C(t) || b(t) || (e = [e]), !(n = (t._gsap || {}).harness)) {
|
|
55
|
+
for (r = ye.length; r-- && !ye[r].targetTest(t););
|
|
56
|
+
n = ye[r];
|
|
57
|
+
}
|
|
58
|
+
for (r = e.length; r--;) e[r] && (e[r]._gsap || (e[r]._gsap = new on(e[r], n))) || e.splice(r, 1);
|
|
59
|
+
return e;
|
|
60
|
+
}, Se = function(e) {
|
|
61
|
+
return e._gsap || xe(ht(e))[0]._gsap;
|
|
62
|
+
}, Ce = function(e, t, n) {
|
|
63
|
+
return (n = e[t]) && b(n) ? e[t]() : S(n) && e.getAttribute && e.getAttribute(t) || n;
|
|
64
|
+
}, V = function(e, t) {
|
|
65
|
+
return (e = e.split(",")).forEach(t) || e;
|
|
66
|
+
}, H = function(e) {
|
|
67
|
+
return Math.round(e * 1e5) / 1e5 || 0;
|
|
68
|
+
}, U = function(e) {
|
|
69
|
+
return Math.round(e * 1e7) / 1e7 || 0;
|
|
70
|
+
}, we = function(e, t) {
|
|
71
|
+
var n = t.charAt(0), r = parseFloat(t.substr(2));
|
|
72
|
+
return e = parseFloat(e), n === "+" ? e + r : n === "-" ? e - r : n === "*" ? e * r : e / r;
|
|
73
|
+
}, Te = function(e, t) {
|
|
74
|
+
for (var n = t.length, r = 0; e.indexOf(t[r]) < 0 && ++r < n;);
|
|
75
|
+
return r < n;
|
|
76
|
+
}, Ee = function() {
|
|
77
|
+
var e = pe.length, t = pe.slice(0), n, r;
|
|
78
|
+
for (me = {}, pe.length = 0, n = 0; n < e; n++) r = t[n], r && r._lazy && (r.render(r._lazy[0], r._lazy[1], !0)._lazy = 0);
|
|
79
|
+
}, De = function(e) {
|
|
80
|
+
return !!(e._initted || e._startAt || e.add);
|
|
81
|
+
}, Oe = function(e, t, n, r) {
|
|
82
|
+
pe.length && !c && Ee(), e.render(t, n, r || !!(c && t < 0 && De(e))), pe.length && !c && Ee();
|
|
83
|
+
}, ke = function(e) {
|
|
84
|
+
var t = parseFloat(e);
|
|
85
|
+
return (t || t === 0) && (e + "").match(I).length < 2 ? t : v(e) ? e.trim() : e;
|
|
86
|
+
}, Ae = function(e) {
|
|
87
|
+
return e;
|
|
88
|
+
}, je = function(e, t) {
|
|
89
|
+
for (var n in t) n in e || (e[n] = t[n]);
|
|
90
|
+
return e;
|
|
91
|
+
}, Me = function(e) {
|
|
92
|
+
return function(t, n) {
|
|
93
|
+
for (var r in n) r in t || r === "duration" && e || r === "ease" || (t[r] = n[r]);
|
|
94
|
+
};
|
|
95
|
+
}, Ne = function(e, t) {
|
|
96
|
+
for (var n in t) e[n] = t[n];
|
|
97
|
+
return e;
|
|
98
|
+
}, Pe = function e(t, n) {
|
|
99
|
+
for (var r in n) r !== "__proto__" && r !== "constructor" && r !== "prototype" && (t[r] = C(n[r]) ? e(t[r] || (t[r] = {}), n[r]) : n[r]);
|
|
100
|
+
return t;
|
|
101
|
+
}, Fe = function(e, t) {
|
|
102
|
+
var n = {}, r;
|
|
103
|
+
for (r in e) r in t || (n[r] = e[r]);
|
|
104
|
+
return n;
|
|
105
|
+
}, Ie = function(e) {
|
|
106
|
+
var t = e.parent || L, n = e.keyframes ? Me(O(e.keyframes)) : je;
|
|
107
|
+
if (w(e.inherit)) for (; t;) n(e, t.vars.defaults), t = t.parent || t._dp;
|
|
108
|
+
return e;
|
|
109
|
+
}, Le = function(e, t) {
|
|
110
|
+
for (var n = e.length, r = n === t.length; r && n-- && e[n] === t[n];);
|
|
111
|
+
return n < 0;
|
|
112
|
+
}, Re = function(e, t, n, r, a) {
|
|
113
|
+
n === void 0 && (n = "_first"), r === void 0 && (r = "_last");
|
|
114
|
+
var o = e[r], s;
|
|
115
|
+
if (a) for (s = t[a]; o && o[a] > s;) o = o._prev;
|
|
116
|
+
return o ? (t._next = o._next, o._next = t) : (t._next = e[n], e[n] = t), t._next ? t._next._prev = t : e[r] = t, t._prev = o, t.parent = t._dp = e, t;
|
|
117
|
+
}, ze = function(e, t, n, r) {
|
|
118
|
+
n === void 0 && (n = "_first"), r === void 0 && (r = "_last");
|
|
119
|
+
var a = t._prev, o = t._next;
|
|
120
|
+
a ? a._next = o : e[n] === t && (e[n] = o), o ? o._prev = a : e[r] === t && (e[r] = a), t._next = t._prev = t.parent = null;
|
|
121
|
+
}, Be = function(e, t) {
|
|
122
|
+
e.parent && (!t || e.parent.autoRemoveChildren) && e.parent.remove && e.parent.remove(e), e._act = 0;
|
|
123
|
+
}, Ve = function(e, t) {
|
|
124
|
+
if (e && (!t || t._end > e._dur || t._start < 0)) for (var n = e; n;) n._dirty = 1, n = n.parent;
|
|
125
|
+
return e;
|
|
126
|
+
}, He = function(e) {
|
|
127
|
+
for (var t = e.parent; t && t.parent;) t._dirty = 1, t.totalDuration(), t = t.parent;
|
|
128
|
+
return e;
|
|
129
|
+
}, Ue = function(e, t, n, r) {
|
|
130
|
+
return e._startAt && (c ? e._startAt.revert(ue) : e.vars.immediateRender && !e.vars.autoRevert || e._startAt.render(t, !0, r));
|
|
131
|
+
}, We = function e(t) {
|
|
132
|
+
return !t || t._ts && e(t.parent);
|
|
133
|
+
}, Ge = function(e) {
|
|
134
|
+
return e._repeat ? Ke(e._tTime, e = e.duration() + e._rDelay) * e : 0;
|
|
135
|
+
}, Ke = function(e, t) {
|
|
136
|
+
var n = Math.floor(e = U(e / t));
|
|
137
|
+
return e && n === e ? n - 1 : n;
|
|
138
|
+
}, qe = function(e, t) {
|
|
139
|
+
return (e - t._start) * t._ts + (t._ts >= 0 ? 0 : t._dirty ? t.totalDuration() : t._tDur);
|
|
140
|
+
}, Je = function(e) {
|
|
141
|
+
return e._end = U(e._start + (e._tDur / Math.abs(e._ts || e._rts || d) || 0));
|
|
142
|
+
}, Ye = function(e, t) {
|
|
143
|
+
var n = e._dp;
|
|
144
|
+
return n && n.smoothChildTiming && e._ts && (e._start = U(n._time - (e._ts > 0 ? t / e._ts : ((e._dirty ? e.totalDuration() : e._tDur) - t) / -e._ts)), Je(e), n._dirty || Ve(n, e)), e;
|
|
145
|
+
}, Xe = function(e, t) {
|
|
146
|
+
var n;
|
|
147
|
+
if ((t._time || !t._dur && t._initted || t._start < e._time && (t._dur || !t.add)) && (n = qe(e.rawTime(), t), (!t._dur || ut(0, t.totalDuration(), n) - t._tTime > d) && t.render(n, !0)), Ve(e, t)._dp && e._initted && e._time >= e._dur && e._ts) {
|
|
148
|
+
if (e._dur < e.duration()) for (n = e; n._dp;) n.rawTime() >= 0 && n.totalTime(n._tTime), n = n._dp;
|
|
149
|
+
e._zTime = -d;
|
|
150
|
+
}
|
|
151
|
+
}, Ze = function(e, t, n, r) {
|
|
152
|
+
return t.parent && Be(t), t._start = U((x(n) ? n : n || e !== L ? st(e, n, t) : e._time) + t._delay), t._end = U(t._start + (t.totalDuration() / Math.abs(t.timeScale()) || 0)), Re(e, t, "_first", "_last", e._sort ? "_start" : 0), tt(t) || (e._recent = t), r || Xe(e, t), e._ts < 0 && Ye(e, e._tTime), e;
|
|
153
|
+
}, Qe = function(e, t) {
|
|
154
|
+
return (B.ScrollTrigger || ae("scrollTrigger", t)) && B.ScrollTrigger.create(t, e);
|
|
155
|
+
}, $e = function(e, t, n, r, a) {
|
|
156
|
+
if (mn(e, t, a), !e._initted) return 1;
|
|
157
|
+
if (!n && e._pt && !c && (e._dur && e.vars.lazy !== !1 || !e._dur && e.vars.lazy) && he !== Kt.frame) return pe.push(e), e._lazy = [a, r], 1;
|
|
158
|
+
}, et = function e(t) {
|
|
159
|
+
var n = t.parent;
|
|
160
|
+
return n && n._ts && n._initted && !n._lock && (n.rawTime() < 0 || e(n));
|
|
161
|
+
}, tt = function(e) {
|
|
162
|
+
var t = e.data;
|
|
163
|
+
return t === "isFromStart" || t === "isStart";
|
|
164
|
+
}, nt = function(e, t, n, r) {
|
|
165
|
+
var a = e.ratio, o = t < 0 || !t && (!e._start && et(e) && !(!e._initted && tt(e)) || (e._ts < 0 || e._dp._ts < 0) && !tt(e)) ? 0 : 1, s = e._rDelay, l = 0, u, f, p;
|
|
166
|
+
if (s && e._repeat && (l = ut(0, e._tDur, t), f = Ke(l, s), e._yoyo && f & 1 && (o = 1 - o), f !== Ke(e._tTime, s) && (a = 1 - o, e.vars.repeatRefresh && e._initted && e.invalidate())), o !== a || c || r || e._zTime === d || !t && e._zTime) {
|
|
167
|
+
if (!e._initted && $e(e, t, r, n, l)) return;
|
|
168
|
+
for (p = e._zTime, e._zTime = t || (n ? d : 0), n ||= t && !p, e.ratio = o, e._from && (o = 1 - o), e._time = 0, e._tTime = l, u = e._pt; u;) u.r(o, u.d), u = u._next;
|
|
169
|
+
t < 0 && Ue(e, t, n, !0), e._onUpdate && !n && Mt(e, "onUpdate"), l && e._repeat && !n && e.parent && Mt(e, "onRepeat"), (t >= e._tDur || t < 0) && e.ratio === o && (o && Be(e, 1), !n && !c && (Mt(e, o ? "onComplete" : "onReverseComplete", !0), e._prom && e._prom()));
|
|
170
|
+
} else e._zTime ||= t;
|
|
171
|
+
}, rt = function(e, t, n) {
|
|
172
|
+
var r;
|
|
173
|
+
if (n > t) for (r = e._first; r && r._start <= n;) {
|
|
174
|
+
if (r.data === "isPause" && r._start > t) return r;
|
|
175
|
+
r = r._next;
|
|
176
|
+
}
|
|
177
|
+
else for (r = e._last; r && r._start >= n;) {
|
|
178
|
+
if (r.data === "isPause" && r._start < t) return r;
|
|
179
|
+
r = r._prev;
|
|
180
|
+
}
|
|
181
|
+
}, it = function(e, t, n, r) {
|
|
182
|
+
var a = e._repeat, o = U(t) || 0, s = e._tTime / e._tDur;
|
|
183
|
+
return s && !r && (e._time *= o / e._dur), e._dur = o, e._tDur = a ? a < 0 ? 1e10 : U(o * (a + 1) + e._rDelay * a) : o, s > 0 && !r && Ye(e, e._tTime = e._tDur * s), e.parent && Je(e), n || Ve(e.parent, e), e;
|
|
184
|
+
}, at = function(e) {
|
|
185
|
+
return e instanceof q ? Ve(e) : it(e, e._dur);
|
|
186
|
+
}, ot = {
|
|
187
|
+
_start: 0,
|
|
188
|
+
endTime: ce,
|
|
189
|
+
totalDuration: ce
|
|
190
|
+
}, st = function e(t, n, r) {
|
|
191
|
+
var a = t.labels, o = t._recent || ot, s = t.duration() >= u ? o.endTime(!1) : t._dur, c, l, d;
|
|
192
|
+
return v(n) && (isNaN(n) || n in a) ? (l = n.charAt(0), d = n.substr(-1) === "%", c = n.indexOf("="), l === "<" || l === ">" ? (c >= 0 && (n = n.replace(/=/, "")), (l === "<" ? o._start : o.endTime(o._repeat >= 0)) + (parseFloat(n.substr(1)) || 0) * (d ? (c < 0 ? o : r).totalDuration() / 100 : 1)) : c < 0 ? (n in a || (a[n] = s), a[n]) : (l = parseFloat(n.charAt(c - 1) + n.substr(c + 1)), d && r && (l = l / 100 * (O(r) ? r[0] : r).totalDuration()), c > 1 ? e(t, n.substr(0, c - 1), r) + l : s + l)) : n == null ? s : +n;
|
|
193
|
+
}, ct = function(e, t, n) {
|
|
194
|
+
var r = x(t[1]), a = (r ? 2 : 1) + (e < 2 ? 0 : 1), o = t[a], s, c;
|
|
195
|
+
if (r && (o.duration = t[1]), o.parent = n, e) {
|
|
196
|
+
for (s = o, c = n; c && !("immediateRender" in s);) s = c.vars.defaults || {}, c = w(c.vars.inherit) && c.parent;
|
|
197
|
+
o.immediateRender = w(s.immediateRender), e < 2 ? o.runBackwards = 1 : o.startAt = t[a - 1];
|
|
198
|
+
}
|
|
199
|
+
return new J(t[0], o, t[a + 1]);
|
|
200
|
+
}, lt = function(e, t) {
|
|
201
|
+
return e || e === 0 ? t(e) : t;
|
|
202
|
+
}, ut = function(e, t, n) {
|
|
203
|
+
return n < e ? e : n > t ? t : n;
|
|
204
|
+
}, W = function(e, t) {
|
|
205
|
+
return !v(e) || !(t = ee.exec(e)) ? "" : t[1];
|
|
206
|
+
}, dt = function(e, t, n) {
|
|
207
|
+
return lt(n, function(n) {
|
|
208
|
+
return ut(e, t, n);
|
|
209
|
+
});
|
|
210
|
+
}, ft = [].slice, pt = function(e, t) {
|
|
211
|
+
return e && C(e) && "length" in e && (!t && !e.length || e.length - 1 in e && C(e[0])) && !e.nodeType && e !== R;
|
|
212
|
+
}, mt = function(e, t, n) {
|
|
213
|
+
return n === void 0 && (n = []), e.forEach(function(e) {
|
|
214
|
+
var r;
|
|
215
|
+
return v(e) && !t || pt(e, 1) ? (r = n).push.apply(r, ht(e)) : n.push(e);
|
|
216
|
+
}) || n;
|
|
217
|
+
}, ht = function(e, t, n) {
|
|
218
|
+
return l && !t && l.selector ? l.selector(e) : v(e) && !n && (z || !qt()) ? ft.call((t || te).querySelectorAll(e), 0) : O(e) ? mt(e, n) : pt(e) ? ft.call(e, 0) : e ? [e] : [];
|
|
219
|
+
}, gt = function(e) {
|
|
220
|
+
return e = ht(e)[0] || oe("Invalid scope") || {}, function(t) {
|
|
221
|
+
var n = e.current || e.nativeElement || e;
|
|
222
|
+
return ht(t, n.querySelectorAll ? n : n === e ? oe("Invalid scope") || te.createElement("div") : e);
|
|
223
|
+
};
|
|
224
|
+
}, _t = function(e) {
|
|
225
|
+
return e.sort(function() {
|
|
226
|
+
return .5 - Math.random();
|
|
227
|
+
});
|
|
228
|
+
}, vt = function(e) {
|
|
229
|
+
if (b(e)) return e;
|
|
230
|
+
var t = C(e) ? e : { each: e }, n = en(t.ease), r = t.from || 0, a = parseFloat(t.base) || 0, o = {}, s = r > 0 && r < 1, c = isNaN(r) || s, l = t.axis, d = r, f = r;
|
|
231
|
+
return v(r) ? d = f = {
|
|
232
|
+
center: .5,
|
|
233
|
+
edges: .5,
|
|
234
|
+
end: 1
|
|
235
|
+
}[r] || 0 : !s && c && (d = r[0], f = r[1]), function(e, s, p) {
|
|
236
|
+
var m = (p || t).length, g = o[m], _, v, b, x, S, C, w, T, E;
|
|
237
|
+
if (!g) {
|
|
238
|
+
if (E = t.grid === "auto" ? 0 : (t.grid || [1, u])[1], !E) {
|
|
239
|
+
for (w = -u; w < (w = p[E++].getBoundingClientRect().left) && E < m;);
|
|
240
|
+
E < m && E--;
|
|
241
|
+
}
|
|
242
|
+
for (g = o[m] = [], _ = c ? Math.min(E, m) * d - .5 : r % E, v = E === u ? 0 : c ? m * f / E - .5 : r / E | 0, w = 0, T = u, C = 0; C < m; C++) b = C % E - _, x = v - (C / E | 0), g[C] = S = l ? Math.abs(l === "y" ? x : b) : h(b * b + x * x), S > w && (w = S), S < T && (T = S);
|
|
243
|
+
r === "random" && _t(g), g.max = w - T, g.min = T, g.v = m = (parseFloat(t.amount) || parseFloat(t.each) * (E > m ? m - 1 : l ? l === "y" ? m / E : E : Math.max(E, m / E)) || 0) * (r === "edges" ? -1 : 1), g.b = m < 0 ? a - m : a, g.u = W(t.amount || t.each) || 0, n = n && m < 0 ? $t(n) : n;
|
|
244
|
+
}
|
|
245
|
+
return m = (g[e] - g.min) / g.max || 0, U(g.b + (n ? n(m) : m) * g.v) + g.u;
|
|
246
|
+
};
|
|
247
|
+
}, yt = function(e) {
|
|
248
|
+
var t = 10 ** ((e + "").split(".")[1] || "").length;
|
|
249
|
+
return function(n) {
|
|
250
|
+
var r = U(Math.round(parseFloat(n) / e) * e * t);
|
|
251
|
+
return (r - r % 1) / t + (x(n) ? 0 : W(n));
|
|
252
|
+
};
|
|
253
|
+
}, bt = function(e, t) {
|
|
254
|
+
var n = O(e), r, a;
|
|
255
|
+
return !n && C(e) && (r = n = e.radius || u, e.values ? (e = ht(e.values), (a = !x(e[0])) && (r *= r)) : e = yt(e.increment)), lt(t, n ? b(e) ? function(t) {
|
|
256
|
+
return a = e(t), Math.abs(a - t) <= r ? a : t;
|
|
257
|
+
} : function(t) {
|
|
258
|
+
for (var n = parseFloat(a ? t.x : t), o = parseFloat(a ? t.y : 0), s = u, c = 0, l = e.length, d, f; l--;) a ? (d = e[l].x - n, f = e[l].y - o, d = d * d + f * f) : d = Math.abs(e[l] - n), d < s && (s = d, c = l);
|
|
259
|
+
return c = !r || s <= r ? e[c] : t, a || c === t || x(t) ? c : c + W(t);
|
|
260
|
+
} : yt(e));
|
|
261
|
+
}, xt = function(e, t, n, r) {
|
|
262
|
+
return lt(O(e) ? !t : n === !0 ? !!(n = 0) : !r, function() {
|
|
263
|
+
return O(e) ? e[~~(Math.random() * e.length)] : (n ||= 1e-5) && (r = n < 1 ? 10 ** ((n + "").length - 2) : 1) && Math.floor(Math.round((e - n / 2 + Math.random() * (t - e + n * .99)) / n) * n * r) / r;
|
|
264
|
+
});
|
|
265
|
+
}, St = function() {
|
|
266
|
+
var e = [...arguments];
|
|
267
|
+
return function(t) {
|
|
268
|
+
return e.reduce(function(e, t) {
|
|
269
|
+
return t(e);
|
|
270
|
+
}, t);
|
|
271
|
+
};
|
|
272
|
+
}, Ct = function(e, t) {
|
|
273
|
+
return function(n) {
|
|
274
|
+
return e(parseFloat(n)) + (t || W(n));
|
|
275
|
+
};
|
|
276
|
+
}, wt = function(e, t, n) {
|
|
277
|
+
return kt(e, t, 0, 1, n);
|
|
278
|
+
}, Tt = function(e, t, n) {
|
|
279
|
+
return lt(n, function(n) {
|
|
280
|
+
return e[~~t(n)];
|
|
281
|
+
});
|
|
282
|
+
}, Et = function e(t, n, r) {
|
|
283
|
+
var a = n - t;
|
|
284
|
+
return O(t) ? Tt(t, e(0, t.length), n) : lt(r, function(e) {
|
|
285
|
+
return (a + (e - t) % a) % a + t;
|
|
286
|
+
});
|
|
287
|
+
}, Dt = function e(t, n, r) {
|
|
288
|
+
var a = n - t, o = a * 2;
|
|
289
|
+
return O(t) ? Tt(t, e(0, t.length - 1), n) : lt(r, function(e) {
|
|
290
|
+
return e = (o + (e - t) % o) % o || 0, t + (e > a ? o - e : e);
|
|
291
|
+
});
|
|
292
|
+
}, Ot = function(e) {
|
|
293
|
+
return e.replace(k, function(e) {
|
|
294
|
+
var t = e.indexOf("[") + 1, n = e.substring(t || 7, t ? e.indexOf("]") : e.length - 1).split(A);
|
|
295
|
+
return xt(t ? n : +n[0], t ? 0 : +n[1], +n[2] || 1e-5);
|
|
296
|
+
});
|
|
297
|
+
}, kt = function(e, t, n, r, a) {
|
|
298
|
+
var o = t - e, s = r - n;
|
|
299
|
+
return lt(a, function(t) {
|
|
300
|
+
return n + ((t - e) / o * s || 0);
|
|
301
|
+
});
|
|
302
|
+
}, At = function e(t, n, r, a) {
|
|
303
|
+
var o = isNaN(t + n) ? 0 : function(e) {
|
|
304
|
+
return (1 - e) * t + e * n;
|
|
305
|
+
};
|
|
306
|
+
if (!o) {
|
|
307
|
+
var s = v(t), c = {}, l, u, d, f, p;
|
|
308
|
+
if (r === !0 && (a = 1) && (r = null), s) t = { p: t }, n = { p: n };
|
|
309
|
+
else if (O(t) && !O(n)) {
|
|
310
|
+
for (d = [], f = t.length, p = f - 2, u = 1; u < f; u++) d.push(e(t[u - 1], t[u]));
|
|
311
|
+
f--, o = function(e) {
|
|
312
|
+
e *= f;
|
|
313
|
+
var t = Math.min(p, ~~e);
|
|
314
|
+
return d[t](e - t);
|
|
315
|
+
}, r = n;
|
|
316
|
+
} else a || (t = Ne(O(t) ? [] : {}, t));
|
|
317
|
+
if (!d) {
|
|
318
|
+
for (l in n) ln.call(c, t, l, "get", n[l]);
|
|
319
|
+
o = function(e) {
|
|
320
|
+
return kn(e, c) || (s ? t.p : t);
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return lt(r, o);
|
|
325
|
+
}, jt = function(e, t, n) {
|
|
326
|
+
var r = e.labels, a = u, o, s, c;
|
|
327
|
+
for (o in r) s = r[o] - t, s < 0 == !!n && s && a > (s = Math.abs(s)) && (c = o, a = s);
|
|
328
|
+
return c;
|
|
329
|
+
}, Mt = function(e, t, n) {
|
|
330
|
+
var r = e.vars, a = r[t], o = l, s = e._ctx, c, u, d;
|
|
331
|
+
if (a) return c = r[t + "Params"], u = r.callbackScope || e, n && pe.length && Ee(), s && (l = s), d = c ? a.apply(u, c) : a.call(u), l = o, d;
|
|
332
|
+
}, Nt = function(e) {
|
|
333
|
+
return Be(e), e.scrollTrigger && e.scrollTrigger.kill(!!c), e.progress() < 1 && Mt(e, "onInterrupt"), e;
|
|
334
|
+
}, Pt, Ft = [], It = function(e) {
|
|
335
|
+
if (e) if (e = !e.name && e.default || e, T() || e.headless) {
|
|
336
|
+
var t = e.name, n = b(e), r = t && !n && e.init ? function() {
|
|
337
|
+
this._props = [];
|
|
338
|
+
} : e, a = {
|
|
339
|
+
init: ce,
|
|
340
|
+
render: kn,
|
|
341
|
+
add: ln,
|
|
342
|
+
kill: jn,
|
|
343
|
+
modifier: An,
|
|
344
|
+
rawVars: 0
|
|
345
|
+
}, o = {
|
|
346
|
+
targetTest: 0,
|
|
347
|
+
get: 0,
|
|
348
|
+
getSetter: Tn,
|
|
349
|
+
aliases: {},
|
|
350
|
+
register: 0
|
|
351
|
+
};
|
|
352
|
+
if (qt(), e !== r) {
|
|
353
|
+
if (ge[t]) return;
|
|
354
|
+
je(r, je(Fe(e, a), o)), Ne(r.prototype, Ne(a, Fe(e, o))), ge[r.prop = t] = r, e.targetTest && (ye.push(r), fe[t] = 1), t = (t === "css" ? "CSS" : t.charAt(0).toUpperCase() + t.substr(1)) + "Plugin";
|
|
355
|
+
}
|
|
356
|
+
se(t, r), e.register && e.register(X, r, Y);
|
|
357
|
+
} else Ft.push(e);
|
|
358
|
+
}, G = 255, Lt = {
|
|
359
|
+
aqua: [
|
|
360
|
+
0,
|
|
361
|
+
G,
|
|
362
|
+
G
|
|
363
|
+
],
|
|
364
|
+
lime: [
|
|
365
|
+
0,
|
|
366
|
+
G,
|
|
367
|
+
0
|
|
368
|
+
],
|
|
369
|
+
silver: [
|
|
370
|
+
192,
|
|
371
|
+
192,
|
|
372
|
+
192
|
|
373
|
+
],
|
|
374
|
+
black: [
|
|
375
|
+
0,
|
|
376
|
+
0,
|
|
377
|
+
0
|
|
378
|
+
],
|
|
379
|
+
maroon: [
|
|
380
|
+
128,
|
|
381
|
+
0,
|
|
382
|
+
0
|
|
383
|
+
],
|
|
384
|
+
teal: [
|
|
385
|
+
0,
|
|
386
|
+
128,
|
|
387
|
+
128
|
|
388
|
+
],
|
|
389
|
+
blue: [
|
|
390
|
+
0,
|
|
391
|
+
0,
|
|
392
|
+
G
|
|
393
|
+
],
|
|
394
|
+
navy: [
|
|
395
|
+
0,
|
|
396
|
+
0,
|
|
397
|
+
128
|
|
398
|
+
],
|
|
399
|
+
white: [
|
|
400
|
+
G,
|
|
401
|
+
G,
|
|
402
|
+
G
|
|
403
|
+
],
|
|
404
|
+
olive: [
|
|
405
|
+
128,
|
|
406
|
+
128,
|
|
407
|
+
0
|
|
408
|
+
],
|
|
409
|
+
yellow: [
|
|
410
|
+
G,
|
|
411
|
+
G,
|
|
412
|
+
0
|
|
413
|
+
],
|
|
414
|
+
orange: [
|
|
415
|
+
G,
|
|
416
|
+
165,
|
|
417
|
+
0
|
|
418
|
+
],
|
|
419
|
+
gray: [
|
|
420
|
+
128,
|
|
421
|
+
128,
|
|
422
|
+
128
|
|
423
|
+
],
|
|
424
|
+
purple: [
|
|
425
|
+
128,
|
|
426
|
+
0,
|
|
427
|
+
128
|
|
428
|
+
],
|
|
429
|
+
green: [
|
|
430
|
+
0,
|
|
431
|
+
128,
|
|
432
|
+
0
|
|
433
|
+
],
|
|
434
|
+
red: [
|
|
435
|
+
G,
|
|
436
|
+
0,
|
|
437
|
+
0
|
|
438
|
+
],
|
|
439
|
+
pink: [
|
|
440
|
+
G,
|
|
441
|
+
192,
|
|
442
|
+
203
|
|
443
|
+
],
|
|
444
|
+
cyan: [
|
|
445
|
+
0,
|
|
446
|
+
G,
|
|
447
|
+
G
|
|
448
|
+
],
|
|
449
|
+
transparent: [
|
|
450
|
+
G,
|
|
451
|
+
G,
|
|
452
|
+
G,
|
|
453
|
+
0
|
|
454
|
+
]
|
|
455
|
+
}, Rt = function(e, t, n) {
|
|
456
|
+
return e += e < 0 ? 1 : e > 1 ? -1 : 0, (e * 6 < 1 ? t + (n - t) * e * 6 : e < .5 ? n : e * 3 < 2 ? t + (n - t) * (2 / 3 - e) * 6 : t) * G + .5 | 0;
|
|
457
|
+
}, zt = function(e, t, n) {
|
|
458
|
+
var r = e ? x(e) ? [
|
|
459
|
+
e >> 16,
|
|
460
|
+
e >> 8 & G,
|
|
461
|
+
e & G
|
|
462
|
+
] : 0 : Lt.black, a, o, s, c, l, u, d, f, p, m;
|
|
463
|
+
if (!r) {
|
|
464
|
+
if (e.substr(-1) === "," && (e = e.substr(0, e.length - 1)), Lt[e]) r = Lt[e];
|
|
465
|
+
else if (e.charAt(0) === "#") {
|
|
466
|
+
if (e.length < 6 && (a = e.charAt(1), o = e.charAt(2), s = e.charAt(3), e = "#" + a + a + o + o + s + s + (e.length === 5 ? e.charAt(4) + e.charAt(4) : "")), e.length === 9) return r = parseInt(e.substr(1, 6), 16), [
|
|
467
|
+
r >> 16,
|
|
468
|
+
r >> 8 & G,
|
|
469
|
+
r & G,
|
|
470
|
+
parseInt(e.substr(7), 16) / 255
|
|
471
|
+
];
|
|
472
|
+
e = parseInt(e.substr(1), 16), r = [
|
|
473
|
+
e >> 16,
|
|
474
|
+
e >> 8 & G,
|
|
475
|
+
e & G
|
|
476
|
+
];
|
|
477
|
+
} else if (e.substr(0, 3) === "hsl") {
|
|
478
|
+
if (r = m = e.match(j), !t) c = r[0] % 360 / 360, l = r[1] / 100, u = r[2] / 100, o = u <= .5 ? u * (l + 1) : u + l - u * l, a = u * 2 - o, r.length > 3 && (r[3] *= 1), r[0] = Rt(c + 1 / 3, a, o), r[1] = Rt(c, a, o), r[2] = Rt(c - 1 / 3, a, o);
|
|
479
|
+
else if (~e.indexOf("=")) return r = e.match(M), n && r.length < 4 && (r[3] = 1), r;
|
|
480
|
+
} else r = e.match(j) || Lt.transparent;
|
|
481
|
+
r = r.map(Number);
|
|
482
|
+
}
|
|
483
|
+
return t && !m && (a = r[0] / G, o = r[1] / G, s = r[2] / G, d = Math.max(a, o, s), f = Math.min(a, o, s), u = (d + f) / 2, d === f ? c = l = 0 : (p = d - f, l = u > .5 ? p / (2 - d - f) : p / (d + f), c = d === a ? (o - s) / p + (o < s ? 6 : 0) : d === o ? (s - a) / p + 2 : (a - o) / p + 4, c *= 60), r[0] = ~~(c + .5), r[1] = ~~(l * 100 + .5), r[2] = ~~(u * 100 + .5)), n && r.length < 4 && (r[3] = 1), r;
|
|
484
|
+
}, Bt = function(e) {
|
|
485
|
+
var t = [], n = [], r = -1;
|
|
486
|
+
return e.split(Ht).forEach(function(e) {
|
|
487
|
+
var a = e.match(N) || [];
|
|
488
|
+
t.push.apply(t, a), n.push(r += a.length + 1);
|
|
489
|
+
}), t.c = n, t;
|
|
490
|
+
}, Vt = function(e, t, n) {
|
|
491
|
+
var r = "", a = (e + r).match(Ht), o = t ? "hsla(" : "rgba(", s = 0, c, l, u, d;
|
|
492
|
+
if (!a) return e;
|
|
493
|
+
if (a = a.map(function(e) {
|
|
494
|
+
return (e = zt(e, t, 1)) && o + (t ? e[0] + "," + e[1] + "%," + e[2] + "%," + e[3] : e.join(",")) + ")";
|
|
495
|
+
}), n && (u = Bt(e), c = n.c, c.join(r) !== u.c.join(r))) for (l = e.replace(Ht, "1").split(N), d = l.length - 1; s < d; s++) r += l[s] + (~c.indexOf(s) ? a.shift() || o + "0,0,0,0)" : (u.length ? u : a.length ? a : n).shift());
|
|
496
|
+
if (!l) for (l = e.split(Ht), d = l.length - 1; s < d; s++) r += l[s] + a[s];
|
|
497
|
+
return r + l[d];
|
|
498
|
+
}, Ht = function() {
|
|
499
|
+
var e = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", t;
|
|
500
|
+
for (t in Lt) e += "|" + t + "\\b";
|
|
501
|
+
return RegExp(e + ")", "gi");
|
|
502
|
+
}(), Ut = /hsl[a]?\(/, Wt = function(e) {
|
|
503
|
+
var t = e.join(" "), n;
|
|
504
|
+
if (Ht.lastIndex = 0, Ht.test(t)) return n = Ut.test(t), e[1] = Vt(e[1], n), e[0] = Vt(e[0], n, Bt(e[1])), !0;
|
|
505
|
+
}, Gt, Kt = function() {
|
|
506
|
+
var e = Date.now, t = 500, n = 33, r = e(), a = r, o = 1e3 / 240, s = o, c = [], l, u, d, f, p, m, h = function d(h) {
|
|
507
|
+
var g = e() - a, _ = h === !0, v, b, x, S;
|
|
508
|
+
if ((g > t || g < 0) && (r += g - n), a += g, x = a - r, v = x - s, (v > 0 || _) && (S = ++f.frame, p = x - f.time * 1e3, f.time = x /= 1e3, s += v + (v >= o ? 4 : o - v), b = 1), _ || (l = u(d)), b) for (m = 0; m < c.length; m++) c[m](x, p, S, h);
|
|
509
|
+
};
|
|
510
|
+
return f = {
|
|
511
|
+
time: 0,
|
|
512
|
+
frame: 0,
|
|
513
|
+
tick: function() {
|
|
514
|
+
h(!0);
|
|
515
|
+
},
|
|
516
|
+
deltaRatio: function(e) {
|
|
517
|
+
return p / (1e3 / (e || 60));
|
|
518
|
+
},
|
|
519
|
+
wake: function() {
|
|
520
|
+
re && (!z && T() && (R = z = window, te = R.document || {}, B.gsap = X, (R.gsapVersions ||= []).push(X.version), ie(ne || R.GreenSockGlobals || !R.gsap && R || {}), Ft.forEach(It)), d = typeof requestAnimationFrame < "u" && requestAnimationFrame, l && f.sleep(), u = d || function(e) {
|
|
521
|
+
return setTimeout(e, s - f.time * 1e3 + 1 | 0);
|
|
522
|
+
}, Gt = 1, h(2));
|
|
523
|
+
},
|
|
524
|
+
sleep: function() {
|
|
525
|
+
(d ? cancelAnimationFrame : clearTimeout)(l), Gt = 0, u = ce;
|
|
526
|
+
},
|
|
527
|
+
lagSmoothing: function(e, r) {
|
|
528
|
+
t = e || Infinity, n = Math.min(r || 33, t);
|
|
529
|
+
},
|
|
530
|
+
fps: function(e) {
|
|
531
|
+
o = 1e3 / (e || 240), s = f.time * 1e3 + o;
|
|
532
|
+
},
|
|
533
|
+
add: function(e, t, n) {
|
|
534
|
+
var r = t ? function(t, n, a, o) {
|
|
535
|
+
e(t, n, a, o), f.remove(r);
|
|
536
|
+
} : e;
|
|
537
|
+
return f.remove(e), c[n ? "unshift" : "push"](r), qt(), r;
|
|
538
|
+
},
|
|
539
|
+
remove: function(e, t) {
|
|
540
|
+
~(t = c.indexOf(e)) && c.splice(t, 1) && m >= t && m--;
|
|
541
|
+
},
|
|
542
|
+
_listeners: c
|
|
543
|
+
}, f;
|
|
544
|
+
}(), qt = function() {
|
|
545
|
+
return !Gt && Kt.wake();
|
|
546
|
+
}, K = {}, Jt = /^[\d.\-M][\d.\-,\s]/, Yt = /["']/g, Xt = function(e) {
|
|
547
|
+
for (var t = {}, n = e.substr(1, e.length - 3).split(":"), r = n[0], a = 1, o = n.length, s, c, l; a < o; a++) c = n[a], s = a === o - 1 ? c.length : c.lastIndexOf(","), l = c.substr(0, s), t[r] = isNaN(l) ? l.replace(Yt, "").trim() : +l, r = c.substr(s + 1).trim();
|
|
548
|
+
return t;
|
|
549
|
+
}, Zt = function(e) {
|
|
550
|
+
var t = e.indexOf("(") + 1, n = e.indexOf(")"), r = e.indexOf("(", t);
|
|
551
|
+
return e.substring(t, ~r && r < n ? e.indexOf(")", n + 1) : n);
|
|
552
|
+
}, Qt = function(e) {
|
|
553
|
+
var t = (e + "").split("("), n = K[t[0]];
|
|
554
|
+
return n && t.length > 1 && n.config ? n.config.apply(null, ~e.indexOf("{") ? [Xt(t[1])] : Zt(e).split(",").map(ke)) : K._CE && Jt.test(e) ? K._CE("", e) : n;
|
|
555
|
+
}, $t = function(e) {
|
|
556
|
+
return function(t) {
|
|
557
|
+
return 1 - e(1 - t);
|
|
558
|
+
};
|
|
559
|
+
}, en = function(e, t) {
|
|
560
|
+
return e && (b(e) ? e : K[e] || Qt(e)) || t;
|
|
561
|
+
}, tn = function(e, t, n, r) {
|
|
562
|
+
n === void 0 && (n = function(e) {
|
|
563
|
+
return 1 - t(1 - e);
|
|
564
|
+
}), r === void 0 && (r = function(e) {
|
|
565
|
+
return e < .5 ? t(e * 2) / 2 : 1 - t((1 - e) * 2) / 2;
|
|
566
|
+
});
|
|
567
|
+
var a = {
|
|
568
|
+
easeIn: t,
|
|
569
|
+
easeOut: n,
|
|
570
|
+
easeInOut: r
|
|
571
|
+
}, o;
|
|
572
|
+
return V(e, function(e) {
|
|
573
|
+
for (var t in K[e] = B[e] = a, K[o = e.toLowerCase()] = n, a) K[o + (t === "easeIn" ? ".in" : t === "easeOut" ? ".out" : ".inOut")] = K[e + "." + t] = a[t];
|
|
574
|
+
}), a;
|
|
575
|
+
}, nn = function(e) {
|
|
576
|
+
return function(t) {
|
|
577
|
+
return t < .5 ? (1 - e(1 - t * 2)) / 2 : .5 + e((t - .5) * 2) / 2;
|
|
578
|
+
};
|
|
579
|
+
}, rn = function e(t, n, r) {
|
|
580
|
+
var a = n >= 1 ? n : 1, o = (r || (t ? .3 : .45)) / (n < 1 ? n : 1), s = o / f * (Math.asin(1 / a) || 0), c = function(e) {
|
|
581
|
+
return e === 1 ? 1 : a * 2 ** (-10 * e) * _((e - s) * o) + 1;
|
|
582
|
+
}, l = t === "out" ? c : t === "in" ? function(e) {
|
|
583
|
+
return 1 - c(1 - e);
|
|
584
|
+
} : nn(c);
|
|
585
|
+
return o = f / o, l.config = function(n, r) {
|
|
586
|
+
return e(t, n, r);
|
|
587
|
+
}, l;
|
|
588
|
+
}, an = function e(t, n) {
|
|
589
|
+
n === void 0 && (n = 1.70158);
|
|
590
|
+
var r = function(e) {
|
|
591
|
+
return e ? --e * e * ((n + 1) * e + n) + 1 : 0;
|
|
592
|
+
}, a = t === "out" ? r : t === "in" ? function(e) {
|
|
593
|
+
return 1 - r(1 - e);
|
|
594
|
+
} : nn(r);
|
|
595
|
+
return a.config = function(n) {
|
|
596
|
+
return e(t, n);
|
|
597
|
+
}, a;
|
|
598
|
+
};
|
|
599
|
+
V("Linear,Quad,Cubic,Quart,Quint,Strong", function(e, t) {
|
|
600
|
+
var n = t < 5 ? t + 1 : t;
|
|
601
|
+
tn(e + ",Power" + (n - 1), t ? function(e) {
|
|
602
|
+
return e ** +n;
|
|
603
|
+
} : function(e) {
|
|
604
|
+
return e;
|
|
605
|
+
}, function(e) {
|
|
606
|
+
return 1 - (1 - e) ** n;
|
|
607
|
+
}, function(e) {
|
|
608
|
+
return e < .5 ? (e * 2) ** n / 2 : 1 - ((1 - e) * 2) ** n / 2;
|
|
609
|
+
});
|
|
610
|
+
}), K.Linear.easeNone = K.none = K.Linear.easeIn, tn("Elastic", rn("in"), rn("out"), rn()), (function(e, t) {
|
|
611
|
+
var n = 1 / t, r = 2 * n, a = 2.5 * n, o = function(o) {
|
|
612
|
+
return o < n ? e * o * o : o < r ? e * (o - 1.5 / t) ** 2 + .75 : o < a ? e * (o -= 2.25 / t) * o + .9375 : e * (o - 2.625 / t) ** 2 + .984375;
|
|
613
|
+
};
|
|
614
|
+
tn("Bounce", function(e) {
|
|
615
|
+
return 1 - o(1 - e);
|
|
616
|
+
}, o);
|
|
617
|
+
})(7.5625, 2.75), tn("Expo", function(e) {
|
|
618
|
+
return 2 ** (10 * (e - 1)) * e + e * e * e * e * e * e * (1 - e);
|
|
619
|
+
}), tn("Circ", function(e) {
|
|
620
|
+
return -(h(1 - e * e) - 1);
|
|
621
|
+
}), tn("Sine", function(e) {
|
|
622
|
+
return e === 1 ? 1 : -g(e * p) + 1;
|
|
623
|
+
}), tn("Back", an("in"), an("out"), an()), K.SteppedEase = K.steps = B.SteppedEase = { config: function(e, t) {
|
|
624
|
+
e === void 0 && (e = 1);
|
|
625
|
+
var n = 1 / e, r = e + +!t, a = +!!t, o = 1 - d;
|
|
626
|
+
return function(e) {
|
|
627
|
+
return ((r * ut(0, o, e) | 0) + a) * n;
|
|
628
|
+
};
|
|
629
|
+
} }, o.ease = K["quad.out"], V("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(e) {
|
|
630
|
+
return be += e + "," + e + "Params,";
|
|
631
|
+
});
|
|
632
|
+
var on = function(e, t) {
|
|
633
|
+
this.id = m++, e._gsap = this, this.target = e, this.harness = t, this.get = t ? t.get : Ce, this.set = t ? t.getSetter : Tn;
|
|
634
|
+
}, sn = /*#__PURE__*/ function() {
|
|
635
|
+
function e(e) {
|
|
636
|
+
this.vars = e, this._delay = +e.delay || 0, (this._repeat = e.repeat === Infinity ? -2 : e.repeat || 0) && (this._rDelay = e.repeatDelay || 0, this._yoyo = !!e.yoyo || !!e.yoyoEase), this._ts = 1, it(this, +e.duration, 1, 1), this.data = e.data, l && (this._ctx = l, l.data.push(this)), Gt || Kt.wake();
|
|
637
|
+
}
|
|
638
|
+
var t = e.prototype;
|
|
639
|
+
return t.delay = function(e) {
|
|
640
|
+
return e || e === 0 ? (this.parent && this.parent.smoothChildTiming && this.startTime(this._start + e - this._delay), this._delay = e, this) : this._delay;
|
|
641
|
+
}, t.duration = function(e) {
|
|
642
|
+
return arguments.length ? this.totalDuration(this._repeat > 0 ? e + (e + this._rDelay) * this._repeat : e) : this.totalDuration() && this._dur;
|
|
643
|
+
}, t.totalDuration = function(e) {
|
|
644
|
+
return arguments.length ? (this._dirty = 0, it(this, this._repeat < 0 ? e : (e - this._repeat * this._rDelay) / (this._repeat + 1))) : this._tDur;
|
|
645
|
+
}, t.totalTime = function(e, t) {
|
|
646
|
+
if (qt(), !arguments.length) return this._tTime;
|
|
647
|
+
var n = this._dp;
|
|
648
|
+
if (n && n.smoothChildTiming && this._ts) {
|
|
649
|
+
for (Ye(this, e), !n._dp || n.parent || Xe(n, this); n && n.parent;) n.parent._time !== n._start + (n._ts >= 0 ? n._tTime / n._ts : (n.totalDuration() - n._tTime) / -n._ts) && n.totalTime(n._tTime, !0), n = n.parent;
|
|
650
|
+
!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && e < this._tDur || this._ts < 0 && e > 0 || !this._tDur && !e) && Ze(this._dp, this, this._start - this._delay);
|
|
651
|
+
}
|
|
652
|
+
return (this._tTime !== e || !this._dur && !t || this._initted && Math.abs(this._zTime) === d || !this._initted && this._dur && e || !e && !this._initted && (this.add || this._ptLookup)) && (this._ts || (this._pTime = e), Oe(this, e, t)), this;
|
|
653
|
+
}, t.time = function(e, t) {
|
|
654
|
+
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), e + Ge(this)) % (this._dur + this._rDelay) || (e ? this._dur : 0), t) : this._time;
|
|
655
|
+
}, t.totalProgress = function(e, t) {
|
|
656
|
+
return arguments.length ? this.totalTime(this.totalDuration() * e, t) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() >= 0 && this._initted ? 1 : 0;
|
|
657
|
+
}, t.progress = function(e, t) {
|
|
658
|
+
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - e : e) + Ge(this), t) : this.duration() ? Math.min(1, this._time / this._dur) : +(this.rawTime() > 0);
|
|
659
|
+
}, t.iteration = function(e, t) {
|
|
660
|
+
var n = this.duration() + this._rDelay;
|
|
661
|
+
return arguments.length ? this.totalTime(this._time + (e - 1) * n, t) : this._repeat ? Ke(this._tTime, n) + 1 : 1;
|
|
662
|
+
}, t.timeScale = function(e, t) {
|
|
663
|
+
if (!arguments.length) return this._rts === -d ? 0 : this._rts;
|
|
664
|
+
if (this._rts === e) return this;
|
|
665
|
+
var n = this.parent && this._ts ? qe(this.parent._time, this) : this._tTime;
|
|
666
|
+
return this._rts = +e || 0, this._ts = this._ps || e === -d ? 0 : this._rts, this.totalTime(ut(-Math.abs(this._delay), this.totalDuration(), n), t !== !1), Je(this), He(this);
|
|
667
|
+
}, t.paused = function(e) {
|
|
668
|
+
return arguments.length ? (this._ps !== e && (this._ps = e, e ? (this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()), this._ts = this._act = 0) : (qt(), this._ts = this._rts, this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== d && (this._tTime -= d)))), this) : this._ps;
|
|
669
|
+
}, t.startTime = function(e) {
|
|
670
|
+
if (arguments.length) {
|
|
671
|
+
this._start = U(e);
|
|
672
|
+
var t = this.parent || this._dp;
|
|
673
|
+
return t && (t._sort || !this.parent) && Ze(t, this, this._start - this._delay), this;
|
|
674
|
+
}
|
|
675
|
+
return this._start;
|
|
676
|
+
}, t.endTime = function(e) {
|
|
677
|
+
return this._start + (w(e) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1);
|
|
678
|
+
}, t.rawTime = function(e) {
|
|
679
|
+
var t = this.parent || this._dp;
|
|
680
|
+
return t ? e && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : this._ts ? qe(t.rawTime(e), this) : this._tTime : this._tTime;
|
|
681
|
+
}, t.revert = function(e) {
|
|
682
|
+
e === void 0 && (e = de);
|
|
683
|
+
var t = c;
|
|
684
|
+
return c = e, De(this) && (this.timeline && this.timeline.revert(e), this.totalTime(-.01, e.suppressEvents)), this.data !== "nested" && e.kill !== !1 && this.kill(), c = t, this;
|
|
685
|
+
}, t.globalTime = function(e) {
|
|
686
|
+
for (var t = this, n = arguments.length ? e : t.rawTime(); t;) n = t._start + n / (Math.abs(t._ts) || 1), t = t._dp;
|
|
687
|
+
return !this.parent && this._sat ? this._sat.globalTime(e) : n;
|
|
688
|
+
}, t.repeat = function(e) {
|
|
689
|
+
return arguments.length ? (this._repeat = e === Infinity ? -2 : e, at(this)) : this._repeat === -2 ? Infinity : this._repeat;
|
|
690
|
+
}, t.repeatDelay = function(e) {
|
|
691
|
+
if (arguments.length) {
|
|
692
|
+
var t = this._time;
|
|
693
|
+
return this._rDelay = e, at(this), t ? this.time(t) : this;
|
|
694
|
+
}
|
|
695
|
+
return this._rDelay;
|
|
696
|
+
}, t.yoyo = function(e) {
|
|
697
|
+
return arguments.length ? (this._yoyo = e, this) : this._yoyo;
|
|
698
|
+
}, t.seek = function(e, t) {
|
|
699
|
+
return this.totalTime(st(this, e), w(t));
|
|
700
|
+
}, t.restart = function(e, t) {
|
|
701
|
+
return this.play().totalTime(e ? -this._delay : 0, w(t)), this._dur || (this._zTime = -d), this;
|
|
702
|
+
}, t.play = function(e, t) {
|
|
703
|
+
return e != null && this.seek(e, t), this.reversed(!1).paused(!1);
|
|
704
|
+
}, t.reverse = function(e, t) {
|
|
705
|
+
return e != null && this.seek(e || this.totalDuration(), t), this.reversed(!0).paused(!1);
|
|
706
|
+
}, t.pause = function(e, t) {
|
|
707
|
+
return e != null && this.seek(e, t), this.paused(!0);
|
|
708
|
+
}, t.resume = function() {
|
|
709
|
+
return this.paused(!1);
|
|
710
|
+
}, t.reversed = function(e) {
|
|
711
|
+
return arguments.length ? (!!e !== this.reversed() && this.timeScale(-this._rts || (e ? -d : 0)), this) : this._rts < 0;
|
|
712
|
+
}, t.invalidate = function() {
|
|
713
|
+
return this._initted = this._act = 0, this._zTime = -d, this;
|
|
714
|
+
}, t.isActive = function() {
|
|
715
|
+
var e = this.parent || this._dp, t = this._start, n;
|
|
716
|
+
return !!(!e || this._ts && this._initted && e.isActive() && (n = e.rawTime(!0)) >= t && n < this.endTime(!0) - d);
|
|
717
|
+
}, t.eventCallback = function(e, t, n) {
|
|
718
|
+
var r = this.vars;
|
|
719
|
+
return arguments.length > 1 ? (t ? (r[e] = t, n && (r[e + "Params"] = n), e === "onUpdate" && (this._onUpdate = t)) : delete r[e], this) : r[e];
|
|
720
|
+
}, t.then = function(e) {
|
|
721
|
+
var t = this, n = t._prom;
|
|
722
|
+
return new Promise(function(r) {
|
|
723
|
+
var a = b(e) ? e : Ae, o = function() {
|
|
724
|
+
var e = t.then;
|
|
725
|
+
t.then = null, n && n(), b(a) && (a = a(t)) && (a.then || a === t) && (t.then = e), r(a), t.then = e;
|
|
726
|
+
};
|
|
727
|
+
t._initted && t.totalProgress() === 1 && t._ts >= 0 || !t._tTime && t._ts < 0 ? o() : t._prom = o;
|
|
728
|
+
});
|
|
729
|
+
}, t.kill = function() {
|
|
730
|
+
Nt(this);
|
|
731
|
+
}, e;
|
|
732
|
+
}();
|
|
733
|
+
je(sn.prototype, {
|
|
734
|
+
_time: 0,
|
|
735
|
+
_start: 0,
|
|
736
|
+
_end: 0,
|
|
737
|
+
_tTime: 0,
|
|
738
|
+
_tDur: 0,
|
|
739
|
+
_dirty: 0,
|
|
740
|
+
_repeat: 0,
|
|
741
|
+
_yoyo: !1,
|
|
742
|
+
parent: null,
|
|
743
|
+
_initted: !1,
|
|
744
|
+
_rDelay: 0,
|
|
745
|
+
_ts: 1,
|
|
746
|
+
_dp: 0,
|
|
747
|
+
ratio: 0,
|
|
748
|
+
_zTime: -d,
|
|
749
|
+
_prom: 0,
|
|
750
|
+
_ps: !1,
|
|
751
|
+
_rts: 1
|
|
752
|
+
});
|
|
753
|
+
var q = /*#__PURE__*/ function(e) {
|
|
754
|
+
r(t, e);
|
|
755
|
+
function t(t, r) {
|
|
756
|
+
var a;
|
|
757
|
+
return t === void 0 && (t = {}), a = e.call(this, t) || this, a.labels = {}, a.smoothChildTiming = !!t.smoothChildTiming, a.autoRemoveChildren = !!t.autoRemoveChildren, a._sort = w(t.sortChildren), L && Ze(t.parent || L, n(a), r), t.reversed && a.reverse(), t.paused && a.paused(!0), t.scrollTrigger && Qe(n(a), t.scrollTrigger), a;
|
|
758
|
+
}
|
|
759
|
+
var o = t.prototype;
|
|
760
|
+
return o.to = function(e, t, n) {
|
|
761
|
+
return ct(0, arguments, this), this;
|
|
762
|
+
}, o.from = function(e, t, n) {
|
|
763
|
+
return ct(1, arguments, this), this;
|
|
764
|
+
}, o.fromTo = function(e, t, n, r) {
|
|
765
|
+
return ct(2, arguments, this), this;
|
|
766
|
+
}, o.set = function(e, t, n) {
|
|
767
|
+
return t.duration = 0, t.parent = this, Ie(t).repeatDelay || (t.repeat = 0), t.immediateRender = !!t.immediateRender, new J(e, t, st(this, n), 1), this;
|
|
768
|
+
}, o.call = function(e, t, n) {
|
|
769
|
+
return Ze(this, J.delayedCall(0, e, t), n);
|
|
770
|
+
}, o.staggerTo = function(e, t, n, r, a, o, s) {
|
|
771
|
+
return n.duration = t, n.stagger = n.stagger || r, n.onComplete = o, n.onCompleteParams = s, n.parent = this, new J(e, n, st(this, a)), this;
|
|
772
|
+
}, o.staggerFrom = function(e, t, n, r, a, o, s) {
|
|
773
|
+
return n.runBackwards = 1, Ie(n).immediateRender = w(n.immediateRender), this.staggerTo(e, t, n, r, a, o, s);
|
|
774
|
+
}, o.staggerFromTo = function(e, t, n, r, a, o, s, c) {
|
|
775
|
+
return r.startAt = n, Ie(r).immediateRender = w(r.immediateRender), this.staggerTo(e, t, r, a, o, s, c);
|
|
776
|
+
}, o.render = function(e, t, n) {
|
|
777
|
+
var r = this._time, a = this._dirty ? this.totalDuration() : this._tDur, o = this._dur, s = e <= 0 ? 0 : U(e), l = this._zTime < 0 != e < 0 && (this._initted || !o), u, f, p, m, h, g, _, v, b, x, S, C;
|
|
778
|
+
if (this !== L && s > a && e >= 0 && (s = a), s !== this._tTime || n || l) {
|
|
779
|
+
if (r !== this._time && o && (s += this._time - r, e += this._time - r), u = s, b = this._start, v = this._ts, g = !v, l && (o || (r = this._zTime), (e || !t) && (this._zTime = e)), this._repeat) {
|
|
780
|
+
if (S = this._yoyo, h = o + this._rDelay, this._repeat < -1 && e < 0) return this.totalTime(h * 100 + e, t, n);
|
|
781
|
+
if (u = U(s % h), s === a ? (m = this._repeat, u = o) : (x = U(s / h), m = ~~x, m && m === x && (u = o, m--), u > o && (u = o)), x = Ke(this._tTime, h), !r && this._tTime && x !== m && this._tTime - x * h - this._dur <= 0 && (x = m), S && m & 1 && (u = o - u, C = 1), m !== x && !this._lock) {
|
|
782
|
+
var w = S && x & 1, T = w === (S && m & 1);
|
|
783
|
+
if (m < x && (w = !w), r = w ? 0 : s % o ? o : s, this._lock = 1, this.render(r || (C ? 0 : U(m * h)), t, !o)._lock = 0, this._tTime = s, !t && this.parent && Mt(this, "onRepeat"), this.vars.repeatRefresh && !C && (this.invalidate()._lock = 1, x = m), r && r !== this._time || g !== !this._ts || this.vars.onRepeat && !this.parent && !this._act || (o = this._dur, a = this._tDur, T && (this._lock = 2, r = w ? o : -1e-4, this.render(r, !0), this.vars.repeatRefresh && !C && this.invalidate()), this._lock = 0, !this._ts && !g)) return this;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
if (this._hasPause && !this._forcing && this._lock < 2 && (_ = rt(this, U(r), U(u)), _ && (s -= u - (u = _._start))), this._tTime = s, this._time = u, this._act = !!v, this._initted || (this._onUpdate = this.vars.onUpdate, this._initted = 1, this._zTime = e, r = 0), !r && s && o && !t && !x && (Mt(this, "onStart"), this._tTime !== s)) return this;
|
|
787
|
+
if (u >= r && e >= 0) for (f = this._first; f;) {
|
|
788
|
+
if (p = f._next, (f._act || u >= f._start) && f._ts && _ !== f) {
|
|
789
|
+
if (f.parent !== this) return this.render(e, t, n);
|
|
790
|
+
if (f.render(f._ts > 0 ? (u - f._start) * f._ts : (f._dirty ? f.totalDuration() : f._tDur) + (u - f._start) * f._ts, t, n), u !== this._time || !this._ts && !g) {
|
|
791
|
+
_ = 0, p && (s += this._zTime = -d);
|
|
792
|
+
break;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
f = p;
|
|
796
|
+
}
|
|
797
|
+
else {
|
|
798
|
+
f = this._last;
|
|
799
|
+
for (var E = e < 0 ? e : u; f;) {
|
|
800
|
+
if (p = f._prev, (f._act || E <= f._end) && f._ts && _ !== f) {
|
|
801
|
+
if (f.parent !== this) return this.render(e, t, n);
|
|
802
|
+
if (f.render(f._ts > 0 ? (E - f._start) * f._ts : (f._dirty ? f.totalDuration() : f._tDur) + (E - f._start) * f._ts, t, n || c && De(f)), u !== this._time || !this._ts && !g) {
|
|
803
|
+
_ = 0, p && (s += this._zTime = E ? -d : d);
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
f = p;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
if (_ && !t && (this.pause(), _.render(u >= r ? 0 : -d)._zTime = u >= r ? 1 : -1, this._ts)) return this._start = b, Je(this), this.render(e, t, n);
|
|
811
|
+
this._onUpdate && !t && Mt(this, "onUpdate", !0), (s === a && this._tTime >= this.totalDuration() || !s && r) && (b === this._start || Math.abs(v) !== Math.abs(this._ts)) && (this._lock || ((e || !o) && (s === a && this._ts > 0 || !s && this._ts < 0) && Be(this, 1), !t && !(e < 0 && !r) && (s || r || !a) && (Mt(this, s === a && e >= 0 ? "onComplete" : "onReverseComplete", !0), this._prom && !(s < a && this.timeScale() > 0) && this._prom())));
|
|
812
|
+
}
|
|
813
|
+
return this;
|
|
814
|
+
}, o.add = function(e, t) {
|
|
815
|
+
var n = this;
|
|
816
|
+
if (x(t) || (t = st(this, t, e)), !(e instanceof sn)) {
|
|
817
|
+
if (O(e)) return e.forEach(function(e) {
|
|
818
|
+
return n.add(e, t);
|
|
819
|
+
}), this;
|
|
820
|
+
if (v(e)) return this.addLabel(e, t);
|
|
821
|
+
if (b(e)) e = J.delayedCall(0, e);
|
|
822
|
+
else return this;
|
|
823
|
+
}
|
|
824
|
+
return this === e ? this : Ze(this, e, t);
|
|
825
|
+
}, o.getChildren = function(e, t, n, r) {
|
|
826
|
+
e === void 0 && (e = !0), t === void 0 && (t = !0), n === void 0 && (n = !0), r === void 0 && (r = -u);
|
|
827
|
+
for (var a = [], o = this._first; o;) o._start >= r && (o instanceof J ? t && a.push(o) : (n && a.push(o), e && a.push.apply(a, o.getChildren(!0, t, n)))), o = o._next;
|
|
828
|
+
return a;
|
|
829
|
+
}, o.getById = function(e) {
|
|
830
|
+
for (var t = this.getChildren(1, 1, 1), n = t.length; n--;) if (t[n].vars.id === e) return t[n];
|
|
831
|
+
}, o.remove = function(e) {
|
|
832
|
+
return v(e) ? this.removeLabel(e) : b(e) ? this.killTweensOf(e) : (e.parent === this && ze(this, e), e === this._recent && (this._recent = this._last), Ve(this));
|
|
833
|
+
}, o.totalTime = function(t, n) {
|
|
834
|
+
return arguments.length ? (this._forcing = 1, !this._dp && this._ts && (this._start = U(Kt.time - (this._ts > 0 ? t / this._ts : (this.totalDuration() - t) / -this._ts))), e.prototype.totalTime.call(this, t, n), this._forcing = 0, this) : this._tTime;
|
|
835
|
+
}, o.addLabel = function(e, t) {
|
|
836
|
+
return this.labels[e] = st(this, t), this;
|
|
837
|
+
}, o.removeLabel = function(e) {
|
|
838
|
+
return delete this.labels[e], this;
|
|
839
|
+
}, o.addPause = function(e, t, n) {
|
|
840
|
+
var r = J.delayedCall(0, t || ce, n);
|
|
841
|
+
return r.data = "isPause", this._hasPause = 1, Ze(this, r, st(this, e));
|
|
842
|
+
}, o.removePause = function(e) {
|
|
843
|
+
var t = this._first;
|
|
844
|
+
for (e = st(this, e); t;) t._start === e && t.data === "isPause" && Be(t), t = t._next;
|
|
845
|
+
}, o.killTweensOf = function(e, t, n) {
|
|
846
|
+
for (var r = this.getTweensOf(e, n), a = r.length; a--;) fn !== r[a] && r[a].kill(e, t);
|
|
847
|
+
return this;
|
|
848
|
+
}, o.getTweensOf = function(e, t) {
|
|
849
|
+
for (var n = [], r = ht(e), a = this._first, o = x(t), s; a;) a instanceof J ? Te(a._targets, r) && (o ? (!fn || a._initted && a._ts) && a.globalTime(0) <= t && a.globalTime(a.totalDuration()) > t : !t || a.isActive()) && n.push(a) : (s = a.getTweensOf(r, t)).length && n.push.apply(n, s), a = a._next;
|
|
850
|
+
return n;
|
|
851
|
+
}, o.tweenTo = function(e, t) {
|
|
852
|
+
t ||= {};
|
|
853
|
+
var n = this, r = st(n, e), a = t, o = a.startAt, s = a.onStart, c = a.onStartParams, l = a.immediateRender, u, f = J.to(n, je({
|
|
854
|
+
ease: t.ease || "none",
|
|
855
|
+
lazy: !1,
|
|
856
|
+
immediateRender: !1,
|
|
857
|
+
time: r,
|
|
858
|
+
overwrite: "auto",
|
|
859
|
+
duration: t.duration || Math.abs((r - (o && "time" in o ? o.time : n._time)) / n.timeScale()) || d,
|
|
860
|
+
onStart: function() {
|
|
861
|
+
if (n.pause(), !u) {
|
|
862
|
+
var e = t.duration || Math.abs((r - (o && "time" in o ? o.time : n._time)) / n.timeScale());
|
|
863
|
+
f._dur !== e && it(f, e, 0, 1).render(f._time, !0, !0), u = 1;
|
|
864
|
+
}
|
|
865
|
+
s && s.apply(f, c || []);
|
|
866
|
+
}
|
|
867
|
+
}, t));
|
|
868
|
+
return l ? f.render(0) : f;
|
|
869
|
+
}, o.tweenFromTo = function(e, t, n) {
|
|
870
|
+
return this.tweenTo(t, je({ startAt: { time: st(this, e) } }, n));
|
|
871
|
+
}, o.recent = function() {
|
|
872
|
+
return this._recent;
|
|
873
|
+
}, o.nextLabel = function(e) {
|
|
874
|
+
return e === void 0 && (e = this._time), jt(this, st(this, e));
|
|
875
|
+
}, o.previousLabel = function(e) {
|
|
876
|
+
return e === void 0 && (e = this._time), jt(this, st(this, e), 1);
|
|
877
|
+
}, o.currentLabel = function(e) {
|
|
878
|
+
return arguments.length ? this.seek(e, !0) : this.previousLabel(this._time + d);
|
|
879
|
+
}, o.shiftChildren = function(e, t, n) {
|
|
880
|
+
n === void 0 && (n = 0);
|
|
881
|
+
var r = this._first, a = this.labels, o;
|
|
882
|
+
for (e = U(e); r;) r._start >= n && (r._start += e, r._end += e), r = r._next;
|
|
883
|
+
if (t) for (o in a) a[o] >= n && (a[o] += e);
|
|
884
|
+
return Ve(this);
|
|
885
|
+
}, o.invalidate = function(t) {
|
|
886
|
+
var n = this._first;
|
|
887
|
+
for (this._lock = 0; n;) n.invalidate(t), n = n._next;
|
|
888
|
+
return e.prototype.invalidate.call(this, t);
|
|
889
|
+
}, o.clear = function(e) {
|
|
890
|
+
e === void 0 && (e = !0);
|
|
891
|
+
for (var t = this._first, n; t;) n = t._next, this.remove(t), t = n;
|
|
892
|
+
return this._dp && (this._time = this._tTime = this._pTime = 0), e && (this.labels = {}), Ve(this);
|
|
893
|
+
}, o.totalDuration = function(e) {
|
|
894
|
+
var t = 0, n = this, r = n._last, a = u, o, s, c;
|
|
895
|
+
if (arguments.length) return n.timeScale((n._repeat < 0 ? n.duration() : n.totalDuration()) / (n.reversed() ? -e : e));
|
|
896
|
+
if (n._dirty) {
|
|
897
|
+
for (c = n.parent; r;) o = r._prev, r._dirty && r.totalDuration(), s = r._start, s > a && n._sort && r._ts && !n._lock ? (n._lock = 1, Ze(n, r, s - r._delay, 1)._lock = 0) : a = s, s < 0 && r._ts && (t -= s, (!c && !n._dp || c && c.smoothChildTiming) && (n._start += U(s / n._ts), n._time -= s, n._tTime -= s), n.shiftChildren(-s, !1, -Infinity), a = 0), r._end > t && r._ts && (t = r._end), r = o;
|
|
898
|
+
it(n, n === L && n._time > t ? n._time : t, 1, 1), n._dirty = 0;
|
|
899
|
+
}
|
|
900
|
+
return n._tDur;
|
|
901
|
+
}, t.updateRoot = function(e) {
|
|
902
|
+
if (L._ts && (Oe(L, qe(e, L)), he = Kt.frame), Kt.frame >= ve) {
|
|
903
|
+
ve += a.autoSleep || 120;
|
|
904
|
+
var t = L._first;
|
|
905
|
+
if ((!t || !t._ts) && a.autoSleep && Kt._listeners.length < 2) {
|
|
906
|
+
for (; t && !t._ts;) t = t._next;
|
|
907
|
+
t || Kt.sleep();
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}, t;
|
|
911
|
+
}(sn);
|
|
912
|
+
je(q.prototype, {
|
|
913
|
+
_lock: 0,
|
|
914
|
+
_hasPause: 0,
|
|
915
|
+
_forcing: 0
|
|
916
|
+
});
|
|
917
|
+
var cn = function(e, t, n, r, a, o, s) {
|
|
918
|
+
var c = new Y(this._pt, e, t, 0, 1, On, null, a), l = 0, u = 0, d, f, p, m, h, g, _, v;
|
|
919
|
+
for (c.b = n, c.e = r, n += "", r += "", (_ = ~r.indexOf("random(")) && (r = Ot(r)), o && (v = [n, r], o(v, e, t), n = v[0], r = v[1]), f = n.match(P) || []; d = P.exec(r);) m = d[0], h = r.substring(l, d.index), p ? p = (p + 1) % 5 : h.substr(-5) === "rgba(" && (p = 1), m !== f[u++] && (g = parseFloat(f[u - 1]) || 0, c._pt = {
|
|
920
|
+
_next: c._pt,
|
|
921
|
+
p: h || u === 1 ? h : ",",
|
|
922
|
+
s: g,
|
|
923
|
+
c: m.charAt(1) === "=" ? we(g, m) - g : parseFloat(m) - g,
|
|
924
|
+
m: p && p < 4 ? Math.round : 0
|
|
925
|
+
}, l = P.lastIndex);
|
|
926
|
+
return c.c = l < r.length ? r.substring(l, r.length) : "", c.fp = s, (F.test(r) || _) && (c.e = 0), this._pt = c, c;
|
|
927
|
+
}, ln = function(e, t, n, r, o, s, c, l, u, d) {
|
|
928
|
+
b(r) && (r = r(o || 0, e, s));
|
|
929
|
+
var f = e[t], p = n === "get" ? b(f) ? u ? e[t.indexOf("set") || !b(e["get" + t.substr(3)]) ? t : "get" + t.substr(3)](u) : e[t]() : f : n, m = b(f) ? u ? Cn : Sn : xn, h;
|
|
930
|
+
if (v(r) && (~r.indexOf("random(") && (r = Ot(r)), r.charAt(1) === "=" && (h = we(p, r) + (W(p) || 0), (h || h === 0) && (r = h))), !d || p !== r || pn) return !isNaN(p * r) && r !== "" ? (h = new Y(this._pt, e, t, +p || 0, r - (p || 0), typeof f == "boolean" ? Dn : En, 0, m), u && (h.fp = u), c && h.modifier(c, this, e), this._pt = h) : (!f && !(t in e) && ae(t, r), cn.call(this, e, t, p, r, m, l || a.stringFilter, u));
|
|
931
|
+
}, un = function(e, t, n, r, a) {
|
|
932
|
+
if (b(e) && (e = vn(e, a, t, n, r)), !C(e) || e.style && e.nodeType || O(e) || D(e)) return v(e) ? vn(e, a, t, n, r) : e;
|
|
933
|
+
var o = {}, s;
|
|
934
|
+
for (s in e) o[s] = vn(e[s], a, t, n, r);
|
|
935
|
+
return o;
|
|
936
|
+
}, dn = function(e, t, n, r, a, o) {
|
|
937
|
+
var s, c, l, u;
|
|
938
|
+
if (ge[e] && (s = new ge[e]()).init(a, s.rawVars ? t[e] : un(t[e], r, a, o, n), n, r, o) !== !1 && (n._pt = c = new Y(n._pt, a, e, 0, 1, s.render, s, 0, s.priority), n !== Pt)) for (l = n._ptLookup[n._targets.indexOf(a)], u = s._props.length; u--;) l[s._props[u]] = c;
|
|
939
|
+
return s;
|
|
940
|
+
}, fn, pn, mn = function e(t, n, r) {
|
|
941
|
+
var a = t.vars, l = a.ease, f = a.startAt, p = a.immediateRender, m = a.lazy, h = a.onUpdate, g = a.runBackwards, _ = a.yoyoEase, v = a.keyframes, b = a.autoRevert, x = t._dur, S = t._startAt, C = t._targets, T = t.parent, E = T && T.data === "nested" ? T.vars.targets : C, D = t._overwrite === "auto" && !s, O = t.timeline, k = a.easeReverse || _, A, j, M, N, P, F, I, ee, R, z, te, B, ne;
|
|
942
|
+
if (O && (!v || !l) && (l = "none"), t._ease = en(l, o.ease), t._rEase = k && (en(k) || t._ease), t._from = !O && !!a.runBackwards, t._from && (t.ratio = 1), !O || v && !a.stagger) {
|
|
943
|
+
if (ee = C[0] ? Se(C[0]).harness : 0, B = ee && a[ee.prop], A = Fe(a, fe), S && (S._zTime < 0 && S.progress(1), n < 0 && g && p && !b ? S.render(-1, !0) : S.revert(g && x ? ue : le), S._lazy = 0), f) {
|
|
944
|
+
if (Be(t._startAt = J.set(C, je({
|
|
945
|
+
data: "isStart",
|
|
946
|
+
overwrite: !1,
|
|
947
|
+
parent: T,
|
|
948
|
+
immediateRender: !0,
|
|
949
|
+
lazy: !S && w(m),
|
|
950
|
+
startAt: null,
|
|
951
|
+
delay: 0,
|
|
952
|
+
onUpdate: h && function() {
|
|
953
|
+
return Mt(t, "onUpdate");
|
|
954
|
+
},
|
|
955
|
+
stagger: 0
|
|
956
|
+
}, f))), t._startAt._dp = 0, t._startAt._sat = t, n < 0 && (c || !p && !b) && t._startAt.revert(ue), p && x && n <= 0 && r <= 0) {
|
|
957
|
+
n && (t._zTime = n);
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
} else if (g && x && !S) {
|
|
961
|
+
if (n && (p = !1), M = je({
|
|
962
|
+
overwrite: !1,
|
|
963
|
+
data: "isFromStart",
|
|
964
|
+
lazy: p && !S && w(m),
|
|
965
|
+
immediateRender: p,
|
|
966
|
+
stagger: 0,
|
|
967
|
+
parent: T
|
|
968
|
+
}, A), B && (M[ee.prop] = B), Be(t._startAt = J.set(C, M)), t._startAt._dp = 0, t._startAt._sat = t, n < 0 && (c ? t._startAt.revert(ue) : t._startAt.render(-1, !0)), t._zTime = n, !p) e(t._startAt, d, d);
|
|
969
|
+
else if (!n) return;
|
|
970
|
+
}
|
|
971
|
+
for (t._pt = t._ptCache = 0, m = x && w(m) || m && !x, j = 0; j < C.length; j++) {
|
|
972
|
+
if (P = C[j], I = P._gsap || xe(C)[j]._gsap, t._ptLookup[j] = z = {}, me[I.id] && pe.length && Ee(), te = E === C ? j : E.indexOf(P), ee && (R = new ee()).init(P, B || A, t, te, E) !== !1 && (t._pt = N = new Y(t._pt, P, R.name, 0, 1, R.render, R, 0, R.priority), R._props.forEach(function(e) {
|
|
973
|
+
z[e] = N;
|
|
974
|
+
}), R.priority && (F = 1)), !ee || B) for (M in A) ge[M] && (R = dn(M, A, t, te, P, E)) ? R.priority && (F = 1) : z[M] = N = ln.call(t, P, M, "get", A[M], te, E, 0, a.stringFilter);
|
|
975
|
+
t._op && t._op[j] && t.kill(P, t._op[j]), D && t._pt && (fn = t, L.killTweensOf(P, z, t.globalTime(n)), ne = !t.parent, fn = 0), t._pt && m && (me[I.id] = 1);
|
|
976
|
+
}
|
|
977
|
+
F && Nn(t), t._onInit && t._onInit(t);
|
|
978
|
+
}
|
|
979
|
+
t._onUpdate = h, t._initted = (!t._op || t._pt) && !ne, v && n <= 0 && O.render(u, !0, !0);
|
|
980
|
+
}, hn = function(e, t, n, r, a, o, s, c) {
|
|
981
|
+
var l = (e._pt && e._ptCache || (e._ptCache = {}))[t], u, d, f, p;
|
|
982
|
+
if (!l) for (l = e._ptCache[t] = [], f = e._ptLookup, p = e._targets.length; p--;) {
|
|
983
|
+
if (u = f[p][t], u && u.d && u.d._pt) for (u = u.d._pt; u && u.p !== t && u.fp !== t;) u = u._next;
|
|
984
|
+
if (!u) return pn = 1, e.vars[t] = "+=0", mn(e, s), pn = 0, c ? oe(t + " not eligible for reset. Try splitting into individual properties") : 1;
|
|
985
|
+
l.push(u);
|
|
986
|
+
}
|
|
987
|
+
for (p = l.length; p--;) d = l[p], u = d._pt || d, u.s = (r || r === 0) && !a ? r : u.s + (r || 0) + o * u.c, u.c = n - u.s, d.e &&= H(n) + W(d.e), d.b &&= u.s + W(d.b);
|
|
988
|
+
}, gn = function(e, t) {
|
|
989
|
+
var n = e[0] ? Se(e[0]).harness : 0, r = n && n.aliases, a, o, s, c;
|
|
990
|
+
if (!r) return t;
|
|
991
|
+
for (o in a = Ne({}, t), r) if (o in a) for (c = r[o].split(","), s = c.length; s--;) a[c[s]] = a[o];
|
|
992
|
+
return a;
|
|
993
|
+
}, _n = function(e, t, n, r) {
|
|
994
|
+
var a = t.ease || r || "power1.inOut", o, s;
|
|
995
|
+
if (O(t)) s = n[e] || (n[e] = []), t.forEach(function(e, n) {
|
|
996
|
+
return s.push({
|
|
997
|
+
t: n / (t.length - 1) * 100,
|
|
998
|
+
v: e,
|
|
999
|
+
e: a
|
|
1000
|
+
});
|
|
1001
|
+
});
|
|
1002
|
+
else for (o in t) s = n[o] || (n[o] = []), o === "ease" || s.push({
|
|
1003
|
+
t: parseFloat(e),
|
|
1004
|
+
v: t[o],
|
|
1005
|
+
e: a
|
|
1006
|
+
});
|
|
1007
|
+
}, vn = function(e, t, n, r, a) {
|
|
1008
|
+
return b(e) ? e.call(t, n, r, a) : v(e) && ~e.indexOf("random(") ? Ot(e) : e;
|
|
1009
|
+
}, yn = be + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert", bn = {};
|
|
1010
|
+
V(yn + ",id,stagger,delay,duration,paused,scrollTrigger", function(e) {
|
|
1011
|
+
return bn[e] = 1;
|
|
1012
|
+
});
|
|
1013
|
+
var J = /*#__PURE__*/ function(e) {
|
|
1014
|
+
r(t, e);
|
|
1015
|
+
function t(t, r, o, c) {
|
|
1016
|
+
var l;
|
|
1017
|
+
typeof r == "number" && (o.duration = r, r = o, o = null), l = e.call(this, c ? r : Ie(r)) || this;
|
|
1018
|
+
var u = l.vars, f = u.duration, p = u.delay, m = u.immediateRender, h = u.stagger, g = u.overwrite, _ = u.keyframes, v = u.defaults, b = u.scrollTrigger, S = r.parent || L, T = (O(t) || D(t) ? x(t[0]) : "length" in r) ? [t] : ht(t), k, A, j, M, N, P, F, I;
|
|
1019
|
+
if (l._targets = T.length ? xe(T) : oe("GSAP target " + t + " not found. https://gsap.com", !a.nullTargetWarn) || [], l._ptLookup = [], l._overwrite = g, _ || h || E(f) || E(p)) {
|
|
1020
|
+
r = l.vars;
|
|
1021
|
+
var ee = r.easeReverse || r.yoyoEase;
|
|
1022
|
+
if (k = l.timeline = new q({
|
|
1023
|
+
data: "nested",
|
|
1024
|
+
defaults: v || {},
|
|
1025
|
+
targets: S && S.data === "nested" ? S.vars.targets : T
|
|
1026
|
+
}), k.kill(), k.parent = k._dp = n(l), k._start = 0, h || E(f) || E(p)) {
|
|
1027
|
+
if (M = T.length, F = h && vt(h), C(h)) for (N in h) ~yn.indexOf(N) && (I ||= {}, I[N] = h[N]);
|
|
1028
|
+
for (A = 0; A < M; A++) j = Fe(r, bn), j.stagger = 0, ee && (j.easeReverse = ee), I && Ne(j, I), P = T[A], j.duration = +vn(f, n(l), A, P, T), j.delay = (+vn(p, n(l), A, P, T) || 0) - l._delay, !h && M === 1 && j.delay && (l._delay = p = j.delay, l._start += p, j.delay = 0), k.to(P, j, F ? F(A, P, T) : 0), k._ease = K.none;
|
|
1029
|
+
k.duration() ? f = p = 0 : l.timeline = 0;
|
|
1030
|
+
} else if (_) {
|
|
1031
|
+
Ie(je(k.vars.defaults, { ease: "none" })), k._ease = en(_.ease || r.ease || "none");
|
|
1032
|
+
var R = 0, z, te, B;
|
|
1033
|
+
if (O(_)) _.forEach(function(e) {
|
|
1034
|
+
return k.to(T, e, ">");
|
|
1035
|
+
}), k.duration();
|
|
1036
|
+
else {
|
|
1037
|
+
for (N in j = {}, _) N === "ease" || N === "easeEach" || _n(N, _[N], j, _.easeEach);
|
|
1038
|
+
for (N in j) for (z = j[N].sort(function(e, t) {
|
|
1039
|
+
return e.t - t.t;
|
|
1040
|
+
}), R = 0, A = 0; A < z.length; A++) te = z[A], B = {
|
|
1041
|
+
ease: te.e,
|
|
1042
|
+
duration: (te.t - (A ? z[A - 1].t : 0)) / 100 * f
|
|
1043
|
+
}, B[N] = te.v, k.to(T, B, R), R += B.duration;
|
|
1044
|
+
k.duration() < f && k.to({}, { duration: f - k.duration() });
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
f || l.duration(f = k.duration());
|
|
1048
|
+
} else l.timeline = 0;
|
|
1049
|
+
return g === !0 && !s && (fn = n(l), L.killTweensOf(T), fn = 0), Ze(S, n(l), o), r.reversed && l.reverse(), r.paused && l.paused(!0), (m || !f && !_ && l._start === U(S._time) && w(m) && We(n(l)) && S.data !== "nested") && (l._tTime = -d, l.render(Math.max(0, -p) || 0)), b && Qe(n(l), b), l;
|
|
1050
|
+
}
|
|
1051
|
+
var o = t.prototype;
|
|
1052
|
+
return o.render = function(e, t, n) {
|
|
1053
|
+
var r = this._time, a = this._tDur, o = this._dur, s = e < 0, c = e > a - d && !s ? a : e < d ? 0 : e, l, u, f, p, m, h, g, _;
|
|
1054
|
+
if (!o) nt(this, e, t, n);
|
|
1055
|
+
else if (c !== this._tTime || !e || n || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== s || this._lazy) {
|
|
1056
|
+
if (l = c, _ = this.timeline, this._repeat) {
|
|
1057
|
+
if (p = o + this._rDelay, this._repeat < -1 && s) return this.totalTime(p * 100 + e, t, n);
|
|
1058
|
+
if (l = U(c % p), c === a ? (f = this._repeat, l = o) : (m = U(c / p), f = ~~m, f && f === m ? (l = o, f--) : l > o && (l = o)), h = this._yoyo && f & 1, h && (l = o - l), m = Ke(this._tTime, p), l === r && !n && this._initted && f === m) return this._tTime = c, this;
|
|
1059
|
+
f !== m && this.vars.repeatRefresh && !h && !this._lock && l !== p && this._initted && (this._lock = n = 1, this.render(U(p * f), !0).invalidate()._lock = 0);
|
|
1060
|
+
}
|
|
1061
|
+
if (!this._initted) {
|
|
1062
|
+
if ($e(this, s ? e : l, n, t, c)) return this._tTime = 0, this;
|
|
1063
|
+
if (r !== this._time && !(n && this.vars.repeatRefresh && f !== m)) return this;
|
|
1064
|
+
if (o !== this._dur) return this.render(e, t, n);
|
|
1065
|
+
}
|
|
1066
|
+
if (this._rEase) {
|
|
1067
|
+
var v = l < r;
|
|
1068
|
+
if (v !== this._inv) {
|
|
1069
|
+
var b = v ? r : o - r;
|
|
1070
|
+
this._inv = v, this._from && (this.ratio = 1 - this.ratio), this._invRatio = this.ratio, this._invTime = r, this._invRecip = b ? (v ? -1 : 1) / b : 0, this._invScale = v ? -this.ratio : 1 - this.ratio, this._invEase = v ? this._rEase : this._ease;
|
|
1071
|
+
}
|
|
1072
|
+
this.ratio = g = this._invRatio + this._invScale * this._invEase((l - this._invTime) * this._invRecip);
|
|
1073
|
+
} else this.ratio = g = this._ease(l / o);
|
|
1074
|
+
if (this._from && (this.ratio = g = 1 - g), this._tTime = c, this._time = l, !this._act && this._ts && (this._act = 1, this._lazy = 0), !r && c && !t && !m && (Mt(this, "onStart"), this._tTime !== c)) return this;
|
|
1075
|
+
for (u = this._pt; u;) u.r(g, u.d), u = u._next;
|
|
1076
|
+
_ && _.render(e < 0 ? e : _._dur * _._ease(l / this._dur), t, n) || this._startAt && (this._zTime = e), this._onUpdate && !t && (s && Ue(this, e, t, n), Mt(this, "onUpdate")), this._repeat && f !== m && this.vars.onRepeat && !t && this.parent && Mt(this, "onRepeat"), (c === this._tDur || !c) && this._tTime === c && (s && !this._onUpdate && Ue(this, e, !0, !0), (e || !o) && (c === this._tDur && this._ts > 0 || !c && this._ts < 0) && Be(this, 1), !t && !(s && !r) && (c || r || h) && (Mt(this, c === a ? "onComplete" : "onReverseComplete", !0), this._prom && !(c < a && this.timeScale() > 0) && this._prom()));
|
|
1077
|
+
}
|
|
1078
|
+
return this;
|
|
1079
|
+
}, o.targets = function() {
|
|
1080
|
+
return this._targets;
|
|
1081
|
+
}, o.invalidate = function(t) {
|
|
1082
|
+
return (!t || !this.vars.runBackwards) && (this._startAt = 0), this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0, this._ptLookup = [], this.timeline && this.timeline.invalidate(t), e.prototype.invalidate.call(this, t);
|
|
1083
|
+
}, o.resetTo = function(e, t, n, r, a) {
|
|
1084
|
+
Gt || Kt.wake(), this._ts || this.play();
|
|
1085
|
+
var o = Math.min(this._dur, (this._dp._time - this._start) * this._ts), s;
|
|
1086
|
+
return this._initted || mn(this, o), s = this._ease(o / this._dur), hn(this, e, t, n, r, s, o, a) ? this.resetTo(e, t, n, r, 1) : (Ye(this, 0), this.parent || Re(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0), this.render(0));
|
|
1087
|
+
}, o.kill = function(e, t) {
|
|
1088
|
+
if (t === void 0 && (t = "all"), !e && (!t || t === "all")) return this._lazy = this._pt = 0, this.parent ? Nt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!c), this;
|
|
1089
|
+
if (this.timeline) {
|
|
1090
|
+
var n = this.timeline.totalDuration();
|
|
1091
|
+
return this.timeline.killTweensOf(e, t, fn && fn.vars.overwrite !== !0)._first || Nt(this), this.parent && n !== this.timeline.totalDuration() && it(this, this._dur * this.timeline._tDur / n, 0, 1), this;
|
|
1092
|
+
}
|
|
1093
|
+
var r = this._targets, a = e ? ht(e) : r, o = this._ptLookup, s = this._pt, l, u, d, f, p, m, h;
|
|
1094
|
+
if ((!t || t === "all") && Le(r, a)) return t === "all" && (this._pt = 0), Nt(this);
|
|
1095
|
+
for (l = this._op = this._op || [], t !== "all" && (v(t) && (p = {}, V(t, function(e) {
|
|
1096
|
+
return p[e] = 1;
|
|
1097
|
+
}), t = p), t = gn(r, t)), h = r.length; h--;) if (~a.indexOf(r[h])) for (p in u = o[h], t === "all" ? (l[h] = t, f = u, d = {}) : (d = l[h] = l[h] || {}, f = t), f) m = u && u[p], m && ((!("kill" in m.d) || m.d.kill(p) === !0) && ze(this, m, "_pt"), delete u[p]), d !== "all" && (d[p] = 1);
|
|
1098
|
+
return this._initted && !this._pt && s && Nt(this), this;
|
|
1099
|
+
}, t.to = function(e, n) {
|
|
1100
|
+
return new t(e, n, arguments[2]);
|
|
1101
|
+
}, t.from = function(e, t) {
|
|
1102
|
+
return ct(1, arguments);
|
|
1103
|
+
}, t.delayedCall = function(e, n, r, a) {
|
|
1104
|
+
return new t(n, 0, {
|
|
1105
|
+
immediateRender: !1,
|
|
1106
|
+
lazy: !1,
|
|
1107
|
+
overwrite: !1,
|
|
1108
|
+
delay: e,
|
|
1109
|
+
onComplete: n,
|
|
1110
|
+
onReverseComplete: n,
|
|
1111
|
+
onCompleteParams: r,
|
|
1112
|
+
onReverseCompleteParams: r,
|
|
1113
|
+
callbackScope: a
|
|
1114
|
+
});
|
|
1115
|
+
}, t.fromTo = function(e, t, n) {
|
|
1116
|
+
return ct(2, arguments);
|
|
1117
|
+
}, t.set = function(e, n) {
|
|
1118
|
+
return n.duration = 0, n.repeatDelay || (n.repeat = 0), new t(e, n);
|
|
1119
|
+
}, t.killTweensOf = function(e, t, n) {
|
|
1120
|
+
return L.killTweensOf(e, t, n);
|
|
1121
|
+
}, t;
|
|
1122
|
+
}(sn);
|
|
1123
|
+
je(J.prototype, {
|
|
1124
|
+
_targets: [],
|
|
1125
|
+
_lazy: 0,
|
|
1126
|
+
_startAt: 0,
|
|
1127
|
+
_op: 0,
|
|
1128
|
+
_onInit: 0
|
|
1129
|
+
}), V("staggerTo,staggerFrom,staggerFromTo", function(e) {
|
|
1130
|
+
J[e] = function() {
|
|
1131
|
+
var t = new q(), n = ft.call(arguments, 0);
|
|
1132
|
+
return n.splice(e === "staggerFromTo" ? 5 : 4, 0, 0), t[e].apply(t, n);
|
|
1133
|
+
};
|
|
1134
|
+
});
|
|
1135
|
+
var xn = function(e, t, n) {
|
|
1136
|
+
return e[t] = n;
|
|
1137
|
+
}, Sn = function(e, t, n) {
|
|
1138
|
+
return e[t](n);
|
|
1139
|
+
}, Cn = function(e, t, n, r) {
|
|
1140
|
+
return e[t](r.fp, n);
|
|
1141
|
+
}, wn = function(e, t, n) {
|
|
1142
|
+
return e.setAttribute(t, n);
|
|
1143
|
+
}, Tn = function(e, t) {
|
|
1144
|
+
return b(e[t]) ? Sn : S(e[t]) && e.setAttribute ? wn : xn;
|
|
1145
|
+
}, En = function(e, t) {
|
|
1146
|
+
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e6) / 1e6, t);
|
|
1147
|
+
}, Dn = function(e, t) {
|
|
1148
|
+
return t.set(t.t, t.p, !!(t.s + t.c * e), t);
|
|
1149
|
+
}, On = function(e, t) {
|
|
1150
|
+
var n = t._pt, r = "";
|
|
1151
|
+
if (!e && t.b) r = t.b;
|
|
1152
|
+
else if (e === 1 && t.e) r = t.e;
|
|
1153
|
+
else {
|
|
1154
|
+
for (; n;) r = n.p + (n.m ? n.m(n.s + n.c * e) : Math.round((n.s + n.c * e) * 1e4) / 1e4) + r, n = n._next;
|
|
1155
|
+
r += t.c;
|
|
1156
|
+
}
|
|
1157
|
+
t.set(t.t, t.p, r, t);
|
|
1158
|
+
}, kn = function(e, t) {
|
|
1159
|
+
for (var n = t._pt; n;) n.r(e, n.d), n = n._next;
|
|
1160
|
+
}, An = function(e, t, n, r) {
|
|
1161
|
+
for (var a = this._pt, o; a;) o = a._next, a.p === r && a.modifier(e, t, n), a = o;
|
|
1162
|
+
}, jn = function(e) {
|
|
1163
|
+
for (var t = this._pt, n, r; t;) r = t._next, t.p === e && !t.op || t.op === e ? ze(this, t, "_pt") : t.dep || (n = 1), t = r;
|
|
1164
|
+
return !n;
|
|
1165
|
+
}, Mn = function(e, t, n, r) {
|
|
1166
|
+
r.mSet(e, t, r.m.call(r.tween, n, r.mt), r);
|
|
1167
|
+
}, Nn = function(e) {
|
|
1168
|
+
for (var t = e._pt, n, r, a, o; t;) {
|
|
1169
|
+
for (n = t._next, r = a; r && r.pr > t.pr;) r = r._next;
|
|
1170
|
+
(t._prev = r ? r._prev : o) ? t._prev._next = t : a = t, (t._next = r) ? r._prev = t : o = t, t = n;
|
|
1171
|
+
}
|
|
1172
|
+
e._pt = a;
|
|
1173
|
+
}, Y = /*#__PURE__*/ function() {
|
|
1174
|
+
function e(e, t, n, r, a, o, s, c, l) {
|
|
1175
|
+
this.t = t, this.s = r, this.c = a, this.p = n, this.r = o || En, this.d = s || this, this.set = c || xn, this.pr = l || 0, this._next = e, e && (e._prev = this);
|
|
1176
|
+
}
|
|
1177
|
+
var t = e.prototype;
|
|
1178
|
+
return t.modifier = function(e, t, n) {
|
|
1179
|
+
this.mSet = this.mSet || this.set, this.set = Mn, this.m = e, this.mt = n, this.tween = t;
|
|
1180
|
+
}, e;
|
|
1181
|
+
}();
|
|
1182
|
+
V(be + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse", function(e) {
|
|
1183
|
+
return fe[e] = 1;
|
|
1184
|
+
}), B.TweenMax = B.TweenLite = J, B.TimelineLite = B.TimelineMax = q, L = new q({
|
|
1185
|
+
sortChildren: !1,
|
|
1186
|
+
defaults: o,
|
|
1187
|
+
autoRemoveChildren: !0,
|
|
1188
|
+
id: "root",
|
|
1189
|
+
smoothChildTiming: !0
|
|
1190
|
+
}), a.stringFilter = Wt;
|
|
1191
|
+
var Pn = [], Fn = {}, In = [], Ln = 0, Rn = 0, zn = function(e) {
|
|
1192
|
+
return (Fn[e] || In).map(function(e) {
|
|
1193
|
+
return e();
|
|
1194
|
+
});
|
|
1195
|
+
}, Bn = function() {
|
|
1196
|
+
var e = Date.now(), t = [];
|
|
1197
|
+
e - Ln > 2 && (zn("matchMediaInit"), Pn.forEach(function(e) {
|
|
1198
|
+
var n = e.queries, r = e.conditions, a, o, s, c;
|
|
1199
|
+
for (o in n) a = R.matchMedia(n[o]).matches, a && (s = 1), a !== r[o] && (r[o] = a, c = 1);
|
|
1200
|
+
c && (e.revert(), s && t.push(e));
|
|
1201
|
+
}), zn("matchMediaRevert"), t.forEach(function(e) {
|
|
1202
|
+
return e.onMatch(e, function(t) {
|
|
1203
|
+
return e.add(null, t);
|
|
1204
|
+
});
|
|
1205
|
+
}), Ln = e, zn("matchMedia"));
|
|
1206
|
+
}, Vn = /*#__PURE__*/ function() {
|
|
1207
|
+
function e(e, t) {
|
|
1208
|
+
this.selector = t && gt(t), this.data = [], this._r = [], this.isReverted = !1, this.id = Rn++, e && this.add(e);
|
|
1209
|
+
}
|
|
1210
|
+
var t = e.prototype;
|
|
1211
|
+
return t.add = function(e, t, n) {
|
|
1212
|
+
b(e) && (n = t, t = e, e = b);
|
|
1213
|
+
var r = this, a = function() {
|
|
1214
|
+
var e = l, a = r.selector, o;
|
|
1215
|
+
return e && e !== r && e.data.push(r), n && (r.selector = gt(n)), l = r, o = t.apply(r, arguments), b(o) && r._r.push(o), l = e, r.selector = a, r.isReverted = !1, o;
|
|
1216
|
+
};
|
|
1217
|
+
return r.last = a, e === b ? a(r, function(e) {
|
|
1218
|
+
return r.add(null, e);
|
|
1219
|
+
}) : e ? r[e] = a : a;
|
|
1220
|
+
}, t.ignore = function(e) {
|
|
1221
|
+
var t = l;
|
|
1222
|
+
l = null, e(this), l = t;
|
|
1223
|
+
}, t.getTweens = function() {
|
|
1224
|
+
var t = [];
|
|
1225
|
+
return this.data.forEach(function(n) {
|
|
1226
|
+
return n instanceof e ? t.push.apply(t, n.getTweens()) : n instanceof J && !(n.parent && n.parent.data === "nested") && t.push(n);
|
|
1227
|
+
}), t;
|
|
1228
|
+
}, t.clear = function() {
|
|
1229
|
+
this._r.length = this.data.length = 0;
|
|
1230
|
+
}, t.kill = function(e, t) {
|
|
1231
|
+
var n = this;
|
|
1232
|
+
if (e ? (function() {
|
|
1233
|
+
for (var t = n.getTweens(), r = n.data.length, a; r--;) a = n.data[r], a.data === "isFlip" && (a.revert(), a.getChildren(!0, !0, !1).forEach(function(e) {
|
|
1234
|
+
return t.splice(t.indexOf(e), 1);
|
|
1235
|
+
}));
|
|
1236
|
+
for (t.map(function(e) {
|
|
1237
|
+
return {
|
|
1238
|
+
g: e._dur || e._delay || e._sat && !e._sat.vars.immediateRender ? e.globalTime(0) : -Infinity,
|
|
1239
|
+
t: e
|
|
1240
|
+
};
|
|
1241
|
+
}).sort(function(e, t) {
|
|
1242
|
+
return t.g - e.g || -Infinity;
|
|
1243
|
+
}).forEach(function(t) {
|
|
1244
|
+
return t.t.revert(e);
|
|
1245
|
+
}), r = n.data.length; r--;) a = n.data[r], a instanceof q ? a.data !== "nested" && (a.scrollTrigger && a.scrollTrigger.revert(), a.kill()) : !(a instanceof J) && a.revert && a.revert(e);
|
|
1246
|
+
n._r.forEach(function(t) {
|
|
1247
|
+
return t(e, n);
|
|
1248
|
+
}), n.isReverted = !0;
|
|
1249
|
+
})() : this.data.forEach(function(e) {
|
|
1250
|
+
return e.kill && e.kill();
|
|
1251
|
+
}), this.clear(), t) for (var r = Pn.length; r--;) Pn[r].id === this.id && Pn.splice(r, 1);
|
|
1252
|
+
}, t.revert = function(e) {
|
|
1253
|
+
this.kill(e || {});
|
|
1254
|
+
}, e;
|
|
1255
|
+
}(), Hn = /*#__PURE__*/ function() {
|
|
1256
|
+
function e(e) {
|
|
1257
|
+
this.contexts = [], this.scope = e, l && l.data.push(this);
|
|
1258
|
+
}
|
|
1259
|
+
var t = e.prototype;
|
|
1260
|
+
return t.add = function(e, t, n) {
|
|
1261
|
+
C(e) || (e = { matches: e });
|
|
1262
|
+
var r = new Vn(0, n || this.scope), a = r.conditions = {}, o, s, c;
|
|
1263
|
+
for (s in l && !r.selector && (r.selector = l.selector), this.contexts.push(r), t = r.add("onMatch", t), r.queries = e, e) s === "all" ? c = 1 : (o = R.matchMedia(e[s]), o && (Pn.indexOf(r) < 0 && Pn.push(r), (a[s] = o.matches) && (c = 1), o.addListener ? o.addListener(Bn) : o.addEventListener("change", Bn)));
|
|
1264
|
+
return c && t(r, function(e) {
|
|
1265
|
+
return r.add(null, e);
|
|
1266
|
+
}), this;
|
|
1267
|
+
}, t.revert = function(e) {
|
|
1268
|
+
this.kill(e || {});
|
|
1269
|
+
}, t.kill = function(e) {
|
|
1270
|
+
this.contexts.forEach(function(t) {
|
|
1271
|
+
return t.kill(e, !0);
|
|
1272
|
+
});
|
|
1273
|
+
}, e;
|
|
1274
|
+
}(), Un = {
|
|
1275
|
+
registerPlugin: function() {
|
|
1276
|
+
[...arguments].forEach(function(e) {
|
|
1277
|
+
return It(e);
|
|
1278
|
+
});
|
|
1279
|
+
},
|
|
1280
|
+
timeline: function(e) {
|
|
1281
|
+
return new q(e);
|
|
1282
|
+
},
|
|
1283
|
+
getTweensOf: function(e, t) {
|
|
1284
|
+
return L.getTweensOf(e, t);
|
|
1285
|
+
},
|
|
1286
|
+
getProperty: function(e, t, n, r) {
|
|
1287
|
+
v(e) && (e = ht(e)[0]);
|
|
1288
|
+
var a = Se(e || {}).get, o = n ? Ae : ke;
|
|
1289
|
+
return n === "native" && (n = ""), e && (t ? o((ge[t] && ge[t].get || a)(e, t, n, r)) : function(t, n, r) {
|
|
1290
|
+
return o((ge[t] && ge[t].get || a)(e, t, n, r));
|
|
1291
|
+
});
|
|
1292
|
+
},
|
|
1293
|
+
quickSetter: function(e, t, n) {
|
|
1294
|
+
if (e = ht(e), e.length > 1) {
|
|
1295
|
+
var r = e.map(function(e) {
|
|
1296
|
+
return X.quickSetter(e, t, n);
|
|
1297
|
+
}), a = r.length;
|
|
1298
|
+
return function(e) {
|
|
1299
|
+
for (var t = a; t--;) r[t](e);
|
|
1300
|
+
};
|
|
1301
|
+
}
|
|
1302
|
+
e = e[0] || {};
|
|
1303
|
+
var o = ge[t], s = Se(e), c = s.harness && (s.harness.aliases || {})[t] || t, l = o ? function(t) {
|
|
1304
|
+
var r = new o();
|
|
1305
|
+
Pt._pt = 0, r.init(e, n ? t + n : t, Pt, 0, [e]), r.render(1, r), Pt._pt && kn(1, Pt);
|
|
1306
|
+
} : s.set(e, c);
|
|
1307
|
+
return o ? l : function(t) {
|
|
1308
|
+
return l(e, c, n ? t + n : t, s, 1);
|
|
1309
|
+
};
|
|
1310
|
+
},
|
|
1311
|
+
quickTo: function(e, t, n) {
|
|
1312
|
+
var r, a = X.to(e, je((r = {}, r[t] = "+=0.1", r.paused = !0, r.stagger = 0, r), n || {})), o = function(e, n, r) {
|
|
1313
|
+
return a.resetTo(t, e, n, r);
|
|
1314
|
+
};
|
|
1315
|
+
return o.tween = a, o;
|
|
1316
|
+
},
|
|
1317
|
+
isTweening: function(e) {
|
|
1318
|
+
return L.getTweensOf(e, !0).length > 0;
|
|
1319
|
+
},
|
|
1320
|
+
defaults: function(e) {
|
|
1321
|
+
return e && e.ease && (e.ease = en(e.ease, o.ease)), Pe(o, e || {});
|
|
1322
|
+
},
|
|
1323
|
+
config: function(e) {
|
|
1324
|
+
return Pe(a, e || {});
|
|
1325
|
+
},
|
|
1326
|
+
registerEffect: function(e) {
|
|
1327
|
+
var t = e.name, n = e.effect, r = e.plugins, a = e.defaults, o = e.extendTimeline;
|
|
1328
|
+
(r || "").split(",").forEach(function(e) {
|
|
1329
|
+
return e && !ge[e] && !B[e] && oe(t + " effect requires " + e + " plugin.");
|
|
1330
|
+
}), _e[t] = function(e, t, r) {
|
|
1331
|
+
return n(ht(e), je(t || {}, a), r);
|
|
1332
|
+
}, o && (q.prototype[t] = function(e, n, r) {
|
|
1333
|
+
return this.add(_e[t](e, C(n) ? n : (r = n) && {}, this), r);
|
|
1334
|
+
});
|
|
1335
|
+
},
|
|
1336
|
+
registerEase: function(e, t) {
|
|
1337
|
+
K[e] = en(t);
|
|
1338
|
+
},
|
|
1339
|
+
parseEase: function(e, t) {
|
|
1340
|
+
return arguments.length ? en(e, t) : K;
|
|
1341
|
+
},
|
|
1342
|
+
getById: function(e) {
|
|
1343
|
+
return L.getById(e);
|
|
1344
|
+
},
|
|
1345
|
+
exportRoot: function(e, t) {
|
|
1346
|
+
e === void 0 && (e = {});
|
|
1347
|
+
var n = new q(e), r, a;
|
|
1348
|
+
for (n.smoothChildTiming = w(e.smoothChildTiming), L.remove(n), n._dp = 0, n._time = n._tTime = L._time, r = L._first; r;) a = r._next, (t || !(!r._dur && r instanceof J && r.vars.onComplete === r._targets[0])) && Ze(n, r, r._start - r._delay), r = a;
|
|
1349
|
+
return Ze(L, n, 0), n;
|
|
1350
|
+
},
|
|
1351
|
+
context: function(e, t) {
|
|
1352
|
+
return e ? new Vn(e, t) : l;
|
|
1353
|
+
},
|
|
1354
|
+
matchMedia: function(e) {
|
|
1355
|
+
return new Hn(e);
|
|
1356
|
+
},
|
|
1357
|
+
matchMediaRefresh: function() {
|
|
1358
|
+
return Pn.forEach(function(e) {
|
|
1359
|
+
var t = e.conditions, n, r;
|
|
1360
|
+
for (r in t) t[r] && (t[r] = !1, n = 1);
|
|
1361
|
+
n && e.revert();
|
|
1362
|
+
}) || Bn();
|
|
1363
|
+
},
|
|
1364
|
+
addEventListener: function(e, t) {
|
|
1365
|
+
var n = Fn[e] || (Fn[e] = []);
|
|
1366
|
+
~n.indexOf(t) || n.push(t);
|
|
1367
|
+
},
|
|
1368
|
+
removeEventListener: function(e, t) {
|
|
1369
|
+
var n = Fn[e], r = n && n.indexOf(t);
|
|
1370
|
+
r >= 0 && n.splice(r, 1);
|
|
1371
|
+
},
|
|
1372
|
+
utils: {
|
|
1373
|
+
wrap: Et,
|
|
1374
|
+
wrapYoyo: Dt,
|
|
1375
|
+
distribute: vt,
|
|
1376
|
+
random: xt,
|
|
1377
|
+
snap: bt,
|
|
1378
|
+
normalize: wt,
|
|
1379
|
+
getUnit: W,
|
|
1380
|
+
clamp: dt,
|
|
1381
|
+
splitColor: zt,
|
|
1382
|
+
toArray: ht,
|
|
1383
|
+
selector: gt,
|
|
1384
|
+
mapRange: kt,
|
|
1385
|
+
pipe: St,
|
|
1386
|
+
unitize: Ct,
|
|
1387
|
+
interpolate: At,
|
|
1388
|
+
shuffle: _t
|
|
1389
|
+
},
|
|
1390
|
+
install: ie,
|
|
1391
|
+
effects: _e,
|
|
1392
|
+
ticker: Kt,
|
|
1393
|
+
updateRoot: q.updateRoot,
|
|
1394
|
+
plugins: ge,
|
|
1395
|
+
globalTimeline: L,
|
|
1396
|
+
core: {
|
|
1397
|
+
PropTween: Y,
|
|
1398
|
+
globals: se,
|
|
1399
|
+
Tween: J,
|
|
1400
|
+
Timeline: q,
|
|
1401
|
+
Animation: sn,
|
|
1402
|
+
getCache: Se,
|
|
1403
|
+
_removeLinkedListItem: ze,
|
|
1404
|
+
reverting: function() {
|
|
1405
|
+
return c;
|
|
1406
|
+
},
|
|
1407
|
+
context: function(e) {
|
|
1408
|
+
return e && l && (l.data.push(e), e._ctx = l), l;
|
|
1409
|
+
},
|
|
1410
|
+
suppressOverwrites: function(e) {
|
|
1411
|
+
return s = e;
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
V("to,from,fromTo,delayedCall,set,killTweensOf", function(e) {
|
|
1416
|
+
return Un[e] = J[e];
|
|
1417
|
+
}), Kt.add(q.updateRoot), Pt = Un.to({}, { duration: 0 });
|
|
1418
|
+
var Wn = function(e, t) {
|
|
1419
|
+
for (var n = e._pt; n && n.p !== t && n.op !== t && n.fp !== t;) n = n._next;
|
|
1420
|
+
return n;
|
|
1421
|
+
}, Gn = function(e, t) {
|
|
1422
|
+
var n = e._targets, r, a, o;
|
|
1423
|
+
for (r in t) for (a = n.length; a--;) o = e._ptLookup[a][r], (o &&= o.d) && (o._pt && (o = Wn(o, r)), o && o.modifier && o.modifier(t[r], e, n[a], r));
|
|
1424
|
+
}, Kn = function(e, t) {
|
|
1425
|
+
return {
|
|
1426
|
+
name: e,
|
|
1427
|
+
headless: 1,
|
|
1428
|
+
rawVars: 1,
|
|
1429
|
+
init: function(e, n, r) {
|
|
1430
|
+
r._onInit = function(e) {
|
|
1431
|
+
var r, a;
|
|
1432
|
+
if (v(n) && (r = {}, V(n, function(e) {
|
|
1433
|
+
return r[e] = 1;
|
|
1434
|
+
}), n = r), t) {
|
|
1435
|
+
for (a in r = {}, n) r[a] = t(n[a]);
|
|
1436
|
+
n = r;
|
|
1437
|
+
}
|
|
1438
|
+
Gn(e, n);
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
}, X = Un.registerPlugin({
|
|
1443
|
+
name: "attr",
|
|
1444
|
+
init: function(e, t, n, r, a) {
|
|
1445
|
+
var o, s, c;
|
|
1446
|
+
for (o in this.tween = n, t) c = e.getAttribute(o) || "", s = this.add(e, "setAttribute", (c || 0) + "", t[o], r, a, 0, 0, o), s.op = o, s.b = c, this._props.push(o);
|
|
1447
|
+
},
|
|
1448
|
+
render: function(e, t) {
|
|
1449
|
+
for (var n = t._pt; n;) c ? n.set(n.t, n.p, n.b, n) : n.r(e, n.d), n = n._next;
|
|
1450
|
+
}
|
|
1451
|
+
}, {
|
|
1452
|
+
name: "endArray",
|
|
1453
|
+
headless: 1,
|
|
1454
|
+
init: function(e, t) {
|
|
1455
|
+
for (var n = t.length; n--;) this.add(e, n, e[n] || 0, t[n], 0, 0, 0, 0, 0, 1);
|
|
1456
|
+
}
|
|
1457
|
+
}, Kn("roundProps", yt), Kn("modifiers"), Kn("snap", bt)) || Un;
|
|
1458
|
+
J.version = q.version = X.version = "3.15.0", re = 1, T() && qt(), K.Power0, K.Power1, K.Power2, K.Power3, K.Power4, K.Linear, K.Quad, K.Cubic, K.Quart, K.Quint, K.Strong, K.Elastic, K.Back, K.SteppedEase, K.Bounce, K.Sine, K.Expo, K.Circ;
|
|
1459
|
+
//#endregion
|
|
1460
|
+
//#region node_modules/.pnpm/gsap@3.15.0/node_modules/gsap/CSSPlugin.js
|
|
1461
|
+
var qn, Jn, Yn, Xn, Zn, Qn, $n, er = function() {
|
|
1462
|
+
return typeof window < "u";
|
|
1463
|
+
}, tr = {}, nr = 180 / Math.PI, rr = Math.PI / 180, ir = Math.atan2, ar = 1e8, or = /([A-Z])/g, sr = /(left|right|width|margin|padding|x)/i, cr = /[\s,\(]\S/, lr = {
|
|
1464
|
+
autoAlpha: "opacity,visibility",
|
|
1465
|
+
scale: "scaleX,scaleY",
|
|
1466
|
+
alpha: "opacity"
|
|
1467
|
+
}, ur = function(e, t) {
|
|
1468
|
+
return t.set(t.t, t.p, Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
1469
|
+
}, dr = function(e, t) {
|
|
1470
|
+
return t.set(t.t, t.p, e === 1 ? t.e : Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u, t);
|
|
1471
|
+
}, fr = function(e, t) {
|
|
1472
|
+
return t.set(t.t, t.p, e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u : t.b, t);
|
|
1473
|
+
}, pr = function(e, t) {
|
|
1474
|
+
return t.set(t.t, t.p, e === 1 ? t.e : e ? Math.round((t.s + t.c * e) * 1e4) / 1e4 + t.u : t.b, t);
|
|
1475
|
+
}, mr = function(e, t) {
|
|
1476
|
+
var n = t.s + t.c * e;
|
|
1477
|
+
t.set(t.t, t.p, ~~(n + (n < 0 ? -.5 : .5)) + t.u, t);
|
|
1478
|
+
}, hr = function(e, t) {
|
|
1479
|
+
return t.set(t.t, t.p, e ? t.e : t.b, t);
|
|
1480
|
+
}, gr = function(e, t) {
|
|
1481
|
+
return t.set(t.t, t.p, e === 1 ? t.e : t.b, t);
|
|
1482
|
+
}, _r = function(e, t, n) {
|
|
1483
|
+
return e.style[t] = n;
|
|
1484
|
+
}, vr = function(e, t, n) {
|
|
1485
|
+
return e.style.setProperty(t, n);
|
|
1486
|
+
}, yr = function(e, t, n) {
|
|
1487
|
+
return e._gsap[t] = n;
|
|
1488
|
+
}, br = function(e, t, n) {
|
|
1489
|
+
return e._gsap.scaleX = e._gsap.scaleY = n;
|
|
1490
|
+
}, xr = function(e, t, n, r, a) {
|
|
1491
|
+
var o = e._gsap;
|
|
1492
|
+
o.scaleX = o.scaleY = n, o.renderTransform(a, o);
|
|
1493
|
+
}, Sr = function(e, t, n, r, a) {
|
|
1494
|
+
var o = e._gsap;
|
|
1495
|
+
o[t] = n, o.renderTransform(a, o);
|
|
1496
|
+
}, Z = "transform", Cr = Z + "Origin", wr = function e(t, n) {
|
|
1497
|
+
var r = this, a = this.target, o = a.style, s = a._gsap;
|
|
1498
|
+
if (t in tr && o) {
|
|
1499
|
+
if (this.tfm = this.tfm || {}, t !== "transform") t = lr[t] || t, ~t.indexOf(",") ? t.split(",").forEach(function(e) {
|
|
1500
|
+
return r.tfm[e] = Ur(a, e);
|
|
1501
|
+
}) : this.tfm[t] = s.x ? s[t] : Ur(a, t), t === Cr && (this.tfm.zOrigin = s.zOrigin);
|
|
1502
|
+
else return lr.transform.split(",").forEach(function(t) {
|
|
1503
|
+
return e.call(r, t, n);
|
|
1504
|
+
});
|
|
1505
|
+
if (this.props.indexOf(Z) >= 0) return;
|
|
1506
|
+
s.svg && (this.svgo = a.getAttribute("data-svg-origin"), this.props.push(Cr, n, "")), t = Z;
|
|
1507
|
+
}
|
|
1508
|
+
(o || n) && this.props.push(t, n, o[t]);
|
|
1509
|
+
}, Tr = function(e) {
|
|
1510
|
+
e.translate && (e.removeProperty("translate"), e.removeProperty("scale"), e.removeProperty("rotate"));
|
|
1511
|
+
}, Er = function() {
|
|
1512
|
+
var e = this.props, t = this.target, n = t.style, r = t._gsap, a, o;
|
|
1513
|
+
for (a = 0; a < e.length; a += 3) e[a + 1] ? e[a + 1] === 2 ? t[e[a]](e[a + 2]) : t[e[a]] = e[a + 2] : e[a + 2] ? n[e[a]] = e[a + 2] : n.removeProperty(e[a].substr(0, 2) === "--" ? e[a] : e[a].replace(or, "-$1").toLowerCase());
|
|
1514
|
+
if (this.tfm) {
|
|
1515
|
+
for (o in this.tfm) r[o] = this.tfm[o];
|
|
1516
|
+
r.svg && (r.renderTransform(), t.setAttribute("data-svg-origin", this.svgo || "")), a = $n(), (!a || !a.isStart) && !n[Z] && (Tr(n), r.zOrigin && n[Cr] && (n[Cr] += " " + r.zOrigin + "px", r.zOrigin = 0, r.renderTransform()), r.uncache = 1);
|
|
1517
|
+
}
|
|
1518
|
+
}, Dr = function(e, t) {
|
|
1519
|
+
var n = {
|
|
1520
|
+
target: e,
|
|
1521
|
+
props: [],
|
|
1522
|
+
revert: Er,
|
|
1523
|
+
save: wr
|
|
1524
|
+
};
|
|
1525
|
+
return e._gsap || X.core.getCache(e), t && e.style && e.nodeType && t.split(",").forEach(function(e) {
|
|
1526
|
+
return n.save(e);
|
|
1527
|
+
}), n;
|
|
1528
|
+
}, Or, kr = function(e, t) {
|
|
1529
|
+
var n = Jn.createElementNS ? Jn.createElementNS((t || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), e) : Jn.createElement(e);
|
|
1530
|
+
return n && n.style ? n : Jn.createElement(e);
|
|
1531
|
+
}, Ar = function e(t, n, r) {
|
|
1532
|
+
var a = getComputedStyle(t);
|
|
1533
|
+
return a[n] || a.getPropertyValue(n.replace(or, "-$1").toLowerCase()) || a.getPropertyValue(n) || !r && e(t, Mr(n) || n, 1) || "";
|
|
1534
|
+
}, jr = "O,Moz,ms,Ms,Webkit".split(","), Mr = function(e, t, n) {
|
|
1535
|
+
var r = (t || Zn).style, a = 5;
|
|
1536
|
+
if (e in r && !n) return e;
|
|
1537
|
+
for (e = e.charAt(0).toUpperCase() + e.substr(1); a-- && !(jr[a] + e in r););
|
|
1538
|
+
return a < 0 ? null : (a === 3 ? "ms" : a >= 0 ? jr[a] : "") + e;
|
|
1539
|
+
}, Nr = function() {
|
|
1540
|
+
er() && window.document && (qn = window, Jn = qn.document, Yn = Jn.documentElement, Zn = kr("div") || { style: {} }, kr("div"), Z = Mr(Z), Cr = Z + "Origin", Zn.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0", Or = !!Mr("perspective"), $n = X.core.reverting, Xn = 1);
|
|
1541
|
+
}, Pr = function(e) {
|
|
1542
|
+
var t = e.ownerSVGElement, n = kr("svg", t && t.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), r = e.cloneNode(!0), a;
|
|
1543
|
+
r.style.display = "block", n.appendChild(r), Yn.appendChild(n);
|
|
1544
|
+
try {
|
|
1545
|
+
a = r.getBBox();
|
|
1546
|
+
} catch {}
|
|
1547
|
+
return n.removeChild(r), Yn.removeChild(n), a;
|
|
1548
|
+
}, Fr = function(e, t) {
|
|
1549
|
+
for (var n = t.length; n--;) if (e.hasAttribute(t[n])) return e.getAttribute(t[n]);
|
|
1550
|
+
}, Ir = function(e) {
|
|
1551
|
+
var t, n;
|
|
1552
|
+
try {
|
|
1553
|
+
t = e.getBBox();
|
|
1554
|
+
} catch {
|
|
1555
|
+
t = Pr(e), n = 1;
|
|
1556
|
+
}
|
|
1557
|
+
return t && (t.width || t.height) || n || (t = Pr(e)), t && !t.width && !t.x && !t.y ? {
|
|
1558
|
+
x: +Fr(e, [
|
|
1559
|
+
"x",
|
|
1560
|
+
"cx",
|
|
1561
|
+
"x1"
|
|
1562
|
+
]) || 0,
|
|
1563
|
+
y: +Fr(e, [
|
|
1564
|
+
"y",
|
|
1565
|
+
"cy",
|
|
1566
|
+
"y1"
|
|
1567
|
+
]) || 0,
|
|
1568
|
+
width: 0,
|
|
1569
|
+
height: 0
|
|
1570
|
+
} : t;
|
|
1571
|
+
}, Lr = function(e) {
|
|
1572
|
+
return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && Ir(e));
|
|
1573
|
+
}, Rr = function(e, t) {
|
|
1574
|
+
if (t) {
|
|
1575
|
+
var n = e.style, r;
|
|
1576
|
+
t in tr && t !== Cr && (t = Z), n.removeProperty ? (r = t.substr(0, 2), (r === "ms" || t.substr(0, 6) === "webkit") && (t = "-" + t), n.removeProperty(r === "--" ? t : t.replace(or, "-$1").toLowerCase())) : n.removeAttribute(t);
|
|
1577
|
+
}
|
|
1578
|
+
}, zr = function(e, t, n, r, a, o) {
|
|
1579
|
+
var s = new Y(e._pt, t, n, 0, 1, o ? gr : hr);
|
|
1580
|
+
return e._pt = s, s.b = r, s.e = a, e._props.push(n), s;
|
|
1581
|
+
}, Br = {
|
|
1582
|
+
deg: 1,
|
|
1583
|
+
rad: 1,
|
|
1584
|
+
turn: 1
|
|
1585
|
+
}, Vr = {
|
|
1586
|
+
grid: 1,
|
|
1587
|
+
flex: 1
|
|
1588
|
+
}, Hr = function e(t, n, r, a) {
|
|
1589
|
+
var o = parseFloat(r) || 0, s = (r + "").trim().substr((o + "").length) || "px", c = Zn.style, l = sr.test(n), u = t.tagName.toLowerCase() === "svg", d = (u ? "client" : "offset") + (l ? "Width" : "Height"), f = 100, p = a === "px", m = a === "%", h, g, _, v;
|
|
1590
|
+
if (a === s || !o || Br[a] || Br[s]) return o;
|
|
1591
|
+
if (s !== "px" && !p && (o = e(t, n, r, "px")), v = t.getCTM && Lr(t), (m || s === "%") && (tr[n] || ~n.indexOf("adius"))) return h = v ? t.getBBox()[l ? "width" : "height"] : t[d], H(m ? o / h * f : o / 100 * h);
|
|
1592
|
+
if (c[l ? "width" : "height"] = f + (p ? s : a), g = a !== "rem" && ~n.indexOf("adius") || a === "em" && t.appendChild && !u ? t : t.parentNode, v && (g = (t.ownerSVGElement || {}).parentNode), (!g || g === Jn || !g.appendChild) && (g = Jn.body), _ = g._gsap, _ && m && _.width && l && _.time === Kt.time && !_.uncache) return H(o / _.width * f);
|
|
1593
|
+
if (m && (n === "height" || n === "width")) {
|
|
1594
|
+
var b = t.style[n];
|
|
1595
|
+
t.style[n] = f + a, h = t[d], b ? t.style[n] = b : Rr(t, n);
|
|
1596
|
+
} else (m || s === "%") && !Vr[Ar(g, "display")] && (c.position = Ar(t, "position")), g === t && (c.position = "static"), g.appendChild(Zn), h = Zn[d], g.removeChild(Zn), c.position = "absolute";
|
|
1597
|
+
return l && m && (_ = Se(g), _.time = Kt.time, _.width = g[d]), H(p ? h * o / f : h && o ? f / h * o : 0);
|
|
1598
|
+
}, Ur = function(e, t, n, r) {
|
|
1599
|
+
var a;
|
|
1600
|
+
return Xn || Nr(), t in lr && t !== "transform" && (t = lr[t], ~t.indexOf(",") && (t = t.split(",")[0])), tr[t] && t !== "transform" ? (a = ti(e, r), a = t === "transformOrigin" ? a.svg ? a.origin : ni(Ar(e, Cr)) + " " + a.zOrigin + "px" : a[t]) : (a = e.style[t], (!a || a === "auto" || r || ~(a + "").indexOf("calc(")) && (a = Jr[t] && Jr[t](e, t, n) || Ar(e, t) || Ce(e, t) || +(t === "opacity"))), n && !~(a + "").trim().indexOf(" ") ? Hr(e, t, a, n) + n : a;
|
|
1601
|
+
}, Wr = function(e, t, n, r) {
|
|
1602
|
+
if (!n || n === "none") {
|
|
1603
|
+
var o = Mr(t, e, 1), s = o && Ar(e, o, 1);
|
|
1604
|
+
s && s !== n ? (t = o, n = s) : t === "borderColor" && (n = Ar(e, "borderTopColor"));
|
|
1605
|
+
}
|
|
1606
|
+
var c = new Y(this._pt, e.style, t, 0, 1, On), l = 0, u = 0, d, f, p, m, h, g, _, v, b, x, S, C;
|
|
1607
|
+
if (c.b = n, c.e = r, n += "", r += "", r.substring(0, 6) === "var(--" && (r = Ar(e, r.substring(4, r.indexOf(")")))), r === "auto" && (g = e.style[t], e.style[t] = r, r = Ar(e, t) || r, g ? e.style[t] = g : Rr(e, t)), d = [n, r], Wt(d), n = d[0], r = d[1], p = n.match(N) || [], C = r.match(N) || [], C.length) {
|
|
1608
|
+
for (; f = N.exec(r);) _ = f[0], b = r.substring(l, f.index), h ? h = (h + 1) % 5 : (b.substr(-5) === "rgba(" || b.substr(-5) === "hsla(") && (h = 1), _ !== (g = p[u++] || "") && (m = parseFloat(g) || 0, S = g.substr((m + "").length), _.charAt(1) === "=" && (_ = we(m, _) + S), v = parseFloat(_), x = _.substr((v + "").length), l = N.lastIndex - x.length, x || (x = x || a.units[t] || S, l === r.length && (r += x, c.e += x)), S !== x && (m = Hr(e, t, g, x) || 0), c._pt = {
|
|
1609
|
+
_next: c._pt,
|
|
1610
|
+
p: b || u === 1 ? b : ",",
|
|
1611
|
+
s: m,
|
|
1612
|
+
c: v - m,
|
|
1613
|
+
m: h && h < 4 || t === "zIndex" ? Math.round : 0
|
|
1614
|
+
});
|
|
1615
|
+
c.c = l < r.length ? r.substring(l, r.length) : "";
|
|
1616
|
+
} else c.r = t === "display" && r === "none" ? gr : hr;
|
|
1617
|
+
return F.test(r) && (c.e = 0), this._pt = c, c;
|
|
1618
|
+
}, Gr = {
|
|
1619
|
+
top: "0%",
|
|
1620
|
+
bottom: "100%",
|
|
1621
|
+
left: "0%",
|
|
1622
|
+
right: "100%",
|
|
1623
|
+
center: "50%"
|
|
1624
|
+
}, Kr = function(e) {
|
|
1625
|
+
var t = e.split(" "), n = t[0], r = t[1] || "50%";
|
|
1626
|
+
return (n === "top" || n === "bottom" || r === "left" || r === "right") && (e = n, n = r, r = e), t[0] = Gr[n] || n, t[1] = Gr[r] || r, t.join(" ");
|
|
1627
|
+
}, qr = function(e, t) {
|
|
1628
|
+
if (t.tween && t.tween._time === t.tween._dur) {
|
|
1629
|
+
var n = t.t, r = n.style, a = t.u, o = n._gsap, s, c, l;
|
|
1630
|
+
if (a === "all" || a === !0) r.cssText = "", c = 1;
|
|
1631
|
+
else for (a = a.split(","), l = a.length; --l > -1;) s = a[l], tr[s] && (c = 1, s = s === "transformOrigin" ? Cr : Z), Rr(n, s);
|
|
1632
|
+
c && (Rr(n, Z), o && (o.svg && n.removeAttribute("transform"), r.scale = r.rotate = r.translate = "none", ti(n, 1), o.uncache = 1, Tr(r)));
|
|
1633
|
+
}
|
|
1634
|
+
}, Jr = { clearProps: function(e, t, n, r, a) {
|
|
1635
|
+
if (a.data !== "isFromStart") {
|
|
1636
|
+
var o = e._pt = new Y(e._pt, t, n, 0, 0, qr);
|
|
1637
|
+
return o.u = r, o.pr = -10, o.tween = a, e._props.push(n), 1;
|
|
1638
|
+
}
|
|
1639
|
+
} }, Yr = [
|
|
1640
|
+
1,
|
|
1641
|
+
0,
|
|
1642
|
+
0,
|
|
1643
|
+
1,
|
|
1644
|
+
0,
|
|
1645
|
+
0
|
|
1646
|
+
], Xr = {}, Zr = function(e) {
|
|
1647
|
+
return e === "matrix(1, 0, 0, 1, 0, 0)" || e === "none" || !e;
|
|
1648
|
+
}, Qr = function(e) {
|
|
1649
|
+
var t = Ar(e, Z);
|
|
1650
|
+
return Zr(t) ? Yr : t.substr(7).match(M).map(H);
|
|
1651
|
+
}, $r = function(e, t) {
|
|
1652
|
+
var n = e._gsap || Se(e), r = e.style, a = Qr(e), o, s, c, l;
|
|
1653
|
+
return n.svg && e.getAttribute("transform") ? (c = e.transform.baseVal.consolidate().matrix, a = [
|
|
1654
|
+
c.a,
|
|
1655
|
+
c.b,
|
|
1656
|
+
c.c,
|
|
1657
|
+
c.d,
|
|
1658
|
+
c.e,
|
|
1659
|
+
c.f
|
|
1660
|
+
], a.join(",") === "1,0,0,1,0,0" ? Yr : a) : (a === Yr && !e.offsetParent && e !== Yn && !n.svg && (c = r.display, r.display = "block", o = e.parentNode, (!o || !e.offsetParent && !e.getBoundingClientRect().width) && (l = 1, s = e.nextElementSibling, Yn.appendChild(e)), a = Qr(e), c ? r.display = c : Rr(e, "display"), l && (s ? o.insertBefore(e, s) : o ? o.appendChild(e) : Yn.removeChild(e))), t && a.length > 6 ? [
|
|
1661
|
+
a[0],
|
|
1662
|
+
a[1],
|
|
1663
|
+
a[4],
|
|
1664
|
+
a[5],
|
|
1665
|
+
a[12],
|
|
1666
|
+
a[13]
|
|
1667
|
+
] : a);
|
|
1668
|
+
}, ei = function(e, t, n, r, a, o) {
|
|
1669
|
+
var s = e._gsap, c = a || $r(e, !0), l = s.xOrigin || 0, u = s.yOrigin || 0, d = s.xOffset || 0, f = s.yOffset || 0, p = c[0], m = c[1], h = c[2], g = c[3], _ = c[4], v = c[5], b = t.split(" "), x = parseFloat(b[0]) || 0, S = parseFloat(b[1]) || 0, C, w, T, E;
|
|
1670
|
+
n ? c !== Yr && (w = p * g - m * h) && (T = g / w * x + S * (-h / w) + (h * v - g * _) / w, E = x * (-m / w) + p / w * S - (p * v - m * _) / w, x = T, S = E) : (C = Ir(e), x = C.x + (~b[0].indexOf("%") ? x / 100 * C.width : x), S = C.y + (~(b[1] || b[0]).indexOf("%") ? S / 100 * C.height : S)), r || r !== !1 && s.smooth ? (_ = x - l, v = S - u, s.xOffset = d + (_ * p + v * h) - _, s.yOffset = f + (_ * m + v * g) - v) : s.xOffset = s.yOffset = 0, s.xOrigin = x, s.yOrigin = S, s.smooth = !!r, s.origin = t, s.originIsAbsolute = !!n, e.style[Cr] = "0px 0px", o && (zr(o, s, "xOrigin", l, x), zr(o, s, "yOrigin", u, S), zr(o, s, "xOffset", d, s.xOffset), zr(o, s, "yOffset", f, s.yOffset)), e.setAttribute("data-svg-origin", x + " " + S);
|
|
1671
|
+
}, ti = function(e, t) {
|
|
1672
|
+
var n = e._gsap || new on(e);
|
|
1673
|
+
if ("x" in n && !t && !n.uncache) return n;
|
|
1674
|
+
var r = e.style, o = n.scaleX < 0, s = "px", c = "deg", l = getComputedStyle(e), u = Ar(e, Cr) || "0", d = f = p = g = _ = v = b = x = S = 0, f, p, m = h = 1, h, g, _, v, b, x, S, C, w, T, E, D, O, k, A, j, M, N, P, F, I, ee, L, R, z, te, B, ne;
|
|
1675
|
+
return n.svg = !!(e.getCTM && Lr(e)), l.translate && ((l.translate !== "none" || l.scale !== "none" || l.rotate !== "none") && (r[Z] = (l.translate === "none" ? "" : "translate3d(" + (l.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") ") + (l.rotate === "none" ? "" : "rotate(" + l.rotate + ") ") + (l.scale === "none" ? "" : "scale(" + l.scale.split(" ").join(",") + ") ") + (l[Z] === "none" ? "" : l[Z])), r.scale = r.rotate = r.translate = "none"), T = $r(e, n.svg), n.svg && (n.uncache ? (I = e.getBBox(), u = n.xOrigin - I.x + "px " + (n.yOrigin - I.y) + "px", F = "") : F = !t && e.getAttribute("data-svg-origin"), ei(e, F || u, !!F || n.originIsAbsolute, n.smooth !== !1, T)), C = n.xOrigin || 0, w = n.yOrigin || 0, T !== Yr && (k = T[0], A = T[1], j = T[2], M = T[3], d = N = T[4], f = P = T[5], T.length === 6 ? (m = Math.sqrt(k * k + A * A), h = Math.sqrt(M * M + j * j), g = k || A ? ir(A, k) * nr : 0, b = j || M ? ir(j, M) * nr + g : 0, b && (h *= Math.abs(Math.cos(b * rr))), n.svg && (d -= C - (C * k + w * j), f -= w - (C * A + w * M))) : (ne = T[6], te = T[7], L = T[8], R = T[9], z = T[10], B = T[11], d = T[12], f = T[13], p = T[14], E = ir(ne, z), _ = E * nr, E && (D = Math.cos(-E), O = Math.sin(-E), F = N * D + L * O, I = P * D + R * O, ee = ne * D + z * O, L = N * -O + L * D, R = P * -O + R * D, z = ne * -O + z * D, B = te * -O + B * D, N = F, P = I, ne = ee), E = ir(-j, z), v = E * nr, E && (D = Math.cos(-E), O = Math.sin(-E), F = k * D - L * O, I = A * D - R * O, ee = j * D - z * O, B = M * O + B * D, k = F, A = I, j = ee), E = ir(A, k), g = E * nr, E && (D = Math.cos(E), O = Math.sin(E), F = k * D + A * O, I = N * D + P * O, A = A * D - k * O, P = P * D - N * O, k = F, N = I), _ && Math.abs(_) + Math.abs(g) > 359.9 && (_ = g = 0, v = 180 - v), m = H(Math.sqrt(k * k + A * A + j * j)), h = H(Math.sqrt(P * P + ne * ne)), E = ir(N, P), b = Math.abs(E) > 2e-4 ? E * nr : 0, S = B ? 1 / (B < 0 ? -B : B) : 0), n.svg && (F = e.getAttribute("transform"), n.forceCSS = e.setAttribute("transform", "") || !Zr(Ar(e, Z)), F && e.setAttribute("transform", F))), Math.abs(b) > 90 && Math.abs(b) < 270 && (o ? (m *= -1, b += g <= 0 ? 180 : -180, g += g <= 0 ? 180 : -180) : (h *= -1, b += b <= 0 ? 180 : -180)), t ||= n.uncache, n.x = d - ((n.xPercent = d && (!t && n.xPercent || (Math.round(e.offsetWidth / 2) === Math.round(-d) ? -50 : 0))) ? e.offsetWidth * n.xPercent / 100 : 0) + s, n.y = f - ((n.yPercent = f && (!t && n.yPercent || (Math.round(e.offsetHeight / 2) === Math.round(-f) ? -50 : 0))) ? e.offsetHeight * n.yPercent / 100 : 0) + s, n.z = p + s, n.scaleX = H(m), n.scaleY = H(h), n.rotation = H(g) + c, n.rotationX = H(_) + c, n.rotationY = H(v) + c, n.skewX = b + c, n.skewY = x + c, n.transformPerspective = S + s, (n.zOrigin = parseFloat(u.split(" ")[2]) || !t && n.zOrigin || 0) && (r[Cr] = ni(u)), n.xOffset = n.yOffset = 0, n.force3D = a.force3D, n.renderTransform = n.svg ? li : Or ? ci : ii, n.uncache = 0, n;
|
|
1676
|
+
}, ni = function(e) {
|
|
1677
|
+
return (e = e.split(" "))[0] + " " + e[1];
|
|
1678
|
+
}, ri = function(e, t, n) {
|
|
1679
|
+
var r = W(t);
|
|
1680
|
+
return H(parseFloat(t) + parseFloat(Hr(e, "x", n + "px", r))) + r;
|
|
1681
|
+
}, ii = function(e, t) {
|
|
1682
|
+
t.z = "0px", t.rotationY = t.rotationX = "0deg", t.force3D = 0, ci(e, t);
|
|
1683
|
+
}, ai = "0deg", oi = "0px", si = ") ", ci = function(e, t) {
|
|
1684
|
+
var n = t || this, r = n.xPercent, a = n.yPercent, o = n.x, s = n.y, c = n.z, l = n.rotation, u = n.rotationY, d = n.rotationX, f = n.skewX, p = n.skewY, m = n.scaleX, h = n.scaleY, g = n.transformPerspective, _ = n.force3D, v = n.target, b = n.zOrigin, x = "", S = _ === "auto" && e && e !== 1 || _ === !0;
|
|
1685
|
+
if (b && (d !== ai || u !== ai)) {
|
|
1686
|
+
var C = parseFloat(u) * rr, w = Math.sin(C), T = Math.cos(C), E;
|
|
1687
|
+
C = parseFloat(d) * rr, E = Math.cos(C), o = ri(v, o, w * E * -b), s = ri(v, s, -Math.sin(C) * -b), c = ri(v, c, T * E * -b + b);
|
|
1688
|
+
}
|
|
1689
|
+
g !== oi && (x += "perspective(" + g + si), (r || a) && (x += "translate(" + r + "%, " + a + "%) "), (S || o !== oi || s !== oi || c !== oi) && (x += c !== oi || S ? "translate3d(" + o + ", " + s + ", " + c + ") " : "translate(" + o + ", " + s + si), l !== ai && (x += "rotate(" + l + si), u !== ai && (x += "rotateY(" + u + si), d !== ai && (x += "rotateX(" + d + si), (f !== ai || p !== ai) && (x += "skew(" + f + ", " + p + si), (m !== 1 || h !== 1) && (x += "scale(" + m + ", " + h + si), v.style[Z] = x || "translate(0, 0)";
|
|
1690
|
+
}, li = function(e, t) {
|
|
1691
|
+
var n = t || this, r = n.xPercent, a = n.yPercent, o = n.x, s = n.y, c = n.rotation, l = n.skewX, u = n.skewY, d = n.scaleX, f = n.scaleY, p = n.target, m = n.xOrigin, h = n.yOrigin, g = n.xOffset, _ = n.yOffset, v = n.forceCSS, b = parseFloat(o), x = parseFloat(s), S, C, w, T, E;
|
|
1692
|
+
c = parseFloat(c), l = parseFloat(l), u = parseFloat(u), u && (u = parseFloat(u), l += u, c += u), c || l ? (c *= rr, l *= rr, S = Math.cos(c) * d, C = Math.sin(c) * d, w = Math.sin(c - l) * -f, T = Math.cos(c - l) * f, l && (u *= rr, E = Math.tan(l - u), E = Math.sqrt(1 + E * E), w *= E, T *= E, u && (E = Math.tan(u), E = Math.sqrt(1 + E * E), S *= E, C *= E)), S = H(S), C = H(C), w = H(w), T = H(T)) : (S = d, T = f, C = w = 0), (b && !~(o + "").indexOf("px") || x && !~(s + "").indexOf("px")) && (b = Hr(p, "x", o, "px"), x = Hr(p, "y", s, "px")), (m || h || g || _) && (b = H(b + m - (m * S + h * w) + g), x = H(x + h - (m * C + h * T) + _)), (r || a) && (E = p.getBBox(), b = H(b + r / 100 * E.width), x = H(x + a / 100 * E.height)), E = "matrix(" + S + "," + C + "," + w + "," + T + "," + b + "," + x + ")", p.setAttribute("transform", E), v && (p.style[Z] = E);
|
|
1693
|
+
}, ui = function(e, t, n, r, a) {
|
|
1694
|
+
var o = 360, s = v(a), c = parseFloat(a) * (s && ~a.indexOf("rad") ? nr : 1) - r, l = r + c + "deg", u, d;
|
|
1695
|
+
return s && (u = a.split("_")[1], u === "short" && (c %= o, c !== c % (o / 2) && (c += c < 0 ? o : -o)), u === "cw" && c < 0 ? c = (c + o * ar) % o - ~~(c / o) * o : u === "ccw" && c > 0 && (c = (c - o * ar) % o - ~~(c / o) * o)), e._pt = d = new Y(e._pt, t, n, r, c, dr), d.e = l, d.u = "deg", e._props.push(n), d;
|
|
1696
|
+
}, di = function(e, t) {
|
|
1697
|
+
for (var n in t) e[n] = t[n];
|
|
1698
|
+
return e;
|
|
1699
|
+
}, fi = function(e, t, n) {
|
|
1700
|
+
var r = di({}, n._gsap), a = "perspective,force3D,transformOrigin,svgOrigin", o = n.style, s, c, l, u, d, f, p, m;
|
|
1701
|
+
for (c in r.svg ? (l = n.getAttribute("transform"), n.setAttribute("transform", ""), o[Z] = t, s = ti(n, 1), Rr(n, Z), n.setAttribute("transform", l)) : (l = getComputedStyle(n)[Z], o[Z] = t, s = ti(n, 1), o[Z] = l), tr) l = r[c], u = s[c], l !== u && a.indexOf(c) < 0 && (p = W(l), m = W(u), d = p === m ? parseFloat(l) : Hr(n, c, l, m), f = parseFloat(u), e._pt = new Y(e._pt, s, c, d, f - d, ur), e._pt.u = m || 0, e._props.push(c));
|
|
1702
|
+
di(s, r);
|
|
1703
|
+
};
|
|
1704
|
+
V("padding,margin,Width,Radius", function(e, t) {
|
|
1705
|
+
var n = "Top", r = "Right", a = "Bottom", o = "Left", s = (t < 3 ? [
|
|
1706
|
+
n,
|
|
1707
|
+
r,
|
|
1708
|
+
a,
|
|
1709
|
+
o
|
|
1710
|
+
] : [
|
|
1711
|
+
n + o,
|
|
1712
|
+
n + r,
|
|
1713
|
+
a + r,
|
|
1714
|
+
a + o
|
|
1715
|
+
]).map(function(n) {
|
|
1716
|
+
return t < 2 ? e + n : "border" + n + e;
|
|
1717
|
+
});
|
|
1718
|
+
Jr[t > 1 ? "border" + e : e] = function(e, t, n, r, a) {
|
|
1719
|
+
var o, c;
|
|
1720
|
+
if (arguments.length < 4) return o = s.map(function(t) {
|
|
1721
|
+
return Ur(e, t, n);
|
|
1722
|
+
}), c = o.join(" "), c.split(o[0]).length === 5 ? o[0] : c;
|
|
1723
|
+
o = (r + "").split(" "), c = {}, s.forEach(function(e, t) {
|
|
1724
|
+
return c[e] = o[t] = o[t] || o[(t - 1) / 2 | 0];
|
|
1725
|
+
}), e.init(t, c, a);
|
|
1726
|
+
};
|
|
1727
|
+
});
|
|
1728
|
+
var pi = {
|
|
1729
|
+
name: "css",
|
|
1730
|
+
register: Nr,
|
|
1731
|
+
targetTest: function(e) {
|
|
1732
|
+
return e.style && e.nodeType;
|
|
1733
|
+
},
|
|
1734
|
+
init: function(e, t, n, r, o) {
|
|
1735
|
+
var s = this._props, c = e.style, l = n.vars.startAt, u, d, f, p, m, h, g, _, b, x, S, C, w, T, E, D, O;
|
|
1736
|
+
for (g in Xn || Nr(), this.styles = this.styles || Dr(e), D = this.styles.props, this.tween = n, t) if (g !== "autoRound" && (d = t[g], !(ge[g] && dn(g, t, n, r, e, o)))) {
|
|
1737
|
+
if (m = typeof d, h = Jr[g], m === "function" && (d = d.call(n, r, e, o), m = typeof d), m === "string" && ~d.indexOf("random(") && (d = Ot(d)), h) h(this, e, g, d, n) && (E = 1);
|
|
1738
|
+
else if (g.substr(0, 2) === "--") u = (getComputedStyle(e).getPropertyValue(g) + "").trim(), d += "", Ht.lastIndex = 0, Ht.test(u) || (_ = W(u), b = W(d), b ? _ !== b && (u = Hr(e, g, u, b) + b) : _ && (d += _)), this.add(c, "setProperty", u, d, r, o, 0, 0, g), s.push(g), D.push(g, 0, c[g]);
|
|
1739
|
+
else if (m !== "undefined") {
|
|
1740
|
+
if (l && g in l ? (u = typeof l[g] == "function" ? l[g].call(n, r, e, o) : l[g], v(u) && ~u.indexOf("random(") && (u = Ot(u)), W(u + "") || u === "auto" || (u += a.units[g] || W(Ur(e, g)) || ""), (u + "").charAt(1) === "=" && (u = Ur(e, g))) : u = Ur(e, g), p = parseFloat(u), x = m === "string" && d.charAt(1) === "=" && d.substr(0, 2), x && (d = d.substr(2)), f = parseFloat(d), g in lr && (g === "autoAlpha" && (p === 1 && Ur(e, "visibility") === "hidden" && f && (p = 0), D.push("visibility", 0, c.visibility), zr(this, c, "visibility", p ? "inherit" : "hidden", f ? "inherit" : "hidden", !f)), g !== "scale" && g !== "transform" && (g = lr[g], ~g.indexOf(",") && (g = g.split(",")[0]))), S = g in tr, S) {
|
|
1741
|
+
if (this.styles.save(g), O = d, m === "string" && d.substring(0, 6) === "var(--") {
|
|
1742
|
+
if (d = Ar(e, d.substring(4, d.indexOf(")"))), d.substring(0, 5) === "calc(") {
|
|
1743
|
+
var k = e.style.perspective;
|
|
1744
|
+
e.style.perspective = d, d = Ar(e, "perspective"), k ? e.style.perspective = k : Rr(e, "perspective");
|
|
1745
|
+
}
|
|
1746
|
+
f = parseFloat(d);
|
|
1747
|
+
}
|
|
1748
|
+
if (C || (w = e._gsap, w.renderTransform && !t.parseTransform || ti(e, t.parseTransform), T = t.smoothOrigin !== !1 && w.smooth, C = this._pt = new Y(this._pt, c, Z, 0, 1, w.renderTransform, w, 0, -1), C.dep = 1), g === "scale") this._pt = new Y(this._pt, w, "scaleY", w.scaleY, (x ? we(w.scaleY, x + f) : f) - w.scaleY || 0, ur), this._pt.u = 0, s.push("scaleY", g), g += "X";
|
|
1749
|
+
else if (g === "transformOrigin") {
|
|
1750
|
+
D.push(Cr, 0, c[Cr]), d = Kr(d), w.svg ? ei(e, d, 0, T, 0, this) : (b = parseFloat(d.split(" ")[2]) || 0, b !== w.zOrigin && zr(this, w, "zOrigin", w.zOrigin, b), zr(this, c, g, ni(u), ni(d)));
|
|
1751
|
+
continue;
|
|
1752
|
+
} else if (g === "svgOrigin") {
|
|
1753
|
+
ei(e, d, 1, T, 0, this);
|
|
1754
|
+
continue;
|
|
1755
|
+
} else if (g in Xr) {
|
|
1756
|
+
ui(this, w, g, p, x ? we(p, x + d) : d);
|
|
1757
|
+
continue;
|
|
1758
|
+
} else if (g === "smoothOrigin") {
|
|
1759
|
+
zr(this, w, "smooth", w.smooth, d);
|
|
1760
|
+
continue;
|
|
1761
|
+
} else if (g === "force3D") {
|
|
1762
|
+
w[g] = d;
|
|
1763
|
+
continue;
|
|
1764
|
+
} else if (g === "transform") {
|
|
1765
|
+
fi(this, d, e);
|
|
1766
|
+
continue;
|
|
1767
|
+
}
|
|
1768
|
+
} else g in c || (g = Mr(g) || g);
|
|
1769
|
+
if (S || (f || f === 0) && (p || p === 0) && !cr.test(d) && g in c) _ = (u + "").substr((p + "").length), f ||= 0, b = W(d) || (g in a.units ? a.units[g] : _), _ !== b && (p = Hr(e, g, u, b)), this._pt = new Y(this._pt, S ? w : c, g, p, (x ? we(p, x + f) : f) - p, !S && (b === "px" || g === "zIndex") && t.autoRound !== !1 ? mr : ur), this._pt.u = b || 0, S && O !== d ? (this._pt.b = u, this._pt.e = O, this._pt.r = pr) : _ !== b && b !== "%" && (this._pt.b = u, this._pt.r = fr);
|
|
1770
|
+
else if (g in c) Wr.call(this, e, g, u, x ? x + d : d);
|
|
1771
|
+
else if (g in e) this.add(e, g, u || e[g], x ? x + d : d, r, o);
|
|
1772
|
+
else if (g !== "parseTransform") {
|
|
1773
|
+
ae(g, d);
|
|
1774
|
+
continue;
|
|
1775
|
+
}
|
|
1776
|
+
S || (g in c ? D.push(g, 0, c[g]) : typeof e[g] == "function" ? D.push(g, 2, e[g]()) : D.push(g, 1, u || e[g])), s.push(g);
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
E && Nn(this);
|
|
1780
|
+
},
|
|
1781
|
+
render: function(e, t) {
|
|
1782
|
+
if (t.tween._time || !$n()) for (var n = t._pt; n;) n.r(e, n.d), n = n._next;
|
|
1783
|
+
else t.styles.revert();
|
|
1784
|
+
},
|
|
1785
|
+
get: Ur,
|
|
1786
|
+
aliases: lr,
|
|
1787
|
+
getSetter: function(e, t, n) {
|
|
1788
|
+
var r = lr[t];
|
|
1789
|
+
return r && r.indexOf(",") < 0 && (t = r), t in tr && t !== Cr && (e._gsap.x || Ur(e, "x")) ? n && Qn === n ? t === "scale" ? br : yr : (Qn = n || {}) && (t === "scale" ? xr : Sr) : e.style && !S(e.style[t]) ? _r : ~t.indexOf("-") ? vr : Tn(e, t);
|
|
1790
|
+
},
|
|
1791
|
+
core: {
|
|
1792
|
+
_removeProperty: Rr,
|
|
1793
|
+
_getMatrix: $r
|
|
1794
|
+
}
|
|
1795
|
+
};
|
|
1796
|
+
X.utils.checkPrefix = Mr, X.core.getStyleSaver = Dr, (function(e, t, n, r) {
|
|
1797
|
+
var o = V(e + "," + t + "," + n, function(e) {
|
|
1798
|
+
tr[e] = 1;
|
|
1799
|
+
});
|
|
1800
|
+
V(t, function(e) {
|
|
1801
|
+
a.units[e] = "deg", Xr[e] = 1;
|
|
1802
|
+
}), lr[o[13]] = e + "," + t, V(r, function(e) {
|
|
1803
|
+
var t = e.split(":");
|
|
1804
|
+
lr[t[1]] = o[t[0]];
|
|
1805
|
+
});
|
|
1806
|
+
})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent", "rotation,rotationX,rotationY,skewX,skewY", "transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"), V("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function(e) {
|
|
1807
|
+
a.units[e] = "px";
|
|
1808
|
+
}), X.registerPlugin(pi);
|
|
1809
|
+
//#endregion
|
|
1810
|
+
//#region node_modules/.pnpm/gsap@3.15.0/node_modules/gsap/index.js
|
|
1811
|
+
var mi = X.registerPlugin(pi) || X;
|
|
1812
|
+
mi.core.Tween, mi.config({ autoSleep: 0 }), mi.ticker.lagSmoothing(0);
|
|
1813
|
+
var hi = {
|
|
1814
|
+
"Linear.easeNone": "none",
|
|
1815
|
+
"Power0.easeNone": "none",
|
|
1816
|
+
"Power1.easeIn": "power1.in",
|
|
1817
|
+
"Power1.easeOut": "power1.out",
|
|
1818
|
+
"Power1.easeInOut": "power1.inOut",
|
|
1819
|
+
"Power2.easeIn": "power2.in",
|
|
1820
|
+
"Power2.easeOut": "power2.out",
|
|
1821
|
+
"Power2.easeInOut": "power2.inOut",
|
|
1822
|
+
"Power3.easeIn": "power3.in",
|
|
1823
|
+
"Power3.easeOut": "power3.out",
|
|
1824
|
+
"Power3.easeInOut": "power3.inOut",
|
|
1825
|
+
"Power4.easeIn": "power4.in",
|
|
1826
|
+
"Power4.easeOut": "power4.out",
|
|
1827
|
+
"Power4.easeInOut": "power4.inOut",
|
|
1828
|
+
"Sine.easeIn": "sine.in",
|
|
1829
|
+
"Sine.easeOut": "sine.out",
|
|
1830
|
+
"Sine.easeInOut": "sine.inOut",
|
|
1831
|
+
"Quad.easeIn": "power1.in",
|
|
1832
|
+
"Quad.easeOut": "power1.out",
|
|
1833
|
+
"Quad.easeInOut": "power1.inOut",
|
|
1834
|
+
"Cubic.easeIn": "power2.in",
|
|
1835
|
+
"Cubic.easeOut": "power2.out",
|
|
1836
|
+
"Cubic.easeInOut": "power2.inOut",
|
|
1837
|
+
"Quart.easeIn": "power3.in",
|
|
1838
|
+
"Quart.easeOut": "power3.out",
|
|
1839
|
+
"Quart.easeInOut": "power3.inOut",
|
|
1840
|
+
"Quint.easeIn": "power4.in",
|
|
1841
|
+
"Quint.easeOut": "power4.out",
|
|
1842
|
+
"Quint.easeInOut": "power4.inOut",
|
|
1843
|
+
"Strong.easeIn": "power4.in",
|
|
1844
|
+
"Strong.easeOut": "power4.out",
|
|
1845
|
+
"Strong.easeInOut": "power4.inOut"
|
|
1846
|
+
};
|
|
1847
|
+
function gi(e) {
|
|
1848
|
+
if (typeof e != "string") return e;
|
|
1849
|
+
let t = e.trim();
|
|
1850
|
+
if (t === "") return e;
|
|
1851
|
+
if (hi[t]) return hi[t];
|
|
1852
|
+
let n = t.match(/^([a-z]+)\.(easeIn|easeOut|easeInOut)$/i);
|
|
1853
|
+
return n ? `${n[1].toLowerCase()}.${n[2].replace("ease", "").replace("InOut", "inOut").replace("In", "in").replace("Out", "out")}` : t;
|
|
1854
|
+
}
|
|
1855
|
+
function Q(e, n) {
|
|
1856
|
+
let r = {
|
|
1857
|
+
canvasId: "canvas",
|
|
1858
|
+
centerX: null,
|
|
1859
|
+
centerY: null,
|
|
1860
|
+
outerRadius: null,
|
|
1861
|
+
innerRadius: 0,
|
|
1862
|
+
numSegments: 1,
|
|
1863
|
+
drawMode: "code",
|
|
1864
|
+
rotationAngle: 0,
|
|
1865
|
+
textFontFamily: "Arial",
|
|
1866
|
+
textFontSize: 20,
|
|
1867
|
+
textFontWeight: "bold",
|
|
1868
|
+
textOrientation: "horizontal",
|
|
1869
|
+
textAlignment: "center",
|
|
1870
|
+
textDirection: "normal",
|
|
1871
|
+
textMargin: null,
|
|
1872
|
+
textFillStyle: "black",
|
|
1873
|
+
textStrokeStyle: null,
|
|
1874
|
+
textLineWidth: 1,
|
|
1875
|
+
fillStyle: "silver",
|
|
1876
|
+
strokeStyle: "black",
|
|
1877
|
+
lineWidth: 1,
|
|
1878
|
+
clearTheCanvas: !0,
|
|
1879
|
+
imageOverlay: !1,
|
|
1880
|
+
drawText: !0,
|
|
1881
|
+
pointerAngle: 0,
|
|
1882
|
+
wheelImage: null,
|
|
1883
|
+
imageDirection: "N"
|
|
1884
|
+
};
|
|
1885
|
+
for (var a in r) e != null && e[a] !== void 0 ? this[a] = e[a] : this[a] = r[a];
|
|
1886
|
+
if (e != null) for (var a in e) this[a] === void 0 && (this[a] = e[a]);
|
|
1887
|
+
if (this.canvasId) {
|
|
1888
|
+
let e = this.canvasId === "wheel" ? "ft-wheel-customizable" : "ft-wheel-legacy";
|
|
1889
|
+
this.canvas = document.getElementById(this.canvasId) || document.querySelector("ft-wheel-component")?.shadowRoot?.querySelector(e)?.shadowRoot?.getElementById(this.canvasId), this.canvas ? (this.centerX ??= this.canvas.width / 2, this.centerY ??= this.canvas.height / 2, this.outerRadius ?? (this.canvas.width < this.canvas.height ? this.outerRadius = this.canvas.width / 2 - this.lineWidth : this.outerRadius = this.canvas.height / 2 - this.lineWidth), this.ctx = this.canvas.getContext("2d")) : (this.canvas = null, this.ctx = null);
|
|
1890
|
+
} else this.cavnas = null, this.ctx = null;
|
|
1891
|
+
this.segments = [null];
|
|
1892
|
+
for (let t = 1; t <= this.numSegments; t++) e != null && e.segments && e.segments[t - 1] !== void 0 ? this.segments[t] = new yi(e.segments[t - 1]) : this.segments[t] = new yi();
|
|
1893
|
+
if (this.updateSegmentSizes(), this.textMargin === null && (this.textMargin = this.textFontSize / 1.7), e != null && e.animation && e.animation !== void 0 ? this.animation = new vi(e.animation) : this.animation = new vi(), e != null && e.pins && e.pins !== void 0 && (this.pins = new _i(e.pins)), this.drawMode == "image" || this.drawMode == "segmentImage" ? (e.fillStyle === void 0 && (this.fillStyle = null), e.strokeStyle === void 0 && (this.strokeStyle = "red"), e.drawText === void 0 && (this.drawText = !1), e.lineWidth === void 0 && (this.lineWidth = 1), n === void 0 && (n = !1)) : n === void 0 && (n = !0), e != null && e.pointerGuide && e.pointerGuide !== void 0 ? this.pointerGuide = new bi(e.pointerGuide) : this.pointerGuide = new bi(), n == 1) this.draw(this.clearTheCanvas);
|
|
1894
|
+
else if (this.drawMode == "segmentImage") for ($ = this, Ci = !1, y = 1; y <= this.numSegments; y++) this.segments[y].image !== null && (this.segments[y].imgData = new Image(), this.segments[y].imgData.onload = t(wi), this.segments[y].imgData.src = this.segments[y].image);
|
|
1895
|
+
}
|
|
1896
|
+
Q.prototype.updateSegmentSizes = function() {
|
|
1897
|
+
if (this.segments) {
|
|
1898
|
+
var e = 0, t = 0;
|
|
1899
|
+
for (let n = 1; n <= this.numSegments; n++) this.segments[n].size !== null && (e += this.segments[n].size, t++);
|
|
1900
|
+
var n = 360 - e, r = 0;
|
|
1901
|
+
n > 0 && (r = n / (this.numSegments - t));
|
|
1902
|
+
var a = 0;
|
|
1903
|
+
for (let e = 1; e <= this.numSegments; e++) this.segments[e].startAngle = a, this.segments[e].size ? a += this.segments[e].size : a += r, this.segments[e].endAngle = a;
|
|
1904
|
+
}
|
|
1905
|
+
}, Q.prototype.clearCanvas = function() {
|
|
1906
|
+
this.ctx && this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
1907
|
+
}, Q.prototype.draw = function(e) {
|
|
1908
|
+
this.ctx && ((e === void 0 || e == 1) && this.clearCanvas(), this.drawMode == "image" ? (this.drawWheelImage(), this.drawText == 1 && this.drawSegmentText(), this.imageOverlay == 1 && this.drawSegments()) : this.drawMode == "segmentImage" ? (this.drawSegmentImages(), this.drawText == 1 && this.drawSegmentText(), this.imageOverlay == 1 && this.drawSegments()) : (this.drawSegments(), this.drawText == 1 && this.drawSegmentText()), this.pins !== void 0 && this.pins.visible == 1 && this.drawPins(), this.pointerGuide.display == 1 && this.drawPointerGuide());
|
|
1909
|
+
}, Q.prototype.drawPins = function() {
|
|
1910
|
+
if (this.pins && this.pins.number) {
|
|
1911
|
+
var e = 360 / this.pins.number;
|
|
1912
|
+
for (i = 1; i <= this.pins.number; i++) this.ctx.save(), this.ctx.strokeStyle = this.pins.strokeStyle, this.ctx.lineWidth = this.pins.lineWidth, this.ctx.fillStyle = this.pins.fillStyle, this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(this.degToRad(i * e + this.rotationAngle)), this.ctx.translate(-this.centerX, -this.centerY), this.ctx.beginPath(), this.ctx.arc(this.centerX, this.centerY - this.outerRadius + this.pins.outerRadius + this.pins.margin, this.pins.outerRadius, 0, 2 * Math.PI), this.pins.fillStyle && this.ctx.fill(), this.pins.strokeStyle && this.ctx.stroke(), this.ctx.restore();
|
|
1913
|
+
}
|
|
1914
|
+
}, Q.prototype.drawPointerGuide = function() {
|
|
1915
|
+
this.ctx && (this.ctx.save(), this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(this.degToRad(this.pointerAngle)), this.ctx.translate(-this.centerX, -this.centerY), this.ctx.strokeStyle = this.pointerGuide.strokeStyle, this.ctx.lineWidth = this.pointerGuide.lineWidth, this.ctx.beginPath(), this.ctx.moveTo(this.centerX, this.centerY), this.ctx.lineTo(this.centerX, -(this.outerRadius / 4)), this.ctx.stroke(), this.ctx.restore());
|
|
1916
|
+
}, Q.prototype.drawWheelImage = function() {
|
|
1917
|
+
if (this.wheelImage != null) {
|
|
1918
|
+
var e = this.centerX - this.canvas.height / 2, t = this.centerY - this.canvas.width / 2;
|
|
1919
|
+
this.ctx.webkitImageSmoothingEnabled = !0, this.ctx.mozImageSmoothingEnabled = !0, this.ctx.imageSmoothingEnabled = !0, this.ctx.save(), this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(this.degToRad(this.rotationAngle)), this.ctx.translate(-this.centerX, -this.centerY), this.ctx.imageSmoothingQuality = "high", this.ctx.drawImage(this.wheelImage, e, t, this.canvas.width, this.canvas.height), this.ctx.restore();
|
|
1920
|
+
}
|
|
1921
|
+
}, Q.prototype.drawSegmentImages = function() {
|
|
1922
|
+
if (this.ctx && this.segments) for (let a = 1; a <= this.numSegments; a++) if (seg = this.segments[a], seg.imgData.height) {
|
|
1923
|
+
var e = 0, t = 0, n = 0, r = "";
|
|
1924
|
+
r = seg.imageDirection === null ? this.imageDirection : seg.imageDirection, r == "S" ? (e = this.centerX - seg.imgData.width / 2, t = this.centerY, n = seg.startAngle + 180 + (seg.endAngle - seg.startAngle) / 2) : r == "E" ? (e = this.centerX, t = this.centerY - seg.imgData.height / 2, n = seg.startAngle + 270 + (seg.endAngle - seg.startAngle) / 2) : r == "W" ? (e = this.centerX - seg.imgData.width, t = this.centerY - seg.imgData.height / 2, n = seg.startAngle + 90 + (seg.endAngle - seg.startAngle) / 2) : (e = this.centerX - seg.imgData.width / 2, t = this.centerY - seg.imgData.height, n = seg.startAngle + (seg.endAngle - seg.startAngle) / 2), this.ctx.save(), this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(this.degToRad(this.rotationAngle + n)), this.ctx.translate(-this.centerX, -this.centerY), this.ctx.drawImage(seg.imgData, e, t), this.ctx.restore();
|
|
1925
|
+
} else console.info("Segment " + a + " imgData is not loaded");
|
|
1926
|
+
}, Q.prototype.drawSegments = function() {
|
|
1927
|
+
if (this.ctx && this.segments) for (let r = 1; r <= this.numSegments; r++) {
|
|
1928
|
+
seg = this.segments[r];
|
|
1929
|
+
var e = seg.fillStyle === null ? this.fillStyle : seg.fillStyle, t, n;
|
|
1930
|
+
this.ctx.fillStyle = e, t = seg.lineWidth === null ? this.lineWidth : seg.lineWidth, this.ctx.lineWidth = t, n = seg.strokeStyle === null ? this.strokeStyle : seg.strokeStyle, this.ctx.strokeStyle = n, (n || e) && (this.ctx.beginPath(), this.innerRadius || this.ctx.moveTo(this.centerX, this.centerY), this.ctx.arc(this.centerX, this.centerY, this.outerRadius, this.degToRad(seg.startAngle + this.rotationAngle - 90), this.degToRad(seg.endAngle + this.rotationAngle - 90), !1), this.innerRadius ? this.ctx.arc(this.centerX, this.centerY, this.innerRadius, this.degToRad(seg.endAngle + this.rotationAngle - 90), this.degToRad(seg.startAngle + this.rotationAngle - 90), !0) : this.ctx.lineTo(this.centerX, this.centerY), e && this.ctx.fill(), n && this.ctx.stroke());
|
|
1931
|
+
}
|
|
1932
|
+
}, Q.prototype.drawSegmentText = function() {
|
|
1933
|
+
if (this.ctx) {
|
|
1934
|
+
var e, t, n, r, a, o, s, c, l, u, d;
|
|
1935
|
+
for (let C = 1; C <= this.numSegments; C++) {
|
|
1936
|
+
if (this.ctx.save(), seg = this.segments[C], seg.text) {
|
|
1937
|
+
e = seg.textFontFamily === null ? this.textFontFamily : seg.textFontFamily, t = seg.textFontSize === null ? this.textFontSize : seg.textFontSize, n = seg.textFontWeight === null ? this.textFontWeight : seg.textFontWeight, r = seg.textOrientation === null ? this.textOrientation : seg.textOrientation, a = seg.textAlignment === null ? this.textAlignment : seg.textAlignment, o = seg.textDirection === null ? this.textDirection : seg.textDirection, s = seg.textMargin === null ? this.textMargin : seg.textMargin, c = seg.textFillStyle === null ? this.textFillStyle : seg.textFillStyle, l = seg.textStrokeStyle === null ? this.textStrokeStyle : seg.textStrokeStyle, u = seg.textLineWidth === null ? this.textLineWidth : seg.textLineWidth, d = "", n != null && (d += n + " "), t != null && (d += t + "px "), e != null && (d += e), this.ctx.font = d, this.ctx.fillStyle = c, this.ctx.strokeStyle = l, this.ctx.lineWidth = u;
|
|
1938
|
+
var f = seg.text.split("\n"), p = 0 - t * (f.length / 2) + t / 2;
|
|
1939
|
+
for (r == "curved" && (a == "inner" || a == "outer") && (p = 0), i = 0; i < f.length; i++) {
|
|
1940
|
+
if (o == "reversed") {
|
|
1941
|
+
if (r == "horizontal") {
|
|
1942
|
+
a == "inner" ? this.ctx.textAlign = "right" : a == "outer" ? this.ctx.textAlign = "left" : this.ctx.textAlign = "center", this.ctx.textBaseline = "middle";
|
|
1943
|
+
var m = this.degToRad(seg.endAngle - (seg.endAngle - seg.startAngle) / 2 + this.rotationAngle - 90 - 180);
|
|
1944
|
+
this.ctx.save(), this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(m), this.ctx.translate(-this.centerX, -this.centerY), a == "inner" ? (c && this.ctx.fillText(f[i], this.centerX - this.innerRadius - s, this.centerY + p), l && this.ctx.strokeText(f[i], this.centerX - this.innerRadius - s, this.centerY + p)) : a == "outer" ? (c && this.ctx.fillText(f[i], this.centerX - this.outerRadius + s, this.centerY + p), l && this.ctx.strokeText(f[i], this.centerX - this.outerRadius + s, this.centerY + p)) : (c && this.ctx.fillText(f[i], this.centerX - this.innerRadius - (this.outerRadius - this.innerRadius) / 2 - s, this.centerY + p), l && this.ctx.strokeText(f[i], this.centerX - this.innerRadius - (this.outerRadius - this.innerRadius) / 2 - s, this.centerY + p)), this.ctx.restore();
|
|
1945
|
+
} else if (r == "vertical") {
|
|
1946
|
+
this.ctx.textAlign = "center", a == "inner" ? this.ctx.textBaseline = "top" : a == "outer" ? this.ctx.textBaseline = "bottom" : this.ctx.textBaseline = "middle";
|
|
1947
|
+
var m = seg.endAngle - (seg.endAngle - seg.startAngle) / 2 - 180;
|
|
1948
|
+
if (m += this.rotationAngle, this.ctx.save(), this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(this.degToRad(m)), this.ctx.translate(-this.centerX, -this.centerY), a == "outer") var h = this.centerY + this.outerRadius - s;
|
|
1949
|
+
else if (a == "inner") var h = this.centerY + this.innerRadius + s;
|
|
1950
|
+
var g = t - t / 9;
|
|
1951
|
+
if (a == "outer") for (var _ = f[i].length - 1; _ >= 0; _--) character = f[i].charAt(_), c && this.ctx.fillText(character, this.centerX + p, h), l && this.ctx.strokeText(character, this.centerX + p, h), h -= g;
|
|
1952
|
+
else if (a == "inner") for (var _ = 0; _ < f[i].length; _++) character = f[i].charAt(_), c && this.ctx.fillText(character, this.centerX + p, h), l && this.ctx.strokeText(character, this.centerX + p, h), h += g;
|
|
1953
|
+
else if (a == "center") {
|
|
1954
|
+
var v = 0;
|
|
1955
|
+
f[i].length > 1 && (v = g * (f[i].length - 1) / 2);
|
|
1956
|
+
for (var h = this.centerY + this.innerRadius + (this.outerRadius - this.innerRadius) / 2 + v + s, _ = f[i].length - 1; _ >= 0; _--) character = f[i].charAt(_), c && this.ctx.fillText(character, this.centerX + p, h), l && this.ctx.strokeText(character, this.centerX + p, h), h -= g;
|
|
1957
|
+
}
|
|
1958
|
+
this.ctx.restore();
|
|
1959
|
+
} else if (r == "curved") {
|
|
1960
|
+
var b = 0;
|
|
1961
|
+
a == "inner" ? (b = this.innerRadius + s, this.ctx.textBaseline = "top") : a == "outer" ? (b = this.outerRadius - s, this.ctx.textBaseline = "bottom", b -= t * (f.length - 1)) : a == "center" && (b = this.innerRadius + s + (this.outerRadius - this.innerRadius) / 2, this.ctx.textBaseline = "middle");
|
|
1962
|
+
var x = 0, S = 0;
|
|
1963
|
+
for (f[i].length > 1 ? (this.ctx.textAlign = "left", x = t / 10 * 4, radiusPercent = 100 / b, x *= radiusPercent, totalArc = x * f[i].length, S = seg.startAngle + ((seg.endAngle - seg.startAngle) / 2 - totalArc / 2)) : (S = seg.startAngle + (seg.endAngle - seg.startAngle) / 2, this.ctx.textAlign = "center"), S += this.rotationAngle, S -= 180, _ = f[i].length; _ >= 0; _--) this.ctx.save(), character = f[i].charAt(_), this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(this.degToRad(S)), this.ctx.translate(-this.centerX, -this.centerY), l && this.ctx.strokeText(character, this.centerX, this.centerY + b + p), c && this.ctx.fillText(character, this.centerX, this.centerY + b + p), S += x, this.ctx.restore();
|
|
1964
|
+
}
|
|
1965
|
+
} else if (r == "horizontal") {
|
|
1966
|
+
a == "inner" ? this.ctx.textAlign = "left" : a == "outer" ? this.ctx.textAlign = "right" : this.ctx.textAlign = "center", this.ctx.textBaseline = "middle";
|
|
1967
|
+
var m = this.degToRad(seg.endAngle - (seg.endAngle - seg.startAngle) / 2 + this.rotationAngle - 90);
|
|
1968
|
+
this.ctx.save(), this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(m), this.ctx.translate(-this.centerX, -this.centerY), a == "inner" ? (c && this.ctx.fillText(f[i], this.centerX + this.innerRadius + s, this.centerY + p), l && this.ctx.strokeText(f[i], this.centerX + this.innerRadius + s, this.centerY + p)) : a == "outer" ? (c && this.ctx.fillText(f[i], this.centerX + this.outerRadius - s, this.centerY + p), l && this.ctx.strokeText(f[i], this.centerX + this.outerRadius - s, this.centerY + p)) : (c && this.ctx.fillText(f[i], this.centerX + this.innerRadius + (this.outerRadius - this.innerRadius) / 2 + s, this.centerY + p), l && this.ctx.strokeText(f[i], this.centerX + this.innerRadius + (this.outerRadius - this.innerRadius) / 2 + s, this.centerY + p)), this.ctx.restore();
|
|
1969
|
+
} else if (r == "vertical") {
|
|
1970
|
+
this.ctx.textAlign = "center", a == "inner" ? this.ctx.textBaseline = "bottom" : a == "outer" ? this.ctx.textBaseline = "top" : this.ctx.textBaseline = "middle";
|
|
1971
|
+
var m = seg.endAngle - (seg.endAngle - seg.startAngle) / 2;
|
|
1972
|
+
if (m += this.rotationAngle, this.ctx.save(), this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(this.degToRad(m)), this.ctx.translate(-this.centerX, -this.centerY), a == "outer") var h = this.centerY - this.outerRadius + s;
|
|
1973
|
+
else if (a == "inner") var h = this.centerY - this.innerRadius - s;
|
|
1974
|
+
var g = t - t / 9;
|
|
1975
|
+
if (a == "outer") for (var _ = 0; _ < f[i].length; _++) character = f[i].charAt(_), c && this.ctx.fillText(character, this.centerX + p, h), l && this.ctx.strokeText(character, this.centerX + p, h), h += g;
|
|
1976
|
+
else if (a == "inner") for (var _ = f[i].length - 1; _ >= 0; _--) character = f[i].charAt(_), c && this.ctx.fillText(character, this.centerX + p, h), l && this.ctx.strokeText(character, this.centerX + p, h), h -= g;
|
|
1977
|
+
else if (a == "center") {
|
|
1978
|
+
var v = 0;
|
|
1979
|
+
f[i].length > 1 && (v = g * (f[i].length - 1) / 2);
|
|
1980
|
+
for (var h = this.centerY - this.innerRadius - (this.outerRadius - this.innerRadius) / 2 - v - s, _ = 0; _ < f[i].length; _++) character = f[i].charAt(_), c && this.ctx.fillText(character, this.centerX + p, h), l && this.ctx.strokeText(character, this.centerX + p, h), h += g;
|
|
1981
|
+
}
|
|
1982
|
+
this.ctx.restore();
|
|
1983
|
+
} else if (r == "curved") {
|
|
1984
|
+
var b = 0;
|
|
1985
|
+
a == "inner" ? (b = this.innerRadius + s, this.ctx.textBaseline = "bottom", b += t * (f.length - 1)) : a == "outer" ? (b = this.outerRadius - s, this.ctx.textBaseline = "top") : a == "center" && (b = this.innerRadius + s + (this.outerRadius - this.innerRadius) / 2, this.ctx.textBaseline = "middle");
|
|
1986
|
+
var x = 0, S = 0;
|
|
1987
|
+
for (f[i].length > 1 ? (this.ctx.textAlign = "left", x = t / 10 * 4, radiusPercent = 100 / b, x *= radiusPercent, totalArc = x * f[i].length, S = seg.startAngle + ((seg.endAngle - seg.startAngle) / 2 - totalArc / 2)) : (S = seg.startAngle + (seg.endAngle - seg.startAngle) / 2, this.ctx.textAlign = "center"), S += this.rotationAngle, _ = 0; _ < f[i].length; _++) this.ctx.save(), character = f[i].charAt(_), this.ctx.translate(this.centerX, this.centerY), this.ctx.rotate(this.degToRad(S)), this.ctx.translate(-this.centerX, -this.centerY), l && this.ctx.strokeText(character, this.centerX, this.centerY - b + p), c && this.ctx.fillText(character, this.centerX, this.centerY - b + p), S += x, this.ctx.restore();
|
|
1988
|
+
}
|
|
1989
|
+
p += t;
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
this.ctx.restore();
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
}, Q.prototype.degToRad = function(e) {
|
|
1996
|
+
return e * .017453292519943295;
|
|
1997
|
+
}, Q.prototype.setCenter = function(e, t) {
|
|
1998
|
+
this.centerX = e, this.centerY = t;
|
|
1999
|
+
}, Q.prototype.addSegment = function(e, t) {
|
|
2000
|
+
newSegment = new yi(e), this.numSegments++;
|
|
2001
|
+
var n;
|
|
2002
|
+
if (t !== void 0) {
|
|
2003
|
+
for (var r = this.numSegments; r > t; r--) this.segments[r] = this.segments[r - 1];
|
|
2004
|
+
this.segments[t] = newSegment, n = t;
|
|
2005
|
+
} else this.segments[this.numSegments] = newSegment, n = this.numSegments;
|
|
2006
|
+
return this.updateSegmentSizes(), this.segments[n];
|
|
2007
|
+
}, Q.prototype.setCanvasId = function(e) {
|
|
2008
|
+
e ? (this.canvasId = e, this.canvas = document.getElementById(this.canvasId) || document.querySelector("ft-wheel-component").shadowRoot.getElementById(this.canvasId), this.canvas && (this.ctx = this.canvas.getContext("2d"))) : (this.canvasId = null, this.ctx = null, this.canvas = null);
|
|
2009
|
+
}, Q.prototype.deleteSegment = function(e) {
|
|
2010
|
+
if (this.numSegments > 1) {
|
|
2011
|
+
if (e !== void 0) for (var t = e; t < this.numSegments; t++) this.segments[t] = this.segments[t + 1];
|
|
2012
|
+
this.segments[this.numSegments] = void 0, this.numSegments--, this.updateSegmentSizes();
|
|
2013
|
+
}
|
|
2014
|
+
}, Q.prototype.windowToCanvas = function(e, t) {
|
|
2015
|
+
var n = this.canvas.getBoundingClientRect();
|
|
2016
|
+
return {
|
|
2017
|
+
x: Math.floor(e - n.left * (this.canvas.width / n.width)),
|
|
2018
|
+
y: Math.floor(t - n.top * (this.canvas.height / n.height))
|
|
2019
|
+
};
|
|
2020
|
+
}, Q.prototype.getSegmentAt = function(e, t) {
|
|
2021
|
+
var n = null, r = this.getSegmentNumberAt(e, t);
|
|
2022
|
+
return r !== null && (n = this.segments[r]), n;
|
|
2023
|
+
}, Q.prototype.getSegmentNumberAt = function(e, t) {
|
|
2024
|
+
var n = this.windowToCanvas(e, t), r, a, o, s, c;
|
|
2025
|
+
n.x > this.centerX ? (o = n.x - this.centerX, a = "R") : (o = this.centerX - n.x, a = "L"), n.y > this.centerY ? (s = n.y - this.centerY, r = "B") : (s = this.centerY - n.y, r = "T");
|
|
2026
|
+
var l = s / o, u = Math.atan(l) * 180 / Math.PI, d = 0;
|
|
2027
|
+
if (c = Math.sqrt(s * s + o * o), r == "T" && a == "R" ? d = Math.round(90 - u) : r == "B" && a == "R" ? d = Math.round(u + 90) : r == "B" && a == "L" ? d = Math.round(90 - u + 180) : r == "T" && a == "L" && (d = Math.round(u + 270)), this.rotationAngle != 0) {
|
|
2028
|
+
var f = this.getRotationPosition();
|
|
2029
|
+
d -= f, d < 0 && (d = 360 - Math.abs(d));
|
|
2030
|
+
}
|
|
2031
|
+
for (var p = null, e = 1; e <= this.numSegments; e++) if (d >= this.segments[e].startAngle && d <= this.segments[e].endAngle && c >= this.innerRadius && c <= this.outerRadius) {
|
|
2032
|
+
p = e;
|
|
2033
|
+
break;
|
|
2034
|
+
}
|
|
2035
|
+
return p;
|
|
2036
|
+
}, Q.prototype.getIndicatedSegment = function() {
|
|
2037
|
+
var e = this.getIndicatedSegmentNumber();
|
|
2038
|
+
return this.segments[e];
|
|
2039
|
+
}, Q.prototype.getIndicatedSegmentNumber = function() {
|
|
2040
|
+
var e = 0, t = this.getRotationPosition(), n = Math.floor(this.pointerAngle - t);
|
|
2041
|
+
n < 0 && (n = 360 - Math.abs(n));
|
|
2042
|
+
for (let t = 1; t < this.segments.length; t++) if (n >= this.segments[t].startAngle && n <= this.segments[t].endAngle) {
|
|
2043
|
+
e = t;
|
|
2044
|
+
break;
|
|
2045
|
+
}
|
|
2046
|
+
return e;
|
|
2047
|
+
}, Q.prototype.getRotationPosition = function() {
|
|
2048
|
+
var e = this.rotationAngle;
|
|
2049
|
+
if (e >= 0) {
|
|
2050
|
+
if (e > 360) {
|
|
2051
|
+
var t = Math.floor(e / 360);
|
|
2052
|
+
e -= 360 * t;
|
|
2053
|
+
}
|
|
2054
|
+
} else {
|
|
2055
|
+
if (e < -360) {
|
|
2056
|
+
var t = Math.ceil(e / 360);
|
|
2057
|
+
e -= 360 * t;
|
|
2058
|
+
}
|
|
2059
|
+
e = 360 + e;
|
|
2060
|
+
}
|
|
2061
|
+
return e;
|
|
2062
|
+
}, Q.prototype.startAnimation = function() {
|
|
2063
|
+
if (this.animation) {
|
|
2064
|
+
this.computeAnimation(), $ = this;
|
|
2065
|
+
var e = {};
|
|
2066
|
+
if (this.animation.propertyName && (e[this.animation.propertyName] = this.animation.propertyValue), e.yoyo = this.animation.yoyo, e.repeat = this.animation.repeat, e.overwrite = "auto", this.animation.easing) {
|
|
2067
|
+
let t = gi(this.animation.easing);
|
|
2068
|
+
this.animation.easing = t, e.ease = t;
|
|
2069
|
+
}
|
|
2070
|
+
e.onUpdate = t(xi), e.onComplete = t(Si), typeof this.animation.onRepeat == "function" && (e.onRepeat = this.animation.onRepeat), this.tween = mi.to(this, this.animation.duration, e);
|
|
2071
|
+
}
|
|
2072
|
+
}, Q.prototype.stopAnimation = function(e) {
|
|
2073
|
+
$ && ($.tween && $.tween.kill(), Si(e)), $ = this;
|
|
2074
|
+
}, Q.prototype.pauseAnimation = function() {
|
|
2075
|
+
this.tween && this.tween.pause();
|
|
2076
|
+
}, Q.prototype.resumeAnimation = function() {
|
|
2077
|
+
this.tween && this.tween.play();
|
|
2078
|
+
}, Q.prototype.computeAnimation = function() {
|
|
2079
|
+
this.animation && (this.animation.type == "spinOngoing" ? (this.animation.propertyName = "rotationAngle", this.animation.spins ?? (this.animation.spins = 5), this.animation.repeat ?? (this.animation.repeat = -1), this.animation.easing ?? (this.animation.easing = "Linear.easeNone"), this.animation.yoyo ?? (this.animation.yoyo = !1), this.animation.propertyValue = this.animation.spins * 360, this.animation.offset && (this.animation.propertyValue += this.animation.offset), this.animation.direction == "anti-clockwise" && (this.animation.propertyValue = 0 - this.animation.propertyValue)) : this.animation.type == "spinToStop" ? (this.animation.propertyName = "rotationAngle", this.animation.spins ?? (this.animation.spins = 5), this.animation.repeat ?? (this.animation.repeat = 0), this.animation.easing ?? (this.animation.easing = "Power4.easeOut"), this.animation.stopAngle == null ? this.animation._stopAngle = Math.floor(Math.random() * 359) : this.animation._stopAngle = 360 - this.animation.stopAngle + this.pointerAngle, this.animation.yoyo ?? (this.animation.yoyo = !1), this.animation.propertyValue = this.animation.spins * 360, this.animation.direction == "anti-clockwise" ? (this.animation.propertyValue = 0 - this.animation.propertyValue, this.animation.propertyValue -= 360 - this.animation._stopAngle) : this.animation.propertyValue += this.animation._stopAngle) : this.animation.type == "spinAndBack" ? (this.animation.propertyName = "rotationAngle", this.animation.spins ?? (this.animation.spins = 5), this.animation.repeat ?? (this.animation.repeat = 1), this.animation.easing ?? (this.animation.easing = "Power2.easeInOut"), this.animation.yoyo ?? (this.animation.yoyo = !0), this.animation.stopAngle == null ? this.animation._stopAngle = 0 : this.animation._stopAngle = 360 - this.animation.stopAngle, this.animation.propertyValue = this.animation.spins * 360, this.animation.direction == "anti-clockwise" ? (this.animation.propertyValue = 0 - this.animation.propertyValue, this.animation.propertyValue -= 360 - this.animation._stopAngle) : this.animation.propertyValue += this.animation._stopAngle) : this.animation.type);
|
|
2080
|
+
}, Q.prototype.getRandomForSegment = function(e) {
|
|
2081
|
+
var t = 0;
|
|
2082
|
+
if (e) if (this.segments[e] !== void 0) {
|
|
2083
|
+
var n = this.segments[e].startAngle, r = this.segments[e].endAngle - n - 2;
|
|
2084
|
+
r > 0 ? t = n + 1 + Math.floor(Math.random() * r) : console.warn("Segment size is too small to safely get random angle inside it");
|
|
2085
|
+
} else console.info("Segment " + e + " undefined");
|
|
2086
|
+
else console.warn("Segment number not specified");
|
|
2087
|
+
return t;
|
|
2088
|
+
};
|
|
2089
|
+
function _i(e) {
|
|
2090
|
+
let t = {
|
|
2091
|
+
visible: !0,
|
|
2092
|
+
number: 36,
|
|
2093
|
+
outerRadius: 3,
|
|
2094
|
+
fillStyle: "grey",
|
|
2095
|
+
strokeStyle: "black",
|
|
2096
|
+
lineWidth: 1,
|
|
2097
|
+
margin: 3
|
|
2098
|
+
};
|
|
2099
|
+
for (var n in t) e != null && e[n] !== void 0 ? this[n] = e[n] : this[n] = t[n];
|
|
2100
|
+
if (e != null) for (var n in e) this[n] === void 0 && (this[n] = e[n]);
|
|
2101
|
+
}
|
|
2102
|
+
function vi(e) {
|
|
2103
|
+
let t = {
|
|
2104
|
+
type: "spinOngoing",
|
|
2105
|
+
direction: "clockwise",
|
|
2106
|
+
propertyName: null,
|
|
2107
|
+
propertyValue: null,
|
|
2108
|
+
duration: 10,
|
|
2109
|
+
yoyo: !1,
|
|
2110
|
+
repeat: 0,
|
|
2111
|
+
easing: "power3.easeOut",
|
|
2112
|
+
stopAngle: null,
|
|
2113
|
+
spins: null,
|
|
2114
|
+
clearTheCanvas: null,
|
|
2115
|
+
callbackFinished: null,
|
|
2116
|
+
callbackBefore: null,
|
|
2117
|
+
callbackAfter: null
|
|
2118
|
+
};
|
|
2119
|
+
for (var n in t) e != null && e[n] !== void 0 ? this[n] = e[n] : this[n] = t[n];
|
|
2120
|
+
if (e != null) for (var n in e) this[n] === void 0 && (this[n] = e[n]);
|
|
2121
|
+
}
|
|
2122
|
+
function yi(e) {
|
|
2123
|
+
let t = {
|
|
2124
|
+
size: null,
|
|
2125
|
+
text: "",
|
|
2126
|
+
fillStyle: null,
|
|
2127
|
+
strokeStyle: null,
|
|
2128
|
+
lineWidth: null,
|
|
2129
|
+
textFontFamily: null,
|
|
2130
|
+
textFontSize: null,
|
|
2131
|
+
textFontWeight: null,
|
|
2132
|
+
textOrientation: null,
|
|
2133
|
+
textAlignment: null,
|
|
2134
|
+
textDirection: null,
|
|
2135
|
+
textMargin: null,
|
|
2136
|
+
textFillStyle: null,
|
|
2137
|
+
textStrokeStyle: null,
|
|
2138
|
+
textLineWidth: null,
|
|
2139
|
+
image: null,
|
|
2140
|
+
imageDirection: null,
|
|
2141
|
+
imgData: null
|
|
2142
|
+
};
|
|
2143
|
+
for (var n in t) e != null && e[n] !== void 0 ? this[n] = e[n] : this[n] = t[n];
|
|
2144
|
+
if (e != null) for (var n in e) this[n] === void 0 && (this[n] = e[n]);
|
|
2145
|
+
this.startAngle = 0, this.endAngle = 0;
|
|
2146
|
+
}
|
|
2147
|
+
yi.prototype.changeImage = function(e, n) {
|
|
2148
|
+
this.image = e, this.imgData = null, n && (this.imageDirection = n), Ci = !1, this.imgData = new Image(), this.imgData.onload = t(wi), this.imgData.src = this.image;
|
|
2149
|
+
};
|
|
2150
|
+
function bi(e) {
|
|
2151
|
+
let t = {
|
|
2152
|
+
display: !1,
|
|
2153
|
+
strokeStyle: "red",
|
|
2154
|
+
lineWidth: 3
|
|
2155
|
+
};
|
|
2156
|
+
for (var n in t) e != null && e[n] !== void 0 ? this[n] = e[n] : this[n] = t[n];
|
|
2157
|
+
}
|
|
2158
|
+
function xi() {
|
|
2159
|
+
$ && ($.animation.clearTheCanvas != 0 && $.ctx.clearRect(0, 0, $.canvas.width, $.canvas.height), typeof $.animation.callbackBefore == "function" && $.animation.callbackBefore(), $.draw(!1), typeof $?.animation.callbackAfter == "function" && $.animation.callbackAfter());
|
|
2160
|
+
}
|
|
2161
|
+
var $ = null;
|
|
2162
|
+
function Si(e) {
|
|
2163
|
+
$ && e != 0 && $.animation.callbackFinished != null && $.animation.callbackFinished();
|
|
2164
|
+
}
|
|
2165
|
+
var Ci = !1;
|
|
2166
|
+
function wi() {
|
|
2167
|
+
if (Ci == 0) {
|
|
2168
|
+
var e = 0;
|
|
2169
|
+
for (i = 1; i <= $.numSegments; i++) $.segments[i].imgData != null && $.segments[i].imgData.height && e++;
|
|
2170
|
+
e == $.numSegments && (Ci = !0, $.draw());
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
//#endregion
|
|
2174
|
+
//#region src/core/runtime/sdkCallback.engine.ts
|
|
2175
|
+
var Ti = (/* @__PURE__ */ e(((e) => {
|
|
2176
|
+
(function() {
|
|
2177
|
+
var t = function() {
|
|
2178
|
+
this.init();
|
|
2179
|
+
};
|
|
2180
|
+
t.prototype = {
|
|
2181
|
+
init: function() {
|
|
2182
|
+
var e = this || n;
|
|
2183
|
+
return e._counter = 1e3, e._html5AudioPool = [], e.html5PoolSize = 10, e._codecs = {}, e._howls = [], e._muted = !1, e._volume = 1, e._canPlayEvent = "canplaythrough", e._navigator = typeof window < "u" && window.navigator ? window.navigator : null, e.masterGain = null, e.noAudio = !1, e.usingWebAudio = !0, e.autoSuspend = !0, e.ctx = null, e.autoUnlock = !0, e._setup(), e;
|
|
2184
|
+
},
|
|
2185
|
+
volume: function(e) {
|
|
2186
|
+
var t = this || n;
|
|
2187
|
+
if (e = parseFloat(e), t.ctx || d(), e !== void 0 && e >= 0 && e <= 1) {
|
|
2188
|
+
if (t._volume = e, t._muted) return t;
|
|
2189
|
+
t.usingWebAudio && t.masterGain.gain.setValueAtTime(e, n.ctx.currentTime);
|
|
2190
|
+
for (var r = 0; r < t._howls.length; r++) if (!t._howls[r]._webAudio) for (var a = t._howls[r]._getSoundIds(), o = 0; o < a.length; o++) {
|
|
2191
|
+
var s = t._howls[r]._soundById(a[o]);
|
|
2192
|
+
s && s._node && (s._node.volume = s._volume * e);
|
|
2193
|
+
}
|
|
2194
|
+
return t;
|
|
2195
|
+
}
|
|
2196
|
+
return t._volume;
|
|
2197
|
+
},
|
|
2198
|
+
mute: function(e) {
|
|
2199
|
+
var t = this || n;
|
|
2200
|
+
t.ctx || d(), t._muted = e, t.usingWebAudio && t.masterGain.gain.setValueAtTime(e ? 0 : t._volume, n.ctx.currentTime);
|
|
2201
|
+
for (var r = 0; r < t._howls.length; r++) if (!t._howls[r]._webAudio) for (var a = t._howls[r]._getSoundIds(), o = 0; o < a.length; o++) {
|
|
2202
|
+
var s = t._howls[r]._soundById(a[o]);
|
|
2203
|
+
s && s._node && (s._node.muted = e ? !0 : s._muted);
|
|
2204
|
+
}
|
|
2205
|
+
return t;
|
|
2206
|
+
},
|
|
2207
|
+
stop: function() {
|
|
2208
|
+
for (var e = this || n, t = 0; t < e._howls.length; t++) e._howls[t].stop();
|
|
2209
|
+
return e;
|
|
2210
|
+
},
|
|
2211
|
+
unload: function() {
|
|
2212
|
+
for (var e = this || n, t = e._howls.length - 1; t >= 0; t--) e._howls[t].unload();
|
|
2213
|
+
return e.usingWebAudio && e.ctx && e.ctx.close !== void 0 && (e.ctx.close(), e.ctx = null, d()), e;
|
|
2214
|
+
},
|
|
2215
|
+
codecs: function(e) {
|
|
2216
|
+
return (this || n)._codecs[e.replace(/^x-/, "")];
|
|
2217
|
+
},
|
|
2218
|
+
_setup: function() {
|
|
2219
|
+
var e = this || n;
|
|
2220
|
+
if (e.state = e.ctx && e.ctx.state || "suspended", e._autoSuspend(), !e.usingWebAudio) if (typeof Audio < "u") try {
|
|
2221
|
+
var t = new Audio();
|
|
2222
|
+
t.oncanplaythrough === void 0 && (e._canPlayEvent = "canplay");
|
|
2223
|
+
} catch {
|
|
2224
|
+
e.noAudio = !0;
|
|
2225
|
+
}
|
|
2226
|
+
else e.noAudio = !0;
|
|
2227
|
+
try {
|
|
2228
|
+
var t = new Audio();
|
|
2229
|
+
t.muted && (e.noAudio = !0);
|
|
2230
|
+
} catch {}
|
|
2231
|
+
return e.noAudio || e._setupCodecs(), e;
|
|
2232
|
+
},
|
|
2233
|
+
_setupCodecs: function() {
|
|
2234
|
+
var e = this || n, t = null;
|
|
2235
|
+
try {
|
|
2236
|
+
t = typeof Audio < "u" ? new Audio() : null;
|
|
2237
|
+
} catch {
|
|
2238
|
+
return e;
|
|
2239
|
+
}
|
|
2240
|
+
if (!t || typeof t.canPlayType != "function") return e;
|
|
2241
|
+
var r = t.canPlayType("audio/mpeg;").replace(/^no$/, ""), a = e._navigator ? e._navigator.userAgent : "", o = a.match(/OPR\/(\d+)/g), s = o && parseInt(o[0].split("/")[1], 10) < 33, c = a.indexOf("Safari") !== -1 && a.indexOf("Chrome") === -1, l = a.match(/Version\/(.*?) /), u = c && l && parseInt(l[1], 10) < 15;
|
|
2242
|
+
return e._codecs = {
|
|
2243
|
+
mp3: !!(!s && (r || t.canPlayType("audio/mp3;").replace(/^no$/, ""))),
|
|
2244
|
+
mpeg: !!r,
|
|
2245
|
+
opus: !!t.canPlayType("audio/ogg; codecs=\"opus\"").replace(/^no$/, ""),
|
|
2246
|
+
ogg: !!t.canPlayType("audio/ogg; codecs=\"vorbis\"").replace(/^no$/, ""),
|
|
2247
|
+
oga: !!t.canPlayType("audio/ogg; codecs=\"vorbis\"").replace(/^no$/, ""),
|
|
2248
|
+
wav: !!(t.canPlayType("audio/wav; codecs=\"1\"") || t.canPlayType("audio/wav")).replace(/^no$/, ""),
|
|
2249
|
+
aac: !!t.canPlayType("audio/aac;").replace(/^no$/, ""),
|
|
2250
|
+
caf: !!t.canPlayType("audio/x-caf;").replace(/^no$/, ""),
|
|
2251
|
+
m4a: !!(t.canPlayType("audio/x-m4a;") || t.canPlayType("audio/m4a;") || t.canPlayType("audio/aac;")).replace(/^no$/, ""),
|
|
2252
|
+
m4b: !!(t.canPlayType("audio/x-m4b;") || t.canPlayType("audio/m4b;") || t.canPlayType("audio/aac;")).replace(/^no$/, ""),
|
|
2253
|
+
mp4: !!(t.canPlayType("audio/x-mp4;") || t.canPlayType("audio/mp4;") || t.canPlayType("audio/aac;")).replace(/^no$/, ""),
|
|
2254
|
+
weba: !!(!u && t.canPlayType("audio/webm; codecs=\"vorbis\"").replace(/^no$/, "")),
|
|
2255
|
+
webm: !!(!u && t.canPlayType("audio/webm; codecs=\"vorbis\"").replace(/^no$/, "")),
|
|
2256
|
+
dolby: !!t.canPlayType("audio/mp4; codecs=\"ec-3\"").replace(/^no$/, ""),
|
|
2257
|
+
flac: !!(t.canPlayType("audio/x-flac;") || t.canPlayType("audio/flac;")).replace(/^no$/, "")
|
|
2258
|
+
}, e;
|
|
2259
|
+
},
|
|
2260
|
+
_unlockAudio: function() {
|
|
2261
|
+
var e = this || n;
|
|
2262
|
+
if (!(e._audioUnlocked || !e.ctx)) {
|
|
2263
|
+
e._audioUnlocked = !1, e.autoUnlock = !1, !e._mobileUnloaded && e.ctx.sampleRate !== 44100 && (e._mobileUnloaded = !0, e.unload()), e._scratchBuffer = e.ctx.createBuffer(1, 1, 22050);
|
|
2264
|
+
var t = function(n) {
|
|
2265
|
+
for (; e._html5AudioPool.length < e.html5PoolSize;) try {
|
|
2266
|
+
var r = new Audio();
|
|
2267
|
+
r._unlocked = !0, e._releaseHtml5Audio(r);
|
|
2268
|
+
} catch {
|
|
2269
|
+
e.noAudio = !0;
|
|
2270
|
+
break;
|
|
2271
|
+
}
|
|
2272
|
+
for (var a = 0; a < e._howls.length; a++) if (!e._howls[a]._webAudio) for (var o = e._howls[a]._getSoundIds(), s = 0; s < o.length; s++) {
|
|
2273
|
+
var c = e._howls[a]._soundById(o[s]);
|
|
2274
|
+
c && c._node && !c._node._unlocked && (c._node._unlocked = !0, c._node.load());
|
|
2275
|
+
}
|
|
2276
|
+
e._autoResume();
|
|
2277
|
+
var l = e.ctx.createBufferSource();
|
|
2278
|
+
l.buffer = e._scratchBuffer, l.connect(e.ctx.destination), l.start === void 0 ? l.noteOn(0) : l.start(0), typeof e.ctx.resume == "function" && e.ctx.resume(), l.onended = function() {
|
|
2279
|
+
l.disconnect(0), e._audioUnlocked = !0, document.removeEventListener("touchstart", t, !0), document.removeEventListener("touchend", t, !0), document.removeEventListener("click", t, !0), document.removeEventListener("keydown", t, !0);
|
|
2280
|
+
for (var n = 0; n < e._howls.length; n++) e._howls[n]._emit("unlock");
|
|
2281
|
+
};
|
|
2282
|
+
};
|
|
2283
|
+
return document.addEventListener("touchstart", t, !0), document.addEventListener("touchend", t, !0), document.addEventListener("click", t, !0), document.addEventListener("keydown", t, !0), e;
|
|
2284
|
+
}
|
|
2285
|
+
},
|
|
2286
|
+
_obtainHtml5Audio: function() {
|
|
2287
|
+
var e = this || n;
|
|
2288
|
+
if (e._html5AudioPool.length) return e._html5AudioPool.pop();
|
|
2289
|
+
var t = new Audio().play();
|
|
2290
|
+
return t && typeof Promise < "u" && (t instanceof Promise || typeof t.then == "function") && t.catch(function() {
|
|
2291
|
+
console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.");
|
|
2292
|
+
}), new Audio();
|
|
2293
|
+
},
|
|
2294
|
+
_releaseHtml5Audio: function(e) {
|
|
2295
|
+
var t = this || n;
|
|
2296
|
+
return e._unlocked && t._html5AudioPool.push(e), t;
|
|
2297
|
+
},
|
|
2298
|
+
_autoSuspend: function() {
|
|
2299
|
+
var e = this;
|
|
2300
|
+
if (!(!e.autoSuspend || !e.ctx || e.ctx.suspend === void 0 || !n.usingWebAudio)) {
|
|
2301
|
+
for (var t = 0; t < e._howls.length; t++) if (e._howls[t]._webAudio) {
|
|
2302
|
+
for (var r = 0; r < e._howls[t]._sounds.length; r++) if (!e._howls[t]._sounds[r]._paused) return e;
|
|
2303
|
+
}
|
|
2304
|
+
return e._suspendTimer && clearTimeout(e._suspendTimer), e._suspendTimer = setTimeout(function() {
|
|
2305
|
+
if (e.autoSuspend) {
|
|
2306
|
+
e._suspendTimer = null, e.state = "suspending";
|
|
2307
|
+
var t = function() {
|
|
2308
|
+
e.state = "suspended", e._resumeAfterSuspend && (delete e._resumeAfterSuspend, e._autoResume());
|
|
2309
|
+
};
|
|
2310
|
+
e.ctx.suspend().then(t, t);
|
|
2311
|
+
}
|
|
2312
|
+
}, 3e4), e;
|
|
2313
|
+
}
|
|
2314
|
+
},
|
|
2315
|
+
_autoResume: function() {
|
|
2316
|
+
var e = this;
|
|
2317
|
+
if (!(!e.ctx || e.ctx.resume === void 0 || !n.usingWebAudio)) return e.state === "running" && e.ctx.state !== "interrupted" && e._suspendTimer ? (clearTimeout(e._suspendTimer), e._suspendTimer = null) : e.state === "suspended" || e.state === "running" && e.ctx.state === "interrupted" ? (e.ctx.resume().then(function() {
|
|
2318
|
+
e.state = "running";
|
|
2319
|
+
for (var t = 0; t < e._howls.length; t++) e._howls[t]._emit("resume");
|
|
2320
|
+
}), e._suspendTimer &&= (clearTimeout(e._suspendTimer), null)) : e.state === "suspending" && (e._resumeAfterSuspend = !0), e;
|
|
2321
|
+
}
|
|
2322
|
+
};
|
|
2323
|
+
var n = new t(), r = function(e) {
|
|
2324
|
+
var t = this;
|
|
2325
|
+
if (!e.src || e.src.length === 0) {
|
|
2326
|
+
console.error("An array of source files must be passed with any new Howl.");
|
|
2327
|
+
return;
|
|
2328
|
+
}
|
|
2329
|
+
t.init(e);
|
|
2330
|
+
};
|
|
2331
|
+
r.prototype = {
|
|
2332
|
+
init: function(e) {
|
|
2333
|
+
var t = this;
|
|
2334
|
+
return n.ctx || d(), t._autoplay = e.autoplay || !1, t._format = typeof e.format == "string" ? [e.format] : e.format, t._html5 = e.html5 || !1, t._muted = e.mute || !1, t._loop = e.loop || !1, t._pool = e.pool || 5, t._preload = typeof e.preload == "boolean" || e.preload === "metadata" ? e.preload : !0, t._rate = e.rate || 1, t._sprite = e.sprite || {}, t._src = typeof e.src == "string" ? [e.src] : e.src, t._volume = e.volume === void 0 ? 1 : e.volume, t._xhr = {
|
|
2335
|
+
method: e.xhr && e.xhr.method ? e.xhr.method : "GET",
|
|
2336
|
+
headers: e.xhr && e.xhr.headers ? e.xhr.headers : null,
|
|
2337
|
+
withCredentials: e.xhr && e.xhr.withCredentials ? e.xhr.withCredentials : !1
|
|
2338
|
+
}, t._duration = 0, t._state = "unloaded", t._sounds = [], t._endTimers = {}, t._queue = [], t._playLock = !1, t._onend = e.onend ? [{ fn: e.onend }] : [], t._onfade = e.onfade ? [{ fn: e.onfade }] : [], t._onload = e.onload ? [{ fn: e.onload }] : [], t._onloaderror = e.onloaderror ? [{ fn: e.onloaderror }] : [], t._onplayerror = e.onplayerror ? [{ fn: e.onplayerror }] : [], t._onpause = e.onpause ? [{ fn: e.onpause }] : [], t._onplay = e.onplay ? [{ fn: e.onplay }] : [], t._onstop = e.onstop ? [{ fn: e.onstop }] : [], t._onmute = e.onmute ? [{ fn: e.onmute }] : [], t._onvolume = e.onvolume ? [{ fn: e.onvolume }] : [], t._onrate = e.onrate ? [{ fn: e.onrate }] : [], t._onseek = e.onseek ? [{ fn: e.onseek }] : [], t._onunlock = e.onunlock ? [{ fn: e.onunlock }] : [], t._onresume = [], t._webAudio = n.usingWebAudio && !t._html5, n.ctx !== void 0 && n.ctx && n.autoUnlock && n._unlockAudio(), n._howls.push(t), t._autoplay && t._queue.push({
|
|
2339
|
+
event: "play",
|
|
2340
|
+
action: function() {
|
|
2341
|
+
t.play();
|
|
2342
|
+
}
|
|
2343
|
+
}), t._preload && t._preload !== "none" && t.load(), t;
|
|
2344
|
+
},
|
|
2345
|
+
load: function() {
|
|
2346
|
+
var e = this, t = null;
|
|
2347
|
+
if (n.noAudio) {
|
|
2348
|
+
e._emit("loaderror", null, "No audio support.");
|
|
2349
|
+
return;
|
|
2350
|
+
}
|
|
2351
|
+
typeof e._src == "string" && (e._src = [e._src]);
|
|
2352
|
+
for (var r = 0; r < e._src.length; r++) {
|
|
2353
|
+
var o, c;
|
|
2354
|
+
if (e._format && e._format[r]) o = e._format[r];
|
|
2355
|
+
else {
|
|
2356
|
+
if (c = e._src[r], typeof c != "string") {
|
|
2357
|
+
e._emit("loaderror", null, "Non-string found in selected audio sources - ignoring.");
|
|
2358
|
+
continue;
|
|
2359
|
+
}
|
|
2360
|
+
o = /^data:audio\/([^;,]+);/i.exec(c), o ||= /\.([^.]+)$/.exec(c.split("?", 1)[0]), o &&= o[1].toLowerCase();
|
|
2361
|
+
}
|
|
2362
|
+
if (o || console.warn("No file extension was found. Consider using the \"format\" property or specify an extension."), o && n.codecs(o)) {
|
|
2363
|
+
t = e._src[r];
|
|
2364
|
+
break;
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
if (!t) {
|
|
2368
|
+
e._emit("loaderror", null, "No codec support for selected audio sources.");
|
|
2369
|
+
return;
|
|
2370
|
+
}
|
|
2371
|
+
return e._src = t, e._state = "loading", window.location.protocol === "https:" && t.slice(0, 5) === "http:" && (e._html5 = !0, e._webAudio = !1), new a(e), e._webAudio && s(e), e;
|
|
2372
|
+
},
|
|
2373
|
+
play: function(e, t) {
|
|
2374
|
+
var r = this, a = null;
|
|
2375
|
+
if (typeof e == "number") a = e, e = null;
|
|
2376
|
+
else if (typeof e == "string" && r._state === "loaded" && !r._sprite[e]) return null;
|
|
2377
|
+
else if (e === void 0 && (e = "__default", !r._playLock)) {
|
|
2378
|
+
for (var o = 0, s = 0; s < r._sounds.length; s++) r._sounds[s]._paused && !r._sounds[s]._ended && (o++, a = r._sounds[s]._id);
|
|
2379
|
+
o === 1 ? e = null : a = null;
|
|
2380
|
+
}
|
|
2381
|
+
var c = a ? r._soundById(a) : r._inactiveSound();
|
|
2382
|
+
if (!c) return null;
|
|
2383
|
+
if (a && !e && (e = c._sprite || "__default"), r._state !== "loaded") {
|
|
2384
|
+
c._sprite = e, c._ended = !1;
|
|
2385
|
+
var l = c._id;
|
|
2386
|
+
return r._queue.push({
|
|
2387
|
+
event: "play",
|
|
2388
|
+
action: function() {
|
|
2389
|
+
r.play(l);
|
|
2390
|
+
}
|
|
2391
|
+
}), l;
|
|
2392
|
+
}
|
|
2393
|
+
if (a && !c._paused) return t || r._loadQueue("play"), c._id;
|
|
2394
|
+
r._webAudio && n._autoResume();
|
|
2395
|
+
var u = Math.max(0, c._seek > 0 ? c._seek : r._sprite[e][0] / 1e3), d = Math.max(0, (r._sprite[e][0] + r._sprite[e][1]) / 1e3 - u), f = d * 1e3 / Math.abs(c._rate), p = r._sprite[e][0] / 1e3, m = (r._sprite[e][0] + r._sprite[e][1]) / 1e3;
|
|
2396
|
+
c._sprite = e, c._ended = !1;
|
|
2397
|
+
var h = function() {
|
|
2398
|
+
c._paused = !1, c._seek = u, c._start = p, c._stop = m, c._loop = !!(c._loop || r._sprite[e][2]);
|
|
2399
|
+
};
|
|
2400
|
+
if (u >= m) {
|
|
2401
|
+
r._ended(c);
|
|
2402
|
+
return;
|
|
2403
|
+
}
|
|
2404
|
+
var g = c._node;
|
|
2405
|
+
if (r._webAudio) {
|
|
2406
|
+
var _ = function() {
|
|
2407
|
+
r._playLock = !1, h(), r._refreshBuffer(c);
|
|
2408
|
+
var e = c._muted || r._muted ? 0 : c._volume;
|
|
2409
|
+
g.gain.setValueAtTime(e, n.ctx.currentTime), c._playStart = n.ctx.currentTime, g.bufferSource.start === void 0 ? c._loop ? g.bufferSource.noteGrainOn(0, u, 86400) : g.bufferSource.noteGrainOn(0, u, d) : c._loop ? g.bufferSource.start(0, u, 86400) : g.bufferSource.start(0, u, d), f !== Infinity && (r._endTimers[c._id] = setTimeout(r._ended.bind(r, c), f)), t || setTimeout(function() {
|
|
2410
|
+
r._emit("play", c._id), r._loadQueue();
|
|
2411
|
+
}, 0);
|
|
2412
|
+
};
|
|
2413
|
+
n.state === "running" && n.ctx.state !== "interrupted" ? _() : (r._playLock = !0, r.once("resume", _), r._clearTimer(c._id));
|
|
2414
|
+
} else {
|
|
2415
|
+
var v = function() {
|
|
2416
|
+
g.currentTime = u, g.muted = c._muted || r._muted || n._muted || g.muted, g.volume = c._volume * n.volume(), g.playbackRate = c._rate;
|
|
2417
|
+
try {
|
|
2418
|
+
var a = g.play();
|
|
2419
|
+
if (a && typeof Promise < "u" && (a instanceof Promise || typeof a.then == "function") ? (r._playLock = !0, h(), a.then(function() {
|
|
2420
|
+
r._playLock = !1, g._unlocked = !0, t ? r._loadQueue() : r._emit("play", c._id);
|
|
2421
|
+
}).catch(function() {
|
|
2422
|
+
r._playLock = !1, r._emit("playerror", c._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), c._ended = !0, c._paused = !0;
|
|
2423
|
+
})) : t || (r._playLock = !1, h(), r._emit("play", c._id)), g.playbackRate = c._rate, g.paused) {
|
|
2424
|
+
r._emit("playerror", c._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
|
|
2425
|
+
return;
|
|
2426
|
+
}
|
|
2427
|
+
e !== "__default" || c._loop ? r._endTimers[c._id] = setTimeout(r._ended.bind(r, c), f) : (r._endTimers[c._id] = function() {
|
|
2428
|
+
r._ended(c), g.removeEventListener("ended", r._endTimers[c._id], !1);
|
|
2429
|
+
}, g.addEventListener("ended", r._endTimers[c._id], !1));
|
|
2430
|
+
} catch (e) {
|
|
2431
|
+
r._emit("playerror", c._id, e);
|
|
2432
|
+
}
|
|
2433
|
+
};
|
|
2434
|
+
g.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (g.src = r._src, g.load());
|
|
2435
|
+
var b = window && window.ejecta || !g.readyState && n._navigator.isCocoonJS;
|
|
2436
|
+
if (g.readyState >= 3 || b) v();
|
|
2437
|
+
else {
|
|
2438
|
+
r._playLock = !0, r._state = "loading";
|
|
2439
|
+
var x = function() {
|
|
2440
|
+
r._state = "loaded", v(), g.removeEventListener(n._canPlayEvent, x, !1);
|
|
2441
|
+
};
|
|
2442
|
+
g.addEventListener(n._canPlayEvent, x, !1), r._clearTimer(c._id);
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
return c._id;
|
|
2446
|
+
},
|
|
2447
|
+
pause: function(e) {
|
|
2448
|
+
var t = this;
|
|
2449
|
+
if (t._state !== "loaded" || t._playLock) return t._queue.push({
|
|
2450
|
+
event: "pause",
|
|
2451
|
+
action: function() {
|
|
2452
|
+
t.pause(e);
|
|
2453
|
+
}
|
|
2454
|
+
}), t;
|
|
2455
|
+
for (var n = t._getSoundIds(e), r = 0; r < n.length; r++) {
|
|
2456
|
+
t._clearTimer(n[r]);
|
|
2457
|
+
var a = t._soundById(n[r]);
|
|
2458
|
+
if (a && !a._paused && (a._seek = t.seek(n[r]), a._rateSeek = 0, a._paused = !0, t._stopFade(n[r]), a._node)) if (t._webAudio) {
|
|
2459
|
+
if (!a._node.bufferSource) continue;
|
|
2460
|
+
a._node.bufferSource.stop === void 0 ? a._node.bufferSource.noteOff(0) : a._node.bufferSource.stop(0), t._cleanBuffer(a._node);
|
|
2461
|
+
} else (!isNaN(a._node.duration) || a._node.duration === Infinity) && a._node.pause();
|
|
2462
|
+
arguments[1] || t._emit("pause", a ? a._id : null);
|
|
2463
|
+
}
|
|
2464
|
+
return t;
|
|
2465
|
+
},
|
|
2466
|
+
stop: function(e, t) {
|
|
2467
|
+
var n = this;
|
|
2468
|
+
if (n._state !== "loaded" || n._playLock) return n._queue.push({
|
|
2469
|
+
event: "stop",
|
|
2470
|
+
action: function() {
|
|
2471
|
+
n.stop(e);
|
|
2472
|
+
}
|
|
2473
|
+
}), n;
|
|
2474
|
+
for (var r = n._getSoundIds(e), a = 0; a < r.length; a++) {
|
|
2475
|
+
n._clearTimer(r[a]);
|
|
2476
|
+
var o = n._soundById(r[a]);
|
|
2477
|
+
o && (o._seek = o._start || 0, o._rateSeek = 0, o._paused = !0, o._ended = !0, n._stopFade(r[a]), o._node && (n._webAudio ? o._node.bufferSource && (o._node.bufferSource.stop === void 0 ? o._node.bufferSource.noteOff(0) : o._node.bufferSource.stop(0), n._cleanBuffer(o._node)) : (!isNaN(o._node.duration) || o._node.duration === Infinity) && (o._node.currentTime = o._start || 0, o._node.pause(), o._node.duration === Infinity && n._clearSound(o._node))), t || n._emit("stop", o._id));
|
|
2478
|
+
}
|
|
2479
|
+
return n;
|
|
2480
|
+
},
|
|
2481
|
+
mute: function(e, t) {
|
|
2482
|
+
var r = this;
|
|
2483
|
+
if (r._state !== "loaded" || r._playLock) return r._queue.push({
|
|
2484
|
+
event: "mute",
|
|
2485
|
+
action: function() {
|
|
2486
|
+
r.mute(e, t);
|
|
2487
|
+
}
|
|
2488
|
+
}), r;
|
|
2489
|
+
if (t === void 0) if (typeof e == "boolean") r._muted = e;
|
|
2490
|
+
else return r._muted;
|
|
2491
|
+
for (var a = r._getSoundIds(t), o = 0; o < a.length; o++) {
|
|
2492
|
+
var s = r._soundById(a[o]);
|
|
2493
|
+
s && (s._muted = e, s._interval && r._stopFade(s._id), r._webAudio && s._node ? s._node.gain.setValueAtTime(e ? 0 : s._volume, n.ctx.currentTime) : s._node && (s._node.muted = n._muted ? !0 : e), r._emit("mute", s._id));
|
|
2494
|
+
}
|
|
2495
|
+
return r;
|
|
2496
|
+
},
|
|
2497
|
+
volume: function() {
|
|
2498
|
+
var e = this, t = arguments, r, a;
|
|
2499
|
+
if (t.length === 0) return e._volume;
|
|
2500
|
+
t.length === 1 || t.length === 2 && t[1] === void 0 ? e._getSoundIds().indexOf(t[0]) >= 0 ? a = parseInt(t[0], 10) : r = parseFloat(t[0]) : t.length >= 2 && (r = parseFloat(t[0]), a = parseInt(t[1], 10));
|
|
2501
|
+
var o;
|
|
2502
|
+
if (r !== void 0 && r >= 0 && r <= 1) {
|
|
2503
|
+
if (e._state !== "loaded" || e._playLock) return e._queue.push({
|
|
2504
|
+
event: "volume",
|
|
2505
|
+
action: function() {
|
|
2506
|
+
e.volume.apply(e, t);
|
|
2507
|
+
}
|
|
2508
|
+
}), e;
|
|
2509
|
+
a === void 0 && (e._volume = r), a = e._getSoundIds(a);
|
|
2510
|
+
for (var s = 0; s < a.length; s++) o = e._soundById(a[s]), o && (o._volume = r, t[2] || e._stopFade(a[s]), e._webAudio && o._node && !o._muted ? o._node.gain.setValueAtTime(r, n.ctx.currentTime) : o._node && !o._muted && (o._node.volume = r * n.volume()), e._emit("volume", o._id));
|
|
2511
|
+
} else return o = a ? e._soundById(a) : e._sounds[0], o ? o._volume : 0;
|
|
2512
|
+
return e;
|
|
2513
|
+
},
|
|
2514
|
+
fade: function(e, t, r, a) {
|
|
2515
|
+
var o = this;
|
|
2516
|
+
if (o._state !== "loaded" || o._playLock) return o._queue.push({
|
|
2517
|
+
event: "fade",
|
|
2518
|
+
action: function() {
|
|
2519
|
+
o.fade(e, t, r, a);
|
|
2520
|
+
}
|
|
2521
|
+
}), o;
|
|
2522
|
+
e = Math.min(Math.max(0, parseFloat(e)), 1), t = Math.min(Math.max(0, parseFloat(t)), 1), r = parseFloat(r), o.volume(e, a);
|
|
2523
|
+
for (var s = o._getSoundIds(a), c = 0; c < s.length; c++) {
|
|
2524
|
+
var l = o._soundById(s[c]);
|
|
2525
|
+
if (l) {
|
|
2526
|
+
if (a || o._stopFade(s[c]), o._webAudio && !l._muted) {
|
|
2527
|
+
var u = n.ctx.currentTime, d = u + r / 1e3;
|
|
2528
|
+
l._volume = e, l._node.gain.setValueAtTime(e, u), l._node.gain.linearRampToValueAtTime(t, d);
|
|
2529
|
+
}
|
|
2530
|
+
o._startFadeInterval(l, e, t, r, s[c], a === void 0);
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
return o;
|
|
2534
|
+
},
|
|
2535
|
+
_startFadeInterval: function(e, t, n, r, a, o) {
|
|
2536
|
+
var s = this, c = t, l = n - t, u = Math.abs(l / .01), d = Math.max(4, u > 0 ? r / u : r), f = Date.now();
|
|
2537
|
+
e._fadeTo = n, e._interval = setInterval(function() {
|
|
2538
|
+
var a = (Date.now() - f) / r;
|
|
2539
|
+
f = Date.now(), c += l * a, c = Math.round(c * 100) / 100, c = l < 0 ? Math.max(n, c) : Math.min(n, c), s._webAudio ? e._volume = c : s.volume(c, e._id, !0), o && (s._volume = c), (n < t && c <= n || n > t && c >= n) && (clearInterval(e._interval), e._interval = null, e._fadeTo = null, s.volume(n, e._id), s._emit("fade", e._id));
|
|
2540
|
+
}, d);
|
|
2541
|
+
},
|
|
2542
|
+
_stopFade: function(e) {
|
|
2543
|
+
var t = this, r = t._soundById(e);
|
|
2544
|
+
return r && r._interval && (t._webAudio && r._node.gain.cancelScheduledValues(n.ctx.currentTime), clearInterval(r._interval), r._interval = null, t.volume(r._fadeTo, e), r._fadeTo = null, t._emit("fade", e)), t;
|
|
2545
|
+
},
|
|
2546
|
+
loop: function() {
|
|
2547
|
+
var e = this, t = arguments, n, r, a;
|
|
2548
|
+
if (t.length === 0) return e._loop;
|
|
2549
|
+
if (t.length === 1) if (typeof t[0] == "boolean") n = t[0], e._loop = n;
|
|
2550
|
+
else return a = e._soundById(parseInt(t[0], 10)), a ? a._loop : !1;
|
|
2551
|
+
else t.length === 2 && (n = t[0], r = parseInt(t[1], 10));
|
|
2552
|
+
for (var o = e._getSoundIds(r), s = 0; s < o.length; s++) a = e._soundById(o[s]), a && (a._loop = n, e._webAudio && a._node && a._node.bufferSource && (a._node.bufferSource.loop = n, n && (a._node.bufferSource.loopStart = a._start || 0, a._node.bufferSource.loopEnd = a._stop, e.playing(o[s]) && (e.pause(o[s], !0), e.play(o[s], !0)))));
|
|
2553
|
+
return e;
|
|
2554
|
+
},
|
|
2555
|
+
rate: function() {
|
|
2556
|
+
var e = this, t = arguments, r, a;
|
|
2557
|
+
t.length === 0 ? a = e._sounds[0]._id : t.length === 1 ? e._getSoundIds().indexOf(t[0]) >= 0 ? a = parseInt(t[0], 10) : r = parseFloat(t[0]) : t.length === 2 && (r = parseFloat(t[0]), a = parseInt(t[1], 10));
|
|
2558
|
+
var o;
|
|
2559
|
+
if (typeof r == "number") {
|
|
2560
|
+
if (e._state !== "loaded" || e._playLock) return e._queue.push({
|
|
2561
|
+
event: "rate",
|
|
2562
|
+
action: function() {
|
|
2563
|
+
e.rate.apply(e, t);
|
|
2564
|
+
}
|
|
2565
|
+
}), e;
|
|
2566
|
+
a === void 0 && (e._rate = r), a = e._getSoundIds(a);
|
|
2567
|
+
for (var s = 0; s < a.length; s++) if (o = e._soundById(a[s]), o) {
|
|
2568
|
+
e.playing(a[s]) && (o._rateSeek = e.seek(a[s]), o._playStart = e._webAudio ? n.ctx.currentTime : o._playStart), o._rate = r, e._webAudio && o._node && o._node.bufferSource ? o._node.bufferSource.playbackRate.setValueAtTime(r, n.ctx.currentTime) : o._node && (o._node.playbackRate = r);
|
|
2569
|
+
var c = e.seek(a[s]), l = ((e._sprite[o._sprite][0] + e._sprite[o._sprite][1]) / 1e3 - c) * 1e3 / Math.abs(o._rate);
|
|
2570
|
+
(e._endTimers[a[s]] || !o._paused) && (e._clearTimer(a[s]), e._endTimers[a[s]] = setTimeout(e._ended.bind(e, o), l)), e._emit("rate", o._id);
|
|
2571
|
+
}
|
|
2572
|
+
} else return o = e._soundById(a), o ? o._rate : e._rate;
|
|
2573
|
+
return e;
|
|
2574
|
+
},
|
|
2575
|
+
seek: function() {
|
|
2576
|
+
var e = this, t = arguments, r, a;
|
|
2577
|
+
if (t.length === 0 ? e._sounds.length && (a = e._sounds[0]._id) : t.length === 1 ? e._getSoundIds().indexOf(t[0]) >= 0 ? a = parseInt(t[0], 10) : e._sounds.length && (a = e._sounds[0]._id, r = parseFloat(t[0])) : t.length === 2 && (r = parseFloat(t[0]), a = parseInt(t[1], 10)), a === void 0) return 0;
|
|
2578
|
+
if (typeof r == "number" && (e._state !== "loaded" || e._playLock)) return e._queue.push({
|
|
2579
|
+
event: "seek",
|
|
2580
|
+
action: function() {
|
|
2581
|
+
e.seek.apply(e, t);
|
|
2582
|
+
}
|
|
2583
|
+
}), e;
|
|
2584
|
+
var o = e._soundById(a);
|
|
2585
|
+
if (o) if (typeof r == "number" && r >= 0) {
|
|
2586
|
+
var s = e.playing(a);
|
|
2587
|
+
s && e.pause(a, !0), o._seek = r, o._ended = !1, e._clearTimer(a), !e._webAudio && o._node && !isNaN(o._node.duration) && (o._node.currentTime = r);
|
|
2588
|
+
var c = function() {
|
|
2589
|
+
s && e.play(a, !0), e._emit("seek", a);
|
|
2590
|
+
};
|
|
2591
|
+
if (s && !e._webAudio) {
|
|
2592
|
+
var l = function() {
|
|
2593
|
+
e._playLock ? setTimeout(l, 0) : c();
|
|
2594
|
+
};
|
|
2595
|
+
setTimeout(l, 0);
|
|
2596
|
+
} else c();
|
|
2597
|
+
} else if (e._webAudio) {
|
|
2598
|
+
var u = e.playing(a) ? n.ctx.currentTime - o._playStart : 0, d = o._rateSeek ? o._rateSeek - o._seek : 0;
|
|
2599
|
+
return o._seek + (d + u * Math.abs(o._rate));
|
|
2600
|
+
} else return o._node.currentTime;
|
|
2601
|
+
return e;
|
|
2602
|
+
},
|
|
2603
|
+
playing: function(e) {
|
|
2604
|
+
var t = this;
|
|
2605
|
+
if (typeof e == "number") {
|
|
2606
|
+
var n = t._soundById(e);
|
|
2607
|
+
return n ? !n._paused : !1;
|
|
2608
|
+
}
|
|
2609
|
+
for (var r = 0; r < t._sounds.length; r++) if (!t._sounds[r]._paused) return !0;
|
|
2610
|
+
return !1;
|
|
2611
|
+
},
|
|
2612
|
+
duration: function(e) {
|
|
2613
|
+
var t = this, n = t._duration, r = t._soundById(e);
|
|
2614
|
+
return r && (n = t._sprite[r._sprite][1] / 1e3), n;
|
|
2615
|
+
},
|
|
2616
|
+
state: function() {
|
|
2617
|
+
return this._state;
|
|
2618
|
+
},
|
|
2619
|
+
unload: function() {
|
|
2620
|
+
for (var e = this, t = e._sounds, r = 0; r < t.length; r++) t[r]._paused || e.stop(t[r]._id), e._webAudio || (e._clearSound(t[r]._node), t[r]._node.removeEventListener("error", t[r]._errorFn, !1), t[r]._node.removeEventListener(n._canPlayEvent, t[r]._loadFn, !1), t[r]._node.removeEventListener("ended", t[r]._endFn, !1), n._releaseHtml5Audio(t[r]._node)), delete t[r]._node, e._clearTimer(t[r]._id);
|
|
2621
|
+
var a = n._howls.indexOf(e);
|
|
2622
|
+
a >= 0 && n._howls.splice(a, 1);
|
|
2623
|
+
var s = !0;
|
|
2624
|
+
for (r = 0; r < n._howls.length; r++) if (n._howls[r]._src === e._src || e._src.indexOf(n._howls[r]._src) >= 0) {
|
|
2625
|
+
s = !1;
|
|
2626
|
+
break;
|
|
2627
|
+
}
|
|
2628
|
+
return o && s && delete o[e._src], n.noAudio = !1, e._state = "unloaded", e._sounds = [], e = null, null;
|
|
2629
|
+
},
|
|
2630
|
+
on: function(e, t, n, r) {
|
|
2631
|
+
var a = this, o = a["_on" + e];
|
|
2632
|
+
return typeof t == "function" && o.push(r ? {
|
|
2633
|
+
id: n,
|
|
2634
|
+
fn: t,
|
|
2635
|
+
once: r
|
|
2636
|
+
} : {
|
|
2637
|
+
id: n,
|
|
2638
|
+
fn: t
|
|
2639
|
+
}), a;
|
|
2640
|
+
},
|
|
2641
|
+
off: function(e, t, n) {
|
|
2642
|
+
var r = this, a = r["_on" + e], o = 0;
|
|
2643
|
+
if (typeof t == "number" && (n = t, t = null), t || n) for (o = 0; o < a.length; o++) {
|
|
2644
|
+
var s = n === a[o].id;
|
|
2645
|
+
if (t === a[o].fn && s || !t && s) {
|
|
2646
|
+
a.splice(o, 1);
|
|
2647
|
+
break;
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
else if (e) r["_on" + e] = [];
|
|
2651
|
+
else {
|
|
2652
|
+
var c = Object.keys(r);
|
|
2653
|
+
for (o = 0; o < c.length; o++) c[o].indexOf("_on") === 0 && Array.isArray(r[c[o]]) && (r[c[o]] = []);
|
|
2654
|
+
}
|
|
2655
|
+
return r;
|
|
2656
|
+
},
|
|
2657
|
+
once: function(e, t, n) {
|
|
2658
|
+
var r = this;
|
|
2659
|
+
return r.on(e, t, n, 1), r;
|
|
2660
|
+
},
|
|
2661
|
+
_emit: function(e, t, n) {
|
|
2662
|
+
for (var r = this, a = r["_on" + e], o = a.length - 1; o >= 0; o--) (!a[o].id || a[o].id === t || e === "load") && (setTimeout(function(e) {
|
|
2663
|
+
e.call(this, t, n);
|
|
2664
|
+
}.bind(r, a[o].fn), 0), a[o].once && r.off(e, a[o].fn, a[o].id));
|
|
2665
|
+
return r._loadQueue(e), r;
|
|
2666
|
+
},
|
|
2667
|
+
_loadQueue: function(e) {
|
|
2668
|
+
var t = this;
|
|
2669
|
+
if (t._queue.length > 0) {
|
|
2670
|
+
var n = t._queue[0];
|
|
2671
|
+
n.event === e && (t._queue.shift(), t._loadQueue()), e || n.action();
|
|
2672
|
+
}
|
|
2673
|
+
return t;
|
|
2674
|
+
},
|
|
2675
|
+
_ended: function(e) {
|
|
2676
|
+
var t = this, r = e._sprite;
|
|
2677
|
+
if (!t._webAudio && e._node && !e._node.paused && !e._node.ended && e._node.currentTime < e._stop) return setTimeout(t._ended.bind(t, e), 100), t;
|
|
2678
|
+
var a = !!(e._loop || t._sprite[r][2]);
|
|
2679
|
+
if (t._emit("end", e._id), !t._webAudio && a && t.stop(e._id, !0).play(e._id), t._webAudio && a) {
|
|
2680
|
+
t._emit("play", e._id), e._seek = e._start || 0, e._rateSeek = 0, e._playStart = n.ctx.currentTime;
|
|
2681
|
+
var o = (e._stop - e._start) * 1e3 / Math.abs(e._rate);
|
|
2682
|
+
t._endTimers[e._id] = setTimeout(t._ended.bind(t, e), o);
|
|
2683
|
+
}
|
|
2684
|
+
return t._webAudio && !a && (e._paused = !0, e._ended = !0, e._seek = e._start || 0, e._rateSeek = 0, t._clearTimer(e._id), t._cleanBuffer(e._node), n._autoSuspend()), !t._webAudio && !a && t.stop(e._id, !0), t;
|
|
2685
|
+
},
|
|
2686
|
+
_clearTimer: function(e) {
|
|
2687
|
+
var t = this;
|
|
2688
|
+
if (t._endTimers[e]) {
|
|
2689
|
+
if (typeof t._endTimers[e] != "function") clearTimeout(t._endTimers[e]);
|
|
2690
|
+
else {
|
|
2691
|
+
var n = t._soundById(e);
|
|
2692
|
+
n && n._node && n._node.removeEventListener("ended", t._endTimers[e], !1);
|
|
2693
|
+
}
|
|
2694
|
+
delete t._endTimers[e];
|
|
2695
|
+
}
|
|
2696
|
+
return t;
|
|
2697
|
+
},
|
|
2698
|
+
_soundById: function(e) {
|
|
2699
|
+
for (var t = this, n = 0; n < t._sounds.length; n++) if (e === t._sounds[n]._id) return t._sounds[n];
|
|
2700
|
+
return null;
|
|
2701
|
+
},
|
|
2702
|
+
_inactiveSound: function() {
|
|
2703
|
+
var e = this;
|
|
2704
|
+
e._drain();
|
|
2705
|
+
for (var t = 0; t < e._sounds.length; t++) if (e._sounds[t]._ended) return e._sounds[t].reset();
|
|
2706
|
+
return new a(e);
|
|
2707
|
+
},
|
|
2708
|
+
_drain: function() {
|
|
2709
|
+
var e = this, t = e._pool, n = 0, r = 0;
|
|
2710
|
+
if (!(e._sounds.length < t)) {
|
|
2711
|
+
for (r = 0; r < e._sounds.length; r++) e._sounds[r]._ended && n++;
|
|
2712
|
+
for (r = e._sounds.length - 1; r >= 0; r--) {
|
|
2713
|
+
if (n <= t) return;
|
|
2714
|
+
e._sounds[r]._ended && (e._webAudio && e._sounds[r]._node && e._sounds[r]._node.disconnect(0), e._sounds.splice(r, 1), n--);
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
},
|
|
2718
|
+
_getSoundIds: function(e) {
|
|
2719
|
+
var t = this;
|
|
2720
|
+
if (e === void 0) {
|
|
2721
|
+
for (var n = [], r = 0; r < t._sounds.length; r++) n.push(t._sounds[r]._id);
|
|
2722
|
+
return n;
|
|
2723
|
+
} else return [e];
|
|
2724
|
+
},
|
|
2725
|
+
_refreshBuffer: function(e) {
|
|
2726
|
+
var t = this;
|
|
2727
|
+
return e._node.bufferSource = n.ctx.createBufferSource(), e._node.bufferSource.buffer = o[t._src], e._panner ? e._node.bufferSource.connect(e._panner) : e._node.bufferSource.connect(e._node), e._node.bufferSource.loop = e._loop, e._loop && (e._node.bufferSource.loopStart = e._start || 0, e._node.bufferSource.loopEnd = e._stop || 0), e._node.bufferSource.playbackRate.setValueAtTime(e._rate, n.ctx.currentTime), t;
|
|
2728
|
+
},
|
|
2729
|
+
_cleanBuffer: function(e) {
|
|
2730
|
+
var t = this, r = n._navigator && n._navigator.vendor.indexOf("Apple") >= 0;
|
|
2731
|
+
if (!e.bufferSource) return t;
|
|
2732
|
+
if (n._scratchBuffer && e.bufferSource && (e.bufferSource.onended = null, e.bufferSource.disconnect(0), r)) try {
|
|
2733
|
+
e.bufferSource.buffer = n._scratchBuffer;
|
|
2734
|
+
} catch {}
|
|
2735
|
+
return e.bufferSource = null, t;
|
|
2736
|
+
},
|
|
2737
|
+
_clearSound: function(e) {
|
|
2738
|
+
/MSIE |Trident\//.test(n._navigator && n._navigator.userAgent) || (e.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA");
|
|
2739
|
+
}
|
|
2740
|
+
};
|
|
2741
|
+
var a = function(e) {
|
|
2742
|
+
this._parent = e, this.init();
|
|
2743
|
+
};
|
|
2744
|
+
a.prototype = {
|
|
2745
|
+
init: function() {
|
|
2746
|
+
var e = this, t = e._parent;
|
|
2747
|
+
return e._muted = t._muted, e._loop = t._loop, e._volume = t._volume, e._rate = t._rate, e._seek = 0, e._paused = !0, e._ended = !0, e._sprite = "__default", e._id = ++n._counter, t._sounds.push(e), e.create(), e;
|
|
2748
|
+
},
|
|
2749
|
+
create: function() {
|
|
2750
|
+
var e = this, t = e._parent, r = n._muted || e._muted || e._parent._muted ? 0 : e._volume;
|
|
2751
|
+
return t._webAudio ? (e._node = n.ctx.createGain === void 0 ? n.ctx.createGainNode() : n.ctx.createGain(), e._node.gain.setValueAtTime(r, n.ctx.currentTime), e._node.paused = !0, e._node.connect(n.masterGain)) : n.noAudio || (e._node = n._obtainHtml5Audio(), e._errorFn = e._errorListener.bind(e), e._node.addEventListener("error", e._errorFn, !1), e._loadFn = e._loadListener.bind(e), e._node.addEventListener(n._canPlayEvent, e._loadFn, !1), e._endFn = e._endListener.bind(e), e._node.addEventListener("ended", e._endFn, !1), e._node.src = t._src, e._node.preload = t._preload === !0 ? "auto" : t._preload, e._node.volume = r * n.volume(), e._node.load()), e;
|
|
2752
|
+
},
|
|
2753
|
+
reset: function() {
|
|
2754
|
+
var e = this, t = e._parent;
|
|
2755
|
+
return e._muted = t._muted, e._loop = t._loop, e._volume = t._volume, e._rate = t._rate, e._seek = 0, e._rateSeek = 0, e._paused = !0, e._ended = !0, e._sprite = "__default", e._id = ++n._counter, e;
|
|
2756
|
+
},
|
|
2757
|
+
_errorListener: function() {
|
|
2758
|
+
var e = this;
|
|
2759
|
+
e._parent._emit("loaderror", e._id, e._node.error ? e._node.error.code : 0), e._node.removeEventListener("error", e._errorFn, !1);
|
|
2760
|
+
},
|
|
2761
|
+
_loadListener: function() {
|
|
2762
|
+
var e = this, t = e._parent;
|
|
2763
|
+
t._duration = Math.ceil(e._node.duration * 10) / 10, Object.keys(t._sprite).length === 0 && (t._sprite = { __default: [0, t._duration * 1e3] }), t._state !== "loaded" && (t._state = "loaded", t._emit("load"), t._loadQueue()), e._node.removeEventListener(n._canPlayEvent, e._loadFn, !1);
|
|
2764
|
+
},
|
|
2765
|
+
_endListener: function() {
|
|
2766
|
+
var e = this, t = e._parent;
|
|
2767
|
+
t._duration === Infinity && (t._duration = Math.ceil(e._node.duration * 10) / 10, t._sprite.__default[1] === Infinity && (t._sprite.__default[1] = t._duration * 1e3), t._ended(e)), e._node.removeEventListener("ended", e._endFn, !1);
|
|
2768
|
+
}
|
|
2769
|
+
};
|
|
2770
|
+
var o = {}, s = function(e) {
|
|
2771
|
+
var t = e._src;
|
|
2772
|
+
if (o[t]) {
|
|
2773
|
+
e._duration = o[t].duration, u(e);
|
|
2774
|
+
return;
|
|
2775
|
+
}
|
|
2776
|
+
if (/^data:[^;]+;base64,/.test(t)) {
|
|
2777
|
+
for (var n = atob(t.split(",")[1]), r = new Uint8Array(n.length), a = 0; a < n.length; ++a) r[a] = n.charCodeAt(a);
|
|
2778
|
+
l(r.buffer, e);
|
|
2779
|
+
} else {
|
|
2780
|
+
var s = new XMLHttpRequest();
|
|
2781
|
+
s.open(e._xhr.method, t, !0), s.withCredentials = e._xhr.withCredentials, s.responseType = "arraybuffer", e._xhr.headers && Object.keys(e._xhr.headers).forEach(function(t) {
|
|
2782
|
+
s.setRequestHeader(t, e._xhr.headers[t]);
|
|
2783
|
+
}), s.onload = function() {
|
|
2784
|
+
var t = (s.status + "")[0];
|
|
2785
|
+
if (t !== "0" && t !== "2" && t !== "3") {
|
|
2786
|
+
e._emit("loaderror", null, "Failed loading audio file with status: " + s.status + ".");
|
|
2787
|
+
return;
|
|
2788
|
+
}
|
|
2789
|
+
l(s.response, e);
|
|
2790
|
+
}, s.onerror = function() {
|
|
2791
|
+
e._webAudio && (e._html5 = !0, e._webAudio = !1, e._sounds = [], delete o[t], e.load());
|
|
2792
|
+
}, c(s);
|
|
2793
|
+
}
|
|
2794
|
+
}, c = function(e) {
|
|
2795
|
+
try {
|
|
2796
|
+
e.send();
|
|
2797
|
+
} catch {
|
|
2798
|
+
e.onerror();
|
|
2799
|
+
}
|
|
2800
|
+
}, l = function(e, t) {
|
|
2801
|
+
var r = function() {
|
|
2802
|
+
t._emit("loaderror", null, "Decoding audio data failed.");
|
|
2803
|
+
}, a = function(e) {
|
|
2804
|
+
e && t._sounds.length > 0 ? (o[t._src] = e, u(t, e)) : r();
|
|
2805
|
+
};
|
|
2806
|
+
typeof Promise < "u" && n.ctx.decodeAudioData.length === 1 ? n.ctx.decodeAudioData(e).then(a).catch(r) : n.ctx.decodeAudioData(e, a, r);
|
|
2807
|
+
}, u = function(e, t) {
|
|
2808
|
+
t && !e._duration && (e._duration = t.duration), Object.keys(e._sprite).length === 0 && (e._sprite = { __default: [0, e._duration * 1e3] }), e._state !== "loaded" && (e._state = "loaded", e._emit("load"), e._loadQueue());
|
|
2809
|
+
}, d = function() {
|
|
2810
|
+
if (n.usingWebAudio) {
|
|
2811
|
+
try {
|
|
2812
|
+
typeof AudioContext < "u" ? n.ctx = new AudioContext() : typeof webkitAudioContext < "u" ? n.ctx = new webkitAudioContext() : n.usingWebAudio = !1;
|
|
2813
|
+
} catch {
|
|
2814
|
+
n.usingWebAudio = !1;
|
|
2815
|
+
}
|
|
2816
|
+
n.ctx || (n.usingWebAudio = !1);
|
|
2817
|
+
var e = /iP(hone|od|ad)/.test(n._navigator && n._navigator.platform), t = n._navigator && n._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/), r = t ? parseInt(t[1], 10) : null;
|
|
2818
|
+
if (e && r && r < 9) {
|
|
2819
|
+
var a = /safari/.test(n._navigator && n._navigator.userAgent.toLowerCase());
|
|
2820
|
+
n._navigator && !a && (n.usingWebAudio = !1);
|
|
2821
|
+
}
|
|
2822
|
+
n.usingWebAudio && (n.masterGain = n.ctx.createGain === void 0 ? n.ctx.createGainNode() : n.ctx.createGain(), n.masterGain.gain.setValueAtTime(n._muted ? 0 : n._volume, n.ctx.currentTime), n.masterGain.connect(n.ctx.destination)), n._setup();
|
|
2823
|
+
}
|
|
2824
|
+
};
|
|
2825
|
+
typeof define == "function" && define.amd && define([], function() {
|
|
2826
|
+
return {
|
|
2827
|
+
Howler: n,
|
|
2828
|
+
Howl: r
|
|
2829
|
+
};
|
|
2830
|
+
}), e !== void 0 && (e.Howler = n, e.Howl = r), typeof global < "u" ? (global.HowlerGlobal = t, global.Howler = n, global.Howl = r, global.Sound = a) : typeof window < "u" && (window.HowlerGlobal = t, window.Howler = n, window.Howl = r, window.Sound = a);
|
|
2831
|
+
})(), (function() {
|
|
2832
|
+
HowlerGlobal.prototype._pos = [
|
|
2833
|
+
0,
|
|
2834
|
+
0,
|
|
2835
|
+
0
|
|
2836
|
+
], HowlerGlobal.prototype._orientation = [
|
|
2837
|
+
0,
|
|
2838
|
+
0,
|
|
2839
|
+
-1,
|
|
2840
|
+
0,
|
|
2841
|
+
1,
|
|
2842
|
+
0
|
|
2843
|
+
], HowlerGlobal.prototype.stereo = function(e) {
|
|
2844
|
+
var t = this;
|
|
2845
|
+
if (!t.ctx || !t.ctx.listener) return t;
|
|
2846
|
+
for (var n = t._howls.length - 1; n >= 0; n--) t._howls[n].stereo(e);
|
|
2847
|
+
return t;
|
|
2848
|
+
}, HowlerGlobal.prototype.pos = function(e, t, n) {
|
|
2849
|
+
var r = this;
|
|
2850
|
+
if (!r.ctx || !r.ctx.listener) return r;
|
|
2851
|
+
if (t = typeof t == "number" ? t : r._pos[1], n = typeof n == "number" ? n : r._pos[2], typeof e == "number") r._pos = [
|
|
2852
|
+
e,
|
|
2853
|
+
t,
|
|
2854
|
+
n
|
|
2855
|
+
], r.ctx.listener.positionX === void 0 ? r.ctx.listener.setPosition(r._pos[0], r._pos[1], r._pos[2]) : (r.ctx.listener.positionX.setTargetAtTime(r._pos[0], Howler.ctx.currentTime, .1), r.ctx.listener.positionY.setTargetAtTime(r._pos[1], Howler.ctx.currentTime, .1), r.ctx.listener.positionZ.setTargetAtTime(r._pos[2], Howler.ctx.currentTime, .1));
|
|
2856
|
+
else return r._pos;
|
|
2857
|
+
return r;
|
|
2858
|
+
}, HowlerGlobal.prototype.orientation = function(e, t, n, r, a, o) {
|
|
2859
|
+
var s = this;
|
|
2860
|
+
if (!s.ctx || !s.ctx.listener) return s;
|
|
2861
|
+
var c = s._orientation;
|
|
2862
|
+
if (t = typeof t == "number" ? t : c[1], n = typeof n == "number" ? n : c[2], r = typeof r == "number" ? r : c[3], a = typeof a == "number" ? a : c[4], o = typeof o == "number" ? o : c[5], typeof e == "number") s._orientation = [
|
|
2863
|
+
e,
|
|
2864
|
+
t,
|
|
2865
|
+
n,
|
|
2866
|
+
r,
|
|
2867
|
+
a,
|
|
2868
|
+
o
|
|
2869
|
+
], s.ctx.listener.forwardX === void 0 ? s.ctx.listener.setOrientation(e, t, n, r, a, o) : (s.ctx.listener.forwardX.setTargetAtTime(e, Howler.ctx.currentTime, .1), s.ctx.listener.forwardY.setTargetAtTime(t, Howler.ctx.currentTime, .1), s.ctx.listener.forwardZ.setTargetAtTime(n, Howler.ctx.currentTime, .1), s.ctx.listener.upX.setTargetAtTime(r, Howler.ctx.currentTime, .1), s.ctx.listener.upY.setTargetAtTime(a, Howler.ctx.currentTime, .1), s.ctx.listener.upZ.setTargetAtTime(o, Howler.ctx.currentTime, .1));
|
|
2870
|
+
else return c;
|
|
2871
|
+
return s;
|
|
2872
|
+
}, Howl.prototype.init = (function(e) {
|
|
2873
|
+
return function(t) {
|
|
2874
|
+
var n = this;
|
|
2875
|
+
return n._orientation = t.orientation || [
|
|
2876
|
+
1,
|
|
2877
|
+
0,
|
|
2878
|
+
0
|
|
2879
|
+
], n._stereo = t.stereo || null, n._pos = t.pos || null, n._pannerAttr = {
|
|
2880
|
+
coneInnerAngle: t.coneInnerAngle === void 0 ? 360 : t.coneInnerAngle,
|
|
2881
|
+
coneOuterAngle: t.coneOuterAngle === void 0 ? 360 : t.coneOuterAngle,
|
|
2882
|
+
coneOuterGain: t.coneOuterGain === void 0 ? 0 : t.coneOuterGain,
|
|
2883
|
+
distanceModel: t.distanceModel === void 0 ? "inverse" : t.distanceModel,
|
|
2884
|
+
maxDistance: t.maxDistance === void 0 ? 1e4 : t.maxDistance,
|
|
2885
|
+
panningModel: t.panningModel === void 0 ? "HRTF" : t.panningModel,
|
|
2886
|
+
refDistance: t.refDistance === void 0 ? 1 : t.refDistance,
|
|
2887
|
+
rolloffFactor: t.rolloffFactor === void 0 ? 1 : t.rolloffFactor
|
|
2888
|
+
}, n._onstereo = t.onstereo ? [{ fn: t.onstereo }] : [], n._onpos = t.onpos ? [{ fn: t.onpos }] : [], n._onorientation = t.onorientation ? [{ fn: t.onorientation }] : [], e.call(this, t);
|
|
2889
|
+
};
|
|
2890
|
+
})(Howl.prototype.init), Howl.prototype.stereo = function(t, n) {
|
|
2891
|
+
var r = this;
|
|
2892
|
+
if (!r._webAudio) return r;
|
|
2893
|
+
if (r._state !== "loaded") return r._queue.push({
|
|
2894
|
+
event: "stereo",
|
|
2895
|
+
action: function() {
|
|
2896
|
+
r.stereo(t, n);
|
|
2897
|
+
}
|
|
2898
|
+
}), r;
|
|
2899
|
+
var a = Howler.ctx.createStereoPanner === void 0 ? "spatial" : "stereo";
|
|
2900
|
+
if (n === void 0) if (typeof t == "number") r._stereo = t, r._pos = [
|
|
2901
|
+
t,
|
|
2902
|
+
0,
|
|
2903
|
+
0
|
|
2904
|
+
];
|
|
2905
|
+
else return r._stereo;
|
|
2906
|
+
for (var o = r._getSoundIds(n), s = 0; s < o.length; s++) {
|
|
2907
|
+
var c = r._soundById(o[s]);
|
|
2908
|
+
if (c) if (typeof t == "number") c._stereo = t, c._pos = [
|
|
2909
|
+
t,
|
|
2910
|
+
0,
|
|
2911
|
+
0
|
|
2912
|
+
], c._node && (c._pannerAttr.panningModel = "equalpower", (!c._panner || !c._panner.pan) && e(c, a), a === "spatial" ? c._panner.positionX === void 0 ? c._panner.setPosition(t, 0, 0) : (c._panner.positionX.setValueAtTime(t, Howler.ctx.currentTime), c._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime), c._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime)) : c._panner.pan.setValueAtTime(t, Howler.ctx.currentTime)), r._emit("stereo", c._id);
|
|
2913
|
+
else return c._stereo;
|
|
2914
|
+
}
|
|
2915
|
+
return r;
|
|
2916
|
+
}, Howl.prototype.pos = function(t, n, r, a) {
|
|
2917
|
+
var o = this;
|
|
2918
|
+
if (!o._webAudio) return o;
|
|
2919
|
+
if (o._state !== "loaded") return o._queue.push({
|
|
2920
|
+
event: "pos",
|
|
2921
|
+
action: function() {
|
|
2922
|
+
o.pos(t, n, r, a);
|
|
2923
|
+
}
|
|
2924
|
+
}), o;
|
|
2925
|
+
if (n = typeof n == "number" ? n : 0, r = typeof r == "number" ? r : -.5, a === void 0) if (typeof t == "number") o._pos = [
|
|
2926
|
+
t,
|
|
2927
|
+
n,
|
|
2928
|
+
r
|
|
2929
|
+
];
|
|
2930
|
+
else return o._pos;
|
|
2931
|
+
for (var s = o._getSoundIds(a), c = 0; c < s.length; c++) {
|
|
2932
|
+
var l = o._soundById(s[c]);
|
|
2933
|
+
if (l) if (typeof t == "number") l._pos = [
|
|
2934
|
+
t,
|
|
2935
|
+
n,
|
|
2936
|
+
r
|
|
2937
|
+
], l._node && ((!l._panner || l._panner.pan) && e(l, "spatial"), l._panner.positionX === void 0 ? l._panner.setPosition(t, n, r) : (l._panner.positionX.setValueAtTime(t, Howler.ctx.currentTime), l._panner.positionY.setValueAtTime(n, Howler.ctx.currentTime), l._panner.positionZ.setValueAtTime(r, Howler.ctx.currentTime))), o._emit("pos", l._id);
|
|
2938
|
+
else return l._pos;
|
|
2939
|
+
}
|
|
2940
|
+
return o;
|
|
2941
|
+
}, Howl.prototype.orientation = function(t, n, r, a) {
|
|
2942
|
+
var o = this;
|
|
2943
|
+
if (!o._webAudio) return o;
|
|
2944
|
+
if (o._state !== "loaded") return o._queue.push({
|
|
2945
|
+
event: "orientation",
|
|
2946
|
+
action: function() {
|
|
2947
|
+
o.orientation(t, n, r, a);
|
|
2948
|
+
}
|
|
2949
|
+
}), o;
|
|
2950
|
+
if (n = typeof n == "number" ? n : o._orientation[1], r = typeof r == "number" ? r : o._orientation[2], a === void 0) if (typeof t == "number") o._orientation = [
|
|
2951
|
+
t,
|
|
2952
|
+
n,
|
|
2953
|
+
r
|
|
2954
|
+
];
|
|
2955
|
+
else return o._orientation;
|
|
2956
|
+
for (var s = o._getSoundIds(a), c = 0; c < s.length; c++) {
|
|
2957
|
+
var l = o._soundById(s[c]);
|
|
2958
|
+
if (l) if (typeof t == "number") l._orientation = [
|
|
2959
|
+
t,
|
|
2960
|
+
n,
|
|
2961
|
+
r
|
|
2962
|
+
], l._node && (l._panner || (l._pos ||= o._pos || [
|
|
2963
|
+
0,
|
|
2964
|
+
0,
|
|
2965
|
+
-.5
|
|
2966
|
+
], e(l, "spatial")), l._panner.orientationX === void 0 ? l._panner.setOrientation(t, n, r) : (l._panner.orientationX.setValueAtTime(t, Howler.ctx.currentTime), l._panner.orientationY.setValueAtTime(n, Howler.ctx.currentTime), l._panner.orientationZ.setValueAtTime(r, Howler.ctx.currentTime))), o._emit("orientation", l._id);
|
|
2967
|
+
else return l._orientation;
|
|
2968
|
+
}
|
|
2969
|
+
return o;
|
|
2970
|
+
}, Howl.prototype.pannerAttr = function() {
|
|
2971
|
+
var t = this, n = arguments, r, a, o;
|
|
2972
|
+
if (!t._webAudio) return t;
|
|
2973
|
+
if (n.length === 0) return t._pannerAttr;
|
|
2974
|
+
if (n.length === 1) if (typeof n[0] == "object") r = n[0], a === void 0 && (r.pannerAttr ||= {
|
|
2975
|
+
coneInnerAngle: r.coneInnerAngle,
|
|
2976
|
+
coneOuterAngle: r.coneOuterAngle,
|
|
2977
|
+
coneOuterGain: r.coneOuterGain,
|
|
2978
|
+
distanceModel: r.distanceModel,
|
|
2979
|
+
maxDistance: r.maxDistance,
|
|
2980
|
+
refDistance: r.refDistance,
|
|
2981
|
+
rolloffFactor: r.rolloffFactor,
|
|
2982
|
+
panningModel: r.panningModel
|
|
2983
|
+
}, t._pannerAttr = {
|
|
2984
|
+
coneInnerAngle: r.pannerAttr.coneInnerAngle === void 0 ? t._coneInnerAngle : r.pannerAttr.coneInnerAngle,
|
|
2985
|
+
coneOuterAngle: r.pannerAttr.coneOuterAngle === void 0 ? t._coneOuterAngle : r.pannerAttr.coneOuterAngle,
|
|
2986
|
+
coneOuterGain: r.pannerAttr.coneOuterGain === void 0 ? t._coneOuterGain : r.pannerAttr.coneOuterGain,
|
|
2987
|
+
distanceModel: r.pannerAttr.distanceModel === void 0 ? t._distanceModel : r.pannerAttr.distanceModel,
|
|
2988
|
+
maxDistance: r.pannerAttr.maxDistance === void 0 ? t._maxDistance : r.pannerAttr.maxDistance,
|
|
2989
|
+
refDistance: r.pannerAttr.refDistance === void 0 ? t._refDistance : r.pannerAttr.refDistance,
|
|
2990
|
+
rolloffFactor: r.pannerAttr.rolloffFactor === void 0 ? t._rolloffFactor : r.pannerAttr.rolloffFactor,
|
|
2991
|
+
panningModel: r.pannerAttr.panningModel === void 0 ? t._panningModel : r.pannerAttr.panningModel
|
|
2992
|
+
});
|
|
2993
|
+
else return o = t._soundById(parseInt(n[0], 10)), o ? o._pannerAttr : t._pannerAttr;
|
|
2994
|
+
else n.length === 2 && (r = n[0], a = parseInt(n[1], 10));
|
|
2995
|
+
for (var s = t._getSoundIds(a), c = 0; c < s.length; c++) if (o = t._soundById(s[c]), o) {
|
|
2996
|
+
var l = o._pannerAttr;
|
|
2997
|
+
l = {
|
|
2998
|
+
coneInnerAngle: r.coneInnerAngle === void 0 ? l.coneInnerAngle : r.coneInnerAngle,
|
|
2999
|
+
coneOuterAngle: r.coneOuterAngle === void 0 ? l.coneOuterAngle : r.coneOuterAngle,
|
|
3000
|
+
coneOuterGain: r.coneOuterGain === void 0 ? l.coneOuterGain : r.coneOuterGain,
|
|
3001
|
+
distanceModel: r.distanceModel === void 0 ? l.distanceModel : r.distanceModel,
|
|
3002
|
+
maxDistance: r.maxDistance === void 0 ? l.maxDistance : r.maxDistance,
|
|
3003
|
+
refDistance: r.refDistance === void 0 ? l.refDistance : r.refDistance,
|
|
3004
|
+
rolloffFactor: r.rolloffFactor === void 0 ? l.rolloffFactor : r.rolloffFactor,
|
|
3005
|
+
panningModel: r.panningModel === void 0 ? l.panningModel : r.panningModel
|
|
3006
|
+
};
|
|
3007
|
+
var u = o._panner;
|
|
3008
|
+
u ||= (o._pos ||= t._pos || [
|
|
3009
|
+
0,
|
|
3010
|
+
0,
|
|
3011
|
+
-.5
|
|
3012
|
+
], e(o, "spatial"), o._panner), u.coneInnerAngle = l.coneInnerAngle, u.coneOuterAngle = l.coneOuterAngle, u.coneOuterGain = l.coneOuterGain, u.distanceModel = l.distanceModel, u.maxDistance = l.maxDistance, u.refDistance = l.refDistance, u.rolloffFactor = l.rolloffFactor, u.panningModel = l.panningModel;
|
|
3013
|
+
}
|
|
3014
|
+
return t;
|
|
3015
|
+
}, Sound.prototype.init = (function(e) {
|
|
3016
|
+
return function() {
|
|
3017
|
+
var t = this, n = t._parent;
|
|
3018
|
+
t._orientation = n._orientation, t._stereo = n._stereo, t._pos = n._pos, t._pannerAttr = n._pannerAttr, e.call(this), t._stereo ? n.stereo(t._stereo) : t._pos && n.pos(t._pos[0], t._pos[1], t._pos[2], t._id);
|
|
3019
|
+
};
|
|
3020
|
+
})(Sound.prototype.init), Sound.prototype.reset = (function(e) {
|
|
3021
|
+
return function() {
|
|
3022
|
+
var t = this, n = t._parent;
|
|
3023
|
+
return t._orientation = n._orientation, t._stereo = n._stereo, t._pos = n._pos, t._pannerAttr = n._pannerAttr, t._stereo ? n.stereo(t._stereo) : t._pos ? n.pos(t._pos[0], t._pos[1], t._pos[2], t._id) : t._panner && (t._panner.disconnect(0), t._panner = void 0, n._refreshBuffer(t)), e.call(this);
|
|
3024
|
+
};
|
|
3025
|
+
})(Sound.prototype.reset);
|
|
3026
|
+
var e = function(e, t) {
|
|
3027
|
+
t ||= "spatial", t === "spatial" ? (e._panner = Howler.ctx.createPanner(), e._panner.coneInnerAngle = e._pannerAttr.coneInnerAngle, e._panner.coneOuterAngle = e._pannerAttr.coneOuterAngle, e._panner.coneOuterGain = e._pannerAttr.coneOuterGain, e._panner.distanceModel = e._pannerAttr.distanceModel, e._panner.maxDistance = e._pannerAttr.maxDistance, e._panner.refDistance = e._pannerAttr.refDistance, e._panner.rolloffFactor = e._pannerAttr.rolloffFactor, e._panner.panningModel = e._pannerAttr.panningModel, e._panner.positionX === void 0 ? e._panner.setPosition(e._pos[0], e._pos[1], e._pos[2]) : (e._panner.positionX.setValueAtTime(e._pos[0], Howler.ctx.currentTime), e._panner.positionY.setValueAtTime(e._pos[1], Howler.ctx.currentTime), e._panner.positionZ.setValueAtTime(e._pos[2], Howler.ctx.currentTime)), e._panner.orientationX === void 0 ? e._panner.setOrientation(e._orientation[0], e._orientation[1], e._orientation[2]) : (e._panner.orientationX.setValueAtTime(e._orientation[0], Howler.ctx.currentTime), e._panner.orientationY.setValueAtTime(e._orientation[1], Howler.ctx.currentTime), e._panner.orientationZ.setValueAtTime(e._orientation[2], Howler.ctx.currentTime))) : (e._panner = Howler.ctx.createStereoPanner(), e._panner.pan.setValueAtTime(e._stereo, Howler.ctx.currentTime)), e._panner.connect(e._node), e._paused || e._parent.pause(e._id, !0).play(e._id, !0);
|
|
3028
|
+
};
|
|
3029
|
+
})();
|
|
3030
|
+
})))();
|
|
3031
|
+
function Ei(e) {}
|
|
3032
|
+
//#endregion
|
|
3033
|
+
var Di = Ti.Howl, Oi = Ti.Howler;
|
|
3034
|
+
export { Di as Howl, Oi as Howler, Q as Winwheel, Ei as connectSdkCallback };
|