!(function e(t, i, n) {
function r(a, s) {
if (!i[a]) {
if (!t[a]) {
var l = "function" == typeof require && require;
if (!s && l) return l(a, !0);
if (o) return o(a, !0);
var c = new Error("Cannot find module '" + a + "'");
throw ((c.code = "MODULE_NOT_FOUND"), c);
}
var u = (i[a] = {
exports: {}
});
t[a][0].call(
u.exports,
function (e) {
var i = t[a][1][e];
return r(i ? i : e);
},
u,
u.exports,
e,
t,
i,
n
);
}
return i[a].exports;
}
for (var o = "function" == typeof require && require, a = 0; a < n.length; a++) r(n[a]);
return r;
})({
1: [
function (e, t, i) {
(function (t) {
"use strict";
if ((e("core-js/shim"), e("regenerator/runtime"), t._babelPolyfill)) throw new Error("only one instance of babel/polyfill is allowed");
t._babelPolyfill = !0;
}.call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}));
},
{
"core-js/shim": 185,
"regenerator/runtime": 186
},
],
2: [
function (e, t, i) {
t.exports = function (e) {
if ("function" != typeof e) throw TypeError(e + " is not a function!");
return e;
};
},
{},
],
3: [
function (e, t, i) {
var n = e("./$.is-object");
t.exports = function (e) {
if (!n(e)) throw TypeError(e + " is not an object!");
return e;
};
},
{
"./$.is-object": 37
},
],
4: [
function (e, t, i) {
"use strict";
var n = e("./$.to-object"),
r = e("./$.to-index"),
o = e("./$.to-length");
t.exports = [].copyWithin ||
function (e, t) {
var i = n(this),
a = o(i.length),
s = r(e, a),
l = r(t, a),
c = arguments[2],
u = Math.min((void 0 === c ? a : r(c, a)) - l, a - s),
h = 1;
for (s > l && l + u > s && ((h = -1), (l += u - 1), (s += u - 1)); u-- > 0;) l in i ? (i[s] = i[l]) : delete i[s], (s += h), (l += h);
return i;
};
},
{
"./$.to-index": 73,
"./$.to-length": 76,
"./$.to-object": 77
},
],
5: [
function (e, t, i) {
"use strict";
var n = e("./$.to-object"),
r = e("./$.to-index"),
o = e("./$.to-length");
t.exports = [].fill ||
function (e) {
for (var t = n(this, !0), i = o(t.length), a = r(arguments[1], i), s = arguments[2], l = void 0 === s ? i : r(s, i); l > a;) t[a++] = e;
return t;
};
},
{
"./$.to-index": 73,
"./$.to-length": 76,
"./$.to-object": 77
},
],
6: [
function (e, t, i) {
var n = e("./$.to-iobject"),
r = e("./$.to-length"),
o = e("./$.to-index");
t.exports = function (e) {
return function (t, i, a) {
var s,
l = n(t),
c = r(l.length),
u = o(a, c);
if (e && i != i) {
for (; c > u;)
if (((s = l[u++]), s != s)) return !0;
} else
for (; c > u; u++)
if ((e || u in l) && l[u] === i) return e || u;
return !e && -1;
};
};
},
{
"./$.to-index": 73,
"./$.to-iobject": 75,
"./$.to-length": 76
},
],
7: [
function (e, t, i) {
var n = e("./$.ctx"),
r = e("./$.is-object"),
o = e("./$.iobject"),
a = e("./$.to-object"),
s = e("./$.to-length"),
l = e("./$.is-array"),
c = e("./$.wks")("species"),
u = function (e, t) {
var i;
return l(e) && r((i = e.constructor)) && ((i = i[c]), null === i && (i = void 0)), new(void 0 === i ? Array : i)(t);
};
t.exports = function (e) {
var t = 1 == e,
i = 2 == e,
r = 3 == e,
l = 4 == e,
c = 6 == e,
h = 5 == e || c;
return function (d, f, p) {
for (var m, v, g = a(d), y = o(g), _ = n(f, p, 3), b = s(y.length), x = 0, w = t ? u(d, b) : i ? u(d, 0) : void 0; b > x; x++)
if ((h || x in y) && ((m = y[x]), (v = _(m, x, g)), e))
if (t) w[x] = v;
else if (v)
switch (e) {
case 3:
return !0;
case 5:
return m;
case 6:
return x;
case 2:
w.push(m);
}
else if (l) return !1;
return c ? -1 : r || l ? l : w;
};
};
},
{
"./$.ctx": 16,
"./$.iobject": 33,
"./$.is-array": 35,
"./$.is-object": 37,
"./$.to-length": 76,
"./$.to-object": 77,
"./$.wks": 80
},
],
8: [
function (e, t, i) {
var n = e("./$.to-object"),
r = e("./$.iobject"),
o = e("./$.enum-keys"),
a = e("./$.has");
t.exports = e("./$.fails")(function () {
var e = Object.assign,
t = {},
i = {},
n = Symbol(),
r = "abcdefghijklmnopqrst";
return (
(t[n] = 7),
r.split("").forEach(function (e) {
i[e] = e;
}),
7 != e({}, t)[n] || Object.keys(e({}, i)).join("") != r
);
}) ?
function (e, t) {
for (var i = n(e), s = arguments.length, l = 1; s > l;)
for (var c, u = r(arguments[l++]), h = o(u), d = h.length, f = 0; d > f;) a(u, (c = h[f++])) && (i[c] = u[c]);
return i;
} :
Object.assign;
},
{
"./$.enum-keys": 20,
"./$.fails": 23,
"./$.has": 29,
"./$.iobject": 33,
"./$.to-object": 77
},
],
9: [
function (e, t, i) {
var n = e("./$.cof"),
r = e("./$.wks")("toStringTag"),
o =
"Arguments" ==
n(
(function () {
return arguments;
})()
);
t.exports = function (e) {
var t, i, a;
return void 0 === e ? "Undefined" : null === e ? "Null" : "string" == typeof (i = (t = Object(e))[r]) ? i : o ? n(t) : "Object" == (a = n(t)) && "function" == typeof t.callee ? "Arguments" : a;
};
},
{
"./$.cof": 10,
"./$.wks": 80
},
],
10: [
function (e, t, i) {
var n = {}.toString;
t.exports = function (e) {
return n.call(e).slice(8, -1);
};
},
{},
],
11: [
function (e, t, i) {
"use strict";
var n = e("./$"),
r = e("./$.hide"),
o = e("./$.ctx"),
a = e("./$.species"),
s = e("./$.strict-new"),
l = e("./$.defined"),
c = e("./$.for-of"),
u = e("./$.iter-step"),
h = e("./$.uid")("id"),
d = e("./$.has"),
f = e("./$.is-object"),
p = Object.isExtensible || f,
m = e("./$.support-desc"),
v = m ? "_s" : "size",
g = 0,
y = function (e, t) {
if (!f(e)) return "symbol" == typeof e ? e : ("string" == typeof e ? "S" : "P") + e;
if (!d(e, h)) {
if (!p(e)) return "F";
if (!t) return "E";
r(e, h, ++g);
}
return "O" + e[h];
},
_ = function (e, t) {
var i,
n = y(t);
if ("F" !== n) return e._i[n];
for (i = e._f; i; i = i.n)
if (i.k == t) return i;
};
t.exports = {
getConstructor: function (t, i, r, a) {
var u = t(function (e, t) {
s(e, u, i), (e._i = n.create(null)), (e._f = void 0), (e._l = void 0), (e[v] = 0), void 0 != t && c(t, r, e[a], e);
});
return (
e("./$.mix")(u.prototype, {
clear: function () {
for (var e = this, t = e._i, i = e._f; i; i = i.n)(i.r = !0), i.p && (i.p = i.p.n = void 0), delete t[i.i];
(e._f = e._l = void 0), (e[v] = 0);
},
delete: function (e) {
var t = this,
i = _(t, e);
if (i) {
var n = i.n,
r = i.p;
delete t._i[i.i], (i.r = !0), r && (r.n = n), n && (n.p = r), t._f == i && (t._f = n), t._l == i && (t._l = r), t[v]--;
}
return !!i;
},
forEach: function (e) {
for (var t, i = o(e, arguments[1], 3);
(t = t ? t.n : this._f);)
for (i(t.v, t.k, this); t && t.r;) t = t.p;
},
has: function (e) {
return !!_(this, e);
},
}),
m &&
n.setDesc(u.prototype, "size", {
get: function () {
return l(this[v]);
},
}),
u
);
},
def: function (e, t, i) {
var n,
r,
o = _(e, t);
return o ? (o.v = i) : ((e._l = o = {
i: (r = y(t, !0)),
k: t,
v: i,
p: (n = e._l),
n: void 0,
r: !1
}), e._f || (e._f = o), n && (n.n = o), e[v]++, "F" !== r && (e._i[r] = o)), e;
},
getEntry: _,
setStrong: function (t, i, n) {
e("./$.iter-define")(
t,
i,
function (e, t) {
(this._t = e), (this._k = t), (this._l = void 0);
},
function () {
for (var e = this, t = e._k, i = e._l; i && i.r;) i = i.p;
return e._t && (e._l = i = i ? i.n : e._t._f) ? ("keys" == t ? u(0, i.k) : "values" == t ? u(0, i.v) : u(0, [i.k, i.v])) : ((e._t = void 0), u(1));
},
n ? "entries" : "values",
!n,
!0
),
a(t),
a(e("./$.core")[i]);
},
};
},
{
"./$": 45,
"./$.core": 15,
"./$.ctx": 16,
"./$.defined": 18,
"./$.for-of": 26,
"./$.has": 29,
"./$.hide": 30,
"./$.is-object": 37,
"./$.iter-define": 41,
"./$.iter-step": 43,
"./$.mix": 50,
"./$.species": 63,
"./$.strict-new": 64,
"./$.support-desc": 70,
"./$.uid": 78,
},
],
12: [
function (e, t, i) {
var n = e("./$.for-of"),
r = e("./$.classof");
t.exports = function (e) {
return function () {
if (r(this) != e) throw TypeError(e + "#toJSON isn't generic");
var t = [];
return n(this, !1, t.push, t), t;
};
};
},
{
"./$.classof": 9,
"./$.for-of": 26
},
],
13: [
function (e, t, i) {
"use strict";
var n = e("./$.hide"),
r = e("./$.an-object"),
o = e("./$.strict-new"),
a = e("./$.for-of"),
s = e("./$.array-methods"),
l = e("./$.uid")("weak"),
c = e("./$.is-object"),
u = e("./$.has"),
h = Object.isExtensible || c,
d = s(5),
f = s(6),
p = 0,
m = function (e) {
return e._l || (e._l = new v());
},
v = function () {
this.a = [];
},
g = function (e, t) {
return d(e.a, function (e) {
return e[0] === t;
});
};
(v.prototype = {
get: function (e) {
var t = g(this, e);
return t ? t[1] : void 0;
},
has: function (e) {
return !!g(this, e);
},
set: function (e, t) {
var i = g(this, e);
i ? (i[1] = t) : this.a.push([e, t]);
},
delete: function (e) {
var t = f(this.a, function (t) {
return t[0] === e;
});
return ~t && this.a.splice(t, 1), !!~t;
},
}),
(t.exports = {
getConstructor: function (t, i, n, r) {
var s = t(function (e, t) {
o(e, s, i), (e._i = p++), (e._l = void 0), void 0 != t && a(t, n, e[r], e);
});
return (
e("./$.mix")(s.prototype, {
delete: function (e) {
return c(e) ? (h(e) ? u(e, l) && u(e[l], this._i) && delete e[l][this._i] : m(this)["delete"](e)) : !1;
},
has: function (e) {
return c(e) ? (h(e) ? u(e, l) && u(e[l], this._i) : m(this).has(e)) : !1;
},
}),
s
);
},
def: function (e, t, i) {
return h(r(t)) ? (u(t, l) || n(t, l, {}), (t[l][e._i] = i)) : m(e).set(t, i), e;
},
frozenStore: m,
WEAK: l,
});
},
{
"./$.an-object": 3,
"./$.array-methods": 7,
"./$.for-of": 26,
"./$.has": 29,
"./$.hide": 30,
"./$.is-object": 37,
"./$.mix": 50,
"./$.strict-new": 64,
"./$.uid": 78
},
],
14: [
function (e, t, i) {
"use strict";
var n = e("./$.global"),
r = e("./$.def"),
o = e("./$.for-of"),
a = e("./$.strict-new");
t.exports = function (t, i, s, l, c, u) {
var h = n[t],
d = h,
f = c ? "set" : "add",
p = d && d.prototype,
m = {},
v = function (t) {
var i = p[t];
e("./$.redef")(
p,
t,
"delete" == t ?
function (e) {
return i.call(this, 0 === e ? 0 : e);
} :
"has" == t ?
function (e) {
return i.call(this, 0 === e ? 0 : e);
} :
"get" == t ?
function (e) {
return i.call(this, 0 === e ? 0 : e);
} :
"add" == t ?
function (e) {
return i.call(this, 0 === e ? 0 : e), this;
} :
function (e, t) {
return i.call(this, 0 === e ? 0 : e, t), this;
}
);
};
if (
"function" == typeof d &&
(u ||
(p.forEach &&
!e("./$.fails")(function () {
new d().entries().next();
})))
) {
var g,
y = new d(),
_ = y[f](u ? {} : -0, 1);
e("./$.iter-detect")(function (e) {
new d(e);
}) ||
((d = i(function (e, i) {
a(e, d, t);
var n = new h();
return void 0 != i && o(i, c, n[f], n), n;
})),
(d.prototype = p),
(p.constructor = d)),
u ||
y.forEach(function (e, t) {
g = 1 / t === -(1 / 0);
}),
g && (v("delete"), v("has"), c && v("get")),
(g || _ !== y) && v(f),
u && p.clear && delete p.clear;
} else(d = l.getConstructor(i, t, c, f)), e("./$.mix")(d.prototype, s);
return e("./$.tag")(d, t), (m[t] = d), r(r.G + r.W + r.F * (d != h), m), u || l.setStrong(d, t, c), d;
};
},
{
"./$.def": 17,
"./$.fails": 23,
"./$.for-of": 26,
"./$.global": 28,
"./$.iter-detect": 42,
"./$.mix": 50,
"./$.redef": 57,
"./$.strict-new": 64,
"./$.tag": 71
},
],
15: [
function (e, t, i) {
var n = (t.exports = {
version: "1.2.1"
});
"number" == typeof __e && (__e = n);
},
{},
],
16: [
function (e, t, i) {
var n = e("./$.a-function");
t.exports = function (e, t, i) {
if ((n(e), void 0 === t)) return e;
switch (i) {
case 1:
return function (i) {
return e.call(t, i);
};
case 2:
return function (i, n) {
return e.call(t, i, n);
};
case 3:
return function (i, n, r) {
return e.call(t, i, n, r);
};
}
return function () {
return e.apply(t, arguments);
};
};
},
{
"./$.a-function": 2
},
],
17: [
function (e, t, i) {
var n = e("./$.global"),
r = e("./$.core"),
o = e("./$.hide"),
a = e("./$.redef"),
s = "prototype",
l = function (e, t) {
return function () {
return e.apply(t, arguments);
};
},
c = function (e, t, i) {
var u,
h,
d,
f,
p = e & c.G,
m = e & c.P,
v = p ? n : e & c.S ? n[t] || (n[t] = {}) : (n[t] || {})[s],
g = p ? r : r[t] || (r[t] = {});
p && (i = t);
for (u in i)
(h = !(e & c.F) && v && u in v),
(d = (h ? v : i)[u]),
(f = e & c.B && h ? l(d, n) : m && "function" == typeof d ? l(Function.call, d) : d),
v && !h && a(v, u, d),
g[u] != d && o(g, u, f),
m && ((g[s] || (g[s] = {}))[u] = d);
};
(n.core = r), (c.F = 1), (c.G = 2), (c.S = 4), (c.P = 8), (c.B = 16), (c.W = 32), (t.exports = c);
},
{
"./$.core": 15,
"./$.global": 28,
"./$.hide": 30,
"./$.redef": 57
},
],
18: [
function (e, t, i) {
t.exports = function (e) {
if (void 0 == e) throw TypeError("Can't call method on " + e);
return e;
};
},
{},
],
19: [
function (e, t, i) {
var n = e("./$.is-object"),
r = e("./$.global").document,
o = n(r) && n(r.createElement);
t.exports = function (e) {
return o ? r.createElement(e) : {};
};
},
{
"./$.global": 28,
"./$.is-object": 37
},
],
20: [
function (e, t, i) {
var n = e("./$");
t.exports = function (e) {
var t = n.getKeys(e),
i = n.getSymbols;
if (i)
for (var r, o = i(e), a = n.isEnum, s = 0; o.length > s;) a.call(e, (r = o[s++])) && t.push(r);
return t;
};
},
{
"./$": 45
},
],
21: [
function (e, t, i) {
t.exports =
Math.expm1 ||
function (e) {
return 0 == (e = +e) ? e : e > -1e-6 && 1e-6 > e ? e + (e * e) / 2 : Math.exp(e) - 1;
};
},
{},
],
22: [
function (e, t, i) {
t.exports = function (t) {
var i = /./;
try {
"/./" [t](i);
} catch (n) {
try {
return (i[e("./$.wks")("match")] = !1), !"/./" [t](i);
} catch (n) {}
}
return !0;
};
},
{
"./$.wks": 80
},
],
23: [
function (e, t, i) {
t.exports = function (e) {
try {
return !!e();
} catch (t) {
return !0;
}
};
},
{},
],
24: [
function (e, t, i) {
"use strict";
t.exports = function (t, i, n) {
var r = e("./$.defined"),
o = e("./$.wks")(t),
a = "" [t];
e("./$.fails")(function () {
var e = {};
return (
(e[o] = function () {
return 7;
}),
7 != "" [t](e)
);
}) &&
(e("./$.redef")(String.prototype, t, n(r, o, a)),
e("./$.hide")(
RegExp.prototype,
o,
2 == i ?
function (e, t) {
return a.call(e, this, t);
} :
function (e) {
return a.call(e, this);
}
));
};
},
{
"./$.defined": 18,
"./$.fails": 23,
"./$.hide": 30,
"./$.redef": 57,
"./$.wks": 80
},
],
25: [
function (e, t, i) {
"use strict";
var n = e("./$.an-object");
t.exports = function () {
var e = n(this),
t = "";
return e.global && (t += "g"), e.ignoreCase && (t += "i"), e.multiline && (t += "m"), e.unicode && (t += "u"), e.sticky && (t += "y"), t;
};
},
{
"./$.an-object": 3
},
],
26: [
function (e, t, i) {
var n = e("./$.ctx"),
r = e("./$.iter-call"),
o = e("./$.is-array-iter"),
a = e("./$.an-object"),
s = e("./$.to-length"),
l = e("./core.get-iterator-method");
t.exports = function (e, t, i, c) {
var u,
h,
d,
f = l(e),
p = n(i, c, t ? 2 : 1),
m = 0;
if ("function" != typeof f) throw TypeError(e + " is not iterable!");
if (o(f))
for (u = s(e.length); u > m; m++) t ? p(a((h = e[m]))[0], h[1]) : p(e[m]);
else
for (d = f.call(e); !(h = d.next()).done;) r(d, p, h.value, t);
};
},
{
"./$.an-object": 3,
"./$.ctx": 16,
"./$.is-array-iter": 34,
"./$.iter-call": 39,
"./$.to-length": 76,
"./core.get-iterator-method": 81
},
],
27: [
function (e, t, i) {
var n = {}.toString,
r = e("./$.to-iobject"),
o = e("./$").getNames,
a = "object" == typeof window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [],
s = function (e) {
try {
return o(e);
} catch (t) {
return a.slice();
}
};
t.exports.get = function (e) {
return a && "[object Window]" == n.call(e) ? s(e) : o(r(e));
};
},
{
"./$": 45,
"./$.to-iobject": 75
},
],
28: [
function (e, t, i) {
var n = "undefined",
r = (t.exports = typeof window != n && window.Math == Math ? window : typeof self != n && self.Math == Math ? self : Function("return this")());
"number" == typeof __g && (__g = r);
},
{},
],
29: [
function (e, t, i) {
var n = {}.hasOwnProperty;
t.exports = function (e, t) {
return n.call(e, t);
};
},
{},
],
30: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.property-desc");
t.exports = e("./$.support-desc") ?
function (e, t, i) {
return n.setDesc(e, t, r(1, i));
} :
function (e, t, i) {
return (e[t] = i), e;
};
},
{
"./$": 45,
"./$.property-desc": 56,
"./$.support-desc": 70
},
],
31: [
function (e, t, i) {
t.exports = e("./$.global").document && document.documentElement;
},
{
"./$.global": 28
},
],
32: [
function (e, t, i) {
t.exports = function (e, t, i) {
var n = void 0 === i;
switch (t.length) {
case 0:
return n ? e() : e.call(i);
case 1:
return n ? e(t[0]) : e.call(i, t[0]);
case 2:
return n ? e(t[0], t[1]) : e.call(i, t[0], t[1]);
case 3:
return n ? e(t[0], t[1], t[2]) : e.call(i, t[0], t[1], t[2]);
case 4:
return n ? e(t[0], t[1], t[2], t[3]) : e.call(i, t[0], t[1], t[2], t[3]);
}
return e.apply(i, t);
};
},
{},
],
33: [
function (e, t, i) {
var n = e("./$.cof");
t.exports =
0 in Object("z") ?
Object :
function (e) {
return "String" == n(e) ? e.split("") : Object(e);
};
},
{
"./$.cof": 10
},
],
34: [
function (e, t, i) {
var n = e("./$.iterators"),
r = e("./$.wks")("iterator");
t.exports = function (e) {
return (n.Array || Array.prototype[r]) === e;
};
},
{
"./$.iterators": 44,
"./$.wks": 80
},
],
35: [
function (e, t, i) {
var n = e("./$.cof");
t.exports =
Array.isArray ||
function (e) {
return "Array" == n(e);
};
},
{
"./$.cof": 10
},
],
36: [
function (e, t, i) {
var n = e("./$.is-object"),
r = Math.floor;
t.exports = function (e) {
return !n(e) && isFinite(e) && r(e) === e;
};
},
{
"./$.is-object": 37
},
],
37: [
function (e, t, i) {
t.exports = function (e) {
return "object" == typeof e ? null !== e : "function" == typeof e;
};
},
{},
],
38: [
function (e, t, i) {
var n = e("./$.is-object"),
r = e("./$.cof"),
o = e("./$.wks")("match");
t.exports = function (e) {
var t;
return n(e) && (void 0 !== (t = e[o]) ? !!t : "RegExp" == r(e));
};
},
{
"./$.cof": 10,
"./$.is-object": 37,
"./$.wks": 80
},
],
39: [
function (e, t, i) {
var n = e("./$.an-object");
t.exports = function (e, t, i, r) {
try {
return r ? t(n(i)[0], i[1]) : t(i);
} catch (o) {
var a = e["return"];
throw (void 0 !== a && n(a.call(e)), o);
}
};
},
{
"./$.an-object": 3
},
],
40: [
function (e, t, i) {
"use strict";
var n = e("./$"),
r = {};
e("./$.hide")(r, e("./$.wks")("iterator"), function () {
return this;
}),
(t.exports = function (t, i, o) {
(t.prototype = n.create(r, {
next: e("./$.property-desc")(1, o)
})), e("./$.tag")(t, i + " Iterator");
});
},
{
"./$": 45,
"./$.hide": 30,
"./$.property-desc": 56,
"./$.tag": 71,
"./$.wks": 80
},
],
41: [
function (e, t, i) {
"use strict";
var n = e("./$.library"),
r = e("./$.def"),
o = e("./$.redef"),
a = e("./$.hide"),
s = e("./$.has"),
l = e("./$.wks")("iterator"),
c = e("./$.iterators"),
u = !([].keys && "next" in [].keys()),
h = "@@iterator",
d = "keys",
f = "values",
p = function () {
return this;
};
t.exports = function (t, i, m, v, g, y, _) {
e("./$.iter-create")(m, i, v);
var b,
x,
w = function (e) {
switch (e) {
case d:
return function () {
return new m(this, e);
};
case f:
return function () {
return new m(this, e);
};
}
return function () {
return new m(this, e);
};
},
M = i + " Iterator",
T = t.prototype,
S = T[l] || T[h] || (g && T[g]),
E = S || w(g);
if (S) {
var A = e("./$").getProto(E.call(new t()));
e("./$.tag")(A, M, !0), !n && s(T, h) && a(A, l, p);
}
if (((!n || _) && a(T, l, E), (c[i] = E), (c[M] = p), g))
if (((b = {
keys: y ? E : w(d),
values: g == f ? E : w(f),
entries: g != f ? E : w("entries")
}), _))
for (x in b) x in T || o(T, x, b[x]);
else r(r.P + r.F * u, i, b);
};
},
{
"./$": 45,
"./$.def": 17,
"./$.has": 29,
"./$.hide": 30,
"./$.iter-create": 40,
"./$.iterators": 44,
"./$.library": 47,
"./$.redef": 57,
"./$.tag": 71,
"./$.wks": 80
},
],
42: [
function (e, t, i) {
var n = e("./$.wks")("iterator"),
r = !1;
try {
var o = [7][n]();
(o["return"] = function () {
r = !0;
}),
Array.from(o, function () {
throw 2;
});
} catch (a) {}
t.exports = function (e) {
if (!r) return !1;
var t = !1;
try {
var i = [7],
o = i[n]();
(o.next = function () {
t = !0;
}),
(i[n] = function () {
return o;
}),
e(i);
} catch (a) {}
return t;
};
},
{
"./$.wks": 80
},
],
43: [
function (e, t, i) {
t.exports = function (e, t) {
return {
value: t,
done: !!e
};
};
},
{},
],
44: [
function (e, t, i) {
t.exports = {};
},
{},
],
45: [
function (e, t, i) {
var n = Object;
t.exports = {
create: n.create,
getProto: n.getPrototypeOf,
isEnum: {}.propertyIsEnumerable,
getDesc: n.getOwnPropertyDescriptor,
setDesc: n.defineProperty,
setDescs: n.defineProperties,
getKeys: n.keys,
getNames: n.getOwnPropertyNames,
getSymbols: n.getOwnPropertySymbols,
each: [].forEach,
};
},
{},
],
46: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.to-iobject");
t.exports = function (e, t) {
for (var i, o = r(e), a = n.getKeys(o), s = a.length, l = 0; s > l;)
if (o[(i = a[l++])] === t) return i;
};
},
{
"./$": 45,
"./$.to-iobject": 75
},
],
47: [
function (e, t, i) {
t.exports = !1;
},
{},
],
48: [
function (e, t, i) {
t.exports =
Math.log1p ||
function (e) {
return (e = +e) > -1e-8 && 1e-8 > e ? e - (e * e) / 2 : Math.log(1 + e);
};
},
{},
],
49: [
function (e, t, i) {
var n,
r,
o,
a = e("./$.global"),
s = e("./$.task").set,
l = a.MutationObserver || a.WebKitMutationObserver,
c = a.process,
u = "process" == e("./$.cof")(c),
h = function () {
var e, t;
for (u && (e = c.domain) && ((c.domain = null), e.exit()); n;)(t = n.domain), t && t.enter(), n.fn.call(), t && t.exit(), (n = n.next);
(r = void 0), e && e.enter();
};
if (u)
o = function () {
c.nextTick(h);
};
else if (l) {
var d = 1,
f = document.createTextNode("");
new l(h).observe(f, {
characterData: !0
}),
(o = function () {
f.data = d = -d;
});
} else
o = function () {
s.call(a, h);
};
t.exports = function (e) {
var t = {
fn: e,
next: void 0,
domain: u && c.domain
};
r && (r.next = t), n || ((n = t), o()), (r = t);
};
},
{
"./$.cof": 10,
"./$.global": 28,
"./$.task": 72
},
],
50: [
function (e, t, i) {
var n = e("./$.redef");
t.exports = function (e, t) {
for (var i in t) n(e, i, t[i]);
return e;
};
},
{
"./$.redef": 57
},
],
51: [
function (e, t, i) {
t.exports = function (t, i) {
var n = e("./$.def"),
r = (e("./$.core").Object || {})[t] || Object[t],
o = {};
(o[t] = i(r)),
n(
n.S +
n.F *
e("./$.fails")(function () {
r(1);
}),
"Object",
o
);
};
},
{
"./$.core": 15,
"./$.def": 17,
"./$.fails": 23
},
],
52: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.has"),
o = e("./$.to-iobject");
t.exports = function (e) {
return function (t) {
for (var i, a = o(t), s = n.getKeys(a), l = s.length, c = 0, u = []; l > c;) r(a, (i = s[c++])) && u.push(e ? [i, a[i]] : a[i]);
return u;
};
};
},
{
"./$": 45,
"./$.has": 29,
"./$.to-iobject": 75
},
],
53: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.an-object"),
o = e("./$.global").Reflect;
t.exports =
(o && o.ownKeys) ||
function (e) {
var t = n.getNames(r(e)),
i = n.getSymbols;
return i ? t.concat(i(e)) : t;
};
},
{
"./$": 45,
"./$.an-object": 3,
"./$.global": 28
},
],
54: [
function (e, t, i) {
"use strict";
var n = e("./$.path"),
r = e("./$.invoke"),
o = e("./$.a-function");
t.exports = function () {
for (var e = o(this), t = arguments.length, i = Array(t), a = 0, s = n._, l = !1; t > a;)(i[a] = arguments[a++]) === s && (l = !0);
return function () {
var n,
o = this,
a = arguments.length,
c = 0,
u = 0;
if (!l && !a) return r(e, i, o);
if (((n = i.slice()), l))
for (; t > c; c++) n[c] === s && (n[c] = arguments[u++]);
for (; a > u;) n.push(arguments[u++]);
return r(e, n, o);
};
};
},
{
"./$.a-function": 2,
"./$.invoke": 32,
"./$.path": 55
},
],
55: [
function (e, t, i) {
t.exports = e("./$.global");
},
{
"./$.global": 28
},
],
56: [
function (e, t, i) {
t.exports = function (e, t) {
return {
enumerable: !(1 & e),
configurable: !(2 & e),
writable: !(4 & e),
value: t
};
};
},
{},
],
57: [
function (e, t, i) {
var n = e("./$.global"),
r = e("./$.hide"),
o = e("./$.uid")("src"),
a = "toString",
s = Function[a],
l = ("" + s).split(a);
(e("./$.core").inspectSource = function (e) {
return s.call(e);
}),
(t.exports = function (e, t, i, a) {
"function" == typeof i && (r(i, o, e[t] ? "" + e[t] : l.join(String(t))), "name" in i || (i.name = t)), e === n ? (e[t] = i) : (a || delete e[t], r(e, t, i));
})(Function.prototype, a, function () {
return ("function" == typeof this && this[o]) || s.call(this);
});
},
{
"./$.core": 15,
"./$.global": 28,
"./$.hide": 30,
"./$.uid": 78
},
],
58: [
function (e, t, i) {
t.exports = function (e, t) {
var i =
t === Object(t) ?
function (e) {
return t[e];
} :
t;
return function (t) {
return String(t).replace(e, i);
};
};
},
{},
],
59: [
function (e, t, i) {
t.exports =
Object.is ||
function (e, t) {
return e === t ? 0 !== e || 1 / e === 1 / t : e != e && t != t;
};
},
{},
],
60: [
function (e, t, i) {
var n = e("./$").getDesc,
r = e("./$.is-object"),
o = e("./$.an-object"),
a = function (e, t) {
if ((o(e), !r(t) && null !== t)) throw TypeError(t + ": can't set as prototype!");
};
t.exports = {
set: Object.setPrototypeOf ||
("__proto__" in {} ?
(function (t, i, r) {
try {
(r = e("./$.ctx")(Function.call, n(Object.prototype, "__proto__").set, 2)), r(t, []), (i = !(t instanceof Array));
} catch (o) {
i = !0;
}
return function (e, t) {
return a(e, t), i ? (e.__proto__ = t) : r(e, t), e;
};
})({}, !1) :
void 0),
check: a,
};
},
{
"./$": 45,
"./$.an-object": 3,
"./$.ctx": 16,
"./$.is-object": 37
},
],
61: [
function (e, t, i) {
var n = e("./$.global"),
r = "__core-js_shared__",
o = n[r] || (n[r] = {});
t.exports = function (e) {
return o[e] || (o[e] = {});
};
},
{
"./$.global": 28
},
],
62: [
function (e, t, i) {
t.exports =
Math.sign ||
function (e) {
return 0 == (e = +e) || e != e ? e : 0 > e ? -1 : 1;
};
},
{},
],
63: [
function (e, t, i) {
"use strict";
var n = e("./$"),
r = e("./$.wks")("species");
t.exports = function (t) {
!e("./$.support-desc") ||
r in t ||
n.setDesc(t, r, {
configurable: !0,
get: function () {
return this;
},
});
};
},
{
"./$": 45,
"./$.support-desc": 70,
"./$.wks": 80
},
],
64: [
function (e, t, i) {
t.exports = function (e, t, i) {
if (!(e instanceof t)) throw TypeError(i + ": use the 'new' operator!");
return e;
};
},
{},
],
65: [
function (e, t, i) {
var n = e("./$.to-integer"),
r = e("./$.defined");
t.exports = function (e) {
return function (t, i) {
var o,
a,
s = String(r(t)),
l = n(i),
c = s.length;
return 0 > l || l >= c ?
e ?
"" :
void 0 :
((o = s.charCodeAt(l)), 55296 > o || o > 56319 || l + 1 === c || (a = s.charCodeAt(l + 1)) < 56320 || a > 57343 ? (e ? s.charAt(l) : o) : e ? s.slice(l, l + 2) : ((o - 55296) << 10) + (a - 56320) + 65536);
};
};
},
{
"./$.defined": 18,
"./$.to-integer": 74
},
],
66: [
function (e, t, i) {
var n = e("./$.is-regexp"),
r = e("./$.defined");
t.exports = function (e, t, i) {
if (n(t)) throw TypeError("String#" + i + " doesn't accept regex!");
return String(r(e));
};
},
{
"./$.defined": 18,
"./$.is-regexp": 38
},
],
67: [
function (e, t, i) {
var n = e("./$.to-length"),
r = e("./$.string-repeat"),
o = e("./$.defined");
t.exports = function (e, t, i, a) {
var s = String(o(e)),
l = s.length,
c = void 0 === i ? " " : String(i),
u = n(t);
if (l >= u) return s;
"" == c && (c = " ");
var h = u - l,
d = r.call(c, Math.ceil(h / c.length));
return d.length > h && (d = d.slice(0, h)), a ? d + s : s + d;
};
},
{
"./$.defined": 18,
"./$.string-repeat": 68,
"./$.to-length": 76
},
],
68: [
function (e, t, i) {
"use strict";
var n = e("./$.to-integer"),
r = e("./$.defined");
t.exports = function (e) {
var t = String(r(this)),
i = "",
o = n(e);
if (0 > o || o == 1 / 0) throw RangeError("Count can't be negative");
for (; o > 0;
(o >>>= 1) && (t += t)) 1 & o && (i += t);
return i;
};
},
{
"./$.defined": 18,
"./$.to-integer": 74
},
],
69: [
function (e, t, i) {
var n = function (e, t) {
return (e = String(o(e))), 1 & t && (e = e.replace(c, "")), 2 & t && (e = e.replace(u, "")), e;
},
r = e("./$.def"),
o = e("./$.defined"),
a = " nfr
",
s = "[" + a + "]",
l = " ",
c = RegExp("^" + s + s + "*"),
u = RegExp(s + s + "*$");
t.exports = function (t, i) {
var o = {};
(o[t] = i(n)),
r(
r.P +
r.F *
e("./$.fails")(function () {
return !!a[t]() || l[t]() != l;
}),
"String",
o
);
};
},
{
"./$.def": 17,
"./$.defined": 18,
"./$.fails": 23
},
],
70: [
function (e, t, i) {
t.exports = !e("./$.fails")(function () {
return (
7 !=
Object.defineProperty({}, "a", {
get: function () {
return 7;
},
}).a
);
});
},
{
"./$.fails": 23
},
],
71: [
function (e, t, i) {
var n = e("./$.has"),
r = e("./$.hide"),
o = e("./$.wks")("toStringTag");
t.exports = function (e, t, i) {
e && !n((e = i ? e : e.prototype), o) && r(e, o, t);
};
},
{
"./$.has": 29,
"./$.hide": 30,
"./$.wks": 80
},
],
72: [
function (e, t, i) {
"use strict";
var n,
r,
o,
a = e("./$.ctx"),
s = e("./$.invoke"),
l = e("./$.html"),
c = e("./$.dom-create"),
u = e("./$.global"),
h = u.process,
d = u.setImmediate,
f = u.clearImmediate,
p = u.MessageChannel,
m = 0,
v = {},
g = "onreadystatechange",
y = function () {
var e = +this;
if (v.hasOwnProperty(e)) {
var t = v[e];
delete v[e], t();
}
},
_ = function (e) {
y.call(e.data);
};
(d && f) ||
((d = function (e) {
for (var t = [], i = 1; arguments.length > i;) t.push(arguments[i++]);
return (
(v[++m] = function () {
s("function" == typeof e ? e : Function(e), t);
}),
n(m),
m
);
}),
(f = function (e) {
delete v[e];
}),
"process" == e("./$.cof")(h) ?
(n = function (e) {
h.nextTick(a(y, e, 1));
}) :
p ?
((r = new p()), (o = r.port2), (r.port1.onmessage = _), (n = a(o.postMessage, o, 1))) :
u.addEventListener && "function" == typeof postMessage && !u.importScripts ?
((n = function (e) {
u.postMessage(e + "", "*");
}),
u.addEventListener("message", _, !1)) :
(n =
g in c("script") ?
function (e) {
l.appendChild(c("script"))[g] = function () {
l.removeChild(this), y.call(e);
};
} :
function (e) {
setTimeout(a(y, e, 1), 0);
})),
(t.exports = {
set: d,
clear: f
});
},
{
"./$.cof": 10,
"./$.ctx": 16,
"./$.dom-create": 19,
"./$.global": 28,
"./$.html": 31,
"./$.invoke": 32
},
],
73: [
function (e, t, i) {
var n = e("./$.to-integer"),
r = Math.max,
o = Math.min;
t.exports = function (e, t) {
return (e = n(e)), 0 > e ? r(e + t, 0) : o(e, t);
};
},
{
"./$.to-integer": 74
},
],
74: [
function (e, t, i) {
var n = Math.ceil,
r = Math.floor;
t.exports = function (e) {
return isNaN((e = +e)) ? 0 : (e > 0 ? r : n)(e);
};
},
{},
],
75: [
function (e, t, i) {
var n = e("./$.iobject"),
r = e("./$.defined");
t.exports = function (e) {
return n(r(e));
};
},
{
"./$.defined": 18,
"./$.iobject": 33
},
],
76: [
function (e, t, i) {
var n = e("./$.to-integer"),
r = Math.min;
t.exports = function (e) {
return e > 0 ? r(n(e), 9007199254740991) : 0;
};
},
{
"./$.to-integer": 74
},
],
77: [
function (e, t, i) {
var n = e("./$.defined");
t.exports = function (e) {
return Object(n(e));
};
},
{
"./$.defined": 18
},
],
78: [
function (e, t, i) {
var n = 0,
r = Math.random();
t.exports = function (e) {
return "Symbol(".concat(void 0 === e ? "" : e, ")_", (++n + r).toString(36));
};
},
{},
],
79: [
function (e, t, i) {
var n = e("./$.wks")("unscopables");
void 0 == [][n] && e("./$.hide")(Array.prototype, n, {}),
(t.exports = function (e) {
[][n][e] = !0;
});
},
{
"./$.hide": 30,
"./$.wks": 80
},
],
80: [
function (e, t, i) {
var n = e("./$.shared")("wks"),
r = e("./$.global").Symbol;
t.exports = function (t) {
return n[t] || (n[t] = (r && r[t]) || (r || e("./$.uid"))("Symbol." + t));
};
},
{
"./$.global": 28,
"./$.shared": 61,
"./$.uid": 78
},
],
81: [
function (e, t, i) {
var n = e("./$.classof"),
r = e("./$.wks")("iterator"),
o = e("./$.iterators");
t.exports = e("./$.core").getIteratorMethod = function (e) {
return void 0 != e ? e[r] || e["@@iterator"] || o[n(e)] : void 0;
};
},
{
"./$.classof": 9,
"./$.core": 15,
"./$.iterators": 44,
"./$.wks": 80
},
],
82: [
function (e, t, i) {
"use strict";
var n,
r = e("./$"),
o = e("./$.support-desc"),
a = e("./$.property-desc"),
s = e("./$.html"),
l = e("./$.dom-create"),
c = e("./$.has"),
u = e("./$.cof"),
h = e("./$.def"),
d = e("./$.invoke"),
f = e("./$.array-methods"),
p = e("./$.uid")("__proto__"),
m = e("./$.is-object"),
v = e("./$.an-object"),
g = e("./$.a-function"),
y = e("./$.to-object"),
_ = e("./$.to-iobject"),
b = e("./$.to-integer"),
x = e("./$.to-index"),
w = e("./$.to-length"),
M = e("./$.iobject"),
T = e("./$.fails"),
S = Object.prototype,
E = [],
A = E.slice,
C = E.join,
P = r.setDesc,
L = r.getDesc,
R = r.setDescs,
O = e("./$.array-includes")(!1),
k = {};
o ||
((n = !T(function () {
return (
7 !=
P(l("div"), "a", {
get: function () {
return 7;
},
}).a
);
})),
(r.setDesc = function (e, t, i) {
if (n)
try {
return P(e, t, i);
} catch (r) {}
if ("get" in i || "set" in i) throw TypeError("Accessors not supported!");
return "value" in i && (v(e)[t] = i.value), e;
}),
(r.getDesc = function (e, t) {
if (n)
try {
return L(e, t);
} catch (i) {}
return c(e, t) ? a(!S.propertyIsEnumerable.call(e, t), e[t]) : void 0;
}),
(r.setDescs = R = function (e, t) {
v(e);
for (var i, n = r.getKeys(t), o = n.length, a = 0; o > a;) r.setDesc(e, (i = n[a++]), t[i]);
return e;
})),
h(h.S + h.F * !o, "Object", {
getOwnPropertyDescriptor: r.getDesc,
defineProperty: r.setDesc,
defineProperties: R
});
var D = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),
I = D.concat("length", "prototype"),
N = D.length,
U = function () {
var e,
t = l("iframe"),
i = N,
n = ">";
for (t.style.display = "none", s.appendChild(t), t.src = "javascript:", e = t.contentWindow.document, e.open(), e.write(" o;) c(r, (n = e[o++])) && (~O(a, n) || a.push(n));
return a;
};
},
B = function () {};
h(h.S, "Object", {
getPrototypeOf: (r.getProto =
r.getProto ||
function (e) {
return (e = y(e)), c(e, p) ? e[p] : "function" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? S : null;
}),
getOwnPropertyNames: (r.getNames = r.getNames || j(I, I.length, !0)),
create: (r.create =
r.create ||
function (e, t) {
var i;
return null !== e ? ((B.prototype = v(e)), (i = new B()), (B.prototype = null), (i[p] = e)) : (i = U()), void 0 === t ? i : R(i, t);
}),
keys: (r.getKeys = r.getKeys || j(D, N, !1)),
});
var F = function (e, t, i) {
if (!(t in k)) {
for (var n = [], r = 0; t > r; r++) n[r] = "a[" + r + "]";
k[t] = Function("F,a", "return new F(" + n.join(",") + ")");
}
return k[t](e, i);
};
h(h.P, "Function", {
bind: function (e) {
var t = g(this),
i = A.call(arguments, 1),
n = function () {
var r = i.concat(A.call(arguments));
return this instanceof n ? F(t, r.length, r) : d(t, r, e);
};
return m(t.prototype) && (n.prototype = t.prototype), n;
},
});
var V = T(function () {
s && A.call(s);
});
h(h.P + h.F * V, "Array", {
slice: function (e, t) {
var i = w(this.length),
n = u(this);
if (((t = void 0 === t ? i : t), "Array" == n)) return A.call(this, e, t);
for (var r = x(e, i), o = x(t, i), a = w(o - r), s = Array(a), l = 0; a > l; l++) s[l] = "String" == n ? this.charAt(r + l) : this[r + l];
return s;
},
}),
h(h.P + h.F * (M != Object), "Array", {
join: function () {
return C.apply(M(this), arguments);
},
}),
h(h.S, "Array", {
isArray: e("./$.is-array")
});
var G = function (e) {
return function (t, i) {
g(t);
var n = M(this),
r = w(n.length),
o = e ? r - 1 : 0,
a = e ? -1 : 1;
if (arguments.length < 2)
for (;;) {
if (o in n) {
(i = n[o]), (o += a);
break;
}
if (((o += a), e ? 0 > o : o >= r)) throw TypeError("Reduce of empty array with no initial value");
}
for (; e ? o >= 0 : r > o; o += a) o in n && (i = t(i, n[o], o, this));
return i;
};
},
z = function (e) {
return function (t) {
return e(this, t, arguments[1]);
};
};
h(h.P, "Array", {
forEach: (r.each = r.each || z(f(0))),
map: z(f(1)),
filter: z(f(2)),
some: z(f(3)),
every: z(f(4)),
reduce: G(!1),
reduceRight: G(!0),
indexOf: z(O),
lastIndexOf: function (e, t) {
var i = _(this),
n = w(i.length),
r = n - 1;
for (arguments.length > 1 && (r = Math.min(r, b(t))), 0 > r && (r = w(n + r)); r >= 0; r--)
if (r in i && i[r] === e) return r;
return -1;
},
}),
h(h.S, "Date", {
now: function () {
return +new Date();
},
});
var $ = function (e) {
return e > 9 ? e : "0" + e;
},
H = new Date(-5e13 - 1),
W = !(
H.toISOString &&
"0385-07-25T07:06:39.999Z" == H.toISOString() &&
T(function () {
new Date(NaN).toISOString();
})
);
h(h.P + h.F * W, "Date", {
toISOString: function () {
if (!isFinite(this)) throw RangeError("Invalid time value");
var e = this,
t = e.getUTCFullYear(),
i = e.getUTCMilliseconds(),
n = 0 > t ? "-" : t > 9999 ? "+" : "";
return (
n +
("00000" + Math.abs(t)).slice(n ? -6 : -4) +
"-" +
$(e.getUTCMonth() + 1) +
"-" +
$(e.getUTCDate()) +
"T" +
$(e.getUTCHours()) +
":" +
$(e.getUTCMinutes()) +
":" +
$(e.getUTCSeconds()) +
"." +
(i > 99 ? i : "0" + $(i)) +
"Z"
);
},
});
},
{
"./$": 45,
"./$.a-function": 2,
"./$.an-object": 3,
"./$.array-includes": 6,
"./$.array-methods": 7,
"./$.cof": 10,
"./$.def": 17,
"./$.dom-create": 19,
"./$.fails": 23,
"./$.has": 29,
"./$.html": 31,
"./$.invoke": 32,
"./$.iobject": 33,
"./$.is-array": 35,
"./$.is-object": 37,
"./$.property-desc": 56,
"./$.support-desc": 70,
"./$.to-index": 73,
"./$.to-integer": 74,
"./$.to-iobject": 75,
"./$.to-length": 76,
"./$.to-object": 77,
"./$.uid": 78,
},
],
83: [
function (e, t, i) {
"use strict";
var n = e("./$.def");
n(n.P, "Array", {
copyWithin: e("./$.array-copy-within")
}), e("./$.unscope")("copyWithin");
},
{
"./$.array-copy-within": 4,
"./$.def": 17,
"./$.unscope": 79
},
],
84: [
function (e, t, i) {
var n = e("./$.def");
n(n.P, "Array", {
fill: e("./$.array-fill")
}), e("./$.unscope")("fill");
},
{
"./$.array-fill": 5,
"./$.def": 17,
"./$.unscope": 79
},
],
85: [
function (e, t, i) {
"use strict";
var n = "findIndex",
r = e("./$.def"),
o = !0,
a = e("./$.array-methods")(6);
n in [] &&
Array(1)[n](function () {
o = !1;
}),
r(r.P + r.F * o, "Array", {
findIndex: function (e) {
return a(this, e, arguments[1]);
},
}),
e("./$.unscope")(n);
},
{
"./$.array-methods": 7,
"./$.def": 17,
"./$.unscope": 79
},
],
86: [
function (e, t, i) {
"use strict";
var n = "find",
r = e("./$.def"),
o = !0,
a = e("./$.array-methods")(5);
n in [] &&
Array(1)[n](function () {
o = !1;
}),
r(r.P + r.F * o, "Array", {
find: function (e) {
return a(this, e, arguments[1]);
},
}),
e("./$.unscope")(n);
},
{
"./$.array-methods": 7,
"./$.def": 17,
"./$.unscope": 79
},
],
87: [
function (e, t, i) {
"use strict";
var n = e("./$.ctx"),
r = e("./$.def"),
o = e("./$.to-object"),
a = e("./$.iter-call"),
s = e("./$.is-array-iter"),
l = e("./$.to-length"),
c = e("./core.get-iterator-method");
r(
r.S +
r.F *
!e("./$.iter-detect")(function (e) {
Array.from(e);
}),
"Array", {
from: function (e) {
var t,
i,
r,
u,
h = o(e),
d = "function" == typeof this ? this : Array,
f = arguments[1],
p = void 0 !== f,
m = 0,
v = c(h);
if ((p && (f = n(f, arguments[2], 2)), void 0 == v || (d == Array && s(v))))
for (t = l(h.length), i = new d(t); t > m; m++) i[m] = p ? f(h[m], m) : h[m];
else
for (u = v.call(h), i = new d(); !(r = u.next()).done; m++) i[m] = p ? a(u, f, [r.value, m], !0) : r.value;
return (i.length = m), i;
},
}
);
},
{
"./$.ctx": 16,
"./$.def": 17,
"./$.is-array-iter": 34,
"./$.iter-call": 39,
"./$.iter-detect": 42,
"./$.to-length": 76,
"./$.to-object": 77,
"./core.get-iterator-method": 81
},
],
88: [
function (e, t, i) {
"use strict";
var n = e("./$.unscope"),
r = e("./$.iter-step"),
o = e("./$.iterators"),
a = e("./$.to-iobject");
e("./$.iter-define")(
Array,
"Array",
function (e, t) {
(this._t = a(e)), (this._i = 0), (this._k = t);
},
function () {
var e = this._t,
t = this._k,
i = this._i++;
return !e || i >= e.length ? ((this._t = void 0), r(1)) : "keys" == t ? r(0, i) : "values" == t ? r(0, e[i]) : r(0, [i, e[i]]);
},
"values"
),
(o.Arguments = o.Array),
n("keys"),
n("values"),
n("entries");
},
{
"./$.iter-define": 41,
"./$.iter-step": 43,
"./$.iterators": 44,
"./$.to-iobject": 75,
"./$.unscope": 79
},
],
89: [
function (e, t, i) {
"use strict";
var n = e("./$.def");
n(
n.S +
n.F *
e("./$.fails")(function () {
function e() {}
return !(Array.of.call(e) instanceof e);
}),
"Array", {
of: function () {
for (var e = 0, t = arguments.length, i = new("function" == typeof this ? this : Array)(t); t > e;) i[e] = arguments[e++];
return (i.length = t), i;
},
}
);
},
{
"./$.def": 17,
"./$.fails": 23
},
],
90: [
function (e, t, i) {
e("./$.species")(Array);
},
{
"./$.species": 63
},
],
91: [
function (e, t, i) {
"use strict";
var n = e("./$"),
r = e("./$.is-object"),
o = e("./$.wks")("hasInstance"),
a = Function.prototype;
o in a ||
n.setDesc(a, o, {
value: function (e) {
if ("function" != typeof this || !r(e)) return !1;
if (!r(this.prototype)) return e instanceof this;
for (;
(e = n.getProto(e));)
if (this.prototype === e) return !0;
return !1;
},
});
},
{
"./$": 45,
"./$.is-object": 37,
"./$.wks": 80
},
],
92: [
function (e, t, i) {
var n = e("./$").setDesc,
r = e("./$.property-desc"),
o = e("./$.has"),
a = Function.prototype,
s = /^s*function ([^ (]*)/,
l = "name";
l in a ||
(e("./$.support-desc") &&
n(a, l, {
configurable: !0,
get: function () {
var e = ("" + this).match(s),
t = e ? e[1] : "";
return o(this, l) || n(this, l, r(5, t)), t;
},
}));
},
{
"./$": 45,
"./$.has": 29,
"./$.property-desc": 56,
"./$.support-desc": 70
},
],
93: [
function (e, t, i) {
"use strict";
var n = e("./$.collection-strong");
e("./$.collection")(
"Map",
function (e) {
return function () {
return e(this, arguments[0]);
};
}, {
get: function (e) {
var t = n.getEntry(this, e);
return t && t.v;
},
set: function (e, t) {
return n.def(this, 0 === e ? 0 : e, t);
},
},
n,
!0
);
},
{
"./$.collection": 14,
"./$.collection-strong": 11
},
],
94: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.log1p"),
o = Math.sqrt,
a = Math.acosh;
n(n.S + n.F * !(a && 710 == Math.floor(a(Number.MAX_VALUE))), "Math", {
acosh: function (e) {
return (e = +e) < 1 ? NaN : e > 94906265.62425156 ? Math.log(e) + Math.LN2 : r(e - 1 + o(e - 1) * o(e + 1));
},
});
},
{
"./$.def": 17,
"./$.log1p": 48
},
],
95: [
function (e, t, i) {
function n(e) {
return isFinite((e = +e)) && 0 != e ? (0 > e ? -n(-e) : Math.log(e + Math.sqrt(e * e + 1))) : e;
}
var r = e("./$.def");
r(r.S, "Math", {
asinh: n
});
},
{
"./$.def": 17
},
],
96: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Math", {
atanh: function (e) {
return 0 == (e = +e) ? e : Math.log((1 + e) / (1 - e)) / 2;
},
});
},
{
"./$.def": 17
},
],
97: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.sign");
n(n.S, "Math", {
cbrt: function (e) {
return r((e = +e)) * Math.pow(Math.abs(e), 1 / 3);
},
});
},
{
"./$.def": 17,
"./$.sign": 62
},
],
98: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Math", {
clz32: function (e) {
return (e >>>= 0) ? 31 - Math.floor(Math.log(e + 0.5) * Math.LOG2E) : 32;
},
});
},
{
"./$.def": 17
},
],
99: [
function (e, t, i) {
var n = e("./$.def"),
r = Math.exp;
n(n.S, "Math", {
cosh: function (e) {
return (r((e = +e)) + r(-e)) / 2;
},
});
},
{
"./$.def": 17
},
],
100: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Math", {
expm1: e("./$.expm1")
});
},
{
"./$.def": 17,
"./$.expm1": 21
},
],
101: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.sign"),
o = Math.pow,
a = o(2, -52),
s = o(2, -23),
l = o(2, 127) * (2 - s),
c = o(2, -126),
u = function (e) {
return e + 1 / a - 1 / a;
};
n(n.S, "Math", {
fround: function (e) {
var t,
i,
n = Math.abs(e),
o = r(e);
return c > n ? o * u(n / c / s) * c * s : ((t = (1 + s / a) * n), (i = t - (t - n)), i > l || i != i ? o * (1 / 0) : o * i);
},
});
},
{
"./$.def": 17,
"./$.sign": 62
},
],
102: [
function (e, t, i) {
var n = e("./$.def"),
r = Math.abs;
n(n.S, "Math", {
hypot: function (e, t) {
for (var i, n, o = 0, a = 0, s = arguments.length, l = 0; s > a;)(i = r(arguments[a++])), i > l ? ((n = l / i), (o = o * n * n + 1), (l = i)) : i > 0 ? ((n = i / l), (o += n * n)) : (o += i);
return l === 1 / 0 ? 1 / 0 : l * Math.sqrt(o);
},
});
},
{
"./$.def": 17
},
],
103: [
function (e, t, i) {
var n = e("./$.def");
n(
n.S +
n.F *
e("./$.fails")(function () {
return -5 != Math.imul(4294967295, 5);
}),
"Math", {
imul: function (e, t) {
var i = 65535,
n = +e,
r = +t,
o = i & n,
a = i & r;
return 0 | (o * a + ((((i & (n >>> 16)) * a + o * (i & (r >>> 16))) << 16) >>> 0));
},
}
);
},
{
"./$.def": 17,
"./$.fails": 23
},
],
104: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Math", {
log10: function (e) {
return Math.log(e) / Math.LN10;
},
});
},
{
"./$.def": 17
},
],
105: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Math", {
log1p: e("./$.log1p")
});
},
{
"./$.def": 17,
"./$.log1p": 48
},
],
106: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Math", {
log2: function (e) {
return Math.log(e) / Math.LN2;
},
});
},
{
"./$.def": 17
},
],
107: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Math", {
sign: e("./$.sign")
});
},
{
"./$.def": 17,
"./$.sign": 62
},
],
108: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.expm1"),
o = Math.exp;
n(
n.S +
n.F *
e("./$.fails")(function () {
return -2e-17 != !Math.sinh(-2e-17);
}),
"Math", {
sinh: function (e) {
return Math.abs((e = +e)) < 1 ? (r(e) - r(-e)) / 2 : (o(e - 1) - o(-e - 1)) * (Math.E / 2);
},
}
);
},
{
"./$.def": 17,
"./$.expm1": 21,
"./$.fails": 23
},
],
109: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.expm1"),
o = Math.exp;
n(n.S, "Math", {
tanh: function (e) {
var t = r((e = +e)),
i = r(-e);
return t == 1 / 0 ? 1 : i == 1 / 0 ? -1 : (t - i) / (o(e) + o(-e));
},
});
},
{
"./$.def": 17,
"./$.expm1": 21
},
],
110: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Math", {
trunc: function (e) {
return (e > 0 ? Math.floor : Math.ceil)(e);
},
});
},
{
"./$.def": 17
},
],
111: [
function (e, t, i) {
"use strict";
var n = e("./$"),
r = e("./$.global"),
o = e("./$.has"),
a = e("./$.cof"),
s = e("./$.is-object"),
l = e("./$.fails"),
c = "Number",
u = r[c],
h = u,
d = u.prototype,
f = a(n.create(d)) == c,
p = function (e) {
var t, i;
if ("function" == typeof (t = e.valueOf) && !s((i = t.call(e)))) return i;
if ("function" == typeof (t = e.toString) && !s((i = t.call(e)))) return i;
throw TypeError("Can't convert object to number");
},
m = function (e) {
if ((s(e) && (e = p(e)), "string" == typeof e && e.length > 2 && 48 == e.charCodeAt(0))) {
var t = !1;
switch (e.charCodeAt(1)) {
case 66:
case 98:
t = !0;
case 79:
case 111:
return parseInt(e.slice(2), t ? 2 : 8);
}
}
return +e;
};
(u("0o1") && u("0b1")) ||
((u = function (e) {
var t = this;
return t instanceof u &&
(f ?
l(function () {
d.valueOf.call(t);
}) :
a(t) != c) ?
new h(m(e)) :
m(e);
}),
n.each.call(
e("./$.support-desc") ?
n.getNames(h) :
"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),
function (e) {
o(h, e) && !o(u, e) && n.setDesc(u, e, n.getDesc(h, e));
}
),
(u.prototype = d),
(d.constructor = u),
e("./$.redef")(r, c, u));
},
{
"./$": 45,
"./$.cof": 10,
"./$.fails": 23,
"./$.global": 28,
"./$.has": 29,
"./$.is-object": 37,
"./$.redef": 57,
"./$.support-desc": 70
},
],
112: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Number", {
EPSILON: Math.pow(2, -52)
});
},
{
"./$.def": 17
},
],
113: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.global").isFinite;
n(n.S, "Number", {
isFinite: function (e) {
return "number" == typeof e && r(e);
},
});
},
{
"./$.def": 17,
"./$.global": 28
},
],
114: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Number", {
isInteger: e("./$.is-integer")
});
},
{
"./$.def": 17,
"./$.is-integer": 36
},
],
115: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Number", {
isNaN: function (e) {
return e != e;
},
});
},
{
"./$.def": 17
},
],
116: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.is-integer"),
o = Math.abs;
n(n.S, "Number", {
isSafeInteger: function (e) {
return r(e) && o(e) <= 9007199254740991;
},
});
},
{
"./$.def": 17,
"./$.is-integer": 36
},
],
117: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Number", {
MAX_SAFE_INTEGER: 9007199254740991
});
},
{
"./$.def": 17
},
],
118: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Number", {
MIN_SAFE_INTEGER: -9007199254740991
});
},
{
"./$.def": 17
},
],
119: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Number", {
parseFloat: parseFloat
});
},
{
"./$.def": 17
},
],
120: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Number", {
parseInt: parseInt
});
},
{
"./$.def": 17
},
],
121: [
function (e, t, i) {
var n = e("./$.def");
n(n.S + n.F, "Object", {
assign: e("./$.assign")
});
},
{
"./$.assign": 8,
"./$.def": 17
},
],
122: [
function (e, t, i) {
var n = e("./$.is-object");
e("./$.object-sap")("freeze", function (e) {
return function (t) {
return e && n(t) ? e(t) : t;
};
});
},
{
"./$.is-object": 37,
"./$.object-sap": 51
},
],
123: [
function (e, t, i) {
var n = e("./$.to-iobject");
e("./$.object-sap")("getOwnPropertyDescriptor", function (e) {
return function (t, i) {
return e(n(t), i);
};
});
},
{
"./$.object-sap": 51,
"./$.to-iobject": 75
},
],
124: [
function (e, t, i) {
e("./$.object-sap")("getOwnPropertyNames", function () {
return e("./$.get-names").get;
});
},
{
"./$.get-names": 27,
"./$.object-sap": 51
},
],
125: [
function (e, t, i) {
var n = e("./$.to-object");
e("./$.object-sap")("getPrototypeOf", function (e) {
return function (t) {
return e(n(t));
};
});
},
{
"./$.object-sap": 51,
"./$.to-object": 77
},
],
126: [
function (e, t, i) {
var n = e("./$.is-object");
e("./$.object-sap")("isExtensible", function (e) {
return function (t) {
return n(t) ? (e ? e(t) : !0) : !1;
};
});
},
{
"./$.is-object": 37,
"./$.object-sap": 51
},
],
127: [
function (e, t, i) {
var n = e("./$.is-object");
e("./$.object-sap")("isFrozen", function (e) {
return function (t) {
return n(t) ? (e ? e(t) : !1) : !0;
};
});
},
{
"./$.is-object": 37,
"./$.object-sap": 51
},
],
128: [
function (e, t, i) {
var n = e("./$.is-object");
e("./$.object-sap")("isSealed", function (e) {
return function (t) {
return n(t) ? (e ? e(t) : !1) : !0;
};
});
},
{
"./$.is-object": 37,
"./$.object-sap": 51
},
],
129: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Object", {
is: e("./$.same")
});
},
{
"./$.def": 17,
"./$.same": 59
},
],
130: [
function (e, t, i) {
var n = e("./$.to-object");
e("./$.object-sap")("keys", function (e) {
return function (t) {
return e(n(t));
};
});
},
{
"./$.object-sap": 51,
"./$.to-object": 77
},
],
131: [
function (e, t, i) {
var n = e("./$.is-object");
e("./$.object-sap")("preventExtensions", function (e) {
return function (t) {
return e && n(t) ? e(t) : t;
};
});
},
{
"./$.is-object": 37,
"./$.object-sap": 51
},
],
132: [
function (e, t, i) {
var n = e("./$.is-object");
e("./$.object-sap")("seal", function (e) {
return function (t) {
return e && n(t) ? e(t) : t;
};
});
},
{
"./$.is-object": 37,
"./$.object-sap": 51
},
],
133: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Object", {
setPrototypeOf: e("./$.set-proto").set
});
},
{
"./$.def": 17,
"./$.set-proto": 60
},
],
134: [
function (e, t, i) {
"use strict";
var n = e("./$.classof"),
r = {};
(r[e("./$.wks")("toStringTag")] = "z"),
r + "" != "[object z]" &&
e("./$.redef")(
Object.prototype,
"toString",
function () {
return "[object " + n(this) + "]";
},
!0
);
},
{
"./$.classof": 9,
"./$.redef": 57,
"./$.wks": 80
},
],
135: [
function (e, t, i) {
"use strict";
var n,
r = e("./$"),
o = e("./$.library"),
a = e("./$.global"),
s = e("./$.ctx"),
l = e("./$.classof"),
c = e("./$.def"),
u = e("./$.is-object"),
h = e("./$.an-object"),
d = e("./$.a-function"),
f = e("./$.strict-new"),
p = e("./$.for-of"),
m = e("./$.set-proto").set,
v = e("./$.same"),
g = e("./$.species"),
y = e("./$.wks")("species"),
_ = e("./$.uid")("record"),
b = e("./$.microtask"),
x = "Promise",
w = a.process,
M = "process" == l(w),
T = a[x],
S = function (e) {
var t = new T(function () {});
return e && (t.constructor = Object), T.resolve(t) === t;
},
E = (function () {
function t(e) {
var i = new T(e);
return m(i, t.prototype), i;
}
var i = !1;
try {
if (((i = T && T.resolve && S()), m(t, T), (t.prototype = r.create(T.prototype, {
constructor: {
value: t
}
})), t.resolve(5).then(function () {}) instanceof t || (i = !1), i && e("./$.support-desc"))) {
var n = !1;
T.resolve(
r.setDesc({}, "then", {
get: function () {
n = !0;
},
})
),
(i = n);
}
} catch (o) {
i = !1;
}
return i;
})(),
A = function (e) {
return u(e) && (E ? "Promise" == l(e) : _ in e);
},
C = function (e, t) {
return o && e === T && t === n ? !0 : v(e, t);
},
P = function (e) {
var t = h(e)[y];
return void 0 != t ? t : e;
},
L = function (e) {
var t;
return u(e) && "function" == typeof (t = e.then) ? t : !1;
},
R = function (e, t) {
if (!e.n) {
e.n = !0;
var i = e.c;
b(function () {
for (
var n = e.v,
r = 1 == e.s,
o = 0,
s = function (t) {
var i,
o,
a = r ? t.ok : t.fail;
try {
a ? (r || (e.h = !0), (i = a === !0 ? n : a(n)), i === t.P ? t.rej(TypeError("Promise-chain cycle")) : (o = L(i)) ? o.call(i, t.res, t.rej) : t.res(i)) : t.rej(n);
} catch (s) {
t.rej(s);
}
}; i.length > o;
)
s(i[o++]);
(i.length = 0),
(e.n = !1),
t &&
setTimeout(function () {
var t,
i,
r = e.p;
O(r) && (M ? w.emit("unhandledRejection", n, r) : (t = a.onunhandledrejection) ? t({
promise: r,
reason: n
}) : (i = a.console) && i.error && i.error("Unhandled promise rejection", n)),
(e.a = void 0);
}, 1);
});
}
},
O = function (e) {
var t,
i = e[_],
n = i.a || i.c,
r = 0;
if (i.h) return !1;
for (; n.length > r;)
if (((t = n[r++]), t.fail || !O(t.P))) return !1;
return !0;
},
k = function (e) {
var t = this;
t.d || ((t.d = !0), (t = t.r || t), (t.v = e), (t.s = 2), (t.a = t.c.slice()), R(t, !0));
},
D = function (e) {
var t,
i = this;
if (!i.d) {
(i.d = !0), (i = i.r || i);
try {
(t = L(e)) ?
b(function () {
var n = {
r: i,
d: !1
};
try {
t.call(e, s(D, n, 1), s(k, n, 1));
} catch (r) {
k.call(n, r);
}
}): ((i.v = e), (i.s = 1), R(i, !1));
} catch (n) {
k.call({
r: i,
d: !1
}, n);
}
}
};
E ||
((T = function (e) {
d(e);
var t = {
p: f(this, T, x),
c: [],
a: void 0,
s: 0,
d: !1,
v: void 0,
h: !1,
n: !1
};
this[_] = t;
try {
e(s(D, t, 1), s(k, t, 1));
} catch (i) {
k.call(t, i);
}
}),
e("./$.mix")(T.prototype, {
then: function (e, t) {
var i = h(h(this).constructor)[y],
n = {
ok: "function" == typeof e ? e : !0,
fail: "function" == typeof t ? t : !1
},
r = (n.P = new(void 0 != i ? i : T)(function (e, t) {
(n.res = e), (n.rej = t);
}));
d(n.res), d(n.rej);
var o = this[_];
return o.c.push(n), o.a && o.a.push(n), o.s && R(o, !1), r;
},
catch: function (e) {
return this.then(void 0, e);
},
})),
c(c.G + c.W + c.F * !E, {
Promise: T
}),
e("./$.tag")(T, x),
g(T),
g((n = e("./$.core")[x])),
c(c.S + c.F * !E, x, {
reject: function (e) {
return new this(function (t, i) {
i(e);
});
},
}),
c(c.S + c.F * (!E || S(!0)), x, {
resolve: function (e) {
return A(e) && C(e.constructor, this) ?
e :
new this(function (t) {
t(e);
});
},
}),
c(
c.S +
c.F *
!(
E &&
e("./$.iter-detect")(function (e) {
T.all(e)["catch"](function () {});
})
),
x, {
all: function (e) {
var t = P(this),
i = [];
return new t(function (n, o) {
p(e, !1, i.push, i);
var a = i.length,
s = Array(a);
a
?
r.each.call(i, function (e, i) {
t.resolve(e).then(function (e) {
(s[i] = e), --a || n(s);
}, o);
}) :
n(s);
});
},
race: function (e) {
var t = P(this);
return new t(function (i, n) {
p(e, !1, function (e) {
t.resolve(e).then(i, n);
});
});
},
}
);
},
{
"./$": 45,
"./$.a-function": 2,
"./$.an-object": 3,
"./$.classof": 9,
"./$.core": 15,
"./$.ctx": 16,
"./$.def": 17,
"./$.for-of": 26,
"./$.global": 28,
"./$.is-object": 37,
"./$.iter-detect": 42,
"./$.library": 47,
"./$.microtask": 49,
"./$.mix": 50,
"./$.same": 59,
"./$.set-proto": 60,
"./$.species": 63,
"./$.strict-new": 64,
"./$.support-desc": 70,
"./$.tag": 71,
"./$.uid": 78,
"./$.wks": 80,
},
],
136: [
function (e, t, i) {
var n = e("./$.def"),
r = Function.apply;
n(n.S, "Reflect", {
apply: function (e, t, i) {
return r.call(e, t, i);
},
});
},
{
"./$.def": 17
},
],
137: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.def"),
o = e("./$.a-function"),
a = e("./$.an-object"),
s = e("./$.is-object"),
l = Function.bind || e("./$.core").Function.prototype.bind;
r(
r.S +
r.F *
e("./$.fails")(function () {
function e() {}
return !(Reflect.construct(function () {}, [], e) instanceof e);
}),
"Reflect", {
construct: function (e, t) {
o(e);
var i = arguments.length < 3 ? e : o(arguments[2]);
if (e == i) {
if (void 0 != t)
switch (a(t).length) {
case 0:
return new e();
case 1:
return new e(t[0]);
case 2:
return new e(t[0], t[1]);
case 3:
return new e(t[0], t[1], t[2]);
case 4:
return new e(t[0], t[1], t[2], t[3]);
}
var r = [null];
return r.push.apply(r, t), new(l.apply(e, r))();
}
var c = i.prototype,
u = n.create(s(c) ? c : Object.prototype),
h = Function.apply.call(e, u, t);
return s(h) ? h : u;
},
}
);
},
{
"./$": 45,
"./$.a-function": 2,
"./$.an-object": 3,
"./$.core": 15,
"./$.def": 17,
"./$.fails": 23,
"./$.is-object": 37
},
],
138: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.def"),
o = e("./$.an-object");
r(
r.S +
r.F *
e("./$.fails")(function () {
Reflect.defineProperty(n.setDesc({}, 1, {
value: 1
}), 1, {
value: 2
});
}),
"Reflect", {
defineProperty: function (e, t, i) {
o(e);
try {
return n.setDesc(e, t, i), !0;
} catch (r) {
return !1;
}
},
}
);
},
{
"./$": 45,
"./$.an-object": 3,
"./$.def": 17,
"./$.fails": 23
},
],
139: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$").getDesc,
o = e("./$.an-object");
n(n.S, "Reflect", {
deleteProperty: function (e, t) {
var i = r(o(e), t);
return i && !i.configurable ? !1 : delete e[t];
},
});
},
{
"./$": 45,
"./$.an-object": 3,
"./$.def": 17
},
],
140: [
function (e, t, i) {
"use strict";
var n = e("./$.def"),
r = e("./$.an-object"),
o = function (e) {
(this._t = r(e)), (this._i = 0);
var t,
i = (this._k = []);
for (t in e) i.push(t);
};
e("./$.iter-create")(o, "Object", function () {
var e,
t = this,
i = t._k;
do
if (t._i >= i.length) return {
value: void 0,
done: !0
};
while (!((e = i[t._i++]) in t._t));
return {
value: e,
done: !1
};
}),
n(n.S, "Reflect", {
enumerate: function (e) {
return new o(e);
},
});
},
{
"./$.an-object": 3,
"./$.def": 17,
"./$.iter-create": 40
},
],
141: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.def"),
o = e("./$.an-object");
r(r.S, "Reflect", {
getOwnPropertyDescriptor: function (e, t) {
return n.getDesc(o(e), t);
},
});
},
{
"./$": 45,
"./$.an-object": 3,
"./$.def": 17
},
],
142: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$").getProto,
o = e("./$.an-object");
n(n.S, "Reflect", {
getPrototypeOf: function (e) {
return r(o(e));
},
});
},
{
"./$": 45,
"./$.an-object": 3,
"./$.def": 17
},
],
143: [
function (e, t, i) {
function n(e, t) {
var i,
a,
c = arguments.length < 3 ? e : arguments[2];
return l(e) === c ? e[t] : (i = r.getDesc(e, t)) ? (o(i, "value") ? i.value : void 0 !== i.get ? i.get.call(c) : void 0) : s((a = r.getProto(e))) ? n(a, t, c) : void 0;
}
var r = e("./$"),
o = e("./$.has"),
a = e("./$.def"),
s = e("./$.is-object"),
l = e("./$.an-object");
a(a.S, "Reflect", {
get: n
});
},
{
"./$": 45,
"./$.an-object": 3,
"./$.def": 17,
"./$.has": 29,
"./$.is-object": 37
},
],
144: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Reflect", {
has: function (e, t) {
return t in e;
},
});
},
{
"./$.def": 17
},
],
145: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.an-object"),
o = Object.isExtensible;
n(n.S, "Reflect", {
isExtensible: function (e) {
return r(e), o ? o(e) : !0;
},
});
},
{
"./$.an-object": 3,
"./$.def": 17
},
],
146: [
function (e, t, i) {
var n = e("./$.def");
n(n.S, "Reflect", {
ownKeys: e("./$.own-keys")
});
},
{
"./$.def": 17,
"./$.own-keys": 53
},
],
147: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.an-object"),
o = Object.preventExtensions;
n(n.S, "Reflect", {
preventExtensions: function (e) {
r(e);
try {
return o && o(e), !0;
} catch (t) {
return !1;
}
},
});
},
{
"./$.an-object": 3,
"./$.def": 17
},
],
148: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.set-proto");
r &&
n(n.S, "Reflect", {
setPrototypeOf: function (e, t) {
r.check(e, t);
try {
return r.set(e, t), !0;
} catch (i) {
return !1;
}
},
});
},
{
"./$.def": 17,
"./$.set-proto": 60
},
],
149: [
function (e, t, i) {
function n(e, t, i) {
var a,
u,
h = arguments.length < 4 ? e : arguments[3],
d = r.getDesc(l(e), t);
if (!d) {
if (c((u = r.getProto(e)))) return n(u, t, i, h);
d = s(0);
}
return o(d, "value") ? (d.writable !== !1 && c(h) ? ((a = r.getDesc(h, t) || s(0)), (a.value = i), r.setDesc(h, t, a), !0) : !1) : void 0 === d.set ? !1 : (d.set.call(h, i), !0);
}
var r = e("./$"),
o = e("./$.has"),
a = e("./$.def"),
s = e("./$.property-desc"),
l = e("./$.an-object"),
c = e("./$.is-object");
a(a.S, "Reflect", {
set: n
});
},
{
"./$": 45,
"./$.an-object": 3,
"./$.def": 17,
"./$.has": 29,
"./$.is-object": 37,
"./$.property-desc": 56
},
],
150: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.global"),
o = e("./$.is-regexp"),
a = e("./$.flags"),
s = r.RegExp,
l = s,
c = s.prototype,
u = /a/g,
h = /a/g,
d = new s(u) !== u;
!e("./$.support-desc") ||
(d &&
!e("./$.fails")(function () {
return (h[e("./$.wks")("match")] = !1), s(u) != u || s(h) == h || "/a/i" != s(u, "i");
})) ||
((s = function (e, t) {
var i = o(e),
n = void 0 === t;
return this instanceof s || !i || e.constructor !== s || !n ? (d ? new l(i && !n ? e.source : e, t) : l((i = e instanceof s) ? e.source : e, i && n ? a.call(e) : t)) : e;
}),
n.each.call(n.getNames(l), function (e) {
e in s ||
n.setDesc(s, e, {
configurable: !0,
get: function () {
return l[e];
},
set: function (t) {
l[e] = t;
},
});
}),
(c.constructor = s),
(s.prototype = c),
e("./$.redef")(r, "RegExp", s)),
e("./$.species")(s);
},
{
"./$": 45,
"./$.fails": 23,
"./$.flags": 25,
"./$.global": 28,
"./$.is-regexp": 38,
"./$.redef": 57,
"./$.species": 63,
"./$.support-desc": 70,
"./$.wks": 80
},
],
151: [
function (e, t, i) {
var n = e("./$");
e("./$.support-desc") && "g" != /./g.flags && n.setDesc(RegExp.prototype, "flags", {
configurable: !0,
get: e("./$.flags")
});
},
{
"./$": 45,
"./$.flags": 25,
"./$.support-desc": 70
},
],
152: [
function (e, t, i) {
e("./$.fix-re-wks")("match", 1, function (e, t) {
return function (i) {
"use strict";
var n = e(this),
r = void 0 == i ? void 0 : i[t];
return void 0 !== r ? r.call(i, n) : new RegExp(i)[t](String(n));
};
});
},
{
"./$.fix-re-wks": 24
},
],
153: [
function (e, t, i) {
e("./$.fix-re-wks")("replace", 2, function (e, t, i) {
return function (n, r) {
"use strict";
var o = e(this),
a = void 0 == n ? void 0 : n[t];
return void 0 !== a ? a.call(n, o, r) : i.call(String(o), n, r);
};
});
},
{
"./$.fix-re-wks": 24
},
],
154: [
function (e, t, i) {
e("./$.fix-re-wks")("search", 1, function (e, t) {
return function (i) {
"use strict";
var n = e(this),
r = void 0 == i ? void 0 : i[t];
return void 0 !== r ? r.call(i, n) : new RegExp(i)[t](String(n));
};
});
},
{
"./$.fix-re-wks": 24
},
],
155: [
function (e, t, i) {
e("./$.fix-re-wks")("split", 2, function (e, t, i) {
return function (n, r) {
"use strict";
var o = e(this),
a = void 0 == n ? void 0 : n[t];
return void 0 !== a ? a.call(n, o, r) : i.call(String(o), n, r);
};
});
},
{
"./$.fix-re-wks": 24
},
],
156: [
function (e, t, i) {
"use strict";
var n = e("./$.collection-strong");
e("./$.collection")(
"Set",
function (e) {
return function () {
return e(this, arguments[0]);
};
}, {
add: function (e) {
return n.def(this, (e = 0 === e ? 0 : e), e);
},
},
n
);
},
{
"./$.collection": 14,
"./$.collection-strong": 11
},
],
157: [
function (e, t, i) {
"use strict";
var n = e("./$.def"),
r = e("./$.string-at")(!1);
n(n.P, "String", {
codePointAt: function (e) {
return r(this, e);
},
});
},
{
"./$.def": 17,
"./$.string-at": 65
},
],
158: [
function (e, t, i) {
"use strict";
var n = e("./$.def"),
r = e("./$.to-length"),
o = e("./$.string-context"),
a = "endsWith",
s = "" [a];
n(n.P + n.F * e("./$.fails-is-regexp")(a), "String", {
endsWith: function (e) {
var t = o(this, e, a),
i = arguments[1],
n = r(t.length),
l = void 0 === i ? n : Math.min(r(i), n),
c = String(e);
return s ? s.call(t, c, l) : t.slice(l - c.length, l) === c;
},
});
},
{
"./$.def": 17,
"./$.fails-is-regexp": 22,
"./$.string-context": 66,
"./$.to-length": 76
},
],
159: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.to-index"),
o = String.fromCharCode,
a = String.fromCodePoint;
n(n.S + n.F * (!!a && 1 != a.length), "String", {
fromCodePoint: function (e) {
for (var t, i = [], n = arguments.length, a = 0; n > a;) {
if (((t = +arguments[a++]), r(t, 1114111) !== t)) throw RangeError(t + " is not a valid code point");
i.push(65536 > t ? o(t) : o(((t -= 65536) >> 10) + 55296, (t % 1024) + 56320));
}
return i.join("");
},
});
},
{
"./$.def": 17,
"./$.to-index": 73
},
],
160: [
function (e, t, i) {
"use strict";
var n = e("./$.def"),
r = e("./$.string-context"),
o = "includes";
n(n.P + n.F * e("./$.fails-is-regexp")(o), "String", {
includes: function (e) {
return !!~r(this, e, o).indexOf(e, arguments[1]);
},
});
},
{
"./$.def": 17,
"./$.fails-is-regexp": 22,
"./$.string-context": 66
},
],
161: [
function (e, t, i) {
"use strict";
var n = e("./$.string-at")(!0);
e("./$.iter-define")(
String,
"String",
function (e) {
(this._t = String(e)), (this._i = 0);
},
function () {
var e,
t = this._t,
i = this._i;
return i >= t.length ? {
value: void 0,
done: !0
} : ((e = n(t, i)), (this._i += e.length), {
value: e,
done: !1
});
}
);
},
{
"./$.iter-define": 41,
"./$.string-at": 65
},
],
162: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.to-iobject"),
o = e("./$.to-length");
n(n.S, "String", {
raw: function (e) {
for (var t = r(e.raw), i = o(t.length), n = arguments.length, a = [], s = 0; i > s;) a.push(String(t[s++])), n > s && a.push(String(arguments[s]));
return a.join("");
},
});
},
{
"./$.def": 17,
"./$.to-iobject": 75,
"./$.to-length": 76
},
],
163: [
function (e, t, i) {
var n = e("./$.def");
n(n.P, "String", {
repeat: e("./$.string-repeat")
});
},
{
"./$.def": 17,
"./$.string-repeat": 68
},
],
164: [
function (e, t, i) {
"use strict";
var n = e("./$.def"),
r = e("./$.to-length"),
o = e("./$.string-context"),
a = "startsWith",
s = "" [a];
n(n.P + n.F * e("./$.fails-is-regexp")(a), "String", {
startsWith: function (e) {
var t = o(this, e, a),
i = r(Math.min(arguments[1], t.length)),
n = String(e);
return s ? s.call(t, n, i) : t.slice(i, i + n.length) === n;
},
});
},
{
"./$.def": 17,
"./$.fails-is-regexp": 22,
"./$.string-context": 66,
"./$.to-length": 76
},
],
165: [
function (e, t, i) {
"use strict";
e("./$.string-trim")("trim", function (e) {
return function () {
return e(this, 3);
};
});
},
{
"./$.string-trim": 69
},
],
166: [
function (e, t, i) {
"use strict";
var n = e("./$"),
r = e("./$.global"),
o = e("./$.has"),
a = e("./$.support-desc"),
s = e("./$.def"),
l = e("./$.redef"),
c = e("./$.fails"),
u = e("./$.shared"),
h = e("./$.tag"),
d = e("./$.uid"),
f = e("./$.wks"),
p = e("./$.keyof"),
m = e("./$.get-names"),
v = e("./$.enum-keys"),
g = e("./$.is-array"),
y = (e("./$.is-object"), e("./$.an-object")),
_ = e("./$.to-iobject"),
b = e("./$.property-desc"),
x = n.getDesc,
w = n.setDesc,
M = n.create,
T = m.get,
S = r.Symbol,
E = r.JSON,
A = E && E.stringify,
C = !1,
P = f("_hidden"),
L = n.isEnum,
R = u("symbol-registry"),
O = u("symbols"),
k = "function" == typeof S,
D = Object.prototype,
I =
a &&
c(function () {
return (
7 !=
M(
w({}, "a", {
get: function () {
return w(this, "a", {
value: 7
}).a;
},
})
).a
);
}) ?
function (e, t, i) {
var n = x(D, t);
n && delete D[t], w(e, t, i), n && e !== D && w(D, t, n);
} :
w,
N = function (e) {
var t = (O[e] = M(S.prototype));
return (
(t._k = e),
a &&
C &&
I(D, e, {
configurable: !0,
set: function (t) {
o(this, P) && o(this[P], e) && (this[P][e] = !1), I(this, e, b(1, t));
},
}),
t
);
},
U = function (e) {
return "symbol" == typeof e;
},
j = function (e, t, i) {
return i && o(O, t) ? (i.enumerable ? (o(e, P) && e[P][t] && (e[P][t] = !1), (i = M(i, {
enumerable: b(0, !1)
}))) : (o(e, P) || w(e, P, b(1, {})), (e[P][t] = !0)), I(e, t, i)) : w(e, t, i);
},
B = function (e, t) {
y(e);
for (var i, n = v((t = _(t))), r = 0, o = n.length; o > r;) j(e, (i = n[r++]), t[i]);
return e;
},
F = function (e, t) {
return void 0 === t ? M(e) : B(M(e), t);
},
V = function (e) {
var t = L.call(this, e);
return t || !o(this, e) || !o(O, e) || (o(this, P) && this[P][e]) ? t : !0;
},
G = function (e, t) {
var i = x((e = _(e)), t);
return !i || !o(O, t) || (o(e, P) && e[P][t]) || (i.enumerable = !0), i;
},
z = function (e) {
for (var t, i = T(_(e)), n = [], r = 0; i.length > r;) o(O, (t = i[r++])) || t == P || n.push(t);
return n;
},
$ = function (e) {
for (var t, i = T(_(e)), n = [], r = 0; i.length > r;) o(O, (t = i[r++])) && n.push(O[t]);
return n;
},
H = function (e) {
for (var t, i, n = [e], r = 1; arguments.length > r;) n.push(arguments[r++]);
return (
(t = n[1]),
"function" == typeof t && (i = t),
(i || !g(t)) &&
(t = function (e, t) {
return i && (t = i.call(this, e, t)), U(t) ? void 0 : t;
}),
(n[1] = t),
A.apply(E, n)
);
},
W = c(function () {
var e = S();
return "[null]" != A([e]) || "{}" != A({
a: e
}) || "{}" != A(Object(e));
});
k ||
((S = function () {
if (U(this)) throw TypeError("Symbol is not a constructor");
return N(d(arguments[0]));
}),
l(S.prototype, "toString", function () {
return this._k;
}),
(U = function (e) {
return e instanceof S;
}),
(n.create = F),
(n.isEnum = V),
(n.getDesc = G),
(n.setDesc = j),
(n.setDescs = B),
(n.getNames = m.get = z),
(n.getSymbols = $),
a && !e("./$.library") && l(D, "propertyIsEnumerable", V, !0));
var X = {
for: function (e) {
return o(R, (e += "")) ? R[e] : (R[e] = S(e));
},
keyFor: function (e) {
return p(R, e);
},
useSetter: function () {
C = !0;
},
useSimple: function () {
C = !1;
},
};
n.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), function (e) {
var t = f(e);
X[e] = k ? t : N(t);
}),
(C = !0),
s(s.G + s.W, {
Symbol: S
}),
s(s.S, "Symbol", X),
s(s.S + s.F * !k, "Object", {
create: F,
defineProperty: j,
defineProperties: B,
getOwnPropertyDescriptor: G,
getOwnPropertyNames: z,
getOwnPropertySymbols: $
}),
E && s(s.S + s.F * (!k || W), "JSON", {
stringify: H
}),
h(S, "Symbol"),
h(Math, "Math", !0),
h(r.JSON, "JSON", !0);
},
{
"./$": 45,
"./$.an-object": 3,
"./$.def": 17,
"./$.enum-keys": 20,
"./$.fails": 23,
"./$.get-names": 27,
"./$.global": 28,
"./$.has": 29,
"./$.is-array": 35,
"./$.is-object": 37,
"./$.keyof": 46,
"./$.library": 47,
"./$.property-desc": 56,
"./$.redef": 57,
"./$.shared": 61,
"./$.support-desc": 70,
"./$.tag": 71,
"./$.to-iobject": 75,
"./$.uid": 78,
"./$.wks": 80,
},
],
167: [
function (e, t, i) {
"use strict";
var n = e("./$"),
r = e("./$.collection-weak"),
o = e("./$.is-object"),
a = e("./$.has"),
s = r.frozenStore,
l = r.WEAK,
c = Object.isExtensible || o,
u = {},
h = e("./$.collection")(
"WeakMap",
function (e) {
return function () {
return e(this, arguments[0]);
};
}, {
get: function (e) {
if (o(e)) {
if (!c(e)) return s(this).get(e);
if (a(e, l)) return e[l][this._i];
}
},
set: function (e, t) {
return r.def(this, e, t);
},
},
r,
!0,
!0
);
7 != new h().set((Object.freeze || Object)(u), 7).get(u) &&
n.each.call(["delete", "has", "get", "set"], function (t) {
var i = h.prototype,
n = i[t];
e("./$.redef")(i, t, function (e, i) {
if (o(e) && !c(e)) {
var r = s(this)[t](e, i);
return "set" == t ? this : r;
}
return n.call(this, e, i);
});
});
},
{
"./$": 45,
"./$.collection": 14,
"./$.collection-weak": 13,
"./$.has": 29,
"./$.is-object": 37,
"./$.redef": 57
},
],
168: [
function (e, t, i) {
"use strict";
var n = e("./$.collection-weak");
e("./$.collection")(
"WeakSet",
function (e) {
return function () {
return e(this, arguments[0]);
};
}, {
add: function (e) {
return n.def(this, e, !0);
},
},
n,
!1,
!0
);
},
{
"./$.collection": 14,
"./$.collection-weak": 13
},
],
169: [
function (e, t, i) {
"use strict";
var n = e("./$.def"),
r = e("./$.array-includes")(!0);
n(n.P, "Array", {
includes: function (e) {
return r(this, e, arguments[1]);
},
}),
e("./$.unscope")("includes");
},
{
"./$.array-includes": 6,
"./$.def": 17,
"./$.unscope": 79
},
],
170: [
function (e, t, i) {
var n = e("./$.def");
n(n.P, "Map", {
toJSON: e("./$.collection-to-json")("Map")
});
},
{
"./$.collection-to-json": 12,
"./$.def": 17
},
],
171: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.object-to-array")(!0);
n(n.S, "Object", {
entries: function (e) {
return r(e);
},
});
},
{
"./$.def": 17,
"./$.object-to-array": 52
},
],
172: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.def"),
o = e("./$.own-keys"),
a = e("./$.to-iobject"),
s = e("./$.property-desc");
r(r.S, "Object", {
getOwnPropertyDescriptors: function (e) {
for (var t, i, r = a(e), l = n.setDesc, c = n.getDesc, u = o(r), h = {}, d = 0; u.length > d;)(i = c(r, (t = u[d++]))), t in h ? l(h, t, s(0, i)) : (h[t] = i);
return h;
},
});
},
{
"./$": 45,
"./$.def": 17,
"./$.own-keys": 53,
"./$.property-desc": 56,
"./$.to-iobject": 75
},
],
173: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.object-to-array")(!1);
n(n.S, "Object", {
values: function (e) {
return r(e);
},
});
},
{
"./$.def": 17,
"./$.object-to-array": 52
},
],
174: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.replacer")(/[\^$*+?.()|[]{}]/g, "\$&");
n(n.S, "RegExp", {
escape: function (e) {
return r(e);
},
});
},
{
"./$.def": 17,
"./$.replacer": 58
},
],
175: [
function (e, t, i) {
var n = e("./$.def");
n(n.P, "Set", {
toJSON: e("./$.collection-to-json")("Set")
});
},
{
"./$.collection-to-json": 12,
"./$.def": 17
},
],
176: [
function (e, t, i) {
"use strict";
var n = e("./$.def"),
r = e("./$.string-at")(!0);
n(n.P, "String", {
at: function (e) {
return r(this, e);
},
});
},
{
"./$.def": 17,
"./$.string-at": 65
},
],
177: [
function (e, t, i) {
"use strict";
var n = e("./$.def"),
r = e("./$.string-pad");
n(n.P, "String", {
padLeft: function (e) {
return r(this, e, arguments[1], !0);
},
});
},
{
"./$.def": 17,
"./$.string-pad": 67
},
],
178: [
function (e, t, i) {
"use strict";
var n = e("./$.def"),
r = e("./$.string-pad");
n(n.P, "String", {
padRight: function (e) {
return r(this, e, arguments[1], !1);
},
});
},
{
"./$.def": 17,
"./$.string-pad": 67
},
],
179: [
function (e, t, i) {
"use strict";
e("./$.string-trim")("trimLeft", function (e) {
return function () {
return e(this, 1);
};
});
},
{
"./$.string-trim": 69
},
],
180: [
function (e, t, i) {
"use strict";
e("./$.string-trim")("trimRight", function (e) {
return function () {
return e(this, 2);
};
});
},
{
"./$.string-trim": 69
},
],
181: [
function (e, t, i) {
var n = e("./$"),
r = e("./$.def"),
o = e("./$.core").Array || Array,
a = {},
s = function (t, i) {
n.each.call(t.split(","), function (t) {
void 0 == i && t in o ? (a[t] = o[t]) : t in [] && (a[t] = e("./$.ctx")(Function.call, [][t], i));
});
};
s("pop,reverse,shift,keys,values,entries", 1),
s("indexOf,every,some,forEach,map,filter,find,findIndex,includes", 3),
s("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),
r(r.S, "Array", a);
},
{
"./$": 45,
"./$.core": 15,
"./$.ctx": 16,
"./$.def": 17
},
],
182: [
function (e, t, i) {
e("./es6.array.iterator");
var n = e("./$.global"),
r = e("./$.hide"),
o = e("./$.iterators"),
a = e("./$.wks")("iterator"),
s = n.NodeList,
l = n.HTMLCollection,
c = s && s.prototype,
u = l && l.prototype,
h = (o.NodeList = o.HTMLCollection = o.Array);
!s || a in c || r(c, a, h), !l || a in u || r(u, a, h);
},
{
"./$.global": 28,
"./$.hide": 30,
"./$.iterators": 44,
"./$.wks": 80,
"./es6.array.iterator": 88
},
],
183: [
function (e, t, i) {
var n = e("./$.def"),
r = e("./$.task");
n(n.G + n.B, {
setImmediate: r.set,
clearImmediate: r.clear
});
},
{
"./$.def": 17,
"./$.task": 72
},
],
184: [
function (e, t, i) {
var n = e("./$.global"),
r = e("./$.def"),
o = e("./$.invoke"),
a = e("./$.partial"),
s = n.navigator,
l = !!s && /MSIE ../.test(s.userAgent),
c = function (e) {
return l ?
function (t, i) {
return e(o(a, [].slice.call(arguments, 2), "function" == typeof t ? t : Function(t)), i);
} :
e;
};
r(r.G + r.B + r.F * l, {
setTimeout: c(n.setTimeout),
setInterval: c(n.setInterval)
});
},
{
"./$.def": 17,
"./$.global": 28,
"./$.invoke": 32,
"./$.partial": 54
},
],
185: [
function (e, t, i) {
e("./modules/es5"),
e("./modules/es6.symbol"),
e("./modules/es6.object.assign"),
e("./modules/es6.object.is"),
e("./modules/es6.object.set-prototype-of"),
e("./modules/es6.object.to-string"),
e("./modules/es6.object.freeze"),
e("./modules/es6.object.seal"),
e("./modules/es6.object.prevent-extensions"),
e("./modules/es6.object.is-frozen"),
e("./modules/es6.object.is-sealed"),
e("./modules/es6.object.is-extensible"),
e("./modules/es6.object.get-own-property-descriptor"),
e("./modules/es6.object.get-prototype-of"),
e("./modules/es6.object.keys"),
e("./modules/es6.object.get-own-property-names"),
e("./modules/es6.function.name"),
e("./modules/es6.function.has-instance"),
e("./modules/es6.number.constructor"),
e("./modules/es6.number.epsilon"),
e("./modules/es6.number.is-finite"),
e("./modules/es6.number.is-integer"),
e("./modules/es6.number.is-nan"),
e("./modules/es6.number.is-safe-integer"),
e("./modules/es6.number.max-safe-integer"),
e("./modules/es6.number.min-safe-integer"),
e("./modules/es6.number.parse-float"),
e("./modules/es6.number.parse-int"),
e("./modules/es6.math.acosh"),
e("./modules/es6.math.asinh"),
e("./modules/es6.math.atanh"),
e("./modules/es6.math.cbrt"),
e("./modules/es6.math.clz32"),
e("./modules/es6.math.cosh"),
e("./modules/es6.math.expm1"),
e("./modules/es6.math.fround"),
e("./modules/es6.math.hypot"),
e("./modules/es6.math.imul"),
e("./modules/es6.math.log10"),
e("./modules/es6.math.log1p"),
e("./modules/es6.math.log2"),
e("./modules/es6.math.sign"),
e("./modules/es6.math.sinh"),
e("./modules/es6.math.tanh"),
e("./modules/es6.math.trunc"),
e("./modules/es6.string.from-code-point"),
e("./modules/es6.string.raw"),
e("./modules/es6.string.trim"),
e("./modules/es6.string.iterator"),
e("./modules/es6.string.code-point-at"),
e("./modules/es6.string.ends-with"),
e("./modules/es6.string.includes"),
e("./modules/es6.string.repeat"),
e("./modules/es6.string.starts-with"),
e("./modules/es6.array.from"),
e("./modules/es6.array.of"),
e("./modules/es6.array.iterator"),
e("./modules/es6.array.species"),
e("./modules/es6.array.copy-within"),
e("./modules/es6.array.fill"),
e("./modules/es6.array.find"),
e("./modules/es6.array.find-index"),
e("./modules/es6.regexp.constructor"),
e("./modules/es6.regexp.flags"),
e("./modules/es6.regexp.match"),
e("./modules/es6.regexp.replace"),
e("./modules/es6.regexp.search"),
e("./modules/es6.regexp.split"),
e("./modules/es6.promise"),
e("./modules/es6.map"),
e("./modules/es6.set"),
e("./modules/es6.weak-map"),
e("./modules/es6.weak-set"),
e("./modules/es6.reflect.apply"),
e("./modules/es6.reflect.construct"),
e("./modules/es6.reflect.define-property"),
e("./modules/es6.reflect.delete-property"),
e("./modules/es6.reflect.enumerate"),
e("./modules/es6.reflect.get"),
e("./modules/es6.reflect.get-own-property-descriptor"),
e("./modules/es6.reflect.get-prototype-of"),
e("./modules/es6.reflect.has"),
e("./modules/es6.reflect.is-extensible"),
e("./modules/es6.reflect.own-keys"),
e("./modules/es6.reflect.prevent-extensions"),
e("./modules/es6.reflect.set"),
e("./modules/es6.reflect.set-prototype-of"),
e("./modules/es7.array.includes"),
e("./modules/es7.string.at"),
e("./modules/es7.string.pad-left"),
e("./modules/es7.string.pad-right"),
e("./modules/es7.string.trim-left"),
e("./modules/es7.string.trim-right"),
e("./modules/es7.regexp.escape"),
e("./modules/es7.object.get-own-property-descriptors"),
e("./modules/es7.object.values"),
e("./modules/es7.object.entries"),
e("./modules/es7.map.to-json"),
e("./modules/es7.set.to-json"),
e("./modules/js.array.statics"),
e("./modules/web.timers"),
e("./modules/web.immediate"),
e("./modules/web.dom.iterable"),
(t.exports = e("./modules/$.core"));
},
{
"./modules/$.core": 15,
"./modules/es5": 82,
"./modules/es6.array.copy-within": 83,
"./modules/es6.array.fill": 84,
"./modules/es6.array.find": 86,
"./modules/es6.array.find-index": 85,
"./modules/es6.array.from": 87,
"./modules/es6.array.iterator": 88,
"./modules/es6.array.of": 89,
"./modules/es6.array.species": 90,
"./modules/es6.function.has-instance": 91,
"./modules/es6.function.name": 92,
"./modules/es6.map": 93,
"./modules/es6.math.acosh": 94,
"./modules/es6.math.asinh": 95,
"./modules/es6.math.atanh": 96,
"./modules/es6.math.cbrt": 97,
"./modules/es6.math.clz32": 98,
"./modules/es6.math.cosh": 99,
"./modules/es6.math.expm1": 100,
"./modules/es6.math.fround": 101,
"./modules/es6.math.hypot": 102,
"./modules/es6.math.imul": 103,
"./modules/es6.math.log10": 104,
"./modules/es6.math.log1p": 105,
"./modules/es6.math.log2": 106,
"./modules/es6.math.sign": 107,
"./modules/es6.math.sinh": 108,
"./modules/es6.math.tanh": 109,
"./modules/es6.math.trunc": 110,
"./modules/es6.number.constructor": 111,
"./modules/es6.number.epsilon": 112,
"./modules/es6.number.is-finite": 113,
"./modules/es6.number.is-integer": 114,
"./modules/es6.number.is-nan": 115,
"./modules/es6.number.is-safe-integer": 116,
"./modules/es6.number.max-safe-integer": 117,
"./modules/es6.number.min-safe-integer": 118,
"./modules/es6.number.parse-float": 119,
"./modules/es6.number.parse-int": 120,
"./modules/es6.object.assign": 121,
"./modules/es6.object.freeze": 122,
"./modules/es6.object.get-own-property-descriptor": 123,
"./modules/es6.object.get-own-property-names": 124,
"./modules/es6.object.get-prototype-of": 125,
"./modules/es6.object.is": 129,
"./modules/es6.object.is-extensible": 126,
"./modules/es6.object.is-frozen": 127,
"./modules/es6.object.is-sealed": 128,
"./modules/es6.object.keys": 130,
"./modules/es6.object.prevent-extensions": 131,
"./modules/es6.object.seal": 132,
"./modules/es6.object.set-prototype-of": 133,
"./modules/es6.object.to-string": 134,
"./modules/es6.promise": 135,
"./modules/es6.reflect.apply": 136,
"./modules/es6.reflect.construct": 137,
"./modules/es6.reflect.define-property": 138,
"./modules/es6.reflect.delete-property": 139,
"./modules/es6.reflect.enumerate": 140,
"./modules/es6.reflect.get": 143,
"./modules/es6.reflect.get-own-property-descriptor": 141,
"./modules/es6.reflect.get-prototype-of": 142,
"./modules/es6.reflect.has": 144,
"./modules/es6.reflect.is-extensible": 145,
"./modules/es6.reflect.own-keys": 146,
"./modules/es6.reflect.prevent-extensions": 147,
"./modules/es6.reflect.set": 149,
"./modules/es6.reflect.set-prototype-of": 148,
"./modules/es6.regexp.constructor": 150,
"./modules/es6.regexp.flags": 151,
"./modules/es6.regexp.match": 152,
"./modules/es6.regexp.replace": 153,
"./modules/es6.regexp.search": 154,
"./modules/es6.regexp.split": 155,
"./modules/es6.set": 156,
"./modules/es6.string.code-point-at": 157,
"./modules/es6.string.ends-with": 158,
"./modules/es6.string.from-code-point": 159,
"./modules/es6.string.includes": 160,
"./modules/es6.string.iterator": 161,
"./modules/es6.string.raw": 162,
"./modules/es6.string.repeat": 163,
"./modules/es6.string.starts-with": 164,
"./modules/es6.string.trim": 165,
"./modules/es6.symbol": 166,
"./modules/es6.weak-map": 167,
"./modules/es6.weak-set": 168,
"./modules/es7.array.includes": 169,
"./modules/es7.map.to-json": 170,
"./modules/es7.object.entries": 171,
"./modules/es7.object.get-own-property-descriptors": 172,
"./modules/es7.object.values": 173,
"./modules/es7.regexp.escape": 174,
"./modules/es7.set.to-json": 175,
"./modules/es7.string.at": 176,
"./modules/es7.string.pad-left": 177,
"./modules/es7.string.pad-right": 178,
"./modules/es7.string.trim-left": 179,
"./modules/es7.string.trim-right": 180,
"./modules/js.array.statics": 181,
"./modules/web.dom.iterable": 182,
"./modules/web.immediate": 183,
"./modules/web.timers": 184,
},
],
186: [
function (e, t, i) {
(function (e, i) {
!(function (i) {
"use strict";
function n(e, t, i, n) {
var r = Object.create((t || o).prototype);
return (r._invoke = h(e, i || null, new p(n || []))), r;
}
function r(e, t, i) {
try {
return {
type: "normal",
arg: e.call(t, i)
};
} catch (n) {
return {
type: "throw",
arg: n
};
}
}
function o() {}
function a() {}
function s() {}
function l(e) {
["next", "throw", "return"].forEach(function (t) {
e[t] = function (e) {
return this._invoke(t, e);
};
});
}
function c(e) {
this.arg = e;
}
function u(t) {
function i(e, i) {
var n = t[e](i),
r = n.value;
return r instanceof c ?
Promise.resolve(r.arg).then(o, a) :
Promise.resolve(r).then(function (e) {
return (n.value = e), n;
});
}
function n(e, t) {
var n = r ?
r.then(function () {
return i(e, t);
}) :
new Promise(function (n) {
n(i(e, t));
});
return (r = n["catch"](function (e) {})), n;
}
"object" == typeof e && e.domain && (i = e.domain.bind(i));
var r,
o = i.bind(t, "next"),
a = i.bind(t, "throw");
i.bind(t, "return");
this._invoke = n;
}
function h(e, t, i) {
var n = w;
return function (o, a) {
if (n === T) throw new Error("Generator is already running");
if (n === S) {
if ("throw" === o) throw a;
return v();
}
for (;;) {
var s = i.delegate;
if (s) {
if ("return" === o || ("throw" === o && s.iterator[o] === g)) {
i.delegate = null;
var l = s.iterator["return"];
if (l) {
var c = r(l, s.iterator, a);
if ("throw" === c.type) {
(o = "throw"), (a = c.arg);
continue;
}
}
if ("return" === o) continue;
}
var c = r(s.iterator[o], s.iterator, a);
if ("throw" === c.type) {
(i.delegate = null), (o = "throw"), (a = c.arg);
continue;
}
(o = "next"), (a = g);
var u = c.arg;
if (!u.done) return (n = M), u;
(i[s.resultName] = u.value), (i.next = s.nextLoc), (i.delegate = null);
}
if ("next" === o) n === M ? (i.sent = a) : (i.sent = g);
else if ("throw" === o) {
if (n === w) throw ((n = S), a);
i.dispatchException(a) && ((o = "next"), (a = g));
} else "return" === o && i.abrupt("return", a);
n = T;
var c = r(e, t, i);
if ("normal" === c.type) {
n = i.done ? S : M;
var u = {
value: c.arg,
done: i.done
};
if (c.arg !== E) return u;
i.delegate && "next" === o && (a = g);
} else "throw" === c.type && ((n = S), (o = "throw"), (a = c.arg));
}
};
}
function d(e) {
var t = {
tryLoc: e[0]
};
1 in e && (t.catchLoc = e[1]), 2 in e && ((t.finallyLoc = e[2]), (t.afterLoc = e[3])), this.tryEntries.push(t);
}
function f(e) {
var t = e.completion || {};
(t.type = "normal"), delete t.arg, (e.completion = t);
}
function p(e) {
(this.tryEntries = [{
tryLoc: "root"
}]), e.forEach(d, this), this.reset(!0);
}
function m(e) {
if (e) {
var t = e[_];
if (t) return t.call(e);
if ("function" == typeof e.next) return e;
if (!isNaN(e.length)) {
var i = -1,
n = function r() {
for (; ++i < e.length;)
if (y.call(e, i)) return (r.value = e[i]), (r.done = !1), r;
return (r.value = g), (r.done = !0), r;
};
return (n.next = n);
}
}
return {
next: v
};
}
function v() {
return {
value: g,
done: !0
};
}
var g,
y = Object.prototype.hasOwnProperty,
_ = ("function" == typeof Symbol && Symbol.iterator) || "@@iterator",
b = "object" == typeof t,
x = i.regeneratorRuntime;
if (x) return void(b && (t.exports = x));
(x = i.regeneratorRuntime = b ? t.exports : {}), (x.wrap = n);
var w = "suspendedStart",
M = "suspendedYield",
T = "executing",
S = "completed",
E = {},
A = (s.prototype = o.prototype);
(a.prototype = A.constructor = s),
(s.constructor = a),
(a.displayName = "GeneratorFunction"),
(x.isGeneratorFunction = function (e) {
var t = "function" == typeof e && e.constructor;
return t ? t === a || "GeneratorFunction" === (t.displayName || t.name) : !1;
}),
(x.mark = function (e) {
return (e.__proto__ = s), (e.prototype = Object.create(A)), e;
}),
(x.awrap = function (e) {
return new c(e);
}),
l(u.prototype),
(x.async = function (e, t, i, r) {
var o = new u(n(e, t, i, r));
return x.isGeneratorFunction(t) ?
o :
o.next().then(function (e) {
return e.done ? e.value : o.next();
});
}),
l(A),
(A[_] = function () {
return this;
}),
(A.toString = function () {
return "[object Generator]";
}),
(x.keys = function (e) {
var t = [];
for (var i in e) t.push(i);
return (
t.reverse(),
function n() {
for (; t.length;) {
var i = t.pop();
if (i in e) return (n.value = i), (n.done = !1), n;
}
return (n.done = !0), n;
}
);
}),
(x.values = m),
(p.prototype = {
constructor: p,
reset: function (e) {
if (((this.prev = 0), (this.next = 0), (this.sent = g), (this.done = !1), (this.delegate = null), this.tryEntries.forEach(f), !e))
for (var t in this) "t" === t.charAt(0) && y.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = g);
},
stop: function () {
this.done = !0;
var e = this.tryEntries[0],
t = e.completion;
if ("throw" === t.type) throw t.arg;
return this.rval;
},
dispatchException: function (e) {
function t(t, n) {
return (o.type = "throw"), (o.arg = e), (i.next = t), !!n;
}
if (this.done) throw e;
for (var i = this, n = this.tryEntries.length - 1; n >= 0; --n) {
var r = this.tryEntries[n],
o = r.completion;
if ("root" === r.tryLoc) return t("end");
if (r.tryLoc <= this.prev) {
var a = y.call(r, "catchLoc"),
s = y.call(r, "finallyLoc");
if (a && s) {
if (this.prev < r.catchLoc) return t(r.catchLoc, !0);
if (this.prev < r.finallyLoc) return t(r.finallyLoc);
} else if (a) {
if (this.prev < r.catchLoc) return t(r.catchLoc, !0);
} else {
if (!s) throw new Error("try statement without catch or finally");
if (this.prev < r.finallyLoc) return t(r.finallyLoc);
}
}
}
},
abrupt: function (e, t) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var n = this.tryEntries[i];
if (n.tryLoc <= this.prev && y.call(n, "finallyLoc") && this.prev < n.finallyLoc) {
var r = n;
break;
}
}
r && ("break" === e || "continue" === e) && r.tryLoc <= t && t <= r.finallyLoc && (r = null);
var o = r ? r.completion : {};
return (o.type = e), (o.arg = t), r ? (this.next = r.finallyLoc) : this.complete(o), E;
},
complete: function (e, t) {
if ("throw" === e.type) throw e.arg;
"break" === e.type || "continue" === e.type ? (this.next = e.arg) : "return" === e.type ? ((this.rval = e.arg), (this.next = "end")) : "normal" === e.type && t && (this.next = t);
},
finish: function (e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var i = this.tryEntries[t];
if (i.finallyLoc === e) return this.complete(i.completion, i.afterLoc), f(i), E;
}
},
catch: function (e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var i = this.tryEntries[t];
if (i.tryLoc === e) {
var n = i.completion;
if ("throw" === n.type) {
var r = n.arg;
f(i);
}
return r;
}
}
throw new Error("illegal catch attempt");
},
delegateYield: function (e, t, i) {
return (this.delegate = {
iterator: m(e),
resultName: t,
nextLoc: i
}), E;
},
});
})("object" == typeof i ? i : "object" == typeof window ? window : "object" == typeof self ? self : this);
}.call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}));
},
{
_process: 189
},
],
187: [
function (e, t, i) {
t.exports = e("./lib/polyfill");
},
{
"./lib/polyfill": 1
},
],
188: [
function (e, t, i) {
function n() {
(this._events = this._events || {}), (this._maxListeners = this._maxListeners || void 0);
}
function r(e) {
return "function" == typeof e;
}
function o(e) {
return "number" == typeof e;
}
function a(e) {
return "object" == typeof e && null !== e;
}
function s(e) {
return void 0 === e;
}
(t.exports = n),
(n.EventEmitter = n),
(n.prototype._events = void 0),
(n.prototype._maxListeners = void 0),
(n.defaultMaxListeners = 10),
(n.prototype.setMaxListeners = function (e) {
if (!o(e) || 0 > e || isNaN(e)) throw TypeError("n must be a positive number");
return (this._maxListeners = e), this;
}),
(n.prototype.emit = function (e) {
var t, i, n, o, l, c;
if ((this._events || (this._events = {}), "error" === e && (!this._events.error || (a(this._events.error) && !this._events.error.length)))) {
if (((t = arguments[1]), t instanceof Error)) throw t;
throw TypeError('Uncaught, unspecified "error" event.');
}
if (((i = this._events[e]), s(i))) return !1;
if (r(i))
switch (arguments.length) {
case 1:
i.call(this);
break;
case 2:
i.call(this, arguments[1]);
break;
case 3:
i.call(this, arguments[1], arguments[2]);
break;
default:
for (n = arguments.length, o = new Array(n - 1), l = 1; n > l; l++) o[l - 1] = arguments[l];
i.apply(this, o);
}
else if (a(i)) {
for (n = arguments.length, o = new Array(n - 1), l = 1; n > l; l++) o[l - 1] = arguments[l];
for (c = i.slice(), n = c.length, l = 0; n > l; l++) c[l].apply(this, o);
}
return !0;
}),
(n.prototype.addListener = function (e, t) {
var i;
if (!r(t)) throw TypeError("listener must be a function");
if (
(this._events || (this._events = {}),
this._events.newListener && this.emit("newListener", e, r(t.listener) ? t.listener : t),
this._events[e] ? (a(this._events[e]) ? this._events[e].push(t) : (this._events[e] = [this._events[e], t])) : (this._events[e] = t),
a(this._events[e]) && !this._events[e].warned)
) {
var i;
(i = s(this._maxListeners) ? n.defaultMaxListeners : this._maxListeners),
i &&
i > 0 &&
this._events[e].length > i &&
((this._events[e].warned = !0),
console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", this._events[e].length),
"function" == typeof console.trace && console.trace());
}
return this;
}),
(n.prototype.on = n.prototype.addListener),
(n.prototype.once = function (e, t) {
function i() {
this.removeListener(e, i), n || ((n = !0), t.apply(this, arguments));
}
if (!r(t)) throw TypeError("listener must be a function");
var n = !1;
return (i.listener = t), this.on(e, i), this;
}),
(n.prototype.removeListener = function (e, t) {
var i, n, o, s;
if (!r(t)) throw TypeError("listener must be a function");
if (!this._events || !this._events[e]) return this;
if (((i = this._events[e]), (o = i.length), (n = -1), i === t || (r(i.listener) && i.listener === t))) delete this._events[e], this._events.removeListener && this.emit("removeListener", e, t);
else if (a(i)) {
for (s = o; s-- > 0;)
if (i[s] === t || (i[s].listener && i[s].listener === t)) {
n = s;
break;
}
if (0 > n) return this;
1 === i.length ? ((i.length = 0), delete this._events[e]) : i.splice(n, 1), this._events.removeListener && this.emit("removeListener", e, t);
}
return this;
}),
(n.prototype.removeAllListeners = function (e) {
var t, i;
if (!this._events) return this;
if (!this._events.removeListener) return 0 === arguments.length ? (this._events = {}) : this._events[e] && delete this._events[e], this;
if (0 === arguments.length) {
for (t in this._events) "removeListener" !== t && this.removeAllListeners(t);
return this.removeAllListeners("removeListener"), (this._events = {}), this;
}
if (((i = this._events[e]), r(i))) this.removeListener(e, i);
else
for (; i.length;) this.removeListener(e, i[i.length - 1]);
return delete this._events[e], this;
}),
(n.prototype.listeners = function (e) {
var t;
return (t = this._events && this._events[e] ? (r(this._events[e]) ? [this._events[e]] : this._events[e].slice()) : []);
}),
(n.listenerCount = function (e, t) {
var i;
return (i = e._events && e._events[t] ? (r(e._events[t]) ? 1 : e._events[t].length) : 0);
});
},
{},
],
189: [
function (e, t, i) {
function n() {
(u = !1), s.length ? (c = s.concat(c)) : (h = -1), c.length && r();
}
function r() {
if (!u) {
var e = setTimeout(n);
u = !0;
for (var t = c.length; t;) {
for (s = c, c = []; ++h < t;) s && s[h].run();
(h = -1), (t = c.length);
}
(s = null), (u = !1), clearTimeout(e);
}
}
function o(e, t) {
(this.fun = e), (this.array = t);
}
function a() {}
var s,
l = (t.exports = {}),
c = [],
u = !1,
h = -1;
(l.nextTick = function (e) {
var t = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
c.push(new o(e, t)), 1 !== c.length || u || setTimeout(r, 0);
}),
(o.prototype.run = function () {
this.fun.apply(null, this.array);
}),
(l.title = "browser"),
(l.browser = !0),
(l.env = {}),
(l.argv = []),
(l.version = ""),
(l.versions = {}),
(l.on = a),
(l.addListener = a),
(l.once = a),
(l.off = a),
(l.removeListener = a),
(l.removeAllListeners = a),
(l.emit = a),
(l.binding = function (e) {
throw new Error("process.binding is not supported");
}),
(l.cwd = function () {
return "/";
}),
(l.chdir = function (e) {
throw new Error("process.chdir is not supported");
}),
(l.umask = function () {
return 0;
});
},
{},
],
190: [
function (e, t, i) {
(t.exports = e("./vendor/dat.gui")), (t.exports.color = e("./vendor/dat.color"));
},
{
"./vendor/dat.color": 191,
"./vendor/dat.gui": 192
},
],
191: [
function (e, t, i) {
var n = (t.exports = n || {});
(n.color = n.color || {}),
(n.utils = n.utils || {}),
(n.utils.common = (function () {
var e = Array.prototype.forEach,
t = Array.prototype.slice;
return {
BREAK: {},
extend: function (e) {
return (
this.each(
t.call(arguments, 1),
function (t) {
for (var i in t) this.isUndefined(t[i]) || (e[i] = t[i]);
},
this
),
e
);
},
defaults: function (e) {
return (
this.each(
t.call(arguments, 1),
function (t) {
for (var i in t) this.isUndefined(e[i]) && (e[i] = t[i]);
},
this
),
e
);
},
compose: function () {
var e = t.call(arguments);
return function () {
for (var i = t.call(arguments), n = e.length - 1; n >= 0; n--) i = [e[n].apply(this, i)];
return i[0];
};
},
each: function (t, i, n) {
if (e && t.forEach === e) t.forEach(i, n);
else if (t.length === t.length + 0) {
for (var r = 0, o = t.length; o > r; r++)
if (r in t && i.call(n, t[r], r) === this.BREAK) return;
} else
for (var r in t)
if (i.call(n, t[r], r) === this.BREAK) return;
},
defer: function (e) {
setTimeout(e, 0);
},
toArray: function (e) {
return e.toArray ? e.toArray() : t.call(e);
},
isUndefined: function (e) {
return void 0 === e;
},
isNull: function (e) {
return null === e;
},
isNaN: function (e) {
return e !== e;
},
isArray: Array.isArray ||
function (e) {
return e.constructor === Array;
},
isObject: function (e) {
return e === Object(e);
},
isNumber: function (e) {
return e === e + 0;
},
isString: function (e) {
return e === e + "";
},
isBoolean: function (e) {
return e === !1 || e === !0;
},
isFunction: function (e) {
return "[object Function]" === Object.prototype.toString.call(e);
},
};
})()),
(n.color.toString = (function (e) {
return function (t) {
if (1 == t.a || e.isUndefined(t.a)) {
for (var i = t.hex.toString(16); i.length < 6;) i = "0" + i;
return "#" + i;
}
return "rgba(" + Math.round(t.r) + "," + Math.round(t.g) + "," + Math.round(t.b) + "," + t.a + ")";
};
})(n.utils.common)),
(n.Color = n.color.Color = (function (e, t, i, n) {
function r(e, t, i) {
Object.defineProperty(e, t, {
get: function () {
return "RGB" === this.__state.space ? this.__state[t] : (a(this, t, i), this.__state[t]);
},
set: function (e) {
"RGB" !== this.__state.space && (a(this, t, i), (this.__state.space = "RGB")), (this.__state[t] = e);
},
});
}
function o(e, t) {
Object.defineProperty(e, t, {
get: function () {
return "HSV" === this.__state.space ? this.__state[t] : (s(this), this.__state[t]);
},
set: function (e) {
"HSV" !== this.__state.space && (s(this), (this.__state.space = "HSV")), (this.__state[t] = e);
},
});
}
function a(e, i, r) {
if ("HEX" === e.__state.space) e.__state[i] = t.component_from_hex(e.__state.hex, r);
else {
if ("HSV" !== e.__state.space) throw "Corrupted color state";
n.extend(e.__state, t.hsv_to_rgb(e.__state.h, e.__state.s, e.__state.v));
}
}
function s(e) {
var i = t.rgb_to_hsv(e.r, e.g, e.b);
n.extend(e.__state, {
s: i.s,
v: i.v
}), n.isNaN(i.h) ? n.isUndefined(e.__state.h) && (e.__state.h = 0) : (e.__state.h = i.h);
}
var l = function () {
if (((this.__state = e.apply(this, arguments)), this.__state === !1)) throw "Failed to interpret color arguments";
this.__state.a = this.__state.a || 1;
};
return (
(l.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"]),
n.extend(l.prototype, {
toString: function () {
return i(this);
},
toOriginal: function () {
return this.__state.conversion.write(this);
},
}),
r(l.prototype, "r", 2),
r(l.prototype, "g", 1),
r(l.prototype, "b", 0),
o(l.prototype, "h"),
o(l.prototype, "s"),
o(l.prototype, "v"),
Object.defineProperty(l.prototype, "a", {
get: function () {
return this.__state.a;
},
set: function (e) {
this.__state.a = e;
},
}),
Object.defineProperty(l.prototype, "hex", {
get: function () {
return "HEX" !== !this.__state.space && (this.__state.hex = t.rgb_to_hex(this.r, this.g, this.b)), this.__state.hex;
},
set: function (e) {
(this.__state.space = "HEX"), (this.__state.hex = e);
},
}),
l
);
})(
(n.color.interpret = (function (e, t) {
var i,
n,
r = function () {
n = !1;
var e = arguments.length > 1 ? t.toArray(arguments) : arguments[0];
return (
t.each(o, function (r) {
return r.litmus(e) ?
(t.each(r.conversions, function (r, o) {
return (i = r.read(e)), n === !1 && i !== !1 ? ((n = i), (i.conversionName = o), (i.conversion = r), t.BREAK) : void 0;
}),
t.BREAK) :
void 0;
}),
n
);
},
o = [{
litmus: t.isString,
conversions: {
THREE_CHAR_HEX: {
read: function (e) {
var t = e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
return null === t ? !1 : {
space: "HEX",
hex: parseInt("0x" + t[1].toString() + t[1].toString() + t[2].toString() + t[2].toString() + t[3].toString() + t[3].toString())
};
},
write: e,
},
SIX_CHAR_HEX: {
read: function (e) {
var t = e.match(/^#([A-F0-9]{6})$/i);
return null === t ? !1 : {
space: "HEX",
hex: parseInt("0x" + t[1].toString())
};
},
write: e,
},
CSS_RGB: {
read: function (e) {
var t = e.match(/^rgb(s*(.+)s*,s*(.+)s*,s*(.+)s*)/);
return null === t ? !1 : {
space: "RGB",
r: parseFloat(t[1]),
g: parseFloat(t[2]),
b: parseFloat(t[3])
};
},
write: e,
},
CSS_RGBA: {
read: function (e) {
var t = e.match(/^rgba(s*(.+)s*,s*(.+)s*,s*(.+)s*,s*(.+)s*)/);
return null === t ? !1 : {
space: "RGB",
r: parseFloat(t[1]),
g: parseFloat(t[2]),
b: parseFloat(t[3]),
a: parseFloat(t[4])
};
},
write: e,
},
},
},
{
litmus: t.isNumber,
conversions: {
HEX: {
read: function (e) {
return {
space: "HEX",
hex: e,
conversionName: "HEX"
};
},
write: function (e) {
return e.hex;
},
},
},
},
{
litmus: t.isArray,
conversions: {
RGB_ARRAY: {
read: function (e) {
return 3 != e.length ? !1 : {
space: "RGB",
r: e[0],
g: e[1],
b: e[2]
};
},
write: function (e) {
return [e.r, e.g, e.b];
},
},
RGBA_ARRAY: {
read: function (e) {
return 4 != e.length ? !1 : {
space: "RGB",
r: e[0],
g: e[1],
b: e[2],
a: e[3]
};
},
write: function (e) {
return [e.r, e.g, e.b, e.a];
},
},
},
},
{
litmus: t.isObject,
conversions: {
RGBA_OBJ: {
read: function (e) {
return t.isNumber(e.r) && t.isNumber(e.g) && t.isNumber(e.b) && t.isNumber(e.a) ? {
space: "RGB",
r: e.r,
g: e.g,
b: e.b,
a: e.a
} : !1;
},
write: function (e) {
return {
r: e.r,
g: e.g,
b: e.b,
a: e.a
};
},
},
RGB_OBJ: {
read: function (e) {
return t.isNumber(e.r) && t.isNumber(e.g) && t.isNumber(e.b) ? {
space: "RGB",
r: e.r,
g: e.g,
b: e.b
} : !1;
},
write: function (e) {
return {
r: e.r,
g: e.g,
b: e.b
};
},
},
HSVA_OBJ: {
read: function (e) {
return t.isNumber(e.h) && t.isNumber(e.s) && t.isNumber(e.v) && t.isNumber(e.a) ? {
space: "HSV",
h: e.h,
s: e.s,
v: e.v,
a: e.a
} : !1;
},
write: function (e) {
return {
h: e.h,
s: e.s,
v: e.v,
a: e.a
};
},
},
HSV_OBJ: {
read: function (e) {
return t.isNumber(e.h) && t.isNumber(e.s) && t.isNumber(e.v) ? {
space: "HSV",
h: e.h,
s: e.s,
v: e.v
} : !1;
},
write: function (e) {
return {
h: e.h,
s: e.s,
v: e.v
};
},
},
},
},
];
return r;
})(n.color.toString, n.utils.common)),
(n.color.math = (function () {
var e;
return {
hsv_to_rgb: function (e, t, i) {
var n = Math.floor(e / 60) % 6,
r = e / 60 - Math.floor(e / 60),
o = i * (1 - t),
a = i * (1 - r * t),
s = i * (1 - (1 - r) * t),
l = [
[i, s, o],
[a, i, o],
[o, i, s],
[o, a, i],
[s, o, i],
[i, o, a],
][n];
return {
r: 255 * l[0],
g: 255 * l[1],
b: 255 * l[2]
};
},
rgb_to_hsv: function (e, t, i) {
var n,
r,
o = Math.min(e, t, i),
a = Math.max(e, t, i),
s = a - o;
return 0 == a ? {
h: NaN,
s: 0,
v: 0
} : ((r = s / a), (n = e == a ? (t - i) / s : t == a ? 2 + (i - e) / s : 4 + (e - t) / s), (n /= 6), 0 > n && (n += 1), {
h: 360 * n,
s: r,
v: a / 255
});
},
rgb_to_hex: function (e, t, i) {
var n = this.hex_with_component(0, 2, e);
return (n = this.hex_with_component(n, 1, t)), (n = this.hex_with_component(n, 0, i));
},
component_from_hex: function (e, t) {
return (e >> (8 * t)) & 255;
},
hex_with_component: function (t, i, n) {
return (n << (e = 8 * i)) | (t & ~(255 << e));
},
};
})()),
n.color.toString,
n.utils.common
));
},
{},
],
192: [
function (e, t, i) {
var n = (t.exports = n || {});
(n.gui = n.gui || {}),
(n.utils = n.utils || {}),
(n.controllers = n.controllers || {}),
(n.dom = n.dom || {}),
(n.color = n.color || {}),
(n.utils.css = (function () {
return {
load: function (e, t) {
t = t || document;
var i = t.createElement("link");
(i.type = "text/css"), (i.rel = "stylesheet"), (i.href = e), t.getElementsByTagName("head")[0].appendChild(i);
},
inject: function (e, t) {
t = t || document;
var i = document.createElement("style");
(i.type = "text/css"), (i.innerHTML = e), t.getElementsByTagName("head")[0].appendChild(i);
},
};
})()),
(n.utils.common = (function () {
var e = Array.prototype.forEach,
t = Array.prototype.slice;
return {
BREAK: {},
extend: function (e) {
return (
this.each(
t.call(arguments, 1),
function (t) {
for (var i in t) this.isUndefined(t[i]) || (e[i] = t[i]);
},
this
),
e
);
},
defaults: function (e) {
return (
this.each(
t.call(arguments, 1),
function (t) {
for (var i in t) this.isUndefined(e[i]) && (e[i] = t[i]);
},
this
),
e
);
},
compose: function () {
var e = t.call(arguments);
return function () {
for (var i = t.call(arguments), n = e.length - 1; n >= 0; n--) i = [e[n].apply(this, i)];
return i[0];
};
},
each: function (t, i, n) {
if (e && t.forEach === e) t.forEach(i, n);
else if (t.length === t.length + 0) {
for (var r = 0, o = t.length; o > r; r++)
if (r in t && i.call(n, t[r], r) === this.BREAK) return;
} else
for (var r in t)
if (i.call(n, t[r], r) === this.BREAK) return;
},
defer: function (e) {
setTimeout(e, 0);
},
toArray: function (e) {
return e.toArray ? e.toArray() : t.call(e);
},
isUndefined: function (e) {
return void 0 === e;
},
isNull: function (e) {
return null === e;
},
isNaN: function (e) {
return e !== e;
},
isArray: Array.isArray ||
function (e) {
return e.constructor === Array;
},
isObject: function (e) {
return e === Object(e);
},
isNumber: function (e) {
return e === e + 0;
},
isString: function (e) {
return e === e + "";
},
isBoolean: function (e) {
return e === !1 || e === !0;
},
isFunction: function (e) {
return "[object Function]" === Object.prototype.toString.call(e);
},
};
})()),
(n.controllers.Controller = (function (e) {
var t = function (e, t) {
(this.initialValue = e[t]), (this.domElement = document.createElement("div")), (this.object = e), (this.property = t), (this.__onChange = void 0), (this.__onFinishChange = void 0);
};
return (
e.extend(t.prototype, {
onChange: function (e) {
return (this.__onChange = e), this;
},
onFinishChange: function (e) {
return (this.__onFinishChange = e), this;
},
setValue: function (e) {
return (this.object[this.property] = e), this.__onChange && this.__onChange.call(this, e), this.updateDisplay(), this;
},
getValue: function () {
return this.object[this.property];
},
updateDisplay: function () {
return this;
},
isModified: function () {
return this.initialValue !== this.getValue();
},
}),
t
);
})(n.utils.common)),
(n.dom.dom = (function (e) {
function t(t) {
if ("0" === t || e.isUndefined(t)) return 0;
var i = t.match(r);
return e.isNull(i) ? 0 : parseFloat(i[1]);
}
var i = {
HTMLEvents: ["change"],
MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"],
KeyboardEvents: ["keydown"]
},
n = {};
e.each(i, function (t, i) {
e.each(t, function (e) {
n[e] = i;
});
});
var r = /(d+(.d+)?)px/,
o = {
makeSelectable: function (e, t) {
void 0 !== e &&
void 0 !== e.style &&
((e.onselectstart = t ?
function () {
return !1;
} :
function () {}),
(e.style.MozUserSelect = t ? "auto" : "none"),
(e.style.KhtmlUserSelect = t ? "auto" : "none"),
(e.unselectable = t ? "on" : "off"));
},
makeFullscreen: function (t, i, n) {
e.isUndefined(i) && (i = !0), e.isUndefined(n) && (n = !0), (t.style.position = "absolute"), i && ((t.style.left = 0), (t.style.right = 0)), n && ((t.style.top = 0), (t.style.bottom = 0));
},
fakeEvent: function (t, i, r, o) {
r = r || {};
var a = n[i];
if (!a) throw new Error("Event type " + i + " not supported.");
var s = document.createEvent(a);
switch (a) {
case "MouseEvents":
var l = r.x || r.clientX || 0,
c = r.y || r.clientY || 0;
s.initMouseEvent(i, r.bubbles || !1, r.cancelable || !0, window, r.clickCount || 1, 0, 0, l, c, !1, !1, !1, !1, 0, null);
break;
case "KeyboardEvents":
var u = s.initKeyboardEvent || s.initKeyEvent;
e.defaults(r, {
cancelable: !0,
ctrlKey: !1,
altKey: !1,
shiftKey: !1,
metaKey: !1,
keyCode: void 0,
charCode: void 0
}),
u(i, r.bubbles || !1, r.cancelable, window, r.ctrlKey, r.altKey, r.shiftKey, r.metaKey, r.keyCode, r.charCode);
break;
default:
s.initEvent(i, r.bubbles || !1, r.cancelable || !0);
}
e.defaults(s, o), t.dispatchEvent(s);
},
bind: function (e, t, i, n) {
return (n = n || !1), e.addEventListener ? e.addEventListener(t, i, n) : e.attachEvent && e.attachEvent("on" + t, i), o;
},
unbind: function (e, t, i, n) {
return (n = n || !1), e.removeEventListener ? e.removeEventListener(t, i, n) : e.detachEvent && e.detachEvent("on" + t, i), o;
},
addClass: function (e, t) {
if (void 0 === e.className) e.className = t;
else if (e.className !== t) {
var i = e.className.split(/ +/); -
1 == i.indexOf(t) && (i.push(t), (e.className = i.join(" ").replace(/^s+/, "").replace(/s+$/, "")));
}
return o;
},
removeClass: function (e, t) {
if (t)
if (void 0 === e.className);
else if (e.className === t) e.removeAttribute("class");
else {
var i = e.className.split(/ +/),
n = i.indexOf(t); -
1 != n && (i.splice(n, 1), (e.className = i.join(" ")));
} else e.className = void 0;
return o;
},
hasClass: function (e, t) {
return new RegExp("(?:^|\s+)" + t + "(?:\s+|$)").test(e.className) || !1;
},
getWidth: function (e) {
var i = getComputedStyle(e);
return t(i["border-left-width"]) + t(i["border-right-width"]) + t(i["padding-left"]) + t(i["padding-right"]) + t(i.width);
},
getHeight: function (e) {
var i = getComputedStyle(e);
return t(i["border-top-width"]) + t(i["border-bottom-width"]) + t(i["padding-top"]) + t(i["padding-bottom"]) + t(i.height);
},
getOffset: function (e) {
var t = {
left: 0,
top: 0
};
if (e.offsetParent)
do(t.left += e.offsetLeft), (t.top += e.offsetTop);
while ((e = e.offsetParent));
return t;
},
isActive: function (e) {
return e === document.activeElement && (e.type || e.href);
},
};
return o;
})(n.utils.common)),
(n.controllers.OptionController = (function (e, t, i) {
var n = function (e, r, o) {
n.superclass.call(this, e, r);
var a = this;
if (((this.__select = document.createElement("select")), i.isArray(o))) {
var s = {};
i.each(o, function (e) {
s[e] = e;
}),
(o = s);
}
i.each(o, function (e, t) {
var i = document.createElement("option");
(i.innerHTML = t), i.setAttribute("value", e), a.__select.appendChild(i);
}),
this.updateDisplay(),
t.bind(this.__select, "change", function () {
var e = this.options[this.selectedIndex].value;
a.setValue(e);
}),
this.domElement.appendChild(this.__select);
};
return (
(n.superclass = e),
i.extend(n.prototype, e.prototype, {
setValue: function (e) {
var t = n.superclass.prototype.setValue.call(this, e);
return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), t;
},
updateDisplay: function () {
return (this.__select.value = this.getValue()), n.superclass.prototype.updateDisplay.call(this);
},
}),
n
);
})(n.controllers.Controller, n.dom.dom, n.utils.common)),
(n.controllers.NumberController = (function (e, t) {
function i(e) {
return (e = e.toString()), e.indexOf(".") > -1 ? e.length - e.indexOf(".") - 1 : 0;
}
var n = function (e, r, o) {
n.superclass.call(this, e, r),
(o = o || {}),
(this.__min = o.min),
(this.__max = o.max),
(this.__step = o.step),
t.isUndefined(this.__step) ?
0 == this.initialValue ?
(this.__impliedStep = 1) :
(this.__impliedStep = Math.pow(10, Math.floor(Math.log(this.initialValue) / Math.LN10)) / 10) :
(this.__impliedStep = this.__step),
(this.__precision = i(this.__impliedStep));
};
return (
(n.superclass = e),
t.extend(n.prototype, e.prototype, {
setValue: function (e) {
return (
void 0 !== this.__min && e < this.__min ? (e = this.__min) : void 0 !== this.__max && e > this.__max && (e = this.__max),
void 0 !== this.__step && e % this.__step != 0 && (e = Math.round(e / this.__step) * this.__step),
n.superclass.prototype.setValue.call(this, e)
);
},
min: function (e) {
return (this.__min = e), this;
},
max: function (e) {
return (this.__max = e), this;
},
step: function (e) {
return (this.__step = e), this;
},
}),
n
);
})(n.controllers.Controller, n.utils.common)),
(n.controllers.NumberControllerBox = (function (e, t, i) {
function n(e, t) {
var i = Math.pow(10, t);
return Math.round(e * i) / i;
}
var r = function (e, n, o) {
function a() {
var e = parseFloat(d.__input.value);
i.isNaN(e) || d.setValue(e);
}
function s() {
a(), d.__onFinishChange && d.__onFinishChange.call(d, d.getValue());
}
function l(e) {
t.bind(window, "mousemove", c), t.bind(window, "mouseup", u), (h = e.clientY);
}
function c(e) {
var t = h - e.clientY;
d.setValue(d.getValue() + t * d.__impliedStep), (h = e.clientY);
}
function u() {
t.unbind(window, "mousemove", c), t.unbind(window, "mouseup", u);
}
(this.__truncationSuspended = !1), r.superclass.call(this, e, n, o);
var h,
d = this;
(this.__input = document.createElement("input")),
this.__input.setAttribute("type", "text"),
t.bind(this.__input, "change", a),
t.bind(this.__input, "blur", s),
t.bind(this.__input, "mousedown", l),
t.bind(this.__input, "keydown", function (e) {
13 === e.keyCode && ((d.__truncationSuspended = !0), this.blur(), (d.__truncationSuspended = !1));
}),
this.updateDisplay(),
this.domElement.appendChild(this.__input);
};
return (
(r.superclass = e),
i.extend(r.prototype, e.prototype, {
updateDisplay: function () {
return (this.__input.value = this.__truncationSuspended ? this.getValue() : n(this.getValue(), this.__precision)), r.superclass.prototype.updateDisplay.call(this);
},
}),
r
);
})(n.controllers.NumberController, n.dom.dom, n.utils.common)),
(n.controllers.NumberControllerSlider = (function (e, t, i, n, r) {
function o(e, t, i, n, r) {
return n + (r - n) * ((e - t) / (i - t));
}
var a = function (e, i, n, r, s) {
function l(e) {
t.bind(window, "mousemove", c), t.bind(window, "mouseup", u), c(e);
}
function c(e) {
e.preventDefault();
var i = t.getOffset(h.__background),
n = t.getWidth(h.__background);
return h.setValue(o(e.clientX, i.left, i.left + n, h.__min, h.__max)), !1;
}
function u() {
t.unbind(window, "mousemove", c), t.unbind(window, "mouseup", u), h.__onFinishChange && h.__onFinishChange.call(h, h.getValue());
}
a.superclass.call(this, e, i, {
min: n,
max: r,
step: s
});
var h = this;
(this.__background = document.createElement("div")),
(this.__foreground = document.createElement("div")),
t.bind(this.__background, "mousedown", l),
t.addClass(this.__background, "slider"),
t.addClass(this.__foreground, "slider-fg"),
this.updateDisplay(),
this.__background.appendChild(this.__foreground),
this.domElement.appendChild(this.__background);
};
return (
(a.superclass = e),
(a.useDefaultStyles = function () {
i.inject(r);
}),
n.extend(a.prototype, e.prototype, {
updateDisplay: function () {
var e = (this.getValue() - this.__min) / (this.__max - this.__min);
return (this.__foreground.style.width = 100 * e + "%"), a.superclass.prototype.updateDisplay.call(this);
},
}),
a
);
})(
n.controllers.NumberController,
n.dom.dom,
n.utils.css,
n.utils.common,
".slider {n box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);n height: 1em;n border-radius: 1em;n background-color: #eee;n padding: 0 0.5em;n overflow: hidden;n}nn.slider-fg {n padding: 1px 0 2px 0;n background-color: #aaa;n height: 1em;n margin-left: -0.5em;n padding-right: 0.5em;n border-radius: 1em 0 0 1em;n}nn.slider-fg:after {n display: inline-block;n border-radius: 1em;n background-color: #fff;n border: 1px solid #aaa;n content: '';n float: right;n margin-right: -1em;n margin-top: -1px;n height: 0.9em;n width: 0.9em;n}"
)),
(n.controllers.FunctionController = (function (e, t, i) {
var n = function (e, i, r) {
n.superclass.call(this, e, i);
var o = this;
(this.__button = document.createElement("div")),
(this.__button.innerHTML = void 0 === r ? "Fire" : r),
t.bind(this.__button, "click", function (e) {
return e.preventDefault(), o.fire(), !1;
}),
t.addClass(this.__button, "button"),
this.domElement.appendChild(this.__button);
};
return (
(n.superclass = e),
i.extend(n.prototype, e.prototype, {
fire: function () {
this.__onChange && this.__onChange.call(this), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.getValue().call(this.object);
},
}),
n
);
})(n.controllers.Controller, n.dom.dom, n.utils.common)),
(n.controllers.BooleanController = (function (e, t, i) {
var n = function (e, i) {
function r() {
o.setValue(!o.__prev);
}
n.superclass.call(this, e, i);
var o = this;
(this.__prev = this.getValue()),
(this.__checkbox = document.createElement("input")),
this.__checkbox.setAttribute("type", "checkbox"),
t.bind(this.__checkbox, "change", r, !1),
this.domElement.appendChild(this.__checkbox),
this.updateDisplay();
};
return (
(n.superclass = e),
i.extend(n.prototype, e.prototype, {
setValue: function (e) {
var t = n.superclass.prototype.setValue.call(this, e);
return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), (this.__prev = this.getValue()), t;
},
updateDisplay: function () {
return this.getValue() === !0 ? (this.__checkbox.setAttribute("checked", "checked"), (this.__checkbox.checked = !0)) : (this.__checkbox.checked = !1), n.superclass.prototype.updateDisplay.call(this);
},
}),
n
);
})(n.controllers.Controller, n.dom.dom, n.utils.common)),
(n.color.toString = (function (e) {
return function (t) {
if (1 == t.a || e.isUndefined(t.a)) {
for (var i = t.hex.toString(16); i.length < 6;) i = "0" + i;
return "#" + i;
}
return "rgba(" + Math.round(t.r) + "," + Math.round(t.g) + "," + Math.round(t.b) + "," + t.a + ")";
};
})(n.utils.common)),
(n.color.interpret = (function (e, t) {
var i,
n,
r = function () {
n = !1;
var e = arguments.length > 1 ? t.toArray(arguments) : arguments[0];
return (
t.each(o, function (r) {
return r.litmus(e) ?
(t.each(r.conversions, function (r, o) {
return (i = r.read(e)), n === !1 && i !== !1 ? ((n = i), (i.conversionName = o), (i.conversion = r), t.BREAK) : void 0;
}),
t.BREAK) :
void 0;
}),
n
);
},
o = [{
litmus: t.isString,
conversions: {
THREE_CHAR_HEX: {
read: function (e) {
var t = e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
return null === t ? !1 : {
space: "HEX",
hex: parseInt("0x" + t[1].toString() + t[1].toString() + t[2].toString() + t[2].toString() + t[3].toString() + t[3].toString())
};
},
write: e,
},
SIX_CHAR_HEX: {
read: function (e) {
var t = e.match(/^#([A-F0-9]{6})$/i);
return null === t ? !1 : {
space: "HEX",
hex: parseInt("0x" + t[1].toString())
};
},
write: e,
},
CSS_RGB: {
read: function (e) {
var t = e.match(/^rgb(s*(.+)s*,s*(.+)s*,s*(.+)s*)/);
return null === t ? !1 : {
space: "RGB",
r: parseFloat(t[1]),
g: parseFloat(t[2]),
b: parseFloat(t[3])
};
},
write: e,
},
CSS_RGBA: {
read: function (e) {
var t = e.match(/^rgba(s*(.+)s*,s*(.+)s*,s*(.+)s*,s*(.+)s*)/);
return null === t ? !1 : {
space: "RGB",
r: parseFloat(t[1]),
g: parseFloat(t[2]),
b: parseFloat(t[3]),
a: parseFloat(t[4])
};
},
write: e,
},
},
},
{
litmus: t.isNumber,
conversions: {
HEX: {
read: function (e) {
return {
space: "HEX",
hex: e,
conversionName: "HEX"
};
},
write: function (e) {
return e.hex;
},
},
},
},
{
litmus: t.isArray,
conversions: {
RGB_ARRAY: {
read: function (e) {
return 3 != e.length ? !1 : {
space: "RGB",
r: e[0],
g: e[1],
b: e[2]
};
},
write: function (e) {
return [e.r, e.g, e.b];
},
},
RGBA_ARRAY: {
read: function (e) {
return 4 != e.length ? !1 : {
space: "RGB",
r: e[0],
g: e[1],
b: e[2],
a: e[3]
};
},
write: function (e) {
return [e.r, e.g, e.b, e.a];
},
},
},
},
{
litmus: t.isObject,
conversions: {
RGBA_OBJ: {
read: function (e) {
return t.isNumber(e.r) && t.isNumber(e.g) && t.isNumber(e.b) && t.isNumber(e.a) ? {
space: "RGB",
r: e.r,
g: e.g,
b: e.b,
a: e.a
} : !1;
},
write: function (e) {
return {
r: e.r,
g: e.g,
b: e.b,
a: e.a
};
},
},
RGB_OBJ: {
read: function (e) {
return t.isNumber(e.r) && t.isNumber(e.g) && t.isNumber(e.b) ? {
space: "RGB",
r: e.r,
g: e.g,
b: e.b
} : !1;
},
write: function (e) {
return {
r: e.r,
g: e.g,
b: e.b
};
},
},
HSVA_OBJ: {
read: function (e) {
return t.isNumber(e.h) && t.isNumber(e.s) && t.isNumber(e.v) && t.isNumber(e.a) ? {
space: "HSV",
h: e.h,
s: e.s,
v: e.v,
a: e.a
} : !1;
},
write: function (e) {
return {
h: e.h,
s: e.s,
v: e.v,
a: e.a
};
},
},
HSV_OBJ: {
read: function (e) {
return t.isNumber(e.h) && t.isNumber(e.s) && t.isNumber(e.v) ? {
space: "HSV",
h: e.h,
s: e.s,
v: e.v
} : !1;
},
write: function (e) {
return {
h: e.h,
s: e.s,
v: e.v
};
},
},
},
},
];
return r;
})(n.color.toString, n.utils.common)),
(n.GUI = n.gui.GUI = (function (e, t, i, n, r, o, a, s, l, c, u, h, d, f, p) {
function m(e, t, i, o) {
if (void 0 === t[i]) throw new Error("Object " + t + ' has no property "' + i + '"');
var a;
if (o.color) a = new u(t, i);
else {
var s = [t, i].concat(o.factoryArgs);
a = n.apply(e, s);
}
o.before instanceof r && (o.before = o.before.__li), y(e, a), f.addClass(a.domElement, "c");
var l = document.createElement("span");
f.addClass(l, "property-name"), (l.innerHTML = a.property);
var c = document.createElement("div");
c.appendChild(l), c.appendChild(a.domElement);
var h = v(e, c, o.before);
return f.addClass(h, j.CLASS_CONTROLLER_ROW), f.addClass(h, typeof a.getValue()), g(e, h, a), e.__controllers.push(a), a;
}
function v(e, t, i) {
var n = document.createElement("li");
return t && n.appendChild(t), i ? e.__ul.insertBefore(n, params.before) : e.__ul.appendChild(n), e.onResize(), n;
}
function g(e, t, i) {
if (
((i.__li = t),
(i.__gui = e),
p.extend(i, {
options: function (t) {
return arguments.length > 1 ?
(i.remove(), m(e, i.object, i.property, {
before: i.__li.nextElementSibling,
factoryArgs: [p.toArray(arguments)]
})) :
p.isArray(t) || p.isObject(t) ?
(i.remove(), m(e, i.object, i.property, {
before: i.__li.nextElementSibling,
factoryArgs: [t]
})) :
void 0;
},
name: function (e) {
return (i.__li.firstElementChild.firstElementChild.innerHTML = e), i;
},
listen: function () {
return i.__gui.listen(i), i;
},
remove: function () {
return i.__gui.remove(i), i;
},
}),
i instanceof l)
) {
var n = new s(i.object, i.property, {
min: i.__min,
max: i.__max,
step: i.__step
});
p.each(["updateDisplay", "onChange", "onFinishChange"], function (e) {
var t = i[e],
r = n[e];
i[e] = n[e] = function () {
var e = Array.prototype.slice.call(arguments);
return t.apply(i, e), r.apply(n, e);
};
}),
f.addClass(t, "has-slider"),
i.domElement.insertBefore(n.domElement, i.domElement.firstElementChild);
} else if (i instanceof s) {
var r = function (t) {
return p.isNumber(i.__min) && p.isNumber(i.__max) ? (i.remove(), m(e, i.object, i.property, {
before: i.__li.nextElementSibling,
factoryArgs: [i.__min, i.__max, i.__step]
})) : t;
};
(i.min = p.compose(r, i.min)), (i.max = p.compose(r, i.max));
} else
i instanceof o ?
(f.bind(t, "click", function () {
f.fakeEvent(i.__checkbox, "click");
}),
f.bind(i.__checkbox, "click", function (e) {
e.stopPropagation();
})) :
i instanceof a ?
(f.bind(t, "click", function () {
f.fakeEvent(i.__button, "click");
}),
f.bind(t, "mouseover", function () {
f.addClass(i.__button, "hover");
}),
f.bind(t, "mouseout", function () {
f.removeClass(i.__button, "hover");
})) :
i instanceof u &&
(f.addClass(t, "color"),
(i.updateDisplay = p.compose(function (e) {
return (t.style.borderLeftColor = i.__color.toString()), e;
}, i.updateDisplay)),
i.updateDisplay());
i.setValue = p.compose(function (t) {
return e.getRoot().__preset_select && i.isModified() && E(e.getRoot(), !0), t;
}, i.setValue);
}
function y(e, t) {
var i = e.getRoot(),
n = i.__rememberedObjects.indexOf(t.object);
if (-1 != n) {
var r = i.__rememberedObjectIndecesToControllers[n];
if ((void 0 === r && ((r = {}), (i.__rememberedObjectIndecesToControllers[n] = r)), (r[t.property] = t), i.load && i.load.remembered)) {
var o,
a = i.load.remembered;
if (a[e.preset]) o = a[e.preset];
else {
if (!a[k]) return;
o = a[k];
}
if (o[n] && void 0 !== o[n][t.property]) {
var s = o[n][t.property];
(t.initialValue = s), t.setValue(s);
}
}
}
}
function _(e, t) {
return document.location.href + "." + t;
}
function b(e) {
function t() {
c.style.display = e.useLocalStorage ? "block" : "none";
}
var i = (e.__save_row = document.createElement("li"));
f.addClass(e.domElement, "has-save"), e.__ul.insertBefore(i, e.__ul.firstChild), f.addClass(i, "save-row");
var n = document.createElement("span");
(n.innerHTML = " "), f.addClass(n, "button gears");
var r = document.createElement("span");
(r.innerHTML = "Save"), f.addClass(r, "button"), f.addClass(r, "save");
var o = document.createElement("span");
(o.innerHTML = "New"), f.addClass(o, "button"), f.addClass(o, "save-as");
var a = document.createElement("span");
(a.innerHTML = "Revert"), f.addClass(a, "button"), f.addClass(a, "revert");
var s = (e.__preset_select = document.createElement("select"));
if (
(e.load && e.load.remembered ?
p.each(e.load.remembered, function (t, i) {
T(e, i, i == e.preset);
}) :
T(e, k, !1),
f.bind(s, "change", function () {
for (var t = 0; t < e.__preset_select.length; t++) e.__preset_select[t].innerHTML = e.__preset_select[t].value;
e.preset = this.value;
}),
i.appendChild(s),
i.appendChild(n),
i.appendChild(r),
i.appendChild(o),
i.appendChild(a),
D)
) {
var l = document.getElementById("dg-save-locally"),
c = document.getElementById("dg-local-explain");
l.style.display = "block";
var u = document.getElementById("dg-local-storage");
"true" === localStorage.getItem(_(e, "isLocal")) && u.setAttribute("checked", "checked"),
t(),
f.bind(u, "change", function () {
(e.useLocalStorage = !e.useLocalStorage), t();
});
}
var h = document.getElementById("dg-new-constructor");
f.bind(h, "keydown", function (e) {
!e.metaKey || (67 !== e.which && 67 != e.keyCode) || C.hide();
}),
f.bind(n, "click", function () {
(h.innerHTML = JSON.stringify(e.getSaveObject(), void 0, 2)), C.show(), h.focus(), h.select();
}),
f.bind(r, "click", function () {
e.save();
}),
f.bind(o, "click", function () {
var t = prompt("Enter a new preset name.");
t && e.saveAs(t);
}),
f.bind(a, "click", function () {
e.revert();
});
}
function x(e) {
function t(t) {
return t.preventDefault(), (r = t.clientX), f.addClass(e.__closeButton, j.CLASS_DRAG), f.bind(window, "mousemove", i), f.bind(window, "mouseup", n), !1;
}
function i(t) {
return t.preventDefault(), (e.width += r - t.clientX), e.onResize(), (r = t.clientX), !1;
}
function n() {
f.removeClass(e.__closeButton, j.CLASS_DRAG), f.unbind(window, "mousemove", i), f.unbind(window, "mouseup", n);
}
(e.__resize_handle = document.createElement("div")), p.extend(e.__resize_handle.style, {
width: "6px",
marginLeft: "-3px",
height: "200px",
cursor: "ew-resize",
position: "absolute"
});
var r;
f.bind(e.__resize_handle, "mousedown", t), f.bind(e.__closeButton, "mousedown", t), e.domElement.insertBefore(e.__resize_handle, e.domElement.firstElementChild);
}
function w(e, t) {
(e.domElement.style.width = t + "px"), e.__save_row && e.autoPlace && (e.__save_row.style.width = t + "px"), e.__closeButton && (e.__closeButton.style.width = t + "px");
}
function M(e, t) {
var i = {};
return (
p.each(e.__rememberedObjects, function (n, r) {
var o = {},
a = e.__rememberedObjectIndecesToControllers[r];
p.each(a, function (e, i) {
o[i] = t ? e.initialValue : e.getValue();
}),
(i[r] = o);
}),
i
);
}
function T(e, t, i) {
var n = document.createElement("option");
(n.innerHTML = t), (n.value = t), e.__preset_select.appendChild(n), i && (e.__preset_select.selectedIndex = e.__preset_select.length - 1);
}
function S(e) {
for (var t = 0; t < e.__preset_select.length; t++) e.__preset_select[t].value == e.preset && (e.__preset_select.selectedIndex = t);
}
function E(e, t) {
var i = e.__preset_select[e.__preset_select.selectedIndex];
t ? (i.innerHTML = i.value + "*") : (i.innerHTML = i.value);
}
function A(e) {
0 != e.length &&
h(function () {
A(e);
}),
p.each(e, function (e) {
e.updateDisplay();
});
}
e.inject(i);
var C,
P,
L = "dg",
R = 72,
O = 20,
k = "Default",
D = (function () {
try {
return "localStorage" in window && null !== window.localStorage;
} catch (e) {
return !1;
}
})(),
I = !0,
N = !1,
U = [],
j = function (e) {
function t() {
localStorage.setItem(_(n, "gui"), JSON.stringify(n.getSaveObject()));
}
function i() {
var e = n.getRoot();
(e.width += 1),
p.defer(function () {
e.width -= 1;
});
}
var n = this;
(this.domElement = document.createElement("div")),
(this.__ul = document.createElement("ul")),
this.domElement.appendChild(this.__ul),
f.addClass(this.domElement, L),
(this.__folders = {}),
(this.__controllers = []),
(this.__rememberedObjects = []),
(this.__rememberedObjectIndecesToControllers = []),
(this.__listening = []),
(e = e || {}),
(e = p.defaults(e, {
autoPlace: !0,
width: j.DEFAULT_WIDTH
})),
(e = p.defaults(e, {
resizable: e.autoPlace,
hideable: e.autoPlace
})),
p.isUndefined(e.load) ? (e.load = {
preset: k
}) : e.preset && (e.load.preset = e.preset),
p.isUndefined(e.parent) && e.hideable && U.push(this),
(e.resizable = p.isUndefined(e.parent) && e.resizable),
e.autoPlace && p.isUndefined(e.scrollable) && (e.scrollable = !0);
var r = D && "true" === localStorage.getItem(_(this, "isLocal"));
if (
(Object.defineProperties(this, {
parent: {
get: function () {
return e.parent;
},
},
scrollable: {
get: function () {
return e.scrollable;
},
},
autoPlace: {
get: function () {
return e.autoPlace;
},
},
preset: {
get: function () {
return n.parent ? n.getRoot().preset : e.load.preset;
},
set: function (t) {
n.parent ? (n.getRoot().preset = t) : (e.load.preset = t), S(this), n.revert();
},
},
width: {
get: function () {
return e.width;
},
set: function (t) {
(e.width = t), w(n, t);
},
},
name: {
get: function () {
return e.name;
},
set: function (t) {
(e.name = t), a && (a.innerHTML = e.name);
},
},
closed: {
get: function () {
return e.closed;
},
set: function (t) {
(e.closed = t),
e.closed ? f.addClass(n.__ul, j.CLASS_CLOSED) : f.removeClass(n.__ul, j.CLASS_CLOSED),
this.onResize(),
n.__closeButton && (n.__closeButton.innerHTML = t ? j.TEXT_OPEN : j.TEXT_CLOSED);
},
},
load: {
get: function () {
return e.load;
},
},
useLocalStorage: {
get: function () {
return r;
},
set: function (e) {
D && ((r = e), e ? f.bind(window, "unload", t) : f.unbind(window, "unload", t), localStorage.setItem(_(n, "isLocal"), e));
},
},
}),
p.isUndefined(e.parent))
) {
if (((e.closed = !1), f.addClass(this.domElement, j.CLASS_MAIN), f.makeSelectable(this.domElement, !1), D && r)) {
n.useLocalStorage = !0;
var o = localStorage.getItem(_(this, "gui"));
o && (e.load = JSON.parse(o));
}
(this.__closeButton = document.createElement("div")),
(this.__closeButton.innerHTML = j.TEXT_CLOSED),
f.addClass(this.__closeButton, j.CLASS_CLOSE_BUTTON),
this.domElement.appendChild(this.__closeButton),
f.bind(this.__closeButton, "click", function () {
n.closed = !n.closed;
});
} else {
void 0 === e.closed && (e.closed = !0);
var a = document.createTextNode(e.name);
f.addClass(a, "controller-name");
var s = v(n, a),
l = function (e) {
return e.preventDefault(), (n.closed = !n.closed), !1;
};
f.addClass(this.__ul, j.CLASS_CLOSED), f.addClass(s, "title"), f.bind(s, "click", l), e.closed || (this.closed = !1);
}
e.autoPlace &&
(p.isUndefined(e.parent) &&
(I && ((P = document.createElement("div")), f.addClass(P, L), f.addClass(P, j.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(P), (I = !1)),
P.appendChild(this.domElement),
f.addClass(this.domElement, j.CLASS_AUTO_PLACE)),
this.parent || w(n, e.width)),
f.bind(window, "resize", function () {
n.onResize();
}),
f.bind(this.__ul, "webkitTransitionEnd", function () {
n.onResize();
}),
f.bind(this.__ul, "transitionend", function () {
n.onResize();
}),
f.bind(this.__ul, "oTransitionEnd", function () {
n.onResize();
}),
this.onResize(),
e.resizable && x(this);
n.getRoot();
e.parent || i();
};
return (
(j.toggleHide = function () {
(N = !N),
p.each(U, function (e) {
(e.domElement.style.zIndex = N ? -999 : 999), (e.domElement.style.opacity = N ? 0 : 1);
});
}),
(j.CLASS_AUTO_PLACE = "a"),
(j.CLASS_AUTO_PLACE_CONTAINER = "ac"),
(j.CLASS_MAIN = "main"),
(j.CLASS_CONTROLLER_ROW = "cr"),
(j.CLASS_TOO_TALL = "taller-than-window"),
(j.CLASS_CLOSED = "closed"),
(j.CLASS_CLOSE_BUTTON = "close-button"),
(j.CLASS_DRAG = "drag"),
(j.DEFAULT_WIDTH = 245),
(j.TEXT_CLOSED = "Close Controls"),
(j.TEXT_OPEN = "Open Controls"),
f.bind(
window,
"keydown",
function (e) {
"text" === document.activeElement.type || (e.which !== R && e.keyCode != R) || j.toggleHide();
},
!1
),
p.extend(j.prototype, {
add: function (e, t) {
return m(this, e, t, {
factoryArgs: Array.prototype.slice.call(arguments, 2)
});
},
addColor: function (e, t) {
return m(this, e, t, {
color: !0
});
},
remove: function (e) {
this.__ul.removeChild(e.__li), this.__controllers.slice(this.__controllers.indexOf(e), 1);
var t = this;
p.defer(function () {
t.onResize();
});
},
destroy: function () {
this.autoPlace && P.removeChild(this.domElement);
},
addFolder: function (e) {
if (void 0 !== this.__folders[e]) throw new Error('You already have a folder in this GUI by the name "' + e + '"');
var t = {
name: e,
parent: this
};
(t.autoPlace = this.autoPlace), this.load && this.load.folders && this.load.folders[e] && ((t.closed = this.load.folders[e].closed), (t.load = this.load.folders[e]));
var i = new j(t);
this.__folders[e] = i;
var n = v(this, i.domElement);
return f.addClass(n, "folder"), i;
},
open: function () {
this.closed = !1;
},
close: function () {
this.closed = !0;
},
onResize: function () {
var e = this.getRoot();
if (e.scrollable) {
var t = f.getOffset(e.__ul).top,
i = 0;
p.each(e.__ul.childNodes, function (t) {
(e.autoPlace && t === e.__save_row) || (i += f.getHeight(t));
}),
window.innerHeight - t - O < i ?
(f.addClass(e.domElement, j.CLASS_TOO_TALL), (e.__ul.style.height = window.innerHeight - t - O + "px")) :
(f.removeClass(e.domElement, j.CLASS_TOO_TALL), (e.__ul.style.height = "auto"));
}
e.__resize_handle &&
p.defer(function () {
e.__resize_handle.style.height = e.__ul.offsetHeight + "px";
}),
e.__closeButton && (e.__closeButton.style.width = e.width + "px");
},
remember: function () {
if ((p.isUndefined(C) && ((C = new d()), (C.domElement.innerHTML = t)), this.parent)) throw new Error("You can only call remember on a top level GUI.");
var e = this;
p.each(Array.prototype.slice.call(arguments), function (t) {
0 == e.__rememberedObjects.length && b(e), -1 == e.__rememberedObjects.indexOf(t) && e.__rememberedObjects.push(t);
}),
this.autoPlace && w(this, this.width);
},
getRoot: function () {
for (var e = this; e.parent;) e = e.parent;
return e;
},
getSaveObject: function () {
var e = this.load;
return (
(e.closed = this.closed),
this.__rememberedObjects.length > 0 && ((e.preset = this.preset), e.remembered || (e.remembered = {}), (e.remembered[this.preset] = M(this))),
(e.folders = {}),
p.each(this.__folders, function (t, i) {
e.folders[i] = t.getSaveObject();
}),
e
);
},
save: function () {
this.load.remembered || (this.load.remembered = {}), (this.load.remembered[this.preset] = M(this)), E(this, !1);
},
saveAs: function (e) {
this.load.remembered || ((this.load.remembered = {}), (this.load.remembered[k] = M(this, !0))), (this.load.remembered[e] = M(this)), (this.preset = e), T(this, e, !0);
},
revert: function (e) {
p.each(
this.__controllers,
function (t) {
this.getRoot().load.remembered ? y(e || this.getRoot(), t) : t.setValue(t.initialValue);
},
this
),
p.each(this.__folders, function (e) {
e.revert(e);
}),
e || E(this.getRoot(), !1);
},
listen: function (e) {
var t = 0 == this.__listening.length;
this.__listening.push(e), t && A(this.__listening);
},
}),
j
);
})(
n.utils.css,
'
nn Here's the new load parameter for your GUI's constructor:nn nn
nn Automatically saven values to localStorage on exit.nn
The values saved to localStorage willn override those passed to dat.GUI's constructor. This makes itn easier to work incrementally, but localStorage is fragile,n and your friends may not see the same values you do.n n
n n
nn
',
".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity 0.1s linear;-o-transition:opacity 0.1s linear;-moz-transition:opacity 0.1s linear;transition:opacity 0.1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity 0.1s linear;-o-transition:opacity 0.1s linear;-moz-transition:opacity 0.1s linear;transition:opacity 0.1s linear;border:0;position:absolute;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-x:hidden}.dg.a.has-save ul{margin-top:27px}.dg.a.has-save ul.closed{margin-top:0}.dg.a .save-row{position:fixed;top:0;z-index:1002}.dg li{-webkit-transition:height 0.1s ease-out;-o-transition:height 0.1s ease-out;-moz-transition:height 0.1s ease-out;transition:height 0.1s ease-out}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;overflow:hidden;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li > *{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:9px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2fa1d6}.dg .cr.number input[type=text]{color:#2fa1d6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2fa1d6}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}n",
(n.controllers.factory = (function (e, t, i, n, r, o, a) {
return function (s, l) {
var c = s[l];
return a.isArray(arguments[2]) || a.isObject(arguments[2]) ?
new e(s, l, arguments[2]) :
a.isNumber(c) ?
a.isNumber(arguments[2]) && a.isNumber(arguments[3]) ?
new i(s, l, arguments[2], arguments[3]) :
new t(s, l, {
min: arguments[2],
max: arguments[3]
}) :
a.isString(c) ?
new n(s, l) :
a.isFunction(c) ?
new r(s, l, "") :
a.isBoolean(c) ?
new o(s, l) :
void 0;
};
})(
n.controllers.OptionController,
n.controllers.NumberControllerBox,
n.controllers.NumberControllerSlider,
(n.controllers.StringController = (function (e, t, i) {
var n = function (e, i) {
function r() {
a.setValue(a.__input.value);
}
function o() {
a.__onFinishChange && a.__onFinishChange.call(a, a.getValue());
}
n.superclass.call(this, e, i);
var a = this;
(this.__input = document.createElement("input")),
this.__input.setAttribute("type", "text"),
t.bind(this.__input, "keyup", r),
t.bind(this.__input, "change", r),
t.bind(this.__input, "blur", o),
t.bind(this.__input, "keydown", function (e) {
13 === e.keyCode && this.blur();
}),
this.updateDisplay(),
this.domElement.appendChild(this.__input);
};
return (
(n.superclass = e),
i.extend(n.prototype, e.prototype, {
updateDisplay: function () {
return t.isActive(this.__input) || (this.__input.value = this.getValue()), n.superclass.prototype.updateDisplay.call(this);
},
}),
n
);
})(n.controllers.Controller, n.dom.dom, n.utils.common)),
n.controllers.FunctionController,
n.controllers.BooleanController,
n.utils.common
)),
n.controllers.Controller,
n.controllers.BooleanController,
n.controllers.FunctionController,
n.controllers.NumberControllerBox,
n.controllers.NumberControllerSlider,
n.controllers.OptionController,
(n.controllers.ColorController = (function (e, t, i, n, r) {
function o(e, t, i, n) {
(e.style.background = ""),
r.each(l, function (r) {
e.style.cssText += "background: " + r + "linear-gradient(" + t + ", " + i + " 0%, " + n + " 100%); ";
});
}
function a(e) {
(e.style.background = ""),
(e.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);"),
(e.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"),
(e.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"),
(e.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"),
(e.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);");
}
var s = function (e, l) {
function c(e) {
f(e), t.bind(window, "mousemove", f), t.bind(window, "mouseup", u);
}
function u() {
t.unbind(window, "mousemove", f), t.unbind(window, "mouseup", u);
}
function h() {
var e = n(this.value);
e !== !1 ? ((m.__color.__state = e), m.setValue(m.__color.toOriginal())) : (this.value = m.__color.toString());
}
function d() {
t.unbind(window, "mousemove", p), t.unbind(window, "mouseup", d);
}
function f(e) {
e.preventDefault();
var i = t.getWidth(m.__saturation_field),
n = t.getOffset(m.__saturation_field),
r = (e.clientX - n.left + document.body.scrollLeft) / i,
o = 1 - (e.clientY - n.top + document.body.scrollTop) / i;
return o > 1 ? (o = 1) : 0 > o && (o = 0), r > 1 ? (r = 1) : 0 > r && (r = 0), (m.__color.v = o), (m.__color.s = r), m.setValue(m.__color.toOriginal()), !1;
}
function p(e) {
e.preventDefault();
var i = t.getHeight(m.__hue_field),
n = t.getOffset(m.__hue_field),
r = 1 - (e.clientY - n.top + document.body.scrollTop) / i;
return r > 1 ? (r = 1) : 0 > r && (r = 0), (m.__color.h = 360 * r), m.setValue(m.__color.toOriginal()), !1;
}
s.superclass.call(this, e, l), (this.__color = new i(this.getValue())), (this.__temp = new i(0));
var m = this;
(this.domElement = document.createElement("div")),
t.makeSelectable(this.domElement, !1),
(this.__selector = document.createElement("div")),
(this.__selector.className = "selector"),
(this.__saturation_field = document.createElement("div")),
(this.__saturation_field.className = "saturation-field"),
(this.__field_knob = document.createElement("div")),
(this.__field_knob.className = "field-knob"),
(this.__field_knob_border = "2px solid "),
(this.__hue_knob = document.createElement("div")),
(this.__hue_knob.className = "hue-knob"),
(this.__hue_field = document.createElement("div")),
(this.__hue_field.className = "hue-field"),
(this.__input = document.createElement("input")),
(this.__input.type = "text"),
(this.__input_textShadow = "0 1px 1px "),
t.bind(this.__input, "keydown", function (e) {
13 === e.keyCode && h.call(this);
}),
t.bind(this.__input, "blur", h),
t.bind(this.__selector, "mousedown", function (e) {
t.addClass(this, "drag").bind(window, "mouseup", function (e) {
t.removeClass(m.__selector, "drag");
});
});
var v = document.createElement("div");
r.extend(this.__selector.style, {
width: "122px",
height: "102px",
padding: "3px",
backgroundColor: "#222",
boxShadow: "0px 1px 3px rgba(0,0,0,0.3)"
}),
r.extend(this.__field_knob.style, {
position: "absolute",
width: "12px",
height: "12px",
border: this.__field_knob_border + (this.__color.v < 0.5 ? "#fff" : "#000"),
boxShadow: "0px 1px 3px rgba(0,0,0,0.5)",
borderRadius: "12px",
zIndex: 1,
}),
r.extend(this.__hue_knob.style, {
position: "absolute",
width: "15px",
height: "2px",
borderRight: "4px solid #fff",
zIndex: 1
}),
r.extend(this.__saturation_field.style, {
width: "100px",
height: "100px",
border: "1px solid #555",
marginRight: "3px",
display: "inline-block",
cursor: "pointer"
}),
r.extend(v.style, {
width: "100%",
height: "100%",
background: "none"
}),
o(v, "top", "rgba(0,0,0,0)", "#000"),
r.extend(this.__hue_field.style, {
width: "15px",
height: "100px",
display: "inline-block",
border: "1px solid #555",
cursor: "ns-resize"
}),
a(this.__hue_field),
r.extend(this.__input.style, {
outline: "none",
textAlign: "center",
color: "#fff",
border: 0,
fontWeight: "bold",
textShadow: this.__input_textShadow + "rgba(0,0,0,0.7)"
}),
t.bind(this.__saturation_field, "mousedown", c),
t.bind(this.__field_knob, "mousedown", c),
t.bind(this.__hue_field, "mousedown", function (e) {
p(e), t.bind(window, "mousemove", p), t.bind(window, "mouseup", d);
}),
this.__saturation_field.appendChild(v),
this.__selector.appendChild(this.__field_knob),
this.__selector.appendChild(this.__saturation_field),
this.__selector.appendChild(this.__hue_field),
this.__hue_field.appendChild(this.__hue_knob),
this.domElement.appendChild(this.__input),
this.domElement.appendChild(this.__selector),
this.updateDisplay();
};
(s.superclass = e),
r.extend(s.prototype, e.prototype, {
updateDisplay: function () {
var e = n(this.getValue());
if (e !== !1) {
var t = !1;
r.each(
i.COMPONENTS,
function (i) {
return r.isUndefined(e[i]) || r.isUndefined(this.__color.__state[i]) || e[i] === this.__color.__state[i] ? void 0 : ((t = !0), {});
},
this
),
t && r.extend(this.__color.__state, e);
}
r.extend(this.__temp.__state, this.__color.__state), (this.__temp.a = 1);
var a = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0,
s = 255 - a;
r.extend(this.__field_knob.style, {
marginLeft: 100 * this.__color.s - 7 + "px",
marginTop: 100 * (1 - this.__color.v) - 7 + "px",
backgroundColor: this.__temp.toString(),
border: this.__field_knob_border + "rgb(" + a + "," + a + "," + a + ")",
}),
(this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px"),
(this.__temp.s = 1),
(this.__temp.v = 1),
o(this.__saturation_field, "left", "#fff", this.__temp.toString()),
r.extend(this.__input.style, {
backgroundColor: (this.__input.value = this.__color.toString()),
color: "rgb(" + a + "," + a + "," + a + ")",
textShadow: this.__input_textShadow + "rgba(" + s + "," + s + "," + s + ",.7)",
});
},
});
var l = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
return s;
})(
n.controllers.Controller,
n.dom.dom,
(n.color.Color = (function (e, t, i, n) {
function r(e, t, i) {
Object.defineProperty(e, t, {
get: function () {
return "RGB" === this.__state.space ? this.__state[t] : (a(this, t, i), this.__state[t]);
},
set: function (e) {
"RGB" !== this.__state.space && (a(this, t, i), (this.__state.space = "RGB")), (this.__state[t] = e);
},
});
}
function o(e, t) {
Object.defineProperty(e, t, {
get: function () {
return "HSV" === this.__state.space ? this.__state[t] : (s(this), this.__state[t]);
},
set: function (e) {
"HSV" !== this.__state.space && (s(this), (this.__state.space = "HSV")), (this.__state[t] = e);
},
});
}
function a(e, i, r) {
if ("HEX" === e.__state.space) e.__state[i] = t.component_from_hex(e.__state.hex, r);
else {
if ("HSV" !== e.__state.space) throw "Corrupted color state";
n.extend(e.__state, t.hsv_to_rgb(e.__state.h, e.__state.s, e.__state.v));
}
}
function s(e) {
var i = t.rgb_to_hsv(e.r, e.g, e.b);
n.extend(e.__state, {
s: i.s,
v: i.v
}), n.isNaN(i.h) ? n.isUndefined(e.__state.h) && (e.__state.h = 0) : (e.__state.h = i.h);
}
var l = function () {
if (((this.__state = e.apply(this, arguments)), this.__state === !1)) throw "Failed to interpret color arguments";
this.__state.a = this.__state.a || 1;
};
return (
(l.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"]),
n.extend(l.prototype, {
toString: function () {
return i(this);
},
toOriginal: function () {
return this.__state.conversion.write(this);
},
}),
r(l.prototype, "r", 2),
r(l.prototype, "g", 1),
r(l.prototype, "b", 0),
o(l.prototype, "h"),
o(l.prototype, "s"),
o(l.prototype, "v"),
Object.defineProperty(l.prototype, "a", {
get: function () {
return this.__state.a;
},
set: function (e) {
this.__state.a = e;
},
}),
Object.defineProperty(l.prototype, "hex", {
get: function () {
return "HEX" !== !this.__state.space && (this.__state.hex = t.rgb_to_hex(this.r, this.g, this.b)), this.__state.hex;
},
set: function (e) {
(this.__state.space = "HEX"), (this.__state.hex = e);
},
}),
l
);
})(
n.color.interpret,
(n.color.math = (function () {
var e;
return {
hsv_to_rgb: function (e, t, i) {
var n = Math.floor(e / 60) % 6,
r = e / 60 - Math.floor(e / 60),
o = i * (1 - t),
a = i * (1 - r * t),
s = i * (1 - (1 - r) * t),
l = [
[i, s, o],
[a, i, o],
[o, i, s],
[o, a, i],
[s, o, i],
[i, o, a],
][n];
return {
r: 255 * l[0],
g: 255 * l[1],
b: 255 * l[2]
};
},
rgb_to_hsv: function (e, t, i) {
var n,
r,
o = Math.min(e, t, i),
a = Math.max(e, t, i),
s = a - o;
return 0 == a ? {
h: NaN,
s: 0,
v: 0
} : ((r = s / a), (n = e == a ? (t - i) / s : t == a ? 2 + (i - e) / s : 4 + (e - t) / s), (n /= 6), 0 > n && (n += 1), {
h: 360 * n,
s: r,
v: a / 255
});
},
rgb_to_hex: function (e, t, i) {
var n = this.hex_with_component(0, 2, e);
return (n = this.hex_with_component(n, 1, t)), (n = this.hex_with_component(n, 0, i));
},
component_from_hex: function (e, t) {
return (e >> (8 * t)) & 255;
},
hex_with_component: function (t, i, n) {
return (n << (e = 8 * i)) | (t & ~(255 << e));
},
};
})()),
n.color.toString,
n.utils.common
)),
n.color.interpret,
n.utils.common
)),
(n.utils.requestAnimationFrame = (function () {
return (
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (e, t) {
window.setTimeout(e, 1e3 / 60);
}
);
})()),
(n.dom.CenteredDiv = (function (e, t) {
var i = function () {
(this.backgroundElement = document.createElement("div")),
t.extend(this.backgroundElement.style, {
backgroundColor: "rgba(0,0,0,0.8)",
top: 0,
left: 0,
display: "none",
zIndex: "1000",
opacity: 0,
WebkitTransition: "opacity 0.2s linear",
}),
e.makeFullscreen(this.backgroundElement),
(this.backgroundElement.style.position = "fixed"),
(this.domElement = document.createElement("div")),
t.extend(this.domElement.style, {
position: "fixed",
display: "none",
zIndex: "1001",
opacity: 0,
WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear"
}),
document.body.appendChild(this.backgroundElement),
document.body.appendChild(this.domElement);
var i = this;
e.bind(this.backgroundElement, "click", function () {
i.hide();
});
};
return (
(i.prototype.show = function () {
var e = this;
(this.backgroundElement.style.display = "block"),
(this.domElement.style.display = "block"),
(this.domElement.style.opacity = 0),
(this.domElement.style.webkitTransform = "scale(1.1)"),
this.layout(),
t.defer(function () {
(e.backgroundElement.style.opacity = 1), (e.domElement.style.opacity = 1), (e.domElement.style.webkitTransform = "scale(1)");
});
}),
(i.prototype.hide = function () {
var t = this,
i = function () {
(t.domElement.style.display = "none"),
(t.backgroundElement.style.display = "none"),
e.unbind(t.domElement, "webkitTransitionEnd", i),
e.unbind(t.domElement, "transitionend", i),
e.unbind(t.domElement, "oTransitionEnd", i);
};
e.bind(this.domElement, "webkitTransitionEnd", i),
e.bind(this.domElement, "transitionend", i),
e.bind(this.domElement, "oTransitionEnd", i),
(this.backgroundElement.style.opacity = 0),
(this.domElement.style.opacity = 0),
(this.domElement.style.webkitTransform = "scale(1.1)");
}),
(i.prototype.layout = function () {
(this.domElement.style.left = window.innerWidth / 2 - e.getWidth(this.domElement) / 2 + "px"), (this.domElement.style.top = window.innerHeight / 2 - e.getHeight(this.domElement) / 2 + "px");
}),
i
);
})(n.dom.dom, n.utils.common)),
n.dom.dom,
n.utils.common
));
},
{},
],
193: [
function (e, t, i) {
!(function (e, i) {
"undefined" != typeof t ? (t.exports = i()) : "function" == typeof define && "object" == typeof define.amd ? define(i) : (this[e] = i());
})("domready", function () {
var e,
t = [],
i = document,
n = i.documentElement.doScroll,
r = "DOMContentLoaded",
o = (n ? /^loaded|^c/ : /^loaded|^i|^c/).test(i.readyState);
return (
o ||
i.addEventListener(
r,
(e = function () {
for (i.removeEventListener(r, e), o = 1;
(e = t.shift());) e();
})
),
function (e) {
o ? setTimeout(e, 0) : t.push(e);
}
);
});
},
{},
],
194: [
function (e, t, i) {
"use strict";
var n,
r,
o,
a,
s,
l,
c,
u = e("d"),
h = e("es5-ext/object/valid-callable"),
d = Function.prototype.apply,
f = Function.prototype.call,
p = Object.create,
m = Object.defineProperty,
v = Object.defineProperties,
g = Object.prototype.hasOwnProperty,
y = {
configurable: !0,
enumerable: !1,
writable: !0
};
(n = function (e, t) {
var i;
return h(t), g.call(this, "__ee__") ? (i = this.__ee__) : ((i = y.value = p(null)), m(this, "__ee__", y), (y.value = null)), i[e] ? ("object" == typeof i[e] ? i[e].push(t) : (i[e] = [i[e], t])) : (i[e] = t), this;
}),
(r = function (e, t) {
var i, r;
return (
h(t),
(r = this),
n.call(
this,
e,
(i = function () {
o.call(r, e, i), d.call(t, this, arguments);
})
),
(i.__eeOnceListener__ = t),
this
);
}),
(o = function (e, t) {
var i, n, r, o;
if ((h(t), !g.call(this, "__ee__"))) return this;
if (((i = this.__ee__), !i[e])) return this;
if (((n = i[e]), "object" == typeof n))
for (o = 0;
(r = n[o]); ++o)(r === t || r.__eeOnceListener__ === t) && (2 === n.length ? (i[e] = n[o ? 0 : 1]) : n.splice(o, 1));
else(n === t || n.__eeOnceListener__ === t) && delete i[e];
return this;
}),
(a = function (e) {
var t, i, n, r, o;
if (g.call(this, "__ee__") && (r = this.__ee__[e]))
if ("object" == typeof r) {
for (i = arguments.length, o = new Array(i - 1), t = 1; i > t; ++t) o[t - 1] = arguments[t];
for (r = r.slice(), t = 0;
(n = r[t]); ++t) d.call(n, this, o);
} else
switch (arguments.length) {
case 1:
f.call(r, this);
break;
case 2:
f.call(r, this, arguments[1]);
break;
case 3:
f.call(r, this, arguments[1], arguments[2]);
break;
default:
for (i = arguments.length, o = new Array(i - 1), t = 1; i > t; ++t) o[t - 1] = arguments[t];
d.call(r, this, o);
}
}),
(s = {
on: n,
once: r,
off: o,
emit: a
}),
(l = {
on: u(n),
once: u(r),
off: u(o),
emit: u(a)
}),
(c = v({}, l)),
(t.exports = i = function (e) {
return null == e ? p(c) : v(Object(e), l);
}),
(i.methods = s);
},
{
d: 195,
"es5-ext/object/valid-callable": 204
},
],
195: [
function (e, t, i) {
"use strict";
var n,
r = e("es5-ext/object/assign"),
o = e("es5-ext/object/normalize-options"),
a = e("es5-ext/object/is-callable"),
s = e("es5-ext/string/#/contains");
(n = t.exports = function (e, t) {
var i, n, a, l, c;
return (
arguments.length < 2 || "string" != typeof e ? ((l = t), (t = e), (e = null)) : (l = arguments[2]),
null == e ? ((i = a = !0), (n = !1)) : ((i = s.call(e, "c")), (n = s.call(e, "e")), (a = s.call(e, "w"))),
(c = {
value: t,
configurable: i,
enumerable: n,
writable: a
}),
l ? r(o(l), c) : c
);
}),
(n.gs = function (e, t, i) {
var n, l, c, u;
return (
"string" != typeof e ? ((c = i), (i = t), (t = e), (e = null)) : (c = arguments[3]),
null == t ? (t = void 0) : a(t) ? (null == i ? (i = void 0) : a(i) || ((c = i), (i = void 0))) : ((c = t), (t = i = void 0)),
null == e ? ((n = !0), (l = !1)) : ((n = s.call(e, "c")), (l = s.call(e, "e"))),
(u = {
get: t,
set: i,
configurable: n,
enumerable: l
}),
c ? r(o(c), u) : u
);
});
},
{
"es5-ext/object/assign": 196,
"es5-ext/object/is-callable": 199,
"es5-ext/object/normalize-options": 203,
"es5-ext/string/#/contains": 206
},
],
196: [
function (e, t, i) {
"use strict";
t.exports = e("./is-implemented")() ? Object.assign : e("./shim");
},
{
"./is-implemented": 197,
"./shim": 198
},
],
197: [
function (e, t, i) {
"use strict";
t.exports = function () {
var e,
t = Object.assign;
return "function" != typeof t ? !1 : ((e = {
foo: "raz"
}), t(e, {
bar: "dwa"
}, {
trzy: "trzy"
}), e.foo + e.bar + e.trzy === "razdwatrzy");
};
},
{},
],
198: [
function (e, t, i) {
"use strict";
var n = e("../keys"),
r = e("../valid-value"),
o = Math.max;
t.exports = function (e, t) {
var i,
a,
s,
l = o(arguments.length, 2);
for (
e = Object(r(e)),
s = function (n) {
try {
e[n] = t[n];
} catch (r) {
i || (i = r);
}
},
a = 1; l > a;
++a
)
(t = arguments[a]), n(t).forEach(s);
if (void 0 !== i) throw i;
return e;
};
},
{
"../keys": 200,
"../valid-value": 205
},
],
199: [
function (e, t, i) {
"use strict";
t.exports = function (e) {
return "function" == typeof e;
};
},
{},
],
200: [
function (e, t, i) {
"use strict";
t.exports = e("./is-implemented")() ? Object.keys : e("./shim");
},
{
"./is-implemented": 201,
"./shim": 202
},
],
201: [
function (e, t, i) {
"use strict";
t.exports = function () {
try {
return Object.keys("primitive"), !0;
} catch (e) {
return !1;
}
};
},
{},
],
202: [
function (e, t, i) {
"use strict";
var n = Object.keys;
t.exports = function (e) {
return n(null == e ? e : Object(e));
};
},
{},
],
203: [
function (e, t, i) {
"use strict";
var n = Array.prototype.forEach,
r = Object.create,
o = function (e, t) {
var i;
for (i in e) t[i] = e[i];
};
t.exports = function (e) {
var t = r(null);
return (
n.call(arguments, function (e) {
null != e && o(Object(e), t);
}),
t
);
};
},
{},
],
204: [
function (e, t, i) {
"use strict";
t.exports = function (e) {
if ("function" != typeof e) throw new TypeError(e + " is not a function");
return e;
};
},
{},
],
205: [
function (e, t, i) {
"use strict";
t.exports = function (e) {
if (null == e) throw new TypeError("Cannot use null or undefined");
return e;
};
},
{},
],
206: [
function (e, t, i) {
"use strict";
t.exports = e("./is-implemented")() ? String.prototype.contains : e("./shim");
},
{
"./is-implemented": 207,
"./shim": 208
},
],
207: [
function (e, t, i) {
"use strict";
var n = "razdwatrzy";
t.exports = function () {
return "function" != typeof n.contains ? !1 : n.contains("dwa") === !0 && n.contains("foo") === !1;
};
},
{},
],
208: [
function (e, t, i) {
"use strict";
var n = String.prototype.indexOf;
t.exports = function (e) {
return n.call(this, e, arguments[1]) > -1;
};
},
{},
],
209: [
function (e, t, i) {
(function (e) {
var i = "undefined" != typeof t && t.exports && "undefined" != typeof e ? e : this || window;
(i._gsQueue || (i._gsQueue = [])).push(function () {
"use strict";
i._gsDefine(
"TweenMax",
["core.Animation", "core.SimpleTimeline", "TweenLite"],
function (e, t, i) {
var n = function (e) {
var t,
i = [],
n = e.length;
for (t = 0; t !== n; i.push(e[t++]));
return i;
},
r = function (e, t, i) {
var n,
r,
o = e.cycle;
for (n in o)(r = o[n]), (e[n] = "function" == typeof r ? r.call(t[i], i) : r[i % r.length]);
delete e.cycle;
},
o = function (e, t, n) {
i.call(this, e, t, n),
(this._cycle = 0),
(this._yoyo = this.vars.yoyo === !0),
(this._repeat = this.vars.repeat || 0),
(this._repeatDelay = this.vars.repeatDelay || 0),
(this._dirty = !0),
(this.render = o.prototype.render);
},
a = 1e-10,
s = i._internals,
l = s.isSelector,
c = s.isArray,
u = (o.prototype = i.to({}, 0.1, {})),
h = [];
(o.version = "1.18.0"),
(u.constructor = o),
(u.kill()._gc = !1),
(o.killTweensOf = o.killDelayedCallsTo = i.killTweensOf),
(o.getTweensOf = i.getTweensOf),
(o.lagSmoothing = i.lagSmoothing),
(o.ticker = i.ticker),
(o.render = i.render),
(u.invalidate = function () {
return (this._yoyo = this.vars.yoyo === !0), (this._repeat = this.vars.repeat || 0), (this._repeatDelay = this.vars.repeatDelay || 0), this._uncache(!0), i.prototype.invalidate.call(this);
}),
(u.updateTo = function (e, t) {
var n,
r = this.ratio,
o = this.vars.immediateRender || e.immediateRender;
t &&
this._startTime < this._timeline._time &&
((this._startTime = this._timeline._time), this._uncache(!1), this._gc ? this._enabled(!0, !1) : this._timeline.insert(this, this._startTime - this._delay));
for (n in e) this.vars[n] = e[n];
if (this._initted || o)
if (t)(this._initted = !1), o && this.render(0, !0, !0);
else if ((this._gc && this._enabled(!0, !1), this._notifyPluginsOfEnabled && this._firstPT && i._onPluginEvent("_onDisable", this), this._time / this._duration > 0.998)) {
var a = this._time;
this.render(0, !0, !1), (this._initted = !1), this.render(a, !0, !1);
} else if (this._time > 0 || o) {
(this._initted = !1), this._init();
for (var s, l = 1 / (1 - r), c = this._firstPT; c;)(s = c.s + c.c), (c.c *= l), (c.s = s - c.c), (c = c._next);
}
return this;
}),
(u.render = function (e, t, i) {
this._initted || (0 === this._duration && this.vars.repeat && this.invalidate());
var n,
r,
o,
l,
c,
u,
h,
d,
f = this._dirty ? this.totalDuration() : this._totalDuration,
p = this._time,
m = this._totalTime,
v = this._cycle,
g = this._duration,
y = this._rawPrevTime;
if (
(e >= f ?
((this._totalTime = f),
(this._cycle = this._repeat),
this._yoyo && 0 !== (1 & this._cycle) ?
((this._time = 0), (this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0)) :
((this._time = g), (this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1)),
this._reversed || ((n = !0), (r = "onComplete"), (i = i || this._timeline.autoRemoveChildren)),
0 === g &&
(this._initted || !this.vars.lazy || i) &&
(this._startTime === this._timeline._duration && (e = 0),
(0 === e || 0 > y || y === a) && y !== e && ((i = !0), y > a && (r = "onReverseComplete")),
(this._rawPrevTime = d = !t || e || y === e ? e : a))) :
1e-7 > e ?
((this._totalTime = this._time = this._cycle = 0),
(this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0),
(0 !== m || (0 === g && y > 0)) && ((r = "onReverseComplete"), (n = this._reversed)),
0 > e && ((this._active = !1), 0 === g && (this._initted || !this.vars.lazy || i) && (y >= 0 && (i = !0), (this._rawPrevTime = d = !t || e || y === e ? e : a))),
this._initted || (i = !0)) :
((this._totalTime = this._time = e),
0 !== this._repeat &&
((l = g + this._repeatDelay),
(this._cycle = (this._totalTime / l) >> 0),
0 !== this._cycle && this._cycle === this._totalTime / l && this._cycle--,
(this._time = this._totalTime - this._cycle * l),
this._yoyo && 0 !== (1 & this._cycle) && (this._time = g - this._time),
this._time > g ? (this._time = g) : this._time < 0 && (this._time = 0)),
this._easeType ?
((c = this._time / g),
(u = this._easeType),
(h = this._easePower),
(1 === u || (3 === u && c >= 0.5)) && (c = 1 - c),
3 === u && (c *= 2),
1 === h ? (c *= c) : 2 === h ? (c *= c * c) : 3 === h ? (c *= c * c * c) : 4 === h && (c *= c * c * c * c),
1 === u ? (this.ratio = 1 - c) : 2 === u ? (this.ratio = c) : this._time / g < 0.5 ? (this.ratio = c / 2) : (this.ratio = 1 - c / 2)) :
(this.ratio = this._ease.getRatio(this._time / g))),
p === this._time && !i && v === this._cycle)
)
return void(m !== this._totalTime && this._onUpdate && (t || this._callback("onUpdate")));
if (!this._initted) {
if ((this._init(), !this._initted || this._gc)) return;
if (!i && this._firstPT && ((this.vars.lazy !== !1 && this._duration) || (this.vars.lazy && !this._duration)))
return (this._time = p), (this._totalTime = m), (this._rawPrevTime = y), (this._cycle = v), s.lazyTweens.push(this), void(this._lazy = [e, t]);
this._time && !n ? (this.ratio = this._ease.getRatio(this._time / g)) : n && this._ease._calcEnd && (this.ratio = this._ease.getRatio(0 === this._time ? 0 : 1));
}
for (
this._lazy !== !1 && (this._lazy = !1),
this._active || (!this._paused && this._time !== p && e >= 0 && (this._active = !0)),
0 === m &&
(2 === this._initted && e > 0 && this._init(),
this._startAt && (e >= 0 ? this._startAt.render(e, t, i) : r || (r = "_dummyGS")),
this.vars.onStart && (0 !== this._totalTime || 0 === g) && (t || this._callback("onStart"))),
o = this._firstPT; o;
)
o.f ? o.t[o.p](o.c * this.ratio + o.s) : (o.t[o.p] = o.c * this.ratio + o.s), (o = o._next);
this._onUpdate && (0 > e && this._startAt && this._startTime && this._startAt.render(e, t, i), t || ((this._totalTime !== m || n) && this._callback("onUpdate"))),
this._cycle !== v && (t || this._gc || (this.vars.onRepeat && this._callback("onRepeat"))),
r &&
(!this._gc || i) &&
(0 > e && this._startAt && !this._onUpdate && this._startTime && this._startAt.render(e, t, i),
n && (this._timeline.autoRemoveChildren && this._enabled(!1, !1), (this._active = !1)),
!t && this.vars[r] && this._callback(r),
0 === g && this._rawPrevTime === a && d !== a && (this._rawPrevTime = 0));
}),
(o.to = function (e, t, i) {
return new o(e, t, i);
}),
(o.from = function (e, t, i) {
return (i.runBackwards = !0), (i.immediateRender = 0 != i.immediateRender), new o(e, t, i);
}),
(o.fromTo = function (e, t, i, n) {
return (n.startAt = i), (n.immediateRender = 0 != n.immediateRender && 0 != i.immediateRender), new o(e, t, n);
}),
(o.staggerTo = o.allTo = function (e, t, a, s, u, d, f) {
s = s || 0;
var p,
m,
v,
g,
y = a.delay || 0,
_ = [],
b = function () {
a.onComplete && a.onComplete.apply(a.onCompleteScope || this, arguments), u.apply(f || a.callbackScope || this, d || h);
},
x = a.cycle,
w = a.startAt && a.startAt.cycle;
for (c(e) || ("string" == typeof e && (e = i.selector(e) || e), l(e) && (e = n(e))), e = e || [], 0 > s && ((e = n(e)), e.reverse(), (s *= -1)), p = e.length - 1, v = 0; p >= v; v++) {
m = {};
for (g in a) m[g] = a[g];
if ((x && r(m, e, v), w)) {
w = m.startAt = {};
for (g in a.startAt) w[g] = a.startAt[g];
r(m.startAt, e, v);
}
(m.delay = y), v === p && u && (m.onComplete = b), (_[v] = new o(e[v], t, m)), (y += s);
}
return _;
}),
(o.staggerFrom = o.allFrom = function (e, t, i, n, r, a, s) {
return (i.runBackwards = !0), (i.immediateRender = 0 != i.immediateRender), o.staggerTo(e, t, i, n, r, a, s);
}),
(o.staggerFromTo = o.allFromTo = function (e, t, i, n, r, a, s, l) {
return (n.startAt = i), (n.immediateRender = 0 != n.immediateRender && 0 != i.immediateRender), o.staggerTo(e, t, n, r, a, s, l);
}),
(o.delayedCall = function (e, t, i, n, r) {
return new o(t, 0, {
delay: e,
onComplete: t,
onCompleteParams: i,
callbackScope: n,
onReverseComplete: t,
onReverseCompleteParams: i,
immediateRender: !1,
useFrames: r,
overwrite: 0
});
}),
(o.set = function (e, t) {
return new o(e, 0, t);
}),
(o.isTweening = function (e) {
return i.getTweensOf(e, !0).length > 0;
});
var d = function (e, t) {
for (var n = [], r = 0, o = e._first; o;) o instanceof i ? (n[r++] = o) : (t && (n[r++] = o), (n = n.concat(d(o, t))), (r = n.length)), (o = o._next);
return n;
},
f = (o.getAllTweens = function (t) {
return d(e._rootTimeline, t).concat(d(e._rootFramesTimeline, t));
});
(o.killAll = function (e, i, n, r) {
null == i && (i = !0), null == n && (n = !0);
var o,
a,
s,
l = f(0 != r),
c = l.length,
u = i && n && r;
for (s = 0; c > s; s++)(a = l[s]), (u || a instanceof t || ((o = a.target === a.vars.onComplete) && n) || (i && !o)) && (e ? a.totalTime(a._reversed ? 0 : a.totalDuration()) : a._enabled(!1, !1));
}),
(o.killChildTweensOf = function (e, t) {
if (null != e) {
var r,
a,
u,
h,
d,
f = s.tweenLookup;
if (("string" == typeof e && (e = i.selector(e) || e), l(e) && (e = n(e)), c(e)))
for (h = e.length; --h > -1;) o.killChildTweensOf(e[h], t);
else {
r = [];
for (u in f)
for (a = f[u].target.parentNode; a;) a === e && (r = r.concat(f[u].tweens)), (a = a.parentNode);
for (d = r.length, h = 0; d > h; h++) t && r[h].totalTime(r[h].totalDuration()), r[h]._enabled(!1, !1);
}
}
});
var p = function (e, i, n, r) {
(i = i !== !1), (n = n !== !1), (r = r !== !1);
for (var o, a, s = f(r), l = i && n && r, c = s.length; --c > -1;)(a = s[c]), (l || a instanceof t || ((o = a.target === a.vars.onComplete) && n) || (i && !o)) && a.paused(e);
};
return (
(o.pauseAll = function (e, t, i) {
p(!0, e, t, i);
}),
(o.resumeAll = function (e, t, i) {
p(!1, e, t, i);
}),
(o.globalTimeScale = function (t) {
var n = e._rootTimeline,
r = i.ticker.time;
return arguments.length ?
((t = t || a),
(n._startTime = r - ((r - n._startTime) * n._timeScale) / t),
(n = e._rootFramesTimeline),
(r = i.ticker.frame),
(n._startTime = r - ((r - n._startTime) * n._timeScale) / t),
(n._timeScale = e._rootTimeline._timeScale = t),
t) :
n._timeScale;
}),
(u.progress = function (e) {
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && 0 !== (1 & this._cycle) ? 1 - e : e) + this._cycle * (this._duration + this._repeatDelay), !1) : this._time / this.duration();
}),
(u.totalProgress = function (e) {
return arguments.length ? this.totalTime(this.totalDuration() * e, !1) : this._totalTime / this.totalDuration();
}),
(u.time = function (e, t) {
return arguments.length ?
(this._dirty && this.totalDuration(),
e > this._duration && (e = this._duration),
this._yoyo && 0 !== (1 & this._cycle) ?
(e = this._duration - e + this._cycle * (this._duration + this._repeatDelay)) :
0 !== this._repeat && (e += this._cycle * (this._duration + this._repeatDelay)),
this.totalTime(e, t)) :
this._time;
}),
(u.duration = function (t) {
return arguments.length ? e.prototype.duration.call(this, t) : this._duration;
}),
(u.totalDuration = function (e) {
return arguments.length ?
-1 === this._repeat ?
this :
this.duration((e - this._repeat * this._repeatDelay) / (this._repeat + 1)) :
(this._dirty && ((this._totalDuration = -1 === this._repeat ? 999999999999 : this._duration * (this._repeat + 1) + this._repeatDelay * this._repeat), (this._dirty = !1)), this._totalDuration);
}),
(u.repeat = function (e) {
return arguments.length ? ((this._repeat = e), this._uncache(!0)) : this._repeat;
}),
(u.repeatDelay = function (e) {
return arguments.length ? ((this._repeatDelay = e), this._uncache(!0)) : this._repeatDelay;
}),
(u.yoyo = function (e) {
return arguments.length ? ((this._yoyo = e), this) : this._yoyo;
}),
o
);
},
!0
),
i._gsDefine(
"TimelineLite",
["core.Animation", "core.SimpleTimeline", "TweenLite"],
function (e, t, n) {
var r = function (e) {
t.call(this, e),
(this._labels = {}),
(this.autoRemoveChildren = this.vars.autoRemoveChildren === !0),
(this.smoothChildTiming = this.vars.smoothChildTiming === !0),
(this._sortChildren = !0),
(this._onUpdate = this.vars.onUpdate);
var i,
n,
r = this.vars;
for (n in r)(i = r[n]), c(i) && -1 !== i.join("").indexOf("{self}") && (r[n] = this._swapSelfInParams(i));
c(r.tweens) && this.add(r.tweens, 0, r.align, r.stagger);
},
o = 1e-10,
a = n._internals,
s = (r._internals = {}),
l = a.isSelector,
c = a.isArray,
u = a.lazyTweens,
h = a.lazyRender,
d = i._gsDefine.globals,
f = function (e) {
var t,
i = {};
for (t in e) i[t] = e[t];
return i;
},
p = function (e, t, i) {
var n,
r,
o = e.cycle;
for (n in o)(r = o[n]), (e[n] = "function" == typeof r ? r.call(t[i], i) : r[i % r.length]);
delete e.cycle;
},
m = (s.pauseCallback = function () {}),
v = function (e) {
var t,
i = [],
n = e.length;
for (t = 0; t !== n; i.push(e[t++]));
return i;
},
g = (r.prototype = new t());
return (
(r.version = "1.18.0"),
(g.constructor = r),
(g.kill()._gc = g._forcingPlayhead = g._hasPause = !1),
(g.to = function (e, t, i, r) {
var o = (i.repeat && d.TweenMax) || n;
return t ? this.add(new o(e, t, i), r) : this.set(e, i, r);
}),
(g.from = function (e, t, i, r) {
return this.add(((i.repeat && d.TweenMax) || n).from(e, t, i), r);
}),
(g.fromTo = function (e, t, i, r, o) {
var a = (r.repeat && d.TweenMax) || n;
return t ? this.add(a.fromTo(e, t, i, r), o) : this.set(e, r, o);
}),
(g.staggerTo = function (e, t, i, o, a, s, c, u) {
var h,
d,
m = new r({
onComplete: s,
onCompleteParams: c,
callbackScope: u,
smoothChildTiming: this.smoothChildTiming
}),
g = i.cycle;
for ("string" == typeof e && (e = n.selector(e) || e), e = e || [], l(e) && (e = v(e)), o = o || 0, 0 > o && ((e = v(e)), e.reverse(), (o *= -1)), d = 0; d < e.length; d++)
(h = f(i)), h.startAt && ((h.startAt = f(h.startAt)), h.startAt.cycle && p(h.startAt, e, d)), g && p(h, e, d), m.to(e[d], t, h, d * o);
return this.add(m, a);
}),
(g.staggerFrom = function (e, t, i, n, r, o, a, s) {
return (i.immediateRender = 0 != i.immediateRender), (i.runBackwards = !0), this.staggerTo(e, t, i, n, r, o, a, s);
}),
(g.staggerFromTo = function (e, t, i, n, r, o, a, s, l) {
return (n.startAt = i), (n.immediateRender = 0 != n.immediateRender && 0 != i.immediateRender), this.staggerTo(e, t, n, r, o, a, s, l);
}),
(g.call = function (e, t, i, r) {
return this.add(n.delayedCall(0, e, t, i), r);
}),
(g.set = function (e, t, i) {
return (i = this._parseTimeOrLabel(i, 0, !0)), null == t.immediateRender && (t.immediateRender = i === this._time && !this._paused), this.add(new n(e, 0, t), i);
}),
(r.exportRoot = function (e, t) {
(e = e || {}), null == e.smoothChildTiming && (e.smoothChildTiming = !0);
var i,
o,
a = new r(e),
s = a._timeline;
for (null == t && (t = !0), s._remove(a, !0), a._startTime = 0, a._rawPrevTime = a._time = a._totalTime = s._time, i = s._first; i;)
(o = i._next), (t && i instanceof n && i.target === i.vars.onComplete) || a.add(i, i._startTime - i._delay), (i = o);
return s.add(a, 0), a;
}),
(g.add = function (i, o, a, s) {
var l, u, h, d, f, p;
if (("number" != typeof o && (o = this._parseTimeOrLabel(o, 0, !0, i)), !(i instanceof e))) {
if (i instanceof Array || (i && i.push && c(i))) {
for (a = a || "normal", s = s || 0, l = o, u = i.length, h = 0; u > h; h++)
c((d = i[h])) && (d = new r({
tweens: d
})),
this.add(d, l),
"string" != typeof d && "function" != typeof d && ("sequence" === a ? (l = d._startTime + d.totalDuration() / d._timeScale) : "start" === a && (d._startTime -= d.delay())),
(l += s);
return this._uncache(!0);
}
if ("string" == typeof i) return this.addLabel(i, o);
if ("function" != typeof i) throw "Cannot add " + i + " into the timeline; it is not a tween, timeline, function, or string.";
i = n.delayedCall(0, i);
}
if ((t.prototype.add.call(this, i, o), (this._gc || this._time === this._duration) && !this._paused && this._duration < this.duration()))
for (f = this, p = f.rawTime() > i._startTime; f._timeline;) p && f._timeline.smoothChildTiming ? f.totalTime(f._totalTime, !0) : f._gc && f._enabled(!0, !1), (f = f._timeline);
return this;
}),
(g.remove = function (t) {
if (t instanceof e) {
this._remove(t, !1);
var i = (t._timeline = t.vars.useFrames ? e._rootFramesTimeline : e._rootTimeline);
return (t._startTime = (t._paused ? t._pauseTime : i._time) - (t._reversed ? t.totalDuration() - t._totalTime : t._totalTime) / t._timeScale), this;
}
if (t instanceof Array || (t && t.push && c(t))) {
for (var n = t.length; --n > -1;) this.remove(t[n]);
return this;
}
return "string" == typeof t ? this.removeLabel(t) : this.kill(null, t);
}),
(g._remove = function (e, i) {
t.prototype._remove.call(this, e, i);
var n = this._last;
return (
n ?
this._time > n._startTime + n._totalDuration / n._timeScale && ((this._time = this.duration()), (this._totalTime = this._totalDuration)) :
(this._time = this._totalTime = this._duration = this._totalDuration = 0),
this
);
}),
(g.append = function (e, t) {
return this.add(e, this._parseTimeOrLabel(null, t, !0, e));
}),
(g.insert = g.insertMultiple = function (e, t, i, n) {
return this.add(e, t || 0, i, n);
}),
(g.appendMultiple = function (e, t, i, n) {
return this.add(e, this._parseTimeOrLabel(null, t, !0, e), i, n);
}),
(g.addLabel = function (e, t) {
return (this._labels[e] = this._parseTimeOrLabel(t)), this;
}),
(g.addPause = function (e, t, i, r) {
var o = n.delayedCall(0, m, i, r || this);
return (o.vars.onComplete = o.vars.onReverseComplete = t), (o.data = "isPause"), (this._hasPause = !0), this.add(o, e);
}),
(g.removeLabel = function (e) {
return delete this._labels[e], this;
}),
(g.getLabelTime = function (e) {
return null != this._labels[e] ? this._labels[e] : -1;
}),
(g._parseTimeOrLabel = function (t, i, n, r) {
var o;
if (r instanceof e && r.timeline === this) this.remove(r);
else if (r && (r instanceof Array || (r.push && c(r))))
for (o = r.length; --o > -1;) r[o] instanceof e && r[o].timeline === this && this.remove(r[o]);
if ("string" == typeof i) return this._parseTimeOrLabel(i, n && "number" == typeof t && null == this._labels[i] ? t - this.duration() : 0, n);
if (((i = i || 0), "string" != typeof t || (!isNaN(t) && null == this._labels[t]))) null == t && (t = this.duration());
else {
if (((o = t.indexOf("=")), -1 === o)) return null == this._labels[t] ? (n ? (this._labels[t] = this.duration() + i) : i) : this._labels[t] + i;
(i = parseInt(t.charAt(o - 1) + "1", 10) * Number(t.substr(o + 1))), (t = o > 1 ? this._parseTimeOrLabel(t.substr(0, o - 1), 0, n) : this.duration());
}
return Number(t) + i;
}),
(g.seek = function (e, t) {
return this.totalTime("number" == typeof e ? e : this._parseTimeOrLabel(e), t !== !1);
}),
(g.stop = function () {
return this.paused(!0);
}),
(g.gotoAndPlay = function (e, t) {
return this.play(e, t);
}),
(g.gotoAndStop = function (e, t) {
return this.pause(e, t);
}),
(g.render = function (e, t, i) {
this._gc && this._enabled(!0, !1);
var n,
r,
a,
s,
l,
c,
d = this._dirty ? this.totalDuration() : this._totalDuration,
f = this._time,
p = this._startTime,
m = this._timeScale,
v = this._paused;
if (e >= d)
(this._totalTime = this._time = d),
this._reversed ||
this._hasPausedChild() ||
((r = !0),
(s = "onComplete"),
(l = !!this._timeline.autoRemoveChildren),
0 === this._duration &&
(0 === e || this._rawPrevTime < 0 || this._rawPrevTime === o) &&
this._rawPrevTime !== e &&
this._first &&
((l = !0), this._rawPrevTime > o && (s = "onReverseComplete"))),
(this._rawPrevTime = this._duration || !t || e || this._rawPrevTime === e ? e : o),
(e = d + 1e-4);
else if (1e-7 > e)
if (
((this._totalTime = this._time = 0),
(0 !== f || (0 === this._duration && this._rawPrevTime !== o && (this._rawPrevTime > 0 || (0 > e && this._rawPrevTime >= 0)))) && ((s = "onReverseComplete"), (r = this._reversed)),
0 > e)
)
(this._active = !1),
this._timeline.autoRemoveChildren && this._reversed ? ((l = r = !0), (s = "onReverseComplete")) : this._rawPrevTime >= 0 && this._first && (l = !0),
(this._rawPrevTime = e);
else {
if (((this._rawPrevTime = this._duration || !t || e || this._rawPrevTime === e ? e : o), 0 === e && r))
for (n = this._first; n && 0 === n._startTime;) n._duration || (r = !1), (n = n._next);
(e = 0), this._initted || (l = !0);
}
else {
if (this._hasPause && !this._forcingPlayhead && !t) {
if (e >= f)
for (n = this._first; n && n._startTime <= e && !c;) n._duration || "isPause" !== n.data || n.ratio || (0 === n._startTime && 0 === this._rawPrevTime) || (c = n), (n = n._next);
else
for (n = this._last; n && n._startTime >= e && !c;) n._duration || ("isPause" === n.data && n._rawPrevTime > 0 && (c = n)), (n = n._prev);
c && ((this._time = e = c._startTime), (this._totalTime = e + this._cycle * (this._totalDuration + this._repeatDelay)));
}
this._totalTime = this._time = this._rawPrevTime = e;
}
if ((this._time !== f && this._first) || i || l || c) {
if (
(this._initted || (this._initted = !0),
this._active || (!this._paused && this._time !== f && e > 0 && (this._active = !0)),
0 === f && this.vars.onStart && 0 !== this._time && (t || this._callback("onStart")),
this._time >= f)
)
for (n = this._first; n && ((a = n._next), !this._paused || v);)
(n._active || (n._startTime <= this._time && !n._paused && !n._gc)) &&
(c === n && this.pause(),
n._reversed ? n.render((n._dirty ? n.totalDuration() : n._totalDuration) - (e - n._startTime) * n._timeScale, t, i) : n.render((e - n._startTime) * n._timeScale, t, i)),
(n = a);
else
for (n = this._last; n && ((a = n._prev), !this._paused || v);) {
if (n._active || (n._startTime <= f && !n._paused && !n._gc)) {
if (c === n) {
for (c = n._prev; c && c.endTime() > this._time;)
c.render(c._reversed ? c.totalDuration() - (e - c._startTime) * c._timeScale : (e - c._startTime) * c._timeScale, t, i), (c = c._prev);
(c = null), this.pause();
}
n._reversed ? n.render((n._dirty ? n.totalDuration() : n._totalDuration) - (e - n._startTime) * n._timeScale, t, i) : n.render((e - n._startTime) * n._timeScale, t, i);
}
n = a;
}
this._onUpdate && (t || (u.length && h(), this._callback("onUpdate"))),
s &&
(this._gc ||
((p === this._startTime || m !== this._timeScale) &&
(0 === this._time || d >= this.totalDuration()) &&
(r && (u.length && h(), this._timeline.autoRemoveChildren && this._enabled(!1, !1), (this._active = !1)), !t && this.vars[s] && this._callback(s))));
}
}),
(g._hasPausedChild = function () {
for (var e = this._first; e;) {
if (e._paused || (e instanceof r && e._hasPausedChild())) return !0;
e = e._next;
}
return !1;
}),
(g.getChildren = function (e, t, i, r) {
r = r || -9999999999;
for (var o = [], a = this._first, s = 0; a;)
a._startTime < r || (a instanceof n ? t !== !1 && (o[s++] = a) : (i !== !1 && (o[s++] = a), e !== !1 && ((o = o.concat(a.getChildren(!0, t, i))), (s = o.length)))), (a = a._next);
return o;
}),
(g.getTweensOf = function (e, t) {
var i,
r,
o = this._gc,
a = [],
s = 0;
for (o && this._enabled(!0, !0), i = n.getTweensOf(e), r = i.length; --r > -1;)(i[r].timeline === this || (t && this._contains(i[r]))) && (a[s++] = i[r]);
return o && this._enabled(!1, !0), a;
}),
(g.recent = function () {
return this._recent;
}),
(g._contains = function (e) {
for (var t = e.timeline; t;) {
if (t === this) return !0;
t = t.timeline;
}
return !1;
}),
(g.shiftChildren = function (e, t, i) {
i = i || 0;
for (var n, r = this._first, o = this._labels; r;) r._startTime >= i && (r._startTime += e), (r = r._next);
if (t)
for (n in o) o[n] >= i && (o[n] += e);
return this._uncache(!0);
}),
(g._kill = function (e, t) {
if (!e && !t) return this._enabled(!1, !1);
for (var i = t ? this.getTweensOf(t) : this.getChildren(!0, !0, !1), n = i.length, r = !1; --n > -1;) i[n]._kill(e, t) && (r = !0);
return r;
}),
(g.clear = function (e) {
var t = this.getChildren(!1, !0, !0),
i = t.length;
for (this._time = this._totalTime = 0; --i > -1;) t[i]._enabled(!1, !1);
return e !== !1 && (this._labels = {}), this._uncache(!0);
}),
(g.invalidate = function () {
for (var t = this._first; t;) t.invalidate(), (t = t._next);
return e.prototype.invalidate.call(this);
}),
(g._enabled = function (e, i) {
if (e === this._gc)
for (var n = this._first; n;) n._enabled(e, !0), (n = n._next);
return t.prototype._enabled.call(this, e, i);
}),
(g.totalTime = function (t, i, n) {
this._forcingPlayhead = !0;
var r = e.prototype.totalTime.apply(this, arguments);
return (this._forcingPlayhead = !1), r;
}),
(g.duration = function (e) {
return arguments.length ? (0 !== this.duration() && 0 !== e && this.timeScale(this._duration / e), this) : (this._dirty && this.totalDuration(), this._duration);
}),
(g.totalDuration = function (e) {
if (!arguments.length) {
if (this._dirty) {
for (var t, i, n = 0, r = this._last, o = 999999999999; r;)
(t = r._prev),
r._dirty && r.totalDuration(),
r._startTime > o && this._sortChildren && !r._paused ? this.add(r, r._startTime - r._delay) : (o = r._startTime),
r._startTime < 0 &&
!r._paused &&
((n -= r._startTime), this._timeline.smoothChildTiming && (this._startTime += r._startTime / this._timeScale), this.shiftChildren(-r._startTime, !1, -9999999999), (o = 0)),
(i = r._startTime + r._totalDuration / r._timeScale),
i > n && (n = i),
(r = t);
(this._duration = this._totalDuration = n), (this._dirty = !1);
}
return this._totalDuration;
}
return 0 !== this.totalDuration() && 0 !== e && this.timeScale(this._totalDuration / e), this;
}),
(g.paused = function (t) {
if (!t)
for (var i = this._first, n = this._time; i;) i._startTime === n && "isPause" === i.data && (i._rawPrevTime = 0), (i = i._next);
return e.prototype.paused.apply(this, arguments);
}),
(g.usesFrames = function () {
for (var t = this._timeline; t._timeline;) t = t._timeline;
return t === e._rootFramesTimeline;
}),
(g.rawTime = function () {
return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale;
}),
r
);
},
!0
),
i._gsDefine(
"TimelineMax",
["TimelineLite", "TweenLite", "easing.Ease"],
function (e, t, i) {
var n = function (t) {
e.call(this, t), (this._repeat = this.vars.repeat || 0), (this._repeatDelay = this.vars.repeatDelay || 0), (this._cycle = 0), (this._yoyo = this.vars.yoyo === !0), (this._dirty = !0);
},
r = 1e-10,
o = t._internals,
a = o.lazyTweens,
s = o.lazyRender,
l = new i(null, null, 1, 0),
c = (n.prototype = new e());
return (
(c.constructor = n),
(c.kill()._gc = !1),
(n.version = "1.18.0"),
(c.invalidate = function () {
return (this._yoyo = this.vars.yoyo === !0), (this._repeat = this.vars.repeat || 0), (this._repeatDelay = this.vars.repeatDelay || 0), this._uncache(!0), e.prototype.invalidate.call(this);
}),
(c.addCallback = function (e, i, n, r) {
return this.add(t.delayedCall(0, e, n, r), i);
}),
(c.removeCallback = function (e, t) {
if (e)
if (null == t) this._kill(null, e);
else
for (var i = this.getTweensOf(e, !1), n = i.length, r = this._parseTimeOrLabel(t); --n > -1;) i[n]._startTime === r && i[n]._enabled(!1, !1);
return this;
}),
(c.removePause = function (t) {
return this.removeCallback(e._internals.pauseCallback, t);
}),
(c.tweenTo = function (e, i) {
i = i || {};
var n,
r,
o,
a = {
ease: l,
useFrames: this.usesFrames(),
immediateRender: !1
};
for (r in i) a[r] = i[r];
return (
(a.time = this._parseTimeOrLabel(e)),
(n = Math.abs(Number(a.time) - this._time) / this._timeScale || 0.001),
(o = new t(this, n, a)),
(a.onStart = function () {
o.target.paused(!0),
o.vars.time !== o.target.time() && n === o.duration() && o.duration(Math.abs(o.vars.time - o.target.time()) / o.target._timeScale),
i.onStart && o._callback("onStart");
}),
o
);
}),
(c.tweenFromTo = function (e, t, i) {
(i = i || {}), (e = this._parseTimeOrLabel(e)), (i.startAt = {
onComplete: this.seek,
onCompleteParams: [e],
callbackScope: this
}), (i.immediateRender = i.immediateRender !== !1);
var n = this.tweenTo(t, i);
return n.duration(Math.abs(n.vars.time - e) / this._timeScale || 0.001);
}),
(c.render = function (e, t, i) {
this._gc && this._enabled(!0, !1);
var n,
o,
l,
c,
u,
h,
d,
f = this._dirty ? this.totalDuration() : this._totalDuration,
p = this._duration,
m = this._time,
v = this._totalTime,
g = this._startTime,
y = this._timeScale,
_ = this._rawPrevTime,
b = this._paused,
x = this._cycle;
if (e >= f)
this._locked || ((this._totalTime = f), (this._cycle = this._repeat)),
this._reversed ||
this._hasPausedChild() ||
((o = !0),
(c = "onComplete"),
(u = !!this._timeline.autoRemoveChildren),
0 === this._duration && (0 === e || 0 > _ || _ === r) && _ !== e && this._first && ((u = !0), _ > r && (c = "onReverseComplete"))),
(this._rawPrevTime = this._duration || !t || e || this._rawPrevTime === e ? e : r),
this._yoyo && 0 !== (1 & this._cycle) ? (this._time = e = 0) : ((this._time = p), (e = p + 1e-4));
else if (1e-7 > e)
if (
(this._locked || (this._totalTime = this._cycle = 0),
(this._time = 0),
(0 !== m || (0 === p && _ !== r && (_ > 0 || (0 > e && _ >= 0)) && !this._locked)) && ((c = "onReverseComplete"), (o = this._reversed)),
0 > e)
)
(this._active = !1), this._timeline.autoRemoveChildren && this._reversed ? ((u = o = !0), (c = "onReverseComplete")) : _ >= 0 && this._first && (u = !0), (this._rawPrevTime = e);
else {
if (((this._rawPrevTime = p || !t || e || this._rawPrevTime === e ? e : r), 0 === e && o))
for (n = this._first; n && 0 === n._startTime;) n._duration || (o = !1), (n = n._next);
(e = 0), this._initted || (u = !0);
}
else if (
(0 === p && 0 > _ && (u = !0),
(this._time = this._rawPrevTime = e),
this._locked ||
((this._totalTime = e),
0 !== this._repeat &&
((h = p + this._repeatDelay),
(this._cycle = (this._totalTime / h) >> 0),
0 !== this._cycle && this._cycle === this._totalTime / h && this._cycle--,
(this._time = this._totalTime - this._cycle * h),
this._yoyo && 0 !== (1 & this._cycle) && (this._time = p - this._time),
this._time > p ? ((this._time = p), (e = p + 1e-4)) : this._time < 0 ? (this._time = e = 0) : (e = this._time))),
this._hasPause && !this._forcingPlayhead && !t)
) {
if (((e = this._time), e >= m))
for (n = this._first; n && n._startTime <= e && !d;) n._duration || "isPause" !== n.data || n.ratio || (0 === n._startTime && 0 === this._rawPrevTime) || (d = n), (n = n._next);
else
for (n = this._last; n && n._startTime >= e && !d;) n._duration || ("isPause" === n.data && n._rawPrevTime > 0 && (d = n)), (n = n._prev);
d && ((this._time = e = d._startTime), (this._totalTime = e + this._cycle * (this._totalDuration + this._repeatDelay)));
}
if (this._cycle !== x && !this._locked) {
var w = this._yoyo && 0 !== (1 & x),
M = w === (this._yoyo && 0 !== (1 & this._cycle)),
T = this._totalTime,
S = this._cycle,
E = this._rawPrevTime,
A = this._time;
if (
((this._totalTime = x * p),
this._cycle < x ? (w = !w) : (this._totalTime += p),
(this._time = m),
(this._rawPrevTime = 0 === p ? _ - 1e-4 : _),
(this._cycle = x),
(this._locked = !0),
(m = w ? 0 : p),
this.render(m, t, 0 === p),
t || this._gc || (this.vars.onRepeat && this._callback("onRepeat")),
M && ((m = w ? p + 1e-4 : -1e-4), this.render(m, !0, !1)),
(this._locked = !1),
this._paused && !b)
)
return;
(this._time = A), (this._totalTime = T), (this._cycle = S), (this._rawPrevTime = E);
}
if (!((this._time !== m && this._first) || i || u || d)) return void(v !== this._totalTime && this._onUpdate && (t || this._callback("onUpdate")));
if (
(this._initted || (this._initted = !0),
this._active || (!this._paused && this._totalTime !== v && e > 0 && (this._active = !0)),
0 === v && this.vars.onStart && 0 !== this._totalTime && (t || this._callback("onStart")),
this._time >= m)
)
for (n = this._first; n && ((l = n._next), !this._paused || b);)
(n._active || (n._startTime <= this._time && !n._paused && !n._gc)) &&
(d === n && this.pause(),
n._reversed ? n.render((n._dirty ? n.totalDuration() : n._totalDuration) - (e - n._startTime) * n._timeScale, t, i) : n.render((e - n._startTime) * n._timeScale, t, i)),
(n = l);
else
for (n = this._last; n && ((l = n._prev), !this._paused || b);) {
if (n._active || (n._startTime <= m && !n._paused && !n._gc)) {
if (d === n) {
for (d = n._prev; d && d.endTime() > this._time;)
d.render(d._reversed ? d.totalDuration() - (e - d._startTime) * d._timeScale : (e - d._startTime) * d._timeScale, t, i), (d = d._prev);
(d = null), this.pause();
}
n._reversed ? n.render((n._dirty ? n.totalDuration() : n._totalDuration) - (e - n._startTime) * n._timeScale, t, i) : n.render((e - n._startTime) * n._timeScale, t, i);
}
n = l;
}
this._onUpdate && (t || (a.length && s(), this._callback("onUpdate"))),
c &&
(this._locked ||
this._gc ||
((g === this._startTime || y !== this._timeScale) &&
(0 === this._time || f >= this.totalDuration()) &&
(o && (a.length && s(), this._timeline.autoRemoveChildren && this._enabled(!1, !1), (this._active = !1)), !t && this.vars[c] && this._callback(c))));
}),
(c.getActive = function (e, t, i) {
null == e && (e = !0), null == t && (t = !0), null == i && (i = !1);
var n,
r,
o = [],
a = this.getChildren(e, t, i),
s = 0,
l = a.length;
for (n = 0; l > n; n++)(r = a[n]), r.isActive() && (o[s++] = r);
return o;
}),
(c.getLabelAfter = function (e) {
e || (0 !== e && (e = this._time));
var t,
i = this.getLabelsArray(),
n = i.length;
for (t = 0; n > t; t++)
if (i[t].time > e) return i[t].name;
return null;
}),
(c.getLabelBefore = function (e) {
null == e && (e = this._time);
for (var t = this.getLabelsArray(), i = t.length; --i > -1;)
if (t[i].time < e) return t[i].name;
return null;
}),
(c.getLabelsArray = function () {
var e,
t = [],
i = 0;
for (e in this._labels) t[i++] = {
time: this._labels[e],
name: e
};
return (
t.sort(function (e, t) {
return e.time - t.time;
}),
t
);
}),
(c.progress = function (e, t) {
return arguments.length ?
this.totalTime(this.duration() * (this._yoyo && 0 !== (1 & this._cycle) ? 1 - e : e) + this._cycle * (this._duration + this._repeatDelay), t) :
this._time / this.duration();
}),
(c.totalProgress = function (e, t) {
return arguments.length ? this.totalTime(this.totalDuration() * e, t) : this._totalTime / this.totalDuration();
}),
(c.totalDuration = function (t) {
return arguments.length ?
-1 === this._repeat ?
this :
this.duration((t - this._repeat * this._repeatDelay) / (this._repeat + 1)) :
(this._dirty && (e.prototype.totalDuration.call(this), (this._totalDuration = -1 === this._repeat ? 999999999999 : this._duration * (this._repeat + 1) + this._repeatDelay * this._repeat)),
this._totalDuration);
}),
(c.time = function (e, t) {
return arguments.length ?
(this._dirty && this.totalDuration(),
e > this._duration && (e = this._duration),
this._yoyo && 0 !== (1 & this._cycle) ?
(e = this._duration - e + this._cycle * (this._duration + this._repeatDelay)) :
0 !== this._repeat && (e += this._cycle * (this._duration + this._repeatDelay)),
this.totalTime(e, t)) :
this._time;
}),
(c.repeat = function (e) {
return arguments.length ? ((this._repeat = e), this._uncache(!0)) : this._repeat;
}),
(c.repeatDelay = function (e) {
return arguments.length ? ((this._repeatDelay = e), this._uncache(!0)) : this._repeatDelay;
}),
(c.yoyo = function (e) {
return arguments.length ? ((this._yoyo = e), this) : this._yoyo;
}),
(c.currentLabel = function (e) {
return arguments.length ? this.seek(e, !0) : this.getLabelBefore(this._time + 1e-8);
}),
n
);
},
!0
),
(function () {
var e = 180 / Math.PI,
t = [],
n = [],
r = [],
o = {},
a = i._gsDefine.globals,
s = function (e, t, i, n) {
(this.a = e), (this.b = t), (this.c = i), (this.d = n), (this.da = n - e), (this.ca = i - e), (this.ba = t - e);
},
l = ",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",
c = function (e, t, i, n) {
var r = {
a: e
},
o = {},
a = {},
s = {
c: n
},
l = (e + t) / 2,
c = (t + i) / 2,
u = (i + n) / 2,
h = (l + c) / 2,
d = (c + u) / 2,
f = (d - h) / 8;
return (r.b = l + (e - l) / 4), (o.b = h + f), (r.c = o.a = (r.b + o.b) / 2), (o.c = a.a = (h + d) / 2), (a.b = d - f), (s.b = u + (n - u) / 4), (a.c = s.a = (a.b + s.b) / 2), [r, o, a, s];
},
u = function (e, i, o, a, s) {
var l,
u,
h,
d,
f,
p,
m,
v,
g,
y,
_,
b,
x,
w = e.length - 1,
M = 0,
T = e[0].a;
for (l = 0; w > l; l++)
(f = e[M]),
(u = f.a),
(h = f.d),
(d = e[M + 1].d),
s ?
((_ = t[l]),
(b = n[l]),
(x = ((b + _) * i * 0.25) / (a ? 0.5 : r[l] || 0.5)),
(p = h - (h - u) * (a ? 0.5 * i : 0 !== _ ? x / _ : 0)),
(m = h + (d - h) * (a ? 0.5 * i : 0 !== b ? x / b : 0)),
(v = h - (p + (((m - p) * ((3 * _) / (_ + b) + 0.5)) / 4 || 0)))) :
((p = h - (h - u) * i * 0.5), (m = h + (d - h) * i * 0.5), (v = h - (p + m) / 2)),
(p += v),
(m += v),
(f.c = g = p),
0 !== l ? (f.b = T) : (f.b = T = f.a + 0.6 * (f.c - f.a)),
(f.da = h - u),
(f.ca = g - u),
(f.ba = T - u),
o ? ((y = c(u, T, g, h)), e.splice(M, 1, y[0], y[1], y[2], y[3]), (M += 4)) : M++,
(T = m);
(f = e[M]), (f.b = T), (f.c = T + 0.4 * (f.d - T)), (f.da = f.d - f.a), (f.ca = f.c - f.a), (f.ba = T - f.a), o && ((y = c(f.a, T, f.c, f.d)), e.splice(M, 1, y[0], y[1], y[2], y[3]));
},
h = function (e, i, r, o) {
var a,
l,
c,
u,
h,
d,
f = [];
if (o)
for (e = [o].concat(e), l = e.length; --l > -1;) "string" == typeof (d = e[l][i]) && "=" === d.charAt(1) && (e[l][i] = o[i] + Number(d.charAt(0) + d.substr(2)));
if (((a = e.length - 2), 0 > a)) return (f[0] = new s(e[0][i], 0, 0, e[-1 > a ? 0 : 1][i])), f;
for (l = 0; a > l; l++)(c = e[l][i]), (u = e[l + 1][i]), (f[l] = new s(c, 0, 0, u)), r && ((h = e[l + 2][i]), (t[l] = (t[l] || 0) + (u - c) * (u - c)), (n[l] = (n[l] || 0) + (h - u) * (h - u)));
return (f[l] = new s(e[l][i], 0, 0, e[l + 1][i])), f;
},
d = function (e, i, a, s, c, d) {
var f,
p,
m,
v,
g,
y,
_,
b,
x = {},
w = [],
M = d || e[0];
(c = "string" == typeof c ? "," + c + "," : l), null == i && (i = 1);
for (p in e[0]) w.push(p);
if (e.length > 1) {
for (b = e[e.length - 1], _ = !0, f = w.length; --f > -1;)
if (((p = w[f]), Math.abs(M[p] - b[p]) > 0.05)) {
_ = !1;
break;
}
_ && ((e = e.concat()), d && e.unshift(d), e.push(e[1]), (d = e[e.length - 3]));
}
for (t.length = n.length = r.length = 0, f = w.length; --f > -1;)(p = w[f]), (o[p] = -1 !== c.indexOf("," + p + ",")), (x[p] = h(e, p, o[p], d));
for (f = t.length; --f > -1;)(t[f] = Math.sqrt(t[f])), (n[f] = Math.sqrt(n[f]));
if (!s) {
for (f = w.length; --f > -1;)
if (o[p])
for (m = x[w[f]], y = m.length - 1, v = 0; y > v; v++)(g = m[v + 1].da / n[v] + m[v].da / t[v]), (r[v] = (r[v] || 0) + g * g);
for (f = r.length; --f > -1;) r[f] = Math.sqrt(r[f]);
}
for (f = w.length, v = a ? 4 : 1; --f > -1;)(p = w[f]), (m = x[p]), u(m, i, a, s, o[p]), _ && (m.splice(0, v), m.splice(m.length - v, v));
return x;
},
f = function (e, t, i) {
t = t || "soft";
var n,
r,
o,
a,
l,
c,
u,
h,
d,
f,
p,
m = {},
v = "cubic" === t ? 3 : 2,
g = "soft" === t,
y = [];
if ((g && i && (e = [i].concat(e)), null == e || e.length < v + 1)) throw "invalid Bezier data";
for (d in e[0]) y.push(d);
for (c = y.length; --c > -1;) {
for (d = y[c], m[d] = l = [], f = 0, h = e.length, u = 0; h > u; u++)
(n = null == i ? e[u][d] : "string" == typeof (p = e[u][d]) && "=" === p.charAt(1) ? i[d] + Number(p.charAt(0) + p.substr(2)) : Number(p)),
g && u > 1 && h - 1 > u && (l[f++] = (n + l[f - 2]) / 2),
(l[f++] = n);
for (h = f - v + 1, f = 0, u = 0; h > u; u += v)
(n = l[u]), (r = l[u + 1]), (o = l[u + 2]), (a = 2 === v ? 0 : l[u + 3]), (l[f++] = p = 3 === v ? new s(n, r, o, a) : new s(n, (2 * r + n) / 3, (2 * r + o) / 3, o));
l.length = f;
}
return m;
},
p = function (e, t, i) {
for (var n, r, o, a, s, l, c, u, h, d, f, p = 1 / i, m = e.length; --m > -1;)
for (d = e[m], o = d.a, a = d.d - o, s = d.c - o, l = d.b - o, n = r = 0, u = 1; i >= u; u++)
(c = p * u), (h = 1 - c), (n = r - (r = (c * c * a + 3 * h * (c * s + h * l)) * c)), (f = m * i + u - 1), (t[f] = (t[f] || 0) + n * n);
},
m = function (e, t) {
t = t >> 0 || 6;
var i,
n,
r,
o,
a = [],
s = [],
l = 0,
c = 0,
u = t - 1,
h = [],
d = [];
for (i in e) p(e[i], a, t);
for (r = a.length, n = 0; r > n; n++)(l += Math.sqrt(a[n])), (o = n % t), (d[o] = l), o === u && ((c += l), (o = (n / t) >> 0), (h[o] = d), (s[o] = c), (l = 0), (d = []));
return {
length: c,
lengths: s,
segments: h
};
},
v = i._gsDefine.plugin({
propName: "bezier",
priority: -1,
version: "1.3.4",
API: 2,
global: !0,
init: function (e, t, i) {
(this._target = e),
t instanceof Array && (t = {
values: t
}),
(this._func = {}),
(this._round = {}),
(this._props = []),
(this._timeRes = null == t.timeResolution ? 6 : parseInt(t.timeResolution, 10));
var n,
r,
o,
a,
s,
l = t.values || [],
c = {},
u = l[0],
h = t.autoRotate || i.vars.orientToBezier;
this._autoRotate = h ? (h instanceof Array ? h : [
["x", "y", "rotation", h === !0 ? 0 : Number(h) || 0]
]) : null;
for (n in u) this._props.push(n);
for (o = this._props.length; --o > -1;)
(n = this._props[o]),
this._overwriteProps.push(n),
(r = this._func[n] = "function" == typeof e[n]),
(c[n] = r ? e[n.indexOf("set") || "function" != typeof e["get" + n.substr(3)] ? n : "get" + n.substr(3)]() : parseFloat(e[n])),
s || (c[n] !== l[0][n] && (s = c));
if (
((this._beziers = "cubic" !== t.type && "quadratic" !== t.type && "soft" !== t.type ? d(l, isNaN(t.curviness) ? 1 : t.curviness, !1, "thruBasic" === t.type, t.correlate, s) : f(l, t.type, c)),
(this._segCount = this._beziers[n].length),
this._timeRes)
) {
var p = m(this._beziers, this._timeRes);
(this._length = p.length),
(this._lengths = p.lengths),
(this._segments = p.segments),
(this._l1 = this._li = this._s1 = this._si = 0),
(this._l2 = this._lengths[0]),
(this._curSeg = this._segments[0]),
(this._s2 = this._curSeg[0]),
(this._prec = 1 / this._curSeg.length);
}
if ((h = this._autoRotate))
for (this._initialRotations = [], h[0] instanceof Array || (this._autoRotate = h = [h]), o = h.length; --o > -1;) {
for (a = 0; 3 > a; a++)(n = h[o][a]), (this._func[n] = "function" == typeof e[n] ? e[n.indexOf("set") || "function" != typeof e["get" + n.substr(3)] ? n : "get" + n.substr(3)] : !1);
(n = h[o][2]), (this._initialRotations[o] = this._func[n] ? this._func[n].call(this._target) : this._target[n]);
}
return (this._startRatio = i.vars.runBackwards ? 1 : 0), !0;
},
set: function (t) {
var i,
n,
r,
o,
a,
s,
l,
c,
u,
h,
d = this._segCount,
f = this._func,
p = this._target,
m = t !== this._startRatio;
if (this._timeRes) {
if (((u = this._lengths), (h = this._curSeg), (t *= this._length), (r = this._li), t > this._l2 && d - 1 > r)) {
for (c = d - 1; c > r && (this._l2 = u[++r]) <= t;);
(this._l1 = u[r - 1]), (this._li = r), (this._curSeg = h = this._segments[r]), (this._s2 = h[(this._s1 = this._si = 0)]);
} else if (t < this._l1 && r > 0) {
for (; r > 0 && (this._l1 = u[--r]) >= t;);
0 === r && t < this._l1 ? (this._l1 = 0) : r++,
(this._l2 = u[r]),
(this._li = r),
(this._curSeg = h = this._segments[r]),
(this._s1 = h[(this._si = h.length - 1) - 1] || 0),
(this._s2 = h[this._si]);
}
if (((i = r), (t -= this._l1), (r = this._si), t > this._s2 && r < h.length - 1)) {
for (c = h.length - 1; c > r && (this._s2 = h[++r]) <= t;);
(this._s1 = h[r - 1]), (this._si = r);
} else if (t < this._s1 && r > 0) {
for (; r > 0 && (this._s1 = h[--r]) >= t;);
0 === r && t < this._s1 ? (this._s1 = 0) : r++, (this._s2 = h[r]), (this._si = r);
}
s = (r + (t - this._s1) / (this._s2 - this._s1)) * this._prec;
} else(i = 0 > t ? 0 : t >= 1 ? d - 1 : (d * t) >> 0), (s = (t - i * (1 / d)) * d);
for (n = 1 - s, r = this._props.length; --r > -1;)
(o = this._props[r]), (a = this._beziers[o][i]), (l = (s * s * a.da + 3 * n * (s * a.ca + n * a.ba)) * s + a.a), this._round[o] && (l = Math.round(l)), f[o] ? p[o](l) : (p[o] = l);
if (this._autoRotate) {
var v,
g,
y,
_,
b,
x,
w,
M = this._autoRotate;
for (r = M.length; --r > -1;)
(o = M[r][2]),
(x = M[r][3] || 0),
(w = M[r][4] === !0 ? 1 : e),
(a = this._beziers[M[r][0]]),
(v = this._beziers[M[r][1]]),
a &&
v &&
((a = a[i]),
(v = v[i]),
(g = a.a + (a.b - a.a) * s),
(_ = a.b + (a.c - a.b) * s),
(g += (_ - g) * s),
(_ += (a.c + (a.d - a.c) * s - _) * s),
(y = v.a + (v.b - v.a) * s),
(b = v.b + (v.c - v.b) * s),
(y += (b - y) * s),
(b += (v.c + (v.d - v.c) * s - b) * s),
(l = m ? Math.atan2(b - y, _ - g) * w + x : this._initialRotations[r]),
f[o] ? p[o](l) : (p[o] = l));
}
},
}),
g = v.prototype;
(v.bezierThrough = d),
(v.cubicToQuadratic = c),
(v._autoCSS = !0),
(v.quadraticToCubic = function (e, t, i) {
return new s(e, (2 * t + e) / 3, (2 * t + i) / 3, i);
}),
(v._cssRegister = function () {
var e = a.CSSPlugin;
if (e) {
var t = e._internals,
i = t._parseToProxy,
n = t._setPluginRatio,
r = t.CSSPropTween;
t._registerComplexSpecialProp("bezier", {
parser: function (e, t, o, a, s, l) {
t instanceof Array && (t = {
values: t
}), (l = new v());
var c,
u,
h,
d = t.values,
f = d.length - 1,
p = [],
m = {};
if (0 > f) return s;
for (c = 0; f >= c; c++)(h = i(e, d[c], a, s, l, f !== c)), (p[c] = h.end);
for (u in t) m[u] = t[u];
return (
(m.values = p),
(s = new r(e, "bezier", 0, 0, h.pt, 2)),
(s.data = h),
(s.plugin = l),
(s.setRatio = n),
0 === m.autoRotate && (m.autoRotate = !0),
!m.autoRotate ||
m.autoRotate instanceof Array ||
((c = m.autoRotate === !0 ? 0 : Number(m.autoRotate)),
(m.autoRotate = null != h.end.left ? [
["left", "top", "rotation", c, !1]
] : null != h.end.x ? [
["x", "y", "rotation", c, !1]
] : !1)),
m.autoRotate && (a._transform || a._enableTransforms(!1), (h.autoRotate = a._target._gsTransform)),
l._onInitTween(h.proxy, m, a._tween),
s
);
},
});
}
}),
(g._roundProps = function (e, t) {
for (var i = this._overwriteProps, n = i.length; --n > -1;)(e[i[n]] || e.bezier || e.bezierThrough) && (this._round[i[n]] = t);
}),
(g._kill = function (e) {
var t,
i,
n = this._props;
for (t in this._beziers)
if (t in e)
for (delete this._beziers[t], delete this._func[t], i = n.length; --i > -1;) n[i] === t && n.splice(i, 1);
return this._super._kill.call(this, e);
});
})(),
i._gsDefine(
"plugins.CSSPlugin",
["plugins.TweenPlugin", "TweenLite"],
function (e, t) {
var n,
r,
o,
a,
s = function () {
e.call(this, "css"), (this._overwriteProps.length = 0), (this.setRatio = s.prototype.setRatio);
},
l = i._gsDefine.globals,
c = {},
u = (s.prototype = new e("css"));
(u.constructor = s),
(s.version = "1.18.0"),
(s.API = 2),
(s.defaultTransformPerspective = 0),
(s.defaultSkewType = "compensated"),
(s.defaultSmoothOrigin = !0),
(u = "px"),
(s.suffixMap = {
top: u,
right: u,
bottom: u,
left: u,
width: u,
height: u,
fontSize: u,
padding: u,
margin: u,
perspective: u,
lineHeight: ""
});
var h,
d,
f,
p,
m,
v,
g = /(?:d|-d|.d|-.d)+/g,
y = /(?:d|-d|.d|-.d|+=d|-=d|+=.d|-=.d)+/g,
_ = /(?:+=|-=|-|b)[d-.]+[a-zA-Z0-9]*(?:%|b)/gi,
b = /(?![+-]?d*.?d+|[+-]|e[+-]d+)[^0-9]/g,
x = /(?:d|-|+|=|#|.)*/g,
w = /opacity *= *([^)]*)/i,
M = /opacity:([^;]*)/i,
T = /alpha(opacity *=.+?)/i,
S = /^(rgb|hsl)/,
E = /([A-Z])/g,
A = /-([a-z])/gi,
C = /(^(?:url("|url())|(?:("))$|)$)/gi,
P = function (e, t) {
return t.toUpperCase();
},
L = /(?:Left|Right|Width)/i,
R = /(M11|M12|M21|M22)=[d-.e]+/gi,
O = /progid:DXImageTransform.Microsoft.Matrix(.+?)/i,
k = /,(?=[^)]*(?:(|$))/gi,
D = Math.PI / 180,
I = 180 / Math.PI,
N = {},
U = document,
j = function (e) {
return U.createElementNS ? U.createElementNS("http://www.w3.org/1999/xhtml", e) : U.createElement(e);
},
B = j("div"),
F = j("img"),
V = (s._internals = {
_specialProps: c
}),
G = navigator.userAgent,
z = (function () {
var e = G.indexOf("Android"),
t = j("a");
return (
(f = -1 !== G.indexOf("Safari") && -1 === G.indexOf("Chrome") && (-1 === e || Number(G.substr(e + 8, 1)) > 3)),
(m = f && Number(G.substr(G.indexOf("Version/") + 8, 1)) < 6),
(p = -1 !== G.indexOf("Firefox")),
(/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(G) || /Trident/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(G)) && (v = parseFloat(RegExp.$1)),
t ? ((t.style.cssText = "top:1px;opacity:.55;"), /^0.55/.test(t.style.opacity)) : !1
);
})(),
$ = function (e) {
return w.test("string" == typeof e ? e : (e.currentStyle ? e.currentStyle.filter : e.style.filter) || "") ? parseFloat(RegExp.$1) / 100 : 1;
},
H = function (e) {
window.console && console.log(e);
},
W = "",
X = "",
Y = function (e, t) {
t = t || B;
var i,
n,
r = t.style;
if (void 0 !== r[e]) return e;
for (e = e.charAt(0).toUpperCase() + e.substr(1), i = ["O", "Moz", "ms", "Ms", "Webkit"], n = 5; --n > -1 && void 0 === r[i[n] + e];);
return n >= 0 ? ((X = 3 === n ? "ms" : i[n]), (W = "-" + X.toLowerCase() + "-"), X + e) : null;
},
q = U.defaultView ? U.defaultView.getComputedStyle : function () {},
Z = (s.getStyle = function (e, t, i, n, r) {
var o;
return z || "opacity" !== t ?
(!n && e.style[t] ?
(o = e.style[t]) :
(i = i || q(e)) ?
(o = i[t] || i.getPropertyValue(t) || i.getPropertyValue(t.replace(E, "-$1").toLowerCase())) :
e.currentStyle && (o = e.currentStyle[t]),
null == r || (o && "none" !== o && "auto" !== o && "auto auto" !== o) ? o : r) :
$(e);
}),
K = (V.convertToPixels = function (e, i, n, r, o) {
if ("px" === r || !r) return n;
if ("auto" === r || !n) return 0;
var a,
l,
c,
u = L.test(i),
h = e,
d = B.style,
f = 0 > n;
if ((f && (n = -n), "%" === r && -1 !== i.indexOf("border"))) a = (n / 100) * (u ? e.clientWidth : e.clientHeight);
else {
if (((d.cssText = "border:0 solid red;position:" + Z(e, "position") + ";line-height:0;"), "%" !== r && h.appendChild && "v" !== r.charAt(0) && "rem" !== r))
d[u ? "borderLeftWidth" : "borderTopWidth"] = n + r;
else {
if (((h = e.parentNode || U.body), (l = h._gsCache), (c = t.ticker.frame), l && u && l.time === c)) return (l.width * n) / 100;
d[u ? "width" : "height"] = n + r;
}
h.appendChild(B),
(a = parseFloat(B[u ? "offsetWidth" : "offsetHeight"])),
h.removeChild(B),
u && "%" === r && s.cacheWidths !== !1 && ((l = h._gsCache = h._gsCache || {}), (l.time = c), (l.width = (a / n) * 100)),
0 !== a || o || (a = K(e, i, n, r, !0));
}
return f ? -a : a;
}),
Q = (V.calculateOffset = function (e, t, i) {
if ("absolute" !== Z(e, "position", i)) return 0;
var n = "left" === t ? "Left" : "Top",
r = Z(e, "margin" + n, i);
return e["offset" + n] - (K(e, t, parseFloat(r), r.replace(x, "")) || 0);
}),
J = function (e, t) {
var i,
n,
r,
o = {};
if ((t = t || q(e, null)))
if ((i = t.length))
for (; --i > -1;)(r = t[i]), (-1 === r.indexOf("-transform") || Ee === r) && (o[r.replace(A, P)] = t.getPropertyValue(r));
else
for (i in t)(-1 === i.indexOf("Transform") || Se === i) && (o[i] = t[i]);
else if ((t = e.currentStyle || e.style))
for (i in t) "string" == typeof i && void 0 === o[i] && (o[i.replace(A, P)] = t[i]);
return (
z || (o.opacity = $(e)),
(n = je(e, t, !1)),
(o.rotation = n.rotation),
(o.skewX = n.skewX),
(o.scaleX = n.scaleX),
(o.scaleY = n.scaleY),
(o.x = n.x),
(o.y = n.y),
Ce && ((o.z = n.z), (o.rotationX = n.rotationX), (o.rotationY = n.rotationY), (o.scaleZ = n.scaleZ)),
o.filters && delete o.filters,
o
);
},
ee = function (e, t, i, n, r) {
var o,
a,
s,
l = {},
c = e.style;
for (a in i)
"cssText" !== a &&
"length" !== a &&
isNaN(a) &&
(t[a] !== (o = i[a]) || (r && r[a])) &&
-1 === a.indexOf("Origin") &&
("number" == typeof o || "string" == typeof o) &&
((l[a] = "auto" !== o || ("left" !== a && "top" !== a) ? (("" !== o && "auto" !== o && "none" !== o) || "string" != typeof t[a] || "" === t[a].replace(b, "") ? o : 0) : Q(e, a)),
void 0 !== c[a] && (s = new me(c, a, c[a], s)));
if (n)
for (a in n) "className" !== a && (l[a] = n[a]);
return {
difs: l,
firstMPT: s
};
},
te = {
width: ["Left", "Right"],
height: ["Top", "Bottom"]
},
ie = ["marginLeft", "marginRight", "marginTop", "marginBottom"],
ne = function (e, t, i) {
var n = parseFloat("width" === t ? e.offsetWidth : e.offsetHeight),
r = te[t],
o = r.length;
for (i = i || q(e, null); --o > -1;)(n -= parseFloat(Z(e, "padding" + r[o], i, !0)) || 0), (n -= parseFloat(Z(e, "border" + r[o] + "Width", i, !0)) || 0);
return n;
},
re = function (e, t) {
if ("contain" === e || "auto" === e || "auto auto" === e) return e + " ";
(null == e || "" === e) && (e = "0 0");
var i = e.split(" "),
n = -1 !== e.indexOf("left") ? "0%" : -1 !== e.indexOf("right") ? "100%" : i[0],
r = -1 !== e.indexOf("top") ? "0%" : -1 !== e.indexOf("bottom") ? "100%" : i[1];
return (
null == r ? (r = "center" === n ? "50%" : "0") : "center" === r && (r = "50%"),
("center" === n || (isNaN(parseFloat(n)) && -1 === (n + "").indexOf("="))) && (n = "50%"),
(e = n + " " + r + (i.length > 2 ? " " + i[2] : "")),
t &&
((t.oxp = -1 !== n.indexOf("%")),
(t.oyp = -1 !== r.indexOf("%")),
(t.oxr = "=" === n.charAt(1)),
(t.oyr = "=" === r.charAt(1)),
(t.ox = parseFloat(n.replace(b, ""))),
(t.oy = parseFloat(r.replace(b, ""))),
(t.v = e)),
t || e
);
},
oe = function (e, t) {
return "string" == typeof e && "=" === e.charAt(1) ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : parseFloat(e) - parseFloat(t);
},
ae = function (e, t) {
return null == e ? t : "string" == typeof e && "=" === e.charAt(1) ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) + t : parseFloat(e);
},
se = function (e, t, i, n) {
var r,
o,
a,
s,
l,
c = 1e-6;
return (
null == e ?
(s = t) :
"number" == typeof e ?
(s = e) :
((r = 360),
(o = e.split("_")),
(l = "=" === e.charAt(1)),
(a = (l ? parseInt(e.charAt(0) + "1", 10) * parseFloat(o[0].substr(2)) : parseFloat(o[0])) * (-1 === e.indexOf("rad") ? 1 : I) - (l ? 0 : t)),
o.length &&
(n && (n[i] = t + a),
-1 !== e.indexOf("short") && ((a %= r), a !== a % (r / 2) && (a = 0 > a ? a + r : a - r)),
-1 !== e.indexOf("_cw") && 0 > a ? (a = ((a + 9999999999 * r) % r) - ((a / r) | 0) * r) : -1 !== e.indexOf("ccw") && a > 0 && (a = ((a - 9999999999 * r) % r) - ((a / r) | 0) * r)),
(s = t + a)),
c > s && s > -c && (s = 0),
s
);
},
le = {
aqua: [0, 255, 255],
lime: [0, 255, 0],
silver: [192, 192, 192],
black: [0, 0, 0],
maroon: [128, 0, 0],
teal: [0, 128, 128],
blue: [0, 0, 255],
navy: [0, 0, 128],
white: [255, 255, 255],
fuchsia: [255, 0, 255],
olive: [128, 128, 0],
yellow: [255, 255, 0],
orange: [255, 165, 0],
gray: [128, 128, 128],
purple: [128, 0, 128],
green: [0, 128, 0],
red: [255, 0, 0],
pink: [255, 192, 203],
cyan: [0, 255, 255],
transparent: [255, 255, 255, 0],
},
ce = function (e, t, i) {
return (e = 0 > e ? e + 1 : e > 1 ? e - 1 : e), (255 * (1 > 6 * e ? t + (i - t) * e * 6 : 0.5 > e ? i : 2 > 3 * e ? t + (i - t) * (2 / 3 - e) * 6 : t) + 0.5) | 0;
},
ue = (s.parseColor = function (e, t) {
var i, n, r, o, a, s, l, c, u, h, d;
if (e)
if ("number" == typeof e) i = [e >> 16, (e >> 8) & 255, 255 & e];
else {
if (("," === e.charAt(e.length - 1) && (e = e.substr(0, e.length - 1)), le[e])) i = le[e];
else if ("#" === e.charAt(0))
4 === e.length && ((n = e.charAt(1)), (r = e.charAt(2)), (o = e.charAt(3)), (e = "#" + n + n + r + r + o + o)),
(e = parseInt(e.substr(1), 16)),
(i = [e >> 16, (e >> 8) & 255, 255 & e]);
else if ("hsl" === e.substr(0, 3))
if (((i = d = e.match(g)), t)) {
if (-1 !== e.indexOf("=")) return e.match(y);
} else
(a = (Number(i[0]) % 360) / 360),
(s = Number(i[1]) / 100),
(l = Number(i[2]) / 100),
(r = 0.5 >= l ? l * (s + 1) : l + s - l * s),
(n = 2 * l - r),
i.length > 3 && (i[3] = Number(e[3])),
(i[0] = ce(a + 1 / 3, n, r)),
(i[1] = ce(a, n, r)),
(i[2] = ce(a - 1 / 3, n, r));
else i = e.match(g) || le.transparent;
(i[0] = Number(i[0])), (i[1] = Number(i[1])), (i[2] = Number(i[2])), i.length > 3 && (i[3] = Number(i[3]));
}
else i = le.black;
return (
t &&
!d &&
((n = i[0] / 255),
(r = i[1] / 255),
(o = i[2] / 255),
(c = Math.max(n, r, o)),
(u = Math.min(n, r, o)),
(l = (c + u) / 2),
c === u ?
(a = s = 0) :
((h = c - u), (s = l > 0.5 ? h / (2 - c - u) : h / (c + u)), (a = c === n ? (r - o) / h + (o > r ? 6 : 0) : c === r ? (o - n) / h + 2 : (n - r) / h + 4), (a *= 60)),
(i[0] = (a + 0.5) | 0),
(i[1] = (100 * s + 0.5) | 0),
(i[2] = (100 * l + 0.5) | 0)),
i
);
}),
he = function (e, t) {
var i,
n,
r,
o = e.match(de) || [],
a = 0,
s = o.length ? "" : e;
for (i = 0; i < o.length; i++)
(n = o[i]),
(r = e.substr(a, e.indexOf(n, a) - a)),
(a += r.length + n.length),
(n = ue(n, t)),
3 === n.length && n.push(1),
(s += r + (t ? "hsla(" + n[0] + "," + n[1] + "%," + n[2] + "%," + n[3] : "rgba(" + n.join(",")) + ")");
return s;
},
de = "(?:\b(?:(?:rgb|rgba|hsl|hsla)\(.+?\))|\B#.+?\b";
for (u in le) de += "|" + u + "\b";
(de = new RegExp(de + ")", "gi")),
(s.colorStringFilter = function (e) {
var t,
i = e[0] + e[1];
(de.lastIndex = 0), de.test(i) && ((t = -1 !== i.indexOf("hsl(") || -1 !== i.indexOf("hsla(")), (e[0] = he(e[0], t)), (e[1] = he(e[1], t)));
}),
t.defaultStringFilter || (t.defaultStringFilter = s.colorStringFilter);
var fe = function (e, t, i, n) {
if (null == e)
return function (e) {
return e;
};
var r,
o = t ? (e.match(de) || [""])[0] : "",
a = e.split(o).join("").match(_) || [],
s = e.substr(0, e.indexOf(a[0])),
l = ")" === e.charAt(e.length - 1) ? ")" : "",
c = -1 !== e.indexOf(" ") ? " " : ",",
u = a.length,
h = u > 0 ? a[0].replace(g, "") : "";
return u ?
(r = t ?
function (e) {
var t, d, f, p;
if ("number" == typeof e) e += h;
else if (n && k.test(e)) {
for (p = e.replace(k, "|").split("|"), f = 0; f < p.length; f++) p[f] = r(p[f]);
return p.join(",");
}
if (((t = (e.match(de) || [o])[0]), (d = e.split(t).join("").match(_) || []), (f = d.length), u > f--))
for (; ++f < u;) d[f] = i ? d[((f - 1) / 2) | 0] : a[f];
return s + d.join(c) + c + t + l + (-1 !== e.indexOf("inset") ? " inset" : "");
} :
function (e) {
var t, o, d;
if ("number" == typeof e) e += h;
else if (n && k.test(e)) {
for (o = e.replace(k, "|").split("|"), d = 0; d < o.length; d++) o[d] = r(o[d]);
return o.join(",");
}
if (((t = e.match(_) || []), (d = t.length), u > d--))
for (; ++d < u;) t[d] = i ? t[((d - 1) / 2) | 0] : a[d];
return s + t.join(c) + l;
}) :
function (e) {
return e;
};
},
pe = function (e) {
return (
(e = e.split(",")),
function (t, i, n, r, o, a, s) {
var l,
c = (i + "").split(" ");
for (s = {}, l = 0; 4 > l; l++) s[e[l]] = c[l] = c[l] || c[((l - 1) / 2) >> 0];
return r.parse(t, s, o, a);
}
);
},
me =
((V._setPluginRatio = function (e) {
this.plugin.setRatio(e);
for (var t, i, n, r, o = this.data, a = o.proxy, s = o.firstMPT, l = 1e-6; s;)(t = a[s.v]), s.r ? (t = Math.round(t)) : l > t && t > -l && (t = 0), (s.t[s.p] = t), (s = s._next);
if ((o.autoRotate && (o.autoRotate.rotation = a.rotation), 1 === e))
for (s = o.firstMPT; s;) {
if (((i = s.t), i.type)) {
if (1 === i.type) {
for (r = i.xs0 + i.s + i.xs1, n = 1; n < i.l; n++) r += i["xn" + n] + i["xs" + (n + 1)];
i.e = r;
}
} else i.e = i.s + i.xs0;
s = s._next;
}
}),
function (e, t, i, n, r) {
(this.t = e), (this.p = t), (this.v = i), (this.r = r), n && ((n._prev = this), (this._next = n));
}),
ve =
((V._parseToProxy = function (e, t, i, n, r, o) {
var a,
s,
l,
c,
u,
h = n,
d = {},
f = {},
p = i._transform,
m = N;
for (i._transform = null, N = t, n = u = i.parse(e, t, n, r), N = m, o && ((i._transform = p), h && ((h._prev = null), h._prev && (h._prev._next = null))); n && n !== h;) {
if (n.type <= 1 && ((s = n.p), (f[s] = n.s + n.c), (d[s] = n.s), o || ((c = new me(n, "s", s, c, n.r)), (n.c = 0)), 1 === n.type))
for (a = n.l; --a > 0;)(l = "xn" + a), (s = n.p + "_" + l), (f[s] = n.data[l]), (d[s] = n[l]), o || (c = new me(n, l, s, c, n.rxp[l]));
n = n._next;
}
return {
proxy: d,
end: f,
firstMPT: c,
pt: u
};
}),
(V.CSSPropTween = function (e, t, i, r, o, s, l, c, u, h, d) {
(this.t = e),
(this.p = t),
(this.s = i),
(this.c = r),
(this.n = l || t),
e instanceof ve || a.push(this.n),
(this.r = c),
(this.type = s || 0),
u && ((this.pr = u), (n = !0)),
(this.b = void 0 === h ? i : h),
(this.e = void 0 === d ? i + r : d),
o && ((this._next = o), (o._prev = this));
})),
ge = function (e, t, i, n, r, o) {
var a = new ve(e, t, i, n - i, r, -1, o);
return (a.b = i), (a.e = a.xs0 = n), a;
},
ye = (s.parseComplex = function (e, t, i, n, r, o, a, s, l, c) {
(i = i || o || ""), (a = new ve(e, t, 0, 0, a, c ? 2 : 1, null, !1, s, i, n)), (n += "");
var u,
d,
f,
p,
m,
v,
_,
b,
x,
w,
M,
T,
S,
E = i.split(", ").join(",").split(" "),
A = n.split(", ").join(",").split(" "),
C = E.length,
P = h !== !1;
for (
(-1 !== n.indexOf(",") || -1 !== i.indexOf(",")) && ((E = E.join(" ").replace(k, ", ").split(" ")), (A = A.join(" ").replace(k, ", ").split(" ")), (C = E.length)),
C !== A.length && ((E = (o || "").split(" ")), (C = E.length)),
a.plugin = l,
a.setRatio = c,
de.lastIndex = 0,
u = 0; C > u; u++
)
if (((p = E[u]), (m = A[u]), (b = parseFloat(p)), b || 0 === b)) a.appendXtra("", b, oe(m, b), m.replace(y, ""), P && -1 !== m.indexOf("px"), !0);
else if (r && de.test(p))
(T = "," === m.charAt(m.length - 1) ? ")," : ")"),
(S = -1 !== m.indexOf("hsl") && z),
(p = ue(p, S)),
(m = ue(m, S)),
(x = p.length + m.length > 6),
x && !z && 0 === m[3] ?
((a["xs" + a.l] += a.l ? " transparent" : "transparent"), (a.e = a.e.split(A[u]).join("transparent"))) :
(z || (x = !1),
S ?
a
.appendXtra(x ? "hsla(" : "hsl(", p[0], oe(m[0], p[0]), ",", !1, !0)
.appendXtra("", p[1], oe(m[1], p[1]), "%,", !1)
.appendXtra("", p[2], oe(m[2], p[2]), x ? "%," : "%" + T, !1) :
a
.appendXtra(x ? "rgba(" : "rgb(", p[0], m[0] - p[0], ",", !0, !0)
.appendXtra("", p[1], m[1] - p[1], ",", !0)
.appendXtra("", p[2], m[2] - p[2], x ? "," : T, !0),
x && ((p = p.length < 4 ? 1 : p[3]), a.appendXtra("", p, (m.length < 4 ? 1 : m[3]) - p, T, !1))),
(de.lastIndex = 0);
else if ((v = p.match(g))) {
if (((_ = m.match(y)), !_ || _.length !== v.length)) return a;
for (f = 0, d = 0; d < v.length; d++)
(M = v[d]), (w = p.indexOf(M, f)), a.appendXtra(p.substr(f, w - f), Number(M), oe(_[d], M), "", P && "px" === p.substr(w + M.length, 2), 0 === d), (f = w + M.length);
a["xs" + a.l] += p.substr(f);
} else a["xs" + a.l] += a.l ? " " + p : p;
if (-1 !== n.indexOf("=") && a.data) {
for (T = a.xs0 + a.data.s, u = 1; u < a.l; u++) T += a["xs" + u] + a.data["xn" + u];
a.e = T + a["xs" + u];
}
return a.l || ((a.type = -1), (a.xs0 = a.e)), a.xfirst || a;
}),
_e = 9;
for (u = ve.prototype, u.l = u.pr = 0; --_e > 0;)(u["xn" + _e] = 0), (u["xs" + _e] = "");
(u.xs0 = ""),
(u._next = u._prev = u.xfirst = u.data = u.plugin = u.setRatio = u.rxp = null),
(u.appendXtra = function (e, t, i, n, r, o) {
var a = this,
s = a.l;
return (
(a["xs" + s] += o && s ? " " + e : e || ""),
i || 0 === s || a.plugin ?
(a.l++,
(a.type = a.setRatio ? 2 : 1),
(a["xs" + a.l] = n || ""),
s > 0 ?
((a.data["xn" + s] = t + i), (a.rxp["xn" + s] = r), (a["xn" + s] = t), a.plugin || ((a.xfirst = new ve(a, "xn" + s, t, i, a.xfirst || a, 0, a.n, r, a.pr)), (a.xfirst.xs0 = 0)), a) :
((a.data = {
s: t + i
}), (a.rxp = {}), (a.s = t), (a.c = i), (a.r = r), a)) :
((a["xs" + s] += t + (n || "")), a)
);
});
var be = function (e, t) {
(t = t || {}),
(this.p = t.prefix ? Y(e) || e : e),
(c[e] = c[this.p] = this),
(this.format = t.formatter || fe(t.defaultValue, t.color, t.collapsible, t.multi)),
t.parser && (this.parse = t.parser),
(this.clrs = t.color),
(this.multi = t.multi),
(this.keyword = t.keyword),
(this.dflt = t.defaultValue),
(this.pr = t.priority || 0);
},
xe = (V._registerComplexSpecialProp = function (e, t, i) {
"object" != typeof t && (t = {
parser: i
});
var n,
r,
o = e.split(","),
a = t.defaultValue;
for (i = i || [a], n = 0; n < o.length; n++)(t.prefix = 0 === n && t.prefix), (t.defaultValue = i[n] || a), (r = new be(o[n], t));
}),
we = function (e) {
if (!c[e]) {
var t = e.charAt(0).toUpperCase() + e.substr(1) + "Plugin";
xe(e, {
parser: function (e, i, n, r, o, a, s) {
var u = l.com.greensock.plugins[t];
return u ? (u._cssRegister(), c[n].parse(e, i, n, r, o, a, s)) : (H("Error: " + t + " js file not loaded."), o);
},
});
}
};
(u = be.prototype),
(u.parseComplex = function (e, t, i, n, r, o) {
var a,
s,
l,
c,
u,
h,
d = this.keyword;
if ((this.multi && (k.test(i) || k.test(t) ? ((s = t.replace(k, "|").split("|")), (l = i.replace(k, "|").split("|"))) : d && ((s = [t]), (l = [i]))), l)) {
for (c = l.length > s.length ? l.length : s.length, a = 0; c > a; a++)
(t = s[a] = s[a] || this.dflt),
(i = l[a] = l[a] || this.dflt),
d && ((u = t.indexOf(d)), (h = i.indexOf(d)), u !== h && (-1 === h ? (s[a] = s[a].split(d).join("")) : -1 === u && (s[a] += " " + d)));
(t = s.join(", ")), (i = l.join(", "));
}
return ye(e, this.p, t, i, this.clrs, this.dflt, n, this.pr, r, o);
}),
(u.parse = function (e, t, i, n, r, a, s) {
return this.parseComplex(e.style, this.format(Z(e, this.p, o, !1, this.dflt)), this.format(t), r, a);
}),
(s.registerSpecialProp = function (e, t, i) {
xe(e, {
parser: function (e, n, r, o, a, s, l) {
var c = new ve(e, r, 0, 0, a, 2, r, !1, i);
return (c.plugin = s), (c.setRatio = t(e, n, o._tween, r)), c;
},
priority: i,
});
}),
(s.useSVGTransformAttr = f || p);
var Me,
Te = "scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),
Se = Y("transform"),
Ee = W + "transform",
Ae = Y("transformOrigin"),
Ce = null !== Y("perspective"),
Pe = (V.Transform = function () {
(this.perspective = parseFloat(s.defaultTransformPerspective) || 0), (this.force3D = s.defaultForce3D !== !1 && Ce ? s.defaultForce3D || "auto" : !1);
}),
Le = window.SVGElement,
Re = function (e, t, i) {
var n,
r = U.createElementNS("http://www.w3.org/2000/svg", e),
o = /([a-z])([A-Z])/g;
for (n in i) r.setAttributeNS(null, n.replace(o, "$1-$2").toLowerCase(), i[n]);
return t.appendChild(r), r;
},
Oe = U.documentElement,
ke = (function () {
var e,
t,
i,
n = v || (/Android/i.test(G) && !window.chrome);
return (
U.createElementNS &&
!n &&
((e = Re("svg", Oe)),
(t = Re("rect", e, {
width: 100,
height: 50,
x: 100
})),
(i = t.getBoundingClientRect().width),
(t.style[Ae] = "50% 50%"),
(t.style[Se] = "scaleX(0.5)"),
(n = i === t.getBoundingClientRect().width && !(p && Ce)),
Oe.removeChild(e)),
n
);
})(),
De = function (e, t, i, n, r) {
var o,
a,
l,
c,
u,
h,
d,
f,
p,
m,
v,
g,
y,
_,
b = e._gsTransform,
x = Ue(e, !0);
b && ((y = b.xOrigin), (_ = b.yOrigin)),
(!n || (o = n.split(" ")).length < 2) &&
((d = e.getBBox()),
(t = re(t).split(" ")),
(o = [
(-1 !== t[0].indexOf("%") ? (parseFloat(t[0]) / 100) * d.width : parseFloat(t[0])) + d.x,
(-1 !== t[1].indexOf("%") ? (parseFloat(t[1]) / 100) * d.height : parseFloat(t[1])) + d.y,
])),
(i.xOrigin = c = parseFloat(o[0])),
(i.yOrigin = u = parseFloat(o[1])),
n &&
x !== Ne &&
((h = x[0]),
(d = x[1]),
(f = x[2]),
(p = x[3]),
(m = x[4]),
(v = x[5]),
(g = h * p - d * f),
(a = c * (p / g) + u * (-f / g) + (f * v - p * m) / g),
(l = c * (-d / g) + u * (h / g) - (h * v - d * m) / g),
(c = i.xOrigin = o[0] = a),
(u = i.yOrigin = o[1] = l)),
b &&
(r || (r !== !1 && s.defaultSmoothOrigin !== !1) ?
((a = c - y), (l = u - _), (b.xOffset += a * x[0] + l * x[2] - a), (b.yOffset += a * x[1] + l * x[3] - l)) :
(b.xOffset = b.yOffset = 0)),
e.setAttribute("data-svg-origin", o.join(" "));
},
Ie = function (e) {
return !!(Le && "function" == typeof e.getBBox && e.getCTM && (!e.parentNode || (e.parentNode.getBBox && e.parentNode.getCTM)));
},
Ne = [1, 0, 0, 1, 0, 0],
Ue = function (e, t) {
var i,
n,
r,
o,
a,
s = e._gsTransform || new Pe(),
l = 1e5;
if (
(Se ?
(n = Z(e, Ee, null, !0)) :
e.currentStyle &&
((n = e.currentStyle.filter.match(R)), (n = n && 4 === n.length ? [n[0].substr(4), Number(n[2].substr(4)), Number(n[1].substr(4)), n[3].substr(4), s.x || 0, s.y || 0].join(",") : "")),
(i = !n || "none" === n || "matrix(1, 0, 0, 1, 0, 0)" === n),
(s.svg || (e.getBBox && Ie(e))) &&
(i && -1 !== (e.style[Se] + "").indexOf("matrix") && ((n = e.style[Se]), (i = 0)),
(r = e.getAttribute("transform")),
i && r && (-1 !== r.indexOf("matrix") ? ((n = r), (i = 0)) : -1 !== r.indexOf("translate") && ((n = "matrix(1,0,0,1," + r.match(/(?:-|b)[d-.e]+b/gi).join(",") + ")"), (i = 0)))),
i)
)
return Ne;
for (r = (n || "").match(/(?:-|b)[d-.e]+b/gi) || [], _e = r.length; --_e > -1;)(o = Number(r[_e])), (r[_e] = (a = o - (o |= 0)) ? ((a * l + (0 > a ? -0.5 : 0.5)) | 0) / l + o : o);
return t && r.length > 6 ? [r[0], r[1], r[4], r[5], r[12], r[13]] : r;
},
je = (V.getTransform = function (e, i, n, r) {
if (e._gsTransform && n && !r) return e._gsTransform;
var a,
l,
c,
u,
h,
d,
f = n ? e._gsTransform || new Pe() : new Pe(),
p = f.scaleX < 0,
m = 2e-5,
v = 1e5,
g = Ce ? parseFloat(Z(e, Ae, i, !1, "0 0 0").split(" ")[2]) || f.zOrigin || 0 : 0,
y = parseFloat(s.defaultTransformPerspective) || 0;
if (((f.svg = !(!e.getBBox || !Ie(e))), f.svg && (De(e, Z(e, Ae, o, !1, "50% 50%") + "", f, e.getAttribute("data-svg-origin")), (Me = s.useSVGTransformAttr || ke)), (a = Ue(e)), a !== Ne)) {
if (16 === a.length) {
var _,
b,
x,
w,
M,
T = a[0],
S = a[1],
E = a[2],
A = a[3],
C = a[4],
P = a[5],
L = a[6],
R = a[7],
O = a[8],
k = a[9],
D = a[10],
N = a[12],
U = a[13],
j = a[14],
B = a[11],
F = Math.atan2(L, D);
f.zOrigin && ((j = -f.zOrigin), (N = O * j - a[12]), (U = k * j - a[13]), (j = D * j + f.zOrigin - a[14])),
(f.rotationX = F * I),
F &&
((w = Math.cos(-F)),
(M = Math.sin(-F)),
(_ = C * w + O * M),
(b = P * w + k * M),
(x = L * w + D * M),
(O = C * -M + O * w),
(k = P * -M + k * w),
(D = L * -M + D * w),
(B = R * -M + B * w),
(C = _),
(P = b),
(L = x)),
(F = Math.atan2(O, D)),
(f.rotationY = F * I),
F &&
((w = Math.cos(-F)),
(M = Math.sin(-F)),
(_ = T * w - O * M),
(b = S * w - k * M),
(x = E * w - D * M),
(k = S * M + k * w),
(D = E * M + D * w),
(B = A * M + B * w),
(T = _),
(S = b),
(E = x)),
(F = Math.atan2(S, T)),
(f.rotation = F * I),
F && ((w = Math.cos(-F)), (M = Math.sin(-F)), (T = T * w + C * M), (b = S * w + P * M), (P = S * -M + P * w), (L = E * -M + L * w), (S = b)),
f.rotationX && Math.abs(f.rotationX) + Math.abs(f.rotation) > 359.9 && ((f.rotationX = f.rotation = 0), (f.rotationY += 180)),
(f.scaleX = ((Math.sqrt(T * T + S * S) * v + 0.5) | 0) / v),
(f.scaleY = ((Math.sqrt(P * P + k * k) * v + 0.5) | 0) / v),
(f.scaleZ = ((Math.sqrt(L * L + D * D) * v + 0.5) | 0) / v),
(f.skewX = 0),
(f.perspective = B ? 1 / (0 > B ? -B : B) : 0),
(f.x = N),
(f.y = U),
(f.z = j),
f.svg && ((f.x -= f.xOrigin - (f.xOrigin * T - f.yOrigin * C)), (f.y -= f.yOrigin - (f.yOrigin * S - f.xOrigin * P)));
} else if ((!Ce || r || !a.length || f.x !== a[4] || f.y !== a[5] || (!f.rotationX && !f.rotationY)) && (void 0 === f.x || "none" !== Z(e, "display", i))) {
var V = a.length >= 6,
G = V ? a[0] : 1,
z = a[1] || 0,
$ = a[2] || 0,
H = V ? a[3] : 1;
(f.x = a[4] || 0),
(f.y = a[5] || 0),
(c = Math.sqrt(G * G + z * z)),
(u = Math.sqrt(H * H + $ * $)),
(h = G || z ? Math.atan2(z, G) * I : f.rotation || 0),
(d = $ || H ? Math.atan2($, H) * I + h : f.skewX || 0),
Math.abs(d) > 90 && Math.abs(d) < 270 && (p ? ((c *= -1), (d += 0 >= h ? 180 : -180), (h += 0 >= h ? 180 : -180)) : ((u *= -1), (d += 0 >= d ? 180 : -180))),
(f.scaleX = c),
(f.scaleY = u),
(f.rotation = h),
(f.skewX = d),
Ce && ((f.rotationX = f.rotationY = f.z = 0), (f.perspective = y), (f.scaleZ = 1)),
f.svg && ((f.x -= f.xOrigin - (f.xOrigin * G + f.yOrigin * $)), (f.y -= f.yOrigin - (f.xOrigin * z + f.yOrigin * H)));
}
f.zOrigin = g;
for (l in f) f[l] < m && f[l] > -m && (f[l] = 0);
}
return (
n &&
((e._gsTransform = f),
f.svg &&
(Me && e.style[Se] ?
t.delayedCall(0.001, function () {
Ge(e.style, Se);
}) :
!Me &&
e.getAttribute("transform") &&
t.delayedCall(0.001, function () {
e.removeAttribute("transform");
}))),
f
);
}),
Be = function (e) {
var t,
i,
n = this.data,
r = -n.rotation * D,
o = r + n.skewX * D,
a = 1e5,
s = ((Math.cos(r) * n.scaleX * a) | 0) / a,
l = ((Math.sin(r) * n.scaleX * a) | 0) / a,
c = ((Math.sin(o) * -n.scaleY * a) | 0) / a,
u = ((Math.cos(o) * n.scaleY * a) | 0) / a,
h = this.t.style,
d = this.t.currentStyle;
if (d) {
(i = l), (l = -c), (c = -i), (t = d.filter), (h.filter = "");
var f,
p,
m = this.t.offsetWidth,
g = this.t.offsetHeight,
y = "absolute" !== d.position,
_ = "progid:DXImageTransform.Microsoft.Matrix(M11=" + s + ", M12=" + l + ", M21=" + c + ", M22=" + u,
b = n.x + (m * n.xPercent) / 100,
M = n.y + (g * n.yPercent) / 100;
if (
(null != n.ox && ((f = (n.oxp ? m * n.ox * 0.01 : n.ox) - m / 2), (p = (n.oyp ? g * n.oy * 0.01 : n.oy) - g / 2), (b += f - (f * s + p * l)), (M += p - (f * c + p * u))),
y ? ((f = m / 2), (p = g / 2), (_ += ", Dx=" + (f - (f * s + p * l) + b) + ", Dy=" + (p - (f * c + p * u) + M) + ")")) : (_ += ", sizingMethod='auto expand')"),
-1 !== t.indexOf("DXImageTransform.Microsoft.Matrix(") ? (h.filter = t.replace(O, _)) : (h.filter = _ + " " + t),
(0 === e || 1 === e) &&
1 === s &&
0 === l &&
0 === c &&
1 === u &&
((y && -1 === _.indexOf("Dx=0, Dy=0")) || (w.test(t) && 100 !== parseFloat(RegExp.$1)) || (-1 === t.indexOf(t.indexOf("Alpha")) && h.removeAttribute("filter"))),
!y)
) {
var T,
S,
E,
A = 8 > v ? 1 : -1;
for (
f = n.ieOffsetX || 0,
p = n.ieOffsetY || 0,
n.ieOffsetX = Math.round((m - ((0 > s ? -s : s) * m + (0 > l ? -l : l) * g)) / 2 + b),
n.ieOffsetY = Math.round((g - ((0 > u ? -u : u) * g + (0 > c ? -c : c) * m)) / 2 + M),
_e = 0; 4 > _e; _e++
)
(S = ie[_e]),
(T = d[S]),
(i = -1 !== T.indexOf("px") ? parseFloat(T) : K(this.t, S, parseFloat(T), T.replace(x, "")) || 0),
(E = i !== n[S] ? (2 > _e ? -n.ieOffsetX : -n.ieOffsetY) : 2 > _e ? f - n.ieOffsetX : p - n.ieOffsetY),
(h[S] = (n[S] = Math.round(i - E * (0 === _e || 2 === _e ? 1 : A))) + "px");
}
}
},
Fe = (V.set3DTransformRatio = V.setTransformRatio = function (e) {
var t,
i,
n,
r,
o,
a,
s,
l,
c,
u,
h,
d,
f,
m,
v,
g,
y,
_,
b,
x,
w,
M,
T,
S = this.data,
E = this.t.style,
A = S.rotation,
C = S.rotationX,
P = S.rotationY,
L = S.scaleX,
R = S.scaleY,
O = S.scaleZ,
k = S.x,
I = S.y,
N = S.z,
U = S.svg,
j = S.perspective,
B = S.force3D;
if (((((1 === e || 0 === e) && "auto" === B && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !B) && !N && !j && !P && !C) || (Me && U) || !Ce)
return void(A || S.skewX || U ?
((A *= D),
(M = S.skewX * D),
(T = 1e5),
(t = Math.cos(A) * L),
(r = Math.sin(A) * L),
(i = Math.sin(A - M) * -R),
(o = Math.cos(A - M) * R),
M && "simple" === S.skewType && ((y = Math.tan(M)), (y = Math.sqrt(1 + y * y)), (i *= y), (o *= y), S.skewY && ((t *= y), (r *= y))),
U &&
((k += S.xOrigin - (S.xOrigin * t + S.yOrigin * i) + S.xOffset),
(I += S.yOrigin - (S.xOrigin * r + S.yOrigin * o) + S.yOffset),
Me && (S.xPercent || S.yPercent) && ((m = this.t.getBBox()), (k += 0.01 * S.xPercent * m.width), (I += 0.01 * S.yPercent * m.height)),
(m = 1e-6),
m > k && k > -m && (k = 0),
m > I && I > -m && (I = 0)),
(b = ((t * T) | 0) / T + "," + ((r * T) | 0) / T + "," + ((i * T) | 0) / T + "," + ((o * T) | 0) / T + "," + k + "," + I + ")"),
U && Me ? this.t.setAttribute("transform", "matrix(" + b) : (E[Se] = (S.xPercent || S.yPercent ? "translate(" + S.xPercent + "%," + S.yPercent + "%) matrix(" : "matrix(") + b)) :
(E[Se] = (S.xPercent || S.yPercent ? "translate(" + S.xPercent + "%," + S.yPercent + "%) matrix(" : "matrix(") + L + ",0,0," + R + "," + k + "," + I + ")"));
if ((p && ((m = 1e-4), m > L && L > -m && (L = O = 2e-5), m > R && R > -m && (R = O = 2e-5), !j || S.z || S.rotationX || S.rotationY || (j = 0)), A || S.skewX))
(A *= D),
(v = t = Math.cos(A)),
(g = r = Math.sin(A)),
S.skewX &&
((A -= S.skewX * D),
(v = Math.cos(A)),
(g = Math.sin(A)),
"simple" === S.skewType && ((y = Math.tan(S.skewX * D)), (y = Math.sqrt(1 + y * y)), (v *= y), (g *= y), S.skewY && ((t *= y), (r *= y)))),
(i = -g),
(o = v);
else {
if (!(P || C || 1 !== O || j || U))
return void(E[Se] =
(S.xPercent || S.yPercent ? "translate(" + S.xPercent + "%," + S.yPercent + "%) translate3d(" : "translate3d(") +
k +
"px," +
I +
"px," +
N +
"px)" +
(1 !== L || 1 !== R ? " scale(" + L + "," + R + ")" : ""));
(t = o = 1), (i = r = 0);
}
(c = 1),
(n = a = s = l = u = h = 0),
(d = j ? -1 / j : 0),
(f = S.zOrigin),
(m = 1e-6),
(x = ","),
(w = "0"),
(A = P * D),
A && ((v = Math.cos(A)), (g = Math.sin(A)), (s = -g), (u = d * -g), (n = t * g), (a = r * g), (c = v), (d *= v), (t *= v), (r *= v)),
(A = C * D),
A &&
((v = Math.cos(A)),
(g = Math.sin(A)),
(y = i * v + n * g),
(_ = o * v + a * g),
(l = c * g),
(h = d * g),
(n = i * -g + n * v),
(a = o * -g + a * v),
(c *= v),
(d *= v),
(i = y),
(o = _)),
1 !== O && ((n *= O), (a *= O), (c *= O), (d *= O)),
1 !== R && ((i *= R), (o *= R), (l *= R), (h *= R)),
1 !== L && ((t *= L), (r *= L), (s *= L), (u *= L)),
(f || U) &&
(f && ((k += n * -f), (I += a * -f), (N += c * -f + f)),
U && ((k += S.xOrigin - (S.xOrigin * t + S.yOrigin * i) + S.xOffset), (I += S.yOrigin - (S.xOrigin * r + S.yOrigin * o) + S.yOffset)),
m > k && k > -m && (k = w),
m > I && I > -m && (I = w),
m > N && N > -m && (N = 0)),
(b = S.xPercent || S.yPercent ? "translate(" + S.xPercent + "%," + S.yPercent + "%) matrix3d(" : "matrix3d("),
(b += (m > t && t > -m ? w : t) + x + (m > r && r > -m ? w : r) + x + (m > s && s > -m ? w : s)),
(b += x + (m > u && u > -m ? w : u) + x + (m > i && i > -m ? w : i) + x + (m > o && o > -m ? w : o)),
C || P ?
((b += x + (m > l && l > -m ? w : l) + x + (m > h && h > -m ? w : h) + x + (m > n && n > -m ? w : n)),
(b += x + (m > a && a > -m ? w : a) + x + (m > c && c > -m ? w : c) + x + (m > d && d > -m ? w : d) + x)) :
(b += ",0,0,0,0,1,0,"),
(b += k + x + I + x + N + x + (j ? 1 + -N / j : 1) + ")"),
(E[Se] = b);
});
(u = Pe.prototype),
(u.x = u.y = u.z = u.skewX = u.skewY = u.rotation = u.rotationX = u.rotationY = u.zOrigin = u.xPercent = u.yPercent = u.xOffset = u.yOffset = 0),
(u.scaleX = u.scaleY = u.scaleZ = 1),
xe(
"transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin", {
parser: function (e, t, i, n, r, a, l) {
if (n._lastParsedTransform === l) return r;
n._lastParsedTransform = l;
var c,
u,
h,
d,
f,
p,
m,
v,
g,
y,
_ = e._gsTransform,
b = e.style,
x = 1e-6,
w = Te.length,
M = l,
T = {},
S = "transformOrigin";
if (
(l.display ? ((d = Z(e, "display")), (b.display = "block"), (c = je(e, o, !0, l.parseTransform)), (b.display = d)) : (c = je(e, o, !0, l.parseTransform)),
(n._transform = c),
"string" == typeof M.transform && Se)
)
(d = B.style),
(d[Se] = M.transform),
(d.display = "block"),
(d.position = "absolute"),
U.body.appendChild(B),
(u = je(B, null, !1)),
U.body.removeChild(B),
u.perspective || (u.perspective = c.perspective),
null != M.xPercent && (u.xPercent = ae(M.xPercent, c.xPercent)),
null != M.yPercent && (u.yPercent = ae(M.yPercent, c.yPercent));
else if ("object" == typeof M) {
if (
((u = {
scaleX: ae(null != M.scaleX ? M.scaleX : M.scale, c.scaleX),
scaleY: ae(null != M.scaleY ? M.scaleY : M.scale, c.scaleY),
scaleZ: ae(M.scaleZ, c.scaleZ),
x: ae(M.x, c.x),
y: ae(M.y, c.y),
z: ae(M.z, c.z),
xPercent: ae(M.xPercent, c.xPercent),
yPercent: ae(M.yPercent, c.yPercent),
perspective: ae(M.transformPerspective, c.perspective),
}),
(v = M.directionalRotation),
null != v)
)
if ("object" == typeof v)
for (d in v) M[d] = v[d];
else M.rotation = v;
"string" == typeof M.x && -1 !== M.x.indexOf("%") && ((u.x = 0), (u.xPercent = ae(M.x, c.xPercent))),
"string" == typeof M.y && -1 !== M.y.indexOf("%") && ((u.y = 0), (u.yPercent = ae(M.y, c.yPercent))),
(u.rotation = se("rotation" in M ? M.rotation : "shortRotation" in M ? M.shortRotation + "_short" : "rotationZ" in M ? M.rotationZ : c.rotation, c.rotation, "rotation", T)),
Ce &&
((u.rotationX = se("rotationX" in M ? M.rotationX : "shortRotationX" in M ? M.shortRotationX + "_short" : c.rotationX || 0, c.rotationX, "rotationX", T)),
(u.rotationY = se("rotationY" in M ? M.rotationY : "shortRotationY" in M ? M.shortRotationY + "_short" : c.rotationY || 0, c.rotationY, "rotationY", T))),
(u.skewX = null == M.skewX ? c.skewX : se(M.skewX, c.skewX)),
(u.skewY = null == M.skewY ? c.skewY : se(M.skewY, c.skewY)),
(h = u.skewY - c.skewY) && ((u.skewX += h), (u.rotation += h));
}
for (
Ce && null != M.force3D && ((c.force3D = M.force3D), (m = !0)),
c.skewType = M.skewType || c.skewType || s.defaultSkewType,
p = c.force3D || c.z || c.rotationX || c.rotationY || u.z || u.rotationX || u.rotationY || u.perspective,
p || null == M.scale || (u.scaleZ = 1);
--w > -1;
)
(i = Te[w]),
(f = u[i] - c[i]),
(f > x || -x > f || null != M[i] || null != N[i]) && ((m = !0), (r = new ve(c, i, c[i], f, r)), i in T && (r.e = T[i]), (r.xs0 = 0), (r.plugin = a), n._overwriteProps.push(r.n));
return (
(f = M.transformOrigin),
c.svg &&
(f || M.svgOrigin) &&
((g = c.xOffset),
(y = c.yOffset),
De(e, re(f), u, M.svgOrigin, M.smoothOrigin),
(r = ge(c, "xOrigin", (_ ? c : u).xOrigin, u.xOrigin, r, S)),
(r = ge(c, "yOrigin", (_ ? c : u).yOrigin, u.yOrigin, r, S)),
(g !== c.xOffset || y !== c.yOffset) && ((r = ge(c, "xOffset", _ ? g : c.xOffset, c.xOffset, r, S)), (r = ge(c, "yOffset", _ ? y : c.yOffset, c.yOffset, r, S))),
(f = Me ? null : "0px 0px")),
(f || (Ce && p && c.zOrigin)) &&
(Se ?
((m = !0),
(i = Ae),
(f = (f || Z(e, i, o, !1, "50% 50%")) + ""),
(r = new ve(b, i, 0, 0, r, -1, S)),
(r.b = b[i]),
(r.plugin = a),
Ce ?
((d = c.zOrigin),
(f = f.split(" ")),
(c.zOrigin = (f.length > 2 && (0 === d || "0px" !== f[2]) ? parseFloat(f[2]) : d) || 0),
(r.xs0 = r.e = f[0] + " " + (f[1] || "50%") + " 0px"),
(r = new ve(c, "zOrigin", 0, 0, r, -1, r.n)),
(r.b = d),
(r.xs0 = r.e = c.zOrigin)) :
(r.xs0 = r.e = f)) :
re(f + "", c)),
m && (n._transformType = (c.svg && Me) || (!p && 3 !== this._transformType) ? 2 : 3),
r
);
},
prefix: !0,
}
),
xe("boxShadow", {
defaultValue: "0px 0px 0px 0px #999",
prefix: !0,
color: !0,
multi: !0,
keyword: "inset"
}),
xe("borderRadius", {
defaultValue: "0px",
parser: function (e, t, i, n, a, s) {
t = this.format(t);
var l,
c,
u,
h,
d,
f,
p,
m,
v,
g,
y,
_,
b,
x,
w,
M,
T = ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomRightRadius", "borderBottomLeftRadius"],
S = e.style;
for (v = parseFloat(e.offsetWidth), g = parseFloat(e.offsetHeight), l = t.split(" "), c = 0; c < T.length; c++)
this.p.indexOf("border") && (T[c] = Y(T[c])),
(d = h = Z(e, T[c], o, !1, "0px")),
-1 !== d.indexOf(" ") && ((h = d.split(" ")), (d = h[0]), (h = h[1])),
(f = u = l[c]),
(p = parseFloat(d)),
(_ = d.substr((p + "").length)),
(b = "=" === f.charAt(1)),
b ?
((m = parseInt(f.charAt(0) + "1", 10)), (f = f.substr(2)), (m *= parseFloat(f)), (y = f.substr((m + "").length - (0 > m ? 1 : 0)) || "")) :
((m = parseFloat(f)), (y = f.substr((m + "").length))),
"" === y && (y = r[i] || _),
y !== _ &&
((x = K(e, "borderLeft", p, _)),
(w = K(e, "borderTop", p, _)),
"%" === y ?
((d = (x / v) * 100 + "%"), (h = (w / g) * 100 + "%")) :
"em" === y ?
((M = K(e, "borderLeft", 1, "em")), (d = x / M + "em"), (h = w / M + "em")) :
((d = x + "px"), (h = w + "px")),
b && ((f = parseFloat(d) + m + y), (u = parseFloat(h) + m + y))),
(a = ye(S, T[c], d + " " + h, f + " " + u, !1, "0px", a));
return a;
},
prefix: !0,
formatter: fe("0px 0px 0px 0px", !1, !0),
}),
xe("backgroundPosition", {
defaultValue: "0 0",
parser: function (e, t, i, n, r, a) {
var s,
l,
c,
u,
h,
d,
f = "background-position",
p = o || q(e, null),
m = this.format(
(p ? (v ? p.getPropertyValue(f + "-x") + " " + p.getPropertyValue(f + "-y") : p.getPropertyValue(f)) : e.currentStyle.backgroundPositionX + " " + e.currentStyle.backgroundPositionY) ||
"0 0"
),
g = this.format(t);
if ((-1 !== m.indexOf("%")) != (-1 !== g.indexOf("%")) && ((d = Z(e, "backgroundImage").replace(C, "")), d && "none" !== d)) {
for (s = m.split(" "), l = g.split(" "), F.setAttribute("src", d), c = 2; --c > -1;)
(m = s[c]),
(u = -1 !== m.indexOf("%")),
u !== (-1 !== l[c].indexOf("%")) &&
((h = 0 === c ? e.offsetWidth - F.width : e.offsetHeight - F.height), (s[c] = u ? (parseFloat(m) / 100) * h + "px" : (parseFloat(m) / h) * 100 + "%"));
m = s.join(" ");
}
return this.parseComplex(e.style, m, g, r, a);
},
formatter: re,
}),
xe("backgroundSize", {
defaultValue: "0 0",
formatter: re
}),
xe("perspective", {
defaultValue: "0px",
prefix: !0
}),
xe("perspectiveOrigin", {
defaultValue: "50% 50%",
prefix: !0
}),
xe("transformStyle", {
prefix: !0
}),
xe("backfaceVisibility", {
prefix: !0
}),
xe("userSelect", {
prefix: !0
}),
xe("margin", {
parser: pe("marginTop,marginRight,marginBottom,marginLeft")
}),
xe("padding", {
parser: pe("paddingTop,paddingRight,paddingBottom,paddingLeft")
}),
xe("clip", {
defaultValue: "rect(0px,0px,0px,0px)",
parser: function (e, t, i, n, r, a) {
var s, l, c;
return (
9 > v ?
((l = e.currentStyle), (c = 8 > v ? " " : ","), (s = "rect(" + l.clipTop + c + l.clipRight + c + l.clipBottom + c + l.clipLeft + ")"), (t = this.format(t).split(",").join(c))) :
((s = this.format(Z(e, this.p, o, !1, this.dflt))), (t = this.format(t))),
this.parseComplex(e.style, s, t, r, a)
);
},
}),
xe("textShadow", {
defaultValue: "0px 0px 0px #999",
color: !0,
multi: !0
}),
xe("autoRound,strictUnits", {
parser: function (e, t, i, n, r) {
return r;
},
}),
xe("border", {
defaultValue: "0px solid #000",
parser: function (e, t, i, n, r, a) {
return this.parseComplex(
e.style,
this.format(Z(e, "borderTopWidth", o, !1, "0px") + " " + Z(e, "borderTopStyle", o, !1, "solid") + " " + Z(e, "borderTopColor", o, !1, "#000")),
this.format(t),
r,
a
);
},
color: !0,
formatter: function (e) {
var t = e.split(" ");
return t[0] + " " + (t[1] || "solid") + " " + (e.match(de) || ["#000"])[0];
},
}),
xe("borderWidth", {
parser: pe("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")
}),
xe("float,cssFloat,styleFloat", {
parser: function (e, t, i, n, r, o) {
var a = e.style,
s = "cssFloat" in a ? "cssFloat" : "styleFloat";
return new ve(a, s, 0, 0, r, -1, i, !1, 0, a[s], t);
},
});
var Ve = function (e) {
var t,
i = this.t,
n = i.filter || Z(this.data, "filter") || "",
r = (this.s + this.c * e) | 0;
100 === r &&
(-1 === n.indexOf("atrix(") && -1 === n.indexOf("radient(") && -1 === n.indexOf("oader(") ?
(i.removeAttribute("filter"), (t = !Z(this.data, "filter"))) :
((i.filter = n.replace(T, "")), (t = !0))),
t ||
(this.xn1 && (i.filter = n = n || "alpha(opacity=" + r + ")"),
-1 === n.indexOf("pacity") ? (0 === r && this.xn1) || (i.filter = n + " alpha(opacity=" + r + ")") : (i.filter = n.replace(w, "opacity=" + r)));
};
xe("opacity,alpha,autoAlpha", {
defaultValue: "1",
parser: function (e, t, i, n, r, a) {
var s = parseFloat(Z(e, "opacity", o, !1, "1")),
l = e.style,
c = "autoAlpha" === i;
return (
"string" == typeof t && "=" === t.charAt(1) && (t = ("-" === t.charAt(0) ? -1 : 1) * parseFloat(t.substr(2)) + s),
c && 1 === s && "hidden" === Z(e, "visibility", o) && 0 !== t && (s = 0),
z ?
(r = new ve(l, "opacity", s, t - s, r)) :
((r = new ve(l, "opacity", 100 * s, 100 * (t - s), r)),
(r.xn1 = c ? 1 : 0),
(l.zoom = 1),
(r.type = 2),
(r.b = "alpha(opacity=" + r.s + ")"),
(r.e = "alpha(opacity=" + (r.s + r.c) + ")"),
(r.data = e),
(r.plugin = a),
(r.setRatio = Ve)),
c &&
((r = new ve(l, "visibility", 0, 0, r, -1, null, !1, 0, 0 !== s ? "inherit" : "hidden", 0 === t ? "hidden" : "inherit")),
(r.xs0 = "inherit"),
n._overwriteProps.push(r.n),
n._overwriteProps.push(i)),
r
);
},
});
var Ge = function (e, t) {
t && (e.removeProperty ? (("ms" === t.substr(0, 2) || "webkit" === t.substr(0, 6)) && (t = "-" + t), e.removeProperty(t.replace(E, "-$1").toLowerCase())) : e.removeAttribute(t));
},
ze = function (e) {
if (((this.t._gsClassPT = this), 1 === e || 0 === e)) {
this.t.setAttribute("class", 0 === e ? this.b : this.e);
for (var t = this.data, i = this.t.style; t;) t.v ? (i[t.p] = t.v) : Ge(i, t.p), (t = t._next);
1 === e && this.t._gsClassPT === this && (this.t._gsClassPT = null);
} else this.t.getAttribute("class") !== this.e && this.t.setAttribute("class", this.e);
};
xe("className", {
parser: function (e, t, i, r, a, s, l) {
var c,
u,
h,
d,
f,
p = e.getAttribute("class") || "",
m = e.style.cssText;
if (((a = r._classNamePT = new ve(e, i, 0, 0, a, 2)), (a.setRatio = ze), (a.pr = -11), (n = !0), (a.b = p), (u = J(e, o)), (h = e._gsClassPT))) {
for (d = {}, f = h.data; f;)(d[f.p] = 1), (f = f._next);
h.setRatio(1);
}
return (
(e._gsClassPT = a),
(a.e = "=" !== t.charAt(1) ? t : p.replace(new RegExp("\s*\b" + t.substr(2) + "\b"), "") + ("+" === t.charAt(0) ? " " + t.substr(2) : "")),
e.setAttribute("class", a.e),
(c = ee(e, u, J(e), l, d)),
e.setAttribute("class", p),
(a.data = c.firstMPT),
(e.style.cssText = m),
(a = a.xfirst = r.parse(e, c.difs, a, s))
);
},
});
var $e = function (e) {
if ((1 === e || 0 === e) && this.data._totalTime === this.data._totalDuration && "isFromStart" !== this.data.data) {
var t,
i,
n,
r,
o,
a = this.t.style,
s = c.transform.parse;
if ("all" === this.e)(a.cssText = ""), (r = !0);
else
for (t = this.e.split(" ").join("").split(","), n = t.length; --n > -1;)(i = t[n]), c[i] && (c[i].parse === s ? (r = !0) : (i = "transformOrigin" === i ? Ae : c[i].p)), Ge(a, i);
r && (Ge(a, Se), (o = this.t._gsTransform), o && (o.svg && this.t.removeAttribute("data-svg-origin"), delete this.t._gsTransform));
}
};
for (
xe("clearProps", {
parser: function (e, t, i, r, o) {
return (o = new ve(e, i, 0, 0, o, 2)), (o.setRatio = $e), (o.e = t), (o.pr = -10), (o.data = r._tween), (n = !0), o;
},
}),
u = "bezier,throwProps,physicsProps,physics2D".split(","),
_e = u.length; _e--;
)
we(u[_e]);
(u = s.prototype),
(u._firstPT = u._lastParsedTransform = u._transform = null),
(u._onInitTween = function (e, t, i) {
if (!e.nodeType) return !1;
(this._target = e), (this._tween = i), (this._vars = t), (h = t.autoRound), (n = !1), (r = t.suffixMap || s.suffixMap), (o = q(e, "")), (a = this._overwriteProps);
var l,
u,
p,
v,
g,
y,
_,
b,
x,
w = e.style;
if (
(d && "" === w.zIndex && ((l = Z(e, "zIndex", o)), ("auto" === l || "" === l) && this._addLazySet(w, "zIndex", 0)),
"string" == typeof t &&
((v = w.cssText), (l = J(e, o)), (w.cssText = v + ";" + t), (l = ee(e, l, J(e)).difs), !z && M.test(t) && (l.opacity = parseFloat(RegExp.$1)), (t = l), (w.cssText = v)),
t.className ? (this._firstPT = u = c.className.parse(e, t.className, "className", this, null, null, t)) : (this._firstPT = u = this.parse(e, t, null)),
this._transformType)
) {
for (
x = 3 === this._transformType,
Se ?
f &&
((d = !0),
"" === w.zIndex && ((_ = Z(e, "zIndex", o)), ("auto" === _ || "" === _) && this._addLazySet(w, "zIndex", 0)),
m && this._addLazySet(w, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (x ? "visible" : "hidden"))) :
(w.zoom = 1),
p = u; p && p._next;
)
p = p._next;
(b = new ve(e, "transform", 0, 0, null, 2)), this._linkCSSP(b, null, p), (b.setRatio = Se ? Fe : Be), (b.data = this._transform || je(e, o, !0)), (b.tween = i), (b.pr = -1), a.pop();
}
if (n) {
for (; u;) {
for (y = u._next, p = v; p && p.pr > u.pr;) p = p._next;
(u._prev = p ? p._prev : g) ? (u._prev._next = u) : (v = u), (u._next = p) ? (p._prev = u) : (g = u), (u = y);
}
this._firstPT = v;
}
return !0;
}),
(u.parse = function (e, t, i, n) {
var a,
s,
l,
u,
d,
f,
p,
m,
v,
g,
y = e.style;
for (a in t)
(f = t[a]),
(s = c[a]),
s ?
(i = s.parse(e, f, a, this, i, n, t)) :
((d = Z(e, a, o) + ""),
(v = "string" == typeof f),
"color" === a || "fill" === a || "stroke" === a || -1 !== a.indexOf("Color") || (v && S.test(f)) ?
(v || ((f = ue(f)), (f = (f.length > 3 ? "rgba(" : "rgb(") + f.join(",") + ")")), (i = ye(y, a, d, f, !0, "transparent", i, 0, n))) :
!v || (-1 === f.indexOf(" ") && -1 === f.indexOf(",")) ?
((l = parseFloat(d)),
(p = l || 0 === l ? d.substr((l + "").length) : ""),
("" === d || "auto" === d) &&
("width" === a || "height" === a ?
((l = ne(e, a, o)), (p = "px")) :
"left" === a || "top" === a ?
((l = Q(e, a, o)), (p = "px")) :
((l = "opacity" !== a ? 0 : 1), (p = ""))),
(g = v && "=" === f.charAt(1)),
g ? ((u = parseInt(f.charAt(0) + "1", 10)), (f = f.substr(2)), (u *= parseFloat(f)), (m = f.replace(x, ""))) : ((u = parseFloat(f)), (m = v ? f.replace(x, "") : "")),
"" === m && (m = a in r ? r[a] : p),
(f = u || 0 === u ? (g ? u + l : u) + m : t[a]),
p !== m &&
"" !== m &&
(u || 0 === u) &&
l &&
((l = K(e, a, l, p)),
"%" === m ?
((l /= K(e, a, 100, "%") / 100), t.strictUnits !== !0 && (d = l + "%")) :
"em" === m || "rem" === m ?
(l /= K(e, a, 1, m)) :
"px" !== m && ((u = K(e, a, u, m)), (m = "px")),
g && (u || 0 === u) && (f = u + l + m)),
g && (u += l),
(!l && 0 !== l) || (!u && 0 !== u) ?
void 0 !== y[a] && (f || (f + "" != "NaN" && null != f)) ?
((i = new ve(y, a, u || l || 0, 0, i, -1, a, !1, 0, d, f)), (i.xs0 = "none" !== f || ("display" !== a && -1 === a.indexOf("Style")) ? f : d)) :
H("invalid " + a + " tween value: " + t[a]) :
((i = new ve(y, a, l, u - l, i, 0, a, h !== !1 && ("px" === m || "zIndex" === a), 0, d, f)), (i.xs0 = m))) :
(i = ye(y, a, d, f, !0, null, i, 0, n))),
n && i && !i.plugin && (i.plugin = n);
return i;
}),
(u.setRatio = function (e) {
var t,
i,
n,
r = this._firstPT,
o = 1e-6;
if (1 !== e || (this._tween._time !== this._tween._duration && 0 !== this._tween._time))
if (e || (this._tween._time !== this._tween._duration && 0 !== this._tween._time) || this._tween._rawPrevTime === -1e-6)
for (; r;) {
if (((t = r.c * e + r.s), r.r ? (t = Math.round(t)) : o > t && t > -o && (t = 0), r.type))
if (1 === r.type)
if (((n = r.l), 2 === n)) r.t[r.p] = r.xs0 + t + r.xs1 + r.xn1 + r.xs2;
else if (3 === n) r.t[r.p] = r.xs0 + t + r.xs1 + r.xn1 + r.xs2 + r.xn2 + r.xs3;
else if (4 === n) r.t[r.p] = r.xs0 + t + r.xs1 + r.xn1 + r.xs2 + r.xn2 + r.xs3 + r.xn3 + r.xs4;
else if (5 === n) r.t[r.p] = r.xs0 + t + r.xs1 + r.xn1 + r.xs2 + r.xn2 + r.xs3 + r.xn3 + r.xs4 + r.xn4 + r.xs5;
else {
for (i = r.xs0 + t + r.xs1, n = 1; n < r.l; n++) i += r["xn" + n] + r["xs" + (n + 1)];
r.t[r.p] = i;
} else -1 === r.type ? (r.t[r.p] = r.xs0) : r.setRatio && r.setRatio(e);
else r.t[r.p] = t + r.xs0;
r = r._next;
}
else
for (; r;) 2 !== r.type ? (r.t[r.p] = r.b) : r.setRatio(e), (r = r._next);
else
for (; r;) {
if (2 !== r.type)
if (r.r && -1 !== r.type)
if (((t = Math.round(r.s + r.c)), r.type)) {
if (1 === r.type) {
for (n = r.l, i = r.xs0 + t + r.xs1, n = 1; n < r.l; n++) i += r["xn" + n] + r["xs" + (n + 1)];
r.t[r.p] = i;
}
} else r.t[r.p] = t + r.xs0;
else r.t[r.p] = r.e;
else r.setRatio(e);
r = r._next;
}
}),
(u._enableTransforms = function (e) {
(this._transform = this._transform || je(this._target, o, !0)), (this._transformType = (this._transform.svg && Me) || (!e && 3 !== this._transformType) ? 2 : 3);
});
var He = function (e) {
(this.t[this.p] = this.e), this.data._linkCSSP(this, this._next, null, !0);
};
(u._addLazySet = function (e, t, i) {
var n = (this._firstPT = new ve(e, t, 0, 0, this._firstPT, 2));
(n.e = i), (n.setRatio = He), (n.data = this);
}),
(u._linkCSSP = function (e, t, i, n) {
return (
e &&
(t && (t._prev = e),
e._next && (e._next._prev = e._prev),
e._prev ? (e._prev._next = e._next) : this._firstPT === e && ((this._firstPT = e._next), (n = !0)),
i ? (i._next = e) : n || null !== this._firstPT || (this._firstPT = e),
(e._next = t),
(e._prev = i)),
e
);
}),
(u._kill = function (t) {
var i,
n,
r,
o = t;
if (t.autoAlpha || t.alpha) {
o = {};
for (n in t) o[n] = t[n];
(o.opacity = 1), o.autoAlpha && (o.visibility = 1);
}
return (
t.className &&
(i = this._classNamePT) &&
((r = i.xfirst),
r && r._prev ? this._linkCSSP(r._prev, i._next, r._prev._prev) : r === this._firstPT && (this._firstPT = i._next),
i._next && this._linkCSSP(i._next, i._next._next, r._prev),
(this._classNamePT = null)),
e.prototype._kill.call(this, o)
);
});
var We = function (e, t, i) {
var n, r, o, a;
if (e.slice)
for (r = e.length; --r > -1;) We(e[r], t, i);
else
for (n = e.childNodes, r = n.length; --r > -1;)(o = n[r]), (a = o.type), o.style && (t.push(J(o)), i && i.push(o)), (1 !== a && 9 !== a && 11 !== a) || !o.childNodes.length || We(o, t, i);
};
return (
(s.cascadeTo = function (e, i, n) {
var r,
o,
a,
s,
l = t.to(e, i, n),
c = [l],
u = [],
h = [],
d = [],
f = t._internals.reservedProps;
for (e = l._targets || l.target, We(e, u, d), l.render(i, !0, !0), We(e, h), l.render(0, !0, !0), l._enabled(!0), r = d.length; --r > -1;)
if (((o = ee(d[r], u[r], h[r])), o.firstMPT)) {
o = o.difs;
for (a in n) f[a] && (o[a] = n[a]);
s = {};
for (a in o) s[a] = u[r][a];
c.push(t.fromTo(d[r], i, s, o));
}
return c;
}),
e.activate([s]),
s
);
},
!0
),
(function () {
var e = i._gsDefine.plugin({
propName: "roundProps",
version: "1.5",
priority: -1,
API: 2,
init: function (e, t, i) {
return (this._tween = i), !0;
},
}),
t = function (e) {
for (; e;) e.f || e.blob || (e.r = 1), (e = e._next);
},
n = e.prototype;
(n._onInitAllProps = function () {
for (var e, i, n, r = this._tween, o = r.vars.roundProps.join ? r.vars.roundProps : r.vars.roundProps.split(","), a = o.length, s = {}, l = r._propLookup.roundProps; --a > -1;) s[o[a]] = 1;
for (a = o.length; --a > -1;)
for (e = o[a], i = r._firstPT; i;)
(n = i._next),
i.pg ?
i.t._roundProps(s, !0) :
i.n === e &&
(2 === i.f && i.t ?
t(i.t._firstPT) :
(this._add(i.t, e, i.s, i.c), n && (n._prev = i._prev), i._prev ? (i._prev._next = n) : r._firstPT === i && (r._firstPT = n), (i._next = i._prev = null), (r._propLookup[e] = l))),
(i = n);
return !1;
}),
(n._add = function (e, t, i, n) {
this._addTween(e, t, i, i + n, t, !0), this._overwriteProps.push(t);
});
})(),
(function () {
i._gsDefine.plugin({
propName: "attr",
API: 2,
version: "0.5.0",
init: function (e, t, i) {
var n;
if ("function" != typeof e.setAttribute) return !1;
for (n in t) this._addTween(e, "setAttribute", e.getAttribute(n) + "", t[n] + "", n, !1, n), this._overwriteProps.push(n);
return !0;
},
});
})(),
(i._gsDefine.plugin({
propName: "directionalRotation",
version: "0.2.1",
API: 2,
init: function (e, t, i) {
"object" != typeof t && (t = {
rotation: t
}), (this.finals = {});
var n,
r,
o,
a,
s,
l,
c = t.useRadians === !0 ? 2 * Math.PI : 360,
u = 1e-6;
for (n in t)
"useRadians" !== n &&
((l = (t[n] + "").split("_")),
(r = l[0]),
(o = parseFloat("function" != typeof e[n] ? e[n] : e[n.indexOf("set") || "function" != typeof e["get" + n.substr(3)] ? n : "get" + n.substr(3)]())),
(a = this.finals[n] = "string" == typeof r && "=" === r.charAt(1) ? o + parseInt(r.charAt(0) + "1", 10) * Number(r.substr(2)) : Number(r) || 0),
(s = a - o),
l.length &&
((r = l.join("_")),
-1 !== r.indexOf("short") && ((s %= c), s !== s % (c / 2) && (s = 0 > s ? s + c : s - c)),
-1 !== r.indexOf("_cw") && 0 > s ? (s = ((s + 9999999999 * c) % c) - ((s / c) | 0) * c) : -1 !== r.indexOf("ccw") && s > 0 && (s = ((s - 9999999999 * c) % c) - ((s / c) | 0) * c)),
(s > u || -u > s) && (this._addTween(e, n, o, o + s, n), this._overwriteProps.push(n)));
return !0;
},
set: function (e) {
var t;
if (1 !== e) this._super.setRatio.call(this, e);
else
for (t = this._firstPT; t;) t.f ? t.t[t.p](this.finals[t.p]) : (t.t[t.p] = this.finals[t.p]), (t = t._next);
},
})._autoCSS = !0),
i._gsDefine(
"easing.Back",
["easing.Ease"],
function (e) {
var t,
n,
r,
o = i.GreenSockGlobals || i,
a = o.com.greensock,
s = 2 * Math.PI,
l = Math.PI / 2,
c = a._class,
u = function (t, i) {
var n = c("easing." + t, function () {}, !0),
r = (n.prototype = new e());
return (r.constructor = n), (r.getRatio = i), n;
},
h = e.register || function () {},
d = function (e, t, i, n, r) {
var o = c("easing." + e, {
easeOut: new t(),
easeIn: new i(),
easeInOut: new n()
}, !0);
return h(o, e), o;
},
f = function (e, t, i) {
(this.t = e), (this.v = t), i && ((this.next = i), (i.prev = this), (this.c = i.v - t), (this.gap = i.t - e));
},
p = function (t, i) {
var n = c(
"easing." + t,
function (e) {
(this._p1 = e || 0 === e ? e : 1.70158), (this._p2 = 1.525 * this._p1);
},
!0
),
r = (n.prototype = new e());
return (
(r.constructor = n),
(r.getRatio = i),
(r.config = function (e) {
return new n(e);
}),
n
);
},
m = d(
"Back",
p("BackOut", function (e) {
return (e -= 1) * e * ((this._p1 + 1) * e + this._p1) + 1;
}),
p("BackIn", function (e) {
return e * e * ((this._p1 + 1) * e - this._p1);
}),
p("BackInOut", function (e) {
return (e *= 2) < 1 ? 0.5 * e * e * ((this._p2 + 1) * e - this._p2) : 0.5 * ((e -= 2) * e * ((this._p2 + 1) * e + this._p2) + 2);
})
),
v = c(
"easing.SlowMo",
function (e, t, i) {
(t = t || 0 === t ? t : 0.7),
null == e ? (e = 0.7) : e > 1 && (e = 1),
(this._p = 1 !== e ? t : 0),
(this._p1 = (1 - e) / 2),
(this._p2 = e),
(this._p3 = this._p1 + this._p2),
(this._calcEnd = i === !0);
},
!0
),
g = (v.prototype = new e());
return (
(g.constructor = v),
(g.getRatio = function (e) {
var t = e + (0.5 - e) * this._p;
return e < this._p1 ?
this._calcEnd ?
1 - (e = 1 - e / this._p1) * e :
t - (e = 1 - e / this._p1) * e * e * e * t :
e > this._p3 ?
this._calcEnd ?
1 - (e = (e - this._p3) / this._p1) * e :
t + (e - t) * (e = (e - this._p3) / this._p1) * e * e * e :
this._calcEnd ?
1 :
t;
}),
(v.ease = new v(0.7, 0.7)),
(g.config = v.config = function (e, t, i) {
return new v(e, t, i);
}),
(t = c(
"easing.SteppedEase",
function (e) {
(e = e || 1), (this._p1 = 1 / e), (this._p2 = e + 1);
},
!0
)),
(g = t.prototype = new e()),
(g.constructor = t),
(g.getRatio = function (e) {
return 0 > e ? (e = 0) : e >= 1 && (e = 0.999999999), ((this._p2 * e) >> 0) * this._p1;
}),
(g.config = t.config = function (e) {
return new t(e);
}),
(n = c(
"easing.RoughEase",
function (t) {
t = t || {};
for (
var i,
n,
r,
o,
a,
s,
l = t.taper || "none",
c = [],
u = 0,
h = 0 | (t.points || 20),
d = h,
p = t.randomize !== !1,
m = t.clamp === !0,
v = t.template instanceof e ? t.template : null,
g = "number" == typeof t.strength ? 0.4 * t.strength : 0.4;
--d > -1;
)
(i = p ? Math.random() : (1 / h) * d),
(n = v ? v.getRatio(i) : i),
"none" === l ?
(r = g) :
"out" === l ?
((o = 1 - i), (r = o * o * g)) :
"in" === l ?
(r = i * i * g) :
0.5 > i ?
((o = 2 * i), (r = o * o * 0.5 * g)) :
((o = 2 * (1 - i)), (r = o * o * 0.5 * g)),
p ? (n += Math.random() * r - 0.5 * r) : d % 2 ? (n += 0.5 * r) : (n -= 0.5 * r),
m && (n > 1 ? (n = 1) : 0 > n && (n = 0)),
(c[u++] = {
x: i,
y: n
});
for (
c.sort(function (e, t) {
return e.x - t.x;
}),
s = new f(1, 1, null),
d = h;
--d > -1;
)
(a = c[d]), (s = new f(a.x, a.y, s));
this._prev = new f(0, 0, 0 !== s.t ? s : s.next);
},
!0
)),
(g = n.prototype = new e()),
(g.constructor = n),
(g.getRatio = function (e) {
var t = this._prev;
if (e > t.t) {
for (; t.next && e >= t.t;) t = t.next;
t = t.prev;
} else
for (; t.prev && e <= t.t;) t = t.prev;
return (this._prev = t), t.v + ((e - t.t) / t.gap) * t.c;
}),
(g.config = function (e) {
return new n(e);
}),
(n.ease = new n()),
d(
"Bounce",
u("BounceOut", function (e) {
return 1 / 2.75 > e ?
7.5625 * e * e :
2 / 2.75 > e ?
7.5625 * (e -= 1.5 / 2.75) * e + 0.75 :
2.5 / 2.75 > e ?
7.5625 * (e -= 2.25 / 2.75) * e + 0.9375 :
7.5625 * (e -= 2.625 / 2.75) * e + 0.984375;
}),
u("BounceIn", function (e) {
return (e = 1 - e) < 1 / 2.75 ?
1 - 7.5625 * e * e :
2 / 2.75 > e ?
1 - (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) :
2.5 / 2.75 > e ?
1 - (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) :
1 - (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375);
}),
u("BounceInOut", function (e) {
var t = 0.5 > e;
return (
(e = t ? 1 - 2 * e : 2 * e - 1),
(e =
1 / 2.75 > e ?
7.5625 * e * e :
2 / 2.75 > e ?
7.5625 * (e -= 1.5 / 2.75) * e + 0.75 :
2.5 / 2.75 > e ?
7.5625 * (e -= 2.25 / 2.75) * e + 0.9375 :
7.5625 * (e -= 2.625 / 2.75) * e + 0.984375),
t ? 0.5 * (1 - e) : 0.5 * e + 0.5
);
})
),
d(
"Circ",
u("CircOut", function (e) {
return Math.sqrt(1 - (e -= 1) * e);
}),
u("CircIn", function (e) {
return -(Math.sqrt(1 - e * e) - 1);
}),
u("CircInOut", function (e) {
return (e *= 2) < 1 ? -0.5 * (Math.sqrt(1 - e * e) - 1) : 0.5 * (Math.sqrt(1 - (e -= 2) * e) + 1);
})
),
(r = function (t, i, n) {
var r = c(
"easing." + t,
function (e, t) {
(this._p1 = e >= 1 ? e : 1), (this._p2 = (t || n) / (1 > e ? e : 1)), (this._p3 = (this._p2 / s) * (Math.asin(1 / this._p1) || 0)), (this._p2 = s / this._p2);
},
!0
),
o = (r.prototype = new e());
return (
(o.constructor = r),
(o.getRatio = i),
(o.config = function (e, t) {
return new r(e, t);
}),
r
);
}),
d(
"Elastic",
r(
"ElasticOut",
function (e) {
return this._p1 * Math.pow(2, -10 * e) * Math.sin((e - this._p3) * this._p2) + 1;
},
0.3
),
r(
"ElasticIn",
function (e) {
return -(this._p1 * Math.pow(2, 10 * (e -= 1)) * Math.sin((e - this._p3) * this._p2));
},
0.3
),
r(
"ElasticInOut",
function (e) {
return (e *= 2) < 1 ?
-0.5 * (this._p1 * Math.pow(2, 10 * (e -= 1)) * Math.sin((e - this._p3) * this._p2)) :
this._p1 * Math.pow(2, -10 * (e -= 1)) * Math.sin((e - this._p3) * this._p2) * 0.5 + 1;
},
0.45
)
),
d(
"Expo",
u("ExpoOut", function (e) {
return 1 - Math.pow(2, -10 * e);
}),
u("ExpoIn", function (e) {
return Math.pow(2, 10 * (e - 1)) - 0.001;
}),
u("ExpoInOut", function (e) {
return (e *= 2) < 1 ? 0.5 * Math.pow(2, 10 * (e - 1)) : 0.5 * (2 - Math.pow(2, -10 * (e - 1)));
})
),
d(
"Sine",
u("SineOut", function (e) {
return Math.sin(e * l);
}),
u("SineIn", function (e) {
return -Math.cos(e * l) + 1;
}),
u("SineInOut", function (e) {
return -0.5 * (Math.cos(Math.PI * e) - 1);
})
),
c(
"easing.EaseLookup", {
find: function (t) {
return e.map[t];
},
},
!0
),
h(o.SlowMo, "SlowMo", "ease,"),
h(n, "RoughEase", "ease,"),
h(t, "SteppedEase", "ease,"),
m
);
},
!0
);
}),
i._gsDefine && i._gsQueue.pop()(),
(function (e, i) {
"use strict";
var n = (e.GreenSockGlobals = e.GreenSockGlobals || e);
if (!n.TweenLite) {
var r,
o,
a,
s,
l,
c = function (e) {
var t,
i = e.split("."),
r = n;
for (t = 0; t < i.length; t++) r[i[t]] = r = r[i[t]] || {};
return r;
},
u = c("com.greensock"),
h = 1e-10,
d = function (e) {
var t,
i = [],
n = e.length;
for (t = 0; t !== n; i.push(e[t++]));
return i;
},
f = function () {},
p = (function () {
var e = Object.prototype.toString,
t = e.call([]);
return function (i) {
return null != i && (i instanceof Array || ("object" == typeof i && !!i.push && e.call(i) === t));
};
})(),
m = {},
v = function (r, o, a, s) {
(this.sc = m[r] ? m[r].sc : []), (m[r] = this), (this.gsClass = null), (this.func = a);
var l = [];
(this.check = function (u) {
for (var h, d, f, p, g, y = o.length, _ = y; --y > -1;)(h = m[o[y]] || new v(o[y], [])).gsClass ? ((l[y] = h.gsClass), _--) : u && h.sc.push(this);
if (0 === _ && a)
for (
d = ("com.greensock." + r).split("."),
f = d.pop(),
p = c(d.join("."))[f] = this.gsClass = a.apply(a, l),
s &&
((n[f] = p),
(g = "undefined" != typeof t && t.exports),
!g && "function" == typeof define && define.amd ?
define((e.GreenSockAMDPath ? e.GreenSockAMDPath + "/" : "") + r.split(".").pop(), [], function () {
return p;
}) :
r === i && g && (t.exports = p)),
y = 0; y < this.sc.length; y++
)
this.sc[y].check();
}),
this.check(!0);
},
g = (e._gsDefine = function (e, t, i, n) {
return new v(e, t, i, n);
}),
y = (u._class = function (e, t, i) {
return (
(t = t || function () {}),
g(
e,
[],
function () {
return t;
},
i
),
t
);
});
g.globals = n;
var _ = [0, 0, 1, 1],
b = [],
x = y(
"easing.Ease",
function (e, t, i, n) {
(this._func = e), (this._type = i || 0), (this._power = n || 0), (this._params = t ? _.concat(t) : _);
},
!0
),
w = (x.map = {}),
M = (x.register = function (e, t, i, n) {
for (var r, o, a, s, l = t.split(","), c = l.length, h = (i || "easeIn,easeOut,easeInOut").split(","); --c > -1;)
for (o = l[c], r = n ? y("easing." + o, null, !0) : u.easing[o] || {}, a = h.length; --a > -1;)(s = h[a]), (w[o + "." + s] = w[s + o] = r[s] = e.getRatio ? e : e[s] || new e());
});
for (
a = x.prototype,
a._calcEnd = !1,
a.getRatio = function (e) {
if (this._func) return (this._params[0] = e), this._func.apply(null, this._params);
var t = this._type,
i = this._power,
n = 1 === t ? 1 - e : 2 === t ? e : 0.5 > e ? 2 * e : 2 * (1 - e);
return 1 === i ? (n *= n) : 2 === i ? (n *= n * n) : 3 === i ? (n *= n * n * n) : 4 === i && (n *= n * n * n * n), 1 === t ? 1 - n : 2 === t ? n : 0.5 > e ? n / 2 : 1 - n / 2;
},
r = ["Linear", "Quad", "Cubic", "Quart", "Quint,Strong"],
o = r.length;
--o > -1;
)
(a = r[o] + ",Power" + o), M(new x(null, null, 1, o), a, "easeOut", !0), M(new x(null, null, 2, o), a, "easeIn" + (0 === o ? ",easeNone" : "")), M(new x(null, null, 3, o), a, "easeInOut");
(w.linear = u.easing.Linear.easeIn), (w.swing = u.easing.Quad.easeInOut);
var T = y("events.EventDispatcher", function (e) {
(this._listeners = {}), (this._eventTarget = e || this);
});
(a = T.prototype),
(a.addEventListener = function (e, t, i, n, r) {
r = r || 0;
var o,
a,
c = this._listeners[e],
u = 0;
for (null == c && (this._listeners[e] = c = []), a = c.length; --a > -1;)(o = c[a]), o.c === t && o.s === i ? c.splice(a, 1) : 0 === u && o.pr < r && (u = a + 1);
c.splice(u, 0, {
c: t,
s: i,
up: n,
pr: r
}), this !== s || l || s.wake();
}),
(a.removeEventListener = function (e, t) {
var i,
n = this._listeners[e];
if (n)
for (i = n.length; --i > -1;)
if (n[i].c === t) return void n.splice(i, 1);
}),
(a.dispatchEvent = function (e) {
var t,
i,
n,
r = this._listeners[e];
if (r)
for (t = r.length, i = this._eventTarget; --t > -1;)(n = r[t]), n && (n.up ? n.c.call(n.s || i, {
type: e,
target: i
}) : n.c.call(n.s || i));
});
var S = e.requestAnimationFrame,
E = e.cancelAnimationFrame,
A =
Date.now ||
function () {
return new Date().getTime();
},
C = A();
for (r = ["ms", "moz", "webkit", "o"], o = r.length; --o > -1 && !S;)(S = e[r[o] + "RequestAnimationFrame"]), (E = e[r[o] + "CancelAnimationFrame"] || e[r[o] + "CancelRequestAnimationFrame"]);
y("Ticker", function (e, t) {
var i,
n,
r,
o,
a,
c = this,
u = A(),
d = t !== !1 && S,
p = 500,
m = 33,
v = "tick",
g = function (e) {
var t,
s,
l = A() - C;
l > p && (u += l - m),
(C += l),
(c.time = (C - u) / 1e3),
(t = c.time - a),
(!i || t > 0 || e === !0) && (c.frame++, (a += t + (t >= o ? 0.004 : o - t)), (s = !0)),
e !== !0 && (r = n(g)),
s && c.dispatchEvent(v);
};
T.call(c),
(c.time = c.frame = 0),
(c.tick = function () {
g(!0);
}),
(c.lagSmoothing = function (e, t) {
(p = e || 1 / h), (m = Math.min(t, p, 0));
}),
(c.sleep = function () {
null != r && (d && E ? E(r) : clearTimeout(r), (n = f), (r = null), c === s && (l = !1));
}),
(c.wake = function () {
null !== r ? c.sleep() : c.frame > 10 && (C = A() - p + 5),
(n =
0 === i ?
f :
d && S ?
S :
function (e) {
return setTimeout(e, (1e3 * (a - c.time) + 1) | 0);
}),
c === s && (l = !0),
g(2);
}),
(c.fps = function (e) {
return arguments.length ? ((i = e), (o = 1 / (i || 60)), (a = this.time + o), void c.wake()) : i;
}),
(c.useRAF = function (e) {
return arguments.length ? (c.sleep(), (d = e), void c.fps(i)) : d;
}),
c.fps(e),
setTimeout(function () {
d && c.frame < 5 && c.useRAF(!1);
}, 1500);
}),
(a = u.Ticker.prototype = new u.events.EventDispatcher()),
(a.constructor = u.Ticker);
var P = y("core.Animation", function (e, t) {
if (
((this.vars = t = t || {}),
(this._duration = this._totalDuration = e || 0),
(this._delay = Number(t.delay) || 0),
(this._timeScale = 1),
(this._active = t.immediateRender === !0),
(this.data = t.data),
(this._reversed = t.reversed === !0),
Y)
) {
l || s.wake();
var i = this.vars.useFrames ? X : Y;
i.add(this, i._time), this.vars.paused && this.paused(!0);
}
});
(s = P.ticker = new u.Ticker()),
(a = P.prototype),
(a._dirty = a._gc = a._initted = a._paused = !1),
(a._totalTime = a._time = 0),
(a._rawPrevTime = -1),
(a._next = a._last = a._onUpdate = a._timeline = a.timeline = null),
(a._paused = !1);
var L = function () {
l && A() - C > 2e3 && s.wake(), setTimeout(L, 2e3);
};
L(),
(a.play = function (e, t) {
return null != e && this.seek(e, t), this.reversed(!1).paused(!1);
}),
(a.pause = function (e, t) {
return null != e && this.seek(e, t), this.paused(!0);
}),
(a.resume = function (e, t) {
return null != e && this.seek(e, t), this.paused(!1);
}),
(a.seek = function (e, t) {
return this.totalTime(Number(e), t !== !1);
}),
(a.restart = function (e, t) {
return this.reversed(!1)
.paused(!1)
.totalTime(e ? -this._delay : 0, t !== !1, !0);
}),
(a.reverse = function (e, t) {
return null != e && this.seek(e || this.totalDuration(), t), this.reversed(!0).paused(!1);
}),
(a.render = function (e, t, i) {}),
(a.invalidate = function () {
return (this._time = this._totalTime = 0), (this._initted = this._gc = !1), (this._rawPrevTime = -1), (this._gc || !this.timeline) && this._enabled(!0), this;
}),
(a.isActive = function () {
var e,
t = this._timeline,
i = this._startTime;
return !t || (!this._gc && !this._paused && t.isActive() && (e = t.rawTime()) >= i && e < i + this.totalDuration() / this._timeScale);
}),
(a._enabled = function (e, t) {
return (
l || s.wake(),
(this._gc = !e),
(this._active = this.isActive()),
t !== !0 && (e && !this.timeline ? this._timeline.add(this, this._startTime - this._delay) : !e && this.timeline && this._timeline._remove(this, !0)),
!1
);
}),
(a._kill = function (e, t) {
return this._enabled(!1, !1);
}),
(a.kill = function (e, t) {
return this._kill(e, t), this;
}),
(a._uncache = function (e) {
for (var t = e ? this : this.timeline; t;)(t._dirty = !0), (t = t.timeline);
return this;
}),
(a._swapSelfInParams = function (e) {
for (var t = e.length, i = e.concat(); --t > -1;) "{self}" === e[t] && (i[t] = this);
return i;
}),
(a._callback = function (e) {
var t = this.vars;
t[e].apply(t[e + "Scope"] || t.callbackScope || this, t[e + "Params"] || b);
}),
(a.eventCallback = function (e, t, i, n) {
if ("on" === (e || "").substr(0, 2)) {
var r = this.vars;
if (1 === arguments.length) return r[e];
null == t ? delete r[e] : ((r[e] = t), (r[e + "Params"] = p(i) && -1 !== i.join("").indexOf("{self}") ? this._swapSelfInParams(i) : i), (r[e + "Scope"] = n)),
"onUpdate" === e && (this._onUpdate = t);
}
return this;
}),
(a.delay = function (e) {
return arguments.length ? (this._timeline.smoothChildTiming && this.startTime(this._startTime + e - this._delay), (this._delay = e), this) : this._delay;
}),
(a.duration = function (e) {
return arguments.length ?
((this._duration = this._totalDuration = e),
this._uncache(!0),
this._timeline.smoothChildTiming && this._time > 0 && this._time < this._duration && 0 !== e && this.totalTime(this._totalTime * (e / this._duration), !0),
this) :
((this._dirty = !1), this._duration);
}),
(a.totalDuration = function (e) {
return (this._dirty = !1), arguments.length ? this.duration(e) : this._totalDuration;
}),
(a.time = function (e, t) {
return arguments.length ? (this._dirty && this.totalDuration(), this.totalTime(e > this._duration ? this._duration : e, t)) : this._time;
}),
(a.totalTime = function (e, t, i) {
if ((l || s.wake(), !arguments.length)) return this._totalTime;
if (this._timeline) {
if ((0 > e && !i && (e += this.totalDuration()), this._timeline.smoothChildTiming)) {
this._dirty && this.totalDuration();
var n = this._totalDuration,
r = this._timeline;
if ((e > n && !i && (e = n), (this._startTime = (this._paused ? this._pauseTime : r._time) - (this._reversed ? n - e : e) / this._timeScale), r._dirty || this._uncache(!1), r._timeline))
for (; r._timeline;) r._timeline._time !== (r._startTime + r._totalTime) / r._timeScale && r.totalTime(r._totalTime, !0), (r = r._timeline);
}
this._gc && this._enabled(!0, !1), (this._totalTime !== e || 0 === this._duration) && (I.length && Z(), this.render(e, t, !1), I.length && Z());
}
return this;
}),
(a.progress = a.totalProgress = function (e, t) {
var i = this.duration();
return arguments.length ? this.totalTime(i * e, t) : i ? this._time / i : this.ratio;
}),
(a.startTime = function (e) {
return arguments.length ? (e !== this._startTime && ((this._startTime = e), this.timeline && this.timeline._sortChildren && this.timeline.add(this, e - this._delay)), this) : this._startTime;
}),
(a.endTime = function (e) {
return this._startTime + (0 != e ? this.totalDuration() : this.duration()) / this._timeScale;
}),
(a.timeScale = function (e) {
if (!arguments.length) return this._timeScale;
if (((e = e || h), this._timeline && this._timeline.smoothChildTiming)) {
var t = this._pauseTime,
i = t || 0 === t ? t : this._timeline.totalTime();
this._startTime = i - ((i - this._startTime) * this._timeScale) / e;
}
return (this._timeScale = e), this._uncache(!1);
}),
(a.reversed = function (e) {
return arguments.length ?
(e != this._reversed && ((this._reversed = e), this.totalTime(this._timeline && !this._timeline.smoothChildTiming ? this.totalDuration() - this._totalTime : this._totalTime, !0)), this) :
this._reversed;
}),
(a.paused = function (e) {
if (!arguments.length) return this._paused;
var t,
i,
n = this._timeline;
return (
e != this._paused &&
n &&
(l || e || s.wake(),
(t = n.rawTime()),
(i = t - this._pauseTime),
!e && n.smoothChildTiming && ((this._startTime += i), this._uncache(!1)),
(this._pauseTime = e ? t : null),
(this._paused = e),
(this._active = this.isActive()),
!e && 0 !== i && this._initted && this.duration() && ((t = n.smoothChildTiming ? this._totalTime : (t - this._startTime) / this._timeScale), this.render(t, t === this._totalTime, !0))),
this._gc && !e && this._enabled(!0, !1),
this
);
});
var R = y("core.SimpleTimeline", function (e) {
P.call(this, 0, e), (this.autoRemoveChildren = this.smoothChildTiming = !0);
});
(a = R.prototype = new P()),
(a.constructor = R),
(a.kill()._gc = !1),
(a._first = a._last = a._recent = null),
(a._sortChildren = !1),
(a.add = a.insert = function (e, t, i, n) {
var r, o;
if (
((e._startTime = Number(t || 0) + e._delay),
e._paused && this !== e._timeline && (e._pauseTime = e._startTime + (this.rawTime() - e._startTime) / e._timeScale),
e.timeline && e.timeline._remove(e, !0),
(e.timeline = e._timeline = this),
e._gc && e._enabled(!0, !0),
(r = this._last),
this._sortChildren)
)
for (o = e._startTime; r && r._startTime > o;) r = r._prev;
return (
r ? ((e._next = r._next), (r._next = e)) : ((e._next = this._first), (this._first = e)),
e._next ? (e._next._prev = e) : (this._last = e),
(e._prev = r),
(this._recent = e),
this._timeline && this._uncache(!0),
this
);
}),
(a._remove = function (e, t) {
return (
e.timeline === this &&
(t || e._enabled(!1, !0),
e._prev ? (e._prev._next = e._next) : this._first === e && (this._first = e._next),
e._next ? (e._next._prev = e._prev) : this._last === e && (this._last = e._prev),
(e._next = e._prev = e.timeline = null),
e === this._recent && (this._recent = this._last),
this._timeline && this._uncache(!0)),
this
);
}),
(a.render = function (e, t, i) {
var n,
r = this._first;
for (this._totalTime = this._time = this._rawPrevTime = e; r;)
(n = r._next),
(r._active || (e >= r._startTime && !r._paused)) &&
(r._reversed ? r.render((r._dirty ? r.totalDuration() : r._totalDuration) - (e - r._startTime) * r._timeScale, t, i) : r.render((e - r._startTime) * r._timeScale, t, i)),
(r = n);
}),
(a.rawTime = function () {
return l || s.wake(), this._totalTime;
});
var O = y(
"TweenLite",
function (t, i, n) {
if ((P.call(this, i, n), (this.render = O.prototype.render), null == t)) throw "Cannot tween a null target.";
this.target = t = "string" != typeof t ? t : O.selector(t) || t;
var r,
o,
a,
s = t.jquery || (t.length && t !== e && t[0] && (t[0] === e || (t[0].nodeType && t[0].style && !t.nodeType))),
l = this.vars.overwrite;
if (((this._overwrite = l = null == l ? W[O.defaultOverwrite] : "number" == typeof l ? l >> 0 : W[l]), (s || t instanceof Array || (t.push && p(t))) && "number" != typeof t[0]))
for (this._targets = a = d(t), this._propLookup = [], this._siblings = [], r = 0; r < a.length; r++)
(o = a[r]),
o ?
"string" != typeof o ?
o.length && o !== e && o[0] && (o[0] === e || (o[0].nodeType && o[0].style && !o.nodeType)) ?
(a.splice(r--, 1), (this._targets = a = a.concat(d(o)))) :
((this._siblings[r] = K(o, this, !1)), 1 === l && this._siblings[r].length > 1 && J(o, this, null, 1, this._siblings[r])) :
((o = a[r--] = O.selector(o)), "string" == typeof o && a.splice(r + 1, 1)) :
a.splice(r--, 1);
else(this._propLookup = {}), (this._siblings = K(t, this, !1)), 1 === l && this._siblings.length > 1 && J(t, this, null, 1, this._siblings);
(this.vars.immediateRender || (0 === i && 0 === this._delay && this.vars.immediateRender !== !1)) && ((this._time = -h), this.render(-this._delay));
},
!0
),
k = function (t) {
return t && t.length && t !== e && t[0] && (t[0] === e || (t[0].nodeType && t[0].style && !t.nodeType));
},
D = function (e, t) {
var i,
n = {};
for (i in e)
H[i] ||
(i in t && "transform" !== i && "x" !== i && "y" !== i && "width" !== i && "height" !== i && "className" !== i && "border" !== i) ||
!(!G[i] || (G[i] && G[i]._autoCSS)) ||
((n[i] = e[i]), delete e[i]);
e.css = n;
};
(a = O.prototype = new P()),
(a.constructor = O),
(a.kill()._gc = !1),
(a.ratio = 0),
(a._firstPT = a._targets = a._overwrittenProps = a._startAt = null),
(a._notifyPluginsOfEnabled = a._lazy = !1),
(O.version = "1.18.0"),
(O.defaultEase = a._ease = new x(null, null, 1, 1)),
(O.defaultOverwrite = "auto"),
(O.ticker = s),
(O.autoSleep = 120),
(O.lagSmoothing = function (e, t) {
s.lagSmoothing(e, t);
}),
(O.selector =
e.$ ||
e.jQuery ||
function (t) {
var i = e.$ || e.jQuery;
return i ?
((O.selector = i), i(t)) :
"undefined" == typeof document ?
t :
document.querySelectorAll ?
document.querySelectorAll(t) :
document.getElementById("#" === t.charAt(0) ? t.substr(1) : t);
});
var I = [],
N = {},
U = /(?:(-|-=|+=)?d*.?d*(?:e[-+]?d+)?)[0-9]/gi,
j = function (e) {
for (var t, i = this._firstPT, n = 1e-6; i;)
(t = i.blob ? (e ? this.join("") : this.start) : i.c * e + i.s),
i.r ? (t = Math.round(t)) : n > t && t > -n && (t = 0),
i.f ? (i.fp ? i.t[i.p](i.fp, t) : i.t[i.p](t)) : (i.t[i.p] = t),
(i = i._next);
},
B = function (e, t, i, n) {
var r,
o,
a,
s,
l,
c,
u,
h = [e, t],
d = 0,
f = "",
p = 0;
for (
h.start = e, i && (i(h), (e = h[0]), (t = h[1])), h.length = 0, r = e.match(U) || [], o = t.match(U) || [], n && ((n._next = null), (n.blob = 1), (h._firstPT = n)), l = o.length, s = 0; l > s; s++
)
(u = o[s]),
(c = t.substr(d, t.indexOf(u, d) - d)),
(f += c || !s ? c : ","),
(d += c.length),
p ? (p = (p + 1) % 5) : "rgba(" === c.substr(-5) && (p = 1),
u === r[s] || r.length <= s ?
(f += u) :
(f && (h.push(f), (f = "")),
(a = parseFloat(r[s])),
h.push(a),
(h._firstPT = {
_next: h._firstPT,
t: h,
p: h.length - 1,
s: a,
c: ("=" === u.charAt(1) ? parseInt(u.charAt(0) + "1", 10) * parseFloat(u.substr(2)) : parseFloat(u) - a) || 0,
f: 0,
r: p && 4 > p,
})),
(d += u.length);
return (f += t.substr(d)), f && h.push(f), (h.setRatio = j), h;
},
F = function (e, t, i, n, r, o, a, s) {
var l,
c,
u = "get" === i ? e[t] : i,
h = typeof e[t],
d = "string" == typeof n && "=" === n.charAt(1),
f = {
t: e,
p: t,
s: u,
f: "function" === h,
pg: 0,
n: r || t,
r: o,
pr: 0,
c: d ? parseInt(n.charAt(0) + "1", 10) * parseFloat(n.substr(2)) : parseFloat(n) - u || 0
};
return (
"number" !== h &&
("function" === h && "get" === i && ((c = t.indexOf("set") || "function" != typeof e["get" + t.substr(3)] ? t : "get" + t.substr(3)), (f.s = u = a ? e[c](a) : e[c]())),
"string" == typeof u && (a || isNaN(u)) ?
((f.fp = a), (l = B(u, n, s || O.defaultStringFilter, f)), (f = {
t: l,
p: "setRatio",
s: 0,
c: 1,
f: 2,
pg: 0,
n: r || t,
pr: 0
})) :
d || (f.c = parseFloat(n) - parseFloat(u) || 0)),
f.c ? ((f._next = this._firstPT) && (f._next._prev = f), (this._firstPT = f), f) : void 0
);
},
V = (O._internals = {
isArray: p,
isSelector: k,
lazyTweens: I,
blobDif: B
}),
G = (O._plugins = {}),
z = (V.tweenLookup = {}),
$ = 0,
H = (V.reservedProps = {
ease: 1,
delay: 1,
overwrite: 1,
onComplete: 1,
onCompleteParams: 1,
onCompleteScope: 1,
useFrames: 1,
runBackwards: 1,
startAt: 1,
onUpdate: 1,
onUpdateParams: 1,
onUpdateScope: 1,
onStart: 1,
onStartParams: 1,
onStartScope: 1,
onReverseComplete: 1,
onReverseCompleteParams: 1,
onReverseCompleteScope: 1,
onRepeat: 1,
onRepeatParams: 1,
onRepeatScope: 1,
easeParams: 1,
yoyo: 1,
immediateRender: 1,
repeat: 1,
repeatDelay: 1,
data: 1,
paused: 1,
reversed: 1,
autoCSS: 1,
lazy: 1,
onOverwrite: 1,
callbackScope: 1,
stringFilter: 1,
}),
W = {
none: 0,
all: 1,
auto: 2,
concurrent: 3,
allOnStart: 4,
preexisting: 5,
true: 1,
false: 0
},
X = (P._rootFramesTimeline = new R()),
Y = (P._rootTimeline = new R()),
q = 30,
Z = (V.lazyRender = function () {
var e,
t = I.length;
for (N = {}; --t > -1;)(e = I[t]), e && e._lazy !== !1 && (e.render(e._lazy[0], e._lazy[1], !0), (e._lazy = !1));
I.length = 0;
});
(Y._startTime = s.time),
(X._startTime = s.frame),
(Y._active = X._active = !0),
setTimeout(Z, 1),
(P._updateRoot = O.render = function () {
var e, t, i;
if ((I.length && Z(), Y.render((s.time - Y._startTime) * Y._timeScale, !1, !1), X.render((s.frame - X._startTime) * X._timeScale, !1, !1), I.length && Z(), s.frame >= q)) {
q = s.frame + (parseInt(O.autoSleep, 10) || 120);
for (i in z) {
for (t = z[i].tweens, e = t.length; --e > -1;) t[e]._gc && t.splice(e, 1);
0 === t.length && delete z[i];
}
if (((i = Y._first), (!i || i._paused) && O.autoSleep && !X._first && 1 === s._listeners.tick.length)) {
for (; i && i._paused;) i = i._next;
i || s.sleep();
}
}
}),
s.addEventListener("tick", P._updateRoot);
var K = function (e, t, i) {
var n,
r,
o = e._gsTweenID;
if ((z[o || (e._gsTweenID = o = "t" + $++)] || (z[o] = {
target: e,
tweens: []
}), t && ((n = z[o].tweens), (n[(r = n.length)] = t), i)))
for (; --r > -1;) n[r] === t && n.splice(r, 1);
return z[o].tweens;
},
Q = function (e, t, i, n) {
var r,
o,
a = e.vars.onOverwrite;
return a && (r = a(e, t, i, n)), (a = O.onOverwrite), a && (o = a(e, t, i, n)), r !== !1 && o !== !1;
},
J = function (e, t, i, n, r) {
var o, a, s, l;
if (1 === n || n >= 4) {
for (l = r.length, o = 0; l > o; o++)
if ((s = r[o]) !== t) s._gc || (s._kill(null, e, t) && (a = !0));
else if (5 === n) break;
return a;
}
var c,
u = t._startTime + h,
d = [],
f = 0,
p = 0 === t._duration;
for (o = r.length; --o > -1;)
(s = r[o]) === t ||
s._gc ||
s._paused ||
(s._timeline !== t._timeline ?
((c = c || ee(t, 0, p)), 0 === ee(s, c, p) && (d[f++] = s)) :
s._startTime <= u && s._startTime + s.totalDuration() / s._timeScale > u && (((p || !s._initted) && u - s._startTime <= 2e-10) || (d[f++] = s)));
for (o = f; --o > -1;)
if (((s = d[o]), 2 === n && s._kill(i, e, t) && (a = !0), 2 !== n || (!s._firstPT && s._initted))) {
if (2 !== n && !Q(s, t)) continue;
s._enabled(!1, !1) && (a = !0);
}
return a;
},
ee = function (e, t, i) {
for (var n = e._timeline, r = n._timeScale, o = e._startTime; n._timeline;) {
if (((o += n._startTime), (r *= n._timeScale), n._paused)) return -100;
n = n._timeline;
}
return (o /= r), o > t ? o - t : (i && o === t) || (!e._initted && 2 * h > o - t) ? h : (o += e.totalDuration() / e._timeScale / r) > t + h ? 0 : o - t - h;
};
(a._init = function () {
var e,
t,
i,
n,
r,
o = this.vars,
a = this._overwrittenProps,
s = this._duration,
l = !!o.immediateRender,
c = o.ease;
if (o.startAt) {
this._startAt && (this._startAt.render(-1, !0), this._startAt.kill()), (r = {});
for (n in o.startAt) r[n] = o.startAt[n];
if (((r.overwrite = !1), (r.immediateRender = !0), (r.lazy = l && o.lazy !== !1), (r.startAt = r.delay = null), (this._startAt = O.to(this.target, 0, r)), l))
if (this._time > 0) this._startAt = null;
else if (0 !== s) return;
} else if (o.runBackwards && 0 !== s)
if (this._startAt) this._startAt.render(-1, !0), this._startAt.kill(), (this._startAt = null);
else {
0 !== this._time && (l = !1), (i = {});
for (n in o)(H[n] && "autoCSS" !== n) || (i[n] = o[n]);
if (((i.overwrite = 0), (i.data = "isFromStart"), (i.lazy = l && o.lazy !== !1), (i.immediateRender = l), (this._startAt = O.to(this.target, 0, i)), l)) {
if (0 === this._time) return;
} else this._startAt._init(), this._startAt._enabled(!1), this.vars.immediateRender && (this._startAt = null);
}
if (
((this._ease = c = c ? (c instanceof x ? c : "function" == typeof c ? new x(c, o.easeParams) : w[c] || O.defaultEase) : O.defaultEase),
o.easeParams instanceof Array && c.config && (this._ease = c.config.apply(c, o.easeParams)),
(this._easeType = this._ease._type),
(this._easePower = this._ease._power),
(this._firstPT = null),
this._targets)
)
for (e = this._targets.length; --e > -1;) this._initProps(this._targets[e], (this._propLookup[e] = {}), this._siblings[e], a ? a[e] : null) && (t = !0);
else t = this._initProps(this.target, this._propLookup, this._siblings, a);
if ((t && O._onPluginEvent("_onInitAllProps", this), a && (this._firstPT || ("function" != typeof this.target && this._enabled(!1, !1))), o.runBackwards))
for (i = this._firstPT; i;)(i.s += i.c), (i.c = -i.c), (i = i._next);
(this._onUpdate = o.onUpdate), (this._initted = !0);
}),
(a._initProps = function (t, i, n, r) {
var o, a, s, l, c, u;
if (null == t) return !1;
N[t._gsTweenID] && Z(), this.vars.css || (t.style && t !== e && t.nodeType && G.css && this.vars.autoCSS !== !1 && D(this.vars, t));
for (o in this.vars)
if (((u = this.vars[o]), H[o])) u && (u instanceof Array || (u.push && p(u))) && -1 !== u.join("").indexOf("{self}") && (this.vars[o] = u = this._swapSelfInParams(u, this));
else if (G[o] && (l = new G[o]())._onInitTween(t, this.vars[o], this)) {
for (this._firstPT = c = {
_next: this._firstPT,
t: l,
p: "setRatio",
s: 0,
c: 1,
f: 1,
n: o,
pg: 1,
pr: l._priority
}, a = l._overwriteProps.length; --a > -1;)
i[l._overwriteProps[a]] = this._firstPT;
(l._priority || l._onInitAllProps) && (s = !0), (l._onDisable || l._onEnable) && (this._notifyPluginsOfEnabled = !0), c._next && (c._next._prev = c);
} else i[o] = F.call(this, t, o, "get", u, o, 0, null, this.vars.stringFilter);
return r && this._kill(r, t) ?
this._initProps(t, i, n, r) :
this._overwrite > 1 && this._firstPT && n.length > 1 && J(t, this, i, this._overwrite, n) ?
(this._kill(i, t), this._initProps(t, i, n, r)) :
(this._firstPT && ((this.vars.lazy !== !1 && this._duration) || (this.vars.lazy && !this._duration)) && (N[t._gsTweenID] = !0), s);
}),
(a.render = function (e, t, i) {
var n,
r,
o,
a,
s = this._time,
l = this._duration,
c = this._rawPrevTime;
if (e >= l)
(this._totalTime = this._time = l),
(this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1),
this._reversed || ((n = !0), (r = "onComplete"), (i = i || this._timeline.autoRemoveChildren)),
0 === l &&
(this._initted || !this.vars.lazy || i) &&
(this._startTime === this._timeline._duration && (e = 0),
(0 === e || 0 > c || (c === h && "isPause" !== this.data)) && c !== e && ((i = !0), c > h && (r = "onReverseComplete")),
(this._rawPrevTime = a = !t || e || c === e ? e : h));
else if (1e-7 > e)
(this._totalTime = this._time = 0),
(this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0),
(0 !== s || (0 === l && c > 0)) && ((r = "onReverseComplete"), (n = this._reversed)),
0 > e &&
((this._active = !1),
0 === l && (this._initted || !this.vars.lazy || i) && (c >= 0 && (c !== h || "isPause" !== this.data) && (i = !0), (this._rawPrevTime = a = !t || e || c === e ? e : h))),
this._initted || (i = !0);
else if (((this._totalTime = this._time = e), this._easeType)) {
var u = e / l,
d = this._easeType,
f = this._easePower;
(1 === d || (3 === d && u >= 0.5)) && (u = 1 - u),
3 === d && (u *= 2),
1 === f ? (u *= u) : 2 === f ? (u *= u * u) : 3 === f ? (u *= u * u * u) : 4 === f && (u *= u * u * u * u),
1 === d ? (this.ratio = 1 - u) : 2 === d ? (this.ratio = u) : 0.5 > e / l ? (this.ratio = u / 2) : (this.ratio = 1 - u / 2);
} else this.ratio = this._ease.getRatio(e / l);
if (this._time !== s || i) {
if (!this._initted) {
if ((this._init(), !this._initted || this._gc)) return;
if (!i && this._firstPT && ((this.vars.lazy !== !1 && this._duration) || (this.vars.lazy && !this._duration)))
return (this._time = this._totalTime = s), (this._rawPrevTime = c), I.push(this), void(this._lazy = [e, t]);
this._time && !n ? (this.ratio = this._ease.getRatio(this._time / l)) : n && this._ease._calcEnd && (this.ratio = this._ease.getRatio(0 === this._time ? 0 : 1));
}
for (
this._lazy !== !1 && (this._lazy = !1),
this._active || (!this._paused && this._time !== s && e >= 0 && (this._active = !0)),
0 === s && (this._startAt && (e >= 0 ? this._startAt.render(e, t, i) : r || (r = "_dummyGS")), this.vars.onStart && (0 !== this._time || 0 === l) && (t || this._callback("onStart"))),
o = this._firstPT; o;
)
o.f ? o.t[o.p](o.c * this.ratio + o.s) : (o.t[o.p] = o.c * this.ratio + o.s), (o = o._next);
this._onUpdate && (0 > e && this._startAt && e !== -1e-4 && this._startAt.render(e, t, i), t || ((this._time !== s || n) && this._callback("onUpdate"))),
r &&
(!this._gc || i) &&
(0 > e && this._startAt && !this._onUpdate && e !== -1e-4 && this._startAt.render(e, t, i),
n && (this._timeline.autoRemoveChildren && this._enabled(!1, !1), (this._active = !1)),
!t && this.vars[r] && this._callback(r),
0 === l && this._rawPrevTime === h && a !== h && (this._rawPrevTime = 0));
}
}),
(a._kill = function (e, t, i) {
if (("all" === e && (e = null), null == e && (null == t || t === this.target))) return (this._lazy = !1), this._enabled(!1, !1);
t = "string" != typeof t ? t || this._targets || this.target : O.selector(t) || t;
var n,
r,
o,
a,
s,
l,
c,
u,
h,
d = i && this._time && i._startTime === this._startTime && this._timeline === i._timeline;
if ((p(t) || k(t)) && "number" != typeof t[0])
for (n = t.length; --n > -1;) this._kill(e, t[n], i) && (l = !0);
else {
if (this._targets) {
for (n = this._targets.length; --n > -1;)
if (t === this._targets[n]) {
(s = this._propLookup[n] || {}), (this._overwrittenProps = this._overwrittenProps || []), (r = this._overwrittenProps[n] = e ? this._overwrittenProps[n] || {} : "all");
break;
}
} else {
if (t !== this.target) return !1;
(s = this._propLookup), (r = this._overwrittenProps = e ? this._overwrittenProps || {} : "all");
}
if (s) {
if (((c = e || s), (u = e !== r && "all" !== r && e !== s && ("object" != typeof e || !e._tempKill)), i && (O.onOverwrite || this.vars.onOverwrite))) {
for (o in c) s[o] && (h || (h = []), h.push(o));
if ((h || !e) && !Q(this, i, t, h)) return !1;
}
for (o in c)
(a = s[o]) &&
(d && (a.f ? a.t[a.p](a.s) : (a.t[a.p] = a.s), (l = !0)),
a.pg && a.t._kill(c) && (l = !0),
(a.pg && 0 !== a.t._overwriteProps.length) ||
(a._prev ? (a._prev._next = a._next) : a === this._firstPT && (this._firstPT = a._next), a._next && (a._next._prev = a._prev), (a._next = a._prev = null)),
delete s[o]),
u && (r[o] = 1);
!this._firstPT && this._initted && this._enabled(!1, !1);
}
}
return l;
}),
(a.invalidate = function () {
return (
this._notifyPluginsOfEnabled && O._onPluginEvent("_onDisable", this),
(this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null),
(this._notifyPluginsOfEnabled = this._active = this._lazy = !1),
(this._propLookup = this._targets ? {} : []),
P.prototype.invalidate.call(this),
this.vars.immediateRender && ((this._time = -h), this.render(-this._delay)),
this
);
}),
(a._enabled = function (e, t) {
if ((l || s.wake(), e && this._gc)) {
var i,
n = this._targets;
if (n)
for (i = n.length; --i > -1;) this._siblings[i] = K(n[i], this, !0);
else this._siblings = K(this.target, this, !0);
}
return P.prototype._enabled.call(this, e, t), this._notifyPluginsOfEnabled && this._firstPT ? O._onPluginEvent(e ? "_onEnable" : "_onDisable", this) : !1;
}),
(O.to = function (e, t, i) {
return new O(e, t, i);
}),
(O.from = function (e, t, i) {
return (i.runBackwards = !0), (i.immediateRender = 0 != i.immediateRender), new O(e, t, i);
}),
(O.fromTo = function (e, t, i, n) {
return (n.startAt = i), (n.immediateRender = 0 != n.immediateRender && 0 != i.immediateRender), new O(e, t, n);
}),
(O.delayedCall = function (e, t, i, n, r) {
return new O(t, 0, {
delay: e,
onComplete: t,
onCompleteParams: i,
callbackScope: n,
onReverseComplete: t,
onReverseCompleteParams: i,
immediateRender: !1,
lazy: !1,
useFrames: r,
overwrite: 0
});
}),
(O.set = function (e, t) {
return new O(e, 0, t);
}),
(O.getTweensOf = function (e, t) {
if (null == e) return [];
e = "string" != typeof e ? e : O.selector(e) || e;
var i, n, r, o;
if ((p(e) || k(e)) && "number" != typeof e[0]) {
for (i = e.length, n = []; --i > -1;) n = n.concat(O.getTweensOf(e[i], t));
for (i = n.length; --i > -1;)
for (o = n[i], r = i; --r > -1;) o === n[r] && n.splice(i, 1);
} else
for (n = K(e).concat(), i = n.length; --i > -1;)(n[i]._gc || (t && !n[i].isActive())) && n.splice(i, 1);
return n;
}),
(O.killTweensOf = O.killDelayedCallsTo = function (e, t, i) {
"object" == typeof t && ((i = t), (t = !1));
for (var n = O.getTweensOf(e, t), r = n.length; --r > -1;) n[r]._kill(i, e);
});
var te = y(
"plugins.TweenPlugin",
function (e, t) {
(this._overwriteProps = (e || "").split(",")), (this._propName = this._overwriteProps[0]), (this._priority = t || 0), (this._super = te.prototype);
},
!0
);
if (
((a = te.prototype),
(te.version = "1.18.0"),
(te.API = 2),
(a._firstPT = null),
(a._addTween = F),
(a.setRatio = j),
(a._kill = function (e) {
var t,
i = this._overwriteProps,
n = this._firstPT;
if (null != e[this._propName]) this._overwriteProps = [];
else
for (t = i.length; --t > -1;) null != e[i[t]] && i.splice(t, 1);
for (; n;) null != e[n.n] && (n._next && (n._next._prev = n._prev), n._prev ? ((n._prev._next = n._next), (n._prev = null)) : this._firstPT === n && (this._firstPT = n._next)), (n = n._next);
return !1;
}),
(a._roundProps = function (e, t) {
for (var i = this._firstPT; i;)(e[this._propName] || (null != i.n && e[i.n.split(this._propName + "_").join("")])) && (i.r = t), (i = i._next);
}),
(O._onPluginEvent = function (e, t) {
var i,
n,
r,
o,
a,
s = t._firstPT;
if ("_onInitAllProps" === e) {
for (; s;) {
for (a = s._next, n = r; n && n.pr > s.pr;) n = n._next;
(s._prev = n ? n._prev : o) ? (s._prev._next = s) : (r = s), (s._next = n) ? (n._prev = s) : (o = s), (s = a);
}
s = t._firstPT = r;
}
for (; s;) s.pg && "function" == typeof s.t[e] && s.t[e]() && (i = !0), (s = s._next);
return i;
}),
(te.activate = function (e) {
for (var t = e.length; --t > -1;) e[t].API === te.API && (G[new e[t]()._propName] = e[t]);
return !0;
}),
(g.plugin = function (e) {
if (!(e && e.propName && e.init && e.API)) throw "illegal plugin definition.";
var t,
i = e.propName,
n = e.priority || 0,
r = e.overwriteProps,
o = {
init: "_onInitTween",
set: "setRatio",
kill: "_kill",
round: "_roundProps",
initAll: "_onInitAllProps"
},
a = y(
"plugins." + i.charAt(0).toUpperCase() + i.substr(1) + "Plugin",
function () {
te.call(this, i, n), (this._overwriteProps = r || []);
},
e.global === !0
),
s = (a.prototype = new te(i));
(s.constructor = a), (a.API = e.API);
for (t in o) "function" == typeof e[t] && (s[o[t]] = e[t]);
return (a.version = e.version), te.activate([a]), a;
}),
(r = e._gsQueue))
) {
for (o = 0; o < r.length; o++) r[o]();
for (a in m) m[a].func || e.console.log("GSAP encountered missing dependency: com.greensock." + a);
}
l = !1;
}
})("undefined" != typeof t && t.exports && "undefined" != typeof e ? e : this || window, "TweenMax");
}.call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}));
},
{},
],
210: [
function (e, t, i) {
"use strict";
function n() {
r.call(this), this.setMaxListeners(20);
}
var r = e("events").EventEmitter;
(n.prototype = Object.create(r.prototype)),
(n.prototype.constructor = n),
(n.prototype.off = function (e, t) {
return t ? this.removeListener(e, t) : e ? this.removeAllListeners(e) : this.removeAllListeners();
}),
(t.exports = n);
},
{
events: 188
},
],
211: [
function (e, t, i) {
"use strict";
function n(e) {
function t(t, i) {
if (e.verbose) {
var n = (i.size / 1024).toFixed() + "kb";
console.log("Imagepack --> Unpacked", t, "image/" + i.type, n);
}
d[t] = i;
}
function i(e) {
return e.replace(/�/g, "");
}
function n(e) {
var t = String.fromCharCode.apply(null, new Uint8Array(e));
return i(t);
}
function o(e) {
var t = new Image(),
i = function () {
t.removeEventListener("load", i), URL.revokeObjectURL(t.src), (t = null);
};
return t.addEventListener("load", i), (t.src = a(e)), t;
}
function a(e) {
var t = d[e];
if (!t) throw new Error("[ERROR] Imagepack " + e + " not found");
var i = new Blob([new Uint8Array(t.contents)], {
type: "image/" + t.type
});
return URL.createObjectURL(i);
}
function s() {
return Object.keys(d).sort();
}
function l(i) {
for (var r = new DataView(i), o = 128, a = 4, l = 8, c = 0; c < r.byteLength;) {
var u = n(i.slice(c, c + o));
c += o;
var d = r.getUint32(c);
c += a;
var f = n(i.slice(c, c + l));
c += l;
var p = i.slice(c, c + d);
(c += d), t(u, {
name: u,
contents: p,
type: f,
size: d
});
}
return e.verbose && console.log("Imagepack --> Unpacked " + s().length + " images"), h.emit("load", s()), h;
}
function c(t) {
var i = new XMLHttpRequest();
i.open("GET", t, !0),
(i.responseType = "arraybuffer"),
i.addEventListener("load", function () {
i.status < 400 ? l(i.response) : n();
}),
i.addEventListener("progress", function (e) {
e.lengthComputable && h.emit("progress", e.loaded / e.total);
});
var n = function () {
var t = "[ERROR] imagepack " + i.status + " " + e.path;
if (!h.listeners("error").length) throw new Error(t);
h.emit("error", t);
};
return i.addEventListener("error", n), i.send(), h;
}
function u() {
return (d = {}), h;
}
(window.Blob && window.DataView) || console.warn("Imagepack --> Unsupported browser");
var h,
d = {};
return (h = Object.create(r.prototype, {
_events: {
value: {}
},
load: {
value: c
},
unpack: {
value: l
},
getURI: {
value: a
},
getImage: {
value: o
},
getKeys: {
value: s
},
destroy: {
value: u
}
})), Object.freeze(h);
}
var r = e("./emitter.js");
if (!ArrayBuffer.prototype.slice) {
var o = ArrayBuffer.prototype;
o.slice = function (e, t) {
if (
(void 0 === e && (e = 0),
void 0 === t && (t = this.byteLength),
(e = Math.floor(e)),
(t = Math.floor(t)),
0 > e && (e += this.byteLength),
0 > t && (t += this.byteLength),
(e = Math.min(Math.max(0, e), this.byteLength)),
(t = Math.min(Math.max(0, t), this.byteLength)),
0 >= t - e)
)
return new ArrayBuffer(0);
var i = new ArrayBuffer(t - e),
n = new Uint8Array(i),
r = new Uint8Array(this, e, t - e);
return n.set(r), i;
};
}
t.exports = n;
},
{
"./emitter.js": 210
},
],
212: [
function (e, t, i) {
(function () {
var e;
(e = "undefined" != typeof i && null !== i ? i : this),
(e.Lethargy = (function () {
function e(e, t, i) {
(this.stability = null != e ? Math.abs(e) : 8),
(this.sensitivity = null != t ? 1 + Math.abs(t) : 100),
(this.tolerance = null != i ? 1 + Math.abs(i) : 1.1),
(this.lastUpDeltas = function () {
var e, t, i;
for (i = [], e = 1, t = 2 * this.stability; t >= 1 ? t >= e : e >= t; t >= 1 ? e++ : e--) i.push(null);
return i;
}.call(this)),
(this.lastDownDeltas = function () {
var e, t, i;
for (i = [], e = 1, t = 2 * this.stability; t >= 1 ? t >= e : e >= t; t >= 1 ? e++ : e--) i.push(null);
return i;
}.call(this)),
(this.deltasTimestamp = function () {
var e, t, i;
for (i = [], e = 1, t = 2 * this.stability; t >= 1 ? t >= e : e >= t; t >= 1 ? e++ : e--) i.push(null);
return i;
}.call(this));
}
return (
(e.prototype.check = function (e) {
var t;
return (
null != e.originalEvent.wheelDelta ?
(t = e.originalEvent.wheelDelta) :
null != e.originalEvent.deltaY ?
(t = -40 * e.originalEvent.deltaY) :
(null != e.originalEvent.detail || 0 === e.originalEvent.detail) && (t = -40 * e.originalEvent.detail),
this.deltasTimestamp.push(Date.now()),
this.deltasTimestamp.shift(),
t > 0 ? (this.lastUpDeltas.push(t), this.lastUpDeltas.shift(), this.isInertia(1)) : (this.lastDownDeltas.push(t), this.lastDownDeltas.shift(), this.isInertia(-1))
);
}),
(e.prototype.isInertia = function (e) {
var t, i, n, r, o, a, s;
return (
(t = -1 === e ? this.lastDownDeltas : this.lastUpDeltas),
null === t[0] ?
e :
this.deltasTimestamp[2 * this.stability - 2] + 150 > Date.now() && t[0] === t[2 * this.stability - 1] ?
!1 :
((n = t.slice(0, this.stability)),
(i = t.slice(this.stability, 2 * this.stability)),
(s = n.reduce(function (e, t) {
return e + t;
})),
(o = i.reduce(function (e, t) {
return e + t;
})),
(a = s / n.length),
(r = o / i.length),
Math.abs(a) < Math.abs(r * this.tolerance) && this.sensitivity < Math.abs(r) ? e : !1)
);
}),
(e.prototype.showLastUpDeltas = function () {
return this.lastUpDeltas;
}),
(e.prototype.showLastDownDeltas = function () {
return this.lastDownDeltas;
}),
e
);
})());
}.call(this));
},
{},
],
213: [
function (e, t, i) {
!(function (e, t) {
"object" == typeof i && i && "string" != typeof i.nodeName ? t(i) : "function" == typeof define && define.amd ? define(["exports"], t) : ((e.Mustache = {}), t(e.Mustache));
})(this, function (e) {
function t(e) {
return "function" == typeof e;
}
function i(e) {
return m(e) ? "array" : typeof e;
}
function n(e) {
return e.replace(/[-[]{}()*+?.,\^$|#s]/g, "\$&");
}
function r(e, t) {
return null != e && "object" == typeof e && t in e;
}
function o(e, t) {
return v.call(e, t);
}
function a(e) {
return !o(g, e);
}
function s(e) {
return String(e).replace(/[&<>"'`=/]/g, function (e) {
return y[e];
});
}
function l(t, i) {
function r() {
if (g && !y)
for (; v.length;) delete p[v.pop()];
else v = [];
(g = !1), (y = !1);
}
function o(e) {
if (("string" == typeof e && (e = e.split(b, 2)), !m(e) || 2 !== e.length)) throw new Error("Invalid tags: " + e);
(s = new RegExp(n(e[0]) + "\s*")), (l = new RegExp("\s*" + n(e[1]))), (d = new RegExp("\s*" + n("}" + e[1])));
}
if (!t) return [];
var s,
l,
d,
f = [],
p = [],
v = [],
g = !1,
y = !1;
o(i || e.tags);
for (var T, S, E, A, C, P, L = new h(t); !L.eos();) {
if (((T = L.pos), (E = L.scanUntil(s))))
for (var R = 0, O = E.length; O > R; ++R)(A = E.charAt(R)), a(A) ? v.push(p.length) : (y = !0), p.push(["text", A, T, T + 1]), (T += 1), "n" === A && r();
if (!L.scan(s)) break;
if (
((g = !0),
(S = L.scan(M) || "name"),
L.scan(_),
"=" === S ? ((E = L.scanUntil(x)), L.scan(x), L.scanUntil(l)) : "{" === S ? ((E = L.scanUntil(d)), L.scan(w), L.scanUntil(l), (S = "&")) : (E = L.scanUntil(l)),
!L.scan(l))
)
throw new Error("Unclosed tag at " + L.pos);
if (((C = [S, E, T, L.pos]), p.push(C), "#" === S || "^" === S)) f.push(C);
else if ("/" === S) {
if (((P = f.pop()), !P)) throw new Error('Unopened section "' + E + '" at ' + T);
if (P[1] !== E) throw new Error('Unclosed section "' + P[1] + '" at ' + T);
} else "name" === S || "{" === S || "&" === S ? (y = !0) : "=" === S && o(E);
}
if ((P = f.pop())) throw new Error('Unclosed section "' + P[1] + '" at ' + L.pos);
return u(c(p));
}
function c(e) {
for (var t, i, n = [], r = 0, o = e.length; o > r; ++r)(t = e[r]), t && ("text" === t[0] && i && "text" === i[0] ? ((i[1] += t[1]), (i[3] = t[3])) : (n.push(t), (i = t)));
return n;
}
function u(e) {
for (var t, i, n = [], r = n, o = [], a = 0, s = e.length; s > a; ++a)
switch (((t = e[a]), t[0])) {
case "#":
case "^":
r.push(t), o.push(t), (r = t[4] = []);
break;
case "/":
(i = o.pop()), (i[5] = t[2]), (r = o.length > 0 ? o[o.length - 1][4] : n);
break;
default:
r.push(t);
}
return n;
}
function h(e) {
(this.string = e), (this.tail = e), (this.pos = 0);
}
function d(e, t) {
(this.view = e), (this.cache = {
".": this.view
}), (this.parent = t);
}
function f() {
this.cache = {};
}
var p = Object.prototype.toString,
m =
Array.isArray ||
function (e) {
return "[object Array]" === p.call(e);
},
v = RegExp.prototype.test,
g = /S/,
y = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
"/": "/",
"`": "`",
"=": "="
},
_ = /s*/,
b = /s+/,
x = /s*=/,
w = /s*}/,
M = /#|^|/|>|{|&|=|!/;
(h.prototype.eos = function () {
return "" === this.tail;
}),
(h.prototype.scan = function (e) {
var t = this.tail.match(e);
if (!t || 0 !== t.index) return "";
var i = t[0];
return (this.tail = this.tail.substring(i.length)), (this.pos += i.length), i;
}),
(h.prototype.scanUntil = function (e) {
var t,
i = this.tail.search(e);
switch (i) {
case -1:
(t = this.tail), (this.tail = "");
break;
case 0:
t = "";
break;
default:
(t = this.tail.substring(0, i)), (this.tail = this.tail.substring(i));
}
return (this.pos += t.length), t;
}),
(d.prototype.push = function (e) {
return new d(e, this);
}),
(d.prototype.lookup = function (e) {
var i,
n = this.cache;
if (n.hasOwnProperty(e)) i = n[e];
else {
for (var o, a, s = this, l = !1; s;) {
if (e.indexOf(".") > 0)
for (i = s.view, o = e.split("."), a = 0; null != i && a < o.length;) a === o.length - 1 && (l = r(i, o[a])), (i = i[o[a++]]);
else(i = s.view[e]), (l = r(s.view, e));
if (l) break;
s = s.parent;
}
n[e] = i;
}
return t(i) && (i = i.call(this.view)), i;
}),
(f.prototype.clearCache = function () {
this.cache = {};
}),
(f.prototype.parse = function (e, t) {
var i = this.cache,
n = i[e];
return null == n && (n = i[e] = l(e, t)), n;
}),
(f.prototype.render = function (e, t, i) {
var n = this.parse(e),
r = t instanceof d ? t : new d(t);
return this.renderTokens(n, r, i, e);
}),
(f.prototype.renderTokens = function (e, t, i, n) {
for (var r, o, a, s = "", l = 0, c = e.length; c > l; ++l)
(a = void 0),
(r = e[l]),
(o = r[0]),
"#" === o ?
(a = this.renderSection(r, t, i, n)) :
"^" === o ?
(a = this.renderInverted(r, t, i, n)) :
">" === o ?
(a = this.renderPartial(r, t, i, n)) :
"&" === o ?
(a = this.unescapedValue(r, t)) :
"name" === o ?
(a = this.escapedValue(r, t)) :
"text" === o && (a = this.rawValue(r)),
void 0 !== a && (s += a);
return s;
}),
(f.prototype.renderSection = function (e, i, n, r) {
function o(e) {
return a.render(e, i, n);
}
var a = this,
s = "",
l = i.lookup(e[1]);
if (l) {
if (m(l))
for (var c = 0, u = l.length; u > c; ++c) s += this.renderTokens(e[4], i.push(l[c]), n, r);
else if ("object" == typeof l || "string" == typeof l || "number" == typeof l) s += this.renderTokens(e[4], i.push(l), n, r);
else if (t(l)) {
if ("string" != typeof r) throw new Error("Cannot use higher-order sections without the original template");
(l = l.call(i.view, r.slice(e[3], e[5]), o)), null != l && (s += l);
} else s += this.renderTokens(e[4], i, n, r);
return s;
}
}),
(f.prototype.renderInverted = function (e, t, i, n) {
var r = t.lookup(e[1]);
return !r || (m(r) && 0 === r.length) ? this.renderTokens(e[4], t, i, n) : void 0;
}),
(f.prototype.renderPartial = function (e, i, n) {
if (n) {
var r = t(n) ? n(e[1]) : n[e[1]];
return null != r ? this.renderTokens(this.parse(r), i, n, r) : void 0;
}
}),
(f.prototype.unescapedValue = function (e, t) {
var i = t.lookup(e[1]);
return null != i ? i : void 0;
}),
(f.prototype.escapedValue = function (t, i) {
var n = i.lookup(t[1]);
return null != n ? e.escape(n) : void 0;
}),
(f.prototype.rawValue = function (e) {
return e[1];
}),
(e.name = "mustache.js"),
(e.version = "2.2.1"),
(e.tags = ["{{", "}}"]);
var T = new f();
(e.clearCache = function () {
return T.clearCache();
}),
(e.parse = function (e, t) {
return T.parse(e, t);
}),
(e.render = function (e, t, n) {
if ("string" != typeof e) throw new TypeError('Invalid template! Template should be a "string" but "' + i(e) + '" was given as the first argument for mustache#render(template, view, partials)');
return T.render(e, t, n);
}),
(e.to_html = function (i, n, r, o) {
var a = e.render(i, n, r);
return t(o) ? void o(a) : a;
}),
(e.escape = s),
(e.Scanner = h),
(e.Context = d),
(e.Writer = f);
});
},
{},
],
214: [
function (e, t, i) {
t.exports = function (e) {
function t(t, n) {
function r() {
return ((2 * Math.PI) / 60 / 60) * v.autoRotateSpeed;
}
function o() {
return Math.pow(0.95, v.zoomSpeed);
}
function a(e) {
if (v.enabled !== !1) {
if ((e.preventDefault(), e.button === v.mouseButtons.ORBIT)) {
if (v.noRotate === !0) return;
(N = I.ROTATE), y.set(e.clientX, e.clientY);
} else if (e.button === v.mouseButtons.ZOOM) {
if (v.noZoom === !0) return;
(N = I.DOLLY), E.set(e.clientX, e.clientY);
} else if (e.button === v.mouseButtons.PAN) {
if (v.noPan === !0) return;
(N = I.PAN), x.set(e.clientX, e.clientY);
}
N !== I.NONE && (document.addEventListener("mousemove", s, !1), document.addEventListener("mouseup", l, !1), v.dispatchEvent(F));
}
}
function s(e) {
if (v.enabled !== !1) {
e.preventDefault();
var t = v.domElement === document ? v.domElement.body : v.domElement;
if (N === I.ROTATE) {
if (v.noRotate === !0) return;
_.set(e.clientX, e.clientY), b.subVectors(_, y), v.rotateLeft(((2 * Math.PI * b.x) / t.clientWidth) * v.rotateSpeed), v.rotateUp(((2 * Math.PI * b.y) / t.clientHeight) * v.rotateSpeed), y.copy(_);
} else if (N === I.DOLLY) {
if (v.noZoom === !0) return;
A.set(e.clientX, e.clientY), C.subVectors(A, E), C.y > 0 ? v.dollyIn() : C.y < 0 && v.dollyOut(), E.copy(A);
} else if (N === I.PAN) {
if (v.noPan === !0) return;
w.set(e.clientX, e.clientY), M.subVectors(w, x), v.pan(M.x, M.y), x.copy(w);
}
N !== I.NONE && v.update();
}
}
function l() {
v.enabled !== !1 && (document.removeEventListener("mousemove", s, !1), document.removeEventListener("mouseup", l, !1), v.dispatchEvent(V), (N = I.NONE));
}
function c(e) {
if (v.enabled !== !1 && v.noZoom !== !0 && N === I.NONE) {
e.preventDefault(), e.stopPropagation();
var t = 0;
void 0 !== e.wheelDelta ? (t = e.wheelDelta) : void 0 !== e.detail && (t = -e.detail), t > 0 ? v.dollyOut() : 0 > t && v.dollyIn(), v.update(), v.dispatchEvent(F), v.dispatchEvent(V);
}
}
function u(e) {
if (v.enabled !== !1 && v.noKeys !== !0 && v.noPan !== !0)
switch (e.keyCode) {
case v.keys.UP:
v.pan(0, v.keyPanSpeed), v.update();
break;
case v.keys.BOTTOM:
v.pan(0, -v.keyPanSpeed), v.update();
break;
case v.keys.LEFT:
v.pan(v.keyPanSpeed, 0), v.update();
break;
case v.keys.RIGHT:
v.pan(-v.keyPanSpeed, 0), v.update();
}
}
function h(e) {
if (v.enabled !== !1) {
switch (e.touches.length) {
case 1:
if (v.noRotate === !0) return;
(N = I.TOUCH_ROTATE), y.set(e.touches[0].pageX, e.touches[0].pageY);
break;
case 2:
if (v.noZoom === !0) return;
N = I.TOUCH_DOLLY;
var t = e.touches[0].pageX - e.touches[1].pageX,
i = e.touches[0].pageY - e.touches[1].pageY,
n = Math.sqrt(t * t + i * i);
E.set(0, n);
break;
case 3:
if (v.noPan === !0) return;
(N = I.TOUCH_PAN), x.set(e.touches[0].pageX, e.touches[0].pageY);
break;
default:
N = I.NONE;
}
N !== I.NONE && v.dispatchEvent(F);
}
}
function d(e) {
if (v.enabled !== !1) {
e.preventDefault(), e.stopPropagation();
var t = v.domElement === document ? v.domElement.body : v.domElement;
switch (e.touches.length) {
case 1:
if (v.noRotate === !0) return;
if (N !== I.TOUCH_ROTATE) return;
_.set(e.touches[0].pageX, e.touches[0].pageY),
b.subVectors(_, y),
v.rotateLeft(((2 * Math.PI * b.x) / t.clientWidth) * v.rotateSpeed),
v.rotateUp(((2 * Math.PI * b.y) / t.clientHeight) * v.rotateSpeed),
y.copy(_),
v.update();
break;
case 2:
if (v.noZoom === !0) return;
if (N !== I.TOUCH_DOLLY) return;
var i = e.touches[0].pageX - e.touches[1].pageX,
n = e.touches[0].pageY - e.touches[1].pageY,
r = Math.sqrt(i * i + n * n);
A.set(0, r), C.subVectors(A, E), C.y > 0 ? v.dollyOut() : C.y < 0 && v.dollyIn(), E.copy(A), v.update();
break;
case 3:
if (v.noPan === !0) return;
if (N !== I.TOUCH_PAN) return;
w.set(e.touches[0].pageX, e.touches[0].pageY), M.subVectors(w, x), v.pan(M.x, M.y), x.copy(w), v.update();
break;
default:
N = I.NONE;
}
}
}
function f() {
v.enabled !== !1 && (v.dispatchEvent(V), (N = I.NONE));
}
(this.object = t),
(this.domElement = void 0 !== n ? n : document),
(this.enabled = !0),
(this.target = new e.Vector3()),
(this.center = this.target),
(this.noZoom = !1),
(this.zoomSpeed = 1),
(this.minDistance = 0),
(this.maxDistance = 1 / 0),
(this.minZoom = 0),
(this.maxZoom = 1 / 0),
(this.noRotate = !1),
(this.rotateSpeed = 1),
(this.noPan = !1),
(this.keyPanSpeed = 7),
(this.autoRotate = !1),
(this.autoRotateSpeed = 2),
(this.minPolarAngle = 0),
(this.maxPolarAngle = Math.PI),
(this.minAzimuthAngle = -(1 / 0)),
(this.maxAzimuthAngle = 1 / 0),
(this.noKeys = !1),
(this.keys = {
LEFT: 37,
UP: 38,
RIGHT: 39,
BOTTOM: 40
}),
(this.mouseButtons = {
ORBIT: i.LEFT,
ZOOM: i.MIDDLE,
PAN: i.RIGHT
});
var p,
m,
v = this,
g = 1e-6,
y = new e.Vector2(),
_ = new e.Vector2(),
b = new e.Vector2(),
x = new e.Vector2(),
w = new e.Vector2(),
M = new e.Vector2(),
T = new e.Vector3(),
S = new e.Vector3(),
E = new e.Vector2(),
A = new e.Vector2(),
C = new e.Vector2(),
P = 0,
L = 0,
R = 1,
O = new e.Vector3(),
k = new e.Vector3(),
D = new e.Quaternion(),
I = {
NONE: -1,
ROTATE: 0,
DOLLY: 1,
PAN: 2,
TOUCH_ROTATE: 3,
TOUCH_DOLLY: 4,
TOUCH_PAN: 5
},
N = I.NONE;
(this.target0 = this.target.clone()), (this.position0 = this.object.position.clone()), (this.zoom0 = this.object.zoom);
var U = new e.Quaternion().setFromUnitVectors(t.up, new e.Vector3(0, 1, 0)),
j = U.clone().inverse(),
B = {
type: "change"
},
F = {
type: "start"
},
V = {
type: "end"
};
(this.rotateLeft = function (e) {
void 0 === e && (e = r()), (L -= e);
}),
(this.rotateUp = function (e) {
void 0 === e && (e = r()), (P -= e);
}),
(this.panLeft = function (e) {
var t = this.object.matrix.elements;
T.set(t[0], t[1], t[2]), T.multiplyScalar(-e), O.add(T);
}),
(this.panUp = function (e) {
var t = this.object.matrix.elements;
T.set(t[4], t[5], t[6]), T.multiplyScalar(e), O.add(T);
}),
(this.pan = function (t, i) {
var n = v.domElement === document ? v.domElement.body : v.domElement;
if (v.object instanceof e.PerspectiveCamera) {
var r = v.object.position,
o = r.clone().sub(v.target),
a = o.length();
(a *= Math.tan(((v.object.fov / 2) * Math.PI) / 180)), v.panLeft((2 * t * a) / n.clientHeight), v.panUp((2 * i * a) / n.clientHeight);
} else
v.object instanceof e.OrthographicCamera ?
(v.panLeft((t * (v.object.right - v.object.left)) / n.clientWidth), v.panUp((i * (v.object.top - v.object.bottom)) / n.clientHeight)) :
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.");
}),
(this.dollyIn = function (t) {
void 0 === t && (t = o()),
v.object instanceof e.PerspectiveCamera ?
(R /= t) :
v.object instanceof e.OrthographicCamera ?
((v.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom * t))), v.object.updateProjectionMatrix(), v.dispatchEvent(B)) :
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.");
}),
(this.dollyOut = function (t) {
void 0 === t && (t = o()),
v.object instanceof e.PerspectiveCamera ?
(R *= t) :
v.object instanceof e.OrthographicCamera ?
((v.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / t))), v.object.updateProjectionMatrix(), v.dispatchEvent(B)) :
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.");
}),
(this.update = function () {
var e = this.object.position;
S.copy(e).sub(this.target),
S.applyQuaternion(U),
(p = Math.atan2(S.x, S.z)),
(m = Math.atan2(Math.sqrt(S.x * S.x + S.z * S.z), S.y)),
this.autoRotate && N === I.NONE && this.rotateLeft(r()),
(p += L),
(m += P),
(p = Math.max(this.minAzimuthAngle, Math.min(this.maxAzimuthAngle, p))),
(m = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, m))),
(m = Math.max(g, Math.min(Math.PI - g, m)));
var t = S.length() * R;
(t = Math.max(this.minDistance, Math.min(this.maxDistance, t))),
this.target.add(O),
(S.x = t * Math.sin(m) * Math.sin(p)),
(S.y = t * Math.cos(m)),
(S.z = t * Math.sin(m) * Math.cos(p)),
S.applyQuaternion(j),
e.copy(this.target).add(S),
this.object.lookAt(this.target),
(L = 0),
(P = 0),
(R = 1),
O.set(0, 0, 0),
(k.distanceToSquared(this.object.position) > g || 8 * (1 - D.dot(this.object.quaternion)) > g) && (this.dispatchEvent(B), k.copy(this.object.position), D.copy(this.object.quaternion));
}),
(this.reset = function () {
(N = I.NONE), this.target.copy(this.target0), this.object.position.copy(this.position0), (this.object.zoom = this.zoom0), this.object.updateProjectionMatrix(), this.dispatchEvent(B), this.update();
}),
(this.getPolarAngle = function () {
return m;
}),
(this.getAzimuthalAngle = function () {
return p;
}),
this.domElement.addEventListener(
"contextmenu",
function (e) {
e.preventDefault();
},
!1
),
this.domElement.addEventListener("mousedown", a, !1),
this.domElement.addEventListener("mousewheel", c, !1),
this.domElement.addEventListener("DOMMouseScroll", c, !1),
this.domElement.addEventListener("touchstart", h, !1),
this.domElement.addEventListener("touchend", f, !1),
this.domElement.addEventListener("touchmove", d, !1),
window.addEventListener("keydown", u, !1),
this.update();
}
var i = e.MOUSE;
return i || (i = {
LEFT: 0,
MIDDLE: 1,
RIGHT: 2
}), (t.prototype = Object.create(e.EventDispatcher.prototype)), (t.prototype.constructor = t), t;
};
},
{},
],
215: [
function (e, t, i) {
var n = {
REVISION: "79"
};
"function" == typeof define && define.amd ? define("three", n) : "undefined" != typeof i && "undefined" != typeof t && (t.exports = n),
void 0 === Number.EPSILON && (Number.EPSILON = Math.pow(2, -52)),
void 0 === Math.sign &&
(Math.sign = function (e) {
return 0 > e ? -1 : e > 0 ? 1 : +e;
}),
void 0 === Function.prototype.name &&
Object.defineProperty(Function.prototype, "name", {
get: function () {
return this.toString().match(/^s*functions*(S*)s*(/)[1];
},
}),
void 0 === Object.assign &&
!(function () {
Object.assign = function (e) {
"use strict";
if (void 0 === e || null === e) throw new TypeError("Cannot convert undefined or null to object");
for (var t = Object(e), i = 1; i < arguments.length; i++) {
var n = arguments[i];
if (void 0 !== n && null !== n)
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
}
return t;
};
})(),
Object.assign(n, {
MOUSE: {
LEFT: 0,
MIDDLE: 1,
RIGHT: 2
},
CullFaceNone: 0,
CullFaceBack: 1,
CullFaceFront: 2,
CullFaceFrontBack: 3,
FrontFaceDirectionCW: 0,
FrontFaceDirectionCCW: 1,
BasicShadowMap: 0,
PCFShadowMap: 1,
PCFSoftShadowMap: 2,
FrontSide: 0,
BackSide: 1,
DoubleSide: 2,
FlatShading: 1,
SmoothShading: 2,
NoColors: 0,
FaceColors: 1,
VertexColors: 2,
NoBlending: 0,
NormalBlending: 1,
AdditiveBlending: 2,
SubtractiveBlending: 3,
MultiplyBlending: 4,
CustomBlending: 5,
AddEquation: 100,
SubtractEquation: 101,
ReverseSubtractEquation: 102,
MinEquation: 103,
MaxEquation: 104,
ZeroFactor: 200,
OneFactor: 201,
SrcColorFactor: 202,
OneMinusSrcColorFactor: 203,
SrcAlphaFactor: 204,
OneMinusSrcAlphaFactor: 205,
DstAlphaFactor: 206,
OneMinusDstAlphaFactor: 207,
DstColorFactor: 208,
OneMinusDstColorFactor: 209,
SrcAlphaSaturateFactor: 210,
NeverDepth: 0,
AlwaysDepth: 1,
LessDepth: 2,
LessEqualDepth: 3,
EqualDepth: 4,
GreaterEqualDepth: 5,
GreaterDepth: 6,
NotEqualDepth: 7,
MultiplyOperation: 0,
MixOperation: 1,
AddOperation: 2,
NoToneMapping: 0,
LinearToneMapping: 1,
ReinhardToneMapping: 2,
Uncharted2ToneMapping: 3,
CineonToneMapping: 4,
UVMapping: 300,
CubeReflectionMapping: 301,
CubeRefractionMapping: 302,
EquirectangularReflectionMapping: 303,
EquirectangularRefractionMapping: 304,
SphericalReflectionMapping: 305,
CubeUVReflectionMapping: 306,
CubeUVRefractionMapping: 307,
RepeatWrapping: 1e3,
ClampToEdgeWrapping: 1001,
MirroredRepeatWrapping: 1002,
NearestFilter: 1003,
NearestMipMapNearestFilter: 1004,
NearestMipMapLinearFilter: 1005,
LinearFilter: 1006,
LinearMipMapNearestFilter: 1007,
LinearMipMapLinearFilter: 1008,
UnsignedByteType: 1009,
ByteType: 1010,
ShortType: 1011,
UnsignedShortType: 1012,
IntType: 1013,
UnsignedIntType: 1014,
FloatType: 1015,
HalfFloatType: 1025,
UnsignedShort4444Type: 1016,
UnsignedShort5551Type: 1017,
UnsignedShort565Type: 1018,
AlphaFormat: 1019,
RGBFormat: 1020,
RGBAFormat: 1021,
LuminanceFormat: 1022,
LuminanceAlphaFormat: 1023,
RGBEFormat: n.RGBAFormat,
DepthFormat: 1026,
RGB_S3TC_DXT1_Format: 2001,
RGBA_S3TC_DXT1_Format: 2002,
RGBA_S3TC_DXT3_Format: 2003,
RGBA_S3TC_DXT5_Format: 2004,
RGB_PVRTC_4BPPV1_Format: 2100,
RGB_PVRTC_2BPPV1_Format: 2101,
RGBA_PVRTC_4BPPV1_Format: 2102,
RGBA_PVRTC_2BPPV1_Format: 2103,
RGB_ETC1_Format: 2151,
LoopOnce: 2200,
LoopRepeat: 2201,
LoopPingPong: 2202,
InterpolateDiscrete: 2300,
InterpolateLinear: 2301,
InterpolateSmooth: 2302,
ZeroCurvatureEnding: 2400,
ZeroSlopeEnding: 2401,
WrapAroundEnding: 2402,
TrianglesDrawMode: 0,
TriangleStripDrawMode: 1,
TriangleFanDrawMode: 2,
LinearEncoding: 3e3,
sRGBEncoding: 3001,
GammaEncoding: 3007,
RGBEEncoding: 3002,
LogLuvEncoding: 3003,
RGBM7Encoding: 3004,
RGBM16Encoding: 3005,
RGBDEncoding: 3006,
BasicDepthPacking: 3200,
RGBADepthPacking: 3201,
}),
(n.Color = function (e, t, i) {
return void 0 === t && void 0 === i ? this.set(e) : this.setRGB(e, t, i);
}),
(n.Color.prototype = {
constructor: n.Color,
r: 1,
g: 1,
b: 1,
set: function (e) {
return e instanceof n.Color ? this.copy(e) : "number" == typeof e ? this.setHex(e) : "string" == typeof e && this.setStyle(e), this;
},
setScalar: function (e) {
(this.r = e), (this.g = e), (this.b = e);
},
setHex: function (e) {
return (e = Math.floor(e)), (this.r = ((e >> 16) & 255) / 255), (this.g = ((e >> 8) & 255) / 255), (this.b = (255 & e) / 255), this;
},
setRGB: function (e, t, i) {
return (this.r = e), (this.g = t), (this.b = i), this;
},
setHSL: (function () {
function e(e, t, i) {
return 0 > i && (i += 1), i > 1 && (i -= 1), 1 / 6 > i ? e + 6 * (t - e) * i : 0.5 > i ? t : 2 / 3 > i ? e + 6 * (t - e) * (2 / 3 - i) : e;
}
return function (t, i, r) {
if (((t = n.Math.euclideanModulo(t, 1)), (i = n.Math.clamp(i, 0, 1)), (r = n.Math.clamp(r, 0, 1)), 0 === i)) this.r = this.g = this.b = r;
else {
var o = 0.5 >= r ? r * (1 + i) : r + i - r * i,
a = 2 * r - o;
(this.r = e(a, o, t + 1 / 3)), (this.g = e(a, o, t)), (this.b = e(a, o, t - 1 / 3));
}
return this;
};
})(),
setStyle: function (e) {
function t(t) {
void 0 !== t && parseFloat(t) < 1 && console.warn("THREE.Color: Alpha component of " + e + " will be ignored.");
}
var i;
if ((i = /^((?:rgb|hsl)a?)(s*([^)]*))/.exec(e))) {
var r,
o = i[1],
a = i[2];
switch (o) {
case "rgb":
case "rgba":
if ((r = /^(d+)s*,s*(d+)s*,s*(d+)s*(,s*([0-9]*.?[0-9]+)s*)?$/.exec(a)))
return (this.r = Math.min(255, parseInt(r[1], 10)) / 255), (this.g = Math.min(255, parseInt(r[2], 10)) / 255), (this.b = Math.min(255, parseInt(r[3], 10)) / 255), t(r[5]), this;
if ((r = /^(d+)%s*,s*(d+)%s*,s*(d+)%s*(,s*([0-9]*.?[0-9]+)s*)?$/.exec(a)))
return (this.r = Math.min(100, parseInt(r[1], 10)) / 100), (this.g = Math.min(100, parseInt(r[2], 10)) / 100), (this.b = Math.min(100, parseInt(r[3], 10)) / 100), t(r[5]), this;
break;
case "hsl":
case "hsla":
if ((r = /^([0-9]*.?[0-9]+)s*,s*(d+)%s*,s*(d+)%s*(,s*([0-9]*.?[0-9]+)s*)?$/.exec(a))) {
var s = parseFloat(r[1]) / 360,
l = parseInt(r[2], 10) / 100,
c = parseInt(r[3], 10) / 100;
return t(r[5]), this.setHSL(s, l, c);
}
}
} else if ((i = /^#([A-Fa-f0-9]+)$/.exec(e))) {
var u = i[1],
h = u.length;
if (3 === h) return (this.r = parseInt(u.charAt(0) + u.charAt(0), 16) / 255), (this.g = parseInt(u.charAt(1) + u.charAt(1), 16) / 255), (this.b = parseInt(u.charAt(2) + u.charAt(2), 16) / 255), this;
if (6 === h) return (this.r = parseInt(u.charAt(0) + u.charAt(1), 16) / 255), (this.g = parseInt(u.charAt(2) + u.charAt(3), 16) / 255), (this.b = parseInt(u.charAt(4) + u.charAt(5), 16) / 255), this;
}
if (e && e.length > 0) {
var u = n.ColorKeywords[e];
void 0 !== u ? this.setHex(u) : console.warn("THREE.Color: Unknown color " + e);
}
return this;
},
clone: function () {
return new this.constructor(this.r, this.g, this.b);
},
copy: function (e) {
return (this.r = e.r), (this.g = e.g), (this.b = e.b), this;
},
copyGammaToLinear: function (e, t) {
return void 0 === t && (t = 2), (this.r = Math.pow(e.r, t)), (this.g = Math.pow(e.g, t)), (this.b = Math.pow(e.b, t)), this;
},
copyLinearToGamma: function (e, t) {
void 0 === t && (t = 2);
var i = t > 0 ? 1 / t : 1;
return (this.r = Math.pow(e.r, i)), (this.g = Math.pow(e.g, i)), (this.b = Math.pow(e.b, i)), this;
},
convertGammaToLinear: function () {
var e = this.r,
t = this.g,
i = this.b;
return (this.r = e * e), (this.g = t * t), (this.b = i * i), this;
},
convertLinearToGamma: function () {
return (this.r = Math.sqrt(this.r)), (this.g = Math.sqrt(this.g)), (this.b = Math.sqrt(this.b)), this;
},
getHex: function () {
return ((255 * this.r) << 16) ^ ((255 * this.g) << 8) ^ ((255 * this.b) << 0);
},
getHexString: function () {
return ("000000" + this.getHex().toString(16)).slice(-6);
},
getHSL: function (e) {
var t,
i,
n = e || {
h: 0,
s: 0,
l: 0
},
r = this.r,
o = this.g,
a = this.b,
s = Math.max(r, o, a),
l = Math.min(r, o, a),
c = (l + s) / 2;
if (l === s)(t = 0), (i = 0);
else {
var u = s - l;
switch (((i = 0.5 >= c ? u / (s + l) : u / (2 - s - l)), s)) {
case r:
t = (o - a) / u + (a > o ? 6 : 0);
break;
case o:
t = (a - r) / u + 2;
break;
case a:
t = (r - o) / u + 4;
}
t /= 6;
}
return (n.h = t), (n.s = i), (n.l = c), n;
},
getStyle: function () {
return "rgb(" + ((255 * this.r) | 0) + "," + ((255 * this.g) | 0) + "," + ((255 * this.b) | 0) + ")";
},
offsetHSL: function (e, t, i) {
var n = this.getHSL();
return (n.h += e), (n.s += t), (n.l += i), this.setHSL(n.h, n.s, n.l), this;
},
add: function (e) {
return (this.r += e.r), (this.g += e.g), (this.b += e.b), this;
},
addColors: function (e, t) {
return (this.r = e.r + t.r), (this.g = e.g + t.g), (this.b = e.b + t.b), this;
},
addScalar: function (e) {
return (this.r += e), (this.g += e), (this.b += e), this;
},
sub: function (e) {
return (this.r = Math.max(0, this.r - e.r)), (this.g = Math.max(0, this.g - e.g)), (this.b = Math.max(0, this.b - e.b)), this;
},
multiply: function (e) {
return (this.r *= e.r), (this.g *= e.g), (this.b *= e.b), this;
},
multiplyScalar: function (e) {
return (this.r *= e), (this.g *= e), (this.b *= e), this;
},
lerp: function (e, t) {
return (this.r += (e.r - this.r) * t), (this.g += (e.g - this.g) * t), (this.b += (e.b - this.b) * t), this;
},
equals: function (e) {
return e.r === this.r && e.g === this.g && e.b === this.b;
},
fromArray: function (e, t) {
return void 0 === t && (t = 0), (this.r = e[t]), (this.g = e[t + 1]), (this.b = e[t + 2]), this;
},
toArray: function (e, t) {
return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.r), (e[t + 1] = this.g), (e[t + 2] = this.b), e;
},
}),
(n.ColorKeywords = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
aquamarine: 8388564,
azure: 15794175,
beige: 16119260,
bisque: 16770244,
black: 0,
blanchedalmond: 16772045,
blue: 255,
blueviolet: 9055202,
brown: 10824234,
burlywood: 14596231,
cadetblue: 6266528,
chartreuse: 8388352,
chocolate: 13789470,
coral: 16744272,
cornflowerblue: 6591981,
cornsilk: 16775388,
crimson: 14423100,
cyan: 65535,
darkblue: 139,
darkcyan: 35723,
darkgoldenrod: 12092939,
darkgray: 11119017,
darkgreen: 25600,
darkgrey: 11119017,
darkkhaki: 12433259,
darkmagenta: 9109643,
darkolivegreen: 5597999,
darkorange: 16747520,
darkorchid: 10040012,
darkred: 9109504,
darksalmon: 15308410,
darkseagreen: 9419919,
darkslateblue: 4734347,
darkslategray: 3100495,
darkslategrey: 3100495,
darkturquoise: 52945,
darkviolet: 9699539,
deeppink: 16716947,
deepskyblue: 49151,
dimgray: 6908265,
dimgrey: 6908265,
dodgerblue: 2003199,
firebrick: 11674146,
floralwhite: 16775920,
forestgreen: 2263842,
fuchsia: 16711935,
gainsboro: 14474460,
ghostwhite: 16316671,
gold: 16766720,
goldenrod: 14329120,
gray: 8421504,
green: 32768,
greenyellow: 11403055,
grey: 8421504,
honeydew: 15794160,
hotpink: 16738740,
indianred: 13458524,
indigo: 4915330,
ivory: 16777200,
khaki: 15787660,
lavender: 15132410,
lavenderblush: 16773365,
lawngreen: 8190976,
lemonchiffon: 16775885,
lightblue: 11393254,
lightcoral: 15761536,
lightcyan: 14745599,
lightgoldenrodyellow: 16448210,
lightgray: 13882323,
lightgreen: 9498256,
lightgrey: 13882323,
lightpink: 16758465,
lightsalmon: 16752762,
lightseagreen: 2142890,
lightskyblue: 8900346,
lightslategray: 7833753,
lightslategrey: 7833753,
lightsteelblue: 11584734,
lightyellow: 16777184,
lime: 65280,
limegreen: 3329330,
linen: 16445670,
magenta: 16711935,
maroon: 8388608,
mediumaquamarine: 6737322,
mediumblue: 205,
mediumorchid: 12211667,
mediumpurple: 9662683,
mediumseagreen: 3978097,
mediumslateblue: 8087790,
mediumspringgreen: 64154,
mediumturquoise: 4772300,
mediumvioletred: 13047173,
midnightblue: 1644912,
mintcream: 16121850,
mistyrose: 16770273,
moccasin: 16770229,
navajowhite: 16768685,
navy: 128,
oldlace: 16643558,
olive: 8421376,
olivedrab: 7048739,
orange: 16753920,
orangered: 16729344,
orchid: 14315734,
palegoldenrod: 15657130,
palegreen: 10025880,
paleturquoise: 11529966,
palevioletred: 14381203,
papayawhip: 16773077,
peachpuff: 16767673,
peru: 13468991,
pink: 16761035,
plum: 14524637,
powderblue: 11591910,
purple: 8388736,
red: 16711680,
rosybrown: 12357519,
royalblue: 4286945,
saddlebrown: 9127187,
salmon: 16416882,
sandybrown: 16032864,
seagreen: 3050327,
seashell: 16774638,
sienna: 10506797,
silver: 12632256,
skyblue: 8900331,
slateblue: 6970061,
slategray: 7372944,
slategrey: 7372944,
snow: 16775930,
springgreen: 65407,
steelblue: 4620980,
tan: 13808780,
teal: 32896,
thistle: 14204888,
tomato: 16737095,
turquoise: 4251856,
violet: 15631086,
wheat: 16113331,
white: 16777215,
whitesmoke: 16119285,
yellow: 16776960,
yellowgreen: 10145074,
}),
(n.Quaternion = function (e, t, i, n) {
(this._x = e || 0), (this._y = t || 0), (this._z = i || 0), (this._w = void 0 !== n ? n : 1);
}),
(n.Quaternion.prototype = {
constructor: n.Quaternion,
get x() {
return this._x;
},
set x(e) {
(this._x = e), this.onChangeCallback();
},
get y() {
return this._y;
},
set y(e) {
(this._y = e), this.onChangeCallback();
},
get z() {
return this._z;
},
set z(e) {
(this._z = e), this.onChangeCallback();
},
get w() {
return this._w;
},
set w(e) {
(this._w = e), this.onChangeCallback();
},
set: function (e, t, i, n) {
return (this._x = e), (this._y = t), (this._z = i), (this._w = n), this.onChangeCallback(), this;
},
clone: function () {
return new this.constructor(this._x, this._y, this._z, this._w);
},
copy: function (e) {
return (this._x = e.x), (this._y = e.y), (this._z = e.z), (this._w = e.w), this.onChangeCallback(), this;
},
setFromEuler: function (e, t) {
if (e instanceof n.Euler == !1) throw new Error("THREE.Quaternion: .setFromEuler() now expects a Euler rotation rather than a Vector3 and order.");
var i = Math.cos(e._x / 2),
r = Math.cos(e._y / 2),
o = Math.cos(e._z / 2),
a = Math.sin(e._x / 2),
s = Math.sin(e._y / 2),
l = Math.sin(e._z / 2),
c = e.order;
return (
"XYZ" === c ?
((this._x = a * r * o + i * s * l), (this._y = i * s * o - a * r * l), (this._z = i * r * l + a * s * o), (this._w = i * r * o - a * s * l)) :
"YXZ" === c ?
((this._x = a * r * o + i * s * l), (this._y = i * s * o - a * r * l), (this._z = i * r * l - a * s * o), (this._w = i * r * o + a * s * l)) :
"ZXY" === c ?
((this._x = a * r * o - i * s * l), (this._y = i * s * o + a * r * l), (this._z = i * r * l + a * s * o), (this._w = i * r * o - a * s * l)) :
"ZYX" === c ?
((this._x = a * r * o - i * s * l), (this._y = i * s * o + a * r * l), (this._z = i * r * l - a * s * o), (this._w = i * r * o + a * s * l)) :
"YZX" === c ?
((this._x = a * r * o + i * s * l), (this._y = i * s * o + a * r * l), (this._z = i * r * l - a * s * o), (this._w = i * r * o - a * s * l)) :
"XZY" === c && ((this._x = a * r * o - i * s * l), (this._y = i * s * o - a * r * l), (this._z = i * r * l + a * s * o), (this._w = i * r * o + a * s * l)),
t !== !1 && this.onChangeCallback(),
this
);
},
setFromAxisAngle: function (e, t) {
var i = t / 2,
n = Math.sin(i);
return (this._x = e.x * n), (this._y = e.y * n), (this._z = e.z * n), (this._w = Math.cos(i)), this.onChangeCallback(), this;
},
setFromRotationMatrix: function (e) {
var t,
i = e.elements,
n = i[0],
r = i[4],
o = i[8],
a = i[1],
s = i[5],
l = i[9],
c = i[2],
u = i[6],
h = i[10],
d = n + s + h;
return (
d > 0 ?
((t = 0.5 / Math.sqrt(d + 1)), (this._w = 0.25 / t), (this._x = (u - l) * t), (this._y = (o - c) * t), (this._z = (a - r) * t)) :
n > s && n > h ?
((t = 2 * Math.sqrt(1 + n - s - h)), (this._w = (u - l) / t), (this._x = 0.25 * t), (this._y = (r + a) / t), (this._z = (o + c) / t)) :
s > h ?
((t = 2 * Math.sqrt(1 + s - n - h)), (this._w = (o - c) / t), (this._x = (r + a) / t), (this._y = 0.25 * t), (this._z = (l + u) / t)) :
((t = 2 * Math.sqrt(1 + h - n - s)), (this._w = (a - r) / t), (this._x = (o + c) / t), (this._y = (l + u) / t), (this._z = 0.25 * t)),
this.onChangeCallback(),
this
);
},
setFromUnitVectors: (function () {
var e,
t,
i = 1e-6;
return function (r, o) {
return (
void 0 === e && (e = new n.Vector3()),
(t = r.dot(o) + 1),
i > t ? ((t = 0), Math.abs(r.x) > Math.abs(r.z) ? e.set(-r.y, r.x, 0) : e.set(0, -r.z, r.y)) : e.crossVectors(r, o),
(this._x = e.x),
(this._y = e.y),
(this._z = e.z),
(this._w = t),
this.normalize()
);
};
})(),
inverse: function () {
return this.conjugate().normalize();
},
conjugate: function () {
return (this._x *= -1), (this._y *= -1), (this._z *= -1), this.onChangeCallback(), this;
},
dot: function (e) {
return this._x * e._x + this._y * e._y + this._z * e._z + this._w * e._w;
},
lengthSq: function () {
return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;
},
length: function () {
return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);
},
normalize: function () {
var e = this.length();
return (
0 === e ? ((this._x = 0), (this._y = 0), (this._z = 0), (this._w = 1)) : ((e = 1 / e), (this._x = this._x * e), (this._y = this._y * e), (this._z = this._z * e), (this._w = this._w * e)),
this.onChangeCallback(),
this
);
},
multiply: function (e, t) {
return void 0 !== t ? (console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), this.multiplyQuaternions(e, t)) : this.multiplyQuaternions(this, e);
},
premultiply: function (e) {
return this.multiplyQuaternions(e, this);
},
multiplyQuaternions: function (e, t) {
var i = e._x,
n = e._y,
r = e._z,
o = e._w,
a = t._x,
s = t._y,
l = t._z,
c = t._w;
return (this._x = i * c + o * a + n * l - r * s), (this._y = n * c + o * s + r * a - i * l), (this._z = r * c + o * l + i * s - n * a), (this._w = o * c - i * a - n * s - r * l), this.onChangeCallback(), this;
},
slerp: function (e, t) {
if (0 === t) return this;
if (1 === t) return this.copy(e);
var i = this._x,
n = this._y,
r = this._z,
o = this._w,
a = o * e._w + i * e._x + n * e._y + r * e._z;
if ((0 > a ? ((this._w = -e._w), (this._x = -e._x), (this._y = -e._y), (this._z = -e._z), (a = -a)) : this.copy(e), a >= 1)) return (this._w = o), (this._x = i), (this._y = n), (this._z = r), this;
var s = Math.sqrt(1 - a * a);
if (Math.abs(s) < 0.001) return (this._w = 0.5 * (o + this._w)), (this._x = 0.5 * (i + this._x)), (this._y = 0.5 * (n + this._y)), (this._z = 0.5 * (r + this._z)), this;
var l = Math.atan2(s, a),
c = Math.sin((1 - t) * l) / s,
u = Math.sin(t * l) / s;
return (this._w = o * c + this._w * u), (this._x = i * c + this._x * u), (this._y = n * c + this._y * u), (this._z = r * c + this._z * u), this.onChangeCallback(), this;
},
equals: function (e) {
return e._x === this._x && e._y === this._y && e._z === this._z && e._w === this._w;
},
fromArray: function (e, t) {
return void 0 === t && (t = 0), (this._x = e[t]), (this._y = e[t + 1]), (this._z = e[t + 2]), (this._w = e[t + 3]), this.onChangeCallback(), this;
},
toArray: function (e, t) {
return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this._x), (e[t + 1] = this._y), (e[t + 2] = this._z), (e[t + 3] = this._w), e;
},
onChange: function (e) {
return (this.onChangeCallback = e), this;
},
onChangeCallback: function () {},
}),
Object.assign(n.Quaternion, {
slerp: function (e, t, i, n) {
return i.copy(e).slerp(t, n);
},
slerpFlat: function (e, t, i, n, r, o, a) {
var s = i[n + 0],
l = i[n + 1],
c = i[n + 2],
u = i[n + 3],
h = r[o + 0],
d = r[o + 1],
f = r[o + 2],
p = r[o + 3];
if (u !== p || s !== h || l !== d || c !== f) {
var m = 1 - a,
v = s * h + l * d + c * f + u * p,
g = v >= 0 ? 1 : -1,
y = 1 - v * v;
if (y > Number.EPSILON) {
var _ = Math.sqrt(y),
b = Math.atan2(_, v * g);
(m = Math.sin(m * b) / _), (a = Math.sin(a * b) / _);
}
var x = a * g;
if (((s = s * m + h * x), (l = l * m + d * x), (c = c * m + f * x), (u = u * m + p * x), m === 1 - a)) {
var w = 1 / Math.sqrt(s * s + l * l + c * c + u * u);
(s *= w), (l *= w), (c *= w), (u *= w);
}
}
(e[t] = s), (e[t + 1] = l), (e[t + 2] = c), (e[t + 3] = u);
},
}),
(n.Vector2 = function (e, t) {
(this.x = e || 0), (this.y = t || 0);
}),
(n.Vector2.prototype = {
constructor: n.Vector2,
get width() {
return this.x;
},
set width(e) {
this.x = e;
},
get height() {
return this.y;
},
set height(e) {
this.y = e;
},
set: function (e, t) {
return (this.x = e), (this.y = t), this;
},
setScalar: function (e) {
return (this.x = e), (this.y = e), this;
},
setX: function (e) {
return (this.x = e), this;
},
setY: function (e) {
return (this.y = e), this;
},
setComponent: function (e, t) {
switch (e) {
case 0:
this.x = t;
break;
case 1:
this.y = t;
break;
default:
throw new Error("index is out of range: " + e);
}
},
getComponent: function (e) {
switch (e) {
case 0:
return this.x;
case 1:
return this.y;
default:
throw new Error("index is out of range: " + e);
}
},
clone: function () {
return new this.constructor(this.x, this.y);
},
copy: function (e) {
return (this.x = e.x), (this.y = e.y), this;
},
add: function (e, t) {
return void 0 !== t ? (console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(e, t)) : ((this.x += e.x), (this.y += e.y), this);
},
addScalar: function (e) {
return (this.x += e), (this.y += e), this;
},
addVectors: function (e, t) {
return (this.x = e.x + t.x), (this.y = e.y + t.y), this;
},
addScaledVector: function (e, t) {
return (this.x += e.x * t), (this.y += e.y * t), this;
},
sub: function (e, t) {
return void 0 !== t ? (console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(e, t)) : ((this.x -= e.x), (this.y -= e.y), this);
},
subScalar: function (e) {
return (this.x -= e), (this.y -= e), this;
},
subVectors: function (e, t) {
return (this.x = e.x - t.x), (this.y = e.y - t.y), this;
},
multiply: function (e) {
return (this.x *= e.x), (this.y *= e.y), this;
},
multiplyScalar: function (e) {
return isFinite(e) ? ((this.x *= e), (this.y *= e)) : ((this.x = 0), (this.y = 0)), this;
},
divide: function (e) {
return (this.x /= e.x), (this.y /= e.y), this;
},
divideScalar: function (e) {
return this.multiplyScalar(1 / e);
},
min: function (e) {
return (this.x = Math.min(this.x, e.x)), (this.y = Math.min(this.y, e.y)), this;
},
max: function (e) {
return (this.x = Math.max(this.x, e.x)), (this.y = Math.max(this.y, e.y)), this;
},
clamp: function (e, t) {
return (this.x = Math.max(e.x, Math.min(t.x, this.x))), (this.y = Math.max(e.y, Math.min(t.y, this.y))), this;
},
clampScalar: (function () {
var e, t;
return function (i, r) {
return void 0 === e && ((e = new n.Vector2()), (t = new n.Vector2())), e.set(i, i), t.set(r, r), this.clamp(e, t);
};
})(),
clampLength: function (e, t) {
var i = this.length();
return this.multiplyScalar(Math.max(e, Math.min(t, i)) / i);
},
floor: function () {
return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), this;
},
ceil: function () {
return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), this;
},
round: function () {
return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), this;
},
roundToZero: function () {
return (this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x)), (this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y)), this;
},
negate: function () {
return (this.x = -this.x), (this.y = -this.y), this;
},
dot: function (e) {
return this.x * e.x + this.y * e.y;
},
lengthSq: function () {
return this.x * this.x + this.y * this.y;
},
length: function () {
return Math.sqrt(this.x * this.x + this.y * this.y);
},
lengthManhattan: function () {
return Math.abs(this.x) + Math.abs(this.y);
},
normalize: function () {
return this.divideScalar(this.length());
},
angle: function () {
var e = Math.atan2(this.y, this.x);
return 0 > e && (e += 2 * Math.PI), e;
},
distanceTo: function (e) {
return Math.sqrt(this.distanceToSquared(e));
},
distanceToSquared: function (e) {
var t = this.x - e.x,
i = this.y - e.y;
return t * t + i * i;
},
distanceToManhattan: function (e) {
return Math.abs(this.x - e.x) + Math.abs(this.y - e.y);
},
setLength: function (e) {
return this.multiplyScalar(e / this.length());
},
lerp: function (e, t) {
return (this.x += (e.x - this.x) * t), (this.y += (e.y - this.y) * t), this;
},
lerpVectors: function (e, t, i) {
return this.subVectors(t, e).multiplyScalar(i).add(e);
},
equals: function (e) {
return e.x === this.x && e.y === this.y;
},
fromArray: function (e, t) {
return void 0 === t && (t = 0), (this.x = e[t]), (this.y = e[t + 1]), this;
},
toArray: function (e, t) {
return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), e;
},
fromAttribute: function (e, t, i) {
return void 0 === i && (i = 0), (t = t * e.itemSize + i), (this.x = e.array[t]), (this.y = e.array[t + 1]), this;
},
rotateAround: function (e, t) {
var i = Math.cos(t),
n = Math.sin(t),
r = this.x - e.x,
o = this.y - e.y;
return (this.x = r * i - o * n + e.x), (this.y = r * n + o * i + e.y), this;
},
}),
(n.Vector3 = function (e, t, i) {
(this.x = e || 0), (this.y = t || 0), (this.z = i || 0);
}),
(n.Vector3.prototype = {
constructor: n.Vector3,
set: function (e, t, i) {
return (this.x = e), (this.y = t), (this.z = i), this;
},
setScalar: function (e) {
return (this.x = e), (this.y = e), (this.z = e), this;
},
setX: function (e) {
return (this.x = e), this;
},
setY: function (e) {
return (this.y = e), this;
},
setZ: function (e) {
return (this.z = e), this;
},
setComponent: function (e, t) {
switch (e) {
case 0:
this.x = t;
break;
case 1:
this.y = t;
break;
case 2:
this.z = t;
break;
default:
throw new Error("index is out of range: " + e);
}
},
getComponent: function (e) {
switch (e) {
case 0:
return this.x;
case 1:
return this.y;
case 2:
return this.z;
default:
throw new Error("index is out of range: " + e);
}
},
clone: function () {
return new this.constructor(this.x, this.y, this.z);
},
copy: function (e) {
return (this.x = e.x), (this.y = e.y), (this.z = e.z), this;
},
add: function (e, t) {
return void 0 !== t ? (console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(e, t)) : ((this.x += e.x), (this.y += e.y), (this.z += e.z), this);
},
addScalar: function (e) {
return (this.x += e), (this.y += e), (this.z += e), this;
},
addVectors: function (e, t) {
return (this.x = e.x + t.x), (this.y = e.y + t.y), (this.z = e.z + t.z), this;
},
addScaledVector: function (e, t) {
return (this.x += e.x * t), (this.y += e.y * t), (this.z += e.z * t), this;
},
sub: function (e, t) {
return void 0 !== t ? (console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(e, t)) : ((this.x -= e.x), (this.y -= e.y), (this.z -= e.z), this);
},
subScalar: function (e) {
return (this.x -= e), (this.y -= e), (this.z -= e), this;
},
subVectors: function (e, t) {
return (this.x = e.x - t.x), (this.y = e.y - t.y), (this.z = e.z - t.z), this;
},
multiply: function (e, t) {
return void 0 !== t ?
(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."), this.multiplyVectors(e, t)) :
((this.x *= e.x), (this.y *= e.y), (this.z *= e.z), this);
},
multiplyScalar: function (e) {
return isFinite(e) ? ((this.x *= e), (this.y *= e), (this.z *= e)) : ((this.x = 0), (this.y = 0), (this.z = 0)), this;
},
multiplyVectors: function (e, t) {
return (this.x = e.x * t.x), (this.y = e.y * t.y), (this.z = e.z * t.z), this;
},
applyEuler: (function () {
var e;
return function (t) {
return (
t instanceof n.Euler == !1 && console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),
void 0 === e && (e = new n.Quaternion()),
this.applyQuaternion(e.setFromEuler(t))
);
};
})(),
applyAxisAngle: (function () {
var e;
return function (t, i) {
return void 0 === e && (e = new n.Quaternion()), this.applyQuaternion(e.setFromAxisAngle(t, i));
};
})(),
applyMatrix3: function (e) {
var t = this.x,
i = this.y,
n = this.z,
r = e.elements;
return (this.x = r[0] * t + r[3] * i + r[6] * n), (this.y = r[1] * t + r[4] * i + r[7] * n), (this.z = r[2] * t + r[5] * i + r[8] * n), this;
},
applyMatrix4: function (e) {
var t = this.x,
i = this.y,
n = this.z,
r = e.elements;
return (this.x = r[0] * t + r[4] * i + r[8] * n + r[12]), (this.y = r[1] * t + r[5] * i + r[9] * n + r[13]), (this.z = r[2] * t + r[6] * i + r[10] * n + r[14]), this;
},
applyProjection: function (e) {
var t = this.x,
i = this.y,
n = this.z,
r = e.elements,
o = 1 / (r[3] * t + r[7] * i + r[11] * n + r[15]);
return (this.x = (r[0] * t + r[4] * i + r[8] * n + r[12]) * o), (this.y = (r[1] * t + r[5] * i + r[9] * n + r[13]) * o), (this.z = (r[2] * t + r[6] * i + r[10] * n + r[14]) * o), this;
},
applyQuaternion: function (e) {
var t = this.x,
i = this.y,
n = this.z,
r = e.x,
o = e.y,
a = e.z,
s = e.w,
l = s * t + o * n - a * i,
c = s * i + a * t - r * n,
u = s * n + r * i - o * t,
h = -r * t - o * i - a * n;
return (this.x = l * s + h * -r + c * -a - u * -o), (this.y = c * s + h * -o + u * -r - l * -a), (this.z = u * s + h * -a + l * -o - c * -r), this;
},
project: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Matrix4()), e.multiplyMatrices(t.projectionMatrix, e.getInverse(t.matrixWorld)), this.applyProjection(e);
};
})(),
unproject: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Matrix4()), e.multiplyMatrices(t.matrixWorld, e.getInverse(t.projectionMatrix)), this.applyProjection(e);
};
})(),
transformDirection: function (e) {
var t = this.x,
i = this.y,
n = this.z,
r = e.elements;
return (this.x = r[0] * t + r[4] * i + r[8] * n), (this.y = r[1] * t + r[5] * i + r[9] * n), (this.z = r[2] * t + r[6] * i + r[10] * n), this.normalize();
},
divide: function (e) {
return (this.x /= e.x), (this.y /= e.y), (this.z /= e.z), this;
},
divideScalar: function (e) {
return this.multiplyScalar(1 / e);
},
min: function (e) {
return (this.x = Math.min(this.x, e.x)), (this.y = Math.min(this.y, e.y)), (this.z = Math.min(this.z, e.z)), this;
},
max: function (e) {
return (this.x = Math.max(this.x, e.x)), (this.y = Math.max(this.y, e.y)), (this.z = Math.max(this.z, e.z)), this;
},
clamp: function (e, t) {
return (this.x = Math.max(e.x, Math.min(t.x, this.x))), (this.y = Math.max(e.y, Math.min(t.y, this.y))), (this.z = Math.max(e.z, Math.min(t.z, this.z))), this;
},
clampScalar: (function () {
var e, t;
return function (i, r) {
return void 0 === e && ((e = new n.Vector3()), (t = new n.Vector3())), e.set(i, i, i), t.set(r, r, r), this.clamp(e, t);
};
})(),
clampLength: function (e, t) {
var i = this.length();
return this.multiplyScalar(Math.max(e, Math.min(t, i)) / i);
},
floor: function () {
return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), (this.z = Math.floor(this.z)), this;
},
ceil: function () {
return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), (this.z = Math.ceil(this.z)), this;
},
round: function () {
return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), (this.z = Math.round(this.z)), this;
},
roundToZero: function () {
return (this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x)), (this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y)), (this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z)), this;
},
negate: function () {
return (this.x = -this.x), (this.y = -this.y), (this.z = -this.z), this;
},
dot: function (e) {
return this.x * e.x + this.y * e.y + this.z * e.z;
},
lengthSq: function () {
return this.x * this.x + this.y * this.y + this.z * this.z;
},
length: function () {
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
},
lengthManhattan: function () {
return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);
},
normalize: function () {
return this.divideScalar(this.length());
},
setLength: function (e) {
return this.multiplyScalar(e / this.length());
},
lerp: function (e, t) {
return (this.x += (e.x - this.x) * t), (this.y += (e.y - this.y) * t), (this.z += (e.z - this.z) * t), this;
},
lerpVectors: function (e, t, i) {
return this.subVectors(t, e).multiplyScalar(i).add(e);
},
cross: function (e, t) {
if (void 0 !== t) return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."), this.crossVectors(e, t);
var i = this.x,
n = this.y,
r = this.z;
return (this.x = n * e.z - r * e.y), (this.y = r * e.x - i * e.z), (this.z = i * e.y - n * e.x), this;
},
crossVectors: function (e, t) {
var i = e.x,
n = e.y,
r = e.z,
o = t.x,
a = t.y,
s = t.z;
return (this.x = n * s - r * a), (this.y = r * o - i * s), (this.z = i * a - n * o), this;
},
projectOnVector: function (e) {
var t = e.dot(this) / e.lengthSq();
return this.copy(e).multiplyScalar(t);
},
projectOnPlane: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Vector3()), e.copy(this).projectOnVector(t), this.sub(e);
};
})(),
reflect: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Vector3()), this.sub(e.copy(t).multiplyScalar(2 * this.dot(t)));
};
})(),
angleTo: function (e) {
var t = this.dot(e) / Math.sqrt(this.lengthSq() * e.lengthSq());
return Math.acos(n.Math.clamp(t, -1, 1));
},
distanceTo: function (e) {
return Math.sqrt(this.distanceToSquared(e));
},
distanceToSquared: function (e) {
var t = this.x - e.x,
i = this.y - e.y,
n = this.z - e.z;
return t * t + i * i + n * n;
},
distanceToManhattan: function (e) {
return Math.abs(this.x - e.x) + Math.abs(this.y - e.y) + Math.abs(this.z - e.z);
},
setFromSpherical: function (e) {
var t = Math.sin(e.phi) * e.radius;
return (this.x = t * Math.sin(e.theta)), (this.y = Math.cos(e.phi) * e.radius), (this.z = t * Math.cos(e.theta)), this;
},
setFromMatrixPosition: function (e) {
return this.setFromMatrixColumn(e, 3);
},
setFromMatrixScale: function (e) {
var t = this.setFromMatrixColumn(e, 0).length(),
i = this.setFromMatrixColumn(e, 1).length(),
n = this.setFromMatrixColumn(e, 2).length();
return (this.x = t), (this.y = i), (this.z = n), this;
},
setFromMatrixColumn: function (e, t) {
if ("number" == typeof e) {
console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).");
var i = e;
(e = t), (t = i);
}
return this.fromArray(e.elements, 4 * t);
},
equals: function (e) {
return e.x === this.x && e.y === this.y && e.z === this.z;
},
fromArray: function (e, t) {
return void 0 === t && (t = 0), (this.x = e[t]), (this.y = e[t + 1]), (this.z = e[t + 2]), this;
},
toArray: function (e, t) {
return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), (e[t + 2] = this.z), e;
},
fromAttribute: function (e, t, i) {
return void 0 === i && (i = 0), (t = t * e.itemSize + i), (this.x = e.array[t]), (this.y = e.array[t + 1]), (this.z = e.array[t + 2]), this;
},
}),
(n.Vector4 = function (e, t, i, n) {
(this.x = e || 0), (this.y = t || 0), (this.z = i || 0), (this.w = void 0 !== n ? n : 1);
}),
(n.Vector4.prototype = {
constructor: n.Vector4,
set: function (e, t, i, n) {
return (this.x = e), (this.y = t), (this.z = i), (this.w = n), this;
},
setScalar: function (e) {
return (this.x = e), (this.y = e), (this.z = e), (this.w = e), this;
},
setX: function (e) {
return (this.x = e), this;
},
setY: function (e) {
return (this.y = e), this;
},
setZ: function (e) {
return (this.z = e), this;
},
setW: function (e) {
return (this.w = e), this;
},
setComponent: function (e, t) {
switch (e) {
case 0:
this.x = t;
break;
case 1:
this.y = t;
break;
case 2:
this.z = t;
break;
case 3:
this.w = t;
break;
default:
throw new Error("index is out of range: " + e);
}
},
getComponent: function (e) {
switch (e) {
case 0:
return this.x;
case 1:
return this.y;
case 2:
return this.z;
case 3:
return this.w;
default:
throw new Error("index is out of range: " + e);
}
},
clone: function () {
return new this.constructor(this.x, this.y, this.z, this.w);
},
copy: function (e) {
return (this.x = e.x), (this.y = e.y), (this.z = e.z), (this.w = void 0 !== e.w ? e.w : 1), this;
},
add: function (e, t) {
return void 0 !== t ?
(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(e, t)) :
((this.x += e.x), (this.y += e.y), (this.z += e.z), (this.w += e.w), this);
},
addScalar: function (e) {
return (this.x += e), (this.y += e), (this.z += e), (this.w += e), this;
},
addVectors: function (e, t) {
return (this.x = e.x + t.x), (this.y = e.y + t.y), (this.z = e.z + t.z), (this.w = e.w + t.w), this;
},
addScaledVector: function (e, t) {
return (this.x += e.x * t), (this.y += e.y * t), (this.z += e.z * t), (this.w += e.w * t), this;
},
sub: function (e, t) {
return void 0 !== t ?
(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(e, t)) :
((this.x -= e.x), (this.y -= e.y), (this.z -= e.z), (this.w -= e.w), this);
},
subScalar: function (e) {
return (this.x -= e), (this.y -= e), (this.z -= e), (this.w -= e), this;
},
subVectors: function (e, t) {
return (this.x = e.x - t.x), (this.y = e.y - t.y), (this.z = e.z - t.z), (this.w = e.w - t.w), this;
},
multiplyScalar: function (e) {
return isFinite(e) ? ((this.x *= e), (this.y *= e), (this.z *= e), (this.w *= e)) : ((this.x = 0), (this.y = 0), (this.z = 0), (this.w = 0)), this;
},
applyMatrix4: function (e) {
var t = this.x,
i = this.y,
n = this.z,
r = this.w,
o = e.elements;
return (
(this.x = o[0] * t + o[4] * i + o[8] * n + o[12] * r),
(this.y = o[1] * t + o[5] * i + o[9] * n + o[13] * r),
(this.z = o[2] * t + o[6] * i + o[10] * n + o[14] * r),
(this.w = o[3] * t + o[7] * i + o[11] * n + o[15] * r),
this
);
},
divideScalar: function (e) {
return this.multiplyScalar(1 / e);
},
setAxisAngleFromQuaternion: function (e) {
this.w = 2 * Math.acos(e.w);
var t = Math.sqrt(1 - e.w * e.w);
return 1e-4 > t ? ((this.x = 1), (this.y = 0), (this.z = 0)) : ((this.x = e.x / t), (this.y = e.y / t), (this.z = e.z / t)), this;
},
setAxisAngleFromRotationMatrix: function (e) {
var t,
i,
n,
r,
o = 0.01,
a = 0.1,
s = e.elements,
l = s[0],
c = s[4],
u = s[8],
h = s[1],
d = s[5],
f = s[9],
p = s[2],
m = s[6],
v = s[10];
if (Math.abs(c - h) < o && Math.abs(u - p) < o && Math.abs(f - m) < o) {
if (Math.abs(c + h) < a && Math.abs(u + p) < a && Math.abs(f + m) < a && Math.abs(l + d + v - 3) < a) return this.set(1, 0, 0, 0), this;
t = Math.PI;
var g = (l + 1) / 2,
y = (d + 1) / 2,
_ = (v + 1) / 2,
b = (c + h) / 4,
x = (u + p) / 4,
w = (f + m) / 4;
return (
g > y && g > _ ?
o > g ?
((i = 0), (n = 0.707106781), (r = 0.707106781)) :
((i = Math.sqrt(g)), (n = b / i), (r = x / i)) :
y > _ ?
o > y ?
((i = 0.707106781), (n = 0), (r = 0.707106781)) :
((n = Math.sqrt(y)), (i = b / n), (r = w / n)) :
o > _ ?
((i = 0.707106781), (n = 0.707106781), (r = 0)) :
((r = Math.sqrt(_)), (i = x / r), (n = w / r)),
this.set(i, n, r, t),
this
);
}
var M = Math.sqrt((m - f) * (m - f) + (u - p) * (u - p) + (h - c) * (h - c));
return Math.abs(M) < 0.001 && (M = 1), (this.x = (m - f) / M), (this.y = (u - p) / M), (this.z = (h - c) / M), (this.w = Math.acos((l + d + v - 1) / 2)), this;
},
min: function (e) {
return (this.x = Math.min(this.x, e.x)), (this.y = Math.min(this.y, e.y)), (this.z = Math.min(this.z, e.z)), (this.w = Math.min(this.w, e.w)), this;
},
max: function (e) {
return (this.x = Math.max(this.x, e.x)), (this.y = Math.max(this.y, e.y)), (this.z = Math.max(this.z, e.z)), (this.w = Math.max(this.w, e.w)), this;
},
clamp: function (e, t) {
return (this.x = Math.max(e.x, Math.min(t.x, this.x))), (this.y = Math.max(e.y, Math.min(t.y, this.y))), (this.z = Math.max(e.z, Math.min(t.z, this.z))), (this.w = Math.max(e.w, Math.min(t.w, this.w))), this;
},
clampScalar: (function () {
var e, t;
return function (i, r) {
return void 0 === e && ((e = new n.Vector4()), (t = new n.Vector4())), e.set(i, i, i, i), t.set(r, r, r, r), this.clamp(e, t);
};
})(),
floor: function () {
return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), (this.z = Math.floor(this.z)), (this.w = Math.floor(this.w)), this;
},
ceil: function () {
return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), (this.z = Math.ceil(this.z)), (this.w = Math.ceil(this.w)), this;
},
round: function () {
return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), (this.z = Math.round(this.z)), (this.w = Math.round(this.w)), this;
},
roundToZero: function () {
return (
(this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x)),
(this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y)),
(this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z)),
(this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w)),
this
);
},
negate: function () {
return (this.x = -this.x), (this.y = -this.y), (this.z = -this.z), (this.w = -this.w), this;
},
dot: function (e) {
return this.x * e.x + this.y * e.y + this.z * e.z + this.w * e.w;
},
lengthSq: function () {
return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;
},
length: function () {
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);
},
lengthManhattan: function () {
return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w);
},
normalize: function () {
return this.divideScalar(this.length());
},
setLength: function (e) {
return this.multiplyScalar(e / this.length());
},
lerp: function (e, t) {
return (this.x += (e.x - this.x) * t), (this.y += (e.y - this.y) * t), (this.z += (e.z - this.z) * t), (this.w += (e.w - this.w) * t), this;
},
lerpVectors: function (e, t, i) {
return this.subVectors(t, e).multiplyScalar(i).add(e);
},
equals: function (e) {
return e.x === this.x && e.y === this.y && e.z === this.z && e.w === this.w;
},
fromArray: function (e, t) {
return void 0 === t && (t = 0), (this.x = e[t]), (this.y = e[t + 1]), (this.z = e[t + 2]), (this.w = e[t + 3]), this;
},
toArray: function (e, t) {
return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), (e[t + 2] = this.z), (e[t + 3] = this.w), e;
},
fromAttribute: function (e, t, i) {
return void 0 === i && (i = 0), (t = t * e.itemSize + i), (this.x = e.array[t]), (this.y = e.array[t + 1]), (this.z = e.array[t + 2]), (this.w = e.array[t + 3]), this;
},
}),
(n.Euler = function (e, t, i, r) {
(this._x = e || 0), (this._y = t || 0), (this._z = i || 0), (this._order = r || n.Euler.DefaultOrder);
}),
(n.Euler.RotationOrders = ["XYZ", "YZX", "ZXY", "XZY", "YXZ", "ZYX"]),
(n.Euler.DefaultOrder = "XYZ"),
(n.Euler.prototype = {
constructor: n.Euler,
get x() {
return this._x;
},
set x(e) {
(this._x = e), this.onChangeCallback();
},
get y() {
return this._y;
},
set y(e) {
(this._y = e), this.onChangeCallback();
},
get z() {
return this._z;
},
set z(e) {
(this._z = e), this.onChangeCallback();
},
get order() {
return this._order;
},
set order(e) {
(this._order = e), this.onChangeCallback();
},
set: function (e, t, i, n) {
return (this._x = e), (this._y = t), (this._z = i), (this._order = n || this._order), this.onChangeCallback(), this;
},
clone: function () {
return new this.constructor(this._x, this._y, this._z, this._order);
},
copy: function (e) {
return (this._x = e._x), (this._y = e._y), (this._z = e._z), (this._order = e._order), this.onChangeCallback(), this;
},
setFromRotationMatrix: function (e, t, i) {
var r = n.Math.clamp,
o = e.elements,
a = o[0],
s = o[4],
l = o[8],
c = o[1],
u = o[5],
h = o[9],
d = o[2],
f = o[6],
p = o[10];
return (
(t = t || this._order),
"XYZ" === t ?
((this._y = Math.asin(r(l, -1, 1))), Math.abs(l) < 0.99999 ? ((this._x = Math.atan2(-h, p)), (this._z = Math.atan2(-s, a))) : ((this._x = Math.atan2(f, u)), (this._z = 0))) :
"YXZ" === t ?
((this._x = Math.asin(-r(h, -1, 1))), Math.abs(h) < 0.99999 ? ((this._y = Math.atan2(l, p)), (this._z = Math.atan2(c, u))) : ((this._y = Math.atan2(-d, a)), (this._z = 0))) :
"ZXY" === t ?
((this._x = Math.asin(r(f, -1, 1))), Math.abs(f) < 0.99999 ? ((this._y = Math.atan2(-d, p)), (this._z = Math.atan2(-s, u))) : ((this._y = 0), (this._z = Math.atan2(c, a)))) :
"ZYX" === t ?
((this._y = Math.asin(-r(d, -1, 1))), Math.abs(d) < 0.99999 ? ((this._x = Math.atan2(f, p)), (this._z = Math.atan2(c, a))) : ((this._x = 0), (this._z = Math.atan2(-s, u)))) :
"YZX" === t ?
((this._z = Math.asin(r(c, -1, 1))), Math.abs(c) < 0.99999 ? ((this._x = Math.atan2(-h, u)), (this._y = Math.atan2(-d, a))) : ((this._x = 0), (this._y = Math.atan2(l, p)))) :
"XZY" === t ?
((this._z = Math.asin(-r(s, -1, 1))), Math.abs(s) < 0.99999 ? ((this._x = Math.atan2(f, u)), (this._y = Math.atan2(l, a))) : ((this._x = Math.atan2(-h, p)), (this._y = 0))) :
console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: " + t),
(this._order = t),
i !== !1 && this.onChangeCallback(),
this
);
},
setFromQuaternion: (function () {
var e;
return function (t, i, r) {
return void 0 === e && (e = new n.Matrix4()), e.makeRotationFromQuaternion(t), this.setFromRotationMatrix(e, i, r);
};
})(),
setFromVector3: function (e, t) {
return this.set(e.x, e.y, e.z, t || this._order);
},
reorder: (function () {
var e = new n.Quaternion();
return function (t) {
return e.setFromEuler(this), this.setFromQuaternion(e, t);
};
})(),
equals: function (e) {
return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order;
},
fromArray: function (e) {
return (this._x = e[0]), (this._y = e[1]), (this._z = e[2]), void 0 !== e[3] && (this._order = e[3]), this.onChangeCallback(), this;
},
toArray: function (e, t) {
return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this._x), (e[t + 1] = this._y), (e[t + 2] = this._z), (e[t + 3] = this._order), e;
},
toVector3: function (e) {
return e ? e.set(this._x, this._y, this._z) : new n.Vector3(this._x, this._y, this._z);
},
onChange: function (e) {
return (this.onChangeCallback = e), this;
},
onChangeCallback: function () {},
}),
(n.Line3 = function (e, t) {
(this.start = void 0 !== e ? e : new n.Vector3()), (this.end = void 0 !== t ? t : new n.Vector3());
}),
(n.Line3.prototype = {
constructor: n.Line3,
set: function (e, t) {
return this.start.copy(e), this.end.copy(t), this;
},
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
return this.start.copy(e.start), this.end.copy(e.end), this;
},
center: function (e) {
var t = e || new n.Vector3();
return t.addVectors(this.start, this.end).multiplyScalar(0.5);
},
delta: function (e) {
var t = e || new n.Vector3();
return t.subVectors(this.end, this.start);
},
distanceSq: function () {
return this.start.distanceToSquared(this.end);
},
distance: function () {
return this.start.distanceTo(this.end);
},
at: function (e, t) {
var i = t || new n.Vector3();
return this.delta(i).multiplyScalar(e).add(this.start);
},
closestPointToPointParameter: (function () {
var e = new n.Vector3(),
t = new n.Vector3();
return function (i, r) {
e.subVectors(i, this.start), t.subVectors(this.end, this.start);
var o = t.dot(t),
a = t.dot(e),
s = a / o;
return r && (s = n.Math.clamp(s, 0, 1)), s;
};
})(),
closestPointToPoint: function (e, t, i) {
var r = this.closestPointToPointParameter(e, t),
o = i || new n.Vector3();
return this.delta(o).multiplyScalar(r).add(this.start);
},
applyMatrix4: function (e) {
return this.start.applyMatrix4(e), this.end.applyMatrix4(e), this;
},
equals: function (e) {
return e.start.equals(this.start) && e.end.equals(this.end);
},
}),
(n.Box2 = function (e, t) {
(this.min = void 0 !== e ? e : new n.Vector2(+(1 / 0), +(1 / 0))), (this.max = void 0 !== t ? t : new n.Vector2(-(1 / 0), -(1 / 0)));
}),
(n.Box2.prototype = {
constructor: n.Box2,
set: function (e, t) {
return this.min.copy(e), this.max.copy(t), this;
},
setFromPoints: function (e) {
this.makeEmpty();
for (var t = 0, i = e.length; i > t; t++) this.expandByPoint(e[t]);
return this;
},
setFromCenterAndSize: (function () {
var e = new n.Vector2();
return function (t, i) {
var n = e.copy(i).multiplyScalar(0.5);
return this.min.copy(t).sub(n), this.max.copy(t).add(n), this;
};
})(),
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
return this.min.copy(e.min), this.max.copy(e.max), this;
},
makeEmpty: function () {
return (this.min.x = this.min.y = +(1 / 0)), (this.max.x = this.max.y = -(1 / 0)), this;
},
isEmpty: function () {
return this.max.x < this.min.x || this.max.y < this.min.y;
},
center: function (e) {
var t = e || new n.Vector2();
return t.addVectors(this.min, this.max).multiplyScalar(0.5);
},
size: function (e) {
var t = e || new n.Vector2();
return t.subVectors(this.max, this.min);
},
expandByPoint: function (e) {
return this.min.min(e), this.max.max(e), this;
},
expandByVector: function (e) {
return this.min.sub(e), this.max.add(e), this;
},
expandByScalar: function (e) {
return this.min.addScalar(-e), this.max.addScalar(e), this;
},
containsPoint: function (e) {
return e.x < this.min.x || e.x > this.max.x || e.y < this.min.y || e.y > this.max.y ? !1 : !0;
},
containsBox: function (e) {
return this.min.x <= e.min.x && e.max.x <= this.max.x && this.min.y <= e.min.y && e.max.y <= this.max.y ? !0 : !1;
},
getParameter: function (e, t) {
var i = t || new n.Vector2();
return i.set((e.x - this.min.x) / (this.max.x - this.min.x), (e.y - this.min.y) / (this.max.y - this.min.y));
},
intersectsBox: function (e) {
return e.max.x < this.min.x || e.min.x > this.max.x || e.max.y < this.min.y || e.min.y > this.max.y ? !1 : !0;
},
clampPoint: function (e, t) {
var i = t || new n.Vector2();
return i.copy(e).clamp(this.min, this.max);
},
distanceToPoint: (function () {
var e = new n.Vector2();
return function (t) {
var i = e.copy(t).clamp(this.min, this.max);
return i.sub(t).length();
};
})(),
intersect: function (e) {
return this.min.max(e.min), this.max.min(e.max), this;
},
union: function (e) {
return this.min.min(e.min), this.max.max(e.max), this;
},
translate: function (e) {
return this.min.add(e), this.max.add(e), this;
},
equals: function (e) {
return e.min.equals(this.min) && e.max.equals(this.max);
},
}),
(n.Box3 = function (e, t) {
(this.min = void 0 !== e ? e : new n.Vector3(+(1 / 0), +(1 / 0), +(1 / 0))), (this.max = void 0 !== t ? t : new n.Vector3(-(1 / 0), -(1 / 0), -(1 / 0)));
}),
(n.Box3.prototype = {
constructor: n.Box3,
set: function (e, t) {
return this.min.copy(e), this.max.copy(t), this;
},
setFromArray: function (e) {
for (var t = +(1 / 0), i = +(1 / 0), n = +(1 / 0), r = -(1 / 0), o = -(1 / 0), a = -(1 / 0), s = 0, l = e.length; l > s; s += 3) {
var c = e[s],
u = e[s + 1],
h = e[s + 2];
t > c && (t = c), i > u && (i = u), n > h && (n = h), c > r && (r = c), u > o && (o = u), h > a && (a = h);
}
this.min.set(t, i, n), this.max.set(r, o, a);
},
setFromPoints: function (e) {
this.makeEmpty();
for (var t = 0, i = e.length; i > t; t++) this.expandByPoint(e[t]);
return this;
},
setFromCenterAndSize: (function () {
var e = new n.Vector3();
return function (t, i) {
var n = e.copy(i).multiplyScalar(0.5);
return this.min.copy(t).sub(n), this.max.copy(t).add(n), this;
};
})(),
setFromObject: (function () {
var e = new n.Vector3();
return function (t) {
var i = this;
return (
t.updateMatrixWorld(!0),
this.makeEmpty(),
t.traverse(function (t) {
var r = t.geometry;
if (void 0 !== r)
if (r instanceof n.Geometry)
for (var o = r.vertices, a = 0, s = o.length; s > a; a++) e.copy(o[a]), e.applyMatrix4(t.matrixWorld), i.expandByPoint(e);
else if (r instanceof n.BufferGeometry) {
var l = r.attributes.position;
if (void 0 !== l) {
var c, u, h;
l instanceof n.InterleavedBufferAttribute ? ((c = l.data.array), (u = l.offset), (h = l.data.stride)) : ((c = l.array), (u = 0), (h = 3));
for (var a = u, s = c.length; s > a; a += h) e.fromArray(c, a), e.applyMatrix4(t.matrixWorld), i.expandByPoint(e);
}
}
}),
this
);
};
})(),
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
return this.min.copy(e.min), this.max.copy(e.max), this;
},
makeEmpty: function () {
return (this.min.x = this.min.y = this.min.z = +(1 / 0)), (this.max.x = this.max.y = this.max.z = -(1 / 0)), this;
},
isEmpty: function () {
return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z;
},
center: function (e) {
var t = e || new n.Vector3();
return t.addVectors(this.min, this.max).multiplyScalar(0.5);
},
size: function (e) {
var t = e || new n.Vector3();
return t.subVectors(this.max, this.min);
},
expandByPoint: function (e) {
return this.min.min(e), this.max.max(e), this;
},
expandByVector: function (e) {
return this.min.sub(e), this.max.add(e), this;
},
expandByScalar: function (e) {
return this.min.addScalar(-e), this.max.addScalar(e), this;
},
containsPoint: function (e) {
return e.x < this.min.x || e.x > this.max.x || e.y < this.min.y || e.y > this.max.y || e.z < this.min.z || e.z > this.max.z ? !1 : !0;
},
containsBox: function (e) {
return this.min.x <= e.min.x && e.max.x <= this.max.x && this.min.y <= e.min.y && e.max.y <= this.max.y && this.min.z <= e.min.z && e.max.z <= this.max.z ? !0 : !1;
},
getParameter: function (e, t) {
var i = t || new n.Vector3();
return i.set((e.x - this.min.x) / (this.max.x - this.min.x), (e.y - this.min.y) / (this.max.y - this.min.y), (e.z - this.min.z) / (this.max.z - this.min.z));
},
intersectsBox: function (e) {
return e.max.x < this.min.x || e.min.x > this.max.x || e.max.y < this.min.y || e.min.y > this.max.y || e.max.z < this.min.z || e.min.z > this.max.z ? !1 : !0;
},
intersectsSphere: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Vector3()), this.clampPoint(t.center, e), e.distanceToSquared(t.center) <= t.radius * t.radius;
};
})(),
intersectsPlane: function (e) {
var t, i;
return (
e.normal.x > 0 ? ((t = e.normal.x * this.min.x), (i = e.normal.x * this.max.x)) : ((t = e.normal.x * this.max.x), (i = e.normal.x * this.min.x)),
e.normal.y > 0 ? ((t += e.normal.y * this.min.y), (i += e.normal.y * this.max.y)) : ((t += e.normal.y * this.max.y), (i += e.normal.y * this.min.y)),
e.normal.z > 0 ? ((t += e.normal.z * this.min.z), (i += e.normal.z * this.max.z)) : ((t += e.normal.z * this.max.z), (i += e.normal.z * this.min.z)),
t <= e.constant && i >= e.constant
);
},
clampPoint: function (e, t) {
var i = t || new n.Vector3();
return i.copy(e).clamp(this.min, this.max);
},
distanceToPoint: (function () {
var e = new n.Vector3();
return function (t) {
var i = e.copy(t).clamp(this.min, this.max);
return i.sub(t).length();
};
})(),
getBoundingSphere: (function () {
var e = new n.Vector3();
return function (t) {
var i = t || new n.Sphere();
return (i.center = this.center()), (i.radius = 0.5 * this.size(e).length()), i;
};
})(),
intersect: function (e) {
return this.min.max(e.min), this.max.min(e.max), this.isEmpty() && this.makeEmpty(), this;
},
union: function (e) {
return this.min.min(e.min), this.max.max(e.max), this;
},
applyMatrix4: (function () {
var e = [new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3(), new n.Vector3()];
return function (t) {
return this.isEmpty() ?
this :
(e[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(t),
e[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(t),
e[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(t),
e[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(t),
e[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(t),
e[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(t),
e[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(t),
e[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(t),
this.setFromPoints(e),
this);
};
})(),
translate: function (e) {
return this.min.add(e), this.max.add(e), this;
},
equals: function (e) {
return e.min.equals(this.min) && e.max.equals(this.max);
},
}),
(n.Matrix3 = function () {
(this.elements = new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1])), arguments.length > 0 && console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.");
}),
(n.Matrix3.prototype = {
constructor: n.Matrix3,
set: function (e, t, i, n, r, o, a, s, l) {
var c = this.elements;
return (c[0] = e), (c[1] = n), (c[2] = a), (c[3] = t), (c[4] = r), (c[5] = s), (c[6] = i), (c[7] = o), (c[8] = l), this;
},
identity: function () {
return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this;
},
clone: function () {
return new this.constructor().fromArray(this.elements);
},
copy: function (e) {
var t = e.elements;
return this.set(t[0], t[3], t[6], t[1], t[4], t[7], t[2], t[5], t[8]), this;
},
setFromMatrix4: function (e) {
var t = e.elements;
return this.set(t[0], t[4], t[8], t[1], t[5], t[9], t[2], t[6], t[10]), this;
},
applyToVector3Array: (function () {
var e;
return function (t, i, r) {
void 0 === e && (e = new n.Vector3()), void 0 === i && (i = 0), void 0 === r && (r = t.length);
for (var o = 0, a = i; r > o; o += 3, a += 3) e.fromArray(t, a), e.applyMatrix3(this), e.toArray(t, a);
return t;
};
})(),
applyToBuffer: (function () {
var e;
return function (t, i, r) {
void 0 === e && (e = new n.Vector3()), void 0 === i && (i = 0), void 0 === r && (r = t.length / t.itemSize);
for (var o = 0, a = i; r > o; o++, a++)(e.x = t.getX(a)), (e.y = t.getY(a)), (e.z = t.getZ(a)), e.applyMatrix3(this), t.setXYZ(e.x, e.y, e.z);
return t;
};
})(),
multiplyScalar: function (e) {
var t = this.elements;
return (t[0] *= e), (t[3] *= e), (t[6] *= e), (t[1] *= e), (t[4] *= e), (t[7] *= e), (t[2] *= e), (t[5] *= e), (t[8] *= e), this;
},
determinant: function () {
var e = this.elements,
t = e[0],
i = e[1],
n = e[2],
r = e[3],
o = e[4],
a = e[5],
s = e[6],
l = e[7],
c = e[8];
return t * o * c - t * a * l - i * r * c + i * a * s + n * r * l - n * o * s;
},
getInverse: function (e, t) {
e instanceof n.Matrix4 && console.error("THREE.Matrix3.getInverse no longer takes a Matrix4 argument.");
var i = e.elements,
r = this.elements,
o = i[0],
a = i[1],
s = i[2],
l = i[3],
c = i[4],
u = i[5],
h = i[6],
d = i[7],
f = i[8],
p = f * c - u * d,
m = u * h - f * l,
v = d * l - c * h,
g = o * p + a * m + s * v;
if (0 === g) {
var y = "THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0";
if (t) throw new Error(y);
return console.warn(y), this.identity();
}
var _ = 1 / g;
return (
(r[0] = p * _),
(r[1] = (s * d - f * a) * _),
(r[2] = (u * a - s * c) * _),
(r[3] = m * _),
(r[4] = (f * o - s * h) * _),
(r[5] = (s * l - u * o) * _),
(r[6] = v * _),
(r[7] = (a * h - d * o) * _),
(r[8] = (c * o - a * l) * _),
this
);
},
transpose: function () {
var e,
t = this.elements;
return (e = t[1]), (t[1] = t[3]), (t[3] = e), (e = t[2]), (t[2] = t[6]), (t[6] = e), (e = t[5]), (t[5] = t[7]), (t[7] = e), this;
},
flattenToArrayOffset: function (e, t) {
return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."), this.toArray(e, t);
},
getNormalMatrix: function (e) {
return this.setFromMatrix4(e).getInverse(this).transpose();
},
transposeIntoArray: function (e) {
var t = this.elements;
return (e[0] = t[0]), (e[1] = t[3]), (e[2] = t[6]), (e[3] = t[1]), (e[4] = t[4]), (e[5] = t[7]), (e[6] = t[2]), (e[7] = t[5]), (e[8] = t[8]), this;
},
fromArray: function (e) {
return this.elements.set(e), this;
},
toArray: function (e, t) {
void 0 === e && (e = []), void 0 === t && (t = 0);
var i = this.elements;
return (e[t] = i[0]), (e[t + 1] = i[1]), (e[t + 2] = i[2]), (e[t + 3] = i[3]), (e[t + 4] = i[4]), (e[t + 5] = i[5]), (e[t + 6] = i[6]), (e[t + 7] = i[7]), (e[t + 8] = i[8]), e;
},
}),
(n.Matrix4 = function () {
(this.elements = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])), arguments.length > 0 && console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.");
}),
(n.Matrix4.prototype = {
constructor: n.Matrix4,
set: function (e, t, i, n, r, o, a, s, l, c, u, h, d, f, p, m) {
var v = this.elements;
return (v[0] = e), (v[4] = t), (v[8] = i), (v[12] = n), (v[1] = r), (v[5] = o), (v[9] = a), (v[13] = s), (v[2] = l), (v[6] = c), (v[10] = u), (v[14] = h), (v[3] = d), (v[7] = f), (v[11] = p), (v[15] = m), this;
},
identity: function () {
return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this;
},
clone: function () {
return new n.Matrix4().fromArray(this.elements);
},
copy: function (e) {
return this.elements.set(e.elements), this;
},
copyPosition: function (e) {
var t = this.elements,
i = e.elements;
return (t[12] = i[12]), (t[13] = i[13]), (t[14] = i[14]), this;
},
extractBasis: function (e, t, i) {
return e.setFromMatrixColumn(this, 0), t.setFromMatrixColumn(this, 1), i.setFromMatrixColumn(this, 2), this;
},
makeBasis: function (e, t, i) {
return this.set(e.x, t.x, i.x, 0, e.y, t.y, i.y, 0, e.z, t.z, i.z, 0, 0, 0, 0, 1), this;
},
extractRotation: (function () {
var e;
return function (t) {
void 0 === e && (e = new n.Vector3());
var i = this.elements,
r = t.elements,
o = 1 / e.setFromMatrixColumn(t, 0).length(),
a = 1 / e.setFromMatrixColumn(t, 1).length(),
s = 1 / e.setFromMatrixColumn(t, 2).length();
return (i[0] = r[0] * o), (i[1] = r[1] * o), (i[2] = r[2] * o), (i[4] = r[4] * a), (i[5] = r[5] * a), (i[6] = r[6] * a), (i[8] = r[8] * s), (i[9] = r[9] * s), (i[10] = r[10] * s), this;
};
})(),
makeRotationFromEuler: function (e) {
e instanceof n.Euler == !1 && console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");
var t = this.elements,
i = e.x,
r = e.y,
o = e.z,
a = Math.cos(i),
s = Math.sin(i),
l = Math.cos(r),
c = Math.sin(r),
u = Math.cos(o),
h = Math.sin(o);
if ("XYZ" === e.order) {
var d = a * u,
f = a * h,
p = s * u,
m = s * h;
(t[0] = l * u), (t[4] = -l * h), (t[8] = c), (t[1] = f + p * c), (t[5] = d - m * c), (t[9] = -s * l), (t[2] = m - d * c), (t[6] = p + f * c), (t[10] = a * l);
} else if ("YXZ" === e.order) {
var v = l * u,
g = l * h,
y = c * u,
_ = c * h;
(t[0] = v + _ * s), (t[4] = y * s - g), (t[8] = a * c), (t[1] = a * h), (t[5] = a * u), (t[9] = -s), (t[2] = g * s - y), (t[6] = _ + v * s), (t[10] = a * l);
} else if ("ZXY" === e.order) {
var v = l * u,
g = l * h,
y = c * u,
_ = c * h;
(t[0] = v - _ * s), (t[4] = -a * h), (t[8] = y + g * s), (t[1] = g + y * s), (t[5] = a * u), (t[9] = _ - v * s), (t[2] = -a * c), (t[6] = s), (t[10] = a * l);
} else if ("ZYX" === e.order) {
var d = a * u,
f = a * h,
p = s * u,
m = s * h;
(t[0] = l * u), (t[4] = p * c - f), (t[8] = d * c + m), (t[1] = l * h), (t[5] = m * c + d), (t[9] = f * c - p), (t[2] = -c), (t[6] = s * l), (t[10] = a * l);
} else if ("YZX" === e.order) {
var b = a * l,
x = a * c,
w = s * l,
M = s * c;
(t[0] = l * u), (t[4] = M - b * h), (t[8] = w * h + x), (t[1] = h), (t[5] = a * u), (t[9] = -s * u), (t[2] = -c * u), (t[6] = x * h + w), (t[10] = b - M * h);
} else if ("XZY" === e.order) {
var b = a * l,
x = a * c,
w = s * l,
M = s * c;
(t[0] = l * u), (t[4] = -h), (t[8] = c * u), (t[1] = b * h + M), (t[5] = a * u), (t[9] = x * h - w), (t[2] = w * h - x), (t[6] = s * u), (t[10] = M * h + b);
}
return (t[3] = 0), (t[7] = 0), (t[11] = 0), (t[12] = 0), (t[13] = 0), (t[14] = 0), (t[15] = 1), this;
},
makeRotationFromQuaternion: function (e) {
var t = this.elements,
i = e.x,
n = e.y,
r = e.z,
o = e.w,
a = i + i,
s = n + n,
l = r + r,
c = i * a,
u = i * s,
h = i * l,
d = n * s,
f = n * l,
p = r * l,
m = o * a,
v = o * s,
g = o * l;
return (
(t[0] = 1 - (d + p)),
(t[4] = u - g),
(t[8] = h + v),
(t[1] = u + g),
(t[5] = 1 - (c + p)),
(t[9] = f - m),
(t[2] = h - v),
(t[6] = f + m),
(t[10] = 1 - (c + d)),
(t[3] = 0),
(t[7] = 0),
(t[11] = 0),
(t[12] = 0),
(t[13] = 0),
(t[14] = 0),
(t[15] = 1),
this
);
},
lookAt: (function () {
var e, t, i;
return function (r, o, a) {
void 0 === e && ((e = new n.Vector3()), (t = new n.Vector3()), (i = new n.Vector3()));
var s = this.elements;
return (
i.subVectors(r, o).normalize(),
0 === i.lengthSq() && (i.z = 1),
e.crossVectors(a, i).normalize(),
0 === e.lengthSq() && ((i.z += 1e-4), e.crossVectors(a, i).normalize()),
t.crossVectors(i, e),
(s[0] = e.x),
(s[4] = t.x),
(s[8] = i.x),
(s[1] = e.y),
(s[5] = t.y),
(s[9] = i.y),
(s[2] = e.z),
(s[6] = t.z),
(s[10] = i.z),
this
);
};
})(),
multiply: function (e, t) {
return void 0 !== t ? (console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), this.multiplyMatrices(e, t)) : this.multiplyMatrices(this, e);
},
premultiply: function (e) {
return this.multiplyMatrices(e, this);
},
multiplyMatrices: function (e, t) {
var i = e.elements,
n = t.elements,
r = this.elements,
o = i[0],
a = i[4],
s = i[8],
l = i[12],
c = i[1],
u = i[5],
h = i[9],
d = i[13],
f = i[2],
p = i[6],
m = i[10],
v = i[14],
g = i[3],
y = i[7],
_ = i[11],
b = i[15],
x = n[0],
w = n[4],
M = n[8],
T = n[12],
S = n[1],
E = n[5],
A = n[9],
C = n[13],
P = n[2],
L = n[6],
R = n[10],
O = n[14],
k = n[3],
D = n[7],
I = n[11],
N = n[15];
return (
(r[0] = o * x + a * S + s * P + l * k),
(r[4] = o * w + a * E + s * L + l * D),
(r[8] = o * M + a * A + s * R + l * I),
(r[12] = o * T + a * C + s * O + l * N),
(r[1] = c * x + u * S + h * P + d * k),
(r[5] = c * w + u * E + h * L + d * D),
(r[9] = c * M + u * A + h * R + d * I),
(r[13] = c * T + u * C + h * O + d * N),
(r[2] = f * x + p * S + m * P + v * k),
(r[6] = f * w + p * E + m * L + v * D),
(r[10] = f * M + p * A + m * R + v * I),
(r[14] = f * T + p * C + m * O + v * N),
(r[3] = g * x + y * S + _ * P + b * k),
(r[7] = g * w + y * E + _ * L + b * D),
(r[11] = g * M + y * A + _ * R + b * I),
(r[15] = g * T + y * C + _ * O + b * N),
this
);
},
multiplyToArray: function (e, t, i) {
var n = this.elements;
return (
this.multiplyMatrices(e, t),
(i[0] = n[0]),
(i[1] = n[1]),
(i[2] = n[2]),
(i[3] = n[3]),
(i[4] = n[4]),
(i[5] = n[5]),
(i[6] = n[6]),
(i[7] = n[7]),
(i[8] = n[8]),
(i[9] = n[9]),
(i[10] = n[10]),
(i[11] = n[11]),
(i[12] = n[12]),
(i[13] = n[13]),
(i[14] = n[14]),
(i[15] = n[15]),
this
);
},
multiplyScalar: function (e) {
var t = this.elements;
return (
(t[0] *= e),
(t[4] *= e),
(t[8] *= e),
(t[12] *= e),
(t[1] *= e),
(t[5] *= e),
(t[9] *= e),
(t[13] *= e),
(t[2] *= e),
(t[6] *= e),
(t[10] *= e),
(t[14] *= e),
(t[3] *= e),
(t[7] *= e),
(t[11] *= e),
(t[15] *= e),
this
);
},
applyToVector3Array: (function () {
var e;
return function (t, i, r) {
void 0 === e && (e = new n.Vector3()), void 0 === i && (i = 0), void 0 === r && (r = t.length);
for (var o = 0, a = i; r > o; o += 3, a += 3) e.fromArray(t, a), e.applyMatrix4(this), e.toArray(t, a);
return t;
};
})(),
applyToBuffer: (function () {
var e;
return function (t, i, r) {
void 0 === e && (e = new n.Vector3()), void 0 === i && (i = 0), void 0 === r && (r = t.length / t.itemSize);
for (var o = 0, a = i; r > o; o++, a++)(e.x = t.getX(a)), (e.y = t.getY(a)), (e.z = t.getZ(a)), e.applyMatrix4(this), t.setXYZ(e.x, e.y, e.z);
return t;
};
})(),
determinant: function () {
var e = this.elements,
t = e[0],
i = e[4],
n = e[8],
r = e[12],
o = e[1],
a = e[5],
s = e[9],
l = e[13],
c = e[2],
u = e[6],
h = e[10],
d = e[14],
f = e[3],
p = e[7],
m = e[11],
v = e[15];
return (
f * (+r * s * u - n * l * u - r * a * h + i * l * h + n * a * d - i * s * d) +
p * (+t * s * d - t * l * h + r * o * h - n * o * d + n * l * c - r * s * c) +
m * (+t * l * u - t * a * d - r * o * u + i * o * d + r * a * c - i * l * c) +
v * (-n * a * c - t * s * u + t * a * h + n * o * u - i * o * h + i * s * c)
);
},
transpose: function () {
var e,
t = this.elements;
return (
(e = t[1]),
(t[1] = t[4]),
(t[4] = e),
(e = t[2]),
(t[2] = t[8]),
(t[8] = e),
(e = t[6]),
(t[6] = t[9]),
(t[9] = e),
(e = t[3]),
(t[3] = t[12]),
(t[12] = e),
(e = t[7]),
(t[7] = t[13]),
(t[13] = e),
(e = t[11]),
(t[11] = t[14]),
(t[14] = e),
this
);
},
flattenToArrayOffset: function (e, t) {
return console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead."), this.toArray(e, t);
},
getPosition: (function () {
var e;
return function () {
return void 0 === e && (e = new n.Vector3()), console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."), e.setFromMatrixColumn(this, 3);
};
})(),
setPosition: function (e) {
var t = this.elements;
return (t[12] = e.x), (t[13] = e.y), (t[14] = e.z), this;
},
getInverse: function (e, t) {
var i = this.elements,
n = e.elements,
r = n[0],
o = n[1],
a = n[2],
s = n[3],
l = n[4],
c = n[5],
u = n[6],
h = n[7],
d = n[8],
f = n[9],
p = n[10],
m = n[11],
v = n[12],
g = n[13],
y = n[14],
_ = n[15],
b = f * y * h - g * p * h + g * u * m - c * y * m - f * u * _ + c * p * _,
x = v * p * h - d * y * h - v * u * m + l * y * m + d * u * _ - l * p * _,
w = d * g * h - v * f * h + v * c * m - l * g * m - d * c * _ + l * f * _,
M = v * f * u - d * g * u - v * c * p + l * g * p + d * c * y - l * f * y,
T = r * b + o * x + a * w + s * M;
if (0 === T) {
var S = "THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0";
if (t) throw new Error(S);
return console.warn(S), this.identity();
}
var E = 1 / T;
return (
(i[0] = b * E),
(i[1] = (g * p * s - f * y * s - g * a * m + o * y * m + f * a * _ - o * p * _) * E),
(i[2] = (c * y * s - g * u * s + g * a * h - o * y * h - c * a * _ + o * u * _) * E),
(i[3] = (f * u * s - c * p * s - f * a * h + o * p * h + c * a * m - o * u * m) * E),
(i[4] = x * E),
(i[5] = (d * y * s - v * p * s + v * a * m - r * y * m - d * a * _ + r * p * _) * E),
(i[6] = (v * u * s - l * y * s - v * a * h + r * y * h + l * a * _ - r * u * _) * E),
(i[7] = (l * p * s - d * u * s + d * a * h - r * p * h - l * a * m + r * u * m) * E),
(i[8] = w * E),
(i[9] = (v * f * s - d * g * s - v * o * m + r * g * m + d * o * _ - r * f * _) * E),
(i[10] = (l * g * s - v * c * s + v * o * h - r * g * h - l * o * _ + r * c * _) * E),
(i[11] = (d * c * s - l * f * s - d * o * h + r * f * h + l * o * m - r * c * m) * E),
(i[12] = M * E),
(i[13] = (d * g * a - v * f * a + v * o * p - r * g * p - d * o * y + r * f * y) * E),
(i[14] = (v * c * a - l * g * a - v * o * u + r * g * u + l * o * y - r * c * y) * E),
(i[15] = (l * f * a - d * c * a + d * o * u - r * f * u - l * o * p + r * c * p) * E),
this
);
},
scale: function (e) {
var t = this.elements,
i = e.x,
n = e.y,
r = e.z;
return (t[0] *= i), (t[4] *= n), (t[8] *= r), (t[1] *= i), (t[5] *= n), (t[9] *= r), (t[2] *= i), (t[6] *= n), (t[10] *= r), (t[3] *= i), (t[7] *= n), (t[11] *= r), this;
},
getMaxScaleOnAxis: function () {
var e = this.elements,
t = e[0] * e[0] + e[1] * e[1] + e[2] * e[2],
i = e[4] * e[4] + e[5] * e[5] + e[6] * e[6],
n = e[8] * e[8] + e[9] * e[9] + e[10] * e[10];
return Math.sqrt(Math.max(t, i, n));
},
makeTranslation: function (e, t, i) {
return this.set(1, 0, 0, e, 0, 1, 0, t, 0, 0, 1, i, 0, 0, 0, 1), this;
},
makeRotationX: function (e) {
var t = Math.cos(e),
i = Math.sin(e);
return this.set(1, 0, 0, 0, 0, t, -i, 0, 0, i, t, 0, 0, 0, 0, 1), this;
},
makeRotationY: function (e) {
var t = Math.cos(e),
i = Math.sin(e);
return this.set(t, 0, i, 0, 0, 1, 0, 0, -i, 0, t, 0, 0, 0, 0, 1), this;
},
makeRotationZ: function (e) {
var t = Math.cos(e),
i = Math.sin(e);
return this.set(t, -i, 0, 0, i, t, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this;
},
makeRotationAxis: function (e, t) {
var i = Math.cos(t),
n = Math.sin(t),
r = 1 - i,
o = e.x,
a = e.y,
s = e.z,
l = r * o,
c = r * a;
return this.set(l * o + i, l * a - n * s, l * s + n * a, 0, l * a + n * s, c * a + i, c * s - n * o, 0, l * s - n * a, c * s + n * o, r * s * s + i, 0, 0, 0, 0, 1), this;
},
makeScale: function (e, t, i) {
return this.set(e, 0, 0, 0, 0, t, 0, 0, 0, 0, i, 0, 0, 0, 0, 1), this;
},
compose: function (e, t, i) {
return this.makeRotationFromQuaternion(t), this.scale(i), this.setPosition(e), this;
},
decompose: (function () {
var e, t;
return function (i, r, o) {
void 0 === e && ((e = new n.Vector3()), (t = new n.Matrix4()));
var a = this.elements,
s = e.set(a[0], a[1], a[2]).length(),
l = e.set(a[4], a[5], a[6]).length(),
c = e.set(a[8], a[9], a[10]).length(),
u = this.determinant();
0 > u && (s = -s), (i.x = a[12]), (i.y = a[13]), (i.z = a[14]), t.elements.set(this.elements);
var h = 1 / s,
d = 1 / l,
f = 1 / c;
return (
(t.elements[0] *= h),
(t.elements[1] *= h),
(t.elements[2] *= h),
(t.elements[4] *= d),
(t.elements[5] *= d),
(t.elements[6] *= d),
(t.elements[8] *= f),
(t.elements[9] *= f),
(t.elements[10] *= f),
r.setFromRotationMatrix(t),
(o.x = s),
(o.y = l),
(o.z = c),
this
);
};
})(),
makeFrustum: function (e, t, i, n, r, o) {
var a = this.elements,
s = (2 * r) / (t - e),
l = (2 * r) / (n - i),
c = (t + e) / (t - e),
u = (n + i) / (n - i),
h = -(o + r) / (o - r),
d = (-2 * o * r) / (o - r);
return (a[0] = s), (a[4] = 0), (a[8] = c), (a[12] = 0), (a[1] = 0), (a[5] = l), (a[9] = u), (a[13] = 0), (a[2] = 0), (a[6] = 0), (a[10] = h), (a[14] = d), (a[3] = 0), (a[7] = 0), (a[11] = -1), (a[15] = 0), this;
},
makePerspective: function (e, t, i, r) {
var o = i * Math.tan(n.Math.DEG2RAD * e * 0.5),
a = -o,
s = a * t,
l = o * t;
return this.makeFrustum(s, l, a, o, i, r);
},
makeOrthographic: function (e, t, i, n, r, o) {
var a = this.elements,
s = 1 / (t - e),
l = 1 / (i - n),
c = 1 / (o - r),
u = (t + e) * s,
h = (i + n) * l,
d = (o + r) * c;
return (
(a[0] = 2 * s),
(a[4] = 0),
(a[8] = 0),
(a[12] = -u),
(a[1] = 0),
(a[5] = 2 * l),
(a[9] = 0),
(a[13] = -h),
(a[2] = 0),
(a[6] = 0),
(a[10] = -2 * c),
(a[14] = -d),
(a[3] = 0),
(a[7] = 0),
(a[11] = 0),
(a[15] = 1),
this
);
},
equals: function (e) {
for (var t = this.elements, i = e.elements, n = 0; 16 > n; n++)
if (t[n] !== i[n]) return !1;
return !0;
},
fromArray: function (e) {
return this.elements.set(e), this;
},
toArray: function (e, t) {
void 0 === e && (e = []), void 0 === t && (t = 0);
var i = this.elements;
return (
(e[t] = i[0]),
(e[t + 1] = i[1]),
(e[t + 2] = i[2]),
(e[t + 3] = i[3]),
(e[t + 4] = i[4]),
(e[t + 5] = i[5]),
(e[t + 6] = i[6]),
(e[t + 7] = i[7]),
(e[t + 8] = i[8]),
(e[t + 9] = i[9]),
(e[t + 10] = i[10]),
(e[t + 11] = i[11]),
(e[t + 12] = i[12]),
(e[t + 13] = i[13]),
(e[t + 14] = i[14]),
(e[t + 15] = i[15]),
e
);
},
}),
(n.Ray = function (e, t) {
(this.origin = void 0 !== e ? e : new n.Vector3()), (this.direction = void 0 !== t ? t : new n.Vector3());
}),
(n.Ray.prototype = {
constructor: n.Ray,
set: function (e, t) {
return this.origin.copy(e), this.direction.copy(t), this;
},
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
return this.origin.copy(e.origin), this.direction.copy(e.direction), this;
},
at: function (e, t) {
var i = t || new n.Vector3();
return i.copy(this.direction).multiplyScalar(e).add(this.origin);
},
lookAt: function (e) {
return this.direction.copy(e).sub(this.origin).normalize(), this;
},
recast: (function () {
var e = new n.Vector3();
return function (t) {
return this.origin.copy(this.at(t, e)), this;
};
})(),
closestPointToPoint: function (e, t) {
var i = t || new n.Vector3();
i.subVectors(e, this.origin);
var r = i.dot(this.direction);
return 0 > r ? i.copy(this.origin) : i.copy(this.direction).multiplyScalar(r).add(this.origin);
},
distanceToPoint: function (e) {
return Math.sqrt(this.distanceSqToPoint(e));
},
distanceSqToPoint: (function () {
var e = new n.Vector3();
return function (t) {
var i = e.subVectors(t, this.origin).dot(this.direction);
return 0 > i ? this.origin.distanceToSquared(t) : (e.copy(this.direction).multiplyScalar(i).add(this.origin), e.distanceToSquared(t));
};
})(),
distanceSqToSegment: (function () {
var e = new n.Vector3(),
t = new n.Vector3(),
i = new n.Vector3();
return function (n, r, o, a) {
e.copy(n).add(r).multiplyScalar(0.5), t.copy(r).sub(n).normalize(), i.copy(this.origin).sub(e);
var s,
l,
c,
u,
h = 0.5 * n.distanceTo(r),
d = -this.direction.dot(t),
f = i.dot(this.direction),
p = -i.dot(t),
m = i.lengthSq(),
v = Math.abs(1 - d * d);
if (v > 0)
if (((s = d * p - f), (l = d * f - p), (u = h * v), s >= 0))
if (l >= -u)
if (u >= l) {
var g = 1 / v;
(s *= g), (l *= g), (c = s * (s + d * l + 2 * f) + l * (d * s + l + 2 * p) + m);
} else(l = h), (s = Math.max(0, -(d * l + f))), (c = -s * s + l * (l + 2 * p) + m);
else(l = -h), (s = Math.max(0, -(d * l + f))), (c = -s * s + l * (l + 2 * p) + m);
else
-u >= l ?
((s = Math.max(0, -(-d * h + f))), (l = s > 0 ? -h : Math.min(Math.max(-h, -p), h)), (c = -s * s + l * (l + 2 * p) + m)) :
u >= l ?
((s = 0), (l = Math.min(Math.max(-h, -p), h)), (c = l * (l + 2 * p) + m)) :
((s = Math.max(0, -(d * h + f))), (l = s > 0 ? h : Math.min(Math.max(-h, -p), h)), (c = -s * s + l * (l + 2 * p) + m));
else(l = d > 0 ? -h : h), (s = Math.max(0, -(d * l + f))), (c = -s * s + l * (l + 2 * p) + m);
return o && o.copy(this.direction).multiplyScalar(s).add(this.origin), a && a.copy(t).multiplyScalar(l).add(e), c;
};
})(),
intersectSphere: (function () {
var e = new n.Vector3();
return function (t, i) {
e.subVectors(t.center, this.origin);
var n = e.dot(this.direction),
r = e.dot(e) - n * n,
o = t.radius * t.radius;
if (r > o) return null;
var a = Math.sqrt(o - r),
s = n - a,
l = n + a;
return 0 > s && 0 > l ? null : 0 > s ? this.at(l, i) : this.at(s, i);
};
})(),
intersectsSphere: function (e) {
return this.distanceToPoint(e.center) <= e.radius;
},
distanceToPlane: function (e) {
var t = e.normal.dot(this.direction);
if (0 === t) return 0 === e.distanceToPoint(this.origin) ? 0 : null;
var i = -(this.origin.dot(e.normal) + e.constant) / t;
return i >= 0 ? i : null;
},
intersectPlane: function (e, t) {
var i = this.distanceToPlane(e);
return null === i ? null : this.at(i, t);
},
intersectsPlane: function (e) {
var t = e.distanceToPoint(this.origin);
if (0 === t) return !0;
var i = e.normal.dot(this.direction);
return 0 > i * t ? !0 : !1;
},
intersectBox: function (e, t) {
var i,
n,
r,
o,
a,
s,
l = 1 / this.direction.x,
c = 1 / this.direction.y,
u = 1 / this.direction.z,
h = this.origin;
return (
l >= 0 ? ((i = (e.min.x - h.x) * l), (n = (e.max.x - h.x) * l)) : ((i = (e.max.x - h.x) * l), (n = (e.min.x - h.x) * l)),
c >= 0 ? ((r = (e.min.y - h.y) * c), (o = (e.max.y - h.y) * c)) : ((r = (e.max.y - h.y) * c), (o = (e.min.y - h.y) * c)),
i > o || r > n ?
null :
((r > i || i !== i) && (i = r),
(n > o || n !== n) && (n = o),
u >= 0 ? ((a = (e.min.z - h.z) * u), (s = (e.max.z - h.z) * u)) : ((a = (e.max.z - h.z) * u), (s = (e.min.z - h.z) * u)),
i > s || a > n ? null : ((a > i || i !== i) && (i = a), (n > s || n !== n) && (n = s), 0 > n ? null : this.at(i >= 0 ? i : n, t)))
);
},
intersectsBox: (function () {
var e = new n.Vector3();
return function (t) {
return null !== this.intersectBox(t, e);
};
})(),
intersectTriangle: (function () {
var e = new n.Vector3(),
t = new n.Vector3(),
i = new n.Vector3(),
r = new n.Vector3();
return function (n, o, a, s, l) {
t.subVectors(o, n), i.subVectors(a, n), r.crossVectors(t, i);
var c,
u = this.direction.dot(r);
if (u > 0) {
if (s) return null;
c = 1;
} else {
if (!(0 > u)) return null;
(c = -1), (u = -u);
}
e.subVectors(this.origin, n);
var h = c * this.direction.dot(i.crossVectors(e, i));
if (0 > h) return null;
var d = c * this.direction.dot(t.cross(e));
if (0 > d) return null;
if (h + d > u) return null;
var f = -c * e.dot(r);
return 0 > f ? null : this.at(f / u, l);
};
})(),
applyMatrix4: function (e) {
return this.direction.add(this.origin).applyMatrix4(e), this.origin.applyMatrix4(e), this.direction.sub(this.origin), this.direction.normalize(), this;
},
equals: function (e) {
return e.origin.equals(this.origin) && e.direction.equals(this.direction);
},
}),
(n.Sphere = function (e, t) {
(this.center = void 0 !== e ? e : new n.Vector3()), (this.radius = void 0 !== t ? t : 0);
}),
(n.Sphere.prototype = {
constructor: n.Sphere,
set: function (e, t) {
return this.center.copy(e), (this.radius = t), this;
},
setFromPoints: (function () {
var e = new n.Box3();
return function (t, i) {
var n = this.center;
void 0 !== i ? n.copy(i) : e.setFromPoints(t).center(n);
for (var r = 0, o = 0, a = t.length; a > o; o++) r = Math.max(r, n.distanceToSquared(t[o]));
return (this.radius = Math.sqrt(r)), this;
};
})(),
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
return this.center.copy(e.center), (this.radius = e.radius), this;
},
empty: function () {
return this.radius <= 0;
},
containsPoint: function (e) {
return e.distanceToSquared(this.center) <= this.radius * this.radius;
},
distanceToPoint: function (e) {
return e.distanceTo(this.center) - this.radius;
},
intersectsSphere: function (e) {
var t = this.radius + e.radius;
return e.center.distanceToSquared(this.center) <= t * t;
},
intersectsBox: function (e) {
return e.intersectsSphere(this);
},
intersectsPlane: function (e) {
return Math.abs(this.center.dot(e.normal) - e.constant) <= this.radius;
},
clampPoint: function (e, t) {
var i = this.center.distanceToSquared(e),
r = t || new n.Vector3();
return r.copy(e), i > this.radius * this.radius && (r.sub(this.center).normalize(), r.multiplyScalar(this.radius).add(this.center)), r;
},
getBoundingBox: function (e) {
var t = e || new n.Box3();
return t.set(this.center, this.center), t.expandByScalar(this.radius), t;
},
applyMatrix4: function (e) {
return this.center.applyMatrix4(e), (this.radius = this.radius * e.getMaxScaleOnAxis()), this;
},
translate: function (e) {
return this.center.add(e), this;
},
equals: function (e) {
return e.center.equals(this.center) && e.radius === this.radius;
},
}),
(n.Frustum = function (e, t, i, r, o, a) {
this.planes = [
void 0 !== e ? e : new n.Plane(),
void 0 !== t ? t : new n.Plane(),
void 0 !== i ? i : new n.Plane(),
void 0 !== r ? r : new n.Plane(),
void 0 !== o ? o : new n.Plane(),
void 0 !== a ? a : new n.Plane(),
];
}),
(n.Frustum.prototype = {
constructor: n.Frustum,
set: function (e, t, i, n, r, o) {
var a = this.planes;
return a[0].copy(e), a[1].copy(t), a[2].copy(i), a[3].copy(n), a[4].copy(r), a[5].copy(o), this;
},
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
for (var t = this.planes, i = 0; 6 > i; i++) t[i].copy(e.planes[i]);
return this;
},
setFromMatrix: function (e) {
var t = this.planes,
i = e.elements,
n = i[0],
r = i[1],
o = i[2],
a = i[3],
s = i[4],
l = i[5],
c = i[6],
u = i[7],
h = i[8],
d = i[9],
f = i[10],
p = i[11],
m = i[12],
v = i[13],
g = i[14],
y = i[15];
return (
t[0].setComponents(a - n, u - s, p - h, y - m).normalize(),
t[1].setComponents(a + n, u + s, p + h, y + m).normalize(),
t[2].setComponents(a + r, u + l, p + d, y + v).normalize(),
t[3].setComponents(a - r, u - l, p - d, y - v).normalize(),
t[4].setComponents(a - o, u - c, p - f, y - g).normalize(),
t[5].setComponents(a + o, u + c, p + f, y + g).normalize(),
this
);
},
intersectsObject: (function () {
var e = new n.Sphere();
return function (t) {
var i = t.geometry;
return null === i.boundingSphere && i.computeBoundingSphere(), e.copy(i.boundingSphere).applyMatrix4(t.matrixWorld), this.intersectsSphere(e);
};
})(),
intersectsSprite: (function () {
var e = new n.Sphere();
return function (t) {
return e.center.set(0, 0, 0), (e.radius = 0.7071067811865476), e.applyMatrix4(t.matrixWorld), this.intersectsSphere(e);
};
})(),
intersectsSphere: function (e) {
for (var t = this.planes, i = e.center, n = -e.radius, r = 0; 6 > r; r++) {
var o = t[r].distanceToPoint(i);
if (n > o) return !1;
}
return !0;
},
intersectsBox: (function () {
var e = new n.Vector3(),
t = new n.Vector3();
return function (i) {
for (var n = this.planes, r = 0; 6 > r; r++) {
var o = n[r];
(e.x = o.normal.x > 0 ? i.min.x : i.max.x),
(t.x = o.normal.x > 0 ? i.max.x : i.min.x),
(e.y = o.normal.y > 0 ? i.min.y : i.max.y),
(t.y = o.normal.y > 0 ? i.max.y : i.min.y),
(e.z = o.normal.z > 0 ? i.min.z : i.max.z),
(t.z = o.normal.z > 0 ? i.max.z : i.min.z);
var a = o.distanceToPoint(e),
s = o.distanceToPoint(t);
if (0 > a && 0 > s) return !1;
}
return !0;
};
})(),
containsPoint: function (e) {
for (var t = this.planes, i = 0; 6 > i; i++)
if (t[i].distanceToPoint(e) < 0) return !1;
return !0;
},
}),
(n.Plane = function (e, t) {
(this.normal = void 0 !== e ? e : new n.Vector3(1, 0, 0)), (this.constant = void 0 !== t ? t : 0);
}),
(n.Plane.prototype = {
constructor: n.Plane,
set: function (e, t) {
return this.normal.copy(e), (this.constant = t), this;
},
setComponents: function (e, t, i, n) {
return this.normal.set(e, t, i), (this.constant = n), this;
},
setFromNormalAndCoplanarPoint: function (e, t) {
return this.normal.copy(e), (this.constant = -t.dot(this.normal)), this;
},
setFromCoplanarPoints: (function () {
var e = new n.Vector3(),
t = new n.Vector3();
return function (i, n, r) {
var o = e.subVectors(r, n).cross(t.subVectors(i, n)).normalize();
return this.setFromNormalAndCoplanarPoint(o, i), this;
};
})(),
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
return this.normal.copy(e.normal), (this.constant = e.constant), this;
},
normalize: function () {
var e = 1 / this.normal.length();
return this.normal.multiplyScalar(e), (this.constant *= e), this;
},
negate: function () {
return (this.constant *= -1), this.normal.negate(), this;
},
distanceToPoint: function (e) {
return this.normal.dot(e) + this.constant;
},
distanceToSphere: function (e) {
return this.distanceToPoint(e.center) - e.radius;
},
projectPoint: function (e, t) {
return this.orthoPoint(e, t).sub(e).negate();
},
orthoPoint: function (e, t) {
var i = this.distanceToPoint(e),
r = t || new n.Vector3();
return r.copy(this.normal).multiplyScalar(i);
},
intersectLine: (function () {
var e = new n.Vector3();
return function (t, i) {
var r = i || new n.Vector3(),
o = t.delta(e),
a = this.normal.dot(o);
if (0 === a) return 0 === this.distanceToPoint(t.start) ? r.copy(t.start) : void 0;
var s = -(t.start.dot(this.normal) + this.constant) / a;
return 0 > s || s > 1 ? void 0 : r.copy(o).multiplyScalar(s).add(t.start);
};
})(),
intersectsLine: function (e) {
var t = this.distanceToPoint(e.start),
i = this.distanceToPoint(e.end);
return (0 > t && i > 0) || (0 > i && t > 0);
},
intersectsBox: function (e) {
return e.intersectsPlane(this);
},
intersectsSphere: function (e) {
return e.intersectsPlane(this);
},
coplanarPoint: function (e) {
var t = e || new n.Vector3();
return t.copy(this.normal).multiplyScalar(-this.constant);
},
applyMatrix4: (function () {
var e = new n.Vector3(),
t = new n.Matrix3();
return function (i, n) {
var r = this.coplanarPoint(e).applyMatrix4(i),
o = n || t.getNormalMatrix(i),
a = this.normal.applyMatrix3(o).normalize();
return (this.constant = -r.dot(a)), this;
};
})(),
translate: function (e) {
return (this.constant = this.constant - e.dot(this.normal)), this;
},
equals: function (e) {
return e.normal.equals(this.normal) && e.constant === this.constant;
},
}),
(n.Spherical = function (e, t, i) {
return (this.radius = void 0 !== e ? e : 1), (this.phi = void 0 !== t ? t : 0), (this.theta = void 0 !== i ? i : 0), this;
}),
(n.Spherical.prototype = {
constructor: n.Spherical,
set: function (e, t, i) {
return (this.radius = e), (this.phi = t), (this.theta = i), this;
},
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
return this.radius.copy(e.radius), this.phi.copy(e.phi), this.theta.copy(e.theta), this;
},
makeSafe: function () {
var e = 1e-6;
return (this.phi = Math.max(e, Math.min(Math.PI - e, this.phi))), this;
},
setFromVector3: function (e) {
return (this.radius = e.length()), 0 === this.radius ? ((this.theta = 0), (this.phi = 0)) : ((this.theta = Math.atan2(e.x, e.z)), (this.phi = Math.acos(n.Math.clamp(e.y / this.radius, -1, 1)))), this;
},
}),
(n.Math = {
DEG2RAD: Math.PI / 180,
RAD2DEG: 180 / Math.PI,
generateUUID: (function () {
var e,
t = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),
i = new Array(36),
n = 0;
return function () {
for (var r = 0; 36 > r; r++)
8 === r || 13 === r || 18 === r || 23 === r ?
(i[r] = "-") :
14 === r ?
(i[r] = "4") :
(2 >= n && (n = (33554432 + 16777216 * Math.random()) | 0), (e = 15 & n), (n >>= 4), (i[r] = t[19 === r ? (3 & e) | 8 : e]));
return i.join("");
};
})(),
clamp: function (e, t, i) {
return Math.max(t, Math.min(i, e));
},
euclideanModulo: function (e, t) {
return ((e % t) + t) % t;
},
mapLinear: function (e, t, i, n, r) {
return n + ((e - t) * (r - n)) / (i - t);
},
smoothstep: function (e, t, i) {
return t >= e ? 0 : e >= i ? 1 : ((e = (e - t) / (i - t)), e * e * (3 - 2 * e));
},
smootherstep: function (e, t, i) {
return t >= e ? 0 : e >= i ? 1 : ((e = (e - t) / (i - t)), e * e * e * (e * (6 * e - 15) + 10));
},
random16: function () {
return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."), Math.random();
},
randInt: function (e, t) {
return e + Math.floor(Math.random() * (t - e + 1));
},
randFloat: function (e, t) {
return e + Math.random() * (t - e);
},
randFloatSpread: function (e) {
return e * (0.5 - Math.random());
},
degToRad: function (e) {
return e * n.Math.DEG2RAD;
},
radToDeg: function (e) {
return e * n.Math.RAD2DEG;
},
isPowerOfTwo: function (e) {
return 0 === (e & (e - 1)) && 0 !== e;
},
nearestPowerOfTwo: function (e) {
return Math.pow(2, Math.round(Math.log(e) / Math.LN2));
},
nextPowerOfTwo: function (e) {
return e--, (e |= e >> 1), (e |= e >> 2), (e |= e >> 4), (e |= e >> 8), (e |= e >> 16), e++, e;
},
}),
(n.Spline = function (e) {
function t(e, t, i, n, r, o, a) {
var s = 0.5 * (i - e),
l = 0.5 * (n - t);
return (2 * (t - i) + s + l) * a + (-3 * (t - i) - 2 * s - l) * o + s * r + t;
}
this.points = e;
var i,
r,
o,
a,
s,
l,
c,
u,
h,
d = [],
f = {
x: 0,
y: 0,
z: 0
};
(this.initFromArray = function (e) {
this.points = [];
for (var t = 0; t < e.length; t++) this.points[t] = {
x: e[t][0],
y: e[t][1],
z: e[t][2]
};
}),
(this.getPoint = function (e) {
return (
(i = (this.points.length - 1) * e),
(r = Math.floor(i)),
(o = i - r),
(d[0] = 0 === r ? r : r - 1),
(d[1] = r),
(d[2] = r > this.points.length - 2 ? this.points.length - 1 : r + 1),
(d[3] = r > this.points.length - 3 ? this.points.length - 1 : r + 2),
(l = this.points[d[0]]),
(c = this.points[d[1]]),
(u = this.points[d[2]]),
(h = this.points[d[3]]),
(a = o * o),
(s = o * a),
(f.x = t(l.x, c.x, u.x, h.x, o, a, s)),
(f.y = t(l.y, c.y, u.y, h.y, o, a, s)),
(f.z = t(l.z, c.z, u.z, h.z, o, a, s)),
f
);
}),
(this.getControlPointsArray = function () {
var e,
t,
i = this.points.length,
n = [];
for (e = 0; i > e; e++)(t = this.points[e]), (n[e] = [t.x, t.y, t.z]);
return n;
}),
(this.getLength = function (e) {
var t,
i,
r,
o,
a = 0,
s = 0,
l = 0,
c = new n.Vector3(),
u = new n.Vector3(),
h = [],
d = 0;
for (h[0] = 0, e || (e = 100), r = this.points.length * e, c.copy(this.points[0]), t = 1; r > t; t++)
(i = t / r), (o = this.getPoint(i)), u.copy(o), (d += u.distanceTo(c)), c.copy(o), (a = (this.points.length - 1) * i), (s = Math.floor(a)), s !== l && ((h[s] = d), (l = s));
return (h[h.length] = d), {
chunks: h,
total: d
};
}),
(this.reparametrizeByArcLength = function (e) {
var t,
i,
r,
o,
a,
s,
l,
c,
u = [],
h = new n.Vector3(),
d = this.getLength();
for (u.push(h.copy(this.points[0]).clone()), t = 1; t < this.points.length; t++) {
for (s = d.chunks[t] - d.chunks[t - 1], l = Math.ceil((e * s) / d.total), o = (t - 1) / (this.points.length - 1), a = t / (this.points.length - 1), i = 1; l - 1 > i; i++)
(r = o + i * (1 / l) * (a - o)), (c = this.getPoint(r)), u.push(h.copy(c).clone());
u.push(h.copy(this.points[t]).clone());
}
this.points = u;
});
}),
(n.Triangle = function (e, t, i) {
(this.a = void 0 !== e ? e : new n.Vector3()), (this.b = void 0 !== t ? t : new n.Vector3()), (this.c = void 0 !== i ? i : new n.Vector3());
}),
(n.Triangle.normal = (function () {
var e = new n.Vector3();
return function (t, i, r, o) {
var a = o || new n.Vector3();
a.subVectors(r, i), e.subVectors(t, i), a.cross(e);
var s = a.lengthSq();
return s > 0 ? a.multiplyScalar(1 / Math.sqrt(s)) : a.set(0, 0, 0);
};
})()),
(n.Triangle.barycoordFromPoint = (function () {
var e = new n.Vector3(),
t = new n.Vector3(),
i = new n.Vector3();
return function (r, o, a, s, l) {
e.subVectors(s, o), t.subVectors(a, o), i.subVectors(r, o);
var c = e.dot(e),
u = e.dot(t),
h = e.dot(i),
d = t.dot(t),
f = t.dot(i),
p = c * d - u * u,
m = l || new n.Vector3();
if (0 === p) return m.set(-2, -1, -1);
var v = 1 / p,
g = (d * h - u * f) * v,
y = (c * f - u * h) * v;
return m.set(1 - g - y, y, g);
};
})()),
(n.Triangle.containsPoint = (function () {
var e = new n.Vector3();
return function (t, i, r, o) {
var a = n.Triangle.barycoordFromPoint(t, i, r, o, e);
return a.x >= 0 && a.y >= 0 && a.x + a.y <= 1;
};
})()),
(n.Triangle.prototype = {
constructor: n.Triangle,
set: function (e, t, i) {
return this.a.copy(e), this.b.copy(t), this.c.copy(i), this;
},
setFromPointsAndIndices: function (e, t, i, n) {
return this.a.copy(e[t]), this.b.copy(e[i]), this.c.copy(e[n]), this;
},
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
return this.a.copy(e.a), this.b.copy(e.b), this.c.copy(e.c), this;
},
area: (function () {
var e = new n.Vector3(),
t = new n.Vector3();
return function () {
return e.subVectors(this.c, this.b), t.subVectors(this.a, this.b), 0.5 * e.cross(t).length();
};
})(),
midpoint: function (e) {
var t = e || new n.Vector3();
return t
.addVectors(this.a, this.b)
.add(this.c)
.multiplyScalar(1 / 3);
},
normal: function (e) {
return n.Triangle.normal(this.a, this.b, this.c, e);
},
plane: function (e) {
var t = e || new n.Plane();
return t.setFromCoplanarPoints(this.a, this.b, this.c);
},
barycoordFromPoint: function (e, t) {
return n.Triangle.barycoordFromPoint(e, this.a, this.b, this.c, t);
},
containsPoint: function (e) {
return n.Triangle.containsPoint(e, this.a, this.b, this.c);
},
closestPointToPoint: (function () {
var e, t, i, r;
return function (o, a) {
void 0 === e && ((e = new n.Plane()), (t = [new n.Line3(), new n.Line3(), new n.Line3()]), (i = new n.Vector3()), (r = new n.Vector3()));
var s = a || new n.Vector3(),
l = 1 / 0;
if ((e.setFromCoplanarPoints(this.a, this.b, this.c), e.projectPoint(o, i), this.containsPoint(i) === !0)) s.copy(i);
else {
t[0].set(this.a, this.b), t[1].set(this.b, this.c), t[2].set(this.c, this.a);
for (var c = 0; c < t.length; c++) {
t[c].closestPointToPoint(i, !0, r);
var u = i.distanceToSquared(r);
l > u && ((l = u), s.copy(r));
}
}
return s;
};
})(),
equals: function (e) {
return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c);
},
}),
(n.Interpolant = function (e, t, i, n) {
(this.parameterPositions = e), (this._cachedIndex = 0), (this.resultBuffer = void 0 !== n ? n : new t.constructor(i)), (this.sampleValues = t), (this.valueSize = i);
}),
(n.Interpolant.prototype = {
constructor: n.Interpolant,
evaluate: function (e) {
var t = this.parameterPositions,
i = this._cachedIndex,
n = t[i],
r = t[i - 1];
e: {
t: {
var o;
i: {
n: if (!(n > e)) {
for (var a = i + 2;;) {
if (void 0 === n) {
if (r > e) break n;
return (i = t.length), (this._cachedIndex = i), this.afterEnd_(i - 1, e, r);
}
if (i === a) break;
if (((r = n), (n = t[++i]), n > e)) break t;
}
o = t.length;
break i;
} {
if (e >= r) break e;
var s = t[1];
s > e && ((i = 2), (r = s));
for (var a = i - 2;;) {
if (void 0 === r) return (this._cachedIndex = 0), this.beforeStart_(0, e, n);
if (i === a) break;
if (((n = r), (r = t[--i - 1]), e >= r)) break t;
}
(o = i), (i = 0);
}
}
for (; o > i;) {
var l = (i + o) >>> 1;
e < t[l] ? (o = l) : (i = l + 1);
}
if (((n = t[i]), (r = t[i - 1]), void 0 === r)) return (this._cachedIndex = 0),
this.beforeStart_(0, e, n);
if (void 0 === n) return (i = t.length),
(this._cachedIndex = i),
this.afterEnd_(i - 1, r, e);
}
(this._cachedIndex = i),
this.intervalChanged_(i, r, n);
}
return this.interpolate_(i, r, e, n);
},
settings: null,
DefaultSettings_: {},
getSettings_: function () {
return this.settings || this.DefaultSettings_;
},
copySampleValue_: function (e) {
for (var t = this.resultBuffer, i = this.sampleValues, n = this.valueSize, r = e * n, o = 0; o !== n; ++o) t[o] = i[r + o];
return t;
},
interpolate_: function (e, t, i, n) {
throw new Error("call to abstract method");
},
intervalChanged_: function (e, t, i) {},
}),
Object.assign(n.Interpolant.prototype, {
beforeStart_: n.Interpolant.prototype.copySampleValue_,
afterEnd_: n.Interpolant.prototype.copySampleValue_
}),
(n.CubicInterpolant = function (e, t, i, r) {
n.Interpolant.call(this, e, t, i, r), (this._weightPrev = -0), (this._offsetPrev = -0), (this._weightNext = -0), (this._offsetNext = -0);
}),
(n.CubicInterpolant.prototype = Object.assign(Object.create(n.Interpolant.prototype), {
constructor: n.CubicInterpolant,
DefaultSettings_: {
endingStart: n.ZeroCurvatureEnding,
endingEnd: n.ZeroCurvatureEnding
},
intervalChanged_: function (e, t, i) {
var r = this.parameterPositions,
o = e - 2,
a = e + 1,
s = r[o],
l = r[a];
if (void 0 === s)
switch (this.getSettings_().endingStart) {
case n.ZeroSlopeEnding:
(o = e), (s = 2 * t - i);
break;
case n.WrapAroundEnding:
(o = r.length - 2), (s = t + r[o] - r[o + 1]);
break;
default:
(o = e), (s = i);
}
if (void 0 === l)
switch (this.getSettings_().endingEnd) {
case n.ZeroSlopeEnding:
(a = e), (l = 2 * i - t);
break;
case n.WrapAroundEnding:
(a = 1), (l = i + r[1] - r[0]);
break;
default:
(a = e - 1), (l = t);
}
var c = 0.5 * (i - t),
u = this.valueSize;
(this._weightPrev = c / (t - s)), (this._weightNext = c / (l - i)), (this._offsetPrev = o * u), (this._offsetNext = a * u);
},
interpolate_: function (e, t, i, n) {
for (
var r = this.resultBuffer,
o = this.sampleValues,
a = this.valueSize,
s = e * a,
l = s - a,
c = this._offsetPrev,
u = this._offsetNext,
h = this._weightPrev,
d = this._weightNext,
f = (i - t) / (n - t),
p = f * f,
m = p * f,
v = -h * m + 2 * h * p - h * f,
g = (1 + h) * m + (-1.5 - 2 * h) * p + (-0.5 + h) * f + 1,
y = (-1 - d) * m + (1.5 + d) * p + 0.5 * f,
_ = d * m - d * p,
b = 0; b !== a;
++b
)
r[b] = v * o[c + b] + g * o[l + b] + y * o[s + b] + _ * o[u + b];
return r;
},
})),
(n.DiscreteInterpolant = function (e, t, i, r) {
n.Interpolant.call(this, e, t, i, r);
}),
(n.DiscreteInterpolant.prototype = Object.assign(Object.create(n.Interpolant.prototype), {
constructor: n.DiscreteInterpolant,
interpolate_: function (e, t, i, n) {
return this.copySampleValue_(e - 1);
},
})),
(n.LinearInterpolant = function (e, t, i, r) {
n.Interpolant.call(this, e, t, i, r);
}),
(n.LinearInterpolant.prototype = Object.assign(Object.create(n.Interpolant.prototype), {
constructor: n.LinearInterpolant,
interpolate_: function (e, t, i, n) {
for (var r = this.resultBuffer, o = this.sampleValues, a = this.valueSize, s = e * a, l = s - a, c = (i - t) / (n - t), u = 1 - c, h = 0; h !== a; ++h) r[h] = o[l + h] * u + o[s + h] * c;
return r;
},
})),
(n.QuaternionLinearInterpolant = function (e, t, i, r) {
n.Interpolant.call(this, e, t, i, r);
}),
(n.QuaternionLinearInterpolant.prototype = Object.assign(Object.create(n.Interpolant.prototype), {
constructor: n.QuaternionLinearInterpolant,
interpolate_: function (e, t, i, r) {
for (var o = this.resultBuffer, a = this.sampleValues, s = this.valueSize, l = e * s, c = (i - t) / (r - t), u = l + s; l !== u; l += 4) n.Quaternion.slerpFlat(o, 0, a, l - s, a, l, c);
return o;
},
})),
(n.Clock = function (e) {
(this.autoStart = void 0 !== e ? e : !0), (this.startTime = 0), (this.oldTime = 0), (this.elapsedTime = 0), (this.running = !1);
}),
(n.Clock.prototype = {
constructor: n.Clock,
start: function () {
(this.startTime = (performance || Date).now()), (this.oldTime = this.startTime), (this.running = !0);
},
stop: function () {
this.getElapsedTime(), (this.running = !1);
},
getElapsedTime: function () {
return this.getDelta(), this.elapsedTime;
},
getDelta: function () {
var e = 0;
if ((this.autoStart && !this.running && this.start(), this.running)) {
var t = (performance || Date).now();
(e = (t - this.oldTime) / 1e3), (this.oldTime = t), (this.elapsedTime += e);
}
return e;
},
}),
(n.EventDispatcher = function () {}),
Object.assign(n.EventDispatcher.prototype, {
addEventListener: function (e, t) {
void 0 === this._listeners && (this._listeners = {});
var i = this._listeners;
void 0 === i[e] && (i[e] = []), -1 === i[e].indexOf(t) && i[e].push(t);
},
hasEventListener: function (e, t) {
if (void 0 === this._listeners) return !1;
var i = this._listeners;
return void 0 !== i[e] && -1 !== i[e].indexOf(t) ? !0 : !1;
},
removeEventListener: function (e, t) {
if (void 0 !== this._listeners) {
var i = this._listeners,
n = i[e];
if (void 0 !== n) {
var r = n.indexOf(t); -
1 !== r && n.splice(r, 1);
}
}
},
dispatchEvent: function (e) {
if (void 0 !== this._listeners) {
var t = this._listeners,
i = t[e.type];
if (void 0 !== i) {
e.target = this;
var n = [],
r = 0,
o = i.length;
for (r = 0; o > r; r++) n[r] = i[r];
for (r = 0; o > r; r++) n[r].call(this, e);
}
}
},
}),
(n.Layers = function () {
this.mask = 1;
}),
(n.Layers.prototype = {
constructor: n.Layers,
set: function (e) {
this.mask = 1 << e;
},
enable: function (e) {
this.mask |= 1 << e;
},
toggle: function (e) {
this.mask ^= 1 << e;
},
disable: function (e) {
this.mask &= ~(1 << e);
},
test: function (e) {
return 0 !== (this.mask & e.mask);
},
}),
(function (e) {
function t(e, t) {
return e.distance - t.distance;
}
function i(e, t, n, r) {
if (e.visible !== !1 && (e.raycast(t, n), r === !0))
for (var o = e.children, a = 0, s = o.length; s > a; a++) i(o[a], t, n, !0);
}
(e.Raycaster = function (t, i, n, r) {
(this.ray = new e.Ray(t, i)),
(this.near = n || 0),
(this.far = r || 1 / 0),
(this.params = {
Mesh: {},
Line: {},
LOD: {},
Points: {
threshold: 1
},
Sprite: {}
}),
Object.defineProperties(this.params, {
PointCloud: {
get: function () {
return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."), this.Points;
},
},
});
}),
(e.Raycaster.prototype = {
constructor: e.Raycaster,
linePrecision: 1,
set: function (e, t) {
this.ray.set(e, t);
},
setFromCamera: function (t, i) {
i instanceof e.PerspectiveCamera ?
(this.ray.origin.setFromMatrixPosition(i.matrixWorld), this.ray.direction.set(t.x, t.y, 0.5).unproject(i).sub(this.ray.origin).normalize()) :
i instanceof e.OrthographicCamera ?
(this.ray.origin.set(t.x, t.y, (i.near + i.far) / (i.near - i.far)).unproject(i), this.ray.direction.set(0, 0, -1).transformDirection(i.matrixWorld)) :
console.error("THREE.Raycaster: Unsupported camera type.");
},
intersectObject: function (e, n) {
var r = [];
return i(e, this, r, n), r.sort(t), r;
},
intersectObjects: function (e, n) {
var r = [];
if (Array.isArray(e) === !1) return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."), r;
for (var o = 0, a = e.length; a > o; o++) i(e[o], this, r, n);
return r.sort(t), r;
},
});
})(n),
(n.Object3D = function () {
function e() {
o.setFromEuler(r, !1);
}
function t() {
r.setFromQuaternion(o, void 0, !1);
}
Object.defineProperty(this, "id", {
value: n.Object3DIdCount++
}),
(this.uuid = n.Math.generateUUID()),
(this.name = ""),
(this.type = "Object3D"),
(this.parent = null),
(this.children = []),
(this.up = n.Object3D.DefaultUp.clone());
var i = new n.Vector3(),
r = new n.Euler(),
o = new n.Quaternion(),
a = new n.Vector3(1, 1, 1);
r.onChange(e),
o.onChange(t),
Object.defineProperties(this, {
position: {
enumerable: !0,
value: i
},
rotation: {
enumerable: !0,
value: r
},
quaternion: {
enumerable: !0,
value: o
},
scale: {
enumerable: !0,
value: a
},
modelViewMatrix: {
value: new n.Matrix4()
},
normalMatrix: {
value: new n.Matrix3()
},
}),
(this.matrix = new n.Matrix4()),
(this.matrixWorld = new n.Matrix4()),
(this.matrixAutoUpdate = n.Object3D.DefaultMatrixAutoUpdate),
(this.matrixWorldNeedsUpdate = !1),
(this.layers = new n.Layers()),
(this.visible = !0),
(this.castShadow = !1),
(this.receiveShadow = !1),
(this.frustumCulled = !0),
(this.renderOrder = 0),
(this.userData = {});
}),
(n.Object3D.DefaultUp = new n.Vector3(0, 1, 0)),
(n.Object3D.DefaultMatrixAutoUpdate = !0),
Object.assign(n.Object3D.prototype, n.EventDispatcher.prototype, {
applyMatrix: function (e) {
this.matrix.multiplyMatrices(e, this.matrix), this.matrix.decompose(this.position, this.quaternion, this.scale);
},
setRotationFromAxisAngle: function (e, t) {
this.quaternion.setFromAxisAngle(e, t);
},
setRotationFromEuler: function (e) {
this.quaternion.setFromEuler(e, !0);
},
setRotationFromMatrix: function (e) {
this.quaternion.setFromRotationMatrix(e);
},
setRotationFromQuaternion: function (e) {
this.quaternion.copy(e);
},
rotateOnAxis: (function () {
var e = new n.Quaternion();
return function (t, i) {
return e.setFromAxisAngle(t, i), this.quaternion.multiply(e), this;
};
})(),
rotateX: (function () {
var e = new n.Vector3(1, 0, 0);
return function (t) {
return this.rotateOnAxis(e, t);
};
})(),
rotateY: (function () {
var e = new n.Vector3(0, 1, 0);
return function (t) {
return this.rotateOnAxis(e, t);
};
})(),
rotateZ: (function () {
var e = new n.Vector3(0, 0, 1);
return function (t) {
return this.rotateOnAxis(e, t);
};
})(),
translateOnAxis: (function () {
var e = new n.Vector3();
return function (t, i) {
return e.copy(t).applyQuaternion(this.quaternion), this.position.add(e.multiplyScalar(i)), this;
};
})(),
translateX: (function () {
var e = new n.Vector3(1, 0, 0);
return function (t) {
return this.translateOnAxis(e, t);
};
})(),
translateY: (function () {
var e = new n.Vector3(0, 1, 0);
return function (t) {
return this.translateOnAxis(e, t);
};
})(),
translateZ: (function () {
var e = new n.Vector3(0, 0, 1);
return function (t) {
return this.translateOnAxis(e, t);
};
})(),
localToWorld: function (e) {
return e.applyMatrix4(this.matrixWorld);
},
worldToLocal: (function () {
var e = new n.Matrix4();
return function (t) {
return t.applyMatrix4(e.getInverse(this.matrixWorld));
};
})(),
lookAt: (function () {
var e = new n.Matrix4();
return function (t) {
e.lookAt(t, this.position, this.up), this.quaternion.setFromRotationMatrix(e);
};
})(),
add: function (e) {
if (arguments.length > 1) {
for (var t = 0; t < arguments.length; t++) this.add(arguments[t]);
return this;
}
return e === this ?
(console.error("THREE.Object3D.add: object can't be added as a child of itself.", e), this) :
(e instanceof n.Object3D ?
(null !== e.parent && e.parent.remove(e), (e.parent = this), e.dispatchEvent({
type: "added"
}), this.children.push(e)) :
console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", e),
this);
},
remove: function (e) {
if (arguments.length > 1)
for (var t = 0; t < arguments.length; t++) this.remove(arguments[t]);
var i = this.children.indexOf(e); -
1 !== i && ((e.parent = null), e.dispatchEvent({
type: "removed"
}), this.children.splice(i, 1));
},
getObjectById: function (e) {
return this.getObjectByProperty("id", e);
},
getObjectByName: function (e) {
return this.getObjectByProperty("name", e);
},
getObjectByProperty: function (e, t) {
if (this[e] === t) return this;
for (var i = 0, n = this.children.length; n > i; i++) {
var r = this.children[i],
o = r.getObjectByProperty(e, t);
if (void 0 !== o) return o;
}
return void 0;
},
getWorldPosition: function (e) {
var t = e || new n.Vector3();
return this.updateMatrixWorld(!0), t.setFromMatrixPosition(this.matrixWorld);
},
getWorldQuaternion: (function () {
var e = new n.Vector3(),
t = new n.Vector3();
return function (i) {
var r = i || new n.Quaternion();
return this.updateMatrixWorld(!0), this.matrixWorld.decompose(e, r, t), r;
};
})(),
getWorldRotation: (function () {
var e = new n.Quaternion();
return function (t) {
var i = t || new n.Euler();
return this.getWorldQuaternion(e), i.setFromQuaternion(e, this.rotation.order, !1);
};
})(),
getWorldScale: (function () {
var e = new n.Vector3(),
t = new n.Quaternion();
return function (i) {
var r = i || new n.Vector3();
return this.updateMatrixWorld(!0), this.matrixWorld.decompose(e, t, r), r;
};
})(),
getWorldDirection: (function () {
var e = new n.Quaternion();
return function (t) {
var i = t || new n.Vector3();
return this.getWorldQuaternion(e), i.set(0, 0, 1).applyQuaternion(e);
};
})(),
raycast: function () {},
traverse: function (e) {
e(this);
for (var t = this.children, i = 0, n = t.length; n > i; i++) t[i].traverse(e);
},
traverseVisible: function (e) {
if (this.visible !== !1) {
e(this);
for (var t = this.children, i = 0, n = t.length; n > i; i++) t[i].traverseVisible(e);
}
},
traverseAncestors: function (e) {
var t = this.parent;
null !== t && (e(t), t.traverseAncestors(e));
},
updateMatrix: function () {
this.matrix.compose(this.position, this.quaternion, this.scale), (this.matrixWorldNeedsUpdate = !0);
},
updateMatrixWorld: function (e) {
this.matrixAutoUpdate === !0 && this.updateMatrix(),
(this.matrixWorldNeedsUpdate === !0 || e === !0) &&
(null === this.parent ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix), (this.matrixWorldNeedsUpdate = !1), (e = !0));
for (var t = 0, i = this.children.length; i > t; t++) this.children[t].updateMatrixWorld(e);
},
toJSON: function (e) {
function t(e) {
var t = [];
for (var i in e) {
var n = e[i];
delete n.metadata, t.push(n);
}
return t;
}
var i = void 0 === e || "" === e,
n = {};
i && ((e = {
geometries: {},
materials: {},
textures: {},
images: {}
}), (n.metadata = {
version: 4.4,
type: "Object",
generator: "Object3D.toJSON"
}));
var r = {};
if (
((r.uuid = this.uuid),
(r.type = this.type),
"" !== this.name && (r.name = this.name),
"{}" !== JSON.stringify(this.userData) && (r.userData = this.userData),
this.castShadow === !0 && (r.castShadow = !0),
this.receiveShadow === !0 && (r.receiveShadow = !0),
this.visible === !1 && (r.visible = !1),
(r.matrix = this.matrix.toArray()),
void 0 !== this.geometry && (void 0 === e.geometries[this.geometry.uuid] && (e.geometries[this.geometry.uuid] = this.geometry.toJSON(e)), (r.geometry = this.geometry.uuid)),
void 0 !== this.material && (void 0 === e.materials[this.material.uuid] && (e.materials[this.material.uuid] = this.material.toJSON(e)), (r.material = this.material.uuid)),
this.children.length > 0)
) {
r.children = [];
for (var o = 0; o < this.children.length; o++) r.children.push(this.children[o].toJSON(e).object);
}
if (i) {
var a = t(e.geometries),
s = t(e.materials),
l = t(e.textures),
c = t(e.images);
a.length > 0 && (n.geometries = a), s.length > 0 && (n.materials = s), l.length > 0 && (n.textures = l), c.length > 0 && (n.images = c);
}
return (n.object = r), n;
},
clone: function (e) {
return new this.constructor().copy(this, e);
},
copy: function (e, t) {
if (
(void 0 === t && (t = !0),
(this.name = e.name),
this.up.copy(e.up),
this.position.copy(e.position),
this.quaternion.copy(e.quaternion),
this.scale.copy(e.scale),
this.matrix.copy(e.matrix),
this.matrixWorld.copy(e.matrixWorld),
(this.matrixAutoUpdate = e.matrixAutoUpdate),
(this.matrixWorldNeedsUpdate = e.matrixWorldNeedsUpdate),
(this.visible = e.visible),
(this.castShadow = e.castShadow),
(this.receiveShadow = e.receiveShadow),
(this.frustumCulled = e.frustumCulled),
(this.renderOrder = e.renderOrder),
(this.userData = JSON.parse(JSON.stringify(e.userData))),
t === !0)
)
for (var i = 0; i < e.children.length; i++) {
var n = e.children[i];
this.add(n.clone());
}
return this;
},
}),
(n.Object3DIdCount = 0),
(n.Face3 = function (e, t, i, r, o, a) {
(this.a = e),
(this.b = t),
(this.c = i),
(this.normal = r instanceof n.Vector3 ? r : new n.Vector3()),
(this.vertexNormals = Array.isArray(r) ? r : []),
(this.color = o instanceof n.Color ? o : new n.Color()),
(this.vertexColors = Array.isArray(o) ? o : []),
(this.materialIndex = void 0 !== a ? a : 0);
}),
(n.Face3.prototype = {
constructor: n.Face3,
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
(this.a = e.a), (this.b = e.b), (this.c = e.c), this.normal.copy(e.normal), this.color.copy(e.color), (this.materialIndex = e.materialIndex);
for (var t = 0, i = e.vertexNormals.length; i > t; t++) this.vertexNormals[t] = e.vertexNormals[t].clone();
for (var t = 0, i = e.vertexColors.length; i > t; t++) this.vertexColors[t] = e.vertexColors[t].clone();
return this;
},
}),
(n.BufferAttribute = function (e, t, i) {
(this.uuid = n.Math.generateUUID()), (this.array = e), (this.itemSize = t), (this.dynamic = !1), (this.updateRange = {
offset: 0,
count: -1
}), (this.version = 0), (this.normalized = i === !0);
}),
(n.BufferAttribute.prototype = {
constructor: n.BufferAttribute,
get count() {
return this.array.length / this.itemSize;
},
set needsUpdate(e) {
e === !0 && this.version++;
},
setDynamic: function (e) {
return (this.dynamic = e), this;
},
copy: function (e) {
return (this.array = new e.array.constructor(e.array)), (this.itemSize = e.itemSize), (this.dynamic = e.dynamic), this;
},
copyAt: function (e, t, i) {
(e *= this.itemSize), (i *= t.itemSize);
for (var n = 0, r = this.itemSize; r > n; n++) this.array[e + n] = t.array[i + n];
return this;
},
copyArray: function (e) {
return this.array.set(e), this;
},
copyColorsArray: function (e) {
for (var t = this.array, i = 0, r = 0, o = e.length; o > r; r++) {
var a = e[r];
void 0 === a && (console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined", r), (a = new n.Color())), (t[i++] = a.r), (t[i++] = a.g), (t[i++] = a.b);
}
return this;
},
copyIndicesArray: function (e) {
for (var t = this.array, i = 0, n = 0, r = e.length; r > n; n++) {
var o = e[n];
(t[i++] = o.a), (t[i++] = o.b), (t[i++] = o.c);
}
return this;
},
copyVector2sArray: function (e) {
for (var t = this.array, i = 0, r = 0, o = e.length; o > r; r++) {
var a = e[r];
void 0 === a && (console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined", r), (a = new n.Vector2())), (t[i++] = a.x), (t[i++] = a.y);
}
return this;
},
copyVector3sArray: function (e) {
for (var t = this.array, i = 0, r = 0, o = e.length; o > r; r++) {
var a = e[r];
void 0 === a && (console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined", r), (a = new n.Vector3())), (t[i++] = a.x), (t[i++] = a.y), (t[i++] = a.z);
}
return this;
},
copyVector4sArray: function (e) {
for (var t = this.array, i = 0, r = 0, o = e.length; o > r; r++) {
var a = e[r];
void 0 === a && (console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined", r), (a = new n.Vector4())), (t[i++] = a.x), (t[i++] = a.y), (t[i++] = a.z), (t[i++] = a.w);
}
return this;
},
set: function (e, t) {
return void 0 === t && (t = 0), this.array.set(e, t), this;
},
getX: function (e) {
return this.array[e * this.itemSize];
},
setX: function (e, t) {
return (this.array[e * this.itemSize] = t), this;
},
getY: function (e) {
return this.array[e * this.itemSize + 1];
},
setY: function (e, t) {
return (this.array[e * this.itemSize + 1] = t), this;
},
getZ: function (e) {
return this.array[e * this.itemSize + 2];
},
setZ: function (e, t) {
return (this.array[e * this.itemSize + 2] = t), this;
},
getW: function (e) {
return this.array[e * this.itemSize + 3];
},
setW: function (e, t) {
return (this.array[e * this.itemSize + 3] = t), this;
},
setXY: function (e, t, i) {
return (e *= this.itemSize), (this.array[e + 0] = t), (this.array[e + 1] = i), this;
},
setXYZ: function (e, t, i, n) {
return (e *= this.itemSize), (this.array[e + 0] = t), (this.array[e + 1] = i), (this.array[e + 2] = n), this;
},
setXYZW: function (e, t, i, n, r) {
return (e *= this.itemSize), (this.array[e + 0] = t), (this.array[e + 1] = i), (this.array[e + 2] = n), (this.array[e + 3] = r), this;
},
clone: function () {
return new this.constructor().copy(this);
},
}),
(n.Int8Attribute = function (e, t) {
return new n.BufferAttribute(new Int8Array(e), t);
}),
(n.Uint8Attribute = function (e, t) {
return new n.BufferAttribute(new Uint8Array(e), t);
}),
(n.Uint8ClampedAttribute = function (e, t) {
return new n.BufferAttribute(new Uint8ClampedArray(e), t);
}),
(n.Int16Attribute = function (e, t) {
return new n.BufferAttribute(new Int16Array(e), t);
}),
(n.Uint16Attribute = function (e, t) {
return new n.BufferAttribute(new Uint16Array(e), t);
}),
(n.Int32Attribute = function (e, t) {
return new n.BufferAttribute(new Int32Array(e), t);
}),
(n.Uint32Attribute = function (e, t) {
return new n.BufferAttribute(new Uint32Array(e), t);
}),
(n.Float32Attribute = function (e, t) {
return new n.BufferAttribute(new Float32Array(e), t);
}),
(n.Float64Attribute = function (e, t) {
return new n.BufferAttribute(new Float64Array(e), t);
}),
(n.DynamicBufferAttribute = function (e, t) {
return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."), new n.BufferAttribute(e, t).setDynamic(!0);
}),
(n.InstancedBufferAttribute = function (e, t, i) {
n.BufferAttribute.call(this, e, t), (this.meshPerAttribute = i || 1);
}),
(n.InstancedBufferAttribute.prototype = Object.create(n.BufferAttribute.prototype)),
(n.InstancedBufferAttribute.prototype.constructor = n.InstancedBufferAttribute),
(n.InstancedBufferAttribute.prototype.copy = function (e) {
return n.BufferAttribute.prototype.copy.call(this, e), (this.meshPerAttribute = e.meshPerAttribute), this;
}),
(n.InterleavedBuffer = function (e, t) {
(this.uuid = n.Math.generateUUID()), (this.array = e), (this.stride = t), (this.dynamic = !1), (this.updateRange = {
offset: 0,
count: -1
}), (this.version = 0);
}),
(n.InterleavedBuffer.prototype = {
constructor: n.InterleavedBuffer,
get length() {
return this.array.length;
},
get count() {
return this.array.length / this.stride;
},
set needsUpdate(e) {
e === !0 && this.version++;
},
setDynamic: function (e) {
return (this.dynamic = e), this;
},
copy: function (e) {
return (this.array = new e.array.constructor(e.array)), (this.stride = e.stride), (this.dynamic = e.dynamic), this;
},
copyAt: function (e, t, i) {
(e *= this.stride), (i *= t.stride);
for (var n = 0, r = this.stride; r > n; n++) this.array[e + n] = t.array[i + n];
return this;
},
set: function (e, t) {
return void 0 === t && (t = 0), this.array.set(e, t), this;
},
clone: function () {
return new this.constructor().copy(this);
},
}),
(n.InstancedInterleavedBuffer = function (e, t, i) {
n.InterleavedBuffer.call(this, e, t), (this.meshPerAttribute = i || 1);
}),
(n.InstancedInterleavedBuffer.prototype = Object.create(n.InterleavedBuffer.prototype)),
(n.InstancedInterleavedBuffer.prototype.constructor = n.InstancedInterleavedBuffer),
(n.InstancedInterleavedBuffer.prototype.copy = function (e) {
return n.InterleavedBuffer.prototype.copy.call(this, e), (this.meshPerAttribute = e.meshPerAttribute), this;
}),
(n.InterleavedBufferAttribute = function (e, t, i, r) {
(this.uuid = n.Math.generateUUID()), (this.data = e), (this.itemSize = t), (this.offset = i), (this.normalized = r === !0);
}),
(n.InterleavedBufferAttribute.prototype = {
constructor: n.InterleavedBufferAttribute,
get length() {
return console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count."), this.array.length;
},
get count() {
return this.data.count;
},
get array() {
return this.data.array;
},
setX: function (e, t) {
return (this.data.array[e * this.data.stride + this.offset] = t), this;
},
setY: function (e, t) {
return (this.data.array[e * this.data.stride + this.offset + 1] = t), this;
},
setZ: function (e, t) {
return (this.data.array[e * this.data.stride + this.offset + 2] = t), this;
},
setW: function (e, t) {
return (this.data.array[e * this.data.stride + this.offset + 3] = t), this;
},
getX: function (e) {
return this.data.array[e * this.data.stride + this.offset];
},
getY: function (e) {
return this.data.array[e * this.data.stride + this.offset + 1];
},
getZ: function (e) {
return this.data.array[e * this.data.stride + this.offset + 2];
},
getW: function (e) {
return this.data.array[e * this.data.stride + this.offset + 3];
},
setXY: function (e, t, i) {
return (e = e * this.data.stride + this.offset), (this.data.array[e + 0] = t), (this.data.array[e + 1] = i), this;
},
setXYZ: function (e, t, i, n) {
return (e = e * this.data.stride + this.offset), (this.data.array[e + 0] = t), (this.data.array[e + 1] = i), (this.data.array[e + 2] = n), this;
},
setXYZW: function (e, t, i, n, r) {
return (e = e * this.data.stride + this.offset), (this.data.array[e + 0] = t), (this.data.array[e + 1] = i), (this.data.array[e + 2] = n), (this.data.array[e + 3] = r), this;
},
}),
(n.Geometry = function () {
Object.defineProperty(this, "id", {
value: n.GeometryIdCount++
}),
(this.uuid = n.Math.generateUUID()),
(this.name = ""),
(this.type = "Geometry"),
(this.vertices = []),
(this.colors = []),
(this.faces = []),
(this.faceVertexUvs = [
[]
]),
(this.morphTargets = []),
(this.morphNormals = []),
(this.skinWeights = []),
(this.skinIndices = []),
(this.lineDistances = []),
(this.boundingBox = null),
(this.boundingSphere = null),
(this.elementsNeedUpdate = !1),
(this.verticesNeedUpdate = !1),
(this.uvsNeedUpdate = !1),
(this.normalsNeedUpdate = !1),
(this.colorsNeedUpdate = !1),
(this.lineDistancesNeedUpdate = !1),
(this.groupsNeedUpdate = !1);
}),
Object.assign(n.Geometry.prototype, n.EventDispatcher.prototype, {
applyMatrix: function (e) {
for (var t = new n.Matrix3().getNormalMatrix(e), i = 0, r = this.vertices.length; r > i; i++) {
var o = this.vertices[i];
o.applyMatrix4(e);
}
for (var i = 0, r = this.faces.length; r > i; i++) {
var a = this.faces[i];
a.normal.applyMatrix3(t).normalize();
for (var s = 0, l = a.vertexNormals.length; l > s; s++) a.vertexNormals[s].applyMatrix3(t).normalize();
}
return null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), (this.verticesNeedUpdate = !0), (this.normalsNeedUpdate = !0), this;
},
rotateX: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Matrix4()), e.makeRotationX(t), this.applyMatrix(e), this;
};
})(),
rotateY: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Matrix4()), e.makeRotationY(t), this.applyMatrix(e), this;
};
})(),
rotateZ: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Matrix4()), e.makeRotationZ(t), this.applyMatrix(e), this;
};
})(),
translate: (function () {
var e;
return function (t, i, r) {
return void 0 === e && (e = new n.Matrix4()), e.makeTranslation(t, i, r), this.applyMatrix(e), this;
};
})(),
scale: (function () {
var e;
return function (t, i, r) {
return void 0 === e && (e = new n.Matrix4()), e.makeScale(t, i, r), this.applyMatrix(e), this;
};
})(),
lookAt: (function () {
var e;
return function (t) {
void 0 === e && (e = new n.Object3D()), e.lookAt(t), e.updateMatrix(), this.applyMatrix(e.matrix);
};
})(),
fromBufferGeometry: function (e) {
function t(e, t, r, o) {
var a = void 0 !== s ? [h[e].clone(), h[t].clone(), h[r].clone()] : [],
p = void 0 !== l ? [i.colors[e].clone(), i.colors[t].clone(), i.colors[r].clone()] : [],
m = new n.Face3(e, t, r, a, p, o);
i.faces.push(m), void 0 !== c && i.faceVertexUvs[0].push([d[e].clone(), d[t].clone(), d[r].clone()]), void 0 !== u && i.faceVertexUvs[1].push([f[e].clone(), f[t].clone(), f[r].clone()]);
}
var i = this,
r = null !== e.index ? e.index.array : void 0,
o = e.attributes,
a = o.position.array,
s = void 0 !== o.normal ? o.normal.array : void 0,
l = void 0 !== o.color ? o.color.array : void 0,
c = void 0 !== o.uv ? o.uv.array : void 0,
u = void 0 !== o.uv2 ? o.uv2.array : void 0;
void 0 !== u && (this.faceVertexUvs[1] = []);
for (var h = [], d = [], f = [], p = 0, m = 0; p < a.length; p += 3, m += 2)
i.vertices.push(new n.Vector3(a[p], a[p + 1], a[p + 2])),
void 0 !== s && h.push(new n.Vector3(s[p], s[p + 1], s[p + 2])),
void 0 !== l && i.colors.push(new n.Color(l[p], l[p + 1], l[p + 2])),
void 0 !== c && d.push(new n.Vector2(c[m], c[m + 1])),
void 0 !== u && f.push(new n.Vector2(u[m], u[m + 1]));
if (void 0 !== r) {
var v = e.groups;
if (v.length > 0)
for (var p = 0; p < v.length; p++)
for (var g = v[p], y = g.start, _ = g.count, m = y, b = y + _; b > m; m += 3) t(r[m], r[m + 1], r[m + 2], g.materialIndex);
else
for (var p = 0; p < r.length; p += 3) t(r[p], r[p + 1], r[p + 2]);
} else
for (var p = 0; p < a.length / 3; p += 3) t(p, p + 1, p + 2);
return this.computeFaceNormals(), null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()), null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()), this;
},
center: function () {
this.computeBoundingBox();
var e = this.boundingBox.center().negate();
return this.translate(e.x, e.y, e.z), e;
},
normalize: function () {
this.computeBoundingSphere();
var e = this.boundingSphere.center,
t = this.boundingSphere.radius,
i = 0 === t ? 1 : 1 / t,
r = new n.Matrix4();
return r.set(i, 0, 0, -i * e.x, 0, i, 0, -i * e.y, 0, 0, i, -i * e.z, 0, 0, 0, 1), this.applyMatrix(r), this;
},
computeFaceNormals: function () {
for (var e = new n.Vector3(), t = new n.Vector3(), i = 0, r = this.faces.length; r > i; i++) {
var o = this.faces[i],
a = this.vertices[o.a],
s = this.vertices[o.b],
l = this.vertices[o.c];
e.subVectors(l, s), t.subVectors(a, s), e.cross(t), e.normalize(), o.normal.copy(e);
}
},
computeVertexNormals: function (e) {
void 0 === e && (e = !0);
var t, i, r, o, a, s;
for (s = new Array(this.vertices.length), t = 0, i = this.vertices.length; i > t; t++) s[t] = new n.Vector3();
if (e) {
var l,
c,
u,
h = new n.Vector3(),
d = new n.Vector3();
for (r = 0, o = this.faces.length; o > r; r++)
(a = this.faces[r]), (l = this.vertices[a.a]), (c = this.vertices[a.b]), (u = this.vertices[a.c]), h.subVectors(u, c), d.subVectors(l, c), h.cross(d), s[a.a].add(h), s[a.b].add(h), s[a.c].add(h);
} else
for (r = 0, o = this.faces.length; o > r; r++)(a = this.faces[r]), s[a.a].add(a.normal), s[a.b].add(a.normal), s[a.c].add(a.normal);
for (t = 0, i = this.vertices.length; i > t; t++) s[t].normalize();
for (r = 0, o = this.faces.length; o > r; r++) {
a = this.faces[r];
var f = a.vertexNormals;
3 === f.length ? (f[0].copy(s[a.a]), f[1].copy(s[a.b]), f[2].copy(s[a.c])) : ((f[0] = s[a.a].clone()), (f[1] = s[a.b].clone()), (f[2] = s[a.c].clone()));
}
this.faces.length > 0 && (this.normalsNeedUpdate = !0);
},
computeMorphNormals: function () {
var e, t, i, r, o;
for (i = 0, r = this.faces.length; r > i; i++)
for (
o = this.faces[i],
o.__originalFaceNormal ? o.__originalFaceNormal.copy(o.normal) : (o.__originalFaceNormal = o.normal.clone()),
o.__originalVertexNormals || (o.__originalVertexNormals = []),
e = 0,
t = o.vertexNormals.length; t > e; e++
)
o.__originalVertexNormals[e] ? o.__originalVertexNormals[e].copy(o.vertexNormals[e]) : (o.__originalVertexNormals[e] = o.vertexNormals[e].clone());
var a = new n.Geometry();
for (a.faces = this.faces, e = 0, t = this.morphTargets.length; t > e; e++) {
if (!this.morphNormals[e]) {
(this.morphNormals[e] = {}), (this.morphNormals[e].faceNormals = []), (this.morphNormals[e].vertexNormals = []);
var s,
l,
c = this.morphNormals[e].faceNormals,
u = this.morphNormals[e].vertexNormals;
for (i = 0, r = this.faces.length; r > i; i++)(s = new n.Vector3()), (l = {
a: new n.Vector3(),
b: new n.Vector3(),
c: new n.Vector3()
}), c.push(s), u.push(l);
}
var h = this.morphNormals[e];
(a.vertices = this.morphTargets[e].vertices), a.computeFaceNormals(), a.computeVertexNormals();
var s, l;
for (i = 0, r = this.faces.length; r > i; i++)
(o = this.faces[i]), (s = h.faceNormals[i]), (l = h.vertexNormals[i]), s.copy(o.normal), l.a.copy(o.vertexNormals[0]), l.b.copy(o.vertexNormals[1]), l.c.copy(o.vertexNormals[2]);
}
for (i = 0, r = this.faces.length; r > i; i++)(o = this.faces[i]), (o.normal = o.__originalFaceNormal), (o.vertexNormals = o.__originalVertexNormals);
},
computeTangents: function () {
console.warn("THREE.Geometry: .computeTangents() has been removed.");
},
computeLineDistances: function () {
for (var e = 0, t = this.vertices, i = 0, n = t.length; n > i; i++) i > 0 && (e += t[i].distanceTo(t[i - 1])), (this.lineDistances[i] = e);
},
computeBoundingBox: function () {
null === this.boundingBox && (this.boundingBox = new n.Box3()), this.boundingBox.setFromPoints(this.vertices);
},
computeBoundingSphere: function () {
null === this.boundingSphere && (this.boundingSphere = new n.Sphere()), this.boundingSphere.setFromPoints(this.vertices);
},
merge: function (e, t, i) {
if (e instanceof n.Geometry == !1) return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.", e);
var r,
o = this.vertices.length,
a = this.vertices,
s = e.vertices,
l = this.faces,
c = e.faces,
u = this.faceVertexUvs[0],
h = e.faceVertexUvs[0];
void 0 === i && (i = 0), void 0 !== t && (r = new n.Matrix3().getNormalMatrix(t));
for (var d = 0, f = s.length; f > d; d++) {
var p = s[d],
m = p.clone();
void 0 !== t && m.applyMatrix4(t), a.push(m);
}
for (d = 0, f = c.length; f > d; d++) {
var v,
g,
y,
_ = c[d],
b = _.vertexNormals,
x = _.vertexColors;
(v = new n.Face3(_.a + o, _.b + o, _.c + o)), v.normal.copy(_.normal), void 0 !== r && v.normal.applyMatrix3(r).normalize();
for (var w = 0, M = b.length; M > w; w++)(g = b[w].clone()), void 0 !== r && g.applyMatrix3(r).normalize(), v.vertexNormals.push(g);
v.color.copy(_.color);
for (var w = 0, M = x.length; M > w; w++)(y = x[w]), v.vertexColors.push(y.clone());
(v.materialIndex = _.materialIndex + i), l.push(v);
}
for (d = 0, f = h.length; f > d; d++) {
var T = h[d],
S = [];
if (void 0 !== T) {
for (var w = 0, M = T.length; M > w; w++) S.push(T[w].clone());
u.push(S);
}
}
},
mergeMesh: function (e) {
return e instanceof n.Mesh == !1 ? void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.", e) : (e.matrixAutoUpdate && e.updateMatrix(), void this.merge(e.geometry, e.matrix));
},
mergeVertices: function () {
var e,
t,
i,
n,
r,
o,
a,
s,
l = {},
c = [],
u = [],
h = 4,
d = Math.pow(10, h);
for (i = 0, n = this.vertices.length; n > i; i++)
(e = this.vertices[i]), (t = Math.round(e.x * d) + "_" + Math.round(e.y * d) + "_" + Math.round(e.z * d)), void 0 === l[t] ? ((l[t] = i), c.push(this.vertices[i]), (u[i] = c.length - 1)) : (u[i] = u[l[t]]);
var f = [];
for (i = 0, n = this.faces.length; n > i; i++) {
(r = this.faces[i]), (r.a = u[r.a]), (r.b = u[r.b]), (r.c = u[r.c]), (o = [r.a, r.b, r.c]);
for (var p = -1, m = 0; 3 > m; m++)
if (o[m] === o[(m + 1) % 3]) {
(p = m), f.push(i);
break;
}
}
for (i = f.length - 1; i >= 0; i--) {
var v = f[i];
for (this.faces.splice(v, 1), a = 0, s = this.faceVertexUvs.length; s > a; a++) this.faceVertexUvs[a].splice(v, 1);
}
var g = this.vertices.length - c.length;
return (this.vertices = c), g;
},
sortFacesByMaterialIndex: function () {
function e(e, t) {
return e.materialIndex - t.materialIndex;
}
for (var t = this.faces, i = t.length, n = 0; i > n; n++) t[n]._id = n;
t.sort(e);
var r,
o,
a = this.faceVertexUvs[0],
s = this.faceVertexUvs[1];
a && a.length === i && (r = []), s && s.length === i && (o = []);
for (var n = 0; i > n; n++) {
var l = t[n]._id;
r && r.push(a[l]), o && o.push(s[l]);
}
r && (this.faceVertexUvs[0] = r), o && (this.faceVertexUvs[1] = o);
},
toJSON: function () {
function e(e, t, i) {
return i ? e | (1 << t) : e & ~(1 << t);
}
function t(e) {
var t = e.x.toString() + e.y.toString() + e.z.toString();
return void 0 !== d[t] ? d[t] : ((d[t] = h.length / 3), h.push(e.x, e.y, e.z), d[t]);
}
function i(e) {
var t = e.r.toString() + e.g.toString() + e.b.toString();
return void 0 !== p[t] ? p[t] : ((p[t] = f.length), f.push(e.getHex()), p[t]);
}
function n(e) {
var t = e.x.toString() + e.y.toString();
return void 0 !== v[t] ? v[t] : ((v[t] = m.length / 2), m.push(e.x, e.y), v[t]);
}
var r = {
metadata: {
version: 4.4,
type: "Geometry",
generator: "Geometry.toJSON"
}
};
if (((r.uuid = this.uuid), (r.type = this.type), "" !== this.name && (r.name = this.name), void 0 !== this.parameters)) {
var o = this.parameters;
for (var a in o) void 0 !== o[a] && (r[a] = o[a]);
return r;
}
for (var s = [], l = 0; l < this.vertices.length; l++) {
var c = this.vertices[l];
s.push(c.x, c.y, c.z);
}
for (var u = [], h = [], d = {}, f = [], p = {}, m = [], v = {}, l = 0; l < this.faces.length; l++) {
var g = this.faces[l],
y = !0,
_ = !1,
b = void 0 !== this.faceVertexUvs[0][l],
x = g.normal.length() > 0,
w = g.vertexNormals.length > 0,
M = 1 !== g.color.r || 1 !== g.color.g || 1 !== g.color.b,
T = g.vertexColors.length > 0,
S = 0;
if (
((S = e(S, 0, 0)),
(S = e(S, 1, y)),
(S = e(S, 2, _)),
(S = e(S, 3, b)),
(S = e(S, 4, x)),
(S = e(S, 5, w)),
(S = e(S, 6, M)),
(S = e(S, 7, T)),
u.push(S),
u.push(g.a, g.b, g.c),
u.push(g.materialIndex),
b)
) {
var E = this.faceVertexUvs[0][l];
u.push(n(E[0]), n(E[1]), n(E[2]));
}
if ((x && u.push(t(g.normal)), w)) {
var A = g.vertexNormals;
u.push(t(A[0]), t(A[1]), t(A[2]));
}
if ((M && u.push(i(g.color)), T)) {
var C = g.vertexColors;
u.push(i(C[0]), i(C[1]), i(C[2]));
}
}
return (r.data = {}), (r.data.vertices = s), (r.data.normals = h), f.length > 0 && (r.data.colors = f), m.length > 0 && (r.data.uvs = [m]), (r.data.faces = u), r;
},
clone: function () {
return new n.Geometry().copy(this);
},
copy: function (e) {
(this.vertices = []), (this.faces = []), (this.faceVertexUvs = [
[]
]);
for (var t = e.vertices, i = 0, n = t.length; n > i; i++) this.vertices.push(t[i].clone());
for (var r = e.faces, i = 0, n = r.length; n > i; i++) this.faces.push(r[i].clone());
for (var i = 0, n = e.faceVertexUvs.length; n > i; i++) {
var o = e.faceVertexUvs[i];
void 0 === this.faceVertexUvs[i] && (this.faceVertexUvs[i] = []);
for (var a = 0, s = o.length; s > a; a++) {
for (var l = o[a], c = [], u = 0, h = l.length; h > u; u++) {
var d = l[u];
c.push(d.clone());
}
this.faceVertexUvs[i].push(c);
}
}
return this;
},
dispose: function () {
this.dispatchEvent({
type: "dispose"
});
},
}),
(n.GeometryIdCount = 0),
(n.DirectGeometry = function () {
Object.defineProperty(this, "id", {
value: n.GeometryIdCount++
}),
(this.uuid = n.Math.generateUUID()),
(this.name = ""),
(this.type = "DirectGeometry"),
(this.indices = []),
(this.vertices = []),
(this.normals = []),
(this.colors = []),
(this.uvs = []),
(this.uvs2 = []),
(this.groups = []),
(this.morphTargets = {}),
(this.skinWeights = []),
(this.skinIndices = []),
(this.boundingBox = null),
(this.boundingSphere = null),
(this.verticesNeedUpdate = !1),
(this.normalsNeedUpdate = !1),
(this.colorsNeedUpdate = !1),
(this.uvsNeedUpdate = !1),
(this.groupsNeedUpdate = !1);
}),
Object.assign(n.DirectGeometry.prototype, n.EventDispatcher.prototype, {
computeBoundingBox: n.Geometry.prototype.computeBoundingBox,
computeBoundingSphere: n.Geometry.prototype.computeBoundingSphere,
computeFaceNormals: function () {
console.warn("THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.");
},
computeVertexNormals: function () {
console.warn("THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.");
},
computeGroups: function (e) {
for (var t, i, n = [], r = e.faces, o = 0; o < r.length; o++) {
var a = r[o];
a.materialIndex !== i && ((i = a.materialIndex), void 0 !== t && ((t.count = 3 * o - t.start), n.push(t)), (t = {
start: 3 * o,
materialIndex: i
}));
}
void 0 !== t && ((t.count = 3 * o - t.start), n.push(t)), (this.groups = n);
},
fromGeometry: function (e) {
var t,
i = e.faces,
r = e.vertices,
o = e.faceVertexUvs,
a = o[0] && o[0].length > 0,
s = o[1] && o[1].length > 0,
l = e.morphTargets,
c = l.length;
if (c > 0) {
t = [];
for (var u = 0; c > u; u++) t[u] = [];
this.morphTargets.position = t;
}
var h,
d = e.morphNormals,
f = d.length;
if (f > 0) {
h = [];
for (var u = 0; f > u; u++) h[u] = [];
this.morphTargets.normal = h;
}
for (var p = e.skinIndices, m = e.skinWeights, v = p.length === r.length, g = m.length === r.length, u = 0; u < i.length; u++) {
var y = i[u];
this.vertices.push(r[y.a], r[y.b], r[y.c]);
var _ = y.vertexNormals;
if (3 === _.length) this.normals.push(_[0], _[1], _[2]);
else {
var b = y.normal;
this.normals.push(b, b, b);
}
var x = y.vertexColors;
if (3 === x.length) this.colors.push(x[0], x[1], x[2]);
else {
var w = y.color;
this.colors.push(w, w, w);
}
if (a === !0) {
var M = o[0][u];
void 0 !== M ? this.uvs.push(M[0], M[1], M[2]) : (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ", u), this.uvs.push(new n.Vector2(), new n.Vector2(), new n.Vector2()));
}
if (s === !0) {
var M = o[1][u];
void 0 !== M ? this.uvs2.push(M[0], M[1], M[2]) : (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", u), this.uvs2.push(new n.Vector2(), new n.Vector2(), new n.Vector2()));
}
for (var T = 0; c > T; T++) {
var S = l[T].vertices;
t[T].push(S[y.a], S[y.b], S[y.c]);
}
for (var T = 0; f > T; T++) {
var E = d[T].vertexNormals[u];
h[T].push(E.a, E.b, E.c);
}
v && this.skinIndices.push(p[y.a], p[y.b], p[y.c]), g && this.skinWeights.push(m[y.a], m[y.b], m[y.c]);
}
return (
this.computeGroups(e),
(this.verticesNeedUpdate = e.verticesNeedUpdate),
(this.normalsNeedUpdate = e.normalsNeedUpdate),
(this.colorsNeedUpdate = e.colorsNeedUpdate),
(this.uvsNeedUpdate = e.uvsNeedUpdate),
(this.groupsNeedUpdate = e.groupsNeedUpdate),
this
);
},
dispose: function () {
this.dispatchEvent({
type: "dispose"
});
},
}),
(n.BufferGeometry = function () {
Object.defineProperty(this, "id", {
value: n.GeometryIdCount++
}),
(this.uuid = n.Math.generateUUID()),
(this.name = ""),
(this.type = "BufferGeometry"),
(this.index = null),
(this.attributes = {}),
(this.morphAttributes = {}),
(this.groups = []),
(this.boundingBox = null),
(this.boundingSphere = null),
(this.drawRange = {
start: 0,
count: 1 / 0
});
}),
Object.assign(n.BufferGeometry.prototype, n.EventDispatcher.prototype, {
getIndex: function () {
return this.index;
},
setIndex: function (e) {
this.index = e;
},
addAttribute: function (e, t) {
return t instanceof n.BufferAttribute == !1 && t instanceof n.InterleavedBufferAttribute == !1 ?
(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."), void this.addAttribute(e, new n.BufferAttribute(arguments[1], arguments[2]))) :
"index" === e ?
(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."), void this.setIndex(t)) :
((this.attributes[e] = t), this);
},
getAttribute: function (e) {
return this.attributes[e];
},
removeAttribute: function (e) {
return delete this.attributes[e], this;
},
addGroup: function (e, t, i) {
this.groups.push({
start: e,
count: t,
materialIndex: void 0 !== i ? i : 0
});
},
clearGroups: function () {
this.groups = [];
},
setDrawRange: function (e, t) {
(this.drawRange.start = e), (this.drawRange.count = t);
},
applyMatrix: function (e) {
var t = this.attributes.position;
void 0 !== t && (e.applyToVector3Array(t.array), (t.needsUpdate = !0));
var i = this.attributes.normal;
if (void 0 !== i) {
var r = new n.Matrix3().getNormalMatrix(e);
r.applyToVector3Array(i.array), (i.needsUpdate = !0);
}
return null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), this;
},
rotateX: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Matrix4()), e.makeRotationX(t), this.applyMatrix(e), this;
};
})(),
rotateY: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Matrix4()), e.makeRotationY(t), this.applyMatrix(e), this;
};
})(),
rotateZ: (function () {
var e;
return function (t) {
return void 0 === e && (e = new n.Matrix4()), e.makeRotationZ(t), this.applyMatrix(e), this;
};
})(),
translate: (function () {
var e;
return function (t, i, r) {
return void 0 === e && (e = new n.Matrix4()), e.makeTranslation(t, i, r), this.applyMatrix(e), this;
};
})(),
scale: (function () {
var e;
return function (t, i, r) {
return void 0 === e && (e = new n.Matrix4()), e.makeScale(t, i, r), this.applyMatrix(e), this;
};
})(),
lookAt: (function () {
var e;
return function (t) {
void 0 === e && (e = new n.Object3D()), e.lookAt(t), e.updateMatrix(), this.applyMatrix(e.matrix);
};
})(),
center: function () {
this.computeBoundingBox();
var e = this.boundingBox.center().negate();
return this.translate(e.x, e.y, e.z), e;
},
setFromObject: function (e) {
var t = e.geometry;
if (e instanceof n.Points || e instanceof n.Line) {
var i = new n.Float32Attribute(3 * t.vertices.length, 3),
r = new n.Float32Attribute(3 * t.colors.length, 3);
if ((this.addAttribute("position", i.copyVector3sArray(t.vertices)), this.addAttribute("color", r.copyColorsArray(t.colors)), t.lineDistances && t.lineDistances.length === t.vertices.length)) {
var o = new n.Float32Attribute(t.lineDistances.length, 1);
this.addAttribute("lineDistance", o.copyArray(t.lineDistances));
}
null !== t.boundingSphere && (this.boundingSphere = t.boundingSphere.clone()), null !== t.boundingBox && (this.boundingBox = t.boundingBox.clone());
} else e instanceof n.Mesh && t instanceof n.Geometry && this.fromGeometry(t);
return this;
},
updateFromObject: function (e) {
var t = e.geometry;
if (e instanceof n.Mesh) {
var i = t.__directGeometry;
if (void 0 === i || t.elementsNeedUpdate === !0) return this.fromGeometry(t);
(i.verticesNeedUpdate = t.verticesNeedUpdate || t.elementsNeedUpdate),
(i.normalsNeedUpdate = t.normalsNeedUpdate || t.elementsNeedUpdate),
(i.colorsNeedUpdate = t.colorsNeedUpdate || t.elementsNeedUpdate),
(i.uvsNeedUpdate = t.uvsNeedUpdate || t.elementsNeedUpdate),
(i.groupsNeedUpdate = t.groupsNeedUpdate || t.elementsNeedUpdate),
(t.elementsNeedUpdate = !1),
(t.verticesNeedUpdate = !1),
(t.normalsNeedUpdate = !1),
(t.colorsNeedUpdate = !1),
(t.uvsNeedUpdate = !1),
(t.groupsNeedUpdate = !1),
(t = i);
}
var r;
return (
t.verticesNeedUpdate === !0 && ((r = this.attributes.position), void 0 !== r && (r.copyVector3sArray(t.vertices), (r.needsUpdate = !0)), (t.verticesNeedUpdate = !1)),
t.normalsNeedUpdate === !0 && ((r = this.attributes.normal), void 0 !== r && (r.copyVector3sArray(t.normals), (r.needsUpdate = !0)), (t.normalsNeedUpdate = !1)),
t.colorsNeedUpdate === !0 && ((r = this.attributes.color), void 0 !== r && (r.copyColorsArray(t.colors), (r.needsUpdate = !0)), (t.colorsNeedUpdate = !1)),
t.uvsNeedUpdate && ((r = this.attributes.uv), void 0 !== r && (r.copyVector2sArray(t.uvs), (r.needsUpdate = !0)), (t.uvsNeedUpdate = !1)),
t.lineDistancesNeedUpdate && ((r = this.attributes.lineDistance), void 0 !== r && (r.copyArray(t.lineDistances), (r.needsUpdate = !0)), (t.lineDistancesNeedUpdate = !1)),
t.groupsNeedUpdate && (t.computeGroups(e.geometry), (this.groups = t.groups), (t.groupsNeedUpdate = !1)),
this
);
},
fromGeometry: function (e) {
return (e.__directGeometry = new n.DirectGeometry().fromGeometry(e)), this.fromDirectGeometry(e.__directGeometry);
},
fromDirectGeometry: function (e) {
var t = new Float32Array(3 * e.vertices.length);
if ((this.addAttribute("position", new n.BufferAttribute(t, 3).copyVector3sArray(e.vertices)), e.normals.length > 0)) {
var i = new Float32Array(3 * e.normals.length);
this.addAttribute("normal", new n.BufferAttribute(i, 3).copyVector3sArray(e.normals));
}
if (e.colors.length > 0) {
var r = new Float32Array(3 * e.colors.length);
this.addAttribute("color", new n.BufferAttribute(r, 3).copyColorsArray(e.colors));
}
if (e.uvs.length > 0) {
var o = new Float32Array(2 * e.uvs.length);
this.addAttribute("uv", new n.BufferAttribute(o, 2).copyVector2sArray(e.uvs));
}
if (e.uvs2.length > 0) {
var a = new Float32Array(2 * e.uvs2.length);
this.addAttribute("uv2", new n.BufferAttribute(a, 2).copyVector2sArray(e.uvs2));
}
if (e.indices.length > 0) {
var s = e.vertices.length > 65535 ? Uint32Array : Uint16Array,
l = new s(3 * e.indices.length);
this.setIndex(new n.BufferAttribute(l, 1).copyIndicesArray(e.indices));
}
this.groups = e.groups;
for (var c in e.morphTargets) {
for (var u = [], h = e.morphTargets[c], d = 0, f = h.length; f > d; d++) {
var p = h[d],
m = new n.Float32Attribute(3 * p.length, 3);
u.push(m.copyVector3sArray(p));
}
this.morphAttributes[c] = u;
}
if (e.skinIndices.length > 0) {
var v = new n.Float32Attribute(4 * e.skinIndices.length, 4);
this.addAttribute("skinIndex", v.copyVector4sArray(e.skinIndices));
}
if (e.skinWeights.length > 0) {
var g = new n.Float32Attribute(4 * e.skinWeights.length, 4);
this.addAttribute("skinWeight", g.copyVector4sArray(e.skinWeights));
}
return null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()), null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()), this;
},
computeBoundingBox: function () {
null === this.boundingBox && (this.boundingBox = new n.Box3());
var e = this.attributes.position.array;
void 0 !== e ? this.boundingBox.setFromArray(e) : this.boundingBox.makeEmpty(),
(isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) &&
console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this);
},
computeBoundingSphere: (function () {
var e = new n.Box3(),
t = new n.Vector3();
return function () {
null === this.boundingSphere && (this.boundingSphere = new n.Sphere());
var i = this.attributes.position;
if (i) {
var r = i.array,
o = this.boundingSphere.center;
e.setFromArray(r), e.center(o);
for (var a = 0, s = 0, l = r.length; l > s; s += 3) t.fromArray(r, s), (a = Math.max(a, o.distanceToSquared(t)));
(this.boundingSphere.radius = Math.sqrt(a)),
isNaN(this.boundingSphere.radius) && console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this);
}
};
})(),
computeFaceNormals: function () {},
computeVertexNormals: function () {
var e = this.index,
t = this.attributes,
i = this.groups;
if (t.position) {
var r = t.position.array;
if (void 0 === t.normal) this.addAttribute("normal", new n.BufferAttribute(new Float32Array(r.length), 3));
else
for (var o = t.normal.array, a = 0, s = o.length; s > a; a++) o[a] = 0;
var l,
c,
u,
h = t.normal.array,
d = new n.Vector3(),
f = new n.Vector3(),
p = new n.Vector3(),
m = new n.Vector3(),
v = new n.Vector3();
if (e) {
var g = e.array;
0 === i.length && this.addGroup(0, g.length);
for (var y = 0, _ = i.length; _ > y; ++y)
for (var b = i[y], x = b.start, w = b.count, a = x, s = x + w; s > a; a += 3)
(l = 3 * g[a + 0]),
(c = 3 * g[a + 1]),
(u = 3 * g[a + 2]),
d.fromArray(r, l),
f.fromArray(r, c),
p.fromArray(r, u),
m.subVectors(p, f),
v.subVectors(d, f),
m.cross(v),
(h[l] += m.x),
(h[l + 1] += m.y),
(h[l + 2] += m.z),
(h[c] += m.x),
(h[c + 1] += m.y),
(h[c + 2] += m.z),
(h[u] += m.x),
(h[u + 1] += m.y),
(h[u + 2] += m.z);
} else
for (var a = 0, s = r.length; s > a; a += 9)
d.fromArray(r, a),
f.fromArray(r, a + 3),
p.fromArray(r, a + 6),
m.subVectors(p, f),
v.subVectors(d, f),
m.cross(v),
(h[a] = m.x),
(h[a + 1] = m.y),
(h[a + 2] = m.z),
(h[a + 3] = m.x),
(h[a + 4] = m.y),
(h[a + 5] = m.z),
(h[a + 6] = m.x),
(h[a + 7] = m.y),
(h[a + 8] = m.z);
this.normalizeNormals(), (t.normal.needsUpdate = !0);
}
},
merge: function (e, t) {
if (e instanceof n.BufferGeometry == !1) return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.", e);
void 0 === t && (t = 0);
var i = this.attributes;
for (var r in i)
if (void 0 !== e.attributes[r])
for (var o = i[r], a = o.array, s = e.attributes[r], l = s.array, c = s.itemSize, u = 0, h = c * t; u < l.length; u++, h++) a[h] = l[u];
return this;
},
normalizeNormals: function () {
for (var e, t, i, n, r = this.attributes.normal.array, o = 0, a = r.length; a > o; o += 3)
(e = r[o]), (t = r[o + 1]), (i = r[o + 2]), (n = 1 / Math.sqrt(e * e + t * t + i * i)), (r[o] *= n), (r[o + 1] *= n), (r[o + 2] *= n);
},
toNonIndexed: function () {
if (null === this.index) return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."), this;
var e = new n.BufferGeometry(),
t = this.index.array,
i = this.attributes;
for (var r in i) {
for (var o = i[r], a = o.array, s = o.itemSize, l = new a.constructor(t.length * s), c = 0, u = 0, h = 0, d = t.length; d > h; h++) {
c = t[h] * s;
for (var f = 0; s > f; f++) l[u++] = a[c++];
}
e.addAttribute(r, new n.BufferAttribute(l, s));
}
return e;
},
toJSON: function () {
var e = {
metadata: {
version: 4.4,
type: "BufferGeometry",
generator: "BufferGeometry.toJSON"
}
};
if (((e.uuid = this.uuid), (e.type = this.type), "" !== this.name && (e.name = this.name), void 0 !== this.parameters)) {
var t = this.parameters;
for (var i in t) void 0 !== t[i] && (e[i] = t[i]);
return e;
}
e.data = {
attributes: {}
};
var n = this.index;
if (null !== n) {
var r = Array.prototype.slice.call(n.array);
e.data.index = {
type: n.array.constructor.name,
array: r
};
}
var o = this.attributes;
for (var i in o) {
var a = o[i],
r = Array.prototype.slice.call(a.array);
e.data.attributes[i] = {
itemSize: a.itemSize,
type: a.array.constructor.name,
array: r,
normalized: a.normalized
};
}
var s = this.groups;
s.length > 0 && (e.data.groups = JSON.parse(JSON.stringify(s)));
var l = this.boundingSphere;
return null !== l && (e.data.boundingSphere = {
center: l.center.toArray(),
radius: l.radius
}), e;
},
clone: function () {
return new n.BufferGeometry().copy(this);
},
copy: function (e) {
var t = e.index;
null !== t && this.setIndex(t.clone());
var i = e.attributes;
for (var n in i) {
var r = i[n];
this.addAttribute(n, r.clone());
}
for (var o = e.groups, a = 0, s = o.length; s > a; a++) {
var l = o[a];
this.addGroup(l.start, l.count, l.materialIndex);
}
return this;
},
dispose: function () {
this.dispatchEvent({
type: "dispose"
});
},
}),
(n.BufferGeometry.MaxIndex = 65535),
(n.InstancedBufferGeometry = function () {
n.BufferGeometry.call(this), (this.type = "InstancedBufferGeometry"), (this.maxInstancedCount = void 0);
}),
(n.InstancedBufferGeometry.prototype = Object.create(n.BufferGeometry.prototype)),
(n.InstancedBufferGeometry.prototype.constructor = n.InstancedBufferGeometry),
(n.InstancedBufferGeometry.prototype.addGroup = function (e, t, i) {
this.groups.push({
start: e,
count: t,
instances: i
});
}),
(n.InstancedBufferGeometry.prototype.copy = function (e) {
var t = e.index;
null !== t && this.setIndex(t.clone());
var i = e.attributes;
for (var n in i) {
var r = i[n];
this.addAttribute(n, r.clone());
}
for (var o = e.groups, a = 0, s = o.length; s > a; a++) {
var l = o[a];
this.addGroup(l.start, l.count, l.instances);
}
return this;
}),
(n.Uniform = function (e) {
"string" == typeof e && (console.warn("THREE.Uniform: Type parameter is no longer needed."), (e = arguments[1])), (this.value = e), (this.dynamic = !1);
}),
(n.Uniform.prototype = {
constructor: n.Uniform,
onUpdate: function (e) {
return (this.dynamic = !0), (this.onUpdateCallback = e), this;
},
}),
(n.AnimationAction = function () {
throw new Error("THREE.AnimationAction: Use mixer.clipAction for construction.");
}),
(n.AnimationAction._new = function (e, t, i) {
(this._mixer = e), (this._clip = t), (this._localRoot = i || null);
for (var r = t.tracks, o = r.length, a = new Array(o), s = {
endingStart: n.ZeroCurvatureEnding,
endingEnd: n.ZeroCurvatureEnding
}, l = 0; l !== o; ++l) {
var c = r[l].createInterpolant(null);
(a[l] = c), (c.settings = s);
}
(this._interpolantSettings = s),
(this._interpolants = a),
(this._propertyBindings = new Array(o)),
(this._cacheIndex = null),
(this._byClipCacheIndex = null),
(this._timeScaleInterpolant = null),
(this._weightInterpolant = null),
(this.loop = n.LoopRepeat),
(this._loopCount = -1),
(this._startTime = null),
(this.time = 0),
(this.timeScale = 1),
(this._effectiveTimeScale = 1),
(this.weight = 1),
(this._effectiveWeight = 1),
(this.repetitions = 1 / 0),
(this.paused = !1),
(this.enabled = !0),
(this.clampWhenFinished = !1),
(this.zeroSlopeAtStart = !0),
(this.zeroSlopeAtEnd = !0);
}),
(n.AnimationAction._new.prototype = {
constructor: n.AnimationAction._new,
play: function () {
return this._mixer._activateAction(this), this;
},
stop: function () {
return this._mixer._deactivateAction(this), this.reset();
},
reset: function () {
return (this.paused = !1), (this.enabled = !0), (this.time = 0), (this._loopCount = -1), (this._startTime = null), this.stopFading().stopWarping();
},
isRunning: function () {
this._startTime;
return this.enabled && !this.paused && 0 !== this.timeScale && null === this._startTime && this._mixer._isActiveAction(this);
},
isScheduled: function () {
return this._mixer._isActiveAction(this);
},
startAt: function (e) {
return (this._startTime = e), this;
},
setLoop: function (e, t) {
return (this.loop = e), (this.repetitions = t), this;
},
setEffectiveWeight: function (e) {
return (this.weight = e), (this._effectiveWeight = this.enabled ? e : 0), this.stopFading();
},
getEffectiveWeight: function () {
return this._effectiveWeight;
},
fadeIn: function (e) {
return this._scheduleFading(e, 0, 1);
},
fadeOut: function (e) {
return this._scheduleFading(e, 1, 0);
},
crossFadeFrom: function (e, t, i) {
this._mixer;
if ((e.fadeOut(t), this.fadeIn(t), i)) {
var n = this._clip.duration,
r = e._clip.duration,
o = r / n,
a = n / r;
e.warp(1, o, t), this.warp(a, 1, t);
}
return this;
},
crossFadeTo: function (e, t, i) {
return e.crossFadeFrom(this, t, i);
},
stopFading: function () {
var e = this._weightInterpolant;
return null !== e && ((this._weightInterpolant = null), this._mixer._takeBackControlInterpolant(e)), this;
},
setEffectiveTimeScale: function (e) {
return (this.timeScale = e), (this._effectiveTimeScale = this.paused ? 0 : e), this.stopWarping();
},
getEffectiveTimeScale: function () {
return this._effectiveTimeScale;
},
setDuration: function (e) {
return (this.timeScale = this._clip.duration / e), this.stopWarping();
},
syncWith: function (e) {
return (this.time = e.time), (this.timeScale = e.timeScale), this.stopWarping();
},
halt: function (e) {
return this.warp(this._effectiveTimeScale, 0, e);
},
warp: function (e, t, i) {
var n = this._mixer,
r = n.time,
o = this._timeScaleInterpolant,
a = this.timeScale;
null === o && ((o = n._lendControlInterpolant()), (this._timeScaleInterpolant = o));
var s = o.parameterPositions,
l = o.sampleValues;
return (s[0] = r), (s[1] = r + i), (l[0] = e / a), (l[1] = t / a), this;
},
stopWarping: function () {
var e = this._timeScaleInterpolant;
return null !== e && ((this._timeScaleInterpolant = null), this._mixer._takeBackControlInterpolant(e)), this;
},
getMixer: function () {
return this._mixer;
},
getClip: function () {
return this._clip;
},
getRoot: function () {
return this._localRoot || this._mixer._root;
},
_update: function (e, t, i, n) {
var r = this._startTime;
if (null !== r) {
var o = (e - r) * i;
if (0 > o || 0 === i) return;
(this._startTime = null), (t = i * o);
}
t *= this._updateTimeScale(e);
var a = this._updateTime(t),
s = this._updateWeight(e);
if (s > 0)
for (var l = this._interpolants, c = this._propertyBindings, u = 0, h = l.length; u !== h; ++u) l[u].evaluate(a), c[u].accumulate(n, s);
},
_updateWeight: function (e) {
var t = 0;
if (this.enabled) {
t = this.weight;
var i = this._weightInterpolant;
if (null !== i) {
var n = i.evaluate(e)[0];
(t *= n), e > i.parameterPositions[1] && (this.stopFading(), 0 === n && (this.enabled = !1));
}
}
return (this._effectiveWeight = t), t;
},
_updateTimeScale: function (e) {
var t = 0;
if (!this.paused) {
t = this.timeScale;
var i = this._timeScaleInterpolant;
if (null !== i) {
var n = i.evaluate(e)[0];
(t *= n), e > i.parameterPositions[1] && (this.stopWarping(), 0 === t ? (this.paused = !0) : (this.timeScale = t));
}
}
return (this._effectiveTimeScale = t), t;
},
_updateTime: function (e) {
var t = this.time + e;
if (0 === e) return t;
var i = this._clip.duration,
r = this.loop,
o = this._loopCount;
if (r === n.LoopOnce) {
-1 === o && ((this.loopCount = 0), this._setEndings(!0, !0, !1));
e: {
if (t >= i) t = i;
else {
if (!(0 > t)) break e;
t = 0;
}
this.clampWhenFinished ? (this.paused = !0) : (this.enabled = !1),
this._mixer.dispatchEvent({
type: "finished",
action: this,
direction: 0 > e ? -1 : 1
});
}
} else {
var a = r === n.LoopPingPong;
if ((-1 === o && (e >= 0 ? ((o = 0), this._setEndings(!0, 0 === this.repetitions, a)) : this._setEndings(0 === this.repetitions, !0, a)), t >= i || 0 > t)) {
var s = Math.floor(t / i);
(t -= i * s), (o += Math.abs(s));
var l = this.repetitions - o;
if (0 > l) this.clampWhenFinished ? (this.paused = !0) : (this.enabled = !1), (t = e > 0 ? i : 0), this._mixer.dispatchEvent({
type: "finished",
action: this,
direction: e > 0 ? 1 : -1
});
else {
if (0 === l) {
var c = 0 > e;
this._setEndings(c, !c, a);
} else this._setEndings(!1, !1, a);
(this._loopCount = o), this._mixer.dispatchEvent({
type: "loop",
action: this,
loopDelta: s
});
}
}
if (a && 1 === (1 & o)) return (this.time = t), i - t;
}
return (this.time = t), t;
},
_setEndings: function (e, t, i) {
var r = this._interpolantSettings;
i
?
((r.endingStart = n.ZeroSlopeEnding), (r.endingEnd = n.ZeroSlopeEnding)) :
(e ? (r.endingStart = this.zeroSlopeAtStart ? n.ZeroSlopeEnding : n.ZeroCurvatureEnding) : (r.endingStart = n.WrapAroundEnding),
t ? (r.endingEnd = this.zeroSlopeAtEnd ? n.ZeroSlopeEnding : n.ZeroCurvatureEnding) : (r.endingEnd = n.WrapAroundEnding));
},
_scheduleFading: function (e, t, i) {
var n = this._mixer,
r = n.time,
o = this._weightInterpolant;
null === o && ((o = n._lendControlInterpolant()), (this._weightInterpolant = o));
var a = o.parameterPositions,
s = o.sampleValues;
return (a[0] = r), (s[0] = t), (a[1] = r + e), (s[1] = i), this;
},
}),
(n.AnimationClip = function (e, t, i) {
(this.name = e), (this.tracks = i), (this.duration = void 0 !== t ? t : -1), (this.uuid = n.Math.generateUUID()), this.duration < 0 && this.resetDuration(), this.trim(), this.optimize();
}),
(n.AnimationClip.prototype = {
constructor: n.AnimationClip,
resetDuration: function () {
for (var e = this.tracks, t = 0, i = 0, n = e.length; i !== n; ++i) {
var r = this.tracks[i];
t = Math.max(t, r.times[r.times.length - 1]);
}
this.duration = t;
},
trim: function () {
for (var e = 0; e < this.tracks.length; e++) this.tracks[e].trim(0, this.duration);
return this;
},
optimize: function () {
for (var e = 0; e < this.tracks.length; e++) this.tracks[e].optimize();
return this;
},
}),
Object.assign(n.AnimationClip, {
parse: function (e) {
for (var t = [], i = e.tracks, r = 1 / (e.fps || 1), o = 0, a = i.length; o !== a; ++o) t.push(n.KeyframeTrack.parse(i[o]).scale(r));
return new n.AnimationClip(e.name, e.duration, t);
},
toJSON: function (e) {
for (var t = [], i = e.tracks, r = {
name: e.name,
duration: e.duration,
tracks: t
}, o = 0, a = i.length; o !== a; ++o) t.push(n.KeyframeTrack.toJSON(i[o]));
return r;
},
CreateFromMorphTargetSequence: function (e, t, i, r) {
for (var o = t.length, a = [], s = 0; o > s; s++) {
var l = [],
c = [];
l.push((s + o - 1) % o, s, (s + 1) % o), c.push(0, 1, 0);
var u = n.AnimationUtils.getKeyframeOrder(l);
(l = n.AnimationUtils.sortedArray(l, 1, u)),
(c = n.AnimationUtils.sortedArray(c, 1, u)),
r || 0 !== l[0] || (l.push(o), c.push(c[0])),
a.push(new n.NumberKeyframeTrack(".morphTargetInfluences[" + t[s].name + "]", l, c).scale(1 / i));
}
return new n.AnimationClip(e, -1, a);
},
findByName: function (e, t) {
var i = e;
if (!Array.isArray(e)) {
var n = e;
i = (n.geometry && n.geometry.animations) || n.animations;
}
for (var r = 0; r < i.length; r++)
if (i[r].name === t) return i[r];
return null;
},
CreateClipsFromMorphTargetSequences: function (e, t, i) {
for (var r = {}, o = /^([w-]*?)([d]+)$/, a = 0, s = e.length; s > a; a++) {
var l = e[a],
c = l.name.match(o);
if (c && c.length > 1) {
var u = c[1],
h = r[u];
h || (r[u] = h = []), h.push(l);
}
}
var d = [];
for (var u in r) d.push(n.AnimationClip.CreateFromMorphTargetSequence(u, r[u], t, i));
return d;
},
parseAnimation: function (e, t, i) {
if (!e) return console.error(" no animation in JSONLoader data"), null;
for (
var r = function (e, t, i, r, o) {
if (0 !== i.length) {
var a = [],
s = [];
n.AnimationUtils.flattenJSON(i, a, s, r), 0 !== a.length && o.push(new e(t, a, s));
}
},
o = [],
a = e.name || "default",
s = e.length || -1,
l = e.fps || 30,
c = e.hierarchy || [],
u = 0; u < c.length; u++
) {
var h = c[u].keys;
if (h && 0 !== h.length)
if (h[0].morphTargets) {
for (var d = {}, f = 0; f < h.length; f++)
if (h[f].morphTargets)
for (var p = 0; p < h[f].morphTargets.length; p++) d[h[f].morphTargets[p]] = -1;
for (var m in d) {
for (var v = [], g = [], p = 0; p !== h[f].morphTargets.length; ++p) {
var y = h[f];
v.push(y.time), g.push(y.morphTarget === m ? 1 : 0);
}
o.push(new n.NumberKeyframeTrack(".morphTargetInfluence[" + m + "]", v, g));
}
s = d.length * (l || 1);
} else {
var _ = ".bones[" + t[u].name + "]";
r(n.VectorKeyframeTrack, _ + ".position", h, "pos", o), r(n.QuaternionKeyframeTrack, _ + ".quaternion", h, "rot", o), r(n.VectorKeyframeTrack, _ + ".scale", h, "scl", o);
}
}
if (0 === o.length) return null;
var b = new n.AnimationClip(a, s, o);
return b;
},
}),
(n.AnimationMixer = function (e) {
(this._root = e), this._initMemoryManager(), (this._accuIndex = 0), (this.time = 0), (this.timeScale = 1);
}),
Object.assign(n.AnimationMixer.prototype, n.EventDispatcher.prototype, {
clipAction: function (e, t) {
var i = t || this._root,
r = i.uuid,
o = "string" == typeof e ? n.AnimationClip.findByName(i, e) : e,
a = null !== o ? o.uuid : e,
s = this._actionsByClip[a],
l = null;
if (void 0 !== s) {
var c = s.actionByRoot[r];
if (void 0 !== c) return c;
(l = s.knownActions[0]), null === o && (o = l._clip);
}
if (null === o) return null;
var u = new n.AnimationMixer._Action(this, o, t);
return this._bindAction(u, l), this._addInactiveAction(u, a, r), u;
},
existingAction: function (e, t) {
var i = t || this._root,
r = i.uuid,
o = "string" == typeof e ? n.AnimationClip.findByName(i, e) : e,
a = o ? o.uuid : e,
s = this._actionsByClip[a];
return void 0 !== s ? s.actionByRoot[r] || null : null;
},
stopAllAction: function () {
var e = this._actions,
t = this._nActiveActions,
i = this._bindings,
n = this._nActiveBindings;
(this._nActiveActions = 0), (this._nActiveBindings = 0);
for (var r = 0; r !== t; ++r) e[r].reset();
for (var r = 0; r !== n; ++r) i[r].useCount = 0;
return this;
},
update: function (e) {
e *= this.timeScale;
for (var t = this._actions, i = this._nActiveActions, n = (this.time += e), r = Math.sign(e), o = (this._accuIndex ^= 1), a = 0; a !== i; ++a) {
var s = t[a];
s.enabled && s._update(n, e, r, o);
}
for (var l = this._bindings, c = this._nActiveBindings, a = 0; a !== c; ++a) l[a].apply(o);
return this;
},
getRoot: function () {
return this._root;
},
uncacheClip: function (e) {
var t = this._actions,
i = e.uuid,
n = this._actionsByClip,
r = n[i];
if (void 0 !== r) {
for (var o = r.knownActions, a = 0, s = o.length; a !== s; ++a) {
var l = o[a];
this._deactivateAction(l);
var c = l._cacheIndex,
u = t[t.length - 1];
(l._cacheIndex = null), (l._byClipCacheIndex = null), (u._cacheIndex = c), (t[c] = u), t.pop(), this._removeInactiveBindingsForAction(l);
}
delete n[i];
}
},
uncacheRoot: function (e) {
var t = e.uuid,
i = this._actionsByClip;
for (var n in i) {
var r = i[n].actionByRoot,
o = r[t];
void 0 !== o && (this._deactivateAction(o), this._removeInactiveAction(o));
}
var a = this._bindingsByRootAndName,
s = a[t];
if (void 0 !== s)
for (var l in s) {
var c = s[l];
c.restoreOriginalState(), this._removeInactiveBinding(c);
}
},
uncacheAction: function (e, t) {
var i = this.existingAction(e, t);
null !== i && (this._deactivateAction(i), this._removeInactiveAction(i));
},
}),
(n.AnimationMixer._Action = n.AnimationAction._new),
Object.assign(n.AnimationMixer.prototype, {
_bindAction: function (e, t) {
var i = e._localRoot || this._root,
r = e._clip.tracks,
o = r.length,
a = e._propertyBindings,
s = e._interpolants,
l = i.uuid,
c = this._bindingsByRootAndName,
u = c[l];
void 0 === u && ((u = {}), (c[l] = u));
for (var h = 0; h !== o; ++h) {
var d = r[h],
f = d.name,
p = u[f];
if (void 0 !== p) a[h] = p;
else {
if (((p = a[h]), void 0 !== p)) {
null === p._cacheIndex && (++p.referenceCount, this._addInactiveBinding(p, l, f));
continue;
}
var m = t && t._propertyBindings[h].binding.parsedPath;
(p = new n.PropertyMixer(n.PropertyBinding.create(i, f, m), d.ValueTypeName, d.getValueSize())), ++p.referenceCount, this._addInactiveBinding(p, l, f), (a[h] = p);
}
s[h].resultBuffer = p.buffer;
}
},
_activateAction: function (e) {
if (!this._isActiveAction(e)) {
if (null === e._cacheIndex) {
var t = (e._localRoot || this._root).uuid,
i = e._clip.uuid,
n = this._actionsByClip[i];
this._bindAction(e, n && n.knownActions[0]), this._addInactiveAction(e, i, t);
}
for (var r = e._propertyBindings, o = 0, a = r.length; o !== a; ++o) {
var s = r[o];
0 === s.useCount++ && (this._lendBinding(s), s.saveOriginalState());
}
this._lendAction(e);
}
},
_deactivateAction: function (e) {
if (this._isActiveAction(e)) {
for (var t = e._propertyBindings, i = 0, n = t.length; i !== n; ++i) {
var r = t[i];
0 === --r.useCount && (r.restoreOriginalState(), this._takeBackBinding(r));
}
this._takeBackAction(e);
}
},
_initMemoryManager: function () {
(this._actions = []),
(this._nActiveActions = 0),
(this._actionsByClip = {}),
(this._bindings = []),
(this._nActiveBindings = 0),
(this._bindingsByRootAndName = {}),
(this._controlInterpolants = []),
(this._nActiveControlInterpolants = 0);
var e = this;
this.stats = {
actions: {
get total() {
return e._actions.length;
},
get inUse() {
return e._nActiveActions;
},
},
bindings: {
get total() {
return e._bindings.length;
},
get inUse() {
return e._nActiveBindings;
},
},
controlInterpolants: {
get total() {
return e._controlInterpolants.length;
},
get inUse() {
return e._nActiveControlInterpolants;
},
},
};
},
_isActiveAction: function (e) {
var t = e._cacheIndex;
return null !== t && t < this._nActiveActions;
},
_addInactiveAction: function (e, t, i) {
var n = this._actions,
r = this._actionsByClip,
o = r[t];
if (void 0 === o)(o = {
knownActions: [e],
actionByRoot: {}
}), (e._byClipCacheIndex = 0), (r[t] = o);
else {
var a = o.knownActions;
(e._byClipCacheIndex = a.length), a.push(e);
}
(e._cacheIndex = n.length), n.push(e), (o.actionByRoot[i] = e);
},
_removeInactiveAction: function (e) {
var t = this._actions,
i = t[t.length - 1],
n = e._cacheIndex;
(i._cacheIndex = n), (t[n] = i), t.pop(), (e._cacheIndex = null);
var r = e._clip.uuid,
o = this._actionsByClip,
a = o[r],
s = a.knownActions,
l = s[s.length - 1],
c = e._byClipCacheIndex;
(l._byClipCacheIndex = c), (s[c] = l), s.pop(), (e._byClipCacheIndex = null);
var u = a.actionByRoot,
h = (t._localRoot || this._root).uuid;
delete u[h], 0 === s.length && delete o[r], this._removeInactiveBindingsForAction(e);
},
_removeInactiveBindingsForAction: function (e) {
for (var t = e._propertyBindings, i = 0, n = t.length; i !== n; ++i) {
var r = t[i];
0 === --r.referenceCount && this._removeInactiveBinding(r);
}
},
_lendAction: function (e) {
var t = this._actions,
i = e._cacheIndex,
n = this._nActiveActions++,
r = t[n];
(e._cacheIndex = n), (t[n] = e), (r._cacheIndex = i), (t[i] = r);
},
_takeBackAction: function (e) {
var t = this._actions,
i = e._cacheIndex,
n = --this._nActiveActions,
r = t[n];
(e._cacheIndex = n), (t[n] = e), (r._cacheIndex = i), (t[i] = r);
},
_addInactiveBinding: function (e, t, i) {
var n = this._bindingsByRootAndName,
r = n[t],
o = this._bindings;
void 0 === r && ((r = {}), (n[t] = r)), (r[i] = e), (e._cacheIndex = o.length), o.push(e);
},
_removeInactiveBinding: function (e) {
var t = this._bindings,
i = e.binding,
n = i.rootNode.uuid,
r = i.path,
o = this._bindingsByRootAndName,
a = o[n],
s = t[t.length - 1],
l = e._cacheIndex;
(s._cacheIndex = l), (t[l] = s), t.pop(), delete a[r];
e: {
for (var c in a) break e;
delete o[n];
}
},
_lendBinding: function (e) {
var t = this._bindings,
i = e._cacheIndex,
n = this._nActiveBindings++,
r = t[n];
(e._cacheIndex = n), (t[n] = e), (r._cacheIndex = i), (t[i] = r);
},
_takeBackBinding: function (e) {
var t = this._bindings,
i = e._cacheIndex,
n = --this._nActiveBindings,
r = t[n];
(e._cacheIndex = n), (t[n] = e), (r._cacheIndex = i), (t[i] = r);
},
_lendControlInterpolant: function () {
var e = this._controlInterpolants,
t = this._nActiveControlInterpolants++,
i = e[t];
return void 0 === i && ((i = new n.LinearInterpolant(new Float32Array(2), new Float32Array(2), 1, this._controlInterpolantsResultBuffer)), (i.__cacheIndex = t), (e[t] = i)), i;
},
_takeBackControlInterpolant: function (e) {
var t = this._controlInterpolants,
i = e.__cacheIndex,
n = --this._nActiveControlInterpolants,
r = t[n];
(e.__cacheIndex = n), (t[n] = e), (r.__cacheIndex = i), (t[i] = r);
},
_controlInterpolantsResultBuffer: new Float32Array(1),
}),
(n.AnimationObjectGroup = function (e) {
(this.uuid = n.Math.generateUUID()), (this._objects = Array.prototype.slice.call(arguments)), (this.nCachedObjects_ = 0);
var t = {};
this._indicesByUUID = t;
for (var i = 0, r = arguments.length; i !== r; ++i) t[arguments[i].uuid] = i;
(this._paths = []), (this._parsedPaths = []), (this._bindings = []), (this._bindingsIndicesByPath = {});
var o = this;
this.stats = {
objects: {
get total() {
return o._objects.length;
},
get inUse() {
return this.total - o.nCachedObjects_;
},
},
get bindingsPerObject() {
return o._bindings.length;
},
};
}),
(n.AnimationObjectGroup.prototype = {
constructor: n.AnimationObjectGroup,
add: function (e) {
for (var t = this._objects, i = t.length, r = this.nCachedObjects_, o = this._indicesByUUID, a = this._paths, s = this._parsedPaths, l = this._bindings, c = l.length, u = 0, h = arguments.length; u !== h; ++u) {
var d = arguments[u],
f = d.uuid,
p = o[f];
if (void 0 === p) {
(p = i++), (o[f] = p), t.push(d);
for (var m = 0, v = c; m !== v; ++m) l[m].push(new n.PropertyBinding(d, a[m], s[m]));
} else if (r > p) {
var g = t[p],
y = --r,
_ = t[y];
(o[_.uuid] = p), (t[p] = _), (o[f] = y), (t[y] = d);
for (var m = 0, v = c; m !== v; ++m) {
var b = l[m],
x = b[y],
w = b[p];
(b[p] = x), void 0 === w && (w = new n.PropertyBinding(d, a[m], s[m])), (b[y] = w);
}
} else t[p] !== g && console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...");
}
this.nCachedObjects_ = r;
},
remove: function (e) {
for (var t = this._objects, i = (t.length, this.nCachedObjects_), n = this._indicesByUUID, r = this._bindings, o = r.length, a = 0, s = arguments.length; a !== s; ++a) {
var l = arguments[a],
c = l.uuid,
u = n[c];
if (void 0 !== u && u >= i) {
var h = i++,
d = t[h];
(n[d.uuid] = u), (t[u] = d), (n[c] = h), (t[h] = l);
for (var f = 0, p = o; f !== p; ++f) {
var m = r[f],
v = m[h],
g = m[u];
(m[u] = v), (m[h] = g);
}
}
}
this.nCachedObjects_ = i;
},
uncache: function (e) {
for (var t = this._objects, i = t.length, n = this.nCachedObjects_, r = this._indicesByUUID, o = this._bindings, a = o.length, s = 0, l = arguments.length; s !== l; ++s) {
var c = arguments[s],
u = c.uuid,
h = r[u];
if (void 0 !== h)
if ((delete r[u], n > h)) {
var d = --n,
f = t[d],
p = --i,
m = t[p];
(r[f.uuid] = h), (t[h] = f), (r[m.uuid] = d), (t[d] = m), t.pop();
for (var v = 0, g = a; v !== g; ++v) {
var y = o[v],
_ = y[d],
b = y[p];
(y[h] = _), (y[d] = b), y.pop();
}
} else {
var p = --i,
m = t[p];
(r[m.uuid] = h), (t[h] = m), t.pop();
for (var v = 0, g = a; v !== g; ++v) {
var y = o[v];
(y[h] = y[p]), y.pop();
}
}
}
this.nCachedObjects_ = n;
},
subscribe_: function (e, t) {
var i = this._bindingsIndicesByPath,
r = i[e],
o = this._bindings;
if (void 0 !== r) return o[r];
var a = this._paths,
s = this._parsedPaths,
l = this._objects,
c = l.length,
u = this.nCachedObjects_,
h = new Array(c);
(r = o.length), (i[e] = r), a.push(e), s.push(t), o.push(h);
for (var d = u, f = l.length; d !== f; ++d) {
var p = l[d];
h[d] = new n.PropertyBinding(p, e, t);
}
return h;
},
unsubscribe_: function (e) {
var t = this._bindingsIndicesByPath,
i = t[e];
if (void 0 !== i) {
var n = this._paths,
r = this._parsedPaths,
o = this._bindings,
a = o.length - 1,
s = o[a],
l = e[a];
(t[l] = i), (o[i] = s), o.pop(), (r[i] = r[a]), r.pop(), (n[i] = n[a]), n.pop();
}
},
}),
(n.AnimationUtils = {
arraySlice: function (e, t, i) {
return n.AnimationUtils.isTypedArray(e) ? new e.constructor(e.subarray(t, i)) : e.slice(t, i);
},
convertArray: function (e, t, i) {
return !e || (!i && e.constructor === t) ? e : "number" == typeof t.BYTES_PER_ELEMENT ? new t(e) : Array.prototype.slice.call(e);
},
isTypedArray: function (e) {
return ArrayBuffer.isView(e) && !(e instanceof DataView);
},
getKeyframeOrder: function (e) {
function t(t, i) {
return e[t] - e[i];
}
for (var i = e.length, n = new Array(i), r = 0; r !== i; ++r) n[r] = r;
return n.sort(t), n;
},
sortedArray: function (e, t, i) {
for (var n = e.length, r = new e.constructor(n), o = 0, a = 0; a !== n; ++o)
for (var s = i[o] * t, l = 0; l !== t; ++l) r[a++] = e[s + l];
return r;
},
flattenJSON: function (e, t, i, n) {
for (var r = 1, o = e[0]; void 0 !== o && void 0 === o[n];) o = e[r++];
if (void 0 !== o) {
var a = o[n];
if (void 0 !== a)
if (Array.isArray(a)) {
do(a = o[n]), void 0 !== a && (t.push(o.time), i.push.apply(i, a)), (o = e[r++]);
while (void 0 !== o);
} else if (void 0 !== a.toArray) {
do(a = o[n]), void 0 !== a && (t.push(o.time), a.toArray(i, i.length)), (o = e[r++]);
while (void 0 !== o);
} else
do(a = o[n]), void 0 !== a && (t.push(o.time), i.push(a)), (o = e[r++]);
while (void 0 !== o);
}
},
}),
(n.KeyframeTrack = function (e, t, i, r) {
if (void 0 === e) throw new Error("track name is undefined");
if (void 0 === t || 0 === t.length) throw new Error("no keyframes in track named " + e);
(this.name = e),
(this.times = n.AnimationUtils.convertArray(t, this.TimeBufferType)),
(this.values = n.AnimationUtils.convertArray(i, this.ValueBufferType)),
this.setInterpolation(r || this.DefaultInterpolation),
this.validate(),
this.optimize();
}),
(n.KeyframeTrack.prototype = {
constructor: n.KeyframeTrack,
TimeBufferType: Float32Array,
ValueBufferType: Float32Array,
DefaultInterpolation: n.InterpolateLinear,
InterpolantFactoryMethodDiscrete: function (e) {
return new n.DiscreteInterpolant(this.times, this.values, this.getValueSize(), e);
},
InterpolantFactoryMethodLinear: function (e) {
return new n.LinearInterpolant(this.times, this.values, this.getValueSize(), e);
},
InterpolantFactoryMethodSmooth: function (e) {
return new n.CubicInterpolant(this.times, this.values, this.getValueSize(), e);
},
setInterpolation: function (e) {
var t;
switch (e) {
case n.InterpolateDiscrete:
t = this.InterpolantFactoryMethodDiscrete;
break;
case n.InterpolateLinear:
t = this.InterpolantFactoryMethodLinear;
break;
case n.InterpolateSmooth:
t = this.InterpolantFactoryMethodSmooth;
}
if (void 0 === t) {
var i = "unsupported interpolation for " + this.ValueTypeName + " keyframe track named " + this.name;
if (void 0 === this.createInterpolant) {
if (e === this.DefaultInterpolation) throw new Error(i);
this.setInterpolation(this.DefaultInterpolation);
}
return void console.warn(i);
}
this.createInterpolant = t;
},
getInterpolation: function () {
switch (this.createInterpolant) {
case this.InterpolantFactoryMethodDiscrete:
return n.InterpolateDiscrete;
case this.InterpolantFactoryMethodLinear:
return n.InterpolateLinear;
case this.InterpolantFactoryMethodSmooth:
return n.InterpolateSmooth;
}
},
getValueSize: function () {
return this.values.length / this.times.length;
},
shift: function (e) {
if (0 !== e)
for (var t = this.times, i = 0, n = t.length; i !== n; ++i) t[i] += e;
return this;
},
scale: function (e) {
if (1 !== e)
for (var t = this.times, i = 0, n = t.length; i !== n; ++i) t[i] *= e;
return this;
},
trim: function (e, t) {
for (var i = this.times, r = i.length, o = 0, a = r - 1; o !== r && i[o] < e;) ++o;
for (; - 1 !== a && i[a] > t;) --a;
if ((++a, 0 !== o || a !== r)) {
o >= a && ((a = Math.max(a, 1)), (o = a - 1));
var s = this.getValueSize();
(this.times = n.AnimationUtils.arraySlice(i, o, a)), (this.values = n.AnimationUtils.arraySlice(this.values, o * s, a * s));
}
return this;
},
validate: function () {
var e = !0,
t = this.getValueSize();
t - Math.floor(t) !== 0 && (console.error("invalid value size in track", this), (e = !1));
var i = this.times,
r = this.values,
o = i.length;
0 === o && (console.error("track is empty", this), (e = !1));
for (var a = null, s = 0; s !== o; s++) {
var l = i[s];
if ("number" == typeof l && isNaN(l)) {
console.error("time is not a valid number", this, s, l), (e = !1);
break;
}
if (null !== a && a > l) {
console.error("out of order keys", this, s, l, a), (e = !1);
break;
}
a = l;
}
if (void 0 !== r && n.AnimationUtils.isTypedArray(r))
for (var s = 0, c = r.length; s !== c; ++s) {
var u = r[s];
if (isNaN(u)) {
console.error("value is not a valid number", this, s, u), (e = !1);
break;
}
}
return e;
},
optimize: function () {
for (var e = this.times, t = this.values, i = this.getValueSize(), r = 1, o = 1, a = e.length - 1; a >= o; ++o) {
var s = !1,
l = e[o],
c = e[o + 1];
if (l !== c && (1 !== o || l !== l[0]))
for (var u = o * i, h = u - i, d = u + i, f = 0; f !== i; ++f) {
var p = t[u + f];
if (p !== t[h + f] || p !== t[d + f]) {
s = !0;
break;
}
}
if (s) {
if (o !== r) {
e[r] = e[o];
for (var m = o * i, v = r * i, f = 0; f !== i; ++f) t[v + f] = t[m + f];
}
++r;
}
}
return r !== e.length && ((this.times = n.AnimationUtils.arraySlice(e, 0, r)), (this.values = n.AnimationUtils.arraySlice(t, 0, r * i))), this;
},
}),
Object.assign(n.KeyframeTrack, {
parse: function (e) {
if (void 0 === e.type) throw new Error("track type undefined, can not parse");
var t = n.KeyframeTrack._getTrackTypeForValueTypeName(e.type);
if (void 0 === e.times) {
var i = [],
r = [];
n.AnimationUtils.flattenJSON(e.keys, i, r, "value"), (e.times = i), (e.values = r);
}
return void 0 !== t.parse ? t.parse(e) : new t(e.name, e.times, e.values, e.interpolation);
},
toJSON: function (e) {
var t,
i = e.constructor;
if (void 0 !== i.toJSON) t = i.toJSON(e);
else {
t = {
name: e.name,
times: n.AnimationUtils.convertArray(e.times, Array),
values: n.AnimationUtils.convertArray(e.values, Array)
};
var r = e.getInterpolation();
r !== e.DefaultInterpolation && (t.interpolation = r);
}
return (t.type = e.ValueTypeName), t;
},
_getTrackTypeForValueTypeName: function (e) {
switch (e.toLowerCase()) {
case "scalar":
case "double":
case "float":
case "number":
case "integer":
return n.NumberKeyframeTrack;
case "vector":
case "vector2":
case "vector3":
case "vector4":
return n.VectorKeyframeTrack;
case "color":
return n.ColorKeyframeTrack;
case "quaternion":
return n.QuaternionKeyframeTrack;
case "bool":
case "boolean":
return n.BooleanKeyframeTrack;
case "string":
return n.StringKeyframeTrack;
}
throw new Error("Unsupported typeName: " + e);
},
}),
(n.PropertyBinding = function (e, t, i) {
(this.path = t), (this.parsedPath = i || n.PropertyBinding.parseTrackName(t)), (this.node = n.PropertyBinding.findNode(e, this.parsedPath.nodeName) || e), (this.rootNode = e);
}),
(n.PropertyBinding.prototype = {
constructor: n.PropertyBinding,
getValue: function (e, t) {
this.bind(), this.getValue(e, t);
},
setValue: function (e, t) {
this.bind(), this.setValue(e, t);
},
bind: function () {
var e = this.node,
t = this.parsedPath,
i = t.objectName,
r = t.propertyName,
o = t.propertyIndex;
if ((e || ((e = n.PropertyBinding.findNode(this.rootNode, t.nodeName) || this.rootNode), (this.node = e)), (this.getValue = this._getValue_unavailable), (this.setValue = this._setValue_unavailable), !e))
return void console.error(" trying to update node for track: " + this.path + " but it wasn't found.");
if (i) {
var a = t.objectIndex;
switch (i) {
case "materials":
if (!e.material) return void console.error(" can not bind to material as node does not have a material", this);
if (!e.material.materials) return void console.error(" can not bind to material.materials as node.material does not have a materials array", this);
e = e.material.materials;
break;
case "bones":
if (!e.skeleton) return void console.error(" can not bind to bones as node does not have a skeleton", this);
e = e.skeleton.bones;
for (var s = 0; s < e.length; s++)
if (e[s].name === a) {
a = s;
break;
}
break;
default:
if (void 0 === e[i]) return void console.error(" can not bind to objectName of node, undefined", this);
e = e[i];
}
if (void 0 !== a) {
if (void 0 === e[a]) return void console.error(" trying to bind to objectIndex of objectName, but is undefined:", this, e);
e = e[a];
}
}
var l = e[r];
if (void 0 === l) {
var c = t.nodeName;
return void console.error(" trying to update property for track: " + c + "." + r + " but it wasn't found.", e);
}
var u = this.Versioning.None;
void 0 !== e.needsUpdate ? ((u = this.Versioning.NeedsUpdate), (this.targetObject = e)) : void 0 !== e.matrixWorldNeedsUpdate && ((u = this.Versioning.MatrixWorldNeedsUpdate), (this.targetObject = e));
var h = this.BindingType.Direct;
if (void 0 !== o) {
if ("morphTargetInfluences" === r) {
if (!e.geometry) return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry", this);
if (!e.geometry.morphTargets) return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets", this);
for (var s = 0; s < this.node.geometry.morphTargets.length; s++)
if (e.geometry.morphTargets[s].name === o) {
o = s;
break;
}
}
(h = this.BindingType.ArrayElement), (this.resolvedProperty = l), (this.propertyIndex = o);
} else
void 0 !== l.fromArray && void 0 !== l.toArray ?
((h = this.BindingType.HasFromToArray), (this.resolvedProperty = l)) :
void 0 !== l.length ?
((h = this.BindingType.EntireArray), (this.resolvedProperty = l)) :
(this.propertyName = r);
(this.getValue = this.GetterByBindingType[h]), (this.setValue = this.SetterByBindingTypeAndVersioning[h][u]);
},
unbind: function () {
(this.node = null), (this.getValue = this._getValue_unbound), (this.setValue = this._setValue_unbound);
},
}),
Object.assign(n.PropertyBinding.prototype, {
_getValue_unavailable: function () {},
_setValue_unavailable: function () {},
_getValue_unbound: n.PropertyBinding.prototype.getValue,
_setValue_unbound: n.PropertyBinding.prototype.setValue,
BindingType: {
Direct: 0,
EntireArray: 1,
ArrayElement: 2,
HasFromToArray: 3
},
Versioning: {
None: 0,
NeedsUpdate: 1,
MatrixWorldNeedsUpdate: 2
},
GetterByBindingType: [
function (e, t) {
e[t] = this.node[this.propertyName];
},
function (e, t) {
for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) e[t++] = i[n];
},
function (e, t) {
e[t] = this.resolvedProperty[this.propertyIndex];
},
function (e, t) {
this.resolvedProperty.toArray(e, t);
},
],
SetterByBindingTypeAndVersioning: [
[
function (e, t) {
this.node[this.propertyName] = e[t];
},
function (e, t) {
(this.node[this.propertyName] = e[t]), (this.targetObject.needsUpdate = !0);
},
function (e, t) {
(this.node[this.propertyName] = e[t]), (this.targetObject.matrixWorldNeedsUpdate = !0);
},
],
[
function (e, t) {
for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++];
},
function (e, t) {
for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++];
this.targetObject.needsUpdate = !0;
},
function (e, t) {
for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++];
this.targetObject.matrixWorldNeedsUpdate = !0;
},
],
[
function (e, t) {
this.resolvedProperty[this.propertyIndex] = e[t];
},
function (e, t) {
(this.resolvedProperty[this.propertyIndex] = e[t]), (this.targetObject.needsUpdate = !0);
},
function (e, t) {
(this.resolvedProperty[this.propertyIndex] = e[t]), (this.targetObject.matrixWorldNeedsUpdate = !0);
},
],
[
function (e, t) {
this.resolvedProperty.fromArray(e, t);
},
function (e, t) {
this.resolvedProperty.fromArray(e, t), (this.targetObject.needsUpdate = !0);
},
function (e, t) {
this.resolvedProperty.fromArray(e, t), (this.targetObject.matrixWorldNeedsUpdate = !0);
},
],
],
}),
(n.PropertyBinding.Composite = function (e, t, i) {
var r = i || n.PropertyBinding.parseTrackName(t);
(this._targetGroup = e), (this._bindings = e.subscribe_(t, r));
}),
(n.PropertyBinding.Composite.prototype = {
constructor: n.PropertyBinding.Composite,
getValue: function (e, t) {
this.bind();
var i = this._targetGroup.nCachedObjects_,
n = this._bindings[i];
void 0 !== n && n.getValue(e, t);
},
setValue: function (e, t) {
for (var i = this._bindings, n = this._targetGroup.nCachedObjects_, r = i.length; n !== r; ++n) i[n].setValue(e, t);
},
bind: function () {
for (var e = this._bindings, t = this._targetGroup.nCachedObjects_, i = e.length; t !== i; ++t) e[t].bind();
},
unbind: function () {
for (var e = this._bindings, t = this._targetGroup.nCachedObjects_, i = e.length; t !== i; ++t) e[t].unbind();
},
}),
(n.PropertyBinding.create = function (e, t, i) {
return e instanceof n.AnimationObjectGroup ? new n.PropertyBinding.Composite(e, t, i) : new n.PropertyBinding(e, t, i);
}),
(n.PropertyBinding.parseTrackName = function (e) {
var t = /^(([w]+/)*)([w-d]+)?(.([w]+)([([wd[]_.:- ]+)])?)?(.([w.]+)([([wd[]_. ]+)])?)$/,
i = t.exec(e);
if (!i) throw new Error("cannot parse trackName at all: " + e);
i.index === t.lastIndex && t.lastIndex++;
var n = {
nodeName: i[3],
objectName: i[5],
objectIndex: i[7],
propertyName: i[9],
propertyIndex: i[11]
};
if (null === n.propertyName || 0 === n.propertyName.length) throw new Error("can not parse propertyName from trackName: " + e);
return n;
}),
(n.PropertyBinding.findNode = function (e, t) {
if (!t || "" === t || "root" === t || "." === t || -1 === t || t === e.name || t === e.uuid) return e;
if (e.skeleton) {
var i = function (e) {
for (var i = 0; i < e.bones.length; i++) {
var n = e.bones[i];
if (n.name === t) return n;
}
return null;
},
n = i(e.skeleton);
if (n) return n;
}
if (e.children) {
var r = function (e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
if (n.name === t || n.uuid === t) return n;
var o = r(n.children);
if (o) return o;
}
return null;
},
o = r(e.children);
if (o) return o;
}
return null;
}),
(n.PropertyMixer = function (e, t, i) {
(this.binding = e), (this.valueSize = i);
var n,
r = Float64Array;
switch (t) {
case "quaternion":
n = this._slerp;
break;
case "string":
case "bool":
(r = Array), (n = this._select);
break;
default:
n = this._lerp;
}
(this.buffer = new r(4 * i)), (this._mixBufferRegion = n), (this.cumulativeWeight = 0), (this.useCount = 0), (this.referenceCount = 0);
}),
(n.PropertyMixer.prototype = {
constructor: n.PropertyMixer,
accumulate: function (e, t) {
var i = this.buffer,
n = this.valueSize,
r = e * n + n,
o = this.cumulativeWeight;
if (0 === o) {
for (var a = 0; a !== n; ++a) i[r + a] = i[a];
o = t;
} else {
o += t;
var s = t / o;
this._mixBufferRegion(i, r, 0, s, n);
}
this.cumulativeWeight = o;
},
apply: function (e) {
var t = this.valueSize,
i = this.buffer,
n = e * t + t,
r = this.cumulativeWeight,
o = this.binding;
if (((this.cumulativeWeight = 0), 1 > r)) {
var a = 3 * t;
this._mixBufferRegion(i, n, a, 1 - r, t);
}
for (var s = t, l = t + t; s !== l; ++s)
if (i[s] !== i[s + t]) {
o.setValue(i, n);
break;
}
},
saveOriginalState: function () {
var e = this.binding,
t = this.buffer,
i = this.valueSize,
n = 3 * i;
e.getValue(t, n);
for (var r = i, o = n; r !== o; ++r) t[r] = t[n + (r % i)];
this.cumulativeWeight = 0;
},
restoreOriginalState: function () {
var e = 3 * this.valueSize;
this.binding.setValue(this.buffer, e);
},
_select: function (e, t, i, n, r) {
if (n >= 0.5)
for (var o = 0; o !== r; ++o) e[t + o] = e[i + o];
},
_slerp: function (e, t, i, r, o) {
n.Quaternion.slerpFlat(e, t, e, t, e, i, r);
},
_lerp: function (e, t, i, n, r) {
for (var o = 1 - n, a = 0; a !== r; ++a) {
var s = t + a;
e[s] = e[s] * o + e[i + a] * n;
}
},
}),
(n.BooleanKeyframeTrack = function (e, t, i) {
n.KeyframeTrack.call(this, e, t, i);
}),
(n.BooleanKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), {
constructor: n.BooleanKeyframeTrack,
ValueTypeName: "bool",
ValueBufferType: Array,
DefaultInterpolation: n.InterpolateDiscrete,
InterpolantFactoryMethodLinear: void 0,
InterpolantFactoryMethodSmooth: void 0,
})),
(n.ColorKeyframeTrack = function (e, t, i, r) {
n.KeyframeTrack.call(this, e, t, i, r);
}),
(n.ColorKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), {
constructor: n.ColorKeyframeTrack,
ValueTypeName: "color"
})),
(n.NumberKeyframeTrack = function (e, t, i, r) {
n.KeyframeTrack.call(this, e, t, i, r);
}),
(n.NumberKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), {
constructor: n.NumberKeyframeTrack,
ValueTypeName: "number"
})),
(n.QuaternionKeyframeTrack = function (e, t, i, r) {
n.KeyframeTrack.call(this, e, t, i, r);
}),
(n.QuaternionKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), {
constructor: n.QuaternionKeyframeTrack,
ValueTypeName: "quaternion",
DefaultInterpolation: n.InterpolateLinear,
InterpolantFactoryMethodLinear: function (e) {
return new n.QuaternionLinearInterpolant(this.times, this.values, this.getValueSize(), e);
},
InterpolantFactoryMethodSmooth: void 0,
})),
(n.StringKeyframeTrack = function (e, t, i, r) {
n.KeyframeTrack.call(this, e, t, i, r);
}),
(n.StringKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), {
constructor: n.StringKeyframeTrack,
ValueTypeName: "string",
ValueBufferType: Array,
DefaultInterpolation: n.InterpolateDiscrete,
InterpolantFactoryMethodLinear: void 0,
InterpolantFactoryMethodSmooth: void 0,
})),
(n.VectorKeyframeTrack = function (e, t, i, r) {
n.KeyframeTrack.call(this, e, t, i, r);
}),
(n.VectorKeyframeTrack.prototype = Object.assign(Object.create(n.KeyframeTrack.prototype), {
constructor: n.VectorKeyframeTrack,
ValueTypeName: "vector"
})),
(n.Audio = function (e) {
n.Object3D.call(this),
(this.type = "Audio"),
(this.context = e.context),
(this.source = this.context.createBufferSource()),
(this.source.onended = this.onEnded.bind(this)),
(this.gain = this.context.createGain()),
this.gain.connect(e.getInput()),
(this.autoplay = !1),
(this.startTime = 0),
(this.playbackRate = 1),
(this.isPlaying = !1),
(this.hasPlaybackControl = !0),
(this.sourceType = "empty"),
(this.filters = []);
}),
(n.Audio.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.Audio,
getOutput: function () {
return this.gain;
},
setNodeSource: function (e) {
return (this.hasPlaybackControl = !1), (this.sourceType = "audioNode"), (this.source = e), this.connect(), this;
},
setBuffer: function (e) {
return (this.source.buffer = e), (this.sourceType = "buffer"), this.autoplay && this.play(), this;
},
play: function () {
if (this.isPlaying === !0) return void console.warn("THREE.Audio: Audio is already playing.");
if (this.hasPlaybackControl === !1) return void console.warn("THREE.Audio: this Audio has no playback control.");
var e = this.context.createBufferSource();
return (
(e.buffer = this.source.buffer),
(e.loop = this.source.loop),
(e.onended = this.source.onended),
e.start(0, this.startTime),
(e.playbackRate.value = this.playbackRate),
(this.isPlaying = !0),
(this.source = e),
this.connect()
);
},
pause: function () {
return this.hasPlaybackControl === !1 ? void console.warn("THREE.Audio: this Audio has no playback control.") : (this.source.stop(), (this.startTime = this.context.currentTime), (this.isPlaying = !1), this);
},
stop: function () {
return this.hasPlaybackControl === !1 ? void console.warn("THREE.Audio: this Audio has no playback control.") : (this.source.stop(), (this.startTime = 0), (this.isPlaying = !1), this);
},
connect: function () {
if (this.filters.length > 0) {
this.source.connect(this.filters[0]);
for (var e = 1, t = this.filters.length; t > e; e++) this.filters[e - 1].connect(this.filters[e]);
this.filters[this.filters.length - 1].connect(this.getOutput());
} else this.source.connect(this.getOutput());
return this;
},
disconnect: function () {
if (this.filters.length > 0) {
this.source.disconnect(this.filters[0]);
for (var e = 1, t = this.filters.length; t > e; e++) this.filters[e - 1].disconnect(this.filters[e]);
this.filters[this.filters.length - 1].disconnect(this.getOutput());
} else this.source.disconnect(this.getOutput());
return this;
},
getFilters: function () {
return this.filters;
},
setFilters: function (e) {
return e || (e = []), this.isPlaying === !0 ? (this.disconnect(), (this.filters = e), this.connect()) : (this.filters = e), this;
},
getFilter: function () {
return this.getFilters()[0];
},
setFilter: function (e) {
return this.setFilters(e ? [e] : []);
},
setPlaybackRate: function (e) {
return this.hasPlaybackControl === !1 ?
void console.warn("THREE.Audio: this Audio has no playback control.") :
((this.playbackRate = e), this.isPlaying === !0 && (this.source.playbackRate.value = this.playbackRate), this);
},
getPlaybackRate: function () {
return this.playbackRate;
},
onEnded: function () {
this.isPlaying = !1;
},
getLoop: function () {
return this.hasPlaybackControl === !1 ? (console.warn("THREE.Audio: this Audio has no playback control."), !1) : this.source.loop;
},
setLoop: function (e) {
return this.hasPlaybackControl === !1 ? void console.warn("THREE.Audio: this Audio has no playback control.") : void(this.source.loop = e);
},
getVolume: function () {
return this.gain.gain.value;
},
setVolume: function (e) {
return (this.gain.gain.value = e), this;
},
})),
(n.AudioAnalyser = function (e, t) {
(this.analyser = e.context.createAnalyser()), (this.analyser.fftSize = void 0 !== t ? t : 2048), (this.data = new Uint8Array(this.analyser.frequencyBinCount)), e.getOutput().connect(this.analyser);
}),
Object.assign(n.AudioAnalyser.prototype, {
getFrequencyData: function () {
return this.analyser.getByteFrequencyData(this.data), this.data;
},
getAverageFrequency: function () {
for (var e = 0, t = this.getFrequencyData(), i = 0; i < t.length; i++) e += t[i];
return e / t.length;
},
}),
Object.defineProperty(n, "AudioContext", {
get: (function () {
var e;
return function () {
return void 0 === e && (e = new(window.AudioContext || window.webkitAudioContext)()), e;
};
})(),
}),
(n.PositionalAudio = function (e) {
n.Audio.call(this, e), (this.panner = this.context.createPanner()), this.panner.connect(this.gain);
}),
(n.PositionalAudio.prototype = Object.assign(Object.create(n.Audio.prototype), {
constructor: n.PositionalAudio,
getOutput: function () {
return this.panner;
},
getRefDistance: function () {
return this.panner.refDistance;
},
setRefDistance: function (e) {
this.panner.refDistance = e;
},
getRolloffFactor: function () {
return this.panner.rolloffFactor;
},
setRolloffFactor: function (e) {
this.panner.rolloffFactor = e;
},
getDistanceModel: function () {
return this.panner.distanceModel;
},
setDistanceModel: function (e) {
this.panner.distanceModel = e;
},
getMaxDistance: function () {
return this.panner.maxDistance;
},
setMaxDistance: function (e) {
this.panner.maxDistance = e;
},
updateMatrixWorld: (function () {
var e = new n.Vector3();
return function (t) {
n.Object3D.prototype.updateMatrixWorld.call(this, t), e.setFromMatrixPosition(this.matrixWorld), this.panner.setPosition(e.x, e.y, e.z);
};
})(),
})),
(n.AudioListener = function () {
n.Object3D.call(this), (this.type = "AudioListener"), (this.context = n.AudioContext), (this.gain = this.context.createGain()), this.gain.connect(this.context.destination), (this.filter = null);
}),
(n.AudioListener.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.AudioListener,
getInput: function () {
return this.gain;
},
removeFilter: function () {
null !== this.filter && (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination), this.gain.connect(this.context.destination), (this.filter = null));
},
getFilter: function () {
return this.filter;
},
setFilter: function (e) {
null !== this.filter ? (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination)) : this.gain.disconnect(this.context.destination),
(this.filter = e),
this.gain.connect(this.filter),
this.filter.connect(this.context.destination);
},
getMasterVolume: function () {
return this.gain.gain.value;
},
setMasterVolume: function (e) {
this.gain.gain.value = e;
},
updateMatrixWorld: (function () {
var e = new n.Vector3(),
t = new n.Quaternion(),
i = new n.Vector3(),
r = new n.Vector3();
return function (o) {
n.Object3D.prototype.updateMatrixWorld.call(this, o);
var a = this.context.listener,
s = this.up;
this.matrixWorld.decompose(e, t, i), r.set(0, 0, -1).applyQuaternion(t), a.setPosition(e.x, e.y, e.z), a.setOrientation(r.x, r.y, r.z, s.x, s.y, s.z);
};
})(),
})),
(n.Camera = function () {
n.Object3D.call(this), (this.type = "Camera"), (this.matrixWorldInverse = new n.Matrix4()), (this.projectionMatrix = new n.Matrix4());
}),
(n.Camera.prototype = Object.create(n.Object3D.prototype)),
(n.Camera.prototype.constructor = n.Camera),
(n.Camera.prototype.getWorldDirection = (function () {
var e = new n.Quaternion();
return function (t) {
var i = t || new n.Vector3();
return this.getWorldQuaternion(e), i.set(0, 0, -1).applyQuaternion(e);
};
})()),
(n.Camera.prototype.lookAt = (function () {
var e = new n.Matrix4();
return function (t) {
e.lookAt(this.position, t, this.up), this.quaternion.setFromRotationMatrix(e);
};
})()),
(n.Camera.prototype.clone = function () {
return new this.constructor().copy(this);
}),
(n.Camera.prototype.copy = function (e) {
return n.Object3D.prototype.copy.call(this, e), this.matrixWorldInverse.copy(e.matrixWorldInverse), this.projectionMatrix.copy(e.projectionMatrix), this;
}),
(n.CubeCamera = function (e, t, i) {
n.Object3D.call(this), (this.type = "CubeCamera");
var r = 90,
o = 1,
a = new n.PerspectiveCamera(r, o, e, t);
a.up.set(0, -1, 0), a.lookAt(new n.Vector3(1, 0, 0)), this.add(a);
var s = new n.PerspectiveCamera(r, o, e, t);
s.up.set(0, -1, 0), s.lookAt(new n.Vector3(-1, 0, 0)), this.add(s);
var l = new n.PerspectiveCamera(r, o, e, t);
l.up.set(0, 0, 1), l.lookAt(new n.Vector3(0, 1, 0)), this.add(l);
var c = new n.PerspectiveCamera(r, o, e, t);
c.up.set(0, 0, -1), c.lookAt(new n.Vector3(0, -1, 0)), this.add(c);
var u = new n.PerspectiveCamera(r, o, e, t);
u.up.set(0, -1, 0), u.lookAt(new n.Vector3(0, 0, 1)), this.add(u);
var h = new n.PerspectiveCamera(r, o, e, t);
h.up.set(0, -1, 0), h.lookAt(new n.Vector3(0, 0, -1)), this.add(h);
var d = {
format: n.RGBFormat,
magFilter: n.LinearFilter,
minFilter: n.LinearFilter
};
(this.renderTarget = new n.WebGLRenderTargetCube(i, i, d)),
(this.updateCubeMap = function (e, t) {
null === this.parent && this.updateMatrixWorld();
var i = this.renderTarget,
n = i.texture.generateMipmaps;
(i.texture.generateMipmaps = !1),
(i.activeCubeFace = 0),
e.render(t, a, i),
(i.activeCubeFace = 1),
e.render(t, s, i),
(i.activeCubeFace = 2),
e.render(t, l, i),
(i.activeCubeFace = 3),
e.render(t, c, i),
(i.activeCubeFace = 4),
e.render(t, u, i),
(i.texture.generateMipmaps = n),
(i.activeCubeFace = 5),
e.render(t, h, i),
e.setRenderTarget(null);
});
}),
(n.CubeCamera.prototype = Object.create(n.Object3D.prototype)),
(n.CubeCamera.prototype.constructor = n.CubeCamera),
(n.OrthographicCamera = function (e, t, i, r, o, a) {
n.Camera.call(this),
(this.type = "OrthographicCamera"),
(this.zoom = 1),
(this.view = null),
(this.left = e),
(this.right = t),
(this.top = i),
(this.bottom = r),
(this.near = void 0 !== o ? o : 0.1),
(this.far = void 0 !== a ? a : 2e3),
this.updateProjectionMatrix();
}),
(n.OrthographicCamera.prototype = Object.assign(Object.create(n.Camera.prototype), {
constructor: n.OrthographicCamera,
copy: function (e) {
return (
n.Camera.prototype.copy.call(this, e),
(this.left = e.left),
(this.right = e.right),
(this.top = e.top),
(this.bottom = e.bottom),
(this.near = e.near),
(this.far = e.far),
(this.zoom = e.zoom),
(this.view = null === e.view ? null : Object.assign({}, e.view)),
this
);
},
setViewOffset: function (e, t, i, n, r, o) {
(this.view = {
fullWidth: e,
fullHeight: t,
offsetX: i,
offsetY: n,
width: r,
height: o
}), this.updateProjectionMatrix();
},
clearViewOffset: function () {
(this.view = null), this.updateProjectionMatrix();
},
updateProjectionMatrix: function () {
var e = (this.right - this.left) / (2 * this.zoom),
t = (this.top - this.bottom) / (2 * this.zoom),
i = (this.right + this.left) / 2,
n = (this.top + this.bottom) / 2,
r = i - e,
o = i + e,
a = n + t,
s = n - t;
if (null !== this.view) {
var l = this.zoom / (this.view.width / this.view.fullWidth),
c = this.zoom / (this.view.height / this.view.fullHeight),
u = (this.right - this.left) / this.view.width,
h = (this.top - this.bottom) / this.view.height;
(r += u * (this.view.offsetX / l)), (o = r + u * (this.view.width / l)), (a -= h * (this.view.offsetY / c)), (s = a - h * (this.view.height / c));
}
this.projectionMatrix.makeOrthographic(r, o, a, s, this.near, this.far);
},
toJSON: function (e) {
var t = n.Object3D.prototype.toJSON.call(this, e);
return (
(t.object.zoom = this.zoom),
(t.object.left = this.left),
(t.object.right = this.right),
(t.object.top = this.top),
(t.object.bottom = this.bottom),
(t.object.near = this.near),
(t.object.far = this.far),
null !== this.view && (t.object.view = Object.assign({}, this.view)),
t
);
},
})),
(n.PerspectiveCamera = function (e, t, i, r) {
n.Camera.call(this),
(this.type = "PerspectiveCamera"),
(this.fov = void 0 !== e ? e : 50),
(this.zoom = 1),
(this.near = void 0 !== i ? i : 0.1),
(this.far = void 0 !== r ? r : 2e3),
(this.focus = 10),
(this.aspect = void 0 !== t ? t : 1),
(this.view = null),
(this.filmGauge = 35),
(this.filmOffset = 0),
this.updateProjectionMatrix();
}),
(n.PerspectiveCamera.prototype = Object.assign(Object.create(n.Camera.prototype), {
constructor: n.PerspectiveCamera,
copy: function (e) {
return (
n.Camera.prototype.copy.call(this, e),
(this.fov = e.fov),
(this.zoom = e.zoom),
(this.near = e.near),
(this.far = e.far),
(this.focus = e.focus),
(this.aspect = e.aspect),
(this.view = null === e.view ? null : Object.assign({}, e.view)),
(this.filmGauge = e.filmGauge),
(this.filmOffset = e.filmOffset),
this
);
},
setFocalLength: function (e) {
var t = (0.5 * this.getFilmHeight()) / e;
(this.fov = 2 * n.Math.RAD2DEG * Math.atan(t)), this.updateProjectionMatrix();
},
getFocalLength: function () {
var e = Math.tan(0.5 * n.Math.DEG2RAD * this.fov);
return (0.5 * this.getFilmHeight()) / e;
},
getEffectiveFOV: function () {
return 2 * n.Math.RAD2DEG * Math.atan(Math.tan(0.5 * n.Math.DEG2RAD * this.fov) / this.zoom);
},
getFilmWidth: function () {
return this.filmGauge * Math.min(this.aspect, 1);
},
getFilmHeight: function () {
return this.filmGauge / Math.max(this.aspect, 1);
},
setViewOffset: function (e, t, i, n, r, o) {
(this.aspect = e / t), (this.view = {
fullWidth: e,
fullHeight: t,
offsetX: i,
offsetY: n,
width: r,
height: o
}), this.updateProjectionMatrix();
},
clearViewOffset: function () {
(this.view = null), this.updateProjectionMatrix();
},
updateProjectionMatrix: function () {
var e = this.near,
t = (e * Math.tan(0.5 * n.Math.DEG2RAD * this.fov)) / this.zoom,
i = 2 * t,
r = this.aspect * i,
o = -0.5 * r,
a = this.view;
if (null !== a) {
var s = a.fullWidth,
l = a.fullHeight;
(o += (a.offsetX * r) / s), (t -= (a.offsetY * i) / l), (r *= a.width / s), (i *= a.height / l);
}
var c = this.filmOffset;
0 !== c && (o += (e * c) / this.getFilmWidth()), this.projectionMatrix.makeFrustum(o, o + r, t - i, t, e, this.far);
},
toJSON: function (e) {
var t = n.Object3D.prototype.toJSON.call(this, e);
return (
(t.object.fov = this.fov),
(t.object.zoom = this.zoom),
(t.object.near = this.near),
(t.object.far = this.far),
(t.object.focus = this.focus),
(t.object.aspect = this.aspect),
null !== this.view && (t.object.view = Object.assign({}, this.view)),
(t.object.filmGauge = this.filmGauge),
(t.object.filmOffset = this.filmOffset),
t
);
},
})),
(n.StereoCamera = function () {
(this.type = "StereoCamera"),
(this.aspect = 1),
(this.cameraL = new n.PerspectiveCamera()),
this.cameraL.layers.enable(1),
(this.cameraL.matrixAutoUpdate = !1),
(this.cameraR = new n.PerspectiveCamera()),
this.cameraR.layers.enable(2),
(this.cameraR.matrixAutoUpdate = !1);
}),
Object.assign(n.StereoCamera.prototype, {
update: (function () {
var e,
t,
i,
r,
o,
a = new n.Matrix4(),
s = new n.Matrix4();
return function (l) {
var c = e !== l.focus || t !== l.fov || i !== l.aspect * this.aspect || r !== l.near || o !== l.far;
if (c) {
(e = l.focus), (t = l.fov), (i = l.aspect * this.aspect), (r = l.near), (o = l.far);
var u,
h,
d = l.projectionMatrix.clone(),
f = 0.032,
p = (f * r) / e,
m = r * Math.tan(n.Math.DEG2RAD * t * 0.5);
(s.elements[12] = -f),
(a.elements[12] = f),
(u = -m * i + p),
(h = m * i + p),
(d.elements[0] = (2 * r) / (h - u)),
(d.elements[8] = (h + u) / (h - u)),
this.cameraL.projectionMatrix.copy(d),
(u = -m * i - p),
(h = m * i - p),
(d.elements[0] = (2 * r) / (h - u)),
(d.elements[8] = (h + u) / (h - u)),
this.cameraR.projectionMatrix.copy(d);
}
this.cameraL.matrixWorld.copy(l.matrixWorld).multiply(s), this.cameraR.matrixWorld.copy(l.matrixWorld).multiply(a);
};
})(),
}),
(n.Light = function (e, t) {
n.Object3D.call(this), (this.type = "Light"), (this.color = new n.Color(e)), (this.intensity = void 0 !== t ? t : 1), (this.receiveShadow = void 0);
}),
(n.Light.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.Light,
copy: function (e) {
return n.Object3D.prototype.copy.call(this, e), this.color.copy(e.color), (this.intensity = e.intensity), this;
},
toJSON: function (e) {
var t = n.Object3D.prototype.toJSON.call(this, e);
return (
(t.object.color = this.color.getHex()),
(t.object.intensity = this.intensity),
void 0 !== this.groundColor && (t.object.groundColor = this.groundColor.getHex()),
void 0 !== this.distance && (t.object.distance = this.distance),
void 0 !== this.angle && (t.object.angle = this.angle),
void 0 !== this.decay && (t.object.decay = this.decay),
void 0 !== this.penumbra && (t.object.penumbra = this.penumbra),
t
);
},
})),
(n.LightShadow = function (e) {
(this.camera = e), (this.bias = 0), (this.radius = 1), (this.mapSize = new n.Vector2(512, 512)), (this.map = null), (this.matrix = new n.Matrix4());
}),
Object.assign(n.LightShadow.prototype, {
copy: function (e) {
return (this.camera = e.camera.clone()), (this.bias = e.bias), (this.radius = e.radius), this.mapSize.copy(e.mapSize), this;
},
clone: function () {
return new this.constructor().copy(this);
},
}),
(n.AmbientLight = function (e, t) {
n.Light.call(this, e, t), (this.type = "AmbientLight"), (this.castShadow = void 0);
}),
(n.AmbientLight.prototype = Object.assign(Object.create(n.Light.prototype), {
constructor: n.AmbientLight
})),
(n.DirectionalLight = function (e, t) {
n.Light.call(this, e, t), (this.type = "DirectionalLight"), this.position.copy(n.Object3D.DefaultUp), this.updateMatrix(), (this.target = new n.Object3D()), (this.shadow = new n.DirectionalLightShadow());
}),
(n.DirectionalLight.prototype = Object.assign(Object.create(n.Light.prototype), {
constructor: n.DirectionalLight,
copy: function (e) {
return n.Light.prototype.copy.call(this, e), (this.target = e.target.clone()), (this.shadow = e.shadow.clone()), this;
},
})),
(n.DirectionalLightShadow = function (e) {
n.LightShadow.call(this, new n.OrthographicCamera(-5, 5, 5, -5, 0.5, 500));
}),
(n.DirectionalLightShadow.prototype = Object.assign(Object.create(n.LightShadow.prototype), {
constructor: n.DirectionalLightShadow
})),
(n.HemisphereLight = function (e, t, i) {
n.Light.call(this, e, i), (this.type = "HemisphereLight"), (this.castShadow = void 0), this.position.copy(n.Object3D.DefaultUp), this.updateMatrix(), (this.groundColor = new n.Color(t));
}),
(n.HemisphereLight.prototype = Object.assign(Object.create(n.Light.prototype), {
constructor: n.HemisphereLight,
copy: function (e) {
return n.Light.prototype.copy.call(this, e), this.groundColor.copy(e.groundColor), this;
},
})),
(n.PointLight = function (e, t, i, r) {
n.Light.call(this, e, t),
(this.type = "PointLight"),
Object.defineProperty(this, "power", {
get: function () {
return 4 * this.intensity * Math.PI;
},
set: function (e) {
this.intensity = e / (4 * Math.PI);
},
}),
(this.distance = void 0 !== i ? i : 0),
(this.decay = void 0 !== r ? r : 1),
(this.shadow = new n.LightShadow(new n.PerspectiveCamera(90, 1, 0.5, 500)));
}),
(n.PointLight.prototype = Object.assign(Object.create(n.Light.prototype), {
constructor: n.PointLight,
copy: function (e) {
return n.Light.prototype.copy.call(this, e), (this.distance = e.distance), (this.decay = e.decay), (this.shadow = e.shadow.clone()), this;
},
})),
(n.SpotLight = function (e, t, i, r, o, a) {
n.Light.call(this, e, t),
(this.type = "SpotLight"),
this.position.copy(n.Object3D.DefaultUp),
this.updateMatrix(),
(this.target = new n.Object3D()),
Object.defineProperty(this, "power", {
get: function () {
return this.intensity * Math.PI;
},
set: function (e) {
this.intensity = e / Math.PI;
},
}),
(this.distance = void 0 !== i ? i : 0),
(this.angle = void 0 !== r ? r : Math.PI / 3),
(this.penumbra = void 0 !== o ? o : 0),
(this.decay = void 0 !== a ? a : 1),
(this.shadow = new n.SpotLightShadow());
}),
(n.SpotLight.prototype = Object.assign(Object.create(n.Light.prototype), {
constructor: n.SpotLight,
copy: function (e) {
return (
n.Light.prototype.copy.call(this, e),
(this.distance = e.distance),
(this.angle = e.angle),
(this.penumbra = e.penumbra),
(this.decay = e.decay),
(this.target = e.target.clone()),
(this.shadow = e.shadow.clone()),
this
);
},
})),
(n.SpotLightShadow = function () {
n.LightShadow.call(this, new n.PerspectiveCamera(50, 1, 0.5, 500));
}),
(n.SpotLightShadow.prototype = Object.assign(Object.create(n.LightShadow.prototype), {
constructor: n.SpotLightShadow,
update: function (e) {
var t = 2 * n.Math.RAD2DEG * e.angle,
i = this.mapSize.width / this.mapSize.height,
r = e.distance || 500,
o = this.camera;
(t !== o.fov || i !== o.aspect || r !== o.far) && ((o.fov = t), (o.aspect = i), (o.far = r), o.updateProjectionMatrix());
},
})),
(n.AudioLoader = function (e) {
this.manager = void 0 !== e ? e : n.DefaultLoadingManager;
}),
Object.assign(n.AudioLoader.prototype, {
load: function (e, t, i, r) {
var o = new n.XHRLoader(this.manager);
o.setResponseType("arraybuffer"),
o.load(
e,
function (e) {
var i = n.AudioContext;
i.decodeAudioData(e, function (e) {
t(e);
});
},
i,
r
);
},
}),
(n.Cache = {
enabled: !1,
files: {},
add: function (e, t) {
this.enabled !== !1 && (this.files[e] = t);
},
get: function (e) {
return this.enabled !== !1 ? this.files[e] : void 0;
},
remove: function (e) {
delete this.files[e];
},
clear: function () {
this.files = {};
},
}),
(n.Loader = function () {
(this.onLoadStart = function () {}), (this.onLoadProgress = function () {}), (this.onLoadComplete = function () {});
}),
(n.Loader.prototype = {
constructor: n.Loader,
crossOrigin: void 0,
extractUrlBase: function (e) {
var t = e.split("/");
return 1 === t.length ? "./" : (t.pop(), t.join("/") + "/");
},
initMaterials: function (e, t, i) {
for (var n = [], r = 0; r < e.length; ++r) n[r] = this.createMaterial(e[r], t, i);
return n;
},
createMaterial: (function () {
var e, t, i;
return function (r, o, a) {
function s(e, i, r, s, c) {
var u,
h = o + e,
d = n.Loader.Handlers.get(h);
null !== d ? (u = d.load(h)) : (t.setCrossOrigin(a), (u = t.load(h))),
void 0 !== i && (u.repeat.fromArray(i), 1 !== i[0] && (u.wrapS = n.RepeatWrapping), 1 !== i[1] && (u.wrapT = n.RepeatWrapping)),
void 0 !== r && u.offset.fromArray(r),
void 0 !== s &&
("repeat" === s[0] && (u.wrapS = n.RepeatWrapping),
"mirror" === s[0] && (u.wrapS = n.MirroredRepeatWrapping),
"repeat" === s[1] && (u.wrapT = n.RepeatWrapping),
"mirror" === s[1] && (u.wrapT = n.MirroredRepeatWrapping)),
void 0 !== c && (u.anisotropy = c);
var f = n.Math.generateUUID();
return (l[f] = u), f;
}
void 0 === e && (e = new n.Color()), void 0 === t && (t = new n.TextureLoader()), void 0 === i && (i = new n.MaterialLoader());
var l = {},
c = {
uuid: n.Math.generateUUID(),
type: "MeshLambertMaterial"
};
for (var u in r) {
var h = r[u];
switch (u) {
case "DbgColor":
case "DbgIndex":
case "opticalDensity":
case "illumination":
break;
case "DbgName":
c.name = h;
break;
case "blending":
c.blending = n[h];
break;
case "colorAmbient":
case "mapAmbient":
console.warn("THREE.Loader.createMaterial:", u, "is no longer supported.");
break;
case "colorDiffuse":
c.color = e.fromArray(h).getHex();
break;
case "colorSpecular":
c.specular = e.fromArray(h).getHex();
break;
case "colorEmissive":
c.emissive = e.fromArray(h).getHex();
break;
case "specularCoef":
c.shininess = h;
break;
case "shading":
"basic" === h.toLowerCase() && (c.type = "MeshBasicMaterial"), "phong" === h.toLowerCase() && (c.type = "MeshPhongMaterial"), "standard" === h.toLowerCase() && (c.type = "MeshStandardMaterial");
break;
case "mapDiffuse":
c.map = s(h, r.mapDiffuseRepeat, r.mapDiffuseOffset, r.mapDiffuseWrap, r.mapDiffuseAnisotropy);
break;
case "mapDiffuseRepeat":
case "mapDiffuseOffset":
case "mapDiffuseWrap":
case "mapDiffuseAnisotropy":
break;
case "mapEmissive":
c.emissiveMap = s(h, r.mapEmissiveRepeat, r.mapEmissiveOffset, r.mapEmissiveWrap, r.mapEmissiveAnisotropy);
break;
case "mapEmissiveRepeat":
case "mapEmissiveOffset":
case "mapEmissiveWrap":
case "mapEmissiveAnisotropy":
break;
case "mapLight":
c.lightMap = s(h, r.mapLightRepeat, r.mapLightOffset, r.mapLightWrap, r.mapLightAnisotropy);
break;
case "mapLightRepeat":
case "mapLightOffset":
case "mapLightWrap":
case "mapLightAnisotropy":
break;
case "mapAO":
c.aoMap = s(h, r.mapAORepeat, r.mapAOOffset, r.mapAOWrap, r.mapAOAnisotropy);
break;
case "mapAORepeat":
case "mapAOOffset":
case "mapAOWrap":
case "mapAOAnisotropy":
break;
case "mapBump":
c.bumpMap = s(h, r.mapBumpRepeat, r.mapBumpOffset, r.mapBumpWrap, r.mapBumpAnisotropy);
break;
case "mapBumpScale":
c.bumpScale = h;
break;
case "mapBumpRepeat":
case "mapBumpOffset":
case "mapBumpWrap":
case "mapBumpAnisotropy":
break;
case "mapNormal":
c.normalMap = s(h, r.mapNormalRepeat, r.mapNormalOffset, r.mapNormalWrap, r.mapNormalAnisotropy);
break;
case "mapNormalFactor":
c.normalScale = [h, h];
break;
case "mapNormalRepeat":
case "mapNormalOffset":
case "mapNormalWrap":
case "mapNormalAnisotropy":
break;
case "mapSpecular":
c.specularMap = s(h, r.mapSpecularRepeat, r.mapSpecularOffset, r.mapSpecularWrap, r.mapSpecularAnisotropy);
break;
case "mapSpecularRepeat":
case "mapSpecularOffset":
case "mapSpecularWrap":
case "mapSpecularAnisotropy":
break;
case "mapMetalness":
c.metalnessMap = s(h, r.mapMetalnessRepeat, r.mapMetalnessOffset, r.mapMetalnessWrap, r.mapMetalnessAnisotropy);
break;
case "mapMetalnessRepeat":
case "mapMetalnessOffset":
case "mapMetalnessWrap":
case "mapMetalnessAnisotropy":
break;
case "mapRoughness":
c.roughnessMap = s(h, r.mapRoughnessRepeat, r.mapRoughnessOffset, r.mapRoughnessWrap, r.mapRoughnessAnisotropy);
break;
case "mapRoughnessRepeat":
case "mapRoughnessOffset":
case "mapRoughnessWrap":
case "mapRoughnessAnisotropy":
break;
case "mapAlpha":
c.alphaMap = s(h, r.mapAlphaRepeat, r.mapAlphaOffset, r.mapAlphaWrap, r.mapAlphaAnisotropy);
break;
case "mapAlphaRepeat":
case "mapAlphaOffset":
case "mapAlphaWrap":
case "mapAlphaAnisotropy":
break;
case "flipSided":
c.side = n.BackSide;
break;
case "doubleSided":
c.side = n.DoubleSide;
break;
case "transparency":
console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"), (c.opacity = h);
break;
case "depthTest":
case "depthWrite":
case "colorWrite":
case "opacity":
case "reflectivity":
case "transparent":
case "visible":
case "wireframe":
c[u] = h;
break;
case "vertexColors":
h === !0 && (c.vertexColors = n.VertexColors), "face" === h && (c.vertexColors = n.FaceColors);
break;
default:
console.error("THREE.Loader.createMaterial: Unsupported", u, h);
}
}
return "MeshBasicMaterial" === c.type && delete c.emissive, "MeshPhongMaterial" !== c.type && delete c.specular, c.opacity < 1 && (c.transparent = !0), i.setTextures(l), i.parse(c);
};
})(),
}),
(n.Loader.Handlers = {
handlers: [],
add: function (e, t) {
this.handlers.push(e, t);
},
get: function (e) {
for (var t = this.handlers, i = 0, n = t.length; n > i; i += 2) {
var r = t[i],
o = t[i + 1];
if (r.test(e)) return o;
}
return null;
},
}),
(n.XHRLoader = function (e) {
this.manager = void 0 !== e ? e : n.DefaultLoadingManager;
}),
Object.assign(n.XHRLoader.prototype, {
load: function (e, t, i, r) {
void 0 !== this.path && (e = this.path + e);
var o = this,
a = n.Cache.get(e);
if (void 0 !== a)
return (
o.manager.itemStart(e),
setTimeout(function () {
t && t(a), o.manager.itemEnd(e);
}, 0),
a
);
var s = new XMLHttpRequest();
return (
s.overrideMimeType("text/plain"),
s.open("GET", e, !0),
s.addEventListener(
"load",
function (i) {
var a = i.target.response;
n.Cache.add(e, a),
200 === this.status ?
(t && t(a), o.manager.itemEnd(e)) :
0 === this.status ?
(console.warn("THREE.XHRLoader: HTTP Status 0 received."), t && t(a), o.manager.itemEnd(e)) :
(r && r(i), o.manager.itemError(e));
},
!1
),
void 0 !== i &&
s.addEventListener(
"progress",
function (e) {
i(e);
},
!1
),
s.addEventListener(
"error",
function (t) {
r && r(t), o.manager.itemError(e);
},
!1
),
void 0 !== this.responseType && (s.responseType = this.responseType),
void 0 !== this.withCredentials && (s.withCredentials = this.withCredentials),
s.send(null),
o.manager.itemStart(e),
s
);
},
setPath: function (e) {
return (this.path = e), this;
},
setResponseType: function (e) {
return (this.responseType = e), this;
},
setWithCredentials: function (e) {
return (this.withCredentials = e), this;
},
}),
(n.FontLoader = function (e) {
this.manager = void 0 !== e ? e : n.DefaultLoadingManager;
}),
Object.assign(n.FontLoader.prototype, {
load: function (e, t, i, r) {
var o = this,
a = new n.XHRLoader(this.manager);
a.load(
e,
function (e) {
var i;
try {
i = JSON.parse(e);
} catch (n) {
console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."), (i = JSON.parse(e.substring(65, e.length - 2)));
}
var r = o.parse(i);
t && t(r);
},
i,
r
);
},
parse: function (e) {
return new n.Font(e);
},
}),
(n.ImageLoader = function (e) {
this.manager = void 0 !== e ? e : n.DefaultLoadingManager;
}),
Object.assign(n.ImageLoader.prototype, {
load: function (e, t, i, r) {
var o = this,
a = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
if (
((a.onload = function () {
URL.revokeObjectURL(a.src), t && t(a), o.manager.itemEnd(e);
}),
0 === e.indexOf("data:"))
)
a.src = e;
else {
var s = new n.XHRLoader();
s.setPath(this.path),
s.setResponseType("blob"),
s.load(
e,
function (e) {
a.src = URL.createObjectURL(e);
},
i,
r
);
}
return o.manager.itemStart(e), a;
},
setCrossOrigin: function (e) {
return (this.crossOrigin = e), this;
},
setPath: function (e) {
return (this.path = e), this;
},
}),
(n.JSONLoader = function (e) {
"boolean" == typeof e && (console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."), (e = void 0)),
(this.manager = void 0 !== e ? e : n.DefaultLoadingManager),
(this.withCredentials = !1);
}),
Object.assign(n.JSONLoader.prototype, {
load: function (e, t, i, r) {
var o = this,
a = this.texturePath && "string" == typeof this.texturePath ? this.texturePath : n.Loader.prototype.extractUrlBase(e),
s = new n.XHRLoader(this.manager);
s.setWithCredentials(this.withCredentials),
s.load(
e,
function (i) {
var n = JSON.parse(i),
r = n.metadata;
if (void 0 !== r) {
var s = r.type;
if (void 0 !== s) {
if ("object" === s.toLowerCase()) return void console.error("THREE.JSONLoader: " + e + " should be loaded with THREE.ObjectLoader instead.");
if ("scene" === s.toLowerCase()) return void console.error("THREE.JSONLoader: " + e + " should be loaded with THREE.SceneLoader instead.");
}
}
var l = o.parse(n, a);
t(l.geometry, l.materials);
},
i,
r
);
},
setTexturePath: function (e) {
this.texturePath = e;
},
parse: function (e, t) {
function i(t) {
function i(e, t) {
return e & (1 << t);
}
var r,
o,
a,
l,
c,
u,
h,
d,
f,
p,
m,
v,
g,
y,
_,
b,
x,
w,
M,
T,
S,
E,
A,
C,
P,
L,
R,
O = e.faces,
k = e.vertices,
D = e.normals,
I = e.colors,
N = 0;
if (void 0 !== e.uvs) {
for (r = 0; r < e.uvs.length; r++) e.uvs[r].length && N++;
for (r = 0; N > r; r++) s.faceVertexUvs[r] = [];
}
for (l = 0, c = k.length; c > l;)(w = new n.Vector3()), (w.x = k[l++] * t), (w.y = k[l++] * t), (w.z = k[l++] * t), s.vertices.push(w);
for (l = 0, c = O.length; c > l;)
if (((p = O[l++]), (m = i(p, 0)), (v = i(p, 1)), (g = i(p, 3)), (y = i(p, 4)), (_ = i(p, 5)), (b = i(p, 6)), (x = i(p, 7)), m)) {
if (
((T = new n.Face3()),
(T.a = O[l]),
(T.b = O[l + 1]),
(T.c = O[l + 3]),
(S = new n.Face3()),
(S.a = O[l + 1]),
(S.b = O[l + 2]),
(S.c = O[l + 3]),
(l += 4),
v && ((f = O[l++]), (T.materialIndex = f), (S.materialIndex = f)),
(a = s.faces.length),
g)
)
for (r = 0; N > r; r++)
for (C = e.uvs[r], s.faceVertexUvs[r][a] = [], s.faceVertexUvs[r][a + 1] = [], o = 0; 4 > o; o++)
(d = O[l++]), (L = C[2 * d]), (R = C[2 * d + 1]), (P = new n.Vector2(L, R)), 2 !== o && s.faceVertexUvs[r][a].push(P), 0 !== o && s.faceVertexUvs[r][a + 1].push(P);
if ((y && ((h = 3 * O[l++]), T.normal.set(D[h++], D[h++], D[h]), S.normal.copy(T.normal)), _))
for (r = 0; 4 > r; r++)(h = 3 * O[l++]), (A = new n.Vector3(D[h++], D[h++], D[h])), 2 !== r && T.vertexNormals.push(A), 0 !== r && S.vertexNormals.push(A);
if ((b && ((u = O[l++]), (E = I[u]), T.color.setHex(E), S.color.setHex(E)), x))
for (r = 0; 4 > r; r++)(u = O[l++]), (E = I[u]), 2 !== r && T.vertexColors.push(new n.Color(E)), 0 !== r && S.vertexColors.push(new n.Color(E));
s.faces.push(T), s.faces.push(S);
} else {
if (((M = new n.Face3()), (M.a = O[l++]), (M.b = O[l++]), (M.c = O[l++]), v && ((f = O[l++]), (M.materialIndex = f)), (a = s.faces.length), g))
for (r = 0; N > r; r++)
for (C = e.uvs[r], s.faceVertexUvs[r][a] = [], o = 0; 3 > o; o++)(d = O[l++]), (L = C[2 * d]), (R = C[2 * d + 1]), (P = new n.Vector2(L, R)), s.faceVertexUvs[r][a].push(P);
if ((y && ((h = 3 * O[l++]), M.normal.set(D[h++], D[h++], D[h])), _))
for (r = 0; 3 > r; r++)(h = 3 * O[l++]), (A = new n.Vector3(D[h++], D[h++], D[h])), M.vertexNormals.push(A);
if ((b && ((u = O[l++]), M.color.setHex(I[u])), x))
for (r = 0; 3 > r; r++)(u = O[l++]), M.vertexColors.push(new n.Color(I[u]));
s.faces.push(M);
}
}
function r() {
var t = void 0 !== e.influencesPerVertex ? e.influencesPerVertex : 2;
if (e.skinWeights)
for (var i = 0, r = e.skinWeights.length; r > i; i += t) {
var o = e.skinWeights[i],
a = t > 1 ? e.skinWeights[i + 1] : 0,
l = t > 2 ? e.skinWeights[i + 2] : 0,
c = t > 3 ? e.skinWeights[i + 3] : 0;
s.skinWeights.push(new n.Vector4(o, a, l, c));
}
if (e.skinIndices)
for (var i = 0, r = e.skinIndices.length; r > i; i += t) {
var u = e.skinIndices[i],
h = t > 1 ? e.skinIndices[i + 1] : 0,
d = t > 2 ? e.skinIndices[i + 2] : 0,
f = t > 3 ? e.skinIndices[i + 3] : 0;
s.skinIndices.push(new n.Vector4(u, h, d, f));
}
(s.bones = e.bones),
s.bones &&
s.bones.length > 0 &&
(s.skinWeights.length !== s.skinIndices.length || s.skinIndices.length !== s.vertices.length) &&
console.warn("When skinning, number of vertices (" + s.vertices.length + "), skinIndices (" + s.skinIndices.length + "), and skinWeights (" + s.skinWeights.length + ") should match.");
}
function o(t) {
if (void 0 !== e.morphTargets)
for (var i = 0, r = e.morphTargets.length; r > i; i++) {
(s.morphTargets[i] = {}), (s.morphTargets[i].name = e.morphTargets[i].name), (s.morphTargets[i].vertices = []);
for (var o = s.morphTargets[i].vertices, a = e.morphTargets[i].vertices, l = 0, c = a.length; c > l; l += 3) {
var u = new n.Vector3();
(u.x = a[l] * t), (u.y = a[l + 1] * t), (u.z = a[l + 2] * t), o.push(u);
}
}
if (void 0 !== e.morphColors && e.morphColors.length > 0) {
console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');
for (var h = s.faces, d = e.morphColors[0].colors, i = 0, r = h.length; r > i; i++) h[i].color.fromArray(d, 3 * i);
}
}
function a() {
var t = [],
i = [];
void 0 !== e.animation && i.push(e.animation), void 0 !== e.animations && (e.animations.length ? (i = i.concat(e.animations)) : i.push(e.animations));
for (var r = 0; r < i.length; r++) {
var o = n.AnimationClip.parseAnimation(i[r], s.bones);
o && t.push(o);
}
if (s.morphTargets) {
var a = n.AnimationClip.CreateClipsFromMorphTargetSequences(s.morphTargets, 10);
t = t.concat(a);
}
t.length > 0 && (s.animations = t);
}
var s = new n.Geometry(),
l = void 0 !== e.scale ? 1 / e.scale : 1;
if ((i(l), r(), o(l), a(), s.computeFaceNormals(), s.computeBoundingSphere(), void 0 === e.materials || 0 === e.materials.length)) return {
geometry: s
};
var c = n.Loader.prototype.initMaterials(e.materials, t, this.crossOrigin);
return {
geometry: s,
materials: c
};
},
}),
(n.LoadingManager = function (e, t, i) {
var n = this,
r = !1,
o = 0,
a = 0;
(this.onStart = void 0),
(this.onLoad = e),
(this.onProgress = t),
(this.onError = i),
(this.itemStart = function (e) {
a++, r === !1 && void 0 !== n.onStart && n.onStart(e, o, a), (r = !0);
}),
(this.itemEnd = function (e) {
o++, void 0 !== n.onProgress && n.onProgress(e, o, a), o === a && ((r = !1), void 0 !== n.onLoad && n.onLoad());
}),
(this.itemError = function (e) {
void 0 !== n.onError && n.onError(e);
});
}),
(n.DefaultLoadingManager = new n.LoadingManager()),
(n.BufferGeometryLoader = function (e) {
this.manager = void 0 !== e ? e : n.DefaultLoadingManager;
}),
Object.assign(n.BufferGeometryLoader.prototype, {
load: function (e, t, i, r) {
var o = this,
a = new n.XHRLoader(o.manager);
a.load(
e,
function (e) {
t(o.parse(JSON.parse(e)));
},
i,
r
);
},
parse: function (e) {
var t = new n.BufferGeometry(),
i = e.data.index,
r = {
Int8Array: Int8Array,
Uint8Array: Uint8Array,
Uint8ClampedArray: Uint8ClampedArray,
Int16Array: Int16Array,
Uint16Array: Uint16Array,
Int32Array: Int32Array,
Uint32Array: Uint32Array,
Float32Array: Float32Array,
Float64Array: Float64Array,
};
if (void 0 !== i) {
var o = new r[i.type](i.array);
t.setIndex(new n.BufferAttribute(o, 1));
}
var a = e.data.attributes;
for (var s in a) {
var l = a[s],
o = new r[l.type](l.array);
t.addAttribute(s, new n.BufferAttribute(o, l.itemSize, l.normalized));
}
var c = e.data.groups || e.data.drawcalls || e.data.offsets;
if (void 0 !== c)
for (var u = 0, h = c.length; u !== h; ++u) {
var d = c[u];
t.addGroup(d.start, d.count, d.materialIndex);
}
var f = e.data.boundingSphere;
if (void 0 !== f) {
var p = new n.Vector3();
void 0 !== f.center && p.fromArray(f.center), (t.boundingSphere = new n.Sphere(p, f.radius));
}
return t;
},
}),
(n.MaterialLoader = function (e) {
(this.manager = void 0 !== e ? e : n.DefaultLoadingManager), (this.textures = {});
}),
Object.assign(n.MaterialLoader.prototype, {
load: function (e, t, i, r) {
var o = this,
a = new n.XHRLoader(o.manager);
a.load(
e,
function (e) {
t(o.parse(JSON.parse(e)));
},
i,
r
);
},
setTextures: function (e) {
this.textures = e;
},
getTexture: function (e) {
var t = this.textures;
return void 0 === t[e] && console.warn("THREE.MaterialLoader: Undefined texture", e), t[e];
},
parse: function (e) {
var t = new n[e.type]();
if (
(void 0 !== e.uuid && (t.uuid = e.uuid),
void 0 !== e.name && (t.name = e.name),
void 0 !== e.color && t.color.setHex(e.color),
void 0 !== e.roughness && (t.roughness = e.roughness),
void 0 !== e.metalness && (t.metalness = e.metalness),
void 0 !== e.emissive && t.emissive.setHex(e.emissive),
void 0 !== e.specular && t.specular.setHex(e.specular),
void 0 !== e.shininess && (t.shininess = e.shininess),
void 0 !== e.uniforms && (t.uniforms = e.uniforms),
void 0 !== e.vertexShader && (t.vertexShader = e.vertexShader),
void 0 !== e.fragmentShader && (t.fragmentShader = e.fragmentShader),
void 0 !== e.vertexColors && (t.vertexColors = e.vertexColors),
void 0 !== e.shading && (t.shading = e.shading),
void 0 !== e.blending && (t.blending = e.blending),
void 0 !== e.side && (t.side = e.side),
void 0 !== e.opacity && (t.opacity = e.opacity),
void 0 !== e.transparent && (t.transparent = e.transparent),
void 0 !== e.alphaTest && (t.alphaTest = e.alphaTest),
void 0 !== e.depthTest && (t.depthTest = e.depthTest),
void 0 !== e.depthWrite && (t.depthWrite = e.depthWrite),
void 0 !== e.colorWrite && (t.colorWrite = e.colorWrite),
void 0 !== e.wireframe && (t.wireframe = e.wireframe),
void 0 !== e.wireframeLinewidth && (t.wireframeLinewidth = e.wireframeLinewidth),
void 0 !== e.size && (t.size = e.size),
void 0 !== e.sizeAttenuation && (t.sizeAttenuation = e.sizeAttenuation),
void 0 !== e.map && (t.map = this.getTexture(e.map)),
void 0 !== e.alphaMap && ((t.alphaMap = this.getTexture(e.alphaMap)), (t.transparent = !0)),
void 0 !== e.bumpMap && (t.bumpMap = this.getTexture(e.bumpMap)),
void 0 !== e.bumpScale && (t.bumpScale = e.bumpScale),
void 0 !== e.normalMap && (t.normalMap = this.getTexture(e.normalMap)),
void 0 !== e.normalScale)
) {
var i = e.normalScale;
Array.isArray(i) === !1 && (i = [i, i]), (t.normalScale = new n.Vector2().fromArray(i));
}
if (
(void 0 !== e.displacementMap && (t.displacementMap = this.getTexture(e.displacementMap)),
void 0 !== e.displacementScale && (t.displacementScale = e.displacementScale),
void 0 !== e.displacementBias && (t.displacementBias = e.displacementBias),
void 0 !== e.roughnessMap && (t.roughnessMap = this.getTexture(e.roughnessMap)),
void 0 !== e.metalnessMap && (t.metalnessMap = this.getTexture(e.metalnessMap)),
void 0 !== e.emissiveMap && (t.emissiveMap = this.getTexture(e.emissiveMap)),
void 0 !== e.emissiveIntensity && (t.emissiveIntensity = e.emissiveIntensity),
void 0 !== e.specularMap && (t.specularMap = this.getTexture(e.specularMap)),
void 0 !== e.envMap && ((t.envMap = this.getTexture(e.envMap)), (t.combine = n.MultiplyOperation)),
void 0 !== e.reflectivity && (t.reflectivity = e.reflectivity),
void 0 !== e.lightMap && (t.lightMap = this.getTexture(e.lightMap)),
void 0 !== e.lightMapIntensity && (t.lightMapIntensity = e.lightMapIntensity),
void 0 !== e.aoMap && (t.aoMap = this.getTexture(e.aoMap)),
void 0 !== e.aoMapIntensity && (t.aoMapIntensity = e.aoMapIntensity),
void 0 !== e.materials)
)
for (var r = 0, o = e.materials.length; o > r; r++) t.materials.push(this.parse(e.materials[r]));
return t;
},
}),
(n.ObjectLoader = function (e) {
(this.manager = void 0 !== e ? e : n.DefaultLoadingManager), (this.texturePath = "");
}),
Object.assign(n.ObjectLoader.prototype, {
load: function (e, t, i, r) {
"" === this.texturePath && (this.texturePath = e.substring(0, e.lastIndexOf("/") + 1));
var o = this,
a = new n.XHRLoader(o.manager);
a.load(
e,
function (e) {
o.parse(JSON.parse(e), t);
},
i,
r
);
},
setTexturePath: function (e) {
this.texturePath = e;
},
setCrossOrigin: function (e) {
this.crossOrigin = e;
},
parse: function (e, t) {
var i = this.parseGeometries(e.geometries),
n = this.parseImages(e.images, function () {
void 0 !== t && t(a);
}),
r = this.parseTextures(e.textures, n),
o = this.parseMaterials(e.materials, r),
a = this.parseObject(e.object, i, o);
return e.animations && (a.animations = this.parseAnimations(e.animations)), (void 0 === e.images || 0 === e.images.length) && void 0 !== t && t(a), a;
},
parseGeometries: function (e) {
var t = {};
if (void 0 !== e)
for (var i = new n.JSONLoader(), r = new n.BufferGeometryLoader(), o = 0, a = e.length; a > o; o++) {
var s,
l = e[o];
switch (l.type) {
case "PlaneGeometry":
case "PlaneBufferGeometry":
s = new n[l.type](l.width, l.height, l.widthSegments, l.heightSegments);
break;
case "BoxGeometry":
case "BoxBufferGeometry":
case "CubeGeometry":
s = new n[l.type](l.width, l.height, l.depth, l.widthSegments, l.heightSegments, l.depthSegments);
break;
case "CircleGeometry":
case "CircleBufferGeometry":
s = new n[l.type](l.radius, l.segments, l.thetaStart, l.thetaLength);
break;
case "CylinderGeometry":
case "CylinderBufferGeometry":
s = new n[l.type](l.radiusTop, l.radiusBottom, l.height, l.radialSegments, l.heightSegments, l.openEnded, l.thetaStart, l.thetaLength);
break;
case "ConeGeometry":
case "ConeBufferGeometry":
s = new n[l.type](l.radius, l.height, l.radialSegments, l.heightSegments, l.openEnded, l.thetaStart, l.thetaLength);
break;
case "SphereGeometry":
case "SphereBufferGeometry":
s = new n[l.type](l.radius, l.widthSegments, l.heightSegments, l.phiStart, l.phiLength, l.thetaStart, l.thetaLength);
break;
case "DodecahedronGeometry":
case "IcosahedronGeometry":
case "OctahedronGeometry":
case "TetrahedronGeometry":
s = new n[l.type](l.radius, l.detail);
break;
case "RingGeometry":
case "RingBufferGeometry":
s = new n[l.type](l.innerRadius, l.outerRadius, l.thetaSegments, l.phiSegments, l.thetaStart, l.thetaLength);
break;
case "TorusGeometry":
case "TorusBufferGeometry":
s = new n[l.type](l.radius, l.tube, l.radialSegments, l.tubularSegments, l.arc);
break;
case "TorusKnotGeometry":
case "TorusKnotBufferGeometry":
s = new n[l.type](l.radius, l.tube, l.tubularSegments, l.radialSegments, l.p, l.q);
break;
case "LatheGeometry":
case "LatheBufferGeometry":
s = new n[l.type](l.points, l.segments, l.phiStart, l.phiLength);
break;
case "BufferGeometry":
s = r.parse(l);
break;
case "Geometry":
s = i.parse(l.data, this.texturePath).geometry;
break;
default:
console.warn('THREE.ObjectLoader: Unsupported geometry type "' + l.type + '"');
continue;
}
(s.uuid = l.uuid), void 0 !== l.name && (s.name = l.name), (t[l.uuid] = s);
}
return t;
},
parseMaterials: function (e, t) {
var i = {};
if (void 0 !== e) {
var r = new n.MaterialLoader();
r.setTextures(t);
for (var o = 0, a = e.length; a > o; o++) {
var s = r.parse(e[o]);
i[s.uuid] = s;
}
}
return i;
},
parseAnimations: function (e) {
for (var t = [], i = 0; i < e.length; i++) {
var r = n.AnimationClip.parse(e[i]);
t.push(r);
}
return t;
},
parseImages: function (e, t) {
function i(e) {
return (
r.manager.itemStart(e),
s.load(e, function () {
r.manager.itemEnd(e);
})
);
}
var r = this,
o = {};
if (void 0 !== e && e.length > 0) {
var a = new n.LoadingManager(t),
s = new n.ImageLoader(a);
s.setCrossOrigin(this.crossOrigin);
for (var l = 0, c = e.length; c > l; l++) {
var u = e[l],
h = /^(//)|([a-z]+:(//)?)/i.test(u.url) ? u.url : r.texturePath + u.url;
o[u.uuid] = i(h);
}
}
return o;
},
parseTextures: function (e, t) {
function i(e) {
return "number" == typeof e ? e : (console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.", e), n[e]);
}
var r = {};
if (void 0 !== e)
for (var o = 0, a = e.length; a > o; o++) {
var s = e[o];
void 0 === s.image && console.warn('THREE.ObjectLoader: No "image" specified for', s.uuid), void 0 === t[s.image] && console.warn("THREE.ObjectLoader: Undefined image", s.image);
var l = new n.Texture(t[s.image]);
(l.needsUpdate = !0),
(l.uuid = s.uuid),
void 0 !== s.name && (l.name = s.name),
void 0 !== s.mapping && (l.mapping = i(s.mapping)),
void 0 !== s.offset && l.offset.fromArray(s.offset),
void 0 !== s.repeat && l.repeat.fromArray(s.repeat),
void 0 !== s.wrap && ((l.wrapS = i(s.wrap[0])), (l.wrapT = i(s.wrap[1]))),
void 0 !== s.minFilter && (l.minFilter = i(s.minFilter)),
void 0 !== s.magFilter && (l.magFilter = i(s.magFilter)),
void 0 !== s.anisotropy && (l.anisotropy = s.anisotropy),
void 0 !== s.flipY && (l.flipY = s.flipY),
(r[s.uuid] = l);
}
return r;
},
parseObject: (function () {
var e = new n.Matrix4();
return function (t, i, r) {
function o(e) {
return void 0 === i[e] && console.warn("THREE.ObjectLoader: Undefined geometry", e), i[e];
}
function a(e) {
return void 0 === e ? void 0 : (void 0 === r[e] && console.warn("THREE.ObjectLoader: Undefined material", e), r[e]);
}
var s;
switch (t.type) {
case "Scene":
s = new n.Scene();
break;
case "PerspectiveCamera":
(s = new n.PerspectiveCamera(t.fov, t.aspect, t.near, t.far)),
void 0 !== t.focus && (s.focus = t.focus),
void 0 !== t.zoom && (s.zoom = t.zoom),
void 0 !== t.filmGauge && (s.filmGauge = t.filmGauge),
void 0 !== t.filmOffset && (s.filmOffset = t.filmOffset),
void 0 !== t.view && (s.view = Object.assign({}, t.view));
break;
case "OrthographicCamera":
s = new n.OrthographicCamera(t.left, t.right, t.top, t.bottom, t.near, t.far);
break;
case "AmbientLight":
s = new n.AmbientLight(t.color, t.intensity);
break;
case "DirectionalLight":
s = new n.DirectionalLight(t.color, t.intensity);
break;
case "PointLight":
s = new n.PointLight(t.color, t.intensity, t.distance, t.decay);
break;
case "SpotLight":
s = new n.SpotLight(t.color, t.intensity, t.distance, t.angle, t.penumbra, t.decay);
break;
case "HemisphereLight":
s = new n.HemisphereLight(t.color, t.groundColor, t.intensity);
break;
case "Mesh":
var l = o(t.geometry),
c = a(t.material);
s = l.bones && l.bones.length > 0 ? new n.SkinnedMesh(l, c) : new n.Mesh(l, c);
break;
case "LOD":
s = new n.LOD();
break;
case "Line":
s = new n.Line(o(t.geometry), a(t.material), t.mode);
break;
case "PointCloud":
case "Points":
s = new n.Points(o(t.geometry), a(t.material));
break;
case "Sprite":
s = new n.Sprite(a(t.material));
break;
case "Group":
s = new n.Group();
break;
default:
s = new n.Object3D();
}
if (
((s.uuid = t.uuid),
void 0 !== t.name && (s.name = t.name),
void 0 !== t.matrix ?
(e.fromArray(t.matrix), e.decompose(s.position, s.quaternion, s.scale)) :
(void 0 !== t.position && s.position.fromArray(t.position), void 0 !== t.rotation && s.rotation.fromArray(t.rotation), void 0 !== t.scale && s.scale.fromArray(t.scale)),
void 0 !== t.castShadow && (s.castShadow = t.castShadow),
void 0 !== t.receiveShadow && (s.receiveShadow = t.receiveShadow),
void 0 !== t.visible && (s.visible = t.visible),
void 0 !== t.userData && (s.userData = t.userData),
void 0 !== t.children)
)
for (var u in t.children) s.add(this.parseObject(t.children[u], i, r));
if ("LOD" === t.type)
for (var h = t.levels, d = 0; d < h.length; d++) {
var f = h[d],
u = s.getObjectByProperty("uuid", f.object);
void 0 !== u && s.addLevel(u, f.distance);
}
return s;
};
})(),
}),
(n.TextureLoader = function (e) {
this.manager = void 0 !== e ? e : n.DefaultLoadingManager;
}),
Object.assign(n.TextureLoader.prototype, {
load: function (e, t, i, r) {
var o = new n.Texture(),
a = new n.ImageLoader(this.manager);
return (
a.setCrossOrigin(this.crossOrigin),
a.setPath(this.path),
a.load(
e,
function (i) {
var r = e.search(/.(jpg|jpeg)$/) > 0 || 0 === e.search(/^data:image/jpeg/);
(o.format = r ? n.RGBFormat : n.RGBAFormat), (o.image = i), (o.needsUpdate = !0), void 0 !== t && t(o);
},
i,
r
),
o
);
},
setCrossOrigin: function (e) {
return (this.crossOrigin = e), this;
},
setPath: function (e) {
return (this.path = e), this;
},
}),
(n.CubeTextureLoader = function (e) {
this.manager = void 0 !== e ? e : n.DefaultLoadingManager;
}),
Object.assign(n.CubeTextureLoader.prototype, {
load: function (e, t, i, r) {
function o(i) {
s.load(
e[i],
function (e) {
(a.images[i] = e), l++, 6 === l && ((a.needsUpdate = !0), t && t(a));
},
void 0,
r
);
}
var a = new n.CubeTexture(),
s = new n.ImageLoader(this.manager);
s.setCrossOrigin(this.crossOrigin), s.setPath(this.path);
for (var l = 0, c = 0; c < e.length; ++c) o(c);
return a;
},
setCrossOrigin: function (e) {
return (this.crossOrigin = e), this;
},
setPath: function (e) {
return (this.path = e), this;
},
}),
(n.DataTextureLoader = n.BinaryTextureLoader = function (e) {
(this.manager = void 0 !== e ? e : n.DefaultLoadingManager), (this._parser = null);
}),
Object.assign(n.BinaryTextureLoader.prototype, {
load: function (e, t, i, r) {
var o = this,
a = new n.DataTexture(),
s = new n.XHRLoader(this.manager);
return (
s.setResponseType("arraybuffer"),
s.load(
e,
function (e) {
var i = o._parser(e);
i &&
(void 0 !== i.image ? (a.image = i.image) : void 0 !== i.data && ((a.image.width = i.width), (a.image.height = i.height), (a.image.data = i.data)),
(a.wrapS = void 0 !== i.wrapS ? i.wrapS : n.ClampToEdgeWrapping),
(a.wrapT = void 0 !== i.wrapT ? i.wrapT : n.ClampToEdgeWrapping),
(a.magFilter = void 0 !== i.magFilter ? i.magFilter : n.LinearFilter),
(a.minFilter = void 0 !== i.minFilter ? i.minFilter : n.LinearMipMapLinearFilter),
(a.anisotropy = void 0 !== i.anisotropy ? i.anisotropy : 1),
void 0 !== i.format && (a.format = i.format),
void 0 !== i.type && (a.type = i.type),
void 0 !== i.mipmaps && (a.mipmaps = i.mipmaps),
1 === i.mipmapCount && (a.minFilter = n.LinearFilter),
(a.needsUpdate = !0),
t && t(a, i));
},
i,
r
),
a
);
},
}),
(n.CompressedTextureLoader = function (e) {
(this.manager = void 0 !== e ? e : n.DefaultLoadingManager), (this._parser = null);
}),
Object.assign(n.CompressedTextureLoader.prototype, {
load: function (e, t, i, r) {
function o(o) {
c.load(
e[o],
function (e) {
var i = a._parser(e, !0);
(s[o] = {
width: i.width,
height: i.height,
format: i.format,
mipmaps: i.mipmaps
}),
(u += 1),
6 === u && (1 === i.mipmapCount && (l.minFilter = n.LinearFilter), (l.format = i.format), (l.needsUpdate = !0), t && t(l));
},
i,
r
);
}
var a = this,
s = [],
l = new n.CompressedTexture();
l.image = s;
var c = new n.XHRLoader(this.manager);
if ((c.setPath(this.path), c.setResponseType("arraybuffer"), Array.isArray(e)))
for (var u = 0, h = 0, d = e.length; d > h; ++h) o(h);
else
c.load(
e,
function (e) {
var i = a._parser(e, !0);
if (i.isCubemap)
for (var r = i.mipmaps.length / i.mipmapCount, o = 0; r > o; o++) {
s[o] = {
mipmaps: []
};
for (var c = 0; c < i.mipmapCount; c++) s[o].mipmaps.push(i.mipmaps[o * i.mipmapCount + c]), (s[o].format = i.format), (s[o].width = i.width), (s[o].height = i.height);
}
else(l.image.width = i.width), (l.image.height = i.height), (l.mipmaps = i.mipmaps);
1 === i.mipmapCount && (l.minFilter = n.LinearFilter), (l.format = i.format), (l.needsUpdate = !0), t && t(l);
},
i,
r
);
return l;
},
setPath: function (e) {
return (this.path = e), this;
},
}),
(n.Material = function () {
Object.defineProperty(this, "id", {
value: n.MaterialIdCount++
}),
(this.uuid = n.Math.generateUUID()),
(this.name = ""),
(this.type = "Material"),
(this.fog = !0),
(this.lights = !0),
(this.blending = n.NormalBlending),
(this.side = n.FrontSide),
(this.shading = n.SmoothShading),
(this.vertexColors = n.NoColors),
(this.opacity = 1),
(this.transparent = !1),
(this.blendSrc = n.SrcAlphaFactor),
(this.blendDst = n.OneMinusSrcAlphaFactor),
(this.blendEquation = n.AddEquation),
(this.blendSrcAlpha = null),
(this.blendDstAlpha = null),
(this.blendEquationAlpha = null),
(this.depthFunc = n.LessEqualDepth),
(this.depthTest = !0),
(this.depthWrite = !0),
(this.clippingPlanes = null),
(this.clipShadows = !1),
(this.colorWrite = !0),
(this.precision = null),
(this.polygonOffset = !1),
(this.polygonOffsetFactor = 0),
(this.polygonOffsetUnits = 0),
(this.alphaTest = 0),
(this.premultipliedAlpha = !1),
(this.overdraw = 0),
(this.visible = !0),
(this._needsUpdate = !0);
}),
(n.Material.prototype = {
constructor: n.Material,
get needsUpdate() {
return this._needsUpdate;
},
set needsUpdate(e) {
e === !0 && this.update(), (this._needsUpdate = e);
},
setValues: function (e) {
if (void 0 !== e)
for (var t in e) {
var i = e[t];
if (void 0 !== i) {
var r = this[t];
void 0 !== r ?
r instanceof n.Color ?
r.set(i) :
r instanceof n.Vector3 && i instanceof n.Vector3 ?
r.copy(i) :
"overdraw" === t ?
(this[t] = Number(i)) :
(this[t] = i) :
console.warn("THREE." + this.type + ": '" + t + "' is not a property of this material.");
} else console.warn("THREE.Material: '" + t + "' parameter is undefined.");
}
},
toJSON: function (e) {
function t(e) {
var t = [];
for (var i in e) {
var n = e[i];
delete n.metadata, t.push(n);
}
return t;
}
var i = void 0 === e;
i && (e = {
textures: {},
images: {}
});
var r = {
metadata: {
version: 4.4,
type: "Material",
generator: "Material.toJSON"
}
};
if (
((r.uuid = this.uuid),
(r.type = this.type),
"" !== this.name && (r.name = this.name),
this.color instanceof n.Color && (r.color = this.color.getHex()),
void 0 !== this.roughness && (r.roughness = this.roughness),
void 0 !== this.metalness && (r.metalness = this.metalness),
this.emissive instanceof n.Color && (r.emissive = this.emissive.getHex()),
this.specular instanceof n.Color && (r.specular = this.specular.getHex()),
void 0 !== this.shininess && (r.shininess = this.shininess),
this.map instanceof n.Texture && (r.map = this.map.toJSON(e).uuid),
this.alphaMap instanceof n.Texture && (r.alphaMap = this.alphaMap.toJSON(e).uuid),
this.lightMap instanceof n.Texture && (r.lightMap = this.lightMap.toJSON(e).uuid),
this.bumpMap instanceof n.Texture && ((r.bumpMap = this.bumpMap.toJSON(e).uuid), (r.bumpScale = this.bumpScale)),
this.normalMap instanceof n.Texture && ((r.normalMap = this.normalMap.toJSON(e).uuid), (r.normalScale = this.normalScale.toArray())),
this.displacementMap instanceof n.Texture && ((r.displacementMap = this.displacementMap.toJSON(e).uuid), (r.displacementScale = this.displacementScale), (r.displacementBias = this.displacementBias)),
this.roughnessMap instanceof n.Texture && (r.roughnessMap = this.roughnessMap.toJSON(e).uuid),
this.metalnessMap instanceof n.Texture && (r.metalnessMap = this.metalnessMap.toJSON(e).uuid),
this.emissiveMap instanceof n.Texture && (r.emissiveMap = this.emissiveMap.toJSON(e).uuid),
this.specularMap instanceof n.Texture && (r.specularMap = this.specularMap.toJSON(e).uuid),
this.envMap instanceof n.Texture && ((r.envMap = this.envMap.toJSON(e).uuid), (r.reflectivity = this.reflectivity)),
void 0 !== this.size && (r.size = this.size),
void 0 !== this.sizeAttenuation && (r.sizeAttenuation = this.sizeAttenuation),
this.blending !== n.NormalBlending && (r.blending = this.blending),
this.shading !== n.SmoothShading && (r.shading = this.shading),
this.side !== n.FrontSide && (r.side = this.side),
this.vertexColors !== n.NoColors && (r.vertexColors = this.vertexColors),
this.opacity < 1 && (r.opacity = this.opacity),
this.transparent === !0 && (r.transparent = this.transparent),
this.alphaTest > 0 && (r.alphaTest = this.alphaTest),
this.premultipliedAlpha === !0 && (r.premultipliedAlpha = this.premultipliedAlpha),
this.wireframe === !0 && (r.wireframe = this.wireframe),
this.wireframeLinewidth > 1 && (r.wireframeLinewidth = this.wireframeLinewidth),
i)
) {
var o = t(e.textures),
a = t(e.images);
o.length > 0 && (r.textures = o), a.length > 0 && (r.images = a);
}
return r;
},
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
(this.name = e.name),
(this.fog = e.fog),
(this.lights = e.lights),
(this.blending = e.blending),
(this.side = e.side),
(this.shading = e.shading),
(this.vertexColors = e.vertexColors),
(this.opacity = e.opacity),
(this.transparent = e.transparent),
(this.blendSrc = e.blendSrc),
(this.blendDst = e.blendDst),
(this.blendEquation = e.blendEquation),
(this.blendSrcAlpha = e.blendSrcAlpha),
(this.blendDstAlpha = e.blendDstAlpha),
(this.blendEquationAlpha = e.blendEquationAlpha),
(this.depthFunc = e.depthFunc),
(this.depthTest = e.depthTest),
(this.depthWrite = e.depthWrite),
(this.colorWrite = e.colorWrite),
(this.precision = e.precision),
(this.polygonOffset = e.polygonOffset),
(this.polygonOffsetFactor = e.polygonOffsetFactor),
(this.polygonOffsetUnits = e.polygonOffsetUnits),
(this.alphaTest = e.alphaTest),
(this.premultipliedAlpha = e.premultipliedAlpha),
(this.overdraw = e.overdraw),
(this.visible = e.visible),
(this.clipShadows = e.clipShadows);
var t = e.clippingPlanes,
i = null;
if (null !== t) {
var n = t.length;
i = new Array(n);
for (var r = 0; r !== n; ++r) i[r] = t[r].clone();
}
return (this.clippingPlanes = i), this;
},
update: function () {
this.dispatchEvent({
type: "update"
});
},
dispose: function () {
this.dispatchEvent({
type: "dispose"
});
},
}),
Object.assign(n.Material.prototype, n.EventDispatcher.prototype),
(n.MaterialIdCount = 0),
(n.LineBasicMaterial = function (e) {
n.Material.call(this), (this.type = "LineBasicMaterial"), (this.color = new n.Color(16777215)), (this.linewidth = 1), (this.linecap = "round"), (this.linejoin = "round"), (this.lights = !1), this.setValues(e);
}),
(n.LineBasicMaterial.prototype = Object.create(n.Material.prototype)),
(n.LineBasicMaterial.prototype.constructor = n.LineBasicMaterial),
(n.LineBasicMaterial.prototype.copy = function (e) {
return n.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.linewidth = e.linewidth), (this.linecap = e.linecap), (this.linejoin = e.linejoin), this;
}),
(n.LineDashedMaterial = function (e) {
n.Material.call(this), (this.type = "LineDashedMaterial"), (this.color = new n.Color(16777215)), (this.linewidth = 1), (this.scale = 1), (this.dashSize = 3), (this.gapSize = 1), (this.lights = !1), this.setValues(e);
}),
(n.LineDashedMaterial.prototype = Object.create(n.Material.prototype)),
(n.LineDashedMaterial.prototype.constructor = n.LineDashedMaterial),
(n.LineDashedMaterial.prototype.copy = function (e) {
return n.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.linewidth = e.linewidth), (this.scale = e.scale), (this.dashSize = e.dashSize), (this.gapSize = e.gapSize), this;
}),
(n.MeshBasicMaterial = function (e) {
n.Material.call(this),
(this.type = "MeshBasicMaterial"),
(this.color = new n.Color(16777215)),
(this.map = null),
(this.aoMap = null),
(this.aoMapIntensity = 1),
(this.specularMap = null),
(this.alphaMap = null),
(this.envMap = null),
(this.combine = n.MultiplyOperation),
(this.reflectivity = 1),
(this.refractionRatio = 0.98),
(this.wireframe = !1),
(this.wireframeLinewidth = 1),
(this.wireframeLinecap = "round"),
(this.wireframeLinejoin = "round"),
(this.skinning = !1),
(this.morphTargets = !1),
(this.lights = !1),
this.setValues(e);
}),
(n.MeshBasicMaterial.prototype = Object.create(n.Material.prototype)),
(n.MeshBasicMaterial.prototype.constructor = n.MeshBasicMaterial),
(n.MeshBasicMaterial.prototype.copy = function (e) {
return (
n.Material.prototype.copy.call(this, e),
this.color.copy(e.color),
(this.map = e.map),
(this.aoMap = e.aoMap),
(this.aoMapIntensity = e.aoMapIntensity),
(this.specularMap = e.specularMap),
(this.alphaMap = e.alphaMap),
(this.envMap = e.envMap),
(this.combine = e.combine),
(this.reflectivity = e.reflectivity),
(this.refractionRatio = e.refractionRatio),
(this.wireframe = e.wireframe),
(this.wireframeLinewidth = e.wireframeLinewidth),
(this.wireframeLinecap = e.wireframeLinecap),
(this.wireframeLinejoin = e.wireframeLinejoin),
(this.skinning = e.skinning),
(this.morphTargets = e.morphTargets),
this
);
}),
(n.MeshDepthMaterial = function (e) {
n.Material.call(this),
(this.type = "MeshDepthMaterial"),
(this.depthPacking = n.BasicDepthPacking),
(this.skinning = !1),
(this.morphTargets = !1),
(this.map = null),
(this.alphaMap = null),
(this.displacementMap = null),
(this.displacementScale = 1),
(this.displacementBias = 0),
(this.wireframe = !1),
(this.wireframeLinewidth = 1),
(this.fog = !1),
(this.lights = !1),
this.setValues(e);
}),
(n.MeshDepthMaterial.prototype = Object.create(n.Material.prototype)),
(n.MeshDepthMaterial.prototype.constructor = n.MeshDepthMaterial),
(n.MeshDepthMaterial.prototype.copy = function (e) {
return (
n.Material.prototype.copy.call(this, e),
(this.depthPacking = e.depthPacking),
(this.skinning = e.skinning),
(this.morphTargets = e.morphTargets),
(this.map = e.map),
(this.alphaMap = e.alphaMap),
(this.displacementMap = e.displacementMap),
(this.displacementScale = e.displacementScale),
(this.displacementBias = e.displacementBias),
(this.wireframe = e.wireframe),
(this.wireframeLinewidth = e.wireframeLinewidth),
this
);
}),
(n.MeshLambertMaterial = function (e) {
n.Material.call(this),
(this.type = "MeshLambertMaterial"),
(this.color = new n.Color(16777215)),
(this.map = null),
(this.lightMap = null),
(this.lightMapIntensity = 1),
(this.aoMap = null),
(this.aoMapIntensity = 1),
(this.emissive = new n.Color(0)),
(this.emissiveIntensity = 1),
(this.emissiveMap = null),
(this.specularMap = null),
(this.alphaMap = null),
(this.envMap = null),
(this.combine = n.MultiplyOperation),
(this.reflectivity = 1),
(this.refractionRatio = 0.98),
(this.wireframe = !1),
(this.wireframeLinewidth = 1),
(this.wireframeLinecap = "round"),
(this.wireframeLinejoin = "round"),
(this.skinning = !1),
(this.morphTargets = !1),
(this.morphNormals = !1),
this.setValues(e);
}),
(n.MeshLambertMaterial.prototype = Object.create(n.Material.prototype)),
(n.MeshLambertMaterial.prototype.constructor = n.MeshLambertMaterial),
(n.MeshLambertMaterial.prototype.copy = function (e) {
return (
n.Material.prototype.copy.call(this, e),
this.color.copy(e.color),
(this.map = e.map),
(this.lightMap = e.lightMap),
(this.lightMapIntensity = e.lightMapIntensity),
(this.aoMap = e.aoMap),
(this.aoMapIntensity = e.aoMapIntensity),
this.emissive.copy(e.emissive),
(this.emissiveMap = e.emissiveMap),
(this.emissiveIntensity = e.emissiveIntensity),
(this.specularMap = e.specularMap),
(this.alphaMap = e.alphaMap),
(this.envMap = e.envMap),
(this.combine = e.combine),
(this.reflectivity = e.reflectivity),
(this.refractionRatio = e.refractionRatio),
(this.wireframe = e.wireframe),
(this.wireframeLinewidth = e.wireframeLinewidth),
(this.wireframeLinecap = e.wireframeLinecap),
(this.wireframeLinejoin = e.wireframeLinejoin),
(this.skinning = e.skinning),
(this.morphTargets = e.morphTargets),
(this.morphNormals = e.morphNormals),
this
);
}),
(n.MeshNormalMaterial = function (e) {
n.Material.call(this, e), (this.type = "MeshNormalMaterial"), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.fog = !1), (this.lights = !1), (this.morphTargets = !1), this.setValues(e);
}),
(n.MeshNormalMaterial.prototype = Object.create(n.Material.prototype)),
(n.MeshNormalMaterial.prototype.constructor = n.MeshNormalMaterial),
(n.MeshNormalMaterial.prototype.copy = function (e) {
return n.Material.prototype.copy.call(this, e), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), this;
}),
(n.MeshPhongMaterial = function (e) {
n.Material.call(this),
(this.type = "MeshPhongMaterial"),
(this.color = new n.Color(16777215)),
(this.specular = new n.Color(1118481)),
(this.shininess = 30),
(this.map = null),
(this.lightMap = null),
(this.lightMapIntensity = 1),
(this.aoMap = null),
(this.aoMapIntensity = 1),
(this.emissive = new n.Color(0)),
(this.emissiveIntensity = 1),
(this.emissiveMap = null),
(this.bumpMap = null),
(this.bumpScale = 1),
(this.normalMap = null),
(this.normalScale = new n.Vector2(1, 1)),
(this.displacementMap = null),
(this.displacementScale = 1),
(this.displacementBias = 0),
(this.specularMap = null),
(this.alphaMap = null),
(this.envMap = null),
(this.combine = n.MultiplyOperation),
(this.reflectivity = 1),
(this.refractionRatio = 0.98),
(this.wireframe = !1),
(this.wireframeLinewidth = 1),
(this.wireframeLinecap = "round"),
(this.wireframeLinejoin = "round"),
(this.skinning = !1),
(this.morphTargets = !1),
(this.morphNormals = !1),
this.setValues(e);
}),
(n.MeshPhongMaterial.prototype = Object.create(n.Material.prototype)),
(n.MeshPhongMaterial.prototype.constructor = n.MeshPhongMaterial),
(n.MeshPhongMaterial.prototype.copy = function (e) {
return (
n.Material.prototype.copy.call(this, e),
this.color.copy(e.color),
this.specular.copy(e.specular),
(this.shininess = e.shininess),
(this.map = e.map),
(this.lightMap = e.lightMap),
(this.lightMapIntensity = e.lightMapIntensity),
(this.aoMap = e.aoMap),
(this.aoMapIntensity = e.aoMapIntensity),
this.emissive.copy(e.emissive),
(this.emissiveMap = e.emissiveMap),
(this.emissiveIntensity = e.emissiveIntensity),
(this.bumpMap = e.bumpMap),
(this.bumpScale = e.bumpScale),
(this.normalMap = e.normalMap),
this.normalScale.copy(e.normalScale),
(this.displacementMap = e.displacementMap),
(this.displacementScale = e.displacementScale),
(this.displacementBias = e.displacementBias),
(this.specularMap = e.specularMap),
(this.alphaMap = e.alphaMap),
(this.envMap = e.envMap),
(this.combine = e.combine),
(this.reflectivity = e.reflectivity),
(this.refractionRatio = e.refractionRatio),
(this.wireframe = e.wireframe),
(this.wireframeLinewidth = e.wireframeLinewidth),
(this.wireframeLinecap = e.wireframeLinecap),
(this.wireframeLinejoin = e.wireframeLinejoin),
(this.skinning = e.skinning),
(this.morphTargets = e.morphTargets),
(this.morphNormals = e.morphNormals),
this
);
}),
(n.MeshStandardMaterial = function (e) {
n.Material.call(this),
(this.defines = {
STANDARD: ""
}),
(this.type = "MeshStandardMaterial"),
(this.color = new n.Color(16777215)),
(this.roughness = 0.5),
(this.metalness = 0.5),
(this.map = null),
(this.lightMap = null),
(this.lightMapIntensity = 1),
(this.aoMap = null),
(this.aoMapIntensity = 1),
(this.emissive = new n.Color(0)),
(this.emissiveIntensity = 1),
(this.emissiveMap = null),
(this.bumpMap = null),
(this.bumpScale = 1),
(this.normalMap = null),
(this.normalScale = new n.Vector2(1, 1)),
(this.displacementMap = null),
(this.displacementScale = 1),
(this.displacementBias = 0),
(this.roughnessMap = null),
(this.metalnessMap = null),
(this.alphaMap = null),
(this.envMap = null),
(this.envMapIntensity = 1),
(this.refractionRatio = 0.98),
(this.wireframe = !1),
(this.wireframeLinewidth = 1),
(this.wireframeLinecap = "round"),
(this.wireframeLinejoin = "round"),
(this.skinning = !1),
(this.morphTargets = !1),
(this.morphNormals = !1),
this.setValues(e);
}),
(n.MeshStandardMaterial.prototype = Object.create(n.Material.prototype)),
(n.MeshStandardMaterial.prototype.constructor = n.MeshStandardMaterial),
(n.MeshStandardMaterial.prototype.copy = function (e) {
return (
n.Material.prototype.copy.call(this, e),
(this.defines = {
STANDARD: ""
}),
this.color.copy(e.color),
(this.roughness = e.roughness),
(this.metalness = e.metalness),
(this.map = e.map),
(this.lightMap = e.lightMap),
(this.lightMapIntensity = e.lightMapIntensity),
(this.aoMap = e.aoMap),
(this.aoMapIntensity = e.aoMapIntensity),
this.emissive.copy(e.emissive),
(this.emissiveMap = e.emissiveMap),
(this.emissiveIntensity = e.emissiveIntensity),
(this.bumpMap = e.bumpMap),
(this.bumpScale = e.bumpScale),
(this.normalMap = e.normalMap),
this.normalScale.copy(e.normalScale),
(this.displacementMap = e.displacementMap),
(this.displacementScale = e.displacementScale),
(this.displacementBias = e.displacementBias),
(this.roughnessMap = e.roughnessMap),
(this.metalnessMap = e.metalnessMap),
(this.alphaMap = e.alphaMap),
(this.envMap = e.envMap),
(this.envMapIntensity = e.envMapIntensity),
(this.refractionRatio = e.refractionRatio),
(this.wireframe = e.wireframe),
(this.wireframeLinewidth = e.wireframeLinewidth),
(this.wireframeLinecap = e.wireframeLinecap),
(this.wireframeLinejoin = e.wireframeLinejoin),
(this.skinning = e.skinning),
(this.morphTargets = e.morphTargets),
(this.morphNormals = e.morphNormals),
this
);
}),
(n.MeshPhysicalMaterial = function (e) {
n.MeshStandardMaterial.call(this), (this.defines = {
PHYSICAL: ""
}), (this.type = "MeshPhysicalMaterial"), (this.reflectivity = 0.5), (this.clearCoat = 0), (this.clearCoatRoughness = 0), this.setValues(e);
}),
(n.MeshPhysicalMaterial.prototype = Object.create(n.MeshStandardMaterial.prototype)),
(n.MeshPhysicalMaterial.prototype.constructor = n.MeshPhysicalMaterial),
(n.MeshPhysicalMaterial.prototype.copy = function (e) {
return (
n.MeshStandardMaterial.prototype.copy.call(this, e), (this.defines = {
PHYSICAL: ""
}), (this.reflectivity = e.reflectivity), (this.clearCoat = e.clearCoat), (this.clearCoatRoughness = e.clearCoatRoughness), this
);
}),
(n.MultiMaterial = function (e) {
(this.uuid = n.Math.generateUUID()), (this.type = "MultiMaterial"), (this.materials = e instanceof Array ? e : []), (this.visible = !0);
}),
(n.MultiMaterial.prototype = {
constructor: n.MultiMaterial,
toJSON: function (e) {
for (var t = {
metadata: {
version: 4.2,
type: "material",
generator: "MaterialExporter"
},
uuid: this.uuid,
type: this.type,
materials: []
}, i = this.materials, n = 0, r = i.length; r > n; n++) {
var o = i[n].toJSON(e);
delete o.metadata, t.materials.push(o);
}
return (t.visible = this.visible), t;
},
clone: function () {
for (var e = new this.constructor(), t = 0; t < this.materials.length; t++) e.materials.push(this.materials[t].clone());
return (e.visible = this.visible), e;
},
}),
(n.PointsMaterial = function (e) {
n.Material.call(this), (this.type = "PointsMaterial"), (this.color = new n.Color(16777215)), (this.map = null), (this.size = 1), (this.sizeAttenuation = !0), (this.lights = !1), this.setValues(e);
}),
(n.PointsMaterial.prototype = Object.create(n.Material.prototype)),
(n.PointsMaterial.prototype.constructor = n.PointsMaterial),
(n.PointsMaterial.prototype.copy = function (e) {
return n.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.map = e.map), (this.size = e.size), (this.sizeAttenuation = e.sizeAttenuation), this;
}),
(n.ShaderMaterial = function (e) {
n.Material.call(this),
(this.type = "ShaderMaterial"),
(this.defines = {}),
(this.uniforms = {}),
(this.vertexShader = "void main() {n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );n}"),
(this.fragmentShader = "void main() {n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );n}"),
(this.linewidth = 1),
(this.wireframe = !1),
(this.wireframeLinewidth = 1),
(this.fog = !1),
(this.lights = !1),
(this.clipping = !1),
(this.skinning = !1),
(this.morphTargets = !1),
(this.morphNormals = !1),
(this.extensions = {
derivatives: !1,
fragDepth: !1,
drawBuffers: !1,
shaderTextureLOD: !1
}),
(this.defaultAttributeValues = {
color: [1, 1, 1],
uv: [0, 0],
uv2: [0, 0]
}),
(this.index0AttributeName = void 0),
void 0 !== e && (void 0 !== e.attributes && console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."), this.setValues(e));
}),
(n.ShaderMaterial.prototype = Object.create(n.Material.prototype)),
(n.ShaderMaterial.prototype.constructor = n.ShaderMaterial),
(n.ShaderMaterial.prototype.copy = function (e) {
return (
n.Material.prototype.copy.call(this, e),
(this.fragmentShader = e.fragmentShader),
(this.vertexShader = e.vertexShader),
(this.uniforms = n.UniformsUtils.clone(e.uniforms)),
(this.defines = e.defines),
(this.wireframe = e.wireframe),
(this.wireframeLinewidth = e.wireframeLinewidth),
(this.lights = e.lights),
(this.clipping = e.clipping),
(this.skinning = e.skinning),
(this.morphTargets = e.morphTargets),
(this.morphNormals = e.morphNormals),
(this.extensions = e.extensions),
this
);
}),
(n.ShaderMaterial.prototype.toJSON = function (e) {
var t = n.Material.prototype.toJSON.call(this, e);
return (t.uniforms = this.uniforms), (t.vertexShader = this.vertexShader), (t.fragmentShader = this.fragmentShader), t;
}),
(n.RawShaderMaterial = function (e) {
n.ShaderMaterial.call(this, e), (this.type = "RawShaderMaterial");
}),
(n.RawShaderMaterial.prototype = Object.create(n.ShaderMaterial.prototype)),
(n.RawShaderMaterial.prototype.constructor = n.RawShaderMaterial),
(n.SpriteMaterial = function (e) {
n.Material.call(this), (this.type = "SpriteMaterial"), (this.color = new n.Color(16777215)), (this.map = null), (this.rotation = 0), (this.fog = !1), (this.lights = !1), this.setValues(e);
}),
(n.SpriteMaterial.prototype = Object.create(n.Material.prototype)),
(n.SpriteMaterial.prototype.constructor = n.SpriteMaterial),
(n.SpriteMaterial.prototype.copy = function (e) {
return n.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.map = e.map), (this.rotation = e.rotation), this;
}),
(n.ShadowMaterial = function () {
n.ShaderMaterial.call(this, {
uniforms: n.UniformsUtils.merge([n.UniformsLib.lights, {
opacity: {
value: 1
}
}]),
vertexShader: n.ShaderChunk.shadow_vert,
fragmentShader: n.ShaderChunk.shadow_frag
}),
(this.lights = !0),
(this.transparent = !0),
Object.defineProperties(this, {
opacity: {
enumerable: !0,
get: function () {
return this.uniforms.opacity.value;
},
set: function (e) {
this.uniforms.opacity.value = e;
},
},
});
}),
(n.ShadowMaterial.prototype = Object.create(n.ShaderMaterial.prototype)),
(n.ShadowMaterial.prototype.constructor = n.ShadowMaterial),
(n.Texture = function (e, t, i, r, o, a, s, l, c, u) {
Object.defineProperty(this, "id", {
value: n.TextureIdCount++
}),
(this.uuid = n.Math.generateUUID()),
(this.name = ""),
(this.sourceFile = ""),
(this.image = void 0 !== e ? e : n.Texture.DEFAULT_IMAGE),
(this.mipmaps = []),
(this.mapping = void 0 !== t ? t : n.Texture.DEFAULT_MAPPING),
(this.wrapS = void 0 !== i ? i : n.ClampToEdgeWrapping),
(this.wrapT = void 0 !== r ? r : n.ClampToEdgeWrapping),
(this.magFilter = void 0 !== o ? o : n.LinearFilter),
(this.minFilter = void 0 !== a ? a : n.LinearMipMapLinearFilter),
(this.anisotropy = void 0 !== c ? c : 1),
(this.format = void 0 !== s ? s : n.RGBAFormat),
(this.type = void 0 !== l ? l : n.UnsignedByteType),
(this.offset = new n.Vector2(0, 0)),
(this.repeat = new n.Vector2(1, 1)),
(this.generateMipmaps = !0),
(this.premultiplyAlpha = !1),
(this.flipY = !0),
(this.unpackAlignment = 4),
(this.encoding = void 0 !== u ? u : n.LinearEncoding),
(this.version = 0),
(this.onUpdate = null);
}),
(n.Texture.DEFAULT_IMAGE = void 0),
(n.Texture.DEFAULT_MAPPING = n.UVMapping),
(n.Texture.prototype = {
constructor: n.Texture,
set needsUpdate(e) {
e === !0 && this.version++;
},
clone: function () {
return new this.constructor().copy(this);
},
copy: function (e) {
return (
(this.image = e.image),
(this.mipmaps = e.mipmaps.slice(0)),
(this.mapping = e.mapping),
(this.wrapS = e.wrapS),
(this.wrapT = e.wrapT),
(this.magFilter = e.magFilter),
(this.minFilter = e.minFilter),
(this.anisotropy = e.anisotropy),
(this.format = e.format),
(this.type = e.type),
this.offset.copy(e.offset),
this.repeat.copy(e.repeat),
(this.generateMipmaps = e.generateMipmaps),
(this.premultiplyAlpha = e.premultiplyAlpha),
(this.flipY = e.flipY),
(this.unpackAlignment = e.unpackAlignment),
(this.encoding = e.encoding),
this
);
},
toJSON: function (e) {
function t(e) {
var t;
return (
void 0 !== e.toDataURL ?
(t = e) :
((t = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas")), (t.width = e.width), (t.height = e.height), t.getContext("2d").drawImage(e, 0, 0, e.width, e.height)),
t.width > 2048 || t.height > 2048 ? t.toDataURL("image/jpeg", 0.6) : t.toDataURL("image/png")
);
}
if (void 0 !== e.textures[this.uuid]) return e.textures[this.uuid];
var i = {
metadata: {
version: 4.4,
type: "Texture",
generator: "Texture.toJSON"
},
uuid: this.uuid,
name: this.name,
mapping: this.mapping,
repeat: [this.repeat.x, this.repeat.y],
offset: [this.offset.x, this.offset.y],
wrap: [this.wrapS, this.wrapT],
minFilter: this.minFilter,
magFilter: this.magFilter,
anisotropy: this.anisotropy,
flipY: this.flipY,
};
if (void 0 !== this.image) {
var r = this.image;
void 0 === r.uuid && (r.uuid = n.Math.generateUUID()), void 0 === e.images[r.uuid] && (e.images[r.uuid] = {
uuid: r.uuid,
url: t(r)
}), (i.image = r.uuid);
}
return (e.textures[this.uuid] = i), i;
},
dispose: function () {
this.dispatchEvent({
type: "dispose"
});
},
transformUv: function (e) {
if (this.mapping === n.UVMapping) {
if ((e.multiply(this.repeat), e.add(this.offset), e.x < 0 || e.x > 1))
switch (this.wrapS) {
case n.RepeatWrapping:
e.x = e.x - Math.floor(e.x);
break;
case n.ClampToEdgeWrapping:
e.x = e.x < 0 ? 0 : 1;
break;
case n.MirroredRepeatWrapping:
1 === Math.abs(Math.floor(e.x) % 2) ? (e.x = Math.ceil(e.x) - e.x) : (e.x = e.x - Math.floor(e.x));
}
if (e.y < 0 || e.y > 1)
switch (this.wrapT) {
case n.RepeatWrapping:
e.y = e.y - Math.floor(e.y);
break;
case n.ClampToEdgeWrapping:
e.y = e.y < 0 ? 0 : 1;
break;
case n.MirroredRepeatWrapping:
1 === Math.abs(Math.floor(e.y) % 2) ? (e.y = Math.ceil(e.y) - e.y) : (e.y = e.y - Math.floor(e.y));
}
this.flipY && (e.y = 1 - e.y);
}
},
}),
Object.assign(n.Texture.prototype, n.EventDispatcher.prototype),
(n.TextureIdCount = 0),
(n.DepthTexture = function (e, t, i, r, o, a, s, l, c) {
n.Texture.call(this, null, r, o, a, s, l, n.DepthFormat, i, c),
(this.image = {
width: e,
height: t
}),
(this.type = void 0 !== i ? i : n.UnsignedShortType),
(this.magFilter = void 0 !== s ? s : n.NearestFilter),
(this.minFilter = void 0 !== l ? l : n.NearestFilter),
(this.flipY = !1),
(this.generateMipmaps = !1);
}),
(n.DepthTexture.prototype = Object.create(n.Texture.prototype)),
(n.DepthTexture.prototype.constructor = n.DepthTexture),
(n.CanvasTexture = function (e, t, i, r, o, a, s, l, c) {
n.Texture.call(this, e, t, i, r, o, a, s, l, c), (this.needsUpdate = !0);
}),
(n.CanvasTexture.prototype = Object.create(n.Texture.prototype)),
(n.CanvasTexture.prototype.constructor = n.CanvasTexture),
(n.CubeTexture = function (e, t, i, r, o, a, s, l, c, u) {
(e = void 0 !== e ? e : []), (t = void 0 !== t ? t : n.CubeReflectionMapping), n.Texture.call(this, e, t, i, r, o, a, s, l, c, u), (this.flipY = !1);
}),
(n.CubeTexture.prototype = Object.create(n.Texture.prototype)),
(n.CubeTexture.prototype.constructor = n.CubeTexture),
Object.defineProperty(n.CubeTexture.prototype, "images", {
get: function () {
return this.image;
},
set: function (e) {
this.image = e;
},
}),
(n.CompressedTexture = function (e, t, i, r, o, a, s, l, c, u, h, d) {
n.Texture.call(this, null, a, s, l, c, u, r, o, h, d), (this.image = {
width: t,
height: i
}), (this.mipmaps = e), (this.flipY = !1), (this.generateMipmaps = !1);
}),
(n.CompressedTexture.prototype = Object.create(n.Texture.prototype)),
(n.CompressedTexture.prototype.constructor = n.CompressedTexture),
(n.DataTexture = function (e, t, i, r, o, a, s, l, c, u, h, d) {
n.Texture.call(this, null, a, s, l, c, u, r, o, h, d),
(this.image = {
data: e,
width: t,
height: i
}),
(this.magFilter = void 0 !== c ? c : n.NearestFilter),
(this.minFilter = void 0 !== u ? u : n.NearestFilter),
(this.flipY = !1),
(this.generateMipmaps = !1);
}),
(n.DataTexture.prototype = Object.create(n.Texture.prototype)),
(n.DataTexture.prototype.constructor = n.DataTexture),
(n.VideoTexture = function (e, t, i, r, o, a, s, l, c) {
function u() {
requestAnimationFrame(u), e.readyState >= e.HAVE_CURRENT_DATA && (h.needsUpdate = !0);
}
n.Texture.call(this, e, t, i, r, o, a, s, l, c), (this.generateMipmaps = !1);
var h = this;
u();
}),
(n.VideoTexture.prototype = Object.create(n.Texture.prototype)),
(n.VideoTexture.prototype.constructor = n.VideoTexture),
(n.Group = function () {
n.Object3D.call(this), (this.type = "Group");
}),
(n.Group.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.Group
})),
(n.Points = function (e, t) {
n.Object3D.call(this), (this.type = "Points"), (this.geometry = void 0 !== e ? e : new n.BufferGeometry()), (this.material = void 0 !== t ? t : new n.PointsMaterial({
color: 16777215 * Math.random()
}));
}),
(n.Points.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.Points,
raycast: (function () {
var e = new n.Matrix4(),
t = new n.Ray(),
i = new n.Sphere();
return function (r, o) {
function a(e, i) {
var n = t.distanceSqToPoint(e);
if (d > n) {
var a = t.closestPointToPoint(e);
a.applyMatrix4(c);
var l = r.ray.origin.distanceTo(a);
if (l < r.near || l > r.far) return;
o.push({
distance: l,
distanceToRay: Math.sqrt(n),
point: a.clone(),
index: i,
face: null,
object: s
});
}
}
var s = this,
l = this.geometry,
c = this.matrixWorld,
u = r.params.Points.threshold;
if ((null === l.boundingSphere && l.computeBoundingSphere(), i.copy(l.boundingSphere), i.applyMatrix4(c), r.ray.intersectsSphere(i) !== !1)) {
e.getInverse(c), t.copy(r.ray).applyMatrix4(e);
var h = u / ((this.scale.x + this.scale.y + this.scale.z) / 3),
d = h * h,
f = new n.Vector3();
if (l instanceof n.BufferGeometry) {
var p = l.index,
m = l.attributes,
v = m.position.array;
if (null !== p)
for (var g = p.array, y = 0, _ = g.length; _ > y; y++) {
var b = g[y];
f.fromArray(v, 3 * b), a(f, b);
}
else
for (var y = 0, x = v.length / 3; x > y; y++) f.fromArray(v, 3 * y), a(f, y);
} else
for (var w = l.vertices, y = 0, x = w.length; x > y; y++) a(w[y], y);
}
};
})(),
clone: function () {
return new this.constructor(this.geometry, this.material).copy(this);
},
})),
(n.Line = function (e, t, i) {
return 1 === i ?
(console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."), new n.LineSegments(e, t)) :
(n.Object3D.call(this),
(this.type = "Line"),
(this.geometry = void 0 !== e ? e : new n.BufferGeometry()),
void(this.material = void 0 !== t ? t : new n.LineBasicMaterial({
color: 16777215 * Math.random()
})));
}),
(n.Line.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.Line,
raycast: (function () {
var e = new n.Matrix4(),
t = new n.Ray(),
i = new n.Sphere();
return function (r, o) {
var a = r.linePrecision,
s = a * a,
l = this.geometry,
c = this.matrixWorld;
if ((null === l.boundingSphere && l.computeBoundingSphere(), i.copy(l.boundingSphere), i.applyMatrix4(c), r.ray.intersectsSphere(i) !== !1)) {
e.getInverse(c), t.copy(r.ray).applyMatrix4(e);
var u = new n.Vector3(),
h = new n.Vector3(),
d = new n.Vector3(),
f = new n.Vector3(),
p = this instanceof n.LineSegments ? 2 : 1;
if (l instanceof n.BufferGeometry) {
var m = l.index,
v = l.attributes,
g = v.position.array;
if (null !== m)
for (var y = m.array, _ = 0, b = y.length - 1; b > _; _ += p) {
var x = y[_],
w = y[_ + 1];
u.fromArray(g, 3 * x), h.fromArray(g, 3 * w);
var M = t.distanceSqToSegment(u, h, f, d);
if (!(M > s)) {
f.applyMatrix4(this.matrixWorld);
var T = r.ray.origin.distanceTo(f);
T < r.near || T > r.far || o.push({
distance: T,
point: d.clone().applyMatrix4(this.matrixWorld),
index: _,
face: null,
faceIndex: null,
object: this
});
}
}
else
for (var _ = 0, b = g.length / 3 - 1; b > _; _ += p) {
u.fromArray(g, 3 * _), h.fromArray(g, 3 * _ + 3);
var M = t.distanceSqToSegment(u, h, f, d);
if (!(M > s)) {
f.applyMatrix4(this.matrixWorld);
var T = r.ray.origin.distanceTo(f);
T < r.near || T > r.far || o.push({
distance: T,
point: d.clone().applyMatrix4(this.matrixWorld),
index: _,
face: null,
faceIndex: null,
object: this
});
}
}
} else if (l instanceof n.Geometry)
for (var S = l.vertices, E = S.length, _ = 0; E - 1 > _; _ += p) {
var M = t.distanceSqToSegment(S[_], S[_ + 1], f, d);
if (!(M > s)) {
f.applyMatrix4(this.matrixWorld);
var T = r.ray.origin.distanceTo(f);
T < r.near || T > r.far || o.push({
distance: T,
point: d.clone().applyMatrix4(this.matrixWorld),
index: _,
face: null,
faceIndex: null,
object: this
});
}
}
}
};
})(),
clone: function () {
return new this.constructor(this.geometry, this.material).copy(this);
},
})),
(n.LineSegments = function (e, t) {
n.Line.call(this, e, t), (this.type = "LineSegments");
}),
(n.LineSegments.prototype = Object.assign(Object.create(n.Line.prototype), {
constructor: n.LineSegments
})),
(n.Mesh = function (e, t) {
n.Object3D.call(this),
(this.type = "Mesh"),
(this.geometry = void 0 !== e ? e : new n.BufferGeometry()),
(this.material = void 0 !== t ? t : new n.MeshBasicMaterial({
color: 16777215 * Math.random()
})),
(this.drawMode = n.TrianglesDrawMode),
this.updateMorphTargets();
}),
(n.Mesh.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.Mesh,
setDrawMode: function (e) {
this.drawMode = e;
},
copy: function (e) {
return n.Object3D.prototype.copy.call(this, e), (this.drawMode = e.drawMode), this;
},
updateMorphTargets: function () {
if (void 0 !== this.geometry.morphTargets && this.geometry.morphTargets.length > 0) {
(this.morphTargetBase = -1), (this.morphTargetInfluences = []), (this.morphTargetDictionary = {});
for (var e = 0, t = this.geometry.morphTargets.length; t > e; e++) this.morphTargetInfluences.push(0), (this.morphTargetDictionary[this.geometry.morphTargets[e].name] = e);
}
},
getMorphTargetIndexByName: function (e) {
return void 0 !== this.morphTargetDictionary[e] ? this.morphTargetDictionary[e] : (console.warn("THREE.Mesh.getMorphTargetIndexByName: morph target " + e + " does not exist. Returning 0."), 0);
},
raycast: (function () {
function e(e, t, i, r, o, a, s) {
return n.Triangle.barycoordFromPoint(e, t, i, r, v), o.multiplyScalar(v.x), a.multiplyScalar(v.y), s.multiplyScalar(v.z), o.add(a).add(s), o.clone();
}
function t(e, t, i, r, o, a, s) {
var l,
c = e.material;
if (((l = c.side === n.BackSide ? i.intersectTriangle(a, o, r, !0, s) : i.intersectTriangle(r, o, a, c.side !== n.DoubleSide, s)), null === l)) return null;
y.copy(s), y.applyMatrix4(e.matrixWorld);
var u = t.ray.origin.distanceTo(y);
return u < t.near || u > t.far ? null : {
distance: u,
point: y.clone(),
object: e
};
}
function i(i, r, o, a, u, h, d, v) {
s.fromArray(a, 3 * h), l.fromArray(a, 3 * d), c.fromArray(a, 3 * v);
var y = t(i, r, o, s, l, c, g);
return y && (u && (f.fromArray(u, 2 * h), p.fromArray(u, 2 * d), m.fromArray(u, 2 * v), (y.uv = e(g, s, l, c, f, p, m))), (y.face = new n.Face3(h, d, v, n.Triangle.normal(s, l, c))), (y.faceIndex = h)), y;
}
var r = new n.Matrix4(),
o = new n.Ray(),
a = new n.Sphere(),
s = new n.Vector3(),
l = new n.Vector3(),
c = new n.Vector3(),
u = new n.Vector3(),
h = new n.Vector3(),
d = new n.Vector3(),
f = new n.Vector2(),
p = new n.Vector2(),
m = new n.Vector2(),
v = new n.Vector3(),
g = new n.Vector3(),
y = new n.Vector3();
return function (v, y) {
var _ = this.geometry,
b = this.material,
x = this.matrixWorld;
if (
void 0 !== b &&
(null === _.boundingSphere && _.computeBoundingSphere(),
a.copy(_.boundingSphere),
a.applyMatrix4(x),
v.ray.intersectsSphere(a) !== !1 && (r.getInverse(x), o.copy(v.ray).applyMatrix4(r), null === _.boundingBox || o.intersectsBox(_.boundingBox) !== !1))
) {
var w, M;
if (_ instanceof n.BufferGeometry) {
var T,
S,
E,
A = _.index,
C = _.attributes,
P = C.position.array;
if ((void 0 !== C.uv && (w = C.uv.array), null !== A))
for (var L = A.array, R = 0, O = L.length; O > R; R += 3)(T = L[R]), (S = L[R + 1]), (E = L[R + 2]), (M = i(this, v, o, P, w, T, S, E)), M && ((M.faceIndex = Math.floor(R / 3)), y.push(M));
else
for (var R = 0, O = P.length; O > R; R += 9)(T = R / 3), (S = T + 1), (E = T + 2), (M = i(this, v, o, P, w, T, S, E)), M && ((M.index = T), y.push(M));
} else if (_ instanceof n.Geometry) {
var k,
D,
I,
N = b instanceof n.MultiMaterial,
U = N === !0 ? b.materials : null,
j = _.vertices,
B = _.faces,
F = _.faceVertexUvs[0];
F.length > 0 && (w = F);
for (var V = 0, G = B.length; G > V; V++) {
var z = B[V],
$ = N === !0 ? U[z.materialIndex] : b;
if (void 0 !== $) {
if (((k = j[z.a]), (D = j[z.b]), (I = j[z.c]), $.morphTargets === !0)) {
var H = _.morphTargets,
W = this.morphTargetInfluences;
s.set(0, 0, 0), l.set(0, 0, 0), c.set(0, 0, 0);
for (var X = 0, Y = H.length; Y > X; X++) {
var q = W[X];
if (0 !== q) {
var Z = H[X].vertices;
s.addScaledVector(u.subVectors(Z[z.a], k), q), l.addScaledVector(h.subVectors(Z[z.b], D), q), c.addScaledVector(d.subVectors(Z[z.c], I), q);
}
}
s.add(k), l.add(D), c.add(I), (k = s), (D = l), (I = c);
}
if ((M = t(this, v, o, k, D, I, g))) {
if (w) {
var K = w[V];
f.copy(K[0]), p.copy(K[1]), m.copy(K[2]), (M.uv = e(g, k, D, I, f, p, m));
}
(M.face = z), (M.faceIndex = V), y.push(M);
}
}
}
}
}
};
})(),
clone: function () {
return new this.constructor(this.geometry, this.material).copy(this);
},
})),
(n.Bone = function (e) {
n.Object3D.call(this), (this.type = "Bone"), (this.skin = e);
}),
(n.Bone.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.Bone,
copy: function (e) {
return n.Object3D.prototype.copy.call(this, e), (this.skin = e.skin), this;
},
})),
(n.Skeleton = function (e, t, i) {
if (((this.useVertexTexture = void 0 !== i ? i : !0), (this.identityMatrix = new n.Matrix4()), (e = e || []), (this.bones = e.slice(0)), this.useVertexTexture)) {
var r = Math.sqrt(4 * this.bones.length);
(r = n.Math.nextPowerOfTwo(Math.ceil(r))),
(r = Math.max(r, 4)),
(this.boneTextureWidth = r),
(this.boneTextureHeight = r),
(this.boneMatrices = new Float32Array(this.boneTextureWidth * this.boneTextureHeight * 4)),
(this.boneTexture = new n.DataTexture(this.boneMatrices, this.boneTextureWidth, this.boneTextureHeight, n.RGBAFormat, n.FloatType));
} else this.boneMatrices = new Float32Array(16 * this.bones.length);
if (void 0 === t) this.calculateInverses();
else if (this.bones.length === t.length) this.boneInverses = t.slice(0);
else {
console.warn("THREE.Skeleton bonInverses is the wrong length."), (this.boneInverses = []);
for (var o = 0, a = this.bones.length; a > o; o++) this.boneInverses.push(new n.Matrix4());
}
}),
Object.assign(n.Skeleton.prototype, {
calculateInverses: function () {
this.boneInverses = [];
for (var e = 0, t = this.bones.length; t > e; e++) {
var i = new n.Matrix4();
this.bones[e] && i.getInverse(this.bones[e].matrixWorld), this.boneInverses.push(i);
}
},
pose: function () {
for (var e, t = 0, i = this.bones.length; i > t; t++)(e = this.bones[t]), e && e.matrixWorld.getInverse(this.boneInverses[t]);
for (var t = 0, i = this.bones.length; i > t; t++)
(e = this.bones[t]),
e && (e.parent instanceof n.Bone ? (e.matrix.getInverse(e.parent.matrixWorld), e.matrix.multiply(e.matrixWorld)) : e.matrix.copy(e.matrixWorld), e.matrix.decompose(e.position, e.quaternion, e.scale));
},
update: (function () {
var e = new n.Matrix4();
return function () {
for (var t = 0, i = this.bones.length; i > t; t++) {
var n = this.bones[t] ? this.bones[t].matrixWorld : this.identityMatrix;
e.multiplyMatrices(n, this.boneInverses[t]), e.toArray(this.boneMatrices, 16 * t);
}
this.useVertexTexture && (this.boneTexture.needsUpdate = !0);
};
})(),
clone: function () {
return new n.Skeleton(this.bones, this.boneInverses, this.useVertexTexture);
},
}),
(n.SkinnedMesh = function (e, t, i) {
n.Mesh.call(this, e, t), (this.type = "SkinnedMesh"), (this.bindMode = "attached"), (this.bindMatrix = new n.Matrix4()), (this.bindMatrixInverse = new n.Matrix4());
var r = [];
if (this.geometry && void 0 !== this.geometry.bones) {
for (var o, a, s = 0, l = this.geometry.bones.length; l > s; ++s)
(a = this.geometry.bones[s]), (o = new n.Bone(this)), r.push(o), (o.name = a.name), o.position.fromArray(a.pos), o.quaternion.fromArray(a.rotq), void 0 !== a.scl && o.scale.fromArray(a.scl);
for (var s = 0, l = this.geometry.bones.length; l > s; ++s)(a = this.geometry.bones[s]), -1 !== a.parent && null !== a.parent && void 0 !== r[a.parent] ? r[a.parent].add(r[s]) : this.add(r[s]);
}
this.normalizeSkinWeights(), this.updateMatrixWorld(!0), this.bind(new n.Skeleton(r, void 0, i), this.matrixWorld);
}),
(n.SkinnedMesh.prototype = Object.assign(Object.create(n.Mesh.prototype), {
constructor: n.SkinnedMesh,
bind: function (e, t) {
(this.skeleton = e), void 0 === t && (this.updateMatrixWorld(!0), this.skeleton.calculateInverses(), (t = this.matrixWorld)), this.bindMatrix.copy(t), this.bindMatrixInverse.getInverse(t);
},
pose: function () {
this.skeleton.pose();
},
normalizeSkinWeights: function () {
if (this.geometry instanceof n.Geometry)
for (var e = 0; e < this.geometry.skinWeights.length; e++) {
var t = this.geometry.skinWeights[e],
i = 1 / t.lengthManhattan();
i !== 1 / 0 ? t.multiplyScalar(i) : t.set(1, 0, 0, 0);
}
else if (this.geometry instanceof n.BufferGeometry)
for (var r = new n.Vector4(), o = this.geometry.attributes.skinWeight, e = 0; e < o.count; e++) {
(r.x = o.getX(e)), (r.y = o.getY(e)), (r.z = o.getZ(e)), (r.w = o.getW(e));
var i = 1 / r.lengthManhattan();
i !== 1 / 0 ? r.multiplyScalar(i) : r.set(1, 0, 0, 0), o.setXYZW(e, r.x, r.y, r.z, r.w);
}
},
updateMatrixWorld: function (e) {
n.Mesh.prototype.updateMatrixWorld.call(this, !0),
"attached" === this.bindMode ?
this.bindMatrixInverse.getInverse(this.matrixWorld) :
"detached" === this.bindMode ?
this.bindMatrixInverse.getInverse(this.bindMatrix) :
console.warn("THREE.SkinnedMesh unrecognized bindMode: " + this.bindMode);
},
clone: function () {
return new this.constructor(this.geometry, this.material, this.skeleton.useVertexTexture).copy(this);
},
})),
(n.LOD = function () {
n.Object3D.call(this), (this.type = "LOD"), Object.defineProperties(this, {
levels: {
enumerable: !0,
value: []
}
});
}),
(n.LOD.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.LOD,
copy: function (e) {
n.Object3D.prototype.copy.call(this, e, !1);
for (var t = e.levels, i = 0, r = t.length; r > i; i++) {
var o = t[i];
this.addLevel(o.object.clone(), o.distance);
}
return this;
},
addLevel: function (e, t) {
void 0 === t && (t = 0), (t = Math.abs(t));
for (var i = this.levels, n = 0; n < i.length && !(t < i[n].distance); n++);
i.splice(n, 0, {
distance: t,
object: e
}), this.add(e);
},
getObjectForDistance: function (e) {
for (var t = this.levels, i = 1, n = t.length; n > i && !(e < t[i].distance); i++);
return t[i - 1].object;
},
raycast: (function () {
var e = new n.Vector3();
return function (t, i) {
e.setFromMatrixPosition(this.matrixWorld);
var n = t.ray.origin.distanceTo(e);
this.getObjectForDistance(n).raycast(t, i);
};
})(),
update: (function () {
var e = new n.Vector3(),
t = new n.Vector3();
return function (i) {
var n = this.levels;
if (n.length > 1) {
e.setFromMatrixPosition(i.matrixWorld), t.setFromMatrixPosition(this.matrixWorld);
var r = e.distanceTo(t);
n[0].object.visible = !0;
for (var o = 1, a = n.length; a > o && r >= n[o].distance; o++)(n[o - 1].object.visible = !1), (n[o].object.visible = !0);
for (; a > o; o++) n[o].object.visible = !1;
}
};
})(),
toJSON: function (e) {
var t = n.Object3D.prototype.toJSON.call(this, e);
t.object.levels = [];
for (var i = this.levels, r = 0, o = i.length; o > r; r++) {
var a = i[r];
t.object.levels.push({
object: a.object.uuid,
distance: a.distance
});
}
return t;
},
})),
(n.Sprite = function (e) {
n.Object3D.call(this), (this.type = "Sprite"), (this.material = void 0 !== e ? e : new n.SpriteMaterial());
}),
(n.Sprite.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.Sprite,
raycast: (function () {
var e = new n.Vector3();
return function (t, i) {
e.setFromMatrixPosition(this.matrixWorld);
var n = t.ray.distanceSqToPoint(e),
r = (this.scale.x * this.scale.y) / 4;
n > r || i.push({
distance: Math.sqrt(n),
point: this.position,
face: null,
object: this
});
};
})(),
clone: function () {
return new this.constructor(this.material).copy(this);
},
})),
(n.LensFlare = function (e, t, i, r, o) {
n.Object3D.call(this), (this.lensFlares = []), (this.positionScreen = new n.Vector3()), (this.customUpdateCallback = void 0), void 0 !== e && this.add(e, t, i, r, o);
}),
(n.LensFlare.prototype = Object.assign(Object.create(n.Object3D.prototype), {
constructor: n.LensFlare,
copy: function (e) {
n.Object3D.prototype.copy.call(this, e), this.positionScreen.copy(e.positionScreen), (this.customUpdateCallback = e.customUpdateCallback);
for (var t = 0, i = e.lensFlares.length; i > t; t++) this.lensFlares.push(e.lensFlares[t]);
return this;
},
add: function (e, t, i, r, o, a) {
void 0 === t && (t = -1),
void 0 === i && (i = 0),
void 0 === a && (a = 1),
void 0 === o && (o = new n.Color(16777215)),
void 0 === r && (r = n.NormalBlending),
(i = Math.min(i, Math.max(0, i))),
this.lensFlares.push({
texture: e,
size: t,
distance: i,
x: 0,
y: 0,
z: 0,
scale: 1,
rotation: 0,
opacity: a,
color: o,
blending: r
});
},
updateLensFlares: function () {
var e,
t,
i = this.lensFlares.length,
n = 2 * -this.positionScreen.x,
r = 2 * -this.positionScreen.y;
for (e = 0; i > e; e++)
(t = this.lensFlares[e]),
(t.x = this.positionScreen.x + n * t.distance),
(t.y = this.positionScreen.y + r * t.distance),
(t.wantedRotation = t.x * Math.PI * 0.25),
(t.rotation += 0.25 * (t.wantedRotation - t.rotation));
},
})),
(n.Scene = function () {
n.Object3D.call(this), (this.type = "Scene"), (this.background = null), (this.fog = null), (this.overrideMaterial = null), (this.autoUpdate = !0);
}),
(n.Scene.prototype = Object.create(n.Object3D.prototype)),
(n.Scene.prototype.constructor = n.Scene),
(n.Scene.prototype.copy = function (e, t) {
return (
n.Object3D.prototype.copy.call(this, e, t),
null !== e.background && (this.background = e.background.clone()),
null !== e.fog && (this.fog = e.fog.clone()),
null !== e.overrideMaterial && (this.overrideMaterial = e.overrideMaterial.clone()),
(this.autoUpdate = e.autoUpdate),
(this.matrixAutoUpdate = e.matrixAutoUpdate),
this
);
}),
(n.Fog = function (e, t, i) {
(this.name = ""), (this.color = new n.Color(e)), (this.near = void 0 !== t ? t : 1), (this.far = void 0 !== i ? i : 1e3);
}),
(n.Fog.prototype.clone = function () {
return new n.Fog(this.color.getHex(), this.near, this.far);
}),
(n.FogExp2 = function (e, t) {
(this.name = ""), (this.color = new n.Color(e)), (this.density = void 0 !== t ? t : 25e-5);
}),
(n.FogExp2.prototype.clone = function () {
return new n.FogExp2(this.color.getHex(), this.density);
}),
(n.ShaderChunk = {}),
(n.ShaderChunk.alphamap_fragment = "#ifdef USE_ALPHAMAPn diffuseColor.a *= texture2D( alphaMap, vUv ).g;n#endifn"),
(n.ShaderChunk.alphamap_pars_fragment = "#ifdef USE_ALPHAMAPn uniform sampler2D alphaMap;n#endifn"),
(n.ShaderChunk.alphatest_fragment = "#ifdef ALPHATESTn if ( diffuseColor.a < ALPHATEST ) discard;n#endifn"),
(n.ShaderChunk.aomap_fragment =
"#ifdef USE_AOMAPn float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;n reflectedLight.indirectDiffuse *= ambientOcclusion;n #if defined( USE_ENVMAP ) && defined( PHYSICAL )n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );n #endifn#endifn"),
(n.ShaderChunk.aomap_pars_fragment = "#ifdef USE_AOMAPn uniform sampler2D aoMap;n uniform float aoMapIntensity;n#endif"),
(n.ShaderChunk.begin_vertex = "nvec3 transformed = vec3( position );n"),
(n.ShaderChunk.beginnormal_vertex = "nvec3 objectNormal = vec3( normal );n"),
(n.ShaderChunk.bsdfs =
"bool testLightInRange( const in float lightDistance, const in float cutoffDistance ) {n return any( bvec2( cutoffDistance == 0.0, lightDistance < cutoffDistance ) );n}nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {n if( decayExponent > 0.0 ) {n#if defined ( PHYSICALLY_CORRECT_LIGHTS )n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );n float maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );n return distanceFalloff * maxDistanceCutoffFactor;n#elsen return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );n#endifn }n return 1.0;n}nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {n return RECIPROCAL_PI * diffuseColor;n}nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {n float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );n return ( 1.0 - specularColor ) * fresnel + specularColor;n}nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {n float a2 = pow2( alpha );n float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );n float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );n return 1.0 / ( gl * gv );n}nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {n float a2 = pow2( alpha );n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );n return 0.5 / max( gv + gl, EPSILON );n}nfloat D_GGX( const in float alpha, const in float dotNH ) {n float a2 = pow2( alpha );n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;n return RECIPROCAL_PI * a2 / pow2( denom );n}nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {n float alpha = pow2( roughness );n vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );n float dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );n float dotNH = saturate( dot( geometry.normal, halfDir ) );n float dotLH = saturate( dot( incidentLight.direction, halfDir ) );n vec3 F = F_Schlick( specularColor, dotLH );n float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );n float D = D_GGX( alpha, dotNH );n return F * ( G * D );n}nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );n vec4 r = roughness * c0 + c1;n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;n vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;n return specularColor * AB.x + AB.y;n}nfloat G_BlinnPhong_Implicit( ) {n return 0.25;n}nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );n}nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {n vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );n float dotNH = saturate( dot( geometry.normal, halfDir ) );n float dotLH = saturate( dot( incidentLight.direction, halfDir ) );n vec3 F = F_Schlick( specularColor, dotLH );n float G = G_BlinnPhong_Implicit( );n float D = D_BlinnPhong( shininess, dotNH );n return F * ( G * D );n}nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {n return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );n}nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {n return sqrt( 2.0 / ( blinnExponent + 2.0 ) );n}n"),
(n.ShaderChunk.bumpmap_pars_fragment =
"#ifdef USE_BUMPMAPn uniform sampler2D bumpMap;n uniform float bumpScale;n vec2 dHdxy_fwd() {n vec2 dSTdx = dFdx( vUv );n vec2 dSTdy = dFdy( vUv );n float Hll = bumpScale * texture2D( bumpMap, vUv ).x;n float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;n float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;n return vec2( dBx, dBy );n }n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {n vec3 vSigmaX = dFdx( surf_pos );n vec3 vSigmaY = dFdy( surf_pos );n vec3 vN = surf_norm;n vec3 R1 = cross( vSigmaY, vN );n vec3 R2 = cross( vN, vSigmaX );n float fDet = dot( vSigmaX, R1 );n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );n return normalize( abs( fDet ) * surf_norm - vGrad );n }n#endifn"),
(n.ShaderChunk.clipping_planes_fragment =
"#if NUM_CLIPPING_PLANES > 0n for ( int i = 0; i < NUM_CLIPPING_PLANES; ++ i ) {n vec4 plane = clippingPlanes[ i ];n if ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;n }n#endifn"),
(n.ShaderChunk.clipping_planes_pars_fragment =
"#if NUM_CLIPPING_PLANES > 0n #if ! defined( PHYSICAL ) && ! defined( PHONG )n varying vec3 vViewPosition;n #endifn uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];n#endifn"),
(n.ShaderChunk.clipping_planes_pars_vertex = "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )n varying vec3 vViewPosition;n#endifn"),
(n.ShaderChunk.clipping_planes_vertex = "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )n vViewPosition = - mvPosition.xyz;n#endifn"),
(n.ShaderChunk.color_fragment = "#ifdef USE_COLORn diffuseColor.rgb *= vColor;n#endif"),
(n.ShaderChunk.color_pars_fragment = "#ifdef USE_COLORn varying vec3 vColor;n#endifn"),
(n.ShaderChunk.color_pars_vertex = "#ifdef USE_COLORn varying vec3 vColor;n#endif"),
(n.ShaderChunk.color_vertex = "#ifdef USE_COLORn vColor.xyz = color.xyz;n#endif"),
(n.ShaderChunk.common =
"#define PI 3.14159265359n#define PI2 6.28318530718n#define RECIPROCAL_PI 0.31830988618n#define RECIPROCAL_PI2 0.15915494n#define LOG2 1.442695n#define EPSILON 1e-6n#define saturate(a) clamp( a, 0.0, 1.0 )n#define whiteCompliment(a) ( 1.0 - saturate( a ) )nfloat pow2( const in float x ) { return x*x; }nfloat pow3( const in float x ) { return x*x*x; }nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }nhighp float rand( const in vec2 uv ) {n const highp float a = 12.9898, b = 78.233, c = 43758.5453;n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );n return fract(sin(sn) * c);n}nstruct IncidentLight {n vec3 color;n vec3 direction;n bool visible;n};nstruct ReflectedLight {n vec3 directDiffuse;n vec3 directSpecular;n vec3 indirectDiffuse;n vec3 indirectSpecular;n};nstruct GeometricContext {n vec3 position;n vec3 normal;n vec3 viewDir;n};nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );n}nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );n}nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {n float distance = dot( planeNormal, point - pointOnPlane );n return - distance * planeNormal + point;n}nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {n return sign( dot( point - pointOnPlane, planeNormal ) );n}nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {n return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;n}n"),
(n.ShaderChunk.cube_uv_reflection_fragment =
"#ifdef ENVMAP_TYPE_CUBE_UVn#define cubeUV_textureSize (1024.0)nint getFaceFromDirection(vec3 direction) {n vec3 absDirection = abs(direction);n int face = -1;n if( absDirection.x > absDirection.z ) {n if(absDirection.x > absDirection.y )n face = direction.x > 0.0 ? 0 : 3;n elsen face = direction.y > 0.0 ? 1 : 4;n }n else {n if(absDirection.z > absDirection.y )n face = direction.z > 0.0 ? 2 : 5;n elsen face = direction.y > 0.0 ? 1 : 4;n }n return face;n}n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {n float scale = exp2(cubeUV_maxLods1 - roughnessLevel);n float dxRoughness = dFdx(roughness);n float dyRoughness = dFdy(roughness);n vec3 dx = dFdx( vec * scale * dxRoughness );n vec3 dy = dFdy( vec * scale * dyRoughness );n float d = max( dot( dx, dx ), dot( dy, dy ) );n d = clamp(d, 1.0, cubeUV_rangeClamp);n float mipLevel = 0.5 * log2(d);n return vec2(floor(mipLevel), fract(mipLevel));n}n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {n mipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;n float a = 16.0 * cubeUV_rcpTextureSize;n vec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );n vec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;n float powScale = exp2_packed.x * exp2_packed.y;n float scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;n float mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;n bool bRes = mipLevel == 0.0;n scale = bRes && (scale < a) ? a : scale;n vec3 r;n vec2 offset;n int face = getFaceFromDirection(direction);n float rcpPowScale = 1.0 / powScale;n if( face == 0) {n r = vec3(direction.x, -direction.z, direction.y);n offset = vec2(0.0+mipOffset,0.75 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;n }n else if( face == 1) {n r = vec3(direction.y, direction.x, direction.z);n offset = vec2(scale+mipOffset, 0.75 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;n }n else if( face == 2) {n r = vec3(direction.z, direction.x, direction.y);n offset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;n }n else if( face == 3) {n r = vec3(direction.x, direction.z, direction.y);n offset = vec2(0.0+mipOffset,0.5 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;n }n else if( face == 4) {n r = vec3(direction.y, direction.x, -direction.z);n offset = vec2(scale+mipOffset, 0.5 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;n }n else {n r = vec3(direction.z, -direction.x, direction.y);n offset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);n offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;n }n r = normalize(r);n float texelOffset = 0.5 * cubeUV_rcpTextureSize;n vec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;n vec2 base = offset + vec2( texelOffset );n return base + s * ( scale - 2.0 * texelOffset );n}n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {n float roughnessVal = roughness* cubeUV_maxLods3;n float r1 = floor(roughnessVal);n float r2 = r1 + 1.0;n float t = fract(roughnessVal);n vec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);n float s = mipInfo.y;n float level0 = mipInfo.x;n float level1 = level0 + 1.0;n level1 = level1 > 5.0 ? 5.0 : level1;n level0 += min( floor( s + 0.5 ), 5.0 );n vec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);n vec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));n vec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);n vec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));n vec4 result = mix(color10, color20, t);n return vec4(result.rgb, 1.0);n}n#endifn"),
(n.ShaderChunk.defaultnormal_vertex = "#ifdef FLIP_SIDEDn objectNormal = -objectNormal;n#endifnvec3 transformedNormal = normalMatrix * objectNormal;n"),
(n.ShaderChunk.displacementmap_vertex = "#ifdef USE_DISPLACEMENTMAPn transformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );n#endifn"),
(n.ShaderChunk.displacementmap_pars_vertex = "#ifdef USE_DISPLACEMENTMAPn uniform sampler2D displacementMap;n uniform float displacementScale;n uniform float displacementBias;n#endifn"),
(n.ShaderChunk.emissivemap_fragment =
"#ifdef USE_EMISSIVEMAPn vec4 emissiveColor = texture2D( emissiveMap, vUv );n emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;n totalEmissiveRadiance *= emissiveColor.rgb;n#endifn"),
(n.ShaderChunk.emissivemap_pars_fragment = "#ifdef USE_EMISSIVEMAPn uniform sampler2D emissiveMap;n#endifn"),
(n.ShaderChunk.encodings_pars_fragment =
"nvec4 LinearToLinear( in vec4 value ) {n return value;n}nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {n return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );n}nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {n return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );n}nvec4 sRGBToLinear( in vec4 value ) {n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );n}nvec4 LinearTosRGB( in vec4 value ) {n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );n}nvec4 RGBEToLinear( in vec4 value ) {n return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );n}nvec4 LinearToRGBE( in vec4 value ) {n float maxComponent = max( max( value.r, value.g ), value.b );n float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );n return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );n}nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {n return vec4( value.xyz * value.w * maxRange, 1.0 );n}nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {n float maxRGB = max( value.x, max( value.g, value.b ) );n float M = clamp( maxRGB / maxRange, 0.0, 1.0 );n M = ceil( M * 255.0 ) / 255.0;n return vec4( value.rgb / ( M * maxRange ), M );n}nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {n return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );n}nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {n float maxRGB = max( value.x, max( value.g, value.b ) );n float D = max( maxRange / maxRGB, 1.0 );n D = min( floor( D ) / 255.0, 1.0 );n return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );n}nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );nvec4 LinearToLogLuv( in vec4 value ) {n vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;n Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));n vec4 vResult;n vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;n float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;n vResult.w = fract(Le);n vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;n return vResult;n}nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );nvec4 LogLuvToLinear( in vec4 value ) {n float Le = value.z * 255.0 + value.w;n vec3 Xp_Y_XYZp;n Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);n Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;n Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;n vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;n return vec4( max(vRGB, 0.0), 1.0 );n}n"),
(n.ShaderChunk.encodings_fragment = " gl_FragColor = linearToOutputTexel( gl_FragColor );n"),
(n.ShaderChunk.envmap_fragment =
"#ifdef USE_ENVMAPn #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )n vec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );n #ifdef ENVMAP_MODE_REFLECTIONn vec3 reflectVec = reflect( cameraToVertex, worldNormal );n #elsen vec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );n #endifn #elsen vec3 reflectVec = vReflect;n #endifn #ifdef ENVMAP_TYPE_CUBEn vec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );n #elif defined( ENVMAP_TYPE_EQUIREC )n vec2 sampleUV;n sampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );n sampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;n vec4 envColor = texture2D( envMap, sampleUV );n #elif defined( ENVMAP_TYPE_SPHERE )n vec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );n vec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );n #endifn envColor = envMapTexelToLinear( envColor );n #ifdef ENVMAP_BLENDING_MULTIPLYn outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );n #elif defined( ENVMAP_BLENDING_MIX )n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );n #elif defined( ENVMAP_BLENDING_ADD )n outgoingLight += envColor.xyz * specularStrength * reflectivity;n #endifn#endifn"),
(n.ShaderChunk.envmap_pars_fragment =
"#if defined( USE_ENVMAP ) || defined( PHYSICAL )n uniform float reflectivity;n uniform float envMapIntenstiy;n#endifn#ifdef USE_ENVMAPn #if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )n varying vec3 vWorldPosition;n #endifn #ifdef ENVMAP_TYPE_CUBEn uniform samplerCube envMap;n #elsen uniform sampler2D envMap;n #endifn uniform float flipEnvMap;n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )n uniform float refractionRatio;n #elsen varying vec3 vReflect;n #endifn#endifn"),
(n.ShaderChunk.envmap_pars_vertex =
"#ifdef USE_ENVMAPn #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )n varying vec3 vWorldPosition;n #elsen varying vec3 vReflect;n uniform float refractionRatio;n #endifn#endifn"),
(n.ShaderChunk.envmap_vertex =
"#ifdef USE_ENVMAPn #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )n vWorldPosition = worldPosition.xyz;n #elsen vec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );n #ifdef ENVMAP_MODE_REFLECTIONn vReflect = reflect( cameraToVertex, worldNormal );n #elsen vReflect = refract( cameraToVertex, worldNormal, refractionRatio );n #endifn #endifn#endifn"),
(n.ShaderChunk.fog_fragment =
"#ifdef USE_FOGn #ifdef USE_LOGDEPTHBUF_EXTn float depth = gl_FragDepthEXT / gl_FragCoord.w;n #elsen float depth = gl_FragCoord.z / gl_FragCoord.w;n #endifn #ifdef FOG_EXP2n float fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );n #elsen float fogFactor = smoothstep( fogNear, fogFar, depth );n #endifn gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );n#endifn"),
(n.ShaderChunk.fog_pars_fragment = "#ifdef USE_FOGn uniform vec3 fogColor;n #ifdef FOG_EXP2n uniform float fogDensity;n #elsen uniform float fogNear;n uniform float fogFar;n #endifn#endif"),
(n.ShaderChunk.lightmap_fragment = "#ifdef USE_LIGHTMAPn reflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;n#endifn"),
(n.ShaderChunk.lightmap_pars_fragment = "#ifdef USE_LIGHTMAPn uniform sampler2D lightMap;n uniform float lightMapIntensity;n#endif"),
(n.ShaderChunk.lights_lambert_vertex =
"vec3 diffuse = vec3( 1.0 );nGeometricContext geometry;ngeometry.position = mvPosition.xyz;ngeometry.normal = normalize( transformedNormal );ngeometry.viewDir = normalize( -mvPosition.xyz );nGeometricContext backGeometry;nbackGeometry.position = geometry.position;nbackGeometry.normal = -geometry.normal;nbackGeometry.viewDir = geometry.viewDir;nvLightFront = vec3( 0.0 );n#ifdef DOUBLE_SIDEDn vLightBack = vec3( 0.0 );n#endifnIncidentLight directLight;nfloat dotNL;nvec3 directLightColor_Diffuse;n#if NUM_POINT_LIGHTS > 0n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {n getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );n dotNL = dot( geometry.normal, directLight.direction );n directLightColor_Diffuse = PI * directLight.color;n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;n #ifdef DOUBLE_SIDEDn vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;n #endifn }n#endifn#if NUM_SPOT_LIGHTS > 0n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {n getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );n dotNL = dot( geometry.normal, directLight.direction );n directLightColor_Diffuse = PI * directLight.color;n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;n #ifdef DOUBLE_SIDEDn vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;n #endifn }n#endifn#if NUM_DIR_LIGHTS > 0n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {n getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );n dotNL = dot( geometry.normal, directLight.direction );n directLightColor_Diffuse = PI * directLight.color;n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;n #ifdef DOUBLE_SIDEDn vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;n #endifn }n#endifn#if NUM_HEMI_LIGHTS > 0n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {n vLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );n #ifdef DOUBLE_SIDEDn vLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );n #endifn }n#endifn"),
(n.ShaderChunk.lights_pars =
"uniform vec3 ambientLightColor;nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {n vec3 irradiance = ambientLightColor;n #ifndef PHYSICALLY_CORRECT_LIGHTSn irradiance *= PI;n #endifn return irradiance;n}n#if NUM_DIR_LIGHTS > 0n struct DirectionalLight {n vec3 direction;n vec3 color;n int shadow;n float shadowBias;n float shadowRadius;n vec2 shadowMapSize;n };n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];n void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {n directLight.color = directionalLight.color;n directLight.direction = directionalLight.direction;n directLight.visible = true;n }n#endifn#if NUM_POINT_LIGHTS > 0n struct PointLight {n vec3 position;n vec3 color;n float distance;n float decay;n int shadow;n float shadowBias;n float shadowRadius;n vec2 shadowMapSize;n };n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];n void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {n vec3 lVector = pointLight.position - geometry.position;n directLight.direction = normalize( lVector );n float lightDistance = length( lVector );n if ( testLightInRange( lightDistance, pointLight.distance ) ) {n directLight.color = pointLight.color;n directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );n directLight.visible = true;n } else {n directLight.color = vec3( 0.0 );n directLight.visible = false;n }n }n#endifn#if NUM_SPOT_LIGHTS > 0n struct SpotLight {n vec3 position;n vec3 direction;n vec3 color;n float distance;n float decay;n float coneCos;n float penumbraCos;n int shadow;n float shadowBias;n float shadowRadius;n vec2 shadowMapSize;n };n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];n void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {n vec3 lVector = spotLight.position - geometry.position;n directLight.direction = normalize( lVector );n float lightDistance = length( lVector );n float angleCos = dot( directLight.direction, spotLight.direction );n if ( all( bvec2( angleCos > spotLight.coneCos, testLightInRange( lightDistance, spotLight.distance ) ) ) ) {n float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );n directLight.color = spotLight.color;n directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );n directLight.visible = true;n } else {n directLight.color = vec3( 0.0 );n directLight.visible = false;n }n }n#endifn#if NUM_HEMI_LIGHTS > 0n struct HemisphereLight {n vec3 direction;n vec3 skyColor;n vec3 groundColor;n };n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {n float dotNL = dot( geometry.normal, hemiLight.direction );n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );n #ifndef PHYSICALLY_CORRECT_LIGHTSn irradiance *= PI;n #endifn return irradiance;n }n#endifn#if defined( USE_ENVMAP ) && defined( PHYSICAL )n vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {n #include n vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );n #ifdef ENVMAP_TYPE_CUBEn vec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );n #ifdef TEXTURE_LOD_EXTn vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );n #elsen vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );n #endifn envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;n #elif defined( ENVMAP_TYPE_CUBE_UV )n vec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );n vec4 envMapColor = textureCubeUV( queryVec, 1.0 );n #elsen vec4 envMapColor = vec4( 0.0 );n #endifn return PI * envMapColor.rgb * envMapIntensity;n }n float getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {n float maxMIPLevelScalar = float( maxMIPLevel );n float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );n return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );n }n vec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {n #ifdef ENVMAP_MODE_REFLECTIONn vec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );n #elsen vec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );n #endifn #include n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );n float specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );n #ifdef ENVMAP_TYPE_CUBEn vec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );n #ifdef TEXTURE_LOD_EXTn vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );n #elsen vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );n #endifn envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;n #elif defined( ENVMAP_TYPE_CUBE_UV )n vec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );n vec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));n #elif defined( ENVMAP_TYPE_EQUIREC )n vec2 sampleUV;n sampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );n sampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;n #ifdef TEXTURE_LOD_EXTn vec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );n #elsen vec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );n #endifn envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;n #elif defined( ENVMAP_TYPE_SPHERE )n vec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );n #ifdef TEXTURE_LOD_EXTn vec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );n #elsen vec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );n #endifn envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;n #endifn return envMapColor.rgb * envMapIntensity;n }n#endifn"),
(n.ShaderChunk.lights_phong_fragment =
"BlinnPhongMaterial material;nmaterial.diffuseColor = diffuseColor.rgb;nmaterial.specularColor = specular;nmaterial.specularShininess = shininess;nmaterial.specularStrength = specularStrength;n"),
(n.ShaderChunk.lights_phong_pars_fragment =
"varying vec3 vViewPosition;n#ifndef FLAT_SHADEDn varying vec3 vNormal;n#endifnstruct BlinnPhongMaterial {n vec3 diffuseColor;n vec3 specularColor;n float specularShininess;n float specularStrength;n};nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );n vec3 irradiance = dotNL * directLight.color;n #ifndef PHYSICALLY_CORRECT_LIGHTSn irradiance *= PI;n #endifn reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );n reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;n}nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );n}n#define RE_Direct RE_Direct_BlinnPhongn#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhongn#define Material_LightProbeLOD( material ) (0)n"),
(n.ShaderChunk.lights_physical_fragment =
"PhysicalMaterial material;nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );n#ifdef STANDARDn material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );n#elsen material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );n material.clearCoat = saturate( clearCoat ); material.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );n#endifn"),
(n.ShaderChunk.lights_physical_pars_fragment =
"struct PhysicalMaterial {n vec3 diffuseColor;n float specularRoughness;n vec3 specularColor;n #ifndef STANDARDn float clearCoat;n float clearCoatRoughness;n #endifn};n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16n#define DEFAULT_SPECULAR_COEFFICIENT 0.04nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {n return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );n}nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );n vec3 irradiance = dotNL * directLight.color;n #ifndef PHYSICALLY_CORRECT_LIGHTSn irradiance *= PI;n #endifn #ifndef STANDARDn float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );n #elsen float clearCoatDHR = 0.0;n #endifn reflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );n reflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );n #ifndef STANDARDn reflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );n #endifn}nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );n}nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {n #ifndef STANDARDn float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );n float dotNL = dotNV;n float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );n #elsen float clearCoatDHR = 0.0;n #endifn reflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );n #ifndef STANDARDn reflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );n #endifn}n#define RE_Direct RE_Direct_Physicaln#define RE_IndirectDiffuse RE_IndirectDiffuse_Physicaln#define RE_IndirectSpecular RE_IndirectSpecular_Physicaln#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );n}n"),
(n.ShaderChunk.lights_template =
"nGeometricContext geometry;ngeometry.position = - vViewPosition;ngeometry.normal = normal;ngeometry.viewDir = normalize( vViewPosition );nIncidentLight directLight;n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )n PointLight pointLight;n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {n pointLight = pointLights[ i ];n getPointDirectLightIrradiance( pointLight, geometry, directLight );n #ifdef USE_SHADOWMAPn directLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;n #endifn RE_Direct( directLight, geometry, material, reflectedLight );n }n#endifn#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )n SpotLight spotLight;n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {n spotLight = spotLights[ i ];n getSpotDirectLightIrradiance( spotLight, geometry, directLight );n #ifdef USE_SHADOWMAPn directLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;n #endifn RE_Direct( directLight, geometry, material, reflectedLight );n }n#endifn#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )n DirectionalLight directionalLight;n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {n directionalLight = directionalLights[ i ];n getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );n #ifdef USE_SHADOWMAPn directLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;n #endifn RE_Direct( directLight, geometry, material, reflectedLight );n }n#endifn#if defined( RE_IndirectDiffuse )n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );n #ifdef USE_LIGHTMAPn vec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;n #ifndef PHYSICALLY_CORRECT_LIGHTSn lightMapIrradiance *= PI;n #endifn irradiance += lightMapIrradiance;n #endifn #if ( NUM_HEMI_LIGHTS > 0 )n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );n }n #endifn #if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )n irradiance += getLightProbeIndirectIrradiance( geometry, 8 );n #endifn RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );n#endifn#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )n vec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );n #ifndef STANDARDn vec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );n #elsen vec3 clearCoatRadiance = vec3( 0.0 );n #endifn n RE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );n#endifn"),
(n.ShaderChunk.logdepthbuf_fragment = "#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)n gl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;n#endif"),
(n.ShaderChunk.logdepthbuf_pars_fragment = "#ifdef USE_LOGDEPTHBUFn uniform float logDepthBufFC;n #ifdef USE_LOGDEPTHBUF_EXTn varying float vFragDepth;n #endifn#endifn"),
(n.ShaderChunk.logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUFn #ifdef USE_LOGDEPTHBUF_EXTn varying float vFragDepth;n #endifn uniform float logDepthBufFC;n#endif"),
(n.ShaderChunk.logdepthbuf_vertex =
"#ifdef USE_LOGDEPTHBUFn gl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;n #ifdef USE_LOGDEPTHBUF_EXTn vFragDepth = 1.0 + gl_Position.w;n #elsen gl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;n #endifn#endifn"),
(n.ShaderChunk.map_fragment = "#ifdef USE_MAPn vec4 texelColor = texture2D( map, vUv );n texelColor = mapTexelToLinear( texelColor );n diffuseColor *= texelColor;n#endifn"),
(n.ShaderChunk.map_pars_fragment = "#ifdef USE_MAPn uniform sampler2D map;n#endifn"),
(n.ShaderChunk.map_particle_fragment =
"#ifdef USE_MAPn vec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );n diffuseColor *= mapTexelToLinear( mapTexel );n#endifn"),
(n.ShaderChunk.map_particle_pars_fragment = "#ifdef USE_MAPn uniform vec4 offsetRepeat;n uniform sampler2D map;n#endifn"),
(n.ShaderChunk.metalnessmap_fragment = "float metalnessFactor = metalness;n#ifdef USE_METALNESSMAPn vec4 texelMetalness = texture2D( metalnessMap, vUv );n metalnessFactor *= texelMetalness.r;n#endifn"),
(n.ShaderChunk.metalnessmap_pars_fragment = "#ifdef USE_METALNESSMAPn uniform sampler2D metalnessMap;n#endif"),
(n.ShaderChunk.morphnormal_vertex =
"#ifdef USE_MORPHNORMALSn objectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];n objectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];n objectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];n objectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];n#endifn"),
(n.ShaderChunk.morphtarget_pars_vertex = "#ifdef USE_MORPHTARGETSn #ifndef USE_MORPHNORMALSn uniform float morphTargetInfluences[ 8 ];n #elsen uniform float morphTargetInfluences[ 4 ];n #endifn#endif"),
(n.ShaderChunk.morphtarget_vertex =
"#ifdef USE_MORPHTARGETSn transformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];n transformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];n transformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];n transformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];n #ifndef USE_MORPHNORMALSn transformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];n transformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];n transformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];n transformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];n #endifn#endifn"),
(n.ShaderChunk.normal_flip = "#ifdef DOUBLE_SIDEDn float flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );n#elsen float flipNormal = 1.0;n#endifn"),
(n.ShaderChunk.normal_fragment =
"#ifdef FLAT_SHADEDn vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );n vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );n vec3 normal = normalize( cross( fdx, fdy ) );n#elsen vec3 normal = normalize( vNormal ) * flipNormal;n#endifn#ifdef USE_NORMALMAPn normal = perturbNormal2Arb( -vViewPosition, normal );n#elif defined( USE_BUMPMAP )n normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );n#endifn"),
(n.ShaderChunk.normalmap_pars_fragment =
"#ifdef USE_NORMALMAPn uniform sampler2D normalMap;n uniform vec2 normalScale;n vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {n vec3 q0 = dFdx( eye_pos.xyz );n vec3 q1 = dFdy( eye_pos.xyz );n vec2 st0 = dFdx( vUv.st );n vec2 st1 = dFdy( vUv.st );n vec3 S = normalize( q0 * st1.t - q1 * st0.t );n vec3 T = normalize( -q0 * st1.s + q1 * st0.s );n vec3 N = normalize( surf_norm );n vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;n mapN.xy = normalScale * mapN.xy;n mat3 tsn = mat3( S, T, N );n return normalize( tsn * mapN );n }n#endifn"),
(n.ShaderChunk.packing =
"vec3 packNormalToRGB( const in vec3 normal ) {n return normalize( normal ) * 0.5 + 0.5;n}nvec3 unpackRGBToNormal( const in vec3 rgb ) {n return 1.0 - 2.0 * rgb.xyz;n}nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );nconst float ShiftRight8 = 1. / 256.;nvec4 packDepthToRGBA( const in float v ) {n vec4 r = vec4( fract( v * PackFactors ), v );n r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale;n}nfloat unpackRGBAToDepth( const in vec4 v ) {n return dot( v, UnpackFactors );n}nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {n return ( viewZ + near ) / ( near - far );n}nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {n return linearClipZ * ( near - far ) - near;n}nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {n return (( near + viewZ ) * far ) / (( far - near ) * viewZ );n}nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {n return ( near * far ) / ( ( far - near ) * invClipZ - far );n}n"),
(n.ShaderChunk.premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHAn gl_FragColor.rgb *= gl_FragColor.a;n#endifn"),
(n.ShaderChunk.project_vertex =
"#ifdef USE_SKINNINGn vec4 mvPosition = modelViewMatrix * skinned;n#elsen vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );n#endifngl_Position = projectionMatrix * mvPosition;n"),
(n.ShaderChunk.roughnessmap_fragment = "float roughnessFactor = roughness;n#ifdef USE_ROUGHNESSMAPn vec4 texelRoughness = texture2D( roughnessMap, vUv );n roughnessFactor *= texelRoughness.r;n#endifn"),
(n.ShaderChunk.roughnessmap_pars_fragment = "#ifdef USE_ROUGHNESSMAPn uniform sampler2D roughnessMap;n#endif"),
(n.ShaderChunk.shadowmap_pars_fragment =
"#ifdef USE_SHADOWMAPn #if NUM_DIR_LIGHTS > 0n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];n #endifn #if NUM_SPOT_LIGHTS > 0n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];n varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];n #endifn #if NUM_POINT_LIGHTS > 0n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];n #endifn float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {n return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );n }n float texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {n const vec2 offset = vec2( 0.0, 1.0 );n vec2 texelSize = vec2( 1.0 ) / size;n vec2 centroidUV = floor( uv * size + 0.5 ) / size;n float lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );n float lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );n float rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );n float rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );n vec2 f = fract( uv * size + 0.5 );n float a = mix( lb, lt, f.y );n float b = mix( rb, rt, f.y );n float c = mix( a, b, f.x );n return c;n }n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {n shadowCoord.xyz /= shadowCoord.w;n shadowCoord.z += shadowBias;n bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );n bool inFrustum = all( inFrustumVec );n bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );n bool frustumTest = all( frustumTestVec );n if ( frustumTest ) {n #if defined( SHADOWMAP_TYPE_PCF )n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;n float dx0 = - texelSize.x * shadowRadius;n float dy0 = - texelSize.y * shadowRadius;n float dx1 = + texelSize.x * shadowRadius;n float dy1 = + texelSize.y * shadowRadius;n return (n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )n ) * ( 1.0 / 9.0 );n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;n float dx0 = - texelSize.x * shadowRadius;n float dy0 = - texelSize.y * shadowRadius;n float dx1 = + texelSize.x * shadowRadius;n float dy1 = + texelSize.y * shadowRadius;n return (n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +n texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )n ) * ( 1.0 / 9.0 );n #elsen return texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );n #endifn }n return 1.0;n }n vec2 cubeToUV( vec3 v, float texelSizeY ) {n vec3 absV = abs( v );n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );n absV *= scaleToCube;n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );n vec2 planar = v.xy;n float almostATexel = 1.5 * texelSizeY;n float almostOne = 1.0 - almostATexel;n if ( absV.z >= almostOne ) {n if ( v.z > 0.0 )n planar.x = 4.0 - v.x;n } else if ( absV.x >= almostOne ) {n float signX = sign( v.x );n planar.x = v.z * signX + 2.0 * signX;n } else if ( absV.y >= almostOne ) {n float signY = sign( v.y );n planar.x = v.x + 2.0 * signY + 2.0;n planar.y = v.z * signY - 2.0;n }n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );n }n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );n vec3 lightToPosition = shadowCoord.xyz;n vec3 bd3D = normalize( lightToPosition );n float dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;n return (n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )n ) * ( 1.0 / 9.0 );n #elsen return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );n #endifn }n#endifn"),
(n.ShaderChunk.shadowmap_pars_vertex =
"#ifdef USE_SHADOWMAPn #if NUM_DIR_LIGHTS > 0n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];n #endifn #if NUM_SPOT_LIGHTS > 0n uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];n varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];n #endifn #if NUM_POINT_LIGHTS > 0n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];n #endifn#endifn"),
(n.ShaderChunk.shadowmap_vertex =
"#ifdef USE_SHADOWMAPn #if NUM_DIR_LIGHTS > 0n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;n }n #endifn #if NUM_SPOT_LIGHTS > 0n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {n vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;n }n #endifn #if NUM_POINT_LIGHTS > 0n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;n }n #endifn#endifn"),
(n.ShaderChunk.shadowmask_pars_fragment =
"float getShadowMask() {n float shadow = 1.0;n #ifdef USE_SHADOWMAPn #if NUM_DIR_LIGHTS > 0n DirectionalLight directionalLight;n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {n directionalLight = directionalLights[ i ];n shadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;n }n #endifn #if NUM_SPOT_LIGHTS > 0n SpotLight spotLight;n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {n spotLight = spotLights[ i ];n shadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;n }n #endifn #if NUM_POINT_LIGHTS > 0n PointLight pointLight;n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {n pointLight = pointLights[ i ];n shadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;n }n #endifn #endifn return shadow;n}n"),
(n.ShaderChunk.skinbase_vertex =
"#ifdef USE_SKINNINGn mat4 boneMatX = getBoneMatrix( skinIndex.x );n mat4 boneMatY = getBoneMatrix( skinIndex.y );n mat4 boneMatZ = getBoneMatrix( skinIndex.z );n mat4 boneMatW = getBoneMatrix( skinIndex.w );n#endif"),
(n.ShaderChunk.skinning_pars_vertex =
"#ifdef USE_SKINNINGn uniform mat4 bindMatrix;n uniform mat4 bindMatrixInverse;n #ifdef BONE_TEXTUREn uniform sampler2D boneTexture;n uniform int boneTextureWidth;n uniform int boneTextureHeight;n mat4 getBoneMatrix( const in float i ) {n float j = i * 4.0;n float x = mod( j, float( boneTextureWidth ) );n float y = floor( j / float( boneTextureWidth ) );n float dx = 1.0 / float( boneTextureWidth );n float dy = 1.0 / float( boneTextureHeight );n y = dy * ( y + 0.5 );n vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );n vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );n vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );n vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );n mat4 bone = mat4( v1, v2, v3, v4 );n return bone;n }n #elsen uniform mat4 boneMatrices[ MAX_BONES ];n mat4 getBoneMatrix( const in float i ) {n mat4 bone = boneMatrices[ int(i) ];n return bone;n }n #endifn#endifn"),
(n.ShaderChunk.skinning_vertex =
"#ifdef USE_SKINNINGn vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );n vec4 skinned = vec4( 0.0 );n skinned += boneMatX * skinVertex * skinWeight.x;n skinned += boneMatY * skinVertex * skinWeight.y;n skinned += boneMatZ * skinVertex * skinWeight.z;n skinned += boneMatW * skinVertex * skinWeight.w;n skinned = bindMatrixInverse * skinned;n#endifn"),
(n.ShaderChunk.skinnormal_vertex =
"#ifdef USE_SKINNINGn mat4 skinMatrix = mat4( 0.0 );n skinMatrix += skinWeight.x * boneMatX;n skinMatrix += skinWeight.y * boneMatY;n skinMatrix += skinWeight.z * boneMatZ;n skinMatrix += skinWeight.w * boneMatW;n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;n#endifn"),
(n.ShaderChunk.specularmap_fragment = "float specularStrength;n#ifdef USE_SPECULARMAPn vec4 texelSpecular = texture2D( specularMap, vUv );n specularStrength = texelSpecular.r;n#elsen specularStrength = 1.0;n#endif"),
(n.ShaderChunk.specularmap_pars_fragment = "#ifdef USE_SPECULARMAPn uniform sampler2D specularMap;n#endif"),
(n.ShaderChunk.tonemapping_fragment = "#if defined( TONE_MAPPING )n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );n#endifn"),
(n.ShaderChunk.tonemapping_pars_fragment =
"#define saturate(a) clamp( a, 0.0, 1.0 )nuniform float toneMappingExposure;nuniform float toneMappingWhitePoint;nvec3 LinearToneMapping( vec3 color ) {n return toneMappingExposure * color;n}nvec3 ReinhardToneMapping( vec3 color ) {n color *= toneMappingExposure;n return saturate( color / ( vec3( 1.0 ) + color ) );n}n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )nvec3 Uncharted2ToneMapping( vec3 color ) {n color *= toneMappingExposure;n return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );n}nvec3 OptimizedCineonToneMapping( vec3 color ) {n color *= toneMappingExposure;n color = max( vec3( 0.0 ), color - 0.004 );n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );n}n"),
(n.ShaderChunk.uv2_pars_fragment = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )n varying vec2 vUv2;n#endif"),
(n.ShaderChunk.uv2_pars_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )n attribute vec2 uv2;n varying vec2 vUv2;n#endif"),
(n.ShaderChunk.uv2_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )n vUv2 = uv2;n#endif"),
(n.ShaderChunk.uv_pars_fragment =
"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )n varying vec2 vUv;n#endif"),
(n.ShaderChunk.uv_pars_vertex =
"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )n varying vec2 vUv;n uniform vec4 offsetRepeat;n#endifn"),
(n.ShaderChunk.uv_vertex =
"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )n vUv = uv * offsetRepeat.zw + offsetRepeat.xy;n#endif"),
(n.ShaderChunk.worldpos_vertex =
"#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )n #ifdef USE_SKINNINGn vec4 worldPosition = modelMatrix * skinned;n #elsen vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );n #endifn#endifn"),
(n.UniformsUtils = {
merge: function (e) {
for (var t = {}, i = 0; i < e.length; i++) {
var n = this.clone(e[i]);
for (var r in n) t[r] = n[r];
}
return t;
},
clone: function (e) {
var t = {};
for (var i in e) {
t[i] = {};
for (var r in e[i]) {
var o = e[i][r];
o instanceof n.Color || o instanceof n.Vector2 || o instanceof n.Vector3 || o instanceof n.Vector4 || o instanceof n.Matrix3 || o instanceof n.Matrix4 || o instanceof n.Texture ?
(t[i][r] = o.clone()) :
Array.isArray(o) ?
(t[i][r] = o.slice()) :
(t[i][r] = o);
}
}
return t;
},
}),
(n.UniformsLib = {
common: {
diffuse: {
value: new n.Color(15658734)
},
opacity: {
value: 1
},
map: {
value: null
},
offsetRepeat: {
value: new n.Vector4(0, 0, 1, 1)
},
specularMap: {
value: null
},
alphaMap: {
value: null
},
envMap: {
value: null
},
flipEnvMap: {
value: -1
},
reflectivity: {
value: 1
},
refractionRatio: {
value: 0.98
},
},
aomap: {
aoMap: {
value: null
},
aoMapIntensity: {
value: 1
}
},
lightmap: {
lightMap: {
value: null
},
lightMapIntensity: {
value: 1
}
},
emissivemap: {
emissiveMap: {
value: null
}
},
bumpmap: {
bumpMap: {
value: null
},
bumpScale: {
value: 1
}
},
normalmap: {
normalMap: {
value: null
},
normalScale: {
value: new n.Vector2(1, 1)
}
},
displacementmap: {
displacementMap: {
value: null
},
displacementScale: {
value: 1
},
displacementBias: {
value: 0
}
},
roughnessmap: {
roughnessMap: {
value: null
}
},
metalnessmap: {
metalnessMap: {
value: null
}
},
fog: {
fogDensity: {
value: 25e-5
},
fogNear: {
value: 1
},
fogFar: {
value: 2e3
},
fogColor: {
value: new n.Color(16777215)
}
},
lights: {
ambientLightColor: {
value: []
},
directionalLights: {
value: [],
properties: {
direction: {},
color: {},
shadow: {},
shadowBias: {},
shadowRadius: {},
shadowMapSize: {}
}
},
directionalShadowMap: {
value: []
},
directionalShadowMatrix: {
value: []
},
spotLights: {
value: [],
properties: {
color: {},
position: {},
direction: {},
distance: {},
coneCos: {},
penumbraCos: {},
decay: {},
shadow: {},
shadowBias: {},
shadowRadius: {},
shadowMapSize: {}
}
},
spotShadowMap: {
value: []
},
spotShadowMatrix: {
value: []
},
pointLights: {
value: [],
properties: {
color: {},
position: {},
decay: {},
distance: {},
shadow: {},
shadowBias: {},
shadowRadius: {},
shadowMapSize: {}
}
},
pointShadowMap: {
value: []
},
pointShadowMatrix: {
value: []
},
hemisphereLights: {
value: [],
properties: {
direction: {},
skyColor: {},
groundColor: {}
}
},
},
points: {
diffuse: {
value: new n.Color(15658734)
},
opacity: {
value: 1
},
size: {
value: 1
},
scale: {
value: 1
},
map: {
value: null
},
offsetRepeat: {
value: new n.Vector4(0, 0, 1, 1)
}
},
}),
(n.ShaderChunk.cube_frag =
"uniform samplerCube tCube;nuniform float tFlip;nuniform float opacity;nvarying vec3 vWorldPosition;n#include nvoid main() {n gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );n gl_FragColor.a *= opacity;n}n"),
(n.ShaderChunk.cube_vert = "varying vec3 vWorldPosition;n#include nvoid main() {n vWorldPosition = transformDirection( position, modelMatrix );n #include n #include n}n"),
(n.ShaderChunk.depth_frag =
"#if DEPTH_PACKING == 3200n uniform float opacity;n#endifn#include n#include n#include n#include n#include n#include n#include nvoid main() {n #include n vec4 diffuseColor = vec4( 1.0 );n #if DEPTH_PACKING == 3200n diffuseColor.a = opacity;n #endifn #include n #include n #include n #include n #if DEPTH_PACKING == 3200n gl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );n #elif DEPTH_PACKING == 3201n gl_FragColor = packDepthToRGBA( gl_FragCoord.z );n #endifn}n"),
(n.ShaderChunk.depth_vert =
"#include n#include n#include n#include n#include n#include n#include nvoid main() {n #include n #include n #include n #include n #include n #include n #include n #include n #include n}n"),
(n.ShaderChunk.distanceRGBA_frag =
"uniform vec3 lightPos;nvarying vec4 vWorldPosition;n#include n#include n#include nvoid main () {n #include n gl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );n}n"),
(n.ShaderChunk.distanceRGBA_vert =
"varying vec4 vWorldPosition;n#include n#include n#include n#include nvoid main() {n #include n #include n #include n #include n #include n #include n #include n vWorldPosition = worldPosition;n}n"),
(n.ShaderChunk.equirect_frag =
"uniform sampler2D tEquirect;nuniform float tFlip;nvarying vec3 vWorldPosition;n#include nvoid main() {n vec3 direction = normalize( vWorldPosition );n vec2 sampleUV;n sampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );n sampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;n gl_FragColor = texture2D( tEquirect, sampleUV );n}n"),
(n.ShaderChunk.equirect_vert = "varying vec3 vWorldPosition;n#include nvoid main() {n vWorldPosition = transformDirection( position, modelMatrix );n #include n #include n}n"),
(n.ShaderChunk.linedashed_frag =
"uniform vec3 diffuse;nuniform float opacity;nuniform float dashSize;nuniform float totalSize;nvarying float vLineDistance;n#include n#include n#include n#include n#include nvoid main() {n #include n if ( mod( vLineDistance, totalSize ) > dashSize ) {n discard;n }n vec3 outgoingLight = vec3( 0.0 );n vec4 diffuseColor = vec4( diffuse, opacity );n #include n #include n outgoingLight = diffuseColor.rgb;n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include n #include n #include n #include n}n"),
(n.ShaderChunk.linedashed_vert =
"uniform float scale;nattribute float lineDistance;nvarying float vLineDistance;n#include n#include n#include n#include nvoid main() {n #include n vLineDistance = scale * lineDistance;n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );n gl_Position = projectionMatrix * mvPosition;n #include n #include n}n"),
(n.ShaderChunk.meshbasic_frag =
"uniform vec3 diffuse;nuniform float opacity;n#ifndef FLAT_SHADEDn varying vec3 vNormal;n#endifn#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include nvoid main() {n #include n vec4 diffuseColor = vec4( diffuse, opacity );n #include n #include n #include n #include n #include n #include n ReflectedLight reflectedLight;n reflectedLight.directDiffuse = vec3( 0.0 );n reflectedLight.directSpecular = vec3( 0.0 );n reflectedLight.indirectDiffuse = diffuseColor.rgb;n reflectedLight.indirectSpecular = vec3( 0.0 );n #include n vec3 outgoingLight = reflectedLight.indirectDiffuse;n #include n #include n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include n #include n #include n #include n}n"),
(n.ShaderChunk.meshbasic_vert =
"#include n#include n#include n#include n#include n#include n#include n#include n#include nvoid main() {n #include n #include n #include n #include n #ifdef USE_ENVMAPn #include n #include n #include n #include n #endifn #include n #include n #include n #include n #include n #include n #include n #include n}n"),
(n.ShaderChunk.meshlambert_frag =
"uniform vec3 diffuse;nuniform vec3 emissive;nuniform float opacity;nvarying vec3 vLightFront;n#ifdef DOUBLE_SIDEDn varying vec3 vLightBack;n#endifn#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include nvoid main() {n #include n vec4 diffuseColor = vec4( diffuse, opacity );n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );n vec3 totalEmissiveRadiance = emissive;n #include n #include n #include n #include n #include n #include n #include n reflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );n #include n reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );n #ifdef DOUBLE_SIDEDn reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;n #elsen reflectedLight.directDiffuse = vLightFront;n #endifn reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();n #include n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;n #include n #include n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include n #include n #include n #include n}n"),
(n.ShaderChunk.meshlambert_vert =
"#define LAMBERTnvarying vec3 vLightFront;n#ifdef DOUBLE_SIDEDn varying vec3 vLightBack;n#endifn#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include nvoid main() {n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n}n"),
(n.ShaderChunk.meshphong_frag =
"#define PHONGnuniform vec3 diffuse;nuniform vec3 emissive;nuniform vec3 specular;nuniform float shininess;nuniform float opacity;n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include nvoid main() {n #include n vec4 diffuseColor = vec4( diffuse, opacity );n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );n vec3 totalEmissiveRadiance = emissive;n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n #include n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;n #include n gl_FragColor = vec4( outgoingLight, diffuseColor.a );n #include n #include n #include n #include n}n"),
(n.ShaderChunk.meshphong_vert =
"#define PHONGnvarying vec3 vViewPosition;n#ifndef FLAT_SHADEDn varying vec3 vNormal;n#endifn#include n#include n#include n#include n#include n#include n#include n#include n#include n#include n#include nvoid main() {n #include n #include n #include n #include n #include n #include n #include n #include n#ifndef FLAT_SHADEDn vNormal = normalize( transformedNormal );n#endifn #include n #include n #include n #include n #include n #include n #include n vViewPosition = - mvPosition.xyz;n #include n #include n #include