@lordicon/internal
Version:
Minimalistic internal animation player.
1,245 lines • 236 kB
JavaScript
function es(t) {
return document.createElement(t);
}
function st(t, e) {
var r, i = t.length, s;
for (r = 0; r < i; r += 1) {
s = t[r].prototype;
for (var n in s)
Object.prototype.hasOwnProperty.call(s, n) && (e.prototype[n] = s[n]);
}
}
function be(t, e) {
return Object.getOwnPropertyDescriptor(t, e);
}
function rs(t) {
function e() {
}
return e.prototype = t, e;
}
const nt = /* @__PURE__ */ function() {
function t(r, i) {
var s = 0, n = [], o;
switch (r) {
case "int16":
case "uint8c":
o = 1;
break;
default:
o = 1.1;
break;
}
for (s = 0; s < i; s += 1)
n.push(o);
return n;
}
function e(r, i) {
return r === "float32" ? new Float32Array(i) : r === "int16" ? new Int16Array(i) : r === "uint8c" ? new Uint8ClampedArray(i) : t(r, i);
}
return typeof Uint8ClampedArray == "function" && typeof Float32Array == "function" ? e : t;
}();
function vt(t) {
return Array.apply(null, { length: t });
}
let ei = !0, ri = null, ii = null, si = "";
const Ft = Math.pow, Rr = Math.sqrt, xt = Math.floor, is = Math.min, Ot = {};
(function() {
var t = ["abs", "acos", "acosh", "asin", "asinh", "atan", "atanh", "atan2", "ceil", "cbrt", "expm1", "clz32", "cos", "cosh", "exp", "floor", "fround", "hypot", "imul", "log", "log1p", "log2", "log10", "max", "min", "pow", "random", "round", "sign", "sin", "sinh", "sqrt", "tan", "tanh", "trunc", "E", "LN10", "LN2", "LOG10E", "LOG2E", "PI", "SQRT1_2", "SQRT2"], e, r = t.length;
for (e = 0; e < r; e += 1)
Ot[t[e]] = Math[t[e]];
})();
Ot.random = Math.random;
Ot.abs = function(t) {
var e = typeof t;
if (e === "object" && t.length) {
var r = vt(t.length), i, s = t.length;
for (i = 0; i < s; i += 1)
r[i] = Math.abs(t[i]);
return r;
}
return Math.abs(t);
};
let ni = 150;
const lt = Math.PI / 180, Xt = 0.5519;
function nr(t, e, r, i) {
this.type = t, this.currentTime = e, this.totalTime = r, this.direction = i < 0 ? -1 : 1;
}
function Or(t, e) {
this.type = t, this.direction = e < 0 ? -1 : 1;
}
function Gr(t, e, r, i) {
this.type = t, this.currentLoop = r, this.totalLoops = e, this.direction = i < 0 ? -1 : 1;
}
function Dr(t, e, r) {
this.type = t, this.firstFrame = e, this.totalFrames = r;
}
function Br(t, e) {
this.type = t, this.target = e;
}
function ss(t, e) {
this.type = "renderFrameError", this.nativeError = t, this.currentTime = e;
}
function ns(t) {
this.type = "configError", this.nativeError = t;
}
const gt = /* @__PURE__ */ function() {
var t = 0;
return function() {
return t += 1, si + "__lottie_element_" + t;
};
}(), as = function() {
var t = [], e, r;
for (e = 0; e < 256; e += 1)
r = e.toString(16), t[e] = r.length === 1 ? "0" + r : r;
return function(i, s, n) {
return i < 0 && (i = 0), s < 0 && (s = 0), n < 0 && (n = 0), "#" + t[i] + t[s] + t[n];
};
}(), os = (t) => {
ei = !!t;
}, hs = () => ei, ai = (t) => {
ri = t;
}, Xe = () => ri, fs = (t) => {
ii = t;
}, ls = () => ii, Re = (t) => {
ni = t;
}, De = () => ni, us = (t) => {
si = t;
};
function oi() {
}
oi.prototype = {
triggerEvent: function(t, e) {
if (this._cbs[t])
for (var r = this._cbs[t], i = 0; i < r.length; i += 1)
r[i](e);
},
addEventListener: function(t, e) {
return this._cbs[t] || (this._cbs[t] = []), this._cbs[t].push(e), (function() {
this.removeEventListener(t, e);
}).bind(this);
},
removeEventListener: function(t, e) {
if (!e)
this._cbs[t] = null;
else if (this._cbs[t]) {
for (var r = 0, i = this._cbs[t].length; r < i; )
this._cbs[t][r] === e && (this._cbs[t].splice(r, 1), r -= 1, i -= 1), r += 1;
this._cbs[t].length || (this._cbs[t] = null);
}
}
};
let hi = "";
const Be = -999999, ps = (t) => {
hi = t;
}, kt = () => hi, Ye = /* @__PURE__ */ function() {
var t = 1, e = [], r, i, s = {
onmessage: function() {
},
postMessage: function(p) {
r({
data: p
});
}
}, n = {
postMessage: function(p) {
s.onmessage({
data: p
});
}
};
function o(p) {
return r = p, s;
}
function u() {
i || (i = o(function(g) {
function m() {
function k(F, I) {
var L, A, b = F.length, C, D, Z, at;
for (A = 0; A < b; A += 1)
if (L = F[A], "ks" in L && !L.completed) {
if (L.completed = !0, L.hasMask) {
var et = L.masksProperties;
for (D = et.length, C = 0; C < D; C += 1)
if (et[C].pt.k.i)
_(et[C].pt.k);
else
for (at = et[C].pt.k.length, Z = 0; Z < at; Z += 1)
et[C].pt.k[Z].s && _(et[C].pt.k[Z].s[0]), et[C].pt.k[Z].e && _(et[C].pt.k[Z].e[0]);
}
L.ty === 0 ? (L.layers = f(L.refId, I), k(L.layers, I)) : L.ty === 4 ? v(L.shapes) : L.ty === 5 && R(L);
}
}
function l(F, I) {
if (F) {
var L = 0, A = F.length;
for (L = 0; L < A; L += 1)
F[L].t === 1 && (F[L].data.layers = f(F[L].data.refId, I), k(F[L].data.layers, I));
}
}
function a(F, I) {
for (var L = 0, A = I.length; L < A; ) {
if (I[L].id === F)
return I[L];
L += 1;
}
return null;
}
function f(F, I) {
var L = a(F, I);
return L ? L.layers.__used ? JSON.parse(JSON.stringify(L.layers)) : (L.layers.__used = !0, L.layers) : null;
}
function v(F) {
var I, L = F.length, A, b;
for (I = L - 1; I >= 0; I -= 1)
if (F[I].ty === "sh")
if (F[I].ks.k.i)
_(F[I].ks.k);
else
for (b = F[I].ks.k.length, A = 0; A < b; A += 1)
F[I].ks.k[A].s && _(F[I].ks.k[A].s[0]), F[I].ks.k[A].e && _(F[I].ks.k[A].e[0]);
else F[I].ty === "gr" && v(F[I].it);
}
function _(F) {
var I, L = F.i.length;
for (I = 0; I < L; I += 1)
F.i[I][0] += F.v[I][0], F.i[I][1] += F.v[I][1], F.o[I][0] += F.v[I][0], F.o[I][1] += F.v[I][1];
}
function S(F, I) {
var L = I ? I.split(".") : [100, 100, 100];
return F[0] > L[0] ? !0 : L[0] > F[0] ? !1 : F[1] > L[1] ? !0 : L[1] > F[1] ? !1 : F[2] > L[2] ? !0 : L[2] > F[2] ? !1 : null;
}
var E = /* @__PURE__ */ function() {
var F = [4, 4, 14];
function I(A) {
var b = A.t.d;
A.t.d = {
k: [
{
s: b,
t: 0
}
]
};
}
function L(A) {
var b, C = A.length;
for (b = 0; b < C; b += 1)
A[b].ty === 5 && I(A[b]);
}
return function(A) {
if (S(F, A.v) && (L(A.layers), A.assets)) {
var b, C = A.assets.length;
for (b = 0; b < C; b += 1)
A.assets[b].layers && L(A.assets[b].layers);
}
};
}(), w = /* @__PURE__ */ function() {
var F = [4, 7, 99];
return function(I) {
if (I.chars && !S(F, I.v)) {
var L, A = I.chars.length;
for (L = 0; L < A; L += 1) {
var b = I.chars[L];
b.data && b.data.shapes && (v(b.data.shapes), b.data.ip = 0, b.data.op = 99999, b.data.st = 0, b.data.sr = 1, b.data.ks = {
p: { k: [0, 0], a: 0 },
s: { k: [100, 100], a: 0 },
a: { k: [0, 0], a: 0 },
r: { k: 0, a: 0 },
o: { k: 100, a: 0 }
}, I.chars[L].t || (b.data.shapes.push(
{
ty: "no"
}
), b.data.shapes[0].it.push(
{
p: { k: [0, 0], a: 0 },
s: { k: [100, 100], a: 0 },
a: { k: [0, 0], a: 0 },
r: { k: 0, a: 0 },
o: { k: 100, a: 0 },
sk: { k: 0, a: 0 },
sa: { k: 0, a: 0 },
ty: "tr"
}
)));
}
}
};
}(), G = /* @__PURE__ */ function() {
var F = [5, 7, 15];
function I(A) {
var b = A.t.p;
typeof b.a == "number" && (b.a = {
a: 0,
k: b.a
}), typeof b.p == "number" && (b.p = {
a: 0,
k: b.p
}), typeof b.r == "number" && (b.r = {
a: 0,
k: b.r
});
}
function L(A) {
var b, C = A.length;
for (b = 0; b < C; b += 1)
A[b].ty === 5 && I(A[b]);
}
return function(A) {
if (S(F, A.v) && (L(A.layers), A.assets)) {
var b, C = A.assets.length;
for (b = 0; b < C; b += 1)
A.assets[b].layers && L(A.assets[b].layers);
}
};
}(), N = /* @__PURE__ */ function() {
var F = [4, 1, 9];
function I(A) {
var b, C = A.length, D, Z;
for (b = 0; b < C; b += 1)
if (A[b].ty === "gr")
I(A[b].it);
else if (A[b].ty === "fl" || A[b].ty === "st")
if (A[b].c.k && A[b].c.k[0].i)
for (Z = A[b].c.k.length, D = 0; D < Z; D += 1)
A[b].c.k[D].s && (A[b].c.k[D].s[0] /= 255, A[b].c.k[D].s[1] /= 255, A[b].c.k[D].s[2] /= 255, A[b].c.k[D].s[3] /= 255), A[b].c.k[D].e && (A[b].c.k[D].e[0] /= 255, A[b].c.k[D].e[1] /= 255, A[b].c.k[D].e[2] /= 255, A[b].c.k[D].e[3] /= 255);
else
A[b].c.k[0] /= 255, A[b].c.k[1] /= 255, A[b].c.k[2] /= 255, A[b].c.k[3] /= 255;
}
function L(A) {
var b, C = A.length;
for (b = 0; b < C; b += 1)
A[b].ty === 4 && I(A[b].shapes);
}
return function(A) {
if (S(F, A.v) && (L(A.layers), A.assets)) {
var b, C = A.assets.length;
for (b = 0; b < C; b += 1)
A.assets[b].layers && L(A.assets[b].layers);
}
};
}(), Y = /* @__PURE__ */ function() {
var F = [4, 4, 18];
function I(A) {
var b, C = A.length, D, Z;
for (b = C - 1; b >= 0; b -= 1)
if (A[b].ty === "sh")
if (A[b].ks.k.i)
A[b].ks.k.c = A[b].closed;
else
for (Z = A[b].ks.k.length, D = 0; D < Z; D += 1)
A[b].ks.k[D].s && (A[b].ks.k[D].s[0].c = A[b].closed), A[b].ks.k[D].e && (A[b].ks.k[D].e[0].c = A[b].closed);
else A[b].ty === "gr" && I(A[b].it);
}
function L(A) {
var b, C, D = A.length, Z, at, et, T;
for (C = 0; C < D; C += 1) {
if (b = A[C], b.hasMask) {
var M = b.masksProperties;
for (at = M.length, Z = 0; Z < at; Z += 1)
if (M[Z].pt.k.i)
M[Z].pt.k.c = M[Z].cl;
else
for (T = M[Z].pt.k.length, et = 0; et < T; et += 1)
M[Z].pt.k[et].s && (M[Z].pt.k[et].s[0].c = M[Z].cl), M[Z].pt.k[et].e && (M[Z].pt.k[et].e[0].c = M[Z].cl);
}
b.ty === 4 && I(b.shapes);
}
}
return function(A) {
if (S(F, A.v) && (L(A.layers), A.assets)) {
var b, C = A.assets.length;
for (b = 0; b < C; b += 1)
A.assets[b].layers && L(A.assets[b].layers);
}
};
}();
function $(F) {
F.__complete || (N(F), E(F), w(F), G(F), Y(F), k(F.layers, F.assets), l(F.chars, F.assets), F.__complete = !0);
}
function R(F) {
F.t.a.length === 0 && "m" in F.t.p;
}
var V = {};
return V.completeData = $, V.checkColors = N, V.checkChars = w, V.checkPathProperties = G, V.checkShapes = Y, V.completeLayers = k, V;
}
if (n.dataManager || (n.dataManager = m()), n.assetLoader || (n.assetLoader = /* @__PURE__ */ function() {
function k(a) {
var f = a.getResponseHeader("content-type");
return f && a.responseType === "json" && f.indexOf("json") !== -1 || a.response && typeof a.response == "object" ? a.response : a.response && typeof a.response == "string" ? JSON.parse(a.response) : a.responseText ? JSON.parse(a.responseText) : null;
}
function l(a, f, v, _) {
var S, E = new XMLHttpRequest();
try {
E.responseType = "json";
} catch {
}
E.onreadystatechange = function() {
if (E.readyState === 4)
if (E.status === 200)
S = k(E), v(S);
else
try {
S = k(E), v(S);
} catch (w) {
_ && _(w);
}
};
try {
E.open(["G", "E", "T"].join(""), a, !0);
} catch {
E.open(["G", "E", "T"].join(""), f + "/" + a, !0);
}
E.send();
}
return {
load: l
};
}()), g.data.type === "loadAnimation")
n.assetLoader.load(
g.data.path,
g.data.fullPath,
function(k) {
n.dataManager.completeData(k), n.postMessage({
id: g.data.id,
payload: k,
status: "success"
});
},
function() {
n.postMessage({
id: g.data.id,
status: "error"
});
}
);
else if (g.data.type === "complete") {
var d = g.data.animation;
n.dataManager.completeData(d), n.postMessage({
id: g.data.id,
payload: d,
status: "success"
});
} else g.data.type === "loadData" && n.assetLoader.load(
g.data.path,
g.data.fullPath,
function(k) {
n.postMessage({
id: g.data.id,
payload: k,
status: "success"
});
},
function() {
n.postMessage({
id: g.data.id,
status: "error"
});
}
);
}), i.onmessage = function(p) {
var g = p.data, m = g.id, d = e[m];
e[m] = null, g.status === "success" ? d.onComplete(g.payload) : d.onError && d.onError();
});
}
function h(p, g) {
t += 1;
var m = "processId_" + t;
return e[m] = {
onComplete: p,
onError: g
}, m;
}
function c(p, g, m) {
u();
var d = h(g, m);
i.postMessage({
type: "loadAnimation",
path: p,
fullPath: window.location.origin + window.location.pathname,
id: d
});
}
function y(p, g, m) {
u();
var d = h(g, m);
i.postMessage({
type: "loadData",
path: p,
fullPath: window.location.origin + window.location.pathname,
id: d
});
}
function P(p, g, m) {
u();
var d = h(g, m);
i.postMessage({
type: "complete",
animation: p,
id: d
});
}
return {
loadAnimation: c,
loadData: y,
completeAnimation: P
};
}(), cs = /* @__PURE__ */ function() {
function t(e) {
for (var r = e.split(`\r
`), i = {}, s, n = 0, o = 0; o < r.length; o += 1)
s = r[o].split(":"), s.length === 2 && (i[s[0]] = s[1].trim(), n += 1);
if (n === 0)
throw new Error();
return i;
}
return function(e) {
for (var r = [], i = 0; i < e.length; i += 1) {
var s = e[i], n = {
time: s.tm,
duration: s.dr
};
try {
n.payload = JSON.parse(e[i].cm);
} catch {
try {
n.payload = t(e[i].cm);
} catch {
n.payload = {
name: e[i].cm
};
}
}
r.push(n);
}
return r;
};
}(), vs = /* @__PURE__ */ function() {
function t(e) {
this.compositions.push(e);
}
return function() {
function e(r) {
for (var i = 0, s = this.compositions.length; i < s; ) {
if (this.compositions[i].data && this.compositions[i].data.nm === r)
return this.compositions[i].prepareFrame && this.compositions[i].data.xt && this.compositions[i].prepareFrame(this.currentFrame), this.compositions[i].compInterface;
i += 1;
}
return null;
}
return e.compositions = [], e.currentFrame = 0, e.registerComposition = t, e;
};
}(), ke = {}, ds = (t, e) => {
ke[t] = e;
};
function ms(t) {
return ke[t];
}
function gs() {
if (ke.canvas)
return "canvas";
for (const t in ke)
if (ke[t])
return t;
return "";
}
const J = function() {
this._cbs = [], this.name = "", this.path = "", this.isLoaded = !1, this.currentFrame = 0, this.currentRawFrame = 0, this.firstFrame = 0, this.totalFrames = 0, this.frameRate = 0, this.frameMult = 0, this.playSpeed = 1, this.playDirection = 1, this.playCount = 0, this.animationData = {}, this.assets = [], this.isPaused = !0, this.autoplay = !1, this.loop = !0, this.renderer = null, this.animationID = gt(), this.assetsPath = "", this.timeCompleted = 0, this.segmentPos = 0, this.isSubframeEnabled = hs(), this.segments = [], this._idle = !0, this._completedLoop = !1, this.projectInterface = vs(), this.markers = [], this.configAnimation = this.configAnimation.bind(this), this.onSetupError = this.onSetupError.bind(this), this.onSegmentComplete = this.onSegmentComplete.bind(this), this.drawnFrameEvent = new nr("drawnFrame", 0, 0, 0), this.expressionsPlugin = Xe();
};
st([oi], J);
J.prototype.setParams = function(t) {
(t.wrapper || t.container) && (this.wrapper = t.wrapper || t.container);
var e = "svg";
t.animType ? e = t.animType : t.renderer && (e = t.renderer);
const r = ms(e);
this.renderer = new r(this, t.rendererSettings), this.renderer.setProjectInterface(this.projectInterface), this.animType = e, t.loop === "" || t.loop === null || t.loop === void 0 || t.loop === !0 ? this.loop = !0 : t.loop === !1 ? this.loop = !1 : this.loop = parseInt(t.loop, 10), this.autoplay = "autoplay" in t ? t.autoplay : !0, this.name = t.name ? t.name : "", this.autoloadSegments = Object.prototype.hasOwnProperty.call(t, "autoloadSegments") ? t.autoloadSegments : !0, this.assetsPath = t.assetsPath, this.initialSegment = t.initialSegment, t.animationData ? this.setupAnimation(t.animationData) : t.path && (t.path.lastIndexOf("\\") !== -1 ? this.path = t.path.substr(0, t.path.lastIndexOf("\\") + 1) : this.path = t.path.substr(0, t.path.lastIndexOf("/") + 1), this.fileName = t.path.substr(t.path.lastIndexOf("/") + 1), this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf(".json")), Ye.loadAnimation(
t.path,
this.configAnimation,
this.onSetupError
));
};
J.prototype.onSetupError = function() {
this.trigger("data_failed");
};
J.prototype.setupAnimation = function(t) {
Ye.completeAnimation(
t,
this.configAnimation
);
};
J.prototype.setData = function(t, e) {
e && typeof e != "object" && (e = JSON.parse(e));
var r = {
wrapper: t,
animationData: e
}, i = t.attributes;
r.path = i.getNamedItem("data-animation-path") ? i.getNamedItem("data-animation-path").value : i.getNamedItem("data-bm-path") ? i.getNamedItem("data-bm-path").value : i.getNamedItem("bm-path") ? i.getNamedItem("bm-path").value : "", r.animType = i.getNamedItem("data-anim-type") ? i.getNamedItem("data-anim-type").value : i.getNamedItem("data-bm-type") ? i.getNamedItem("data-bm-type").value : i.getNamedItem("bm-type") ? i.getNamedItem("bm-type").value : i.getNamedItem("data-bm-renderer") ? i.getNamedItem("data-bm-renderer").value : i.getNamedItem("bm-renderer") ? i.getNamedItem("bm-renderer").value : gs() || "canvas";
var s = i.getNamedItem("data-anim-loop") ? i.getNamedItem("data-anim-loop").value : i.getNamedItem("data-bm-loop") ? i.getNamedItem("data-bm-loop").value : i.getNamedItem("bm-loop") ? i.getNamedItem("bm-loop").value : "";
s === "false" ? r.loop = !1 : s === "true" ? r.loop = !0 : s !== "" && (r.loop = parseInt(s, 10));
var n = i.getNamedItem("data-anim-autoplay") ? i.getNamedItem("data-anim-autoplay").value : i.getNamedItem("data-bm-autoplay") ? i.getNamedItem("data-bm-autoplay").value : i.getNamedItem("bm-autoplay") ? i.getNamedItem("bm-autoplay").value : !0;
r.autoplay = n !== "false", r.name = i.getNamedItem("data-name") ? i.getNamedItem("data-name").value : i.getNamedItem("data-bm-name") ? i.getNamedItem("data-bm-name").value : i.getNamedItem("bm-name") ? i.getNamedItem("bm-name").value : "";
var o = i.getNamedItem("data-anim-prerender") ? i.getNamedItem("data-anim-prerender").value : i.getNamedItem("data-bm-prerender") ? i.getNamedItem("data-bm-prerender").value : i.getNamedItem("bm-prerender") ? i.getNamedItem("bm-prerender").value : "";
o === "false" && (r.prerender = !1), r.path ? this.setParams(r) : this.trigger("destroy");
};
J.prototype.includeLayers = function(t) {
t.op > this.animationData.op && (this.animationData.op = t.op, this.totalFrames = Math.floor(t.op - this.animationData.ip));
var e = this.animationData.layers, r, i = e.length, s = t.layers, n, o = s.length;
for (n = 0; n < o; n += 1)
for (r = 0; r < i; ) {
if (e[r].id === s[n].id) {
e[r] = s[n];
break;
}
r += 1;
}
if (t.assets)
for (i = t.assets.length, r = 0; r < i; r += 1)
this.animationData.assets.push(t.assets[r]);
this.animationData.__complete = !1, Ye.completeAnimation(
this.animationData,
this.onSegmentComplete
);
};
J.prototype.onSegmentComplete = function(t) {
this.animationData = t;
var e = Xe();
e && e.initExpressions(this), this.loadNextSegment();
};
J.prototype.loadNextSegment = function() {
var t = this.animationData.segments;
if (!t || t.length === 0 || !this.autoloadSegments) {
this.trigger("data_ready"), this.timeCompleted = this.totalFrames;
return;
}
var e = t.shift();
this.timeCompleted = e.time * this.frameRate;
var r = this.path + this.fileName + "_" + this.segmentPos + ".json";
this.segmentPos += 1, Ye.loadData(r, this.includeLayers.bind(this), (function() {
this.trigger("data_failed");
}).bind(this));
};
J.prototype.loadSegments = function() {
var t = this.animationData.segments;
t || (this.timeCompleted = this.totalFrames), this.loadNextSegment();
};
J.prototype.configAnimation = function(t) {
if (this.renderer)
try {
this.animationData = t, this.initialSegment ? (this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]), this.firstFrame = Math.round(this.initialSegment[0])) : (this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip), this.firstFrame = Math.round(this.animationData.ip)), this.renderer.configAnimation(t), t.assets || (t.assets = []), this.assets = this.animationData.assets, this.frameRate = this.animationData.fr, this.frameMult = this.animationData.fr / 1e3, this.renderer.searchExtraCompositions(t.assets), this.markers = cs(t.markers || []), this.trigger("config_ready"), this.loadSegments(), this.updaFrameModifier(), this.checkLoaded();
} catch (e) {
this.triggerConfigError(e);
}
};
J.prototype.checkLoaded = function() {
if (!this.isLoaded) {
this.isLoaded = !0;
var t = Xe();
t && t.initExpressions(this), this.renderer.initItems(), setTimeout((function() {
this.trigger("DOMLoaded");
}).bind(this), 0), this.gotoFrame(), this.autoplay && this.play();
}
};
J.prototype.resize = function(t, e) {
var r = typeof t == "number" ? t : void 0, i = typeof e == "number" ? e : void 0;
this.renderer.updateContainerSize(r, i);
};
J.prototype.setSubframe = function(t) {
this.isSubframeEnabled = !!t;
};
J.prototype.gotoFrame = function() {
this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame, this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted && (this.currentFrame = this.timeCompleted), this.trigger("enterFrame"), this.renderFrame(), this.trigger("drawnFrame");
};
J.prototype.renderFrame = function() {
if (!(this.isLoaded === !1 || !this.renderer))
try {
this.expressionsPlugin && this.expressionsPlugin.resetFrame(), this.renderer.renderFrame(this.currentFrame + this.firstFrame);
} catch (t) {
this.triggerRenderFrameError(t);
}
};
J.prototype.play = function(t) {
t && this.name !== t || this.isPaused === !0 && (this.isPaused = !1, this.trigger("_play"), this._idle && (this._idle = !1, this.trigger("_active")));
};
J.prototype.pause = function(t) {
t && this.name !== t || this.isPaused === !1 && (this.isPaused = !0, this.trigger("_pause"), this._idle = !0, this.trigger("_idle"));
};
J.prototype.togglePause = function(t) {
t && this.name !== t || (this.isPaused === !0 ? this.play() : this.pause());
};
J.prototype.stop = function(t) {
t && this.name !== t || (this.pause(), this.playCount = 0, this._completedLoop = !1, this.setCurrentRawFrameValue(0));
};
J.prototype.getMarkerData = function(t) {
for (var e, r = 0; r < this.markers.length; r += 1)
if (e = this.markers[r], e.payload && e.payload.name === t)
return e;
return null;
};
J.prototype.goToAndStop = function(t, e, r) {
if (!(r && this.name !== r)) {
var i = Number(t);
if (isNaN(i)) {
var s = this.getMarkerData(t);
s && this.goToAndStop(s.time, !0);
} else e ? this.setCurrentRawFrameValue(t) : this.setCurrentRawFrameValue(t * this.frameModifier);
this.pause();
}
};
J.prototype.goToAndPlay = function(t, e, r) {
if (!(r && this.name !== r)) {
var i = Number(t);
if (isNaN(i)) {
var s = this.getMarkerData(t);
s && (s.duration ? this.playSegments([s.time, s.time + s.duration], !0) : this.goToAndStop(s.time, !0));
} else
this.goToAndStop(i, e, r);
this.play();
}
};
J.prototype.advanceTime = function(t) {
if (!(this.isPaused === !0 || this.isLoaded === !1)) {
var e = this.currentRawFrame + t * this.frameModifier, r = !1;
e >= this.totalFrames - 1 && this.frameModifier > 0 ? !this.loop || this.playCount === this.loop ? this.checkSegments(e > this.totalFrames ? e % this.totalFrames : 0) || (r = !0, e = this.totalFrames - 1) : e >= this.totalFrames ? (this.playCount += 1, this.checkSegments(e % this.totalFrames) || (this.setCurrentRawFrameValue(e % this.totalFrames), this._completedLoop = !0, this.trigger("loopComplete"))) : this.setCurrentRawFrameValue(e) : e < 0 ? this.checkSegments(e % this.totalFrames) || (this.loop && !(this.playCount-- <= 0 && this.loop !== !0) ? (this.setCurrentRawFrameValue(this.totalFrames + e % this.totalFrames), this._completedLoop ? this.trigger("loopComplete") : this._completedLoop = !0) : (r = !0, e = 0)) : this.setCurrentRawFrameValue(e), r && (this.setCurrentRawFrameValue(e), this.pause(), this.trigger("complete"));
}
};
J.prototype.adjustSegment = function(t, e) {
this.playCount = 0, t[1] < t[0] ? (this.frameModifier > 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(-1)), this.totalFrames = t[0] - t[1], this.timeCompleted = this.totalFrames, this.firstFrame = t[1], this.setCurrentRawFrameValue(this.totalFrames - 1e-3 - e)) : t[1] > t[0] && (this.frameModifier < 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(1)), this.totalFrames = t[1] - t[0], this.timeCompleted = this.totalFrames, this.firstFrame = t[0], this.setCurrentRawFrameValue(1e-3 + e)), this.trigger("segmentStart");
};
J.prototype.setSegment = function(t, e) {
var r = -1;
this.isPaused && (this.currentRawFrame + this.firstFrame < t ? r = t : this.currentRawFrame + this.firstFrame > e && (r = e - t)), this.firstFrame = t, this.totalFrames = e - t, this.timeCompleted = this.totalFrames, r !== -1 && this.goToAndStop(r, !0);
};
J.prototype.playSegments = function(t, e) {
if (e && (this.segments.length = 0), typeof t[0] == "object") {
var r, i = t.length;
for (r = 0; r < i; r += 1)
this.segments.push(t[r]);
} else
this.segments.push(t);
this.segments.length && e && this.adjustSegment(this.segments.shift(), 0), this.isPaused && this.play();
};
J.prototype.resetSegments = function(t) {
this.segments.length = 0, this.segments.push([this.animationData.ip, this.animationData.op]), t && this.checkSegments(0);
};
J.prototype.checkSegments = function(t) {
return this.segments.length ? (this.adjustSegment(this.segments.shift(), t), !0) : !1;
};
J.prototype.destroy = function(t) {
t && this.name !== t || !this.renderer || (this.renderer.destroy(), this.trigger("destroy"), this._cbs = null, this.onEnterFrame = null, this.onLoopComplete = null, this.onComplete = null, this.onSegmentStart = null, this.onDestroy = null, this.renderer = null, this.expressionsPlugin = null, this.projectInterface = null);
};
J.prototype.setCurrentRawFrameValue = function(t) {
this.currentRawFrame = t, this.gotoFrame();
};
J.prototype.setSpeed = function(t) {
this.playSpeed = t, this.updaFrameModifier();
};
J.prototype.setDirection = function(t) {
this.playDirection = t < 0 ? -1 : 1, this.updaFrameModifier();
};
J.prototype.setLoop = function(t) {
this.loop = t;
};
J.prototype.updaFrameModifier = function() {
this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
};
J.prototype.getPath = function() {
return this.path;
};
J.prototype.getAssetsPath = function(t) {
var e = "";
return t.e ? e = t.p : (e = this.path, e += t.u ? t.u : "", e += t.p), e;
};
J.prototype.getAssetData = function(t) {
for (var e = 0, r = this.assets.length; e < r; ) {
if (t === this.assets[e].id)
return this.assets[e];
e += 1;
}
return null;
};
J.prototype.hide = function() {
this.renderer.hide();
};
J.prototype.show = function() {
this.renderer.show();
};
J.prototype.getDuration = function(t) {
return t ? this.totalFrames : this.totalFrames / this.frameRate;
};
J.prototype.updateDocumentData = function(t, e, r) {
try {
var i = this.renderer.getElementByPath(t);
i.updateDocumentData(e, r);
} catch {
}
};
J.prototype.trigger = function(t) {
if (this._cbs && this._cbs[t])
switch (t) {
case "enterFrame":
this.triggerEvent(t, new nr(t, this.currentFrame, this.totalFrames, this.frameModifier));
break;
case "drawnFrame":
this.drawnFrameEvent.currentTime = this.currentFrame, this.drawnFrameEvent.totalTime = this.totalFrames, this.drawnFrameEvent.direction = this.frameModifier, this.triggerEvent(t, this.drawnFrameEvent);
break;
case "loopComplete":
this.triggerEvent(t, new Gr(t, this.loop, this.playCount, this.frameMult));
break;
case "complete":
this.triggerEvent(t, new Or(t, this.frameMult));
break;
case "segmentStart":
this.triggerEvent(t, new Dr(t, this.firstFrame, this.totalFrames));
break;
case "destroy":
this.triggerEvent(t, new Br(t, this));
break;
default:
this.triggerEvent(t);
}
t === "enterFrame" && this.onEnterFrame && this.onEnterFrame.call(this, new nr(t, this.currentFrame, this.totalFrames, this.frameMult)), t === "loopComplete" && this.onLoopComplete && this.onLoopComplete.call(this, new Gr(t, this.loop, this.playCount, this.frameMult)), t === "complete" && this.onComplete && this.onComplete.call(this, new Or(t, this.frameMult)), t === "segmentStart" && this.onSegmentStart && this.onSegmentStart.call(this, new Dr(t, this.firstFrame, this.totalFrames)), t === "destroy" && this.onDestroy && this.onDestroy.call(this, new Br(t, this));
};
J.prototype.triggerRenderFrameError = function(t) {
var e = new ss(t, this.currentFrame);
this.triggerEvent("error", e), this.onError && this.onError.call(this, e);
};
J.prototype.triggerConfigError = function(t) {
var e = new ns(t, this.currentFrame);
this.triggerEvent("error", e), this.onError && this.onError.call(this, e);
};
const At = function() {
var t = {}, e = [], r = 0, i = 0, s = 0, n = !0, o = !1;
function u(R) {
for (var V = 0, F = R.target; V < i; )
e[V].animation === F && (e.splice(V, 1), V -= 1, i -= 1, F.isPaused || P()), V += 1;
}
function h(R, V) {
if (!R)
return null;
for (var F = 0; F < i; ) {
if (e[F].elem === R && e[F].elem !== null)
return e[F].animation;
F += 1;
}
var I = new J();
return p(I, R), I.setData(R, V), I;
}
function c() {
var R, V = e.length, F = [];
for (R = 0; R < V; R += 1)
F.push(e[R].animation);
return F;
}
function y() {
s += 1, N();
}
function P() {
s -= 1;
}
function p(R, V) {
R.addEventListener("destroy", u), R.addEventListener("_active", y), R.addEventListener("_idle", P), e.push({ elem: V, animation: R }), i += 1;
}
function g(R) {
var V = new J();
return p(V, null), V.setParams(R), V;
}
function m(R, V) {
var F;
for (F = 0; F < i; F += 1)
e[F].animation.setSpeed(R, V);
}
function d(R, V) {
var F;
for (F = 0; F < i; F += 1)
e[F].animation.setDirection(R, V);
}
function k(R) {
var V;
for (V = 0; V < i; V += 1)
e[V].animation.play(R);
}
function l(R) {
var V = R - r, F;
for (F = 0; F < i; F += 1)
e[F].animation.advanceTime(V);
r = R, s && !o ? window.requestAnimationFrame(l) : n = !0;
}
function a(R) {
r = R, window.requestAnimationFrame(l);
}
function f(R) {
var V;
for (V = 0; V < i; V += 1)
e[V].animation.pause(R);
}
function v(R, V, F) {
var I;
for (I = 0; I < i; I += 1)
e[I].animation.goToAndStop(R, V, F);
}
function _(R) {
var V;
for (V = 0; V < i; V += 1)
e[V].animation.stop(R);
}
function S(R) {
var V;
for (V = 0; V < i; V += 1)
e[V].animation.togglePause(R);
}
function E(R) {
var V;
for (V = i - 1; V >= 0; V -= 1)
e[V].animation.destroy(R);
}
function w(R, V, F) {
var I = [].concat(
[].slice.call(document.getElementsByClassName("lottie")),
[].slice.call(document.getElementsByClassName("bodymovin"))
), L, A = I.length;
for (L = 0; L < A; L += 1)
F && I[L].setAttribute("data-bm-type", F), h(I[L], R);
if (V && A === 0) {
F || (F = "svg");
var b = document.getElementsByTagName("body")[0];
b.innerText = "";
var C = es("div");
C.style.width = "100%", C.style.height = "100%", C.setAttribute("data-bm-type", F), b.appendChild(C), h(C, R);
}
}
function G() {
var R;
for (R = 0; R < i; R += 1)
e[R].animation.resize();
}
function N() {
!o && s && n && (window.requestAnimationFrame(a), n = !1);
}
function Y() {
o = !0;
}
function $() {
o = !1, N();
}
return t.registerAnimation = h, t.loadAnimation = g, t.setSpeed = m, t.setDirection = d, t.play = k, t.pause = f, t.stop = _, t.togglePause = S, t.searchAnimations = w, t.resize = G, t.goToAndStop = v, t.destroy = E, t.freeze = Y, t.unfreeze = $, t.getRegisteredAnimations = c, t;
}(), re = function() {
var t = {};
t.getBezierEasing = r;
var e = {};
function r(a, f, v, _, S) {
var E = S || ("bez_" + a + "_" + f + "_" + v + "_" + _).replace(/\./g, "p");
if (e[E])
return e[E];
var w = new l([a, f, v, _]);
return e[E] = w, w;
}
var i = 4, s = 1e-3, n = 1e-7, o = 10, u = 11, h = 1 / (u - 1), c = typeof Float32Array == "function";
function y(a, f) {
return 1 - 3 * f + 3 * a;
}
function P(a, f) {
return 3 * f - 6 * a;
}
function p(a) {
return 3 * a;
}
function g(a, f, v) {
return ((y(f, v) * a + P(f, v)) * a + p(f)) * a;
}
function m(a, f, v) {
return 3 * y(f, v) * a * a + 2 * P(f, v) * a + p(f);
}
function d(a, f, v, _, S) {
var E, w, G = 0;
do
w = f + (v - f) / 2, E = g(w, _, S) - a, E > 0 ? v = w : f = w;
while (Math.abs(E) > n && ++G < o);
return w;
}
function k(a, f, v, _) {
for (var S = 0; S < i; ++S) {
var E = m(f, v, _);
if (E === 0) return f;
var w = g(f, v, _) - a;
f -= w / E;
}
return f;
}
function l(a) {
this._p = a, this._mSampleValues = c ? new Float32Array(u) : new Array(u), this._precomputed = !1, this.get = this.get.bind(this);
}
return l.prototype = {
get: function(a) {
var f = this._p[0], v = this._p[1], _ = this._p[2], S = this._p[3];
return this._precomputed || this._precompute(), f === v && _ === S ? a : a === 0 ? 0 : a === 1 ? 1 : g(this._getTForX(a), v, S);
},
// Private part
_precompute: function() {
var a = this._p[0], f = this._p[1], v = this._p[2], _ = this._p[3];
this._precomputed = !0, (a !== f || v !== _) && this._calcSampleValues();
},
_calcSampleValues: function() {
for (var a = this._p[0], f = this._p[2], v = 0; v < u; ++v)
this._mSampleValues[v] = g(v * h, a, f);
},
/**
* getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
*/
_getTForX: function(a) {
for (var f = this._p[0], v = this._p[2], _ = this._mSampleValues, S = 0, E = 1, w = u - 1; E !== w && _[E] <= a; ++E)
S += h;
--E;
var G = (a - _[E]) / (_[E + 1] - _[E]), N = S + G * h, Y = m(N, f, v);
return Y >= s ? k(a, N, f, v) : Y === 0 ? N : d(a, S, S + h, f, v);
}
}, t;
}(), fi = /* @__PURE__ */ function() {
function t(e) {
return e.concat(vt(e.length));
}
return {
double: t
};
}(), We = /* @__PURE__ */ function() {
return function(t, e, r) {
var i = 0, s = t, n = vt(s), o = {
newElement: u,
release: h
};
function u() {
var c;
return i ? (i -= 1, c = n[i]) : c = e(), c;
}
function h(c) {
i === s && (n = fi.double(n), s *= 2), r && r(c), n[i] = c, i += 1;
}
return o;
};
}(), li = function() {
function t() {
return {
addedLength: 0,
percents: nt("float32", De()),
lengths: nt("float32", De())
};
}
return We(8, t);
}(), ui = function() {
function t() {
return {
lengths: [],
totalLength: 0
};
}
function e(r) {
var i, s = r.lengths.length;
for (i = 0; i < s; i += 1)
li.release(r.lengths[i]);
r.lengths.length = 0;
}
return We(8, t, e);
}();
function ys() {
var t = Math;
function e(p, g, m, d, k, l) {
var a = p * d + g * k + m * l - k * d - l * p - m * g;
return a > -1e-3 && a < 1e-3;
}
function r(p, g, m, d, k, l, a, f, v) {
if (m === 0 && l === 0 && v === 0)
return e(p, g, d, k, a, f);
var _ = t.sqrt(t.pow(d - p, 2) + t.pow(k - g, 2) + t.pow(l - m, 2)), S = t.sqrt(t.pow(a - p, 2) + t.pow(f - g, 2) + t.pow(v - m, 2)), E = t.sqrt(t.pow(a - d, 2) + t.pow(f - k, 2) + t.pow(v - l, 2)), w;
return _ > S ? _ > E ? w = _ - S - E : w = E - S - _ : E > S ? w = E - S - _ : w = S - _ - E, w > -1e-4 && w < 1e-4;
}
var i = /* @__PURE__ */ function() {
return function(p, g, m, d) {
var k = De(), l, a, f, v, _, S = 0, E, w = [], G = [], N = li.newElement();
for (f = m.length, l = 0; l < k; l += 1) {
for (_ = l / (k - 1), E = 0, a = 0; a < f; a += 1)
v = Ft(1 - _, 3) * p[a] + 3 * Ft(1 - _, 2) * _ * m[a] + 3 * (1 - _) * Ft(_, 2) * d[a] + Ft(_, 3) * g[a], w[a] = v, G[a] !== null && (E += Ft(w[a] - G[a], 2)), G[a] = w[a];
E && (E = Rr(E), S += E), N.percents[l] = _, N.lengths[l] = S;
}
return N.addedLength = S, N;
};
}();
function s(p) {
var g = ui.newElement(), m = p.c, d = p.v, k = p.o, l = p.i, a, f = p._length, v = g.lengths, _ = 0;
for (a = 0; a < f - 1; a += 1)
v[a] = i(d[a], d[a + 1], k[a], l[a + 1]), _ += v[a].addedLength;
return m && f && (v[a] = i(d[a], d[0], k[a], l[0]), _ += v[a].addedLength), g.totalLength = _, g;
}
function n(p) {
this.segmentLength = 0, this.points = new Array(p);
}
function o(p, g) {
this.partialLength = p, this.point = g;
}
var u = /* @__PURE__ */ function() {
var p = {};
return function(g, m, d, k) {
var l = (g[0] + "_" + g[1] + "_" + m[0] + "_" + m[1] + "_" + d[0] + "_" + d[1] + "_" + k[0] + "_" + k[1]).replace(/\./g, "p");
if (!p[l]) {
var a = De(), f, v, _, S, E, w = 0, G, N, Y = null;
g.length === 2 && (g[0] !== m[0] || g[1] !== m[1]) && e(g[0], g[1], m[0], m[1], g[0] + d[0], g[1] + d[1]) && e(g[0], g[1], m[0], m[1], m[0] + k[0], m[1] + k[1]) && (a = 2);
var $ = new n(a);
for (_ = d.length, f = 0; f < a; f += 1) {
for (N = vt(_), E = f / (a - 1), G = 0, v = 0; v < _; v += 1)
S = Ft(1 - E, 3) * g[v] + 3 * Ft(1 - E, 2) * E * (g[v] + d[v]) + 3 * (1 - E) * Ft(E, 2) * (m[v] + k[v]) + Ft(E, 3) * m[v], N[v] = S, Y !== null && (G += Ft(N[v] - Y[v], 2));
G = Rr(G), w += G, $.points[f] = new o(G, N), Y = N;
}
$.segmentLength = w, p[l] = $;
}
return p[l];
};
}();
function h(p, g) {
var m = g.percents, d = g.lengths, k = m.length, l = xt((k - 1) * p), a = p * g.addedLength, f = 0;
if (l === k - 1 || l === 0 || a === d[l])
return m[l];
for (var v = d[l] > a ? -1 : 1, _ = !0; _; )
if (d[l] <= a && d[l + 1] > a ? (f = (a - d[l]) / (d[l + 1] - d[l]), _ = !1) : l += v, l < 0 || l >= k - 1) {
if (l === k - 1)
return m[l];
_ = !1;
}
return m[l] + (m[l + 1] - m[l]) * f;
}
function c(p, g, m, d, k, l) {
var a = h(k, l), f = 1 - a, v = t.round((f * f * f * p[0] + (a * f * f + f * a * f + f * f * a) * m[0] + (a * a * f + f * a * a + a * f * a) * d[0] + a * a * a * g[0]) * 1e3) / 1e3, _ = t.round((f * f * f * p[1] + (a * f * f + f * a * f + f * f * a) * m[1] + (a * a * f + f * a * a + a * f * a) * d[1] + a * a * a * g[1]) * 1e3) / 1e3;
return [v, _];
}
var y = nt("float32", 8);
function P(p, g, m, d, k, l, a) {
k < 0 ? k = 0 : k > 1 && (k = 1);
var f = h(k, a);
l = l > 1 ? 1 : l;
var v = h(l, a), _, S = p.length, E = 1 - f, w = 1 - v, G = E * E * E, N = f * E * E * 3, Y = f * f * E * 3, $ = f * f * f, R = E * E * w, V = f * E * w + E * f * w + E * E * v, F = f * f * w + E * f * v + f * E * v, I = f * f * v, L = E * w * w, A = f * w * w + E * v * w + E * w * v, b = f * v * w + E * v * v + f * w * v, C = f * v * v, D = w * w * w, Z = v * w * w + w * v * w + w * w * v, at = v * v * w + w * v * v + v * w * v, et = v * v * v;
for (_ = 0; _ < S; _ += 1)
y[_ * 4] = t.round((G * p[_] + N * m[_] + Y * d[_] + $ * g[_]) * 1e3) / 1e3, y[_ * 4 + 1] = t.round((R * p[_] + V * m[_] + F * d[_] + I * g[_]) * 1e3) / 1e3, y[_ * 4 + 2] = t.round((L * p[_] + A * m[_] + b * d[_] + C * g[_]) * 1e3) / 1e3, y[_ * 4 + 3] = t.round((D * p[_] + Z * m[_] + at * d[_] + et * g[_]) * 1e3) / 1e3;
return y;
}
return {
getSegmentsLength: s,
getNewSegment: P,
getPointInSegment: c,
buildBezierData: u,
pointOnLine2D: e,
pointOnLine3D: r
};
}
const It = ys();
var ie = Be, jr = Math.abs;
function pi(t, e) {
var r = this.offsetTime, i;
this.propType === "multidimensional" && (i = nt("float32", this.pv.length));
for (var s = e.lastIndex, n = s, o = this.keyframes.length - 1, u = !0, h, c, y; u; ) {
if (h = this.keyframes[n], c = this.keyframes[n + 1], n === o - 1 && t >= c.t - r) {
h.h && (h = c), s = 0;
break;
}
if (c.t - r > t) {
s = n;
break;
}
n < o - 1 ? n += 1 : (s = 0, u = !1);
}
y = this.keyframesMetadata[n] || {};
var P, p, g, m, d, k, l = c.t - r, a = h.t - r, f;
if (h.to) {
y.bezierData || (y.bezierData = It.buildBezierData(h.s, c.s || h.e, h.to, h.ti));
var v = y.bezierData;
if (t >= l || t < a) {
var _ = t >= l ? v.points.length - 1 : 0;
for (p = v.points[_].point.length, P = 0; P < p; P += 1)
i[P] = v.points[_].point[P];
} else {
y.__fnct ? k = y.__fnct : (k = re.getBezierEasing(h.o.x, h.o.y, h.i.x, h.i.y, h.n).get, y.__fnct = k), g = k((t - a) / (l - a));
var S = v.segmentLength * g, E, w = e.lastFrame < t && e._lastKeyframeIndex === n ? e._lastAddedLength : 0;
for (d = e.lastFrame < t && e._lastKeyframeIndex === n ? e._lastPoint : 0, u = !0, m = v.points.length; u; ) {
if (w += v.points[d].partialLength, S === 0 || g === 0 || d === v.points.length - 1) {
for (p = v.points[d].point.length, P = 0; P < p; P += 1)
i[P] = v.points[d].point[P];
break;
} else if (S >= w && S < w + v.points[d + 1].partialLength) {
for (E = (S - w) / v.points[d + 1].partialLength, p = v.points[d].point.length, P = 0; P < p; P += 1)
i[P] = v.points[d].point[P] + (v.points[d + 1].point[P] - v.points[d].point[P]) * E;
break;
}
d < m - 1 ? d += 1 : u = !1;
}
e._lastPoint = d, e._lastAddedLength = w - v.points[d].partialLength, e._lastKeyframeIndex = n;
}
} else {
var G, N, Y, $, R;
if (o = h.s.length, f = c.s || h.e, this.sh && h.h !== 1)
if (t >= l)
i[0] = f[0], i[1] = f[1], i[2] = f[2];
else if (t <= a)
i[0] = h.s[0], i[1] = h.s[1], i[2] = h.s[2];
else {
var V = zr(h.s), F = zr(f), I = (t - a) / (l - a);
bs(i, _s(V, F, I));
}
else
for (n = 0; n < o; n += 1)
h.h !== 1 && (t >= l ? g = 1 : t < a ? g = 0 : (h.o.x.constructor === Array ? (y.__fnct || (y.__fnct = []), y.__fnct[n] ? k = y.__fnct[n] : (G = h.o.x[n] === void 0 ? h.o.x[0] : h.o.x[n], N = h.o.y[n] === void 0 ? h.o.y[0] : h.o.y[n], Y = h.i.x[n] === void 0 ? h.i.x[0] : h.i.x[n], $ = h.i.y[n] === void 0 ? h.i.y[0] : h.i.y[n], k = re.getBezierEasing(G, N, Y, $).get, y.__fnct[n] = k)) : y.__fnct ? k = y.__fnct : (G = h.o.x, N = h.o.y, Y = h.i.x, $ = h.i.y, k = re.getBezierEasing(G, N, Y, $).get, h.keyframeMetadata = k), g = k((t - a) / (l - a)))), f = c.s || h.e, R = h.h === 1 ? h.s[n] : h.s[n] + (f[n] - h.s[n]) * g, this.propType === "multidimensional" ? i[n] = R : i = R;
}
return e.lastIndex = s, i;
}
function _s(t, e, r) {
var i = [], s = t[0], n = t[1], o = t[2], u = t[3], h = e[0], c = e[1], y = e[2], P = e[3], p, g, m, d, k;
return g = s * h + n * c + o * y + u * P, g < 0 && (g = -g, h = -h, c = -c, y = -y, P = -P), 1 - g > 1e-6 ? (p = Math.acos(g), m = Math.sin(p), d = Math.sin((1 - r) * p) / m, k = Math.sin(r * p) / m) : (d = 1 - r, k = r), i[0] = d * s + k * h, i[1] = d * n + k * c, i[2] = d * o + k * y, i[3] = d * u + k * P, i;
}
function bs(t, e) {
var r = e[0], i = e[1], s = e[2], n = e[3], o = Math.atan2(2 * i * n - 2 * r * s, 1 - 2 * i * i - 2 * s * s), u = Math.asin(2 * r * i + 2 * s * n), h = Math.atan2(2 * r * n - 2 * i * s, 1 - 2 * r * r - 2 * s * s);
t[0] = o / lt, t[1] = u / lt, t[2] = h / lt;
}
function zr(t) {
var e = t[0] * lt, r = t[1] * lt, i = t[2] * lt, s = Math.cos(e / 2), n = Math.cos(r / 2), o = Math.cos(i / 2), u = Math.sin(e / 2), h = Math.sin(r / 2), c = Math.sin(i / 2), y = s * n * o - u * h * c, P = u * h * o + s * n * c, p = u * n * o + s * h * c, g = s * h * o - u * n * c;
return [P, p, g, y];
}
function ci() {
var t = this.comp.renderedFrame - this.offsetTime, e = this.keyframes[0].t - this.offsetTime, r = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
if (!(t === this._caching.lastFrame || this._caching.lastFrame !== ie && (this._caching.lastFrame >= r && t >= r || this._caching.lastFrame < e && t < e))) {
this._caching.lastFrame >= t && (this._caching._lastKeyframeIndex = -1, this._caching.lastIndex = 0);
var i = this.interpolateValue(t, this._caching);
this.pv = i;
}
return this._caching.lastFrame = t, this.pv;
}
function Ke(t) {
var e;
if (this.propType === "unidimensional")
e = t * this.mult, jr(this.v - e) > 1e-5 && (this.v = e, this._mdf = !0);
else
for (var r = 0, i = this.v.length; r < i; )
e = t[r] * this.mult, jr(this.v[r] - e) > 1e-5 && (this.v[r] = e, this._mdf = !0), r += 1;
}
function He() {
if (!(this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length)) {
if (this.lock) {
this.setVValue(this.pv);
return;
}
this.lock = !0, this._mdf = this._isFirstFrame;
var t, e = this.effectsSequence.length, r = this.kf ? this.pv : this.data.k;
for (t = 0; t < e; t += 1)
r = this.effectsSequence[t](r);
this.setVValue(r), this._isFirstFrame = !1, this.lock = !1, this.frameId = this.elem.globalData.frameId;
}
}
function $e(t) {
this.effectsSequence.push(t), this.container.addDynamicProperty(this);
}
function As(t, e, r, i) {
this.propType = "unidimensional", this.mult = r || 1, this.data = e, this.v = r ? e.k * r : e.k, this.pv = e.k, this._mdf = !1, this.elem = t, this.container = i, this.comp = t.comp, this.k = !1, this.kf = !1, this.vel = 0, this.effectsSequence = [], this._isFirstFrame = !0, this.getValue = He, this.setVValue = Ke, this.addEffect = $e;
}
function Ps(t, e, r, i) {
this.propType = "multidimensional", this.mult = r || 1, this.data = e, this._mdf = !1, this.elem = t, this.container = i, this.comp = t.comp, this.k = !1, this.kf = !1, this.frameId = -1;
var s, n = e.k.length;
for (this.v = nt("float32", n), this.pv = nt("float32", n), this.vel = nt("float32", n), s = 0; s < n; s += 1)
this.v[s] = e.k[s] * this.mult, this.pv[s] = e.k[s];
this._isFirstFrame = !0, this.effectsSequence = [], this.getValue = He, this.setVValue = Ke, this.addEffect = $e;
}
function ks(t, e, r, i) {
this.propType = "unidimensional", this.keyframes = e.k, this.keyframesMetadata = [], this.of