diff --git "a/legofy/All Safe_files/bundle.js.download" "b/legofy/All Safe_files/bundle.js.download"
new file mode 100644--- /dev/null
+++ "b/legofy/All Safe_files/bundle.js.download"
@@ -0,0 +1,33013 @@
+!(function (t) {
+ var e = {};
+ function n(i) {
+ if (e[i]) return e[i].exports;
+ var r = (e[i] = { i: i, l: !1, exports: {} });
+ return t[i].call(r.exports, r, r.exports, n), (r.l = !0), r.exports;
+ }
+ (n.m = t),
+ (n.c = e),
+ (n.d = function (t, e, i) {
+ n.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: i });
+ }),
+ (n.r = function (t) {
+ "undefined" != typeof Symbol &&
+ Symbol.toStringTag &&
+ Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }),
+ Object.defineProperty(t, "__esModule", { value: !0 });
+ }),
+ (n.t = function (t, e) {
+ if ((1 & e && (t = n(t)), 8 & e)) return t;
+ if (4 & e && "object" == typeof t && t && t.__esModule) return t;
+ var i = Object.create(null);
+ if (
+ (n.r(i),
+ Object.defineProperty(i, "default", { enumerable: !0, value: t }),
+ 2 & e && "string" != typeof t)
+ )
+ for (var r in t)
+ n.d(
+ i,
+ r,
+ function (e) {
+ return t[e];
+ }.bind(null, r)
+ );
+ return i;
+ }),
+ (n.n = function (t) {
+ var e =
+ t && t.__esModule
+ ? function () {
+ return t.default;
+ }
+ : function () {
+ return t;
+ };
+ return n.d(e, "a", e), e;
+ }),
+ (n.o = function (t, e) {
+ return Object.prototype.hasOwnProperty.call(t, e);
+ }),
+ (n.p = "/assets/js/"),
+ n((n.s = 137));
+})([
+ function (t, e, n) {
+ var i = n(33),
+ r = Function.prototype,
+ o = r.call,
+ s = i && r.bind.bind(o, o);
+ t.exports = i
+ ? s
+ : function (t) {
+ return function () {
+ return o.apply(t, arguments);
+ };
+ };
+ },
+ function (t, e) {
+ var n = /^\s+|\s+$/g,
+ i = /^[-+]0x[0-9a-f]+$/i,
+ r = /^0b[01]+$/i,
+ o = /^0o[0-7]+$/i,
+ s = parseInt,
+ a = Object.prototype.toString;
+ function l(t) {
+ var e = typeof t;
+ return !!t && ("object" == e || "function" == e);
+ }
+ function u(t) {
+ if ("number" == typeof t) return t;
+ if (
+ (function (t) {
+ return (
+ "symbol" == typeof t ||
+ ((function (t) {
+ return !!t && "object" == typeof t;
+ })(t) &&
+ "[object Symbol]" == a.call(t))
+ );
+ })(t)
+ )
+ return NaN;
+ if (l(t)) {
+ var e = "function" == typeof t.valueOf ? t.valueOf() : t;
+ t = l(e) ? e + "" : e;
+ }
+ if ("string" != typeof t) return 0 === t ? t : +t;
+ t = t.replace(n, "");
+ var u = r.test(t);
+ return u || o.test(t) ? s(t.slice(2), u ? 2 : 8) : i.test(t) ? NaN : +t;
+ }
+ t.exports = function (t, e, n) {
+ return (
+ void 0 === n && ((n = e), (e = void 0)),
+ void 0 !== n && (n = (n = u(n)) == n ? n : 0),
+ void 0 !== e && (e = (e = u(e)) == e ? e : 0),
+ (function (t, e, n) {
+ return (
+ t == t &&
+ (void 0 !== n && (t = t <= n ? t : n),
+ void 0 !== e && (t = t >= e ? t : e)),
+ t
+ );
+ })(u(t), e, n)
+ );
+ };
+ },
+ function (t, e, n) {
+ var i = n(63),
+ r = i.all;
+ t.exports = i.IS_HTMLDDA
+ ? function (t) {
+ return "function" == typeof t || t === r;
+ }
+ : function (t) {
+ return "function" == typeof t;
+ };
+ },
+ function (t, e) {
+ t.exports = function (t) {
+ try {
+ return !!t();
+ } catch (t) {
+ return !0;
+ }
+ };
+ },
+ function (t, e, n) {
+ var i = n(2),
+ r = n(63),
+ o = r.all;
+ t.exports = r.IS_HTMLDDA
+ ? function (t) {
+ return "object" == typeof t ? null !== t : i(t) || t === o;
+ }
+ : function (t) {
+ return "object" == typeof t ? null !== t : i(t);
+ };
+ },
+ function (t, e, n) {
+ var i = n(6),
+ r = n(60),
+ o = n(8),
+ s = n(38),
+ a = n(61),
+ l = n(62),
+ u = i.Symbol,
+ c = r("wks"),
+ h = l ? u.for || u : (u && u.withoutSetter) || s;
+ t.exports = function (t) {
+ return o(c, t) || (c[t] = a && o(u, t) ? u[t] : h("Symbol." + t)), c[t];
+ };
+ },
+ function (t, e, n) {
+ (function (e) {
+ var n = function (t) {
+ return t && t.Math == Math && t;
+ };
+ t.exports =
+ n("object" == typeof globalThis && globalThis) ||
+ n("object" == typeof window && window) ||
+ n("object" == typeof self && self) ||
+ n("object" == typeof e && e) ||
+ (function () {
+ return this;
+ })() ||
+ Function("return this")();
+ }).call(this, n(35));
+ },
+ function (t, e, n) {
+ var i = n(3);
+ t.exports = !i(function () {
+ return (
+ 7 !=
+ Object.defineProperty({}, 1, {
+ get: function () {
+ return 7;
+ },
+ })[1]
+ );
+ });
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = n(17),
+ o = i({}.hasOwnProperty);
+ t.exports =
+ Object.hasOwn ||
+ function (t, e) {
+ return o(r(t), e);
+ };
+ },
+ function (t, e, n) {
+ var i = n(7),
+ r = n(65),
+ o = n(64),
+ s = n(10),
+ a = n(39),
+ l = TypeError,
+ u = Object.defineProperty,
+ c = Object.getOwnPropertyDescriptor;
+ e.f = i
+ ? o
+ ? function (t, e, n) {
+ if (
+ (s(t),
+ (e = a(e)),
+ s(n),
+ "function" == typeof t &&
+ "prototype" === e &&
+ "value" in n &&
+ "writable" in n &&
+ !n.writable)
+ ) {
+ var i = c(t, e);
+ i &&
+ i.writable &&
+ ((t[e] = n.value),
+ (n = {
+ configurable:
+ "configurable" in n ? n.configurable : i.configurable,
+ enumerable: "enumerable" in n ? n.enumerable : i.enumerable,
+ writable: !1,
+ }));
+ }
+ return u(t, e, n);
+ }
+ : u
+ : function (t, e, n) {
+ if ((s(t), (e = a(e)), s(n), r))
+ try {
+ return u(t, e, n);
+ } catch (t) {}
+ if ("get" in n || "set" in n) throw l("Accessors not supported");
+ return "value" in n && (t[e] = n.value), t;
+ };
+ },
+ function (t, e, n) {
+ var i = n(4),
+ r = String,
+ o = TypeError;
+ t.exports = function (t) {
+ if (i(t)) return t;
+ throw o(r(t) + " is not an object");
+ };
+ },
+ function (t, e, n) {
+ var i = n(33),
+ r = Function.prototype.call;
+ t.exports = i
+ ? r.bind(r)
+ : function () {
+ return r.apply(r, arguments);
+ };
+ },
+ function (t, e, n) {
+ var i = n(32),
+ r = n(34);
+ t.exports = function (t) {
+ return i(r(t));
+ };
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = i({}.toString),
+ o = i("".slice);
+ t.exports = function (t) {
+ return o(r(t), 8, -1);
+ };
+ },
+ function (t, e) {
+ t.exports = function (t) {
+ return null == t;
+ };
+ },
+ function (t, e, n) {
+ var i,
+ r,
+ o,
+ s = n(71),
+ a = n(6),
+ l = n(4),
+ u = n(47),
+ c = n(8),
+ h = n(36),
+ d = n(46),
+ f = n(25),
+ p = a.TypeError,
+ m = a.WeakMap;
+ if (s || h.state) {
+ var g = h.state || (h.state = new m());
+ (g.get = g.get),
+ (g.has = g.has),
+ (g.set = g.set),
+ (i = function (t, e) {
+ if (g.has(t)) throw p("Object already initialized");
+ return (e.facade = t), g.set(t, e), e;
+ }),
+ (r = function (t) {
+ return g.get(t) || {};
+ }),
+ (o = function (t) {
+ return g.has(t);
+ });
+ } else {
+ var v = d("state");
+ (f[v] = !0),
+ (i = function (t, e) {
+ if (c(t, v)) throw p("Object already initialized");
+ return (e.facade = t), u(t, v, e), e;
+ }),
+ (r = function (t) {
+ return c(t, v) ? t[v] : {};
+ }),
+ (o = function (t) {
+ return c(t, v);
+ });
+ }
+ t.exports = {
+ set: i,
+ get: r,
+ has: o,
+ enforce: function (t) {
+ return o(t) ? r(t) : i(t, {});
+ },
+ getterFor: function (t) {
+ return function (e) {
+ var n;
+ if (!l(e) || (n = r(e)).type !== t)
+ throw p("Incompatible receiver, " + t + " required");
+ return n;
+ };
+ },
+ };
+ },
+ function (t, e, n) {
+ var i = n(2),
+ r = n(9),
+ o = n(102),
+ s = n(37);
+ t.exports = function (t, e, n, a) {
+ a || (a = {});
+ var l = a.enumerable,
+ u = void 0 !== a.name ? a.name : e;
+ if ((i(n) && o(n, u, a), a.global)) l ? (t[e] = n) : s(e, n);
+ else {
+ try {
+ a.unsafe ? t[e] && (l = !0) : delete t[e];
+ } catch (t) {}
+ l
+ ? (t[e] = n)
+ : r.f(t, e, {
+ value: n,
+ enumerable: !1,
+ configurable: !a.nonConfigurable,
+ writable: !a.nonWritable,
+ });
+ }
+ return t;
+ };
+ },
+ function (t, e, n) {
+ var i = n(34),
+ r = Object;
+ t.exports = function (t) {
+ return r(i(t));
+ };
+ },
+ function (t, e, n) {
+ var i = n(6),
+ r = n(2),
+ o = function (t) {
+ return r(t) ? t : void 0;
+ };
+ t.exports = function (t, e) {
+ return arguments.length < 2 ? o(i[t]) : i[t] && i[t][e];
+ };
+ },
+ function (t, e, n) {
+ var i = n(100);
+ t.exports = function (t) {
+ return i(t.length);
+ };
+ },
+ function (t, e) {
+ t.exports = {};
+ },
+ function (t, e, n) {
+ var i = n(6),
+ r = n(72).f,
+ o = n(47),
+ s = n(16),
+ a = n(37),
+ l = n(103),
+ u = n(77);
+ t.exports = function (t, e) {
+ var n,
+ c,
+ h,
+ d,
+ f,
+ p = t.target,
+ m = t.global,
+ g = t.stat;
+ if ((n = m ? i : g ? i[p] || a(p, {}) : (i[p] || {}).prototype))
+ for (c in e) {
+ if (
+ ((d = e[c]),
+ (h = t.dontCallGetSet ? (f = r(n, c)) && f.value : n[c]),
+ !u(m ? c : p + (g ? "." : "#") + c, t.forced) && void 0 !== h)
+ ) {
+ if (typeof d == typeof h) continue;
+ l(d, h);
+ }
+ (t.sham || (h && h.sham)) && o(d, "sham", !0), s(n, c, d, t);
+ }
+ };
+ },
+ function (t, e, n) {
+ var i = n(6);
+ t.exports = i;
+ },
+ function (t, e) {
+ t.exports = !1;
+ },
+ function (t, e, n) {
+ var i,
+ r = n(10),
+ o = n(95),
+ s = n(45),
+ a = n(25),
+ l = n(101),
+ u = n(66),
+ c = n(46),
+ h = c("IE_PROTO"),
+ d = function () {},
+ f = function (t) {
+ return "";
+ },
+ p = function (t) {
+ t.write(f("")), t.close();
+ var e = t.parentWindow.Object;
+ return (t = null), e;
+ },
+ m = function () {
+ try {
+ i = new ActiveXObject("htmlfile");
+ } catch (t) {}
+ var t, e;
+ m =
+ "undefined" != typeof document
+ ? document.domain && i
+ ? p(i)
+ : (((e = u("iframe")).style.display = "none"),
+ l.appendChild(e),
+ (e.src = String("javascript:")),
+ (t = e.contentWindow.document).open(),
+ t.write(f("document.F=Object")),
+ t.close(),
+ t.F)
+ : p(i);
+ for (var n = s.length; n--; ) delete m.prototype[s[n]];
+ return m();
+ };
+ (a[h] = !0),
+ (t.exports =
+ Object.create ||
+ function (t, e) {
+ var n;
+ return (
+ null !== t
+ ? ((d.prototype = r(t)),
+ (n = new d()),
+ (d.prototype = null),
+ (n[h] = t))
+ : (n = m()),
+ void 0 === e ? n : o.f(n, e)
+ );
+ });
+ },
+ function (t, e) {
+ t.exports = {};
+ },
+ function (t, e) {
+ t.exports = function (t, e) {
+ return {
+ enumerable: !(1 & t),
+ configurable: !(2 & t),
+ writable: !(4 & t),
+ value: e,
+ };
+ };
+ },
+ function (t, e, n) {
+ var i = n(21),
+ r = n(0),
+ o = n(25),
+ s = n(4),
+ a = n(8),
+ l = n(9).f,
+ u = n(49),
+ c = n(110),
+ h = n(112),
+ d = n(38),
+ f = n(82),
+ p = !1,
+ m = d("meta"),
+ g = 0,
+ v = function (t) {
+ l(t, m, { value: { objectID: "O" + g++, weakData: {} } });
+ },
+ _ = (t.exports = {
+ enable: function () {
+ (_.enable = function () {}), (p = !0);
+ var t = u.f,
+ e = r([].splice),
+ n = {};
+ (n[m] = 1),
+ t(n).length &&
+ ((u.f = function (n) {
+ for (var i = t(n), r = 0, o = i.length; r < o; r++)
+ if (i[r] === m) {
+ e(i, r, 1);
+ break;
+ }
+ return i;
+ }),
+ i(
+ { target: "Object", stat: !0, forced: !0 },
+ { getOwnPropertyNames: c.f }
+ ));
+ },
+ fastKey: function (t, e) {
+ if (!s(t))
+ return "symbol" == typeof t
+ ? t
+ : ("string" == typeof t ? "S" : "P") + t;
+ if (!a(t, m)) {
+ if (!h(t)) return "F";
+ if (!e) return "E";
+ v(t);
+ }
+ return t[m].objectID;
+ },
+ getWeakData: function (t, e) {
+ if (!a(t, m)) {
+ if (!h(t)) return !0;
+ if (!e) return !1;
+ v(t);
+ }
+ return t[m].weakData;
+ },
+ onFreeze: function (t) {
+ return f && p && h(t) && !a(t, m) && v(t), t;
+ },
+ });
+ o[m] = !0;
+ },
+ function (t, e, n) {
+ var i = n(114),
+ r = n(42),
+ o = n(33),
+ s = i(i.bind);
+ t.exports = function (t, e) {
+ return (
+ r(t),
+ void 0 === e
+ ? t
+ : o
+ ? s(t, e)
+ : function () {
+ return t.apply(e, arguments);
+ }
+ );
+ };
+ },
+ function (t, e, n) {
+ var i = n(55),
+ r = n(2),
+ o = n(13),
+ s = n(5)("toStringTag"),
+ a = Object,
+ l =
+ "Arguments" ==
+ o(
+ (function () {
+ return arguments;
+ })()
+ );
+ t.exports = i
+ ? o
+ : function (t) {
+ var e, n, i;
+ return void 0 === t
+ ? "Undefined"
+ : null === t
+ ? "Null"
+ : "string" ==
+ typeof (n = (function (t, e) {
+ try {
+ return t[e];
+ } catch (t) {}
+ })((e = a(t)), s))
+ ? n
+ : l
+ ? o(e)
+ : "Object" == (i = o(e)) && r(e.callee)
+ ? "Arguments"
+ : i;
+ };
+ },
+ function (t, e, n) {
+ (function (e) {
+ var n = /^\s+|\s+$/g,
+ i = /^[-+]0x[0-9a-f]+$/i,
+ r = /^0b[01]+$/i,
+ o = /^0o[0-7]+$/i,
+ s = parseInt,
+ a = "object" == typeof e && e && e.Object === Object && e,
+ l = "object" == typeof self && self && self.Object === Object && self,
+ u = a || l || Function("return this")(),
+ c = Object.prototype.toString,
+ h = Math.max,
+ d = Math.min,
+ f = function () {
+ return u.Date.now();
+ };
+ function p(t) {
+ var e = typeof t;
+ return !!t && ("object" == e || "function" == e);
+ }
+ function m(t) {
+ if ("number" == typeof t) return t;
+ if (
+ (function (t) {
+ return (
+ "symbol" == typeof t ||
+ ((function (t) {
+ return !!t && "object" == typeof t;
+ })(t) &&
+ "[object Symbol]" == c.call(t))
+ );
+ })(t)
+ )
+ return NaN;
+ if (p(t)) {
+ var e = "function" == typeof t.valueOf ? t.valueOf() : t;
+ t = p(e) ? e + "" : e;
+ }
+ if ("string" != typeof t) return 0 === t ? t : +t;
+ t = t.replace(n, "");
+ var a = r.test(t);
+ return a || o.test(t) ? s(t.slice(2), a ? 2 : 8) : i.test(t) ? NaN : +t;
+ }
+ t.exports = function (t, e, n) {
+ var i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ u = 0,
+ c = !1,
+ g = !1,
+ v = !0;
+ if ("function" != typeof t) throw new TypeError("Expected a function");
+ function _(e) {
+ var n = i,
+ o = r;
+ return (i = r = void 0), (u = e), (s = t.apply(o, n));
+ }
+ function x(t) {
+ return (u = t), (a = setTimeout(b, e)), c ? _(t) : s;
+ }
+ function y(t) {
+ var n = t - l;
+ return void 0 === l || n >= e || n < 0 || (g && t - u >= o);
+ }
+ function b() {
+ var t = f();
+ if (y(t)) return w(t);
+ a = setTimeout(
+ b,
+ (function (t) {
+ var n = e - (t - l);
+ return g ? d(n, o - (t - u)) : n;
+ })(t)
+ );
+ }
+ function w(t) {
+ return (a = void 0), v && i ? _(t) : ((i = r = void 0), s);
+ }
+ function S() {
+ var t = f(),
+ n = y(t);
+ if (((i = arguments), (r = this), (l = t), n)) {
+ if (void 0 === a) return x(l);
+ if (g) return (a = setTimeout(b, e)), _(l);
+ }
+ return void 0 === a && (a = setTimeout(b, e)), s;
+ }
+ return (
+ (e = m(e) || 0),
+ p(n) &&
+ ((c = !!n.leading),
+ (o = (g = "maxWait" in n) ? h(m(n.maxWait) || 0, e) : o),
+ (v = "trailing" in n ? !!n.trailing : v)),
+ (S.cancel = function () {
+ void 0 !== a && clearTimeout(a), (u = 0), (i = l = r = a = void 0);
+ }),
+ (S.flush = function () {
+ return void 0 === a ? s : w(f());
+ }),
+ S
+ );
+ };
+ }).call(this, n(35));
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(12),
+ r = n(92),
+ o = n(20),
+ s = n(15),
+ a = n(9).f,
+ l = n(48),
+ u = n(51),
+ c = n(23),
+ h = n(7),
+ d = s.set,
+ f = s.getterFor("Array Iterator");
+ t.exports = l(
+ Array,
+ "Array",
+ function (t, e) {
+ d(this, { type: "Array Iterator", target: i(t), index: 0, kind: e });
+ },
+ function () {
+ var t = f(this),
+ e = t.target,
+ n = t.kind,
+ i = t.index++;
+ return !e || i >= e.length
+ ? ((t.target = void 0), u(void 0, !0))
+ : u("keys" == n ? i : "values" == n ? e[i] : [i, e[i]], !1);
+ },
+ "values"
+ );
+ var p = (o.Arguments = o.Array);
+ if ((r("keys"), r("values"), r("entries"), !c && h && "values" !== p.name))
+ try {
+ a(p, "name", { value: "values" });
+ } catch (t) {}
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = n(3),
+ o = n(13),
+ s = Object,
+ a = i("".split);
+ t.exports = r(function () {
+ return !s("z").propertyIsEnumerable(0);
+ })
+ ? function (t) {
+ return "String" == o(t) ? a(t, "") : s(t);
+ }
+ : s;
+ },
+ function (t, e, n) {
+ var i = n(3);
+ t.exports = !i(function () {
+ var t = function () {}.bind();
+ return "function" != typeof t || t.hasOwnProperty("prototype");
+ });
+ },
+ function (t, e, n) {
+ var i = n(14),
+ r = TypeError;
+ t.exports = function (t) {
+ if (i(t)) throw r("Can't call method on " + t);
+ return t;
+ };
+ },
+ function (t, e) {
+ var n;
+ n = (function () {
+ return this;
+ })();
+ try {
+ n = n || new Function("return this")();
+ } catch (t) {
+ "object" == typeof window && (n = window);
+ }
+ t.exports = n;
+ },
+ function (t, e, n) {
+ var i = n(6),
+ r = n(37),
+ o = i["__core-js_shared__"] || r("__core-js_shared__", {});
+ t.exports = o;
+ },
+ function (t, e, n) {
+ var i = n(6),
+ r = Object.defineProperty;
+ t.exports = function (t, e) {
+ try {
+ r(i, t, { value: e, configurable: !0, writable: !0 });
+ } catch (n) {
+ i[t] = e;
+ }
+ return e;
+ };
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = 0,
+ o = Math.random(),
+ s = i((1).toString);
+ t.exports = function (t) {
+ return "Symbol(" + (void 0 === t ? "" : t) + ")_" + s(++r + o, 36);
+ };
+ },
+ function (t, e, n) {
+ var i = n(96),
+ r = n(67);
+ t.exports = function (t) {
+ var e = i(t, "string");
+ return r(e) ? e : e + "";
+ };
+ },
+ function (t, e, n) {
+ var i = n(0);
+ t.exports = i({}.isPrototypeOf);
+ },
+ function (t, e, n) {
+ var i = n(42),
+ r = n(14);
+ t.exports = function (t, e) {
+ var n = t[e];
+ return r(n) ? void 0 : i(n);
+ };
+ },
+ function (t, e, n) {
+ var i = n(2),
+ r = n(43),
+ o = TypeError;
+ t.exports = function (t) {
+ if (i(t)) return t;
+ throw o(r(t) + " is not a function");
+ };
+ },
+ function (t, e) {
+ var n = String;
+ t.exports = function (t) {
+ try {
+ return n(t);
+ } catch (t) {
+ return "Object";
+ }
+ };
+ },
+ function (t, e, n) {
+ var i = n(99);
+ t.exports = function (t) {
+ var e = +t;
+ return e != e || 0 === e ? 0 : i(e);
+ };
+ },
+ function (t, e) {
+ t.exports = [
+ "constructor",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "toLocaleString",
+ "toString",
+ "valueOf",
+ ];
+ },
+ function (t, e, n) {
+ var i = n(60),
+ r = n(38),
+ o = i("keys");
+ t.exports = function (t) {
+ return o[t] || (o[t] = r(t));
+ };
+ },
+ function (t, e, n) {
+ var i = n(7),
+ r = n(9),
+ o = n(26);
+ t.exports = i
+ ? function (t, e, n) {
+ return r.f(t, e, o(1, n));
+ }
+ : function (t, e, n) {
+ return (t[e] = n), t;
+ };
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(21),
+ r = n(11),
+ o = n(23),
+ s = n(74),
+ a = n(2),
+ l = n(105),
+ u = n(79),
+ c = n(80),
+ h = n(50),
+ d = n(47),
+ f = n(16),
+ p = n(5),
+ m = n(20),
+ g = n(78),
+ v = s.PROPER,
+ _ = s.CONFIGURABLE,
+ x = g.IteratorPrototype,
+ y = g.BUGGY_SAFARI_ITERATORS,
+ b = p("iterator"),
+ w = function () {
+ return this;
+ };
+ t.exports = function (t, e, n, s, p, g, S) {
+ l(n, e, s);
+ var M,
+ D,
+ T,
+ E = function (t) {
+ if (t === p && R) return R;
+ if (!y && t in P) return P[t];
+ switch (t) {
+ case "keys":
+ case "values":
+ case "entries":
+ return function () {
+ return new n(this, t);
+ };
+ }
+ return function () {
+ return new n(this);
+ };
+ },
+ C = e + " Iterator",
+ A = !1,
+ P = t.prototype,
+ L = P[b] || P["@@iterator"] || (p && P[p]),
+ R = (!y && L) || E(p),
+ O = ("Array" == e && P.entries) || L;
+ if (
+ (O &&
+ (M = u(O.call(new t()))) !== Object.prototype &&
+ M.next &&
+ (o || u(M) === x || (c ? c(M, x) : a(M[b]) || f(M, b, w)),
+ h(M, C, !0, !0),
+ o && (m[C] = w)),
+ v &&
+ "values" == p &&
+ L &&
+ "values" !== L.name &&
+ (!o && _
+ ? d(P, "name", "values")
+ : ((A = !0),
+ (R = function () {
+ return r(L, this);
+ }))),
+ p)
+ )
+ if (
+ ((D = {
+ values: E("values"),
+ keys: g ? R : E("keys"),
+ entries: E("entries"),
+ }),
+ S)
+ )
+ for (T in D) (y || A || !(T in P)) && f(P, T, D[T]);
+ else i({ target: e, proto: !0, forced: y || A }, D);
+ return (o && !S) || P[b] === R || f(P, b, R, { name: p }), (m[e] = R), D;
+ };
+ },
+ function (t, e, n) {
+ var i = n(69),
+ r = n(45).concat("length", "prototype");
+ e.f =
+ Object.getOwnPropertyNames ||
+ function (t) {
+ return i(t, r);
+ };
+ },
+ function (t, e, n) {
+ var i = n(9).f,
+ r = n(8),
+ o = n(5)("toStringTag");
+ t.exports = function (t, e, n) {
+ t && !n && (t = t.prototype),
+ t && !r(t, o) && i(t, o, { configurable: !0, value: e });
+ };
+ },
+ function (t, e) {
+ t.exports = function (t, e) {
+ return { value: t, done: e };
+ };
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(21),
+ r = n(6),
+ o = n(0),
+ s = n(77),
+ a = n(16),
+ l = n(27),
+ u = n(53),
+ c = n(56),
+ h = n(2),
+ d = n(14),
+ f = n(4),
+ p = n(3),
+ m = n(86),
+ g = n(50),
+ v = n(115);
+ t.exports = function (t, e, n) {
+ var _ = -1 !== t.indexOf("Map"),
+ x = -1 !== t.indexOf("Weak"),
+ y = _ ? "set" : "add",
+ b = r[t],
+ w = b && b.prototype,
+ S = b,
+ M = {},
+ D = function (t) {
+ var e = o(w[t]);
+ a(
+ w,
+ t,
+ "add" == t
+ ? function (t) {
+ return e(this, 0 === t ? 0 : t), this;
+ }
+ : "delete" == t
+ ? function (t) {
+ return !(x && !f(t)) && e(this, 0 === t ? 0 : t);
+ }
+ : "get" == t
+ ? function (t) {
+ return x && !f(t) ? void 0 : e(this, 0 === t ? 0 : t);
+ }
+ : "has" == t
+ ? function (t) {
+ return !(x && !f(t)) && e(this, 0 === t ? 0 : t);
+ }
+ : function (t, n) {
+ return e(this, 0 === t ? 0 : t, n), this;
+ }
+ );
+ };
+ if (
+ s(
+ t,
+ !h(b) ||
+ !(
+ x ||
+ (w.forEach &&
+ !p(function () {
+ new b().entries().next();
+ }))
+ )
+ )
+ )
+ (S = n.getConstructor(e, t, _, y)), l.enable();
+ else if (s(t, !0)) {
+ var T = new S(),
+ E = T[y](x ? {} : -0, 1) != T,
+ C = p(function () {
+ T.has(1);
+ }),
+ A = m(function (t) {
+ new b(t);
+ }),
+ P =
+ !x &&
+ p(function () {
+ for (var t = new b(), e = 5; e--; ) t[y](e, e);
+ return !t.has(-0);
+ });
+ A ||
+ (((S = e(function (t, e) {
+ c(t, w);
+ var n = v(new b(), t, S);
+ return d(e) || u(e, n[y], { that: n, AS_ENTRIES: _ }), n;
+ })).prototype = w),
+ (w.constructor = S)),
+ (C || P) && (D("delete"), D("has"), _ && D("get")),
+ (P || E) && D(y),
+ x && w.clear && delete w.clear;
+ }
+ return (
+ (M[t] = S),
+ i({ global: !0, constructor: !0, forced: S != b }, M),
+ g(S, t),
+ x || n.setStrong(S, t, _),
+ S
+ );
+ };
+ },
+ function (t, e, n) {
+ var i = n(28),
+ r = n(11),
+ o = n(10),
+ s = n(43),
+ a = n(83),
+ l = n(19),
+ u = n(40),
+ c = n(84),
+ h = n(54),
+ d = n(85),
+ f = TypeError,
+ p = function (t, e) {
+ (this.stopped = t), (this.result = e);
+ },
+ m = p.prototype;
+ t.exports = function (t, e, n) {
+ var g,
+ v,
+ _,
+ x,
+ y,
+ b,
+ w,
+ S = n && n.that,
+ M = !(!n || !n.AS_ENTRIES),
+ D = !(!n || !n.IS_RECORD),
+ T = !(!n || !n.IS_ITERATOR),
+ E = !(!n || !n.INTERRUPTED),
+ C = i(e, S),
+ A = function (t) {
+ return g && d(g, "normal", t), new p(!0, t);
+ },
+ P = function (t) {
+ return M
+ ? (o(t), E ? C(t[0], t[1], A) : C(t[0], t[1]))
+ : E
+ ? C(t, A)
+ : C(t);
+ };
+ if (D) g = t.iterator;
+ else if (T) g = t;
+ else {
+ if (!(v = h(t))) throw f(s(t) + " is not iterable");
+ if (a(v)) {
+ for (_ = 0, x = l(t); x > _; _++)
+ if ((y = P(t[_])) && u(m, y)) return y;
+ return new p(!1);
+ }
+ g = c(t, v);
+ }
+ for (b = D ? t.next : g.next; !(w = r(b, g)).done; ) {
+ try {
+ y = P(w.value);
+ } catch (t) {
+ d(g, "throw", t);
+ }
+ if ("object" == typeof y && y && u(m, y)) return y;
+ }
+ return new p(!1);
+ };
+ },
+ function (t, e, n) {
+ var i = n(29),
+ r = n(41),
+ o = n(14),
+ s = n(20),
+ a = n(5)("iterator");
+ t.exports = function (t) {
+ if (!o(t)) return r(t, a) || r(t, "@@iterator") || s[i(t)];
+ };
+ },
+ function (t, e, n) {
+ var i = {};
+ (i[n(5)("toStringTag")] = "z"), (t.exports = "[object z]" === String(i));
+ },
+ function (t, e, n) {
+ var i = n(40),
+ r = TypeError;
+ t.exports = function (t, e) {
+ if (i(e, t)) return t;
+ throw r("Incorrect invocation");
+ };
+ },
+ function (t, e, n) {
+ var i = n(16);
+ t.exports = function (t, e, n) {
+ for (var r in e) i(t, r, e[r], n);
+ return t;
+ };
+ },
+ function (t, e, n) {
+ var i = n(55),
+ r = n(16),
+ o = n(117);
+ i || r(Object.prototype, "toString", o, { unsafe: !0 });
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(118).charAt,
+ r = n(88),
+ o = n(15),
+ s = n(48),
+ a = n(51),
+ l = o.set,
+ u = o.getterFor("String Iterator");
+ s(
+ String,
+ "String",
+ function (t) {
+ l(this, { type: "String Iterator", string: r(t), index: 0 });
+ },
+ function () {
+ var t,
+ e = u(this),
+ n = e.string,
+ r = e.index;
+ return r >= n.length
+ ? a(void 0, !0)
+ : ((t = i(n, r)), (e.index += t.length), a(t, !1));
+ }
+ );
+ },
+ function (t, e, n) {
+ var i = n(23),
+ r = n(36);
+ (t.exports = function (t, e) {
+ return r[t] || (r[t] = void 0 !== e ? e : {});
+ })("versions", []).push({
+ version: "3.27.2",
+ mode: i ? "pure" : "global",
+ copyright: "© 2014-2023 Denis Pushkarev (zloirock.ru)",
+ license: "https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",
+ source: "https://github.com/zloirock/core-js",
+ });
+ },
+ function (t, e, n) {
+ var i = n(93),
+ r = n(3);
+ t.exports =
+ !!Object.getOwnPropertySymbols &&
+ !r(function () {
+ var t = Symbol();
+ return (
+ !String(t) ||
+ !(Object(t) instanceof Symbol) ||
+ (!Symbol.sham && i && i < 41)
+ );
+ });
+ },
+ function (t, e, n) {
+ var i = n(61);
+ t.exports = i && !Symbol.sham && "symbol" == typeof Symbol.iterator;
+ },
+ function (t, e) {
+ var n = "object" == typeof document && document.all,
+ i = void 0 === n && void 0 !== n;
+ t.exports = { all: n, IS_HTMLDDA: i };
+ },
+ function (t, e, n) {
+ var i = n(7),
+ r = n(3);
+ t.exports =
+ i &&
+ r(function () {
+ return (
+ 42 !=
+ Object.defineProperty(function () {}, "prototype", {
+ value: 42,
+ writable: !1,
+ }).prototype
+ );
+ });
+ },
+ function (t, e, n) {
+ var i = n(7),
+ r = n(3),
+ o = n(66);
+ t.exports =
+ !i &&
+ !r(function () {
+ return (
+ 7 !=
+ Object.defineProperty(o("div"), "a", {
+ get: function () {
+ return 7;
+ },
+ }).a
+ );
+ });
+ },
+ function (t, e, n) {
+ var i = n(6),
+ r = n(4),
+ o = i.document,
+ s = r(o) && r(o.createElement);
+ t.exports = function (t) {
+ return s ? o.createElement(t) : {};
+ };
+ },
+ function (t, e, n) {
+ var i = n(18),
+ r = n(2),
+ o = n(40),
+ s = n(62),
+ a = Object;
+ t.exports = s
+ ? function (t) {
+ return "symbol" == typeof t;
+ }
+ : function (t) {
+ var e = i("Symbol");
+ return r(e) && o(e.prototype, a(t));
+ };
+ },
+ function (t, e, n) {
+ var i = n(69),
+ r = n(45);
+ t.exports =
+ Object.keys ||
+ function (t) {
+ return i(t, r);
+ };
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = n(8),
+ o = n(12),
+ s = n(98).indexOf,
+ a = n(25),
+ l = i([].push);
+ t.exports = function (t, e) {
+ var n,
+ i = o(t),
+ u = 0,
+ c = [];
+ for (n in i) !r(a, n) && r(i, n) && l(c, n);
+ for (; e.length > u; ) r(i, (n = e[u++])) && (~s(c, n) || l(c, n));
+ return c;
+ };
+ },
+ function (t, e, n) {
+ var i = n(44),
+ r = Math.max,
+ o = Math.min;
+ t.exports = function (t, e) {
+ var n = i(t);
+ return n < 0 ? r(n + e, 0) : o(n, e);
+ };
+ },
+ function (t, e, n) {
+ var i = n(6),
+ r = n(2),
+ o = i.WeakMap;
+ t.exports = r(o) && /native code/.test(String(o));
+ },
+ function (t, e, n) {
+ var i = n(7),
+ r = n(11),
+ o = n(73),
+ s = n(26),
+ a = n(12),
+ l = n(39),
+ u = n(8),
+ c = n(65),
+ h = Object.getOwnPropertyDescriptor;
+ e.f = i
+ ? h
+ : function (t, e) {
+ if (((t = a(t)), (e = l(e)), c))
+ try {
+ return h(t, e);
+ } catch (t) {}
+ if (u(t, e)) return s(!r(o.f, t, e), t[e]);
+ };
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = {}.propertyIsEnumerable,
+ r = Object.getOwnPropertyDescriptor,
+ o = r && !i.call({ 1: 2 }, 1);
+ e.f = o
+ ? function (t) {
+ var e = r(this, t);
+ return !!e && e.enumerable;
+ }
+ : i;
+ },
+ function (t, e, n) {
+ var i = n(7),
+ r = n(8),
+ o = Function.prototype,
+ s = i && Object.getOwnPropertyDescriptor,
+ a = r(o, "name"),
+ l = a && "something" === function () {}.name,
+ u = a && (!i || (i && s(o, "name").configurable));
+ t.exports = { EXISTS: a, PROPER: l, CONFIGURABLE: u };
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = n(2),
+ o = n(36),
+ s = i(Function.toString);
+ r(o.inspectSource) ||
+ (o.inspectSource = function (t) {
+ return s(t);
+ }),
+ (t.exports = o.inspectSource);
+ },
+ function (t, e) {
+ e.f = Object.getOwnPropertySymbols;
+ },
+ function (t, e, n) {
+ var i = n(3),
+ r = n(2),
+ o = /#|\.prototype\./,
+ s = function (t, e) {
+ var n = l[a(t)];
+ return n == c || (n != u && (r(e) ? i(e) : !!e));
+ },
+ a = (s.normalize = function (t) {
+ return String(t).replace(o, ".").toLowerCase();
+ }),
+ l = (s.data = {}),
+ u = (s.NATIVE = "N"),
+ c = (s.POLYFILL = "P");
+ t.exports = s;
+ },
+ function (t, e, n) {
+ "use strict";
+ var i,
+ r,
+ o,
+ s = n(3),
+ a = n(2),
+ l = n(4),
+ u = n(24),
+ c = n(79),
+ h = n(16),
+ d = n(5),
+ f = n(23),
+ p = d("iterator"),
+ m = !1;
+ [].keys &&
+ ("next" in (o = [].keys())
+ ? (r = c(c(o))) !== Object.prototype && (i = r)
+ : (m = !0)),
+ !l(i) ||
+ s(function () {
+ var t = {};
+ return i[p].call(t) !== t;
+ })
+ ? (i = {})
+ : f && (i = u(i)),
+ a(i[p]) ||
+ h(i, p, function () {
+ return this;
+ }),
+ (t.exports = { IteratorPrototype: i, BUGGY_SAFARI_ITERATORS: m });
+ },
+ function (t, e, n) {
+ var i = n(8),
+ r = n(2),
+ o = n(17),
+ s = n(46),
+ a = n(106),
+ l = s("IE_PROTO"),
+ u = Object,
+ c = u.prototype;
+ t.exports = a
+ ? u.getPrototypeOf
+ : function (t) {
+ var e = o(t);
+ if (i(e, l)) return e[l];
+ var n = e.constructor;
+ return r(n) && e instanceof n
+ ? n.prototype
+ : e instanceof u
+ ? c
+ : null;
+ };
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = n(10),
+ o = n(107);
+ t.exports =
+ Object.setPrototypeOf ||
+ ("__proto__" in {}
+ ? (function () {
+ var t,
+ e = !1,
+ n = {};
+ try {
+ (t = i(
+ Object.getOwnPropertyDescriptor(Object.prototype, "__proto__")
+ .set
+ ))(n, []),
+ (e = n instanceof Array);
+ } catch (t) {}
+ return function (n, i) {
+ return r(n), o(i), e ? t(n, i) : (n.__proto__ = i), n;
+ };
+ })()
+ : void 0);
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(39),
+ r = n(9),
+ o = n(26);
+ t.exports = function (t, e, n) {
+ var s = i(e);
+ s in t ? r.f(t, s, o(0, n)) : (t[s] = n);
+ };
+ },
+ function (t, e, n) {
+ var i = n(3);
+ t.exports = !i(function () {
+ return Object.isExtensible(Object.preventExtensions({}));
+ });
+ },
+ function (t, e, n) {
+ var i = n(5),
+ r = n(20),
+ o = i("iterator"),
+ s = Array.prototype;
+ t.exports = function (t) {
+ return void 0 !== t && (r.Array === t || s[o] === t);
+ };
+ },
+ function (t, e, n) {
+ var i = n(11),
+ r = n(42),
+ o = n(10),
+ s = n(43),
+ a = n(54),
+ l = TypeError;
+ t.exports = function (t, e) {
+ var n = arguments.length < 2 ? a(t) : e;
+ if (r(n)) return o(i(n, t));
+ throw l(s(t) + " is not iterable");
+ };
+ },
+ function (t, e, n) {
+ var i = n(11),
+ r = n(10),
+ o = n(41);
+ t.exports = function (t, e, n) {
+ var s, a;
+ r(t);
+ try {
+ if (!(s = o(t, "return"))) {
+ if ("throw" === e) throw n;
+ return n;
+ }
+ s = i(s, t);
+ } catch (t) {
+ (a = !0), (s = t);
+ }
+ if ("throw" === e) throw n;
+ if (a) throw s;
+ return r(s), n;
+ };
+ },
+ function (t, e, n) {
+ var i = n(5)("iterator"),
+ r = !1;
+ try {
+ var o = 0,
+ s = {
+ next: function () {
+ return { done: !!o++ };
+ },
+ return: function () {
+ r = !0;
+ },
+ };
+ (s[i] = function () {
+ return this;
+ }),
+ Array.from(s, function () {
+ throw 2;
+ });
+ } catch (t) {}
+ t.exports = function (t, e) {
+ if (!e && !r) return !1;
+ var n = !1;
+ try {
+ var o = {};
+ (o[i] = function () {
+ return {
+ next: function () {
+ return { done: (n = !0) };
+ },
+ };
+ }),
+ t(o);
+ } catch (t) {}
+ return n;
+ };
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(9).f,
+ r = n(24),
+ o = n(57),
+ s = n(28),
+ a = n(56),
+ l = n(14),
+ u = n(53),
+ c = n(48),
+ h = n(51),
+ d = n(116),
+ f = n(7),
+ p = n(27).fastKey,
+ m = n(15),
+ g = m.set,
+ v = m.getterFor;
+ t.exports = {
+ getConstructor: function (t, e, n, c) {
+ var h = t(function (t, i) {
+ a(t, d),
+ g(t, {
+ type: e,
+ index: r(null),
+ first: void 0,
+ last: void 0,
+ size: 0,
+ }),
+ f || (t.size = 0),
+ l(i) || u(i, t[c], { that: t, AS_ENTRIES: n });
+ }),
+ d = h.prototype,
+ m = v(e),
+ _ = function (t, e, n) {
+ var i,
+ r,
+ o = m(t),
+ s = x(t, e);
+ return (
+ s
+ ? (s.value = n)
+ : ((o.last = s =
+ {
+ index: (r = p(e, !0)),
+ key: e,
+ value: n,
+ previous: (i = o.last),
+ next: void 0,
+ removed: !1,
+ }),
+ o.first || (o.first = s),
+ i && (i.next = s),
+ f ? o.size++ : t.size++,
+ "F" !== r && (o.index[r] = s)),
+ t
+ );
+ },
+ x = function (t, e) {
+ var n,
+ i = m(t),
+ r = p(e);
+ if ("F" !== r) return i.index[r];
+ for (n = i.first; n; n = n.next) if (n.key == e) return n;
+ };
+ return (
+ o(d, {
+ clear: function () {
+ for (var t = m(this), e = t.index, n = t.first; n; )
+ (n.removed = !0),
+ n.previous && (n.previous = n.previous.next = void 0),
+ delete e[n.index],
+ (n = n.next);
+ (t.first = t.last = void 0), f ? (t.size = 0) : (this.size = 0);
+ },
+ delete: function (t) {
+ var e = m(this),
+ n = x(this, t);
+ if (n) {
+ var i = n.next,
+ r = n.previous;
+ delete e.index[n.index],
+ (n.removed = !0),
+ r && (r.next = i),
+ i && (i.previous = r),
+ e.first == n && (e.first = i),
+ e.last == n && (e.last = r),
+ f ? e.size-- : this.size--;
+ }
+ return !!n;
+ },
+ forEach: function (t) {
+ for (
+ var e,
+ n = m(this),
+ i = s(t, arguments.length > 1 ? arguments[1] : void 0);
+ (e = e ? e.next : n.first);
+
+ )
+ for (i(e.value, e.key, this); e && e.removed; ) e = e.previous;
+ },
+ has: function (t) {
+ return !!x(this, t);
+ },
+ }),
+ o(
+ d,
+ n
+ ? {
+ get: function (t) {
+ var e = x(this, t);
+ return e && e.value;
+ },
+ set: function (t, e) {
+ return _(this, 0 === t ? 0 : t, e);
+ },
+ }
+ : {
+ add: function (t) {
+ return _(this, (t = 0 === t ? 0 : t), t);
+ },
+ }
+ ),
+ f &&
+ i(d, "size", {
+ get: function () {
+ return m(this).size;
+ },
+ }),
+ h
+ );
+ },
+ setStrong: function (t, e, n) {
+ var i = e + " Iterator",
+ r = v(e),
+ o = v(i);
+ c(
+ t,
+ e,
+ function (t, e) {
+ g(this, { type: i, target: t, state: r(t), kind: e, last: void 0 });
+ },
+ function () {
+ for (var t = o(this), e = t.kind, n = t.last; n && n.removed; )
+ n = n.previous;
+ return t.target && (t.last = n = n ? n.next : t.state.first)
+ ? h(
+ "keys" == e
+ ? n.key
+ : "values" == e
+ ? n.value
+ : [n.key, n.value],
+ !1
+ )
+ : ((t.target = void 0), h(void 0, !0));
+ },
+ n ? "entries" : "values",
+ !n,
+ !0
+ ),
+ d(e);
+ },
+ };
+ },
+ function (t, e, n) {
+ var i = n(29),
+ r = String;
+ t.exports = function (t) {
+ if ("Symbol" === i(t))
+ throw TypeError("Cannot convert a Symbol value to a string");
+ return r(t);
+ };
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = n(3),
+ o = n(2),
+ s = n(29),
+ a = n(18),
+ l = n(75),
+ u = function () {},
+ c = [],
+ h = a("Reflect", "construct"),
+ d = /^\s*(?:class|function)\b/,
+ f = i(d.exec),
+ p = !d.exec(u),
+ m = function (t) {
+ if (!o(t)) return !1;
+ try {
+ return h(u, c, t), !0;
+ } catch (t) {
+ return !1;
+ }
+ },
+ g = function (t) {
+ if (!o(t)) return !1;
+ switch (s(t)) {
+ case "AsyncFunction":
+ case "GeneratorFunction":
+ case "AsyncGeneratorFunction":
+ return !1;
+ }
+ try {
+ return p || !!f(d, l(t));
+ } catch (t) {
+ return !0;
+ }
+ };
+ (g.sham = !0),
+ (t.exports =
+ !h ||
+ r(function () {
+ var t;
+ return (
+ m(m.call) ||
+ !m(Object) ||
+ !m(function () {
+ t = !0;
+ }) ||
+ t
+ );
+ })
+ ? g
+ : m);
+ },
+ function (t, e, n) {
+ "use strict";
+ (function (t) {
+ var n = "object" == typeof t && t && t.Object === Object && t;
+ e.a = n;
+ }).call(this, n(35));
+ },
+ function (t, e, n) {
+ n(31), n(108), n(58), n(59);
+ var i = n(22);
+ t.exports = i.Map;
+ },
+ function (t, e, n) {
+ var i = n(5),
+ r = n(24),
+ o = n(9).f,
+ s = i("unscopables"),
+ a = Array.prototype;
+ null == a[s] && o(a, s, { configurable: !0, value: r(null) }),
+ (t.exports = function (t) {
+ a[s][t] = !0;
+ });
+ },
+ function (t, e, n) {
+ var i,
+ r,
+ o = n(6),
+ s = n(94),
+ a = o.process,
+ l = o.Deno,
+ u = (a && a.versions) || (l && l.version),
+ c = u && u.v8;
+ c && (r = (i = c.split("."))[0] > 0 && i[0] < 4 ? 1 : +(i[0] + i[1])),
+ !r &&
+ s &&
+ (!(i = s.match(/Edge\/(\d+)/)) || i[1] >= 74) &&
+ (i = s.match(/Chrome\/(\d+)/)) &&
+ (r = +i[1]),
+ (t.exports = r);
+ },
+ function (t, e) {
+ t.exports =
+ ("undefined" != typeof navigator && String(navigator.userAgent)) || "";
+ },
+ function (t, e, n) {
+ var i = n(7),
+ r = n(64),
+ o = n(9),
+ s = n(10),
+ a = n(12),
+ l = n(68);
+ e.f =
+ i && !r
+ ? Object.defineProperties
+ : function (t, e) {
+ s(t);
+ for (var n, i = a(e), r = l(e), u = r.length, c = 0; u > c; )
+ o.f(t, (n = r[c++]), i[n]);
+ return t;
+ };
+ },
+ function (t, e, n) {
+ var i = n(11),
+ r = n(4),
+ o = n(67),
+ s = n(41),
+ a = n(97),
+ l = n(5),
+ u = TypeError,
+ c = l("toPrimitive");
+ t.exports = function (t, e) {
+ if (!r(t) || o(t)) return t;
+ var n,
+ l = s(t, c);
+ if (l) {
+ if ((void 0 === e && (e = "default"), (n = i(l, t, e)), !r(n) || o(n)))
+ return n;
+ throw u("Can't convert object to primitive value");
+ }
+ return void 0 === e && (e = "number"), a(t, e);
+ };
+ },
+ function (t, e, n) {
+ var i = n(11),
+ r = n(2),
+ o = n(4),
+ s = TypeError;
+ t.exports = function (t, e) {
+ var n, a;
+ if ("string" === e && r((n = t.toString)) && !o((a = i(n, t)))) return a;
+ if (r((n = t.valueOf)) && !o((a = i(n, t)))) return a;
+ if ("string" !== e && r((n = t.toString)) && !o((a = i(n, t)))) return a;
+ throw s("Can't convert object to primitive value");
+ };
+ },
+ function (t, e, n) {
+ var i = n(12),
+ r = n(70),
+ o = n(19),
+ s = function (t) {
+ return function (e, n, s) {
+ var a,
+ l = i(e),
+ u = o(l),
+ c = r(s, u);
+ if (t && n != n) {
+ for (; u > c; ) if ((a = l[c++]) != a) return !0;
+ } else
+ for (; u > c; c++)
+ if ((t || c in l) && l[c] === n) return t || c || 0;
+ return !t && -1;
+ };
+ };
+ t.exports = { includes: s(!0), indexOf: s(!1) };
+ },
+ function (t, e) {
+ var n = Math.ceil,
+ i = Math.floor;
+ t.exports =
+ Math.trunc ||
+ function (t) {
+ var e = +t;
+ return (e > 0 ? i : n)(e);
+ };
+ },
+ function (t, e, n) {
+ var i = n(44),
+ r = Math.min;
+ t.exports = function (t) {
+ return t > 0 ? r(i(t), 9007199254740991) : 0;
+ };
+ },
+ function (t, e, n) {
+ var i = n(18);
+ t.exports = i("document", "documentElement");
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = n(3),
+ o = n(2),
+ s = n(8),
+ a = n(7),
+ l = n(74).CONFIGURABLE,
+ u = n(75),
+ c = n(15),
+ h = c.enforce,
+ d = c.get,
+ f = String,
+ p = Object.defineProperty,
+ m = i("".slice),
+ g = i("".replace),
+ v = i([].join),
+ _ =
+ a &&
+ !r(function () {
+ return 8 !== p(function () {}, "length", { value: 8 }).length;
+ }),
+ x = String(String).split("String"),
+ y = (t.exports = function (t, e, n) {
+ "Symbol(" === m(f(e), 0, 7) &&
+ (e = "[" + g(f(e), /^Symbol\(([^)]*)\)/, "$1") + "]"),
+ n && n.getter && (e = "get " + e),
+ n && n.setter && (e = "set " + e),
+ (!s(t, "name") || (l && t.name !== e)) &&
+ (a ? p(t, "name", { value: e, configurable: !0 }) : (t.name = e)),
+ _ &&
+ n &&
+ s(n, "arity") &&
+ t.length !== n.arity &&
+ p(t, "length", { value: n.arity });
+ try {
+ n && s(n, "constructor") && n.constructor
+ ? a && p(t, "prototype", { writable: !1 })
+ : t.prototype && (t.prototype = void 0);
+ } catch (t) {}
+ var i = h(t);
+ return (
+ s(i, "source") || (i.source = v(x, "string" == typeof e ? e : "")), t
+ );
+ });
+ Function.prototype.toString = y(function () {
+ return (o(this) && d(this).source) || u(this);
+ }, "toString");
+ },
+ function (t, e, n) {
+ var i = n(8),
+ r = n(104),
+ o = n(72),
+ s = n(9);
+ t.exports = function (t, e, n) {
+ for (var a = r(e), l = s.f, u = o.f, c = 0; c < a.length; c++) {
+ var h = a[c];
+ i(t, h) || (n && i(n, h)) || l(t, h, u(e, h));
+ }
+ };
+ },
+ function (t, e, n) {
+ var i = n(18),
+ r = n(0),
+ o = n(49),
+ s = n(76),
+ a = n(10),
+ l = r([].concat);
+ t.exports =
+ i("Reflect", "ownKeys") ||
+ function (t) {
+ var e = o.f(a(t)),
+ n = s.f;
+ return n ? l(e, n(t)) : e;
+ };
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(78).IteratorPrototype,
+ r = n(24),
+ o = n(26),
+ s = n(50),
+ a = n(20),
+ l = function () {
+ return this;
+ };
+ t.exports = function (t, e, n, u) {
+ var c = e + " Iterator";
+ return (
+ (t.prototype = r(i, { next: o(+!u, n) })),
+ s(t, c, !1, !0),
+ (a[c] = l),
+ t
+ );
+ };
+ },
+ function (t, e, n) {
+ var i = n(3);
+ t.exports = !i(function () {
+ function t() {}
+ return (
+ (t.prototype.constructor = null),
+ Object.getPrototypeOf(new t()) !== t.prototype
+ );
+ });
+ },
+ function (t, e, n) {
+ var i = n(2),
+ r = String,
+ o = TypeError;
+ t.exports = function (t) {
+ if ("object" == typeof t || i(t)) return t;
+ throw o("Can't set " + r(t) + " as a prototype");
+ };
+ },
+ function (t, e, n) {
+ n(109);
+ },
+ function (t, e, n) {
+ "use strict";
+ n(52)(
+ "Map",
+ function (t) {
+ return function () {
+ return t(this, arguments.length ? arguments[0] : void 0);
+ };
+ },
+ n(87)
+ );
+ },
+ function (t, e, n) {
+ var i = n(13),
+ r = n(12),
+ o = n(49).f,
+ s = n(111),
+ a =
+ "object" == typeof window && window && Object.getOwnPropertyNames
+ ? Object.getOwnPropertyNames(window)
+ : [];
+ t.exports.f = function (t) {
+ return a && "Window" == i(t)
+ ? (function (t) {
+ try {
+ return o(t);
+ } catch (t) {
+ return s(a);
+ }
+ })(t)
+ : o(r(t));
+ };
+ },
+ function (t, e, n) {
+ var i = n(70),
+ r = n(19),
+ o = n(81),
+ s = Array,
+ a = Math.max;
+ t.exports = function (t, e, n) {
+ for (
+ var l = r(t),
+ u = i(e, l),
+ c = i(void 0 === n ? l : n, l),
+ h = s(a(c - u, 0)),
+ d = 0;
+ u < c;
+ u++, d++
+ )
+ o(h, d, t[u]);
+ return (h.length = d), h;
+ };
+ },
+ function (t, e, n) {
+ var i = n(3),
+ r = n(4),
+ o = n(13),
+ s = n(113),
+ a = Object.isExtensible,
+ l = i(function () {
+ a(1);
+ });
+ t.exports =
+ l || s
+ ? function (t) {
+ return !!r(t) && (!s || "ArrayBuffer" != o(t)) && (!a || a(t));
+ }
+ : a;
+ },
+ function (t, e, n) {
+ var i = n(3);
+ t.exports = i(function () {
+ if ("function" == typeof ArrayBuffer) {
+ var t = new ArrayBuffer(8);
+ Object.isExtensible(t) && Object.defineProperty(t, "a", { value: 8 });
+ }
+ });
+ },
+ function (t, e, n) {
+ var i = n(13),
+ r = n(0);
+ t.exports = function (t) {
+ if ("Function" === i(t)) return r(t);
+ };
+ },
+ function (t, e, n) {
+ var i = n(2),
+ r = n(4),
+ o = n(80);
+ t.exports = function (t, e, n) {
+ var s, a;
+ return (
+ o &&
+ i((s = e.constructor)) &&
+ s !== n &&
+ r((a = s.prototype)) &&
+ a !== n.prototype &&
+ o(t, a),
+ t
+ );
+ };
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(18),
+ r = n(9),
+ o = n(5),
+ s = n(7),
+ a = o("species");
+ t.exports = function (t) {
+ var e = i(t),
+ n = r.f;
+ s &&
+ e &&
+ !e[a] &&
+ n(e, a, {
+ configurable: !0,
+ get: function () {
+ return this;
+ },
+ });
+ };
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(55),
+ r = n(29);
+ t.exports = i
+ ? {}.toString
+ : function () {
+ return "[object " + r(this) + "]";
+ };
+ },
+ function (t, e, n) {
+ var i = n(0),
+ r = n(44),
+ o = n(88),
+ s = n(34),
+ a = i("".charAt),
+ l = i("".charCodeAt),
+ u = i("".slice),
+ c = function (t) {
+ return function (e, n) {
+ var i,
+ c,
+ h = o(s(e)),
+ d = r(n),
+ f = h.length;
+ return d < 0 || d >= f
+ ? t
+ ? ""
+ : void 0
+ : (i = l(h, d)) < 55296 ||
+ i > 56319 ||
+ d + 1 === f ||
+ (c = l(h, d + 1)) < 56320 ||
+ c > 57343
+ ? t
+ ? a(h, d)
+ : i
+ : t
+ ? u(h, d, d + 2)
+ : c - 56320 + ((i - 55296) << 10) + 65536;
+ };
+ };
+ t.exports = { codeAt: c(!1), charAt: c(!0) };
+ },
+ function (t, e, n) {
+ n(31), n(58), n(120), n(59);
+ var i = n(22);
+ t.exports = i.Set;
+ },
+ function (t, e, n) {
+ n(121);
+ },
+ function (t, e, n) {
+ "use strict";
+ n(52)(
+ "Set",
+ function (t) {
+ return function () {
+ return t(this, arguments.length ? arguments[0] : void 0);
+ };
+ },
+ n(87)
+ );
+ },
+ function (t, e, n) {
+ n(31), n(58), n(123);
+ var i = n(22);
+ t.exports = i.WeakMap;
+ },
+ function (t, e, n) {
+ n(124);
+ },
+ function (t, e, n) {
+ "use strict";
+ var i,
+ r = n(82),
+ o = n(6),
+ s = n(0),
+ a = n(57),
+ l = n(27),
+ u = n(52),
+ c = n(125),
+ h = n(4),
+ d = n(15).enforce,
+ f = n(3),
+ p = n(71),
+ m = Object,
+ g = Array.isArray,
+ v = m.isExtensible,
+ _ = m.isFrozen,
+ x = m.isSealed,
+ y = m.freeze,
+ b = m.seal,
+ w = {},
+ S = {},
+ M = !o.ActiveXObject && "ActiveXObject" in o,
+ D = function (t) {
+ return function () {
+ return t(this, arguments.length ? arguments[0] : void 0);
+ };
+ },
+ T = u("WeakMap", D, c),
+ E = T.prototype,
+ C = s(E.set);
+ if (p)
+ if (M) {
+ (i = c.getConstructor(D, "WeakMap", !0)), l.enable();
+ var A = s(E.delete),
+ P = s(E.has),
+ L = s(E.get);
+ a(E, {
+ delete: function (t) {
+ if (h(t) && !v(t)) {
+ var e = d(this);
+ return (
+ e.frozen || (e.frozen = new i()),
+ A(this, t) || e.frozen.delete(t)
+ );
+ }
+ return A(this, t);
+ },
+ has: function (t) {
+ if (h(t) && !v(t)) {
+ var e = d(this);
+ return (
+ e.frozen || (e.frozen = new i()), P(this, t) || e.frozen.has(t)
+ );
+ }
+ return P(this, t);
+ },
+ get: function (t) {
+ if (h(t) && !v(t)) {
+ var e = d(this);
+ return (
+ e.frozen || (e.frozen = new i()),
+ P(this, t) ? L(this, t) : e.frozen.get(t)
+ );
+ }
+ return L(this, t);
+ },
+ set: function (t, e) {
+ if (h(t) && !v(t)) {
+ var n = d(this);
+ n.frozen || (n.frozen = new i()),
+ P(this, t) ? C(this, t, e) : n.frozen.set(t, e);
+ } else C(this, t, e);
+ return this;
+ },
+ });
+ } else
+ r &&
+ f(function () {
+ var t = y([]);
+ return C(new T(), t, 1), !_(t);
+ }) &&
+ a(E, {
+ set: function (t, e) {
+ var n;
+ return (
+ g(t) && (_(t) ? (n = w) : x(t) && (n = S)),
+ C(this, t, e),
+ n == w && y(t),
+ n == S && b(t),
+ this
+ );
+ },
+ });
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(0),
+ r = n(57),
+ o = n(27).getWeakData,
+ s = n(56),
+ a = n(10),
+ l = n(14),
+ u = n(4),
+ c = n(53),
+ h = n(126),
+ d = n(8),
+ f = n(15),
+ p = f.set,
+ m = f.getterFor,
+ g = h.find,
+ v = h.findIndex,
+ _ = i([].splice),
+ x = 0,
+ y = function (t) {
+ return t.frozen || (t.frozen = new b());
+ },
+ b = function () {
+ this.entries = [];
+ },
+ w = function (t, e) {
+ return g(t.entries, function (t) {
+ return t[0] === e;
+ });
+ };
+ (b.prototype = {
+ get: function (t) {
+ var e = w(this, t);
+ if (e) return e[1];
+ },
+ has: function (t) {
+ return !!w(this, t);
+ },
+ set: function (t, e) {
+ var n = w(this, t);
+ n ? (n[1] = e) : this.entries.push([t, e]);
+ },
+ delete: function (t) {
+ var e = v(this.entries, function (e) {
+ return e[0] === t;
+ });
+ return ~e && _(this.entries, e, 1), !!~e;
+ },
+ }),
+ (t.exports = {
+ getConstructor: function (t, e, n, i) {
+ var h = t(function (t, r) {
+ s(t, f),
+ p(t, { type: e, id: x++, frozen: void 0 }),
+ l(r) || c(r, t[i], { that: t, AS_ENTRIES: n });
+ }),
+ f = h.prototype,
+ g = m(e),
+ v = function (t, e, n) {
+ var i = g(t),
+ r = o(a(e), !0);
+ return !0 === r ? y(i).set(e, n) : (r[i.id] = n), t;
+ };
+ return (
+ r(f, {
+ delete: function (t) {
+ var e = g(this);
+ if (!u(t)) return !1;
+ var n = o(t);
+ return !0 === n
+ ? y(e).delete(t)
+ : n && d(n, e.id) && delete n[e.id];
+ },
+ has: function (t) {
+ var e = g(this);
+ if (!u(t)) return !1;
+ var n = o(t);
+ return !0 === n ? y(e).has(t) : n && d(n, e.id);
+ },
+ }),
+ r(
+ f,
+ n
+ ? {
+ get: function (t) {
+ var e = g(this);
+ if (u(t)) {
+ var n = o(t);
+ return !0 === n ? y(e).get(t) : n ? n[e.id] : void 0;
+ }
+ },
+ set: function (t, e) {
+ return v(this, t, e);
+ },
+ }
+ : {
+ add: function (t) {
+ return v(this, t, !0);
+ },
+ }
+ ),
+ h
+ );
+ },
+ });
+ },
+ function (t, e, n) {
+ var i = n(28),
+ r = n(0),
+ o = n(32),
+ s = n(17),
+ a = n(19),
+ l = n(127),
+ u = r([].push),
+ c = function (t) {
+ var e = 1 == t,
+ n = 2 == t,
+ r = 3 == t,
+ c = 4 == t,
+ h = 6 == t,
+ d = 7 == t,
+ f = 5 == t || h;
+ return function (p, m, g, v) {
+ for (
+ var _,
+ x,
+ y = s(p),
+ b = o(y),
+ w = i(m, g),
+ S = a(b),
+ M = 0,
+ D = v || l,
+ T = e ? D(p, S) : n || d ? D(p, 0) : void 0;
+ S > M;
+ M++
+ )
+ if ((f || M in b) && ((x = w((_ = b[M]), M, y)), t))
+ if (e) T[M] = x;
+ else if (x)
+ switch (t) {
+ case 3:
+ return !0;
+ case 5:
+ return _;
+ case 6:
+ return M;
+ case 2:
+ u(T, _);
+ }
+ else
+ switch (t) {
+ case 4:
+ return !1;
+ case 7:
+ u(T, _);
+ }
+ return h ? -1 : r || c ? c : T;
+ };
+ };
+ t.exports = {
+ forEach: c(0),
+ map: c(1),
+ filter: c(2),
+ some: c(3),
+ every: c(4),
+ find: c(5),
+ findIndex: c(6),
+ filterReject: c(7),
+ };
+ },
+ function (t, e, n) {
+ var i = n(128);
+ t.exports = function (t, e) {
+ return new (i(t))(0 === e ? 0 : e);
+ };
+ },
+ function (t, e, n) {
+ var i = n(129),
+ r = n(89),
+ o = n(4),
+ s = n(5)("species"),
+ a = Array;
+ t.exports = function (t) {
+ var e;
+ return (
+ i(t) &&
+ ((e = t.constructor),
+ ((r(e) && (e === a || i(e.prototype))) ||
+ (o(e) && null === (e = e[s]))) &&
+ (e = void 0)),
+ void 0 === e ? a : e
+ );
+ };
+ },
+ function (t, e, n) {
+ var i = n(13);
+ t.exports =
+ Array.isArray ||
+ function (t) {
+ return "Array" == i(t);
+ };
+ },
+ function (t, e, n) {
+ n(59), n(131);
+ var i = n(22);
+ t.exports = i.Array.from;
+ },
+ function (t, e, n) {
+ var i = n(21),
+ r = n(132);
+ i(
+ {
+ target: "Array",
+ stat: !0,
+ forced: !n(86)(function (t) {
+ Array.from(t);
+ }),
+ },
+ { from: r }
+ );
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(28),
+ r = n(11),
+ o = n(17),
+ s = n(133),
+ a = n(83),
+ l = n(89),
+ u = n(19),
+ c = n(81),
+ h = n(84),
+ d = n(54),
+ f = Array;
+ t.exports = function (t) {
+ var e = o(t),
+ n = l(this),
+ p = arguments.length,
+ m = p > 1 ? arguments[1] : void 0,
+ g = void 0 !== m;
+ g && (m = i(m, p > 2 ? arguments[2] : void 0));
+ var v,
+ _,
+ x,
+ y,
+ b,
+ w,
+ S = d(e),
+ M = 0;
+ if (!S || (this === f && a(S)))
+ for (v = u(e), _ = n ? new this(v) : f(v); v > M; M++)
+ (w = g ? m(e[M], M) : e[M]), c(_, M, w);
+ else
+ for (
+ b = (y = h(e, S)).next, _ = n ? new this() : [];
+ !(x = r(b, y)).done;
+ M++
+ )
+ (w = g ? s(y, m, [x.value, M], !0) : x.value), c(_, M, w);
+ return (_.length = M), _;
+ };
+ },
+ function (t, e, n) {
+ var i = n(10),
+ r = n(85);
+ t.exports = function (t, e, n, o) {
+ try {
+ return o ? e(i(n)[0], n[1]) : e(n);
+ } catch (e) {
+ r(t, "throw", e);
+ }
+ };
+ },
+ function (t, e, n) {
+ n(135);
+ var i = n(22);
+ t.exports = i.Object.assign;
+ },
+ function (t, e, n) {
+ var i = n(21),
+ r = n(136);
+ i(
+ { target: "Object", stat: !0, arity: 2, forced: Object.assign !== r },
+ { assign: r }
+ );
+ },
+ function (t, e, n) {
+ "use strict";
+ var i = n(7),
+ r = n(0),
+ o = n(11),
+ s = n(3),
+ a = n(68),
+ l = n(76),
+ u = n(73),
+ c = n(17),
+ h = n(32),
+ d = Object.assign,
+ f = Object.defineProperty,
+ p = r([].concat);
+ t.exports =
+ !d ||
+ s(function () {
+ if (
+ i &&
+ 1 !==
+ d(
+ { b: 1 },
+ d(
+ f({}, "a", {
+ enumerable: !0,
+ get: function () {
+ f(this, "b", { value: 3, enumerable: !1 });
+ },
+ }),
+ { b: 2 }
+ )
+ ).b
+ )
+ return !0;
+ var t = {},
+ e = {},
+ n = Symbol();
+ return (
+ (t[n] = 7),
+ "abcdefghijklmnopqrst".split("").forEach(function (t) {
+ e[t] = t;
+ }),
+ 7 != d({}, t)[n] || "abcdefghijklmnopqrst" != a(d({}, e)).join("")
+ );
+ })
+ ? function (t, e) {
+ for (
+ var n = c(t), r = arguments.length, s = 1, d = l.f, f = u.f;
+ r > s;
+
+ )
+ for (
+ var m,
+ g = h(arguments[s++]),
+ v = d ? p(a(g), d(g)) : a(g),
+ _ = v.length,
+ x = 0;
+ _ > x;
+
+ )
+ (m = v[x++]), (i && !o(f, g, m)) || (n[m] = g[m]);
+ return n;
+ }
+ : d;
+ },
+ function (t, e, n) {
+ "use strict";
+ n.r(e);
+ var i = {};
+ n.r(i),
+ n.d(i, "keyboardHandler", function () {
+ return Ra;
+ }),
+ n.d(i, "mouseHandler", function () {
+ return Oa;
+ }),
+ n.d(i, "resizeHandler", function () {
+ return Fa;
+ }),
+ n.d(i, "selectHandler", function () {
+ return Ia;
+ }),
+ n.d(i, "touchHandler", function () {
+ return Na;
+ }),
+ n.d(i, "wheelHandler", function () {
+ return za;
+ });
+ /*!
+ * Bona Framework
+ * https://cuberto.com/
+ *
+ * @version 0.0.3
+ * @author Cuberto, Artem Dordzhiev (Draft)
+ */
+ var r = (function () {
+ function t(t) {
+ (this.options = Object.assign(
+ {},
+ { init: !0, define: null, waitFullLoad: !0 },
+ t
+ )),
+ (this.store = new Map()),
+ (this.registry = new Map()),
+ (this.events = []),
+ this.options.define &&
+ (this.defineAll(this.options.define),
+ this.options.init && this.init());
+ }
+ var e = t.prototype;
+ return (
+ (e.init = function () {
+ try {
+ var t = this,
+ e = (function () {
+ if (
+ "interactive" === document.readyState ||
+ "complete" === document.readyState
+ )
+ return Promise.resolve(t.start()).then(function () {});
+ document.addEventListener(
+ "DOMContentLoaded",
+ function () {
+ return t.start();
+ },
+ { once: !0 }
+ );
+ })();
+ return Promise.resolve(
+ e && e.then ? e.then(function () {}) : void 0
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.start = function () {
+ try {
+ var t = function () {
+ return Promise.resolve(e.executeAll("init")).then(
+ function () {
+ return Promise.resolve(e.executeAll("enter")).then(
+ function () {
+ return Promise.resolve(e.executeAll("complete")).then(
+ function () {}
+ );
+ }
+ );
+ }
+ );
+ },
+ e = this;
+ e.registry.forEach(function (t, n) {
+ t.assign
+ ? e.queryAll(t.assign).forEach(function (t) {
+ e.attach(n, t, null, !1);
+ })
+ : e.attach(n, null, null, !1);
+ });
+ var n = (function () {
+ if (e.options.waitFullLoad)
+ return Promise.resolve(e.waitFullLoad()).then(function () {});
+ })();
+ return Promise.resolve(n && n.then ? n.then(t) : t());
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.refresh = function (t, e, n) {
+ void 0 === t && (t = !0),
+ void 0 === e && (e = !0),
+ void 0 === n && (n = !0);
+ try {
+ var i = this,
+ r = [];
+ return (
+ i.registry.forEach(function (o, s) {
+ var a = i.store.get(s);
+ (a &&
+ a.forEach(function (a, l) {
+ o.assign
+ ? n &&
+ a.el &&
+ !a.el.isConnected &&
+ r.push(i.detach(s, l, e))
+ : t && r.push(i.executeInstance(a, "refresh"));
+ }),
+ o.assign) &&
+ i.queryAll(o.assign).forEach(function (e) {
+ var n =
+ a &&
+ a.filter(function (t) {
+ return t.el && e.isSameNode(t.el);
+ })[0];
+ n
+ ? t && r.push(i.executeInstance(n, "refresh"))
+ : r.push(i.attach(s, e));
+ });
+ }),
+ t && i.trigger("refresh"),
+ Promise.all(r)
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.executeAll = function (t) {
+ try {
+ var e = this,
+ n = [];
+ return (
+ e.trigger(t),
+ e.store.forEach(function (i) {
+ i.forEach(function (i) {
+ return n.push(e.executeInstance(i, t));
+ });
+ }),
+ Promise.all(n)
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.executeInstance = function (t, e) {
+ void 0 === e && (e = "init");
+ try {
+ var n = "on" + e.charAt(0).toUpperCase() + e.slice(1);
+ return t[n]
+ ? Promise.resolve((t._executors[e] = t[n]()))
+ : Promise.resolve();
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.wait = function (t, e, n) {
+ void 0 === e && (e = "init"), void 0 === n && (n = 0);
+ try {
+ return Promise.resolve(this.waitInstance(this.get(t, n), e));
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.waitAll = function (t, e) {
+ void 0 === e && (e = "init");
+ try {
+ var n = this,
+ i = [];
+ return (
+ n.store.forEach(function (t) {
+ t.forEach(function (t) {
+ return i.push(n.waitInstance(t, e));
+ });
+ }),
+ Promise.all(i)
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.waitInstance = function (t, e) {
+ void 0 === e && (e = "init");
+ try {
+ return Promise.resolve(t._executors[e]);
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.waitFullLoad = function () {
+ try {
+ return Promise.resolve(
+ new Promise(function (t) {
+ "complete" === document.readyState
+ ? t()
+ : window.addEventListener("load", function () {
+ return t();
+ });
+ })
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.attach = function (t, e, n, i) {
+ void 0 === i && (i = !0);
+ try {
+ var r = this,
+ o = n || r.registry.get(t).options,
+ s = new (0, r.registry.get(t).component)(r, e, o);
+ r.store.has(t) || r.store.set(t, []),
+ r.store.get(t).push(s),
+ (s._namespace = t);
+ var a = (function () {
+ if (i)
+ return Promise.resolve(r.executeInstance(s, "init")).then(
+ function () {}
+ );
+ })();
+ return Promise.resolve(
+ a && a.then
+ ? a.then(function () {
+ return s;
+ })
+ : s
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.detach = function (t, e, n) {
+ void 0 === e && (e = 0), void 0 === n && (n = !0);
+ try {
+ var i = this,
+ r = i.store.get(t).splice(e, 1)[0],
+ o = (function () {
+ if (n)
+ return Promise.resolve(
+ i.executeInstance(r, "destroy")
+ ).then(function () {});
+ })();
+ return Promise.resolve(
+ o && o.then
+ ? o.then(function () {
+ return r;
+ })
+ : r
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (e.define = function (t, e, n, i) {
+ this.registry.set(t, { assign: n, component: e, options: i });
+ }),
+ (e.defineAll = function (t) {
+ var e = this;
+ t.forEach(function (t) {
+ e.define(t.namespace, t.component, t.assign, t.options);
+ });
+ }),
+ (e.get = function (t, e) {
+ void 0 === e && (e = 0);
+ var n = this.store.get(t);
+ return n ? n[e] : null;
+ }),
+ (e.getAll = function (t) {
+ return this.store.get(t);
+ }),
+ (e.find = function (t, e, n) {
+ void 0 === n && (n = 0);
+ var i = this.findAll(t, e);
+ return i ? i[n] : null;
+ }),
+ (e.findAll = function (t, e) {
+ var n = e ? [this.store.get(e) || []] : this.store,
+ i = [];
+ return (
+ n.forEach(function (e) {
+ i.push.apply(
+ i,
+ e.filter(function (e) {
+ return (
+ e.el &&
+ ("string" == typeof t ? e.el.matches(t) : e.el === t)
+ );
+ })
+ );
+ }),
+ i
+ );
+ }),
+ (e.query = function (t) {
+ return "string" == typeof t
+ ? document.querySelector(t)
+ : "object" == typeof t
+ ? t
+ : null;
+ }),
+ (e.queryAll = function (t) {
+ return "string" == typeof t
+ ? Array.from(document.querySelectorAll(t))
+ : "object" == typeof t
+ ? t
+ : [];
+ }),
+ (e.on = function (t, e) {
+ this.events[t] instanceof Array || this.off(t),
+ this.events[t].push(e);
+ }),
+ (e.off = function (t, e) {
+ this.events[t] = e
+ ? this.events[t].filter(function (t) {
+ return t !== e;
+ })
+ : [];
+ }),
+ (e.trigger = function (t) {
+ var e = arguments,
+ n = this;
+ this.events[t] &&
+ this.events[t].forEach(function (t) {
+ return t.call.apply(t, [n].concat([].slice.call(e, 1)));
+ });
+ }),
+ t
+ );
+ })(),
+ o = (function () {
+ function t(t, e, n) {
+ (this.app = t),
+ e && (this.el = e),
+ n && (this.options = n),
+ (this._namespace = null),
+ (this._executors = {});
+ }
+ var e = t.prototype;
+ return (
+ (e.onInit = function () {
+ return Promise.resolve();
+ }),
+ (e.onRefresh = function () {
+ return Promise.resolve();
+ }),
+ (e.onEnter = function () {
+ return Promise.resolve();
+ }),
+ (e.onComplete = function () {
+ return Promise.resolve();
+ }),
+ (e.onLeave = function () {
+ return Promise.resolve();
+ }),
+ (e.onDestroy = function () {
+ return Promise.resolve();
+ }),
+ (e.onLoading = function () {
+ return Promise.resolve();
+ }),
+ (e.onLoaded = function () {
+ return Promise.resolve();
+ }),
+ t
+ );
+ })();
+ function s(t) {
+ if (void 0 === t)
+ throw new ReferenceError(
+ "this hasn't been initialised - super() hasn't been called"
+ );
+ return t;
+ }
+ function a(t, e) {
+ (t.prototype = Object.create(e.prototype)),
+ (t.prototype.constructor = t),
+ (t.__proto__ = e);
+ }
+ /*!
+ * GSAP 3.11.4
+ * https://greensock.com
+ *
+ * @license Copyright 2008-2022, GreenSock. All rights reserved.
+ * Subject to the terms at https://greensock.com/standard-license or for
+ * Club GreenSock members, the agreement issued with that membership.
+ * @author: Jack Doyle, jack@greensock.com
+ */ var l,
+ u,
+ c,
+ h,
+ d,
+ f,
+ p,
+ m,
+ g,
+ v,
+ _,
+ x,
+ y,
+ b,
+ w,
+ S = {
+ autoSleep: 120,
+ force3D: "auto",
+ nullTargetWarn: 1,
+ units: { lineHeight: "" },
+ },
+ M = { duration: 0.5, overwrite: !1, delay: 0 },
+ D = 1e8,
+ T = 2 * Math.PI,
+ E = T / 4,
+ C = 0,
+ A = Math.sqrt,
+ P = Math.cos,
+ L = Math.sin,
+ R = function (t) {
+ return "string" == typeof t;
+ },
+ O = function (t) {
+ return "function" == typeof t;
+ },
+ F = function (t) {
+ return "number" == typeof t;
+ },
+ I = function (t) {
+ return void 0 === t;
+ },
+ N = function (t) {
+ return "object" == typeof t;
+ },
+ z = function (t) {
+ return !1 !== t;
+ },
+ k = function () {
+ return "undefined" != typeof window;
+ },
+ U = function (t) {
+ return O(t) || R(t);
+ },
+ B =
+ ("function" == typeof ArrayBuffer && ArrayBuffer.isView) ||
+ function () {},
+ V = Array.isArray,
+ H = /(?:-?\.?\d|\.)+/gi,
+ W = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,
+ G = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g,
+ j = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,
+ q = /[+-]=-?[.\d]+/,
+ X = /[^,'"\[\]\s]+/gi,
+ Y = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,
+ Z = {},
+ K = {},
+ J = function (t) {
+ return (K = Tt(t, Z)) && Mn;
+ },
+ Q = function (t, e) {
+ return console.warn(
+ "Invalid property",
+ t,
+ "set to",
+ e,
+ "Missing plugin? gsap.registerPlugin()"
+ );
+ },
+ $ = function (t, e) {
+ return !e && console.warn(t);
+ },
+ tt = function (t, e) {
+ return (t && (Z[t] = e) && K && (K[t] = e)) || Z;
+ },
+ et = function () {
+ return 0;
+ },
+ nt = { suppressEvents: !0, isStart: !0, kill: !1 },
+ it = { suppressEvents: !0, kill: !1 },
+ rt = { suppressEvents: !0 },
+ ot = {},
+ st = [],
+ at = {},
+ lt = {},
+ ut = {},
+ ct = 30,
+ ht = [],
+ dt = "",
+ ft = function (t) {
+ var e,
+ n,
+ i = t[0];
+ if ((N(i) || O(i) || (t = [t]), !(e = (i._gsap || {}).harness))) {
+ for (n = ht.length; n-- && !ht[n].targetTest(i); );
+ e = ht[n];
+ }
+ for (n = t.length; n--; )
+ (t[n] && (t[n]._gsap || (t[n]._gsap = new ke(t[n], e)))) ||
+ t.splice(n, 1);
+ return t;
+ },
+ pt = function (t) {
+ return t._gsap || ft(ie(t))[0]._gsap;
+ },
+ mt = function (t, e, n) {
+ return (n = t[e]) && O(n)
+ ? t[e]()
+ : (I(n) && t.getAttribute && t.getAttribute(e)) || n;
+ },
+ gt = function (t, e) {
+ return (t = t.split(",")).forEach(e) || t;
+ },
+ vt = function (t) {
+ return Math.round(1e5 * t) / 1e5 || 0;
+ },
+ _t = function (t) {
+ return Math.round(1e7 * t) / 1e7 || 0;
+ },
+ xt = function (t, e) {
+ var n = e.charAt(0),
+ i = parseFloat(e.substr(2));
+ return (
+ (t = parseFloat(t)),
+ "+" === n ? t + i : "-" === n ? t - i : "*" === n ? t * i : t / i
+ );
+ },
+ yt = function (t, e) {
+ for (var n = e.length, i = 0; t.indexOf(e[i]) < 0 && ++i < n; );
+ return i < n;
+ },
+ bt = function () {
+ var t,
+ e,
+ n = st.length,
+ i = st.slice(0);
+ for (at = {}, st.length = 0, t = 0; t < n; t++)
+ (e = i[t]) &&
+ e._lazy &&
+ (e.render(e._lazy[0], e._lazy[1], !0)._lazy = 0);
+ },
+ wt = function (t, e, n, i) {
+ st.length && !u && bt(),
+ t.render(e, n, i || (u && e < 0 && (t._initted || t._startAt))),
+ st.length && !u && bt();
+ },
+ St = function (t) {
+ var e = parseFloat(t);
+ return (e || 0 === e) && (t + "").match(X).length < 2
+ ? e
+ : R(t)
+ ? t.trim()
+ : t;
+ },
+ Mt = function (t) {
+ return t;
+ },
+ Dt = function (t, e) {
+ for (var n in e) n in t || (t[n] = e[n]);
+ return t;
+ },
+ Tt = function (t, e) {
+ for (var n in e) t[n] = e[n];
+ return t;
+ },
+ Et = function t(e, n) {
+ for (var i in n)
+ "__proto__" !== i &&
+ "constructor" !== i &&
+ "prototype" !== i &&
+ (e[i] = N(n[i]) ? t(e[i] || (e[i] = {}), n[i]) : n[i]);
+ return e;
+ },
+ Ct = function (t, e) {
+ var n,
+ i = {};
+ for (n in t) n in e || (i[n] = t[n]);
+ return i;
+ },
+ At = function (t) {
+ var e,
+ n = t.parent || h,
+ i = t.keyframes
+ ? ((e = V(t.keyframes)),
+ function (t, n) {
+ for (var i in n)
+ i in t ||
+ ("duration" === i && e) ||
+ "ease" === i ||
+ (t[i] = n[i]);
+ })
+ : Dt;
+ if (z(t.inherit))
+ for (; n; ) i(t, n.vars.defaults), (n = n.parent || n._dp);
+ return t;
+ },
+ Pt = function (t, e, n, i, r) {
+ void 0 === n && (n = "_first"), void 0 === i && (i = "_last");
+ var o,
+ s = t[i];
+ if (r) for (o = e[r]; s && s[r] > o; ) s = s._prev;
+ return (
+ s
+ ? ((e._next = s._next), (s._next = e))
+ : ((e._next = t[n]), (t[n] = e)),
+ e._next ? (e._next._prev = e) : (t[i] = e),
+ (e._prev = s),
+ (e.parent = e._dp = t),
+ e
+ );
+ },
+ Lt = function (t, e, n, i) {
+ void 0 === n && (n = "_first"), void 0 === i && (i = "_last");
+ var r = e._prev,
+ o = e._next;
+ r ? (r._next = o) : t[n] === e && (t[n] = o),
+ o ? (o._prev = r) : t[i] === e && (t[i] = r),
+ (e._next = e._prev = e.parent = null);
+ },
+ Rt = function (t, e) {
+ t.parent && (!e || t.parent.autoRemoveChildren) && t.parent.remove(t),
+ (t._act = 0);
+ },
+ Ot = function (t, e) {
+ if (t && (!e || e._end > t._dur || e._start < 0))
+ for (var n = t; n; ) (n._dirty = 1), (n = n.parent);
+ return t;
+ },
+ Ft = function (t) {
+ for (var e = t.parent; e && e.parent; )
+ (e._dirty = 1), e.totalDuration(), (e = e.parent);
+ return t;
+ },
+ It = function (t, e, n, i) {
+ return (
+ t._startAt &&
+ (u
+ ? t._startAt.revert(it)
+ : (t.vars.immediateRender && !t.vars.autoRevert) ||
+ t._startAt.render(e, !0, i))
+ );
+ },
+ Nt = function (t) {
+ return t._repeat ? zt(t._tTime, (t = t.duration() + t._rDelay)) * t : 0;
+ },
+ zt = function (t, e) {
+ var n = Math.floor((t /= e));
+ return t && n === t ? n - 1 : n;
+ },
+ kt = function (t, e) {
+ return (
+ (t - e._start) * e._ts +
+ (e._ts >= 0 ? 0 : e._dirty ? e.totalDuration() : e._tDur)
+ );
+ },
+ Ut = function (t) {
+ return (t._end = _t(
+ t._start + (t._tDur / Math.abs(t._ts || t._rts || 1e-8) || 0)
+ ));
+ },
+ Bt = function (t, e) {
+ var n = t._dp;
+ return (
+ n &&
+ n.smoothChildTiming &&
+ t._ts &&
+ ((t._start = _t(
+ n._time -
+ (t._ts > 0
+ ? e / t._ts
+ : ((t._dirty ? t.totalDuration() : t._tDur) - e) / -t._ts)
+ )),
+ Ut(t),
+ n._dirty || Ot(n, t)),
+ t
+ );
+ },
+ Vt = function (t, e) {
+ var n;
+ if (
+ ((e._time || (e._initted && !e._dur)) &&
+ ((n = kt(t.rawTime(), e)),
+ (!e._dur || Qt(0, e.totalDuration(), n) - e._tTime > 1e-8) &&
+ e.render(n, !0)),
+ Ot(t, e)._dp && t._initted && t._time >= t._dur && t._ts)
+ ) {
+ if (t._dur < t.duration())
+ for (n = t; n._dp; )
+ n.rawTime() >= 0 && n.totalTime(n._tTime), (n = n._dp);
+ t._zTime = -1e-8;
+ }
+ },
+ Ht = function (t, e, n, i) {
+ return (
+ e.parent && Rt(e),
+ (e._start = _t(
+ (F(n) ? n : n || t !== h ? Zt(t, n, e) : t._time) + e._delay
+ )),
+ (e._end = _t(
+ e._start + (e.totalDuration() / Math.abs(e.timeScale()) || 0)
+ )),
+ Pt(t, e, "_first", "_last", t._sort ? "_start" : 0),
+ jt(e) || (t._recent = e),
+ i || Vt(t, e),
+ t._ts < 0 && Bt(t, t._tTime),
+ t
+ );
+ },
+ Wt = function (t, e) {
+ return (
+ (Z.ScrollTrigger || Q("scrollTrigger", e)) &&
+ Z.ScrollTrigger.create(e, t)
+ );
+ },
+ Gt = function (t, e, n, i, r) {
+ return (
+ qe(t, e, r),
+ t._initted
+ ? !n &&
+ t._pt &&
+ !u &&
+ ((t._dur && !1 !== t.vars.lazy) || (!t._dur && t.vars.lazy)) &&
+ g !== De.frame
+ ? (st.push(t), (t._lazy = [r, i]), 1)
+ : void 0
+ : 1
+ );
+ },
+ jt = function (t) {
+ var e = t.data;
+ return "isFromStart" === e || "isStart" === e;
+ },
+ qt = function (t, e, n, i) {
+ var r = t._repeat,
+ o = _t(e) || 0,
+ s = t._tTime / t._tDur;
+ return (
+ s && !i && (t._time *= o / t._dur),
+ (t._dur = o),
+ (t._tDur = r ? (r < 0 ? 1e10 : _t(o * (r + 1) + t._rDelay * r)) : o),
+ s > 0 && !i && Bt(t, (t._tTime = t._tDur * s)),
+ t.parent && Ut(t),
+ n || Ot(t.parent, t),
+ t
+ );
+ },
+ Xt = function (t) {
+ return t instanceof Be ? Ot(t) : qt(t, t._dur);
+ },
+ Yt = { _start: 0, endTime: et, totalDuration: et },
+ Zt = function t(e, n, i) {
+ var r,
+ o,
+ s,
+ a = e.labels,
+ l = e._recent || Yt,
+ u = e.duration() >= D ? l.endTime(!1) : e._dur;
+ return R(n) && (isNaN(n) || n in a)
+ ? ((o = n.charAt(0)),
+ (s = "%" === n.substr(-1)),
+ (r = n.indexOf("=")),
+ "<" === o || ">" === o
+ ? (r >= 0 && (n = n.replace(/=/, "")),
+ ("<" === o ? l._start : l.endTime(l._repeat >= 0)) +
+ (parseFloat(n.substr(1)) || 0) *
+ (s ? (r < 0 ? l : i).totalDuration() / 100 : 1))
+ : r < 0
+ ? (n in a || (a[n] = u), a[n])
+ : ((o = parseFloat(n.charAt(r - 1) + n.substr(r + 1))),
+ s && i && (o = (o / 100) * (V(i) ? i[0] : i).totalDuration()),
+ r > 1 ? t(e, n.substr(0, r - 1), i) + o : u + o))
+ : null == n
+ ? u
+ : +n;
+ },
+ Kt = function (t, e, n) {
+ var i,
+ r,
+ o = F(e[1]),
+ s = (o ? 2 : 1) + (t < 2 ? 0 : 1),
+ a = e[s];
+ if ((o && (a.duration = e[1]), (a.parent = n), t)) {
+ for (i = a, r = n; r && !("immediateRender" in i); )
+ (i = r.vars.defaults || {}), (r = z(r.vars.inherit) && r.parent);
+ (a.immediateRender = z(i.immediateRender)),
+ t < 2 ? (a.runBackwards = 1) : (a.startAt = e[s - 1]);
+ }
+ return new Je(e[0], a, e[s + 1]);
+ },
+ Jt = function (t, e) {
+ return t || 0 === t ? e(t) : e;
+ },
+ Qt = function (t, e, n) {
+ return n < t ? t : n > e ? e : n;
+ },
+ $t = function (t, e) {
+ return R(t) && (e = Y.exec(t)) ? e[1] : "";
+ },
+ te = [].slice,
+ ee = function (t, e) {
+ return (
+ t &&
+ N(t) &&
+ "length" in t &&
+ ((!e && !t.length) || (t.length - 1 in t && N(t[0]))) &&
+ !t.nodeType &&
+ t !== d
+ );
+ },
+ ne = function (t, e, n) {
+ return (
+ void 0 === n && (n = []),
+ t.forEach(function (t) {
+ var i;
+ return (R(t) && !e) || ee(t, 1)
+ ? (i = n).push.apply(i, ie(t))
+ : n.push(t);
+ }) || n
+ );
+ },
+ ie = function (t, e, n) {
+ return c && !e && c.selector
+ ? c.selector(t)
+ : !R(t) || n || (!f && Te())
+ ? V(t)
+ ? ne(t, n)
+ : ee(t)
+ ? te.call(t, 0)
+ : t
+ ? [t]
+ : []
+ : te.call((e || p).querySelectorAll(t), 0);
+ },
+ re = function (t) {
+ return (
+ (t = ie(t)[0] || $("Invalid scope") || {}),
+ function (e) {
+ var n = t.current || t.nativeElement || t;
+ return ie(
+ e,
+ n.querySelectorAll
+ ? n
+ : n === t
+ ? $("Invalid scope") || p.createElement("div")
+ : t
+ );
+ }
+ );
+ },
+ oe = function (t) {
+ return t.sort(function () {
+ return 0.5 - Math.random();
+ });
+ },
+ se = function (t) {
+ if (O(t)) return t;
+ var e = N(t) ? t : { each: t },
+ n = Oe(e.ease),
+ i = e.from || 0,
+ r = parseFloat(e.base) || 0,
+ o = {},
+ s = i > 0 && i < 1,
+ a = isNaN(i) || s,
+ l = e.axis,
+ u = i,
+ c = i;
+ return (
+ R(i)
+ ? (u = c = { center: 0.5, edges: 0.5, end: 1 }[i] || 0)
+ : !s && a && ((u = i[0]), (c = i[1])),
+ function (t, s, h) {
+ var d,
+ f,
+ p,
+ m,
+ g,
+ v,
+ _,
+ x,
+ y,
+ b = (h || e).length,
+ w = o[b];
+ if (!w) {
+ if (!(y = "auto" === e.grid ? 0 : (e.grid || [1, D])[1])) {
+ for (
+ _ = -D;
+ _ < (_ = h[y++].getBoundingClientRect().left) && y < b;
+
+ );
+ y--;
+ }
+ for (
+ w = o[b] = [],
+ d = a ? Math.min(y, b) * u - 0.5 : i % y,
+ f = y === D ? 0 : a ? (b * c) / y - 0.5 : (i / y) | 0,
+ _ = 0,
+ x = D,
+ v = 0;
+ v < b;
+ v++
+ )
+ (p = (v % y) - d),
+ (m = f - ((v / y) | 0)),
+ (w[v] = g =
+ l ? Math.abs("y" === l ? m : p) : A(p * p + m * m)),
+ g > _ && (_ = g),
+ g < x && (x = g);
+ "random" === i && oe(w),
+ (w.max = _ - x),
+ (w.min = x),
+ (w.v = b =
+ (parseFloat(e.amount) ||
+ parseFloat(e.each) *
+ (y > b
+ ? b - 1
+ : l
+ ? "y" === l
+ ? b / y
+ : y
+ : Math.max(y, b / y)) ||
+ 0) * ("edges" === i ? -1 : 1)),
+ (w.b = b < 0 ? r - b : r),
+ (w.u = $t(e.amount || e.each) || 0),
+ (n = n && b < 0 ? Le(n) : n);
+ }
+ return (
+ (b = (w[t] - w.min) / w.max || 0),
+ _t(w.b + (n ? n(b) : b) * w.v) + w.u
+ );
+ }
+ );
+ },
+ ae = function (t) {
+ var e = Math.pow(10, ((t + "").split(".")[1] || "").length);
+ return function (n) {
+ var i = _t(Math.round(parseFloat(n) / t) * t * e);
+ return (i - (i % 1)) / e + (F(n) ? 0 : $t(n));
+ };
+ },
+ le = function (t, e) {
+ var n,
+ i,
+ r = V(t);
+ return (
+ !r &&
+ N(t) &&
+ ((n = r = t.radius || D),
+ t.values
+ ? ((t = ie(t.values)), (i = !F(t[0])) && (n *= n))
+ : (t = ae(t.increment))),
+ Jt(
+ e,
+ r
+ ? O(t)
+ ? function (e) {
+ return (i = t(e)), Math.abs(i - e) <= n ? i : e;
+ }
+ : function (e) {
+ for (
+ var r,
+ o,
+ s = parseFloat(i ? e.x : e),
+ a = parseFloat(i ? e.y : 0),
+ l = D,
+ u = 0,
+ c = t.length;
+ c--;
+
+ )
+ (r = i
+ ? (r = t[c].x - s) * r + (o = t[c].y - a) * o
+ : Math.abs(t[c] - s)) < l && ((l = r), (u = c));
+ return (
+ (u = !n || l <= n ? t[u] : e),
+ i || u === e || F(e) ? u : u + $t(e)
+ );
+ }
+ : ae(t)
+ )
+ );
+ },
+ ue = function (t, e, n, i) {
+ return Jt(V(t) ? !e : !0 === n ? !!(n = 0) : !i, function () {
+ return V(t)
+ ? t[~~(Math.random() * t.length)]
+ : (n = n || 1e-5) &&
+ (i = n < 1 ? Math.pow(10, (n + "").length - 2) : 1) &&
+ Math.floor(
+ Math.round(
+ (t - n / 2 + Math.random() * (e - t + 0.99 * n)) / n
+ ) *
+ n *
+ i
+ ) / i;
+ });
+ },
+ ce = function (t, e, n) {
+ return Jt(n, function (n) {
+ return t[~~e(n)];
+ });
+ },
+ he = function (t) {
+ for (var e, n, i, r, o = 0, s = ""; ~(e = t.indexOf("random(", o)); )
+ (i = t.indexOf(")", e)),
+ (r = "[" === t.charAt(e + 7)),
+ (n = t.substr(e + 7, i - e - 7).match(r ? X : H)),
+ (s +=
+ t.substr(o, e - o) +
+ ue(r ? n : +n[0], r ? 0 : +n[1], +n[2] || 1e-5)),
+ (o = i + 1);
+ return s + t.substr(o, t.length - o);
+ },
+ de = function (t, e, n, i, r) {
+ var o = e - t,
+ s = i - n;
+ return Jt(r, function (e) {
+ return n + (((e - t) / o) * s || 0);
+ });
+ },
+ fe = function (t, e, n) {
+ var i,
+ r,
+ o,
+ s = t.labels,
+ a = D;
+ for (i in s)
+ (r = s[i] - e) < 0 == !!n &&
+ r &&
+ a > (r = Math.abs(r)) &&
+ ((o = i), (a = r));
+ return o;
+ },
+ pe = function (t, e, n) {
+ var i,
+ r,
+ o,
+ s = t.vars,
+ a = s[e],
+ l = c,
+ u = t._ctx;
+ if (a)
+ return (
+ (i = s[e + "Params"]),
+ (r = s.callbackScope || t),
+ n && st.length && bt(),
+ u && (c = u),
+ (o = i ? a.apply(r, i) : a.call(r)),
+ (c = l),
+ o
+ );
+ },
+ me = function (t) {
+ return (
+ Rt(t),
+ t.scrollTrigger && t.scrollTrigger.kill(!!u),
+ t.progress() < 1 && pe(t, "onInterrupt"),
+ t
+ );
+ },
+ ge = function (t) {
+ var e = (t = (!t.name && t.default) || t).name,
+ n = O(t),
+ i =
+ e && !n && t.init
+ ? function () {
+ this._props = [];
+ }
+ : t,
+ r = {
+ init: et,
+ render: an,
+ add: Ge,
+ kill: un,
+ modifier: ln,
+ rawVars: 0,
+ },
+ o = {
+ targetTest: 0,
+ get: 0,
+ getSetter: nn,
+ aliases: {},
+ register: 0,
+ };
+ if ((Te(), t !== i)) {
+ if (lt[e]) return;
+ Dt(i, Dt(Ct(t, r), o)),
+ Tt(i.prototype, Tt(r, Ct(t, o))),
+ (lt[(i.prop = e)] = i),
+ t.targetTest && (ht.push(i), (ot[e] = 1)),
+ (e =
+ ("css" === e ? "CSS" : e.charAt(0).toUpperCase() + e.substr(1)) +
+ "Plugin");
+ }
+ tt(e, i), t.register && t.register(Mn, i, dn);
+ },
+ ve = {
+ 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],
+ 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],
+ },
+ _e = function (t, e, n) {
+ return (
+ (255 *
+ (6 * (t += t < 0 ? 1 : t > 1 ? -1 : 0) < 1
+ ? e + (n - e) * t * 6
+ : t < 0.5
+ ? n
+ : 3 * t < 2
+ ? e + (n - e) * (2 / 3 - t) * 6
+ : e) +
+ 0.5) |
+ 0
+ );
+ },
+ xe = function (t, e, n) {
+ var i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ u,
+ c,
+ h,
+ d,
+ f = t ? (F(t) ? [t >> 16, (t >> 8) & 255, 255 & t] : 0) : ve.black;
+ if (!f) {
+ if (("," === t.substr(-1) && (t = t.substr(0, t.length - 1)), ve[t]))
+ f = ve[t];
+ else if ("#" === t.charAt(0)) {
+ if (
+ (t.length < 6 &&
+ ((i = t.charAt(1)),
+ (r = t.charAt(2)),
+ (o = t.charAt(3)),
+ (t =
+ "#" +
+ i +
+ i +
+ r +
+ r +
+ o +
+ o +
+ (5 === t.length ? t.charAt(4) + t.charAt(4) : ""))),
+ 9 === t.length)
+ )
+ return [
+ (f = parseInt(t.substr(1, 6), 16)) >> 16,
+ (f >> 8) & 255,
+ 255 & f,
+ parseInt(t.substr(7), 16) / 255,
+ ];
+ f = [
+ (t = parseInt(t.substr(1), 16)) >> 16,
+ (t >> 8) & 255,
+ 255 & t,
+ ];
+ } else if ("hsl" === t.substr(0, 3))
+ if (((f = d = t.match(H)), e)) {
+ if (~t.indexOf("="))
+ return (f = t.match(W)), n && f.length < 4 && (f[3] = 1), f;
+ } else
+ (s = (+f[0] % 360) / 360),
+ (a = +f[1] / 100),
+ (i =
+ 2 * (l = +f[2] / 100) -
+ (r = l <= 0.5 ? l * (a + 1) : l + a - l * a)),
+ f.length > 3 && (f[3] *= 1),
+ (f[0] = _e(s + 1 / 3, i, r)),
+ (f[1] = _e(s, i, r)),
+ (f[2] = _e(s - 1 / 3, i, r));
+ else f = t.match(H) || ve.transparent;
+ f = f.map(Number);
+ }
+ return (
+ e &&
+ !d &&
+ ((i = f[0] / 255),
+ (r = f[1] / 255),
+ (o = f[2] / 255),
+ (l = ((u = Math.max(i, r, o)) + (c = Math.min(i, r, o))) / 2),
+ u === c
+ ? (s = a = 0)
+ : ((h = u - c),
+ (a = l > 0.5 ? h / (2 - u - c) : h / (u + c)),
+ (s =
+ u === i
+ ? (r - o) / h + (r < o ? 6 : 0)
+ : u === r
+ ? (o - i) / h + 2
+ : (i - r) / h + 4),
+ (s *= 60)),
+ (f[0] = ~~(s + 0.5)),
+ (f[1] = ~~(100 * a + 0.5)),
+ (f[2] = ~~(100 * l + 0.5))),
+ n && f.length < 4 && (f[3] = 1),
+ f
+ );
+ },
+ ye = function (t) {
+ var e = [],
+ n = [],
+ i = -1;
+ return (
+ t.split(we).forEach(function (t) {
+ var r = t.match(G) || [];
+ e.push.apply(e, r), n.push((i += r.length + 1));
+ }),
+ (e.c = n),
+ e
+ );
+ },
+ be = function (t, e, n) {
+ var i,
+ r,
+ o,
+ s,
+ a = "",
+ l = (t + a).match(we),
+ u = e ? "hsla(" : "rgba(",
+ c = 0;
+ if (!l) return t;
+ if (
+ ((l = l.map(function (t) {
+ return (
+ (t = xe(t, e, 1)) &&
+ u +
+ (e
+ ? t[0] + "," + t[1] + "%," + t[2] + "%," + t[3]
+ : t.join(",")) +
+ ")"
+ );
+ })),
+ n && ((o = ye(t)), (i = n.c).join(a) !== o.c.join(a)))
+ )
+ for (s = (r = t.replace(we, "1").split(G)).length - 1; c < s; c++)
+ a +=
+ r[c] +
+ (~i.indexOf(c)
+ ? l.shift() || u + "0,0,0,0)"
+ : (o.length ? o : l.length ? l : n).shift());
+ if (!r)
+ for (s = (r = t.split(we)).length - 1; c < s; c++) a += r[c] + l[c];
+ return a + r[s];
+ },
+ we = (function () {
+ var t,
+ e =
+ "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";
+ for (t in ve) e += "|" + t + "\\b";
+ return new RegExp(e + ")", "gi");
+ })(),
+ Se = /hsl[a]?\(/,
+ Me = function (t) {
+ var e,
+ n = t.join(" ");
+ if (((we.lastIndex = 0), we.test(n)))
+ return (
+ (e = Se.test(n)),
+ (t[1] = be(t[1], e)),
+ (t[0] = be(t[0], e, ye(t[1]))),
+ !0
+ );
+ },
+ De = (function () {
+ var t,
+ e,
+ n,
+ i,
+ r,
+ o,
+ s = Date.now,
+ a = 500,
+ l = 33,
+ u = s(),
+ c = u,
+ h = 1e3 / 240,
+ g = h,
+ v = [],
+ x = function n(d) {
+ var f,
+ p,
+ m,
+ _,
+ x = s() - c,
+ y = !0 === d;
+ if (
+ (x > a && (u += x - l),
+ ((f = (m = (c += x) - u) - g) > 0 || y) &&
+ ((_ = ++i.frame),
+ (r = m - 1e3 * i.time),
+ (i.time = m /= 1e3),
+ (g += f + (f >= h ? 4 : h - f)),
+ (p = 1)),
+ y || (t = e(n)),
+ p)
+ )
+ for (o = 0; o < v.length; o++) v[o](m, r, _, d);
+ };
+ return (i = {
+ time: 0,
+ frame: 0,
+ tick: function () {
+ x(!0);
+ },
+ deltaRatio: function (t) {
+ return r / (1e3 / (t || 60));
+ },
+ wake: function () {
+ m &&
+ (!f &&
+ k() &&
+ ((d = f = window),
+ (p = d.document || {}),
+ (Z.gsap = Mn),
+ (d.gsapVersions || (d.gsapVersions = [])).push(Mn.version),
+ J(K || d.GreenSockGlobals || (!d.gsap && d) || {}),
+ (n = d.requestAnimationFrame)),
+ t && i.sleep(),
+ (e =
+ n ||
+ function (t) {
+ return setTimeout(t, (g - 1e3 * i.time + 1) | 0);
+ }),
+ (_ = 1),
+ x(2));
+ },
+ sleep: function () {
+ (n ? d.cancelAnimationFrame : clearTimeout)(t), (_ = 0), (e = et);
+ },
+ lagSmoothing: function (t, e) {
+ (a = t || 1 / 0), (l = Math.min(e || 33, a));
+ },
+ fps: function (t) {
+ (h = 1e3 / (t || 240)), (g = 1e3 * i.time + h);
+ },
+ add: function (t, e, n) {
+ var r = e
+ ? function (e, n, o, s) {
+ t(e, n, o, s), i.remove(r);
+ }
+ : t;
+ return i.remove(t), v[n ? "unshift" : "push"](r), Te(), r;
+ },
+ remove: function (t, e) {
+ ~(e = v.indexOf(t)) && v.splice(e, 1) && o >= e && o--;
+ },
+ _listeners: v,
+ });
+ })(),
+ Te = function () {
+ return !_ && De.wake();
+ },
+ Ee = {},
+ Ce = /^[\d.\-M][\d.\-,\s]/,
+ Ae = /["']/g,
+ Pe = function (t) {
+ for (
+ var e,
+ n,
+ i,
+ r = {},
+ o = t.substr(1, t.length - 3).split(":"),
+ s = o[0],
+ a = 1,
+ l = o.length;
+ a < l;
+ a++
+ )
+ (n = o[a]),
+ (e = a !== l - 1 ? n.lastIndexOf(",") : n.length),
+ (i = n.substr(0, e)),
+ (r[s] = isNaN(i) ? i.replace(Ae, "").trim() : +i),
+ (s = n.substr(e + 1).trim());
+ return r;
+ },
+ Le = function (t) {
+ return function (e) {
+ return 1 - t(1 - e);
+ };
+ },
+ Re = function t(e, n) {
+ for (var i, r = e._first; r; )
+ r instanceof Be
+ ? t(r, n)
+ : !r.vars.yoyoEase ||
+ (r._yoyo && r._repeat) ||
+ r._yoyo === n ||
+ (r.timeline
+ ? t(r.timeline, n)
+ : ((i = r._ease),
+ (r._ease = r._yEase),
+ (r._yEase = i),
+ (r._yoyo = n))),
+ (r = r._next);
+ },
+ Oe = function (t, e) {
+ return (
+ (t &&
+ (O(t)
+ ? t
+ : Ee[t] ||
+ (function (t) {
+ var e,
+ n,
+ i,
+ r,
+ o = (t + "").split("("),
+ s = Ee[o[0]];
+ return s && o.length > 1 && s.config
+ ? s.config.apply(
+ null,
+ ~t.indexOf("{")
+ ? [Pe(o[1])]
+ : ((e = t),
+ (n = e.indexOf("(") + 1),
+ (i = e.indexOf(")")),
+ (r = e.indexOf("(", n)),
+ e.substring(
+ n,
+ ~r && r < i ? e.indexOf(")", i + 1) : i
+ ))
+ .split(",")
+ .map(St)
+ )
+ : Ee._CE && Ce.test(t)
+ ? Ee._CE("", t)
+ : s;
+ })(t))) ||
+ e
+ );
+ },
+ Fe = function (t, e, n, i) {
+ void 0 === n &&
+ (n = function (t) {
+ return 1 - e(1 - t);
+ }),
+ void 0 === i &&
+ (i = function (t) {
+ return t < 0.5 ? e(2 * t) / 2 : 1 - e(2 * (1 - t)) / 2;
+ });
+ var r,
+ o = { easeIn: e, easeOut: n, easeInOut: i };
+ return (
+ gt(t, function (t) {
+ for (var e in ((Ee[t] = Z[t] = o),
+ (Ee[(r = t.toLowerCase())] = n),
+ o))
+ Ee[
+ r +
+ ("easeIn" === e ? ".in" : "easeOut" === e ? ".out" : ".inOut")
+ ] = Ee[t + "." + e] = o[e];
+ }),
+ o
+ );
+ },
+ Ie = function (t) {
+ return function (e) {
+ return e < 0.5 ? (1 - t(1 - 2 * e)) / 2 : 0.5 + t(2 * (e - 0.5)) / 2;
+ };
+ },
+ Ne = function t(e, n, i) {
+ var r = n >= 1 ? n : 1,
+ o = (i || (e ? 0.3 : 0.45)) / (n < 1 ? n : 1),
+ s = (o / T) * (Math.asin(1 / r) || 0),
+ a = function (t) {
+ return 1 === t ? 1 : r * Math.pow(2, -10 * t) * L((t - s) * o) + 1;
+ },
+ l =
+ "out" === e
+ ? a
+ : "in" === e
+ ? function (t) {
+ return 1 - a(1 - t);
+ }
+ : Ie(a);
+ return (
+ (o = T / o),
+ (l.config = function (n, i) {
+ return t(e, n, i);
+ }),
+ l
+ );
+ },
+ ze = function t(e, n) {
+ void 0 === n && (n = 1.70158);
+ var i = function (t) {
+ return t ? --t * t * ((n + 1) * t + n) + 1 : 0;
+ },
+ r =
+ "out" === e
+ ? i
+ : "in" === e
+ ? function (t) {
+ return 1 - i(1 - t);
+ }
+ : Ie(i);
+ return (
+ (r.config = function (n) {
+ return t(e, n);
+ }),
+ r
+ );
+ };
+ gt("Linear,Quad,Cubic,Quart,Quint,Strong", function (t, e) {
+ var n = e < 5 ? e + 1 : e;
+ Fe(
+ t + ",Power" + (n - 1),
+ e
+ ? function (t) {
+ return Math.pow(t, n);
+ }
+ : function (t) {
+ return t;
+ },
+ function (t) {
+ return 1 - Math.pow(1 - t, n);
+ },
+ function (t) {
+ return t < 0.5
+ ? Math.pow(2 * t, n) / 2
+ : 1 - Math.pow(2 * (1 - t), n) / 2;
+ }
+ );
+ }),
+ (Ee.Linear.easeNone = Ee.none = Ee.Linear.easeIn),
+ Fe("Elastic", Ne("in"), Ne("out"), Ne()),
+ (x = 7.5625),
+ (b = 1 / (y = 2.75)),
+ Fe(
+ "Bounce",
+ function (t) {
+ return 1 - w(1 - t);
+ },
+ (w = function (t) {
+ return t < b
+ ? x * t * t
+ : t < 0.7272727272727273
+ ? x * Math.pow(t - 1.5 / y, 2) + 0.75
+ : t < 0.9090909090909092
+ ? x * (t -= 2.25 / y) * t + 0.9375
+ : x * Math.pow(t - 2.625 / y, 2) + 0.984375;
+ })
+ ),
+ Fe("Expo", function (t) {
+ return t ? Math.pow(2, 10 * (t - 1)) : 0;
+ }),
+ Fe("Circ", function (t) {
+ return -(A(1 - t * t) - 1);
+ }),
+ Fe("Sine", function (t) {
+ return 1 === t ? 1 : 1 - P(t * E);
+ }),
+ Fe("Back", ze("in"), ze("out"), ze()),
+ (Ee.SteppedEase =
+ Ee.steps =
+ Z.SteppedEase =
+ {
+ config: function (t, e) {
+ void 0 === t && (t = 1);
+ var n = 1 / t,
+ i = t + (e ? 0 : 1),
+ r = e ? 1 : 0;
+ return function (t) {
+ return (((i * Qt(0, 1 - 1e-8, t)) | 0) + r) * n;
+ };
+ },
+ }),
+ (M.ease = Ee["quad.out"]),
+ gt(
+ "onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",
+ function (t) {
+ return (dt += t + "," + t + "Params,");
+ }
+ );
+ var ke = function (t, e) {
+ (this.id = C++),
+ (t._gsap = this),
+ (this.target = t),
+ (this.harness = e),
+ (this.get = e ? e.get : mt),
+ (this.set = e ? e.getSetter : nn);
+ },
+ Ue = (function () {
+ function t(t) {
+ (this.vars = t),
+ (this._delay = +t.delay || 0),
+ (this._repeat = t.repeat === 1 / 0 ? -2 : t.repeat || 0) &&
+ ((this._rDelay = t.repeatDelay || 0),
+ (this._yoyo = !!t.yoyo || !!t.yoyoEase)),
+ (this._ts = 1),
+ qt(this, +t.duration, 1, 1),
+ (this.data = t.data),
+ c && ((this._ctx = c), c.data.push(this)),
+ _ || De.wake();
+ }
+ var e = t.prototype;
+ return (
+ (e.delay = function (t) {
+ return t || 0 === t
+ ? (this.parent &&
+ this.parent.smoothChildTiming &&
+ this.startTime(this._start + t - this._delay),
+ (this._delay = t),
+ this)
+ : this._delay;
+ }),
+ (e.duration = function (t) {
+ return arguments.length
+ ? this.totalDuration(
+ this._repeat > 0 ? t + (t + this._rDelay) * this._repeat : t
+ )
+ : this.totalDuration() && this._dur;
+ }),
+ (e.totalDuration = function (t) {
+ return arguments.length
+ ? ((this._dirty = 0),
+ qt(
+ this,
+ this._repeat < 0
+ ? t
+ : (t - this._repeat * this._rDelay) / (this._repeat + 1)
+ ))
+ : this._tDur;
+ }),
+ (e.totalTime = function (t, e) {
+ if ((Te(), !arguments.length)) return this._tTime;
+ var n = this._dp;
+ if (n && n.smoothChildTiming && this._ts) {
+ for (
+ Bt(this, t), !n._dp || n.parent || Vt(n, this);
+ n && n.parent;
+
+ )
+ n.parent._time !==
+ n._start +
+ (n._ts >= 0
+ ? n._tTime / n._ts
+ : (n.totalDuration() - n._tTime) / -n._ts) &&
+ n.totalTime(n._tTime, !0),
+ (n = n.parent);
+ !this.parent &&
+ this._dp.autoRemoveChildren &&
+ ((this._ts > 0 && t < this._tDur) ||
+ (this._ts < 0 && t > 0) ||
+ (!this._tDur && !t)) &&
+ Ht(this._dp, this, this._start - this._delay);
+ }
+ return (
+ (this._tTime !== t ||
+ (!this._dur && !e) ||
+ (this._initted && 1e-8 === Math.abs(this._zTime)) ||
+ (!t && !this._initted && (this.add || this._ptLookup))) &&
+ (this._ts || (this._pTime = t), wt(this, t, e)),
+ this
+ );
+ }),
+ (e.time = function (t, e) {
+ return arguments.length
+ ? this.totalTime(
+ Math.min(this.totalDuration(), t + Nt(this)) %
+ (this._dur + this._rDelay) || (t ? this._dur : 0),
+ e
+ )
+ : this._time;
+ }),
+ (e.totalProgress = function (t, e) {
+ return arguments.length
+ ? this.totalTime(this.totalDuration() * t, e)
+ : this.totalDuration()
+ ? Math.min(1, this._tTime / this._tDur)
+ : this.ratio;
+ }),
+ (e.progress = function (t, e) {
+ return arguments.length
+ ? this.totalTime(
+ this.duration() *
+ (!this._yoyo || 1 & this.iteration() ? t : 1 - t) +
+ Nt(this),
+ e
+ )
+ : this.duration()
+ ? Math.min(1, this._time / this._dur)
+ : this.ratio;
+ }),
+ (e.iteration = function (t, e) {
+ var n = this.duration() + this._rDelay;
+ return arguments.length
+ ? this.totalTime(this._time + (t - 1) * n, e)
+ : this._repeat
+ ? zt(this._tTime, n) + 1
+ : 1;
+ }),
+ (e.timeScale = function (t) {
+ if (!arguments.length) return -1e-8 === this._rts ? 0 : this._rts;
+ if (this._rts === t) return this;
+ var e =
+ this.parent && this._ts
+ ? kt(this.parent._time, this)
+ : this._tTime;
+ return (
+ (this._rts = +t || 0),
+ (this._ts = this._ps || -1e-8 === t ? 0 : this._rts),
+ this.totalTime(Qt(-this._delay, this._tDur, e), !0),
+ Ut(this),
+ Ft(this)
+ );
+ }),
+ (e.paused = function (t) {
+ return arguments.length
+ ? (this._ps !== t &&
+ ((this._ps = t),
+ t
+ ? ((this._pTime =
+ this._tTime || Math.max(-this._delay, this.rawTime())),
+ (this._ts = this._act = 0))
+ : (Te(),
+ (this._ts = this._rts),
+ this.totalTime(
+ this.parent && !this.parent.smoothChildTiming
+ ? this.rawTime()
+ : this._tTime || this._pTime,
+ 1 === this.progress() &&
+ 1e-8 !== Math.abs(this._zTime) &&
+ (this._tTime -= 1e-8)
+ ))),
+ this)
+ : this._ps;
+ }),
+ (e.startTime = function (t) {
+ if (arguments.length) {
+ this._start = t;
+ var e = this.parent || this._dp;
+ return (
+ e && (e._sort || !this.parent) && Ht(e, this, t - this._delay),
+ this
+ );
+ }
+ return this._start;
+ }),
+ (e.endTime = function (t) {
+ return (
+ this._start +
+ (z(t) ? this.totalDuration() : this.duration()) /
+ Math.abs(this._ts || 1)
+ );
+ }),
+ (e.rawTime = function (t) {
+ var e = this.parent || this._dp;
+ return e
+ ? t &&
+ (!this._ts ||
+ (this._repeat && this._time && this.totalProgress() < 1))
+ ? this._tTime % (this._dur + this._rDelay)
+ : this._ts
+ ? kt(e.rawTime(t), this)
+ : this._tTime
+ : this._tTime;
+ }),
+ (e.revert = function (t) {
+ void 0 === t && (t = rt);
+ var e = u;
+ return (
+ (u = t),
+ (this._initted || this._startAt) &&
+ (this.timeline && this.timeline.revert(t),
+ this.totalTime(-0.01, t.suppressEvents)),
+ "nested" !== this.data && !1 !== t.kill && this.kill(),
+ (u = e),
+ this
+ );
+ }),
+ (e.globalTime = function (t) {
+ for (var e = this, n = arguments.length ? t : e.rawTime(); e; )
+ (n = e._start + n / (e._ts || 1)), (e = e._dp);
+ return !this.parent && this._sat
+ ? this._sat.vars.immediateRender
+ ? -1
+ : this._sat.globalTime(t)
+ : n;
+ }),
+ (e.repeat = function (t) {
+ return arguments.length
+ ? ((this._repeat = t === 1 / 0 ? -2 : t), Xt(this))
+ : -2 === this._repeat
+ ? 1 / 0
+ : this._repeat;
+ }),
+ (e.repeatDelay = function (t) {
+ if (arguments.length) {
+ var e = this._time;
+ return (this._rDelay = t), Xt(this), e ? this.time(e) : this;
+ }
+ return this._rDelay;
+ }),
+ (e.yoyo = function (t) {
+ return arguments.length ? ((this._yoyo = t), this) : this._yoyo;
+ }),
+ (e.seek = function (t, e) {
+ return this.totalTime(Zt(this, t), z(e));
+ }),
+ (e.restart = function (t, e) {
+ return this.play().totalTime(t ? -this._delay : 0, z(e));
+ }),
+ (e.play = function (t, e) {
+ return null != t && this.seek(t, e), this.reversed(!1).paused(!1);
+ }),
+ (e.reverse = function (t, e) {
+ return (
+ null != t && this.seek(t || this.totalDuration(), e),
+ this.reversed(!0).paused(!1)
+ );
+ }),
+ (e.pause = function (t, e) {
+ return null != t && this.seek(t, e), this.paused(!0);
+ }),
+ (e.resume = function () {
+ return this.paused(!1);
+ }),
+ (e.reversed = function (t) {
+ return arguments.length
+ ? (!!t !== this.reversed() &&
+ this.timeScale(-this._rts || (t ? -1e-8 : 0)),
+ this)
+ : this._rts < 0;
+ }),
+ (e.invalidate = function () {
+ return (this._initted = this._act = 0), (this._zTime = -1e-8), this;
+ }),
+ (e.isActive = function () {
+ var t,
+ e = this.parent || this._dp,
+ n = this._start;
+ return !(
+ e &&
+ !(
+ this._ts &&
+ this._initted &&
+ e.isActive() &&
+ (t = e.rawTime(!0)) >= n &&
+ t < this.endTime(!0) - 1e-8
+ )
+ );
+ }),
+ (e.eventCallback = function (t, e, n) {
+ var i = this.vars;
+ return arguments.length > 1
+ ? (e
+ ? ((i[t] = e),
+ n && (i[t + "Params"] = n),
+ "onUpdate" === t && (this._onUpdate = e))
+ : delete i[t],
+ this)
+ : i[t];
+ }),
+ (e.then = function (t) {
+ var e = this;
+ return new Promise(function (n) {
+ var i = O(t) ? t : Mt,
+ r = function () {
+ var t = e.then;
+ (e.then = null),
+ O(i) && (i = i(e)) && (i.then || i === e) && (e.then = t),
+ n(i),
+ (e.then = t);
+ };
+ (e._initted && 1 === e.totalProgress() && e._ts >= 0) ||
+ (!e._tTime && e._ts < 0)
+ ? r()
+ : (e._prom = r);
+ });
+ }),
+ (e.kill = function () {
+ me(this);
+ }),
+ t
+ );
+ })();
+ Dt(Ue.prototype, {
+ _time: 0,
+ _start: 0,
+ _end: 0,
+ _tTime: 0,
+ _tDur: 0,
+ _dirty: 0,
+ _repeat: 0,
+ _yoyo: !1,
+ parent: null,
+ _initted: !1,
+ _rDelay: 0,
+ _ts: 1,
+ _dp: 0,
+ ratio: 0,
+ _zTime: -1e-8,
+ _prom: 0,
+ _ps: !1,
+ _rts: 1,
+ });
+ var Be = (function (t) {
+ function e(e, n) {
+ var i;
+ return (
+ void 0 === e && (e = {}),
+ ((i = t.call(this, e) || this).labels = {}),
+ (i.smoothChildTiming = !!e.smoothChildTiming),
+ (i.autoRemoveChildren = !!e.autoRemoveChildren),
+ (i._sort = z(e.sortChildren)),
+ h && Ht(e.parent || h, s(i), n),
+ e.reversed && i.reverse(),
+ e.paused && i.paused(!0),
+ e.scrollTrigger && Wt(s(i), e.scrollTrigger),
+ i
+ );
+ }
+ a(e, t);
+ var n = e.prototype;
+ return (
+ (n.to = function (t, e, n) {
+ return Kt(0, arguments, this), this;
+ }),
+ (n.from = function (t, e, n) {
+ return Kt(1, arguments, this), this;
+ }),
+ (n.fromTo = function (t, e, n, i) {
+ return Kt(2, arguments, this), this;
+ }),
+ (n.set = function (t, e, n) {
+ return (
+ (e.duration = 0),
+ (e.parent = this),
+ At(e).repeatDelay || (e.repeat = 0),
+ (e.immediateRender = !!e.immediateRender),
+ new Je(t, e, Zt(this, n), 1),
+ this
+ );
+ }),
+ (n.call = function (t, e, n) {
+ return Ht(this, Je.delayedCall(0, t, e), n);
+ }),
+ (n.staggerTo = function (t, e, n, i, r, o, s) {
+ return (
+ (n.duration = e),
+ (n.stagger = n.stagger || i),
+ (n.onComplete = o),
+ (n.onCompleteParams = s),
+ (n.parent = this),
+ new Je(t, n, Zt(this, r)),
+ this
+ );
+ }),
+ (n.staggerFrom = function (t, e, n, i, r, o, s) {
+ return (
+ (n.runBackwards = 1),
+ (At(n).immediateRender = z(n.immediateRender)),
+ this.staggerTo(t, e, n, i, r, o, s)
+ );
+ }),
+ (n.staggerFromTo = function (t, e, n, i, r, o, s, a) {
+ return (
+ (i.startAt = n),
+ (At(i).immediateRender = z(i.immediateRender)),
+ this.staggerTo(t, e, i, r, o, s, a)
+ );
+ }),
+ (n.render = function (t, e, n) {
+ var i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ c,
+ d,
+ f,
+ p,
+ m,
+ g,
+ v = this._time,
+ _ = this._dirty ? this.totalDuration() : this._tDur,
+ x = this._dur,
+ y = t <= 0 ? 0 : _t(t),
+ b = this._zTime < 0 != t < 0 && (this._initted || !x);
+ if (
+ (this !== h && y > _ && t >= 0 && (y = _),
+ y !== this._tTime || n || b)
+ ) {
+ if (
+ (v !== this._time &&
+ x &&
+ ((y += this._time - v), (t += this._time - v)),
+ (i = y),
+ (f = this._start),
+ (l = !(d = this._ts)),
+ b && (x || (v = this._zTime), (t || !e) && (this._zTime = t)),
+ this._repeat)
+ ) {
+ if (
+ ((m = this._yoyo),
+ (a = x + this._rDelay),
+ this._repeat < -1 && t < 0)
+ )
+ return this.totalTime(100 * a + t, e, n);
+ if (
+ ((i = _t(y % a)),
+ y === _
+ ? ((s = this._repeat), (i = x))
+ : ((s = ~~(y / a)) && s === y / a && ((i = x), s--),
+ i > x && (i = x)),
+ (p = zt(this._tTime, a)),
+ !v && this._tTime && p !== s && (p = s),
+ m && 1 & s && ((i = x - i), (g = 1)),
+ s !== p && !this._lock)
+ ) {
+ var w = m && 1 & p,
+ S = w === (m && 1 & s);
+ if (
+ (s < p && (w = !w),
+ (v = w ? 0 : x),
+ (this._lock = 1),
+ (this.render(v || (g ? 0 : _t(s * a)), e, !x)._lock = 0),
+ (this._tTime = y),
+ !e && this.parent && pe(this, "onRepeat"),
+ this.vars.repeatRefresh &&
+ !g &&
+ (this.invalidate()._lock = 1),
+ (v && v !== this._time) ||
+ l !== !this._ts ||
+ (this.vars.onRepeat && !this.parent && !this._act))
+ )
+ return this;
+ if (
+ ((x = this._dur),
+ (_ = this._tDur),
+ S &&
+ ((this._lock = 2),
+ (v = w ? x : -1e-4),
+ this.render(v, !0),
+ this.vars.repeatRefresh && !g && this.invalidate()),
+ (this._lock = 0),
+ !this._ts && !l)
+ )
+ return this;
+ Re(this, g);
+ }
+ }
+ if (
+ (this._hasPause &&
+ !this._forcing &&
+ this._lock < 2 &&
+ (c = (function (t, e, n) {
+ var i;
+ if (n > e)
+ for (i = t._first; i && i._start <= n; ) {
+ if ("isPause" === i.data && i._start > e) return i;
+ i = i._next;
+ }
+ else
+ for (i = t._last; i && i._start >= n; ) {
+ if ("isPause" === i.data && i._start < e) return i;
+ i = i._prev;
+ }
+ })(this, _t(v), _t(i))) &&
+ (y -= i - (i = c._start)),
+ (this._tTime = y),
+ (this._time = i),
+ (this._act = !d),
+ this._initted ||
+ ((this._onUpdate = this.vars.onUpdate),
+ (this._initted = 1),
+ (this._zTime = t),
+ (v = 0)),
+ !v && i && !e && (pe(this, "onStart"), this._tTime !== y))
+ )
+ return this;
+ if (i >= v && t >= 0)
+ for (r = this._first; r; ) {
+ if (
+ ((o = r._next), (r._act || i >= r._start) && r._ts && c !== r)
+ ) {
+ if (r.parent !== this) return this.render(t, e, n);
+ if (
+ (r.render(
+ r._ts > 0
+ ? (i - r._start) * r._ts
+ : (r._dirty ? r.totalDuration() : r._tDur) +
+ (i - r._start) * r._ts,
+ e,
+ n
+ ),
+ i !== this._time || (!this._ts && !l))
+ ) {
+ (c = 0), o && (y += this._zTime = -1e-8);
+ break;
+ }
+ }
+ r = o;
+ }
+ else {
+ r = this._last;
+ for (var M = t < 0 ? t : i; r; ) {
+ if (
+ ((o = r._prev), (r._act || M <= r._end) && r._ts && c !== r)
+ ) {
+ if (r.parent !== this) return this.render(t, e, n);
+ if (
+ (r.render(
+ r._ts > 0
+ ? (M - r._start) * r._ts
+ : (r._dirty ? r.totalDuration() : r._tDur) +
+ (M - r._start) * r._ts,
+ e,
+ n || (u && (r._initted || r._startAt))
+ ),
+ i !== this._time || (!this._ts && !l))
+ ) {
+ (c = 0), o && (y += this._zTime = M ? -1e-8 : 1e-8);
+ break;
+ }
+ }
+ r = o;
+ }
+ }
+ if (
+ c &&
+ !e &&
+ (this.pause(),
+ (c.render(i >= v ? 0 : -1e-8)._zTime = i >= v ? 1 : -1),
+ this._ts)
+ )
+ return (this._start = f), Ut(this), this.render(t, e, n);
+ this._onUpdate && !e && pe(this, "onUpdate", !0),
+ ((y === _ && this._tTime >= this.totalDuration()) || (!y && v)) &&
+ ((f !== this._start && Math.abs(d) === Math.abs(this._ts)) ||
+ this._lock ||
+ ((t || !x) &&
+ ((y === _ && this._ts > 0) || (!y && this._ts < 0)) &&
+ Rt(this, 1),
+ e ||
+ (t < 0 && !v) ||
+ (!y && !v && _) ||
+ (pe(
+ this,
+ y === _ && t >= 0 ? "onComplete" : "onReverseComplete",
+ !0
+ ),
+ this._prom &&
+ !(y < _ && this.timeScale() > 0) &&
+ this._prom())));
+ }
+ return this;
+ }),
+ (n.add = function (t, e) {
+ var n = this;
+ if ((F(e) || (e = Zt(this, e, t)), !(t instanceof Ue))) {
+ if (V(t))
+ return (
+ t.forEach(function (t) {
+ return n.add(t, e);
+ }),
+ this
+ );
+ if (R(t)) return this.addLabel(t, e);
+ if (!O(t)) return this;
+ t = Je.delayedCall(0, t);
+ }
+ return this !== t ? Ht(this, t, e) : this;
+ }),
+ (n.getChildren = function (t, e, n, i) {
+ void 0 === t && (t = !0),
+ void 0 === e && (e = !0),
+ void 0 === n && (n = !0),
+ void 0 === i && (i = -D);
+ for (var r = [], o = this._first; o; )
+ o._start >= i &&
+ (o instanceof Je
+ ? e && r.push(o)
+ : (n && r.push(o),
+ t && r.push.apply(r, o.getChildren(!0, e, n)))),
+ (o = o._next);
+ return r;
+ }),
+ (n.getById = function (t) {
+ for (var e = this.getChildren(1, 1, 1), n = e.length; n--; )
+ if (e[n].vars.id === t) return e[n];
+ }),
+ (n.remove = function (t) {
+ return R(t)
+ ? this.removeLabel(t)
+ : O(t)
+ ? this.killTweensOf(t)
+ : (Lt(this, t),
+ t === this._recent && (this._recent = this._last),
+ Ot(this));
+ }),
+ (n.totalTime = function (e, n) {
+ return arguments.length
+ ? ((this._forcing = 1),
+ !this._dp &&
+ this._ts &&
+ (this._start = _t(
+ De.time -
+ (this._ts > 0
+ ? e / this._ts
+ : (this.totalDuration() - e) / -this._ts)
+ )),
+ t.prototype.totalTime.call(this, e, n),
+ (this._forcing = 0),
+ this)
+ : this._tTime;
+ }),
+ (n.addLabel = function (t, e) {
+ return (this.labels[t] = Zt(this, e)), this;
+ }),
+ (n.removeLabel = function (t) {
+ return delete this.labels[t], this;
+ }),
+ (n.addPause = function (t, e, n) {
+ var i = Je.delayedCall(0, e || et, n);
+ return (
+ (i.data = "isPause"), (this._hasPause = 1), Ht(this, i, Zt(this, t))
+ );
+ }),
+ (n.removePause = function (t) {
+ var e = this._first;
+ for (t = Zt(this, t); e; )
+ e._start === t && "isPause" === e.data && Rt(e), (e = e._next);
+ }),
+ (n.killTweensOf = function (t, e, n) {
+ for (var i = this.getTweensOf(t, n), r = i.length; r--; )
+ Ve !== i[r] && i[r].kill(t, e);
+ return this;
+ }),
+ (n.getTweensOf = function (t, e) {
+ for (var n, i = [], r = ie(t), o = this._first, s = F(e); o; )
+ o instanceof Je
+ ? yt(o._targets, r) &&
+ (s
+ ? (!Ve || (o._initted && o._ts)) &&
+ o.globalTime(0) <= e &&
+ o.globalTime(o.totalDuration()) > e
+ : !e || o.isActive()) &&
+ i.push(o)
+ : (n = o.getTweensOf(r, e)).length && i.push.apply(i, n),
+ (o = o._next);
+ return i;
+ }),
+ (n.tweenTo = function (t, e) {
+ e = e || {};
+ var n,
+ i = this,
+ r = Zt(i, t),
+ o = e,
+ s = o.startAt,
+ a = o.onStart,
+ l = o.onStartParams,
+ u = o.immediateRender,
+ c = Je.to(
+ i,
+ Dt(
+ {
+ ease: e.ease || "none",
+ lazy: !1,
+ immediateRender: !1,
+ time: r,
+ overwrite: "auto",
+ duration:
+ e.duration ||
+ Math.abs(
+ (r - (s && "time" in s ? s.time : i._time)) /
+ i.timeScale()
+ ) ||
+ 1e-8,
+ onStart: function () {
+ if ((i.pause(), !n)) {
+ var t =
+ e.duration ||
+ Math.abs(
+ (r - (s && "time" in s ? s.time : i._time)) /
+ i.timeScale()
+ );
+ c._dur !== t && qt(c, t, 0, 1).render(c._time, !0, !0),
+ (n = 1);
+ }
+ a && a.apply(c, l || []);
+ },
+ },
+ e
+ )
+ );
+ return u ? c.render(0) : c;
+ }),
+ (n.tweenFromTo = function (t, e, n) {
+ return this.tweenTo(e, Dt({ startAt: { time: Zt(this, t) } }, n));
+ }),
+ (n.recent = function () {
+ return this._recent;
+ }),
+ (n.nextLabel = function (t) {
+ return void 0 === t && (t = this._time), fe(this, Zt(this, t));
+ }),
+ (n.previousLabel = function (t) {
+ return void 0 === t && (t = this._time), fe(this, Zt(this, t), 1);
+ }),
+ (n.currentLabel = function (t) {
+ return arguments.length
+ ? this.seek(t, !0)
+ : this.previousLabel(this._time + 1e-8);
+ }),
+ (n.shiftChildren = function (t, e, n) {
+ void 0 === n && (n = 0);
+ for (var i, r = this._first, o = this.labels; r; )
+ r._start >= n && ((r._start += t), (r._end += t)), (r = r._next);
+ if (e) for (i in o) o[i] >= n && (o[i] += t);
+ return Ot(this);
+ }),
+ (n.invalidate = function (e) {
+ var n = this._first;
+ for (this._lock = 0; n; ) n.invalidate(e), (n = n._next);
+ return t.prototype.invalidate.call(this, e);
+ }),
+ (n.clear = function (t) {
+ void 0 === t && (t = !0);
+ for (var e, n = this._first; n; )
+ (e = n._next), this.remove(n), (n = e);
+ return (
+ this._dp && (this._time = this._tTime = this._pTime = 0),
+ t && (this.labels = {}),
+ Ot(this)
+ );
+ }),
+ (n.totalDuration = function (t) {
+ var e,
+ n,
+ i,
+ r = 0,
+ o = this,
+ s = o._last,
+ a = D;
+ if (arguments.length)
+ return o.timeScale(
+ (o._repeat < 0 ? o.duration() : o.totalDuration()) /
+ (o.reversed() ? -t : t)
+ );
+ if (o._dirty) {
+ for (i = o.parent; s; )
+ (e = s._prev),
+ s._dirty && s.totalDuration(),
+ (n = s._start) > a && o._sort && s._ts && !o._lock
+ ? ((o._lock = 1), (Ht(o, s, n - s._delay, 1)._lock = 0))
+ : (a = n),
+ n < 0 &&
+ s._ts &&
+ ((r -= n),
+ ((!i && !o._dp) || (i && i.smoothChildTiming)) &&
+ ((o._start += n / o._ts), (o._time -= n), (o._tTime -= n)),
+ o.shiftChildren(-n, !1, -Infinity),
+ (a = 0)),
+ s._end > r && s._ts && (r = s._end),
+ (s = e);
+ qt(o, o === h && o._time > r ? o._time : r, 1, 1), (o._dirty = 0);
+ }
+ return o._tDur;
+ }),
+ (e.updateRoot = function (t) {
+ if ((h._ts && (wt(h, kt(t, h)), (g = De.frame)), De.frame >= ct)) {
+ ct += S.autoSleep || 120;
+ var e = h._first;
+ if ((!e || !e._ts) && S.autoSleep && De._listeners.length < 2) {
+ for (; e && !e._ts; ) e = e._next;
+ e || De.sleep();
+ }
+ }
+ }),
+ e
+ );
+ })(Ue);
+ Dt(Be.prototype, { _lock: 0, _hasPause: 0, _forcing: 0 });
+ var Ve,
+ He,
+ We = function (t, e, n, i, r, o, s) {
+ var a,
+ l,
+ u,
+ c,
+ h,
+ d,
+ f,
+ p,
+ m = new dn(this._pt, t, e, 0, 1, sn, null, r),
+ g = 0,
+ v = 0;
+ for (
+ m.b = n,
+ m.e = i,
+ n += "",
+ (f = ~(i += "").indexOf("random(")) && (i = he(i)),
+ o && (o((p = [n, i]), t, e), (n = p[0]), (i = p[1])),
+ l = n.match(j) || [];
+ (a = j.exec(i));
+
+ )
+ (c = a[0]),
+ (h = i.substring(g, a.index)),
+ u ? (u = (u + 1) % 5) : "rgba(" === h.substr(-5) && (u = 1),
+ c !== l[v++] &&
+ ((d = parseFloat(l[v - 1]) || 0),
+ (m._pt = {
+ _next: m._pt,
+ p: h || 1 === v ? h : ",",
+ s: d,
+ c: "=" === c.charAt(1) ? xt(d, c) - d : parseFloat(c) - d,
+ m: u && u < 4 ? Math.round : 0,
+ }),
+ (g = j.lastIndex));
+ return (
+ (m.c = g < i.length ? i.substring(g, i.length) : ""),
+ (m.fp = s),
+ (q.test(i) || f) && (m.e = 0),
+ (this._pt = m),
+ m
+ );
+ },
+ Ge = function (t, e, n, i, r, o, s, a, l, u) {
+ O(i) && (i = i(r || 0, t, o));
+ var c,
+ h = t[e],
+ d =
+ "get" !== n
+ ? n
+ : O(h)
+ ? l
+ ? t[
+ e.indexOf("set") || !O(t["get" + e.substr(3)])
+ ? e
+ : "get" + e.substr(3)
+ ](l)
+ : t[e]()
+ : h,
+ f = O(h) ? (l ? tn : $e) : Qe;
+ if (
+ (R(i) &&
+ (~i.indexOf("random(") && (i = he(i)),
+ "=" === i.charAt(1) &&
+ ((c = xt(d, i) + ($t(d) || 0)) || 0 === c) &&
+ (i = c)),
+ !u || d !== i || He)
+ )
+ return isNaN(d * i) || "" === i
+ ? (!h && !(e in t) && Q(e, i),
+ We.call(this, t, e, d, i, f, a || S.stringFilter, l))
+ : ((c = new dn(
+ this._pt,
+ t,
+ e,
+ +d || 0,
+ i - (d || 0),
+ "boolean" == typeof h ? on : rn,
+ 0,
+ f
+ )),
+ l && (c.fp = l),
+ s && c.modifier(s, this, t),
+ (this._pt = c));
+ },
+ je = function (t, e, n, i, r, o) {
+ var s, a, l, u;
+ if (
+ lt[t] &&
+ !1 !==
+ (s = new lt[t]()).init(
+ r,
+ s.rawVars
+ ? e[t]
+ : (function (t, e, n, i, r) {
+ if (
+ (O(t) && (t = Ye(t, r, e, n, i)),
+ !N(t) || (t.style && t.nodeType) || V(t) || B(t))
+ )
+ return R(t) ? Ye(t, r, e, n, i) : t;
+ var o,
+ s = {};
+ for (o in t) s[o] = Ye(t[o], r, e, n, i);
+ return s;
+ })(e[t], i, r, o, n),
+ n,
+ i,
+ o
+ ) &&
+ ((n._pt = a = new dn(n._pt, r, t, 0, 1, s.render, s, 0, s.priority)),
+ n !== v)
+ )
+ for (
+ l = n._ptLookup[n._targets.indexOf(r)], u = s._props.length;
+ u--;
+
+ )
+ l[s._props[u]] = a;
+ return s;
+ },
+ qe = function t(e, n, i) {
+ var r,
+ o,
+ s,
+ a,
+ c,
+ d,
+ f,
+ p,
+ m,
+ g,
+ v,
+ _,
+ x,
+ y = e.vars,
+ b = y.ease,
+ w = y.startAt,
+ S = y.immediateRender,
+ T = y.lazy,
+ E = y.onUpdate,
+ C = y.onUpdateParams,
+ A = y.callbackScope,
+ P = y.runBackwards,
+ L = y.yoyoEase,
+ R = y.keyframes,
+ O = y.autoRevert,
+ F = e._dur,
+ I = e._startAt,
+ N = e._targets,
+ k = e.parent,
+ U = k && "nested" === k.data ? k.vars.targets : N,
+ B = "auto" === e._overwrite && !l,
+ V = e.timeline;
+ if (
+ (V && (!R || !b) && (b = "none"),
+ (e._ease = Oe(b, M.ease)),
+ (e._yEase = L ? Le(Oe(!0 === L ? b : L, M.ease)) : 0),
+ L &&
+ e._yoyo &&
+ !e._repeat &&
+ ((L = e._yEase), (e._yEase = e._ease), (e._ease = L)),
+ (e._from = !V && !!y.runBackwards),
+ !V || (R && !y.stagger))
+ ) {
+ if (
+ ((_ = (p = N[0] ? pt(N[0]).harness : 0) && y[p.prop]),
+ (r = Ct(y, ot)),
+ I &&
+ (I._zTime < 0 && I.progress(1),
+ n < 0 && P && S && !O
+ ? I.render(-1, !0)
+ : I.revert(P && F ? it : nt),
+ (I._lazy = 0)),
+ w)
+ ) {
+ if (
+ (Rt(
+ (e._startAt = Je.set(
+ N,
+ Dt(
+ {
+ data: "isStart",
+ overwrite: !1,
+ parent: k,
+ immediateRender: !0,
+ lazy: !I && z(T),
+ startAt: null,
+ delay: 0,
+ onUpdate: E,
+ onUpdateParams: C,
+ callbackScope: A,
+ stagger: 0,
+ },
+ w
+ )
+ ))
+ ),
+ (e._startAt._dp = 0),
+ (e._startAt._sat = e),
+ n < 0 && (u || (!S && !O)) && e._startAt.revert(it),
+ S && F && n <= 0 && i <= 0)
+ )
+ return void (n && (e._zTime = n));
+ } else if (P && F && !I)
+ if (
+ (n && (S = !1),
+ (s = Dt(
+ {
+ overwrite: !1,
+ data: "isFromStart",
+ lazy: S && !I && z(T),
+ immediateRender: S,
+ stagger: 0,
+ parent: k,
+ },
+ r
+ )),
+ _ && (s[p.prop] = _),
+ Rt((e._startAt = Je.set(N, s))),
+ (e._startAt._dp = 0),
+ (e._startAt._sat = e),
+ n < 0 && (u ? e._startAt.revert(it) : e._startAt.render(-1, !0)),
+ (e._zTime = n),
+ S)
+ ) {
+ if (!n) return;
+ } else t(e._startAt, 1e-8, 1e-8);
+ for (
+ e._pt = e._ptCache = 0, T = (F && z(T)) || (T && !F), o = 0;
+ o < N.length;
+ o++
+ ) {
+ if (
+ ((f = (c = N[o])._gsap || ft(N)[o]._gsap),
+ (e._ptLookup[o] = g = {}),
+ at[f.id] && st.length && bt(),
+ (v = U === N ? o : U.indexOf(c)),
+ p &&
+ !1 !== (m = new p()).init(c, _ || r, e, v, U) &&
+ ((e._pt = a =
+ new dn(e._pt, c, m.name, 0, 1, m.render, m, 0, m.priority)),
+ m._props.forEach(function (t) {
+ g[t] = a;
+ }),
+ m.priority && (d = 1)),
+ !p || _)
+ )
+ for (s in r)
+ lt[s] && (m = je(s, r, e, v, c, U))
+ ? m.priority && (d = 1)
+ : (g[s] = a =
+ Ge.call(e, c, s, "get", r[s], v, U, 0, y.stringFilter));
+ e._op && e._op[o] && e.kill(c, e._op[o]),
+ B &&
+ e._pt &&
+ ((Ve = e),
+ h.killTweensOf(c, g, e.globalTime(n)),
+ (x = !e.parent),
+ (Ve = 0)),
+ e._pt && T && (at[f.id] = 1);
+ }
+ d && hn(e), e._onInit && e._onInit(e);
+ }
+ (e._onUpdate = E),
+ (e._initted = (!e._op || e._pt) && !x),
+ R && n <= 0 && V.render(D, !0, !0);
+ },
+ Xe = function (t, e, n, i) {
+ var r,
+ o,
+ s = e.ease || i || "power1.inOut";
+ if (V(e))
+ (o = n[t] || (n[t] = [])),
+ e.forEach(function (t, n) {
+ return o.push({ t: (n / (e.length - 1)) * 100, v: t, e: s });
+ });
+ else
+ for (r in e)
+ (o = n[r] || (n[r] = [])),
+ "ease" === r || o.push({ t: parseFloat(t), v: e[r], e: s });
+ },
+ Ye = function (t, e, n, i, r) {
+ return O(t)
+ ? t.call(e, n, i, r)
+ : R(t) && ~t.indexOf("random(")
+ ? he(t)
+ : t;
+ },
+ Ze = dt + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",
+ Ke = {};
+ gt(Ze + ",id,stagger,delay,duration,paused,scrollTrigger", function (t) {
+ return (Ke[t] = 1);
+ });
+ var Je = (function (t) {
+ function e(e, n, i, r) {
+ var o;
+ "number" == typeof n && ((i.duration = n), (n = i), (i = null));
+ var a,
+ u,
+ c,
+ d,
+ f,
+ p,
+ m,
+ g,
+ v = (o = t.call(this, r ? n : At(n)) || this).vars,
+ _ = v.duration,
+ x = v.delay,
+ y = v.immediateRender,
+ b = v.stagger,
+ w = v.overwrite,
+ M = v.keyframes,
+ D = v.defaults,
+ T = v.scrollTrigger,
+ E = v.yoyoEase,
+ C = n.parent || h,
+ A = (V(e) || B(e) ? F(e[0]) : "length" in n) ? [e] : ie(e);
+ if (
+ ((o._targets = A.length
+ ? ft(A)
+ : $(
+ "GSAP target " + e + " not found. https://greensock.com",
+ !S.nullTargetWarn
+ ) || []),
+ (o._ptLookup = []),
+ (o._overwrite = w),
+ M || b || U(_) || U(x))
+ ) {
+ if (
+ ((n = o.vars),
+ (a = o.timeline =
+ new Be({
+ data: "nested",
+ defaults: D || {},
+ targets: C && "nested" === C.data ? C.vars.targets : A,
+ })).kill(),
+ (a.parent = a._dp = s(o)),
+ (a._start = 0),
+ b || U(_) || U(x))
+ ) {
+ if (((d = A.length), (m = b && se(b)), N(b)))
+ for (f in b) ~Ze.indexOf(f) && (g || (g = {}), (g[f] = b[f]));
+ for (u = 0; u < d; u++)
+ ((c = Ct(n, Ke)).stagger = 0),
+ E && (c.yoyoEase = E),
+ g && Tt(c, g),
+ (p = A[u]),
+ (c.duration = +Ye(_, s(o), u, p, A)),
+ (c.delay = (+Ye(x, s(o), u, p, A) || 0) - o._delay),
+ !b &&
+ 1 === d &&
+ c.delay &&
+ ((o._delay = x = c.delay), (o._start += x), (c.delay = 0)),
+ a.to(p, c, m ? m(u, p, A) : 0),
+ (a._ease = Ee.none);
+ a.duration() ? (_ = x = 0) : (o.timeline = 0);
+ } else if (M) {
+ At(Dt(a.vars.defaults, { ease: "none" })),
+ (a._ease = Oe(M.ease || n.ease || "none"));
+ var P,
+ L,
+ R,
+ O = 0;
+ if (V(M))
+ M.forEach(function (t) {
+ return a.to(A, t, ">");
+ }),
+ a.duration();
+ else {
+ for (f in ((c = {}), M))
+ "ease" === f || "easeEach" === f || Xe(f, M[f], c, M.easeEach);
+ for (f in c)
+ for (
+ P = c[f].sort(function (t, e) {
+ return t.t - e.t;
+ }),
+ O = 0,
+ u = 0;
+ u < P.length;
+ u++
+ )
+ ((R = {
+ ease: (L = P[u]).e,
+ duration: ((L.t - (u ? P[u - 1].t : 0)) / 100) * _,
+ })[f] = L.v),
+ a.to(A, R, O),
+ (O += R.duration);
+ a.duration() < _ && a.to({}, { duration: _ - a.duration() });
+ }
+ }
+ _ || o.duration((_ = a.duration()));
+ } else o.timeline = 0;
+ return (
+ !0 !== w || l || ((Ve = s(o)), h.killTweensOf(A), (Ve = 0)),
+ Ht(C, s(o), i),
+ n.reversed && o.reverse(),
+ n.paused && o.paused(!0),
+ (y ||
+ (!_ &&
+ !M &&
+ o._start === _t(C._time) &&
+ z(y) &&
+ (function t(e) {
+ return !e || (e._ts && t(e.parent));
+ })(s(o)) &&
+ "nested" !== C.data)) &&
+ ((o._tTime = -1e-8), o.render(Math.max(0, -x) || 0)),
+ T && Wt(s(o), T),
+ o
+ );
+ }
+ a(e, t);
+ var n = e.prototype;
+ return (
+ (n.render = function (t, e, n) {
+ var i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ c,
+ h,
+ d,
+ f = this._time,
+ p = this._tDur,
+ m = this._dur,
+ g = t < 0,
+ v = t > p - 1e-8 && !g ? p : t < 1e-8 ? 0 : t;
+ if (m) {
+ if (
+ v !== this._tTime ||
+ !t ||
+ n ||
+ (!this._initted && this._tTime) ||
+ (this._startAt && this._zTime < 0 !== g)
+ ) {
+ if (((i = v), (h = this.timeline), this._repeat)) {
+ if (((s = m + this._rDelay), this._repeat < -1 && g))
+ return this.totalTime(100 * s + t, e, n);
+ if (
+ ((i = _t(v % s)),
+ v === p
+ ? ((o = this._repeat), (i = m))
+ : ((o = ~~(v / s)) && o === v / s && ((i = m), o--),
+ i > m && (i = m)),
+ (l = this._yoyo && 1 & o) && ((d = this._yEase), (i = m - i)),
+ (a = zt(this._tTime, s)),
+ i === f && !n && this._initted)
+ )
+ return (this._tTime = v), this;
+ o !== a &&
+ (h && this._yEase && Re(h, l),
+ !this.vars.repeatRefresh ||
+ l ||
+ this._lock ||
+ ((this._lock = n = 1),
+ (this.render(_t(s * o), !0).invalidate()._lock = 0)));
+ }
+ if (!this._initted) {
+ if (Gt(this, g ? t : i, n, e, v))
+ return (this._tTime = 0), this;
+ if (f !== this._time) return this;
+ if (m !== this._dur) return this.render(t, e, n);
+ }
+ if (
+ ((this._tTime = v),
+ (this._time = i),
+ !this._act && this._ts && ((this._act = 1), (this._lazy = 0)),
+ (this.ratio = c = (d || this._ease)(i / m)),
+ this._from && (this.ratio = c = 1 - c),
+ i && !f && !e && (pe(this, "onStart"), this._tTime !== v))
+ )
+ return this;
+ for (r = this._pt; r; ) r.r(c, r.d), (r = r._next);
+ (h &&
+ h.render(
+ t < 0 ? t : !i && l ? -1e-8 : h._dur * h._ease(i / this._dur),
+ e,
+ n
+ )) ||
+ (this._startAt && (this._zTime = t)),
+ this._onUpdate &&
+ !e &&
+ (g && It(this, t, 0, n), pe(this, "onUpdate")),
+ this._repeat &&
+ o !== a &&
+ this.vars.onRepeat &&
+ !e &&
+ this.parent &&
+ pe(this, "onRepeat"),
+ (v !== this._tDur && v) ||
+ this._tTime !== v ||
+ (g && !this._onUpdate && It(this, t, 0, !0),
+ (t || !m) &&
+ ((v === this._tDur && this._ts > 0) ||
+ (!v && this._ts < 0)) &&
+ Rt(this, 1),
+ e ||
+ (g && !f) ||
+ !(v || f || l) ||
+ (pe(this, v === p ? "onComplete" : "onReverseComplete", !0),
+ this._prom &&
+ !(v < p && this.timeScale() > 0) &&
+ this._prom()));
+ }
+ } else
+ !(function (t, e, n, i) {
+ var r,
+ o,
+ s,
+ a = t.ratio,
+ l =
+ e < 0 ||
+ (!e &&
+ ((!t._start &&
+ (function t(e) {
+ var n = e.parent;
+ return (
+ n &&
+ n._ts &&
+ n._initted &&
+ !n._lock &&
+ (n.rawTime() < 0 || t(n))
+ );
+ })(t) &&
+ (t._initted || !jt(t))) ||
+ ((t._ts < 0 || t._dp._ts < 0) && !jt(t))))
+ ? 0
+ : 1,
+ c = t._rDelay,
+ h = 0;
+ if (
+ (c &&
+ t._repeat &&
+ ((h = Qt(0, t._tDur, e)),
+ (o = zt(h, c)),
+ t._yoyo && 1 & o && (l = 1 - l),
+ o !== zt(t._tTime, c) &&
+ ((a = 1 - l),
+ t.vars.repeatRefresh && t._initted && t.invalidate())),
+ l !== a || u || i || 1e-8 === t._zTime || (!e && t._zTime))
+ ) {
+ if (!t._initted && Gt(t, e, i, n, h)) return;
+ for (
+ s = t._zTime,
+ t._zTime = e || (n ? 1e-8 : 0),
+ n || (n = e && !s),
+ t.ratio = l,
+ t._from && (l = 1 - l),
+ t._time = 0,
+ t._tTime = h,
+ r = t._pt;
+ r;
+
+ )
+ r.r(l, r.d), (r = r._next);
+ e < 0 && It(t, e, 0, !0),
+ t._onUpdate && !n && pe(t, "onUpdate"),
+ h && t._repeat && !n && t.parent && pe(t, "onRepeat"),
+ (e >= t._tDur || e < 0) &&
+ t.ratio === l &&
+ (l && Rt(t, 1),
+ n ||
+ u ||
+ (pe(t, l ? "onComplete" : "onReverseComplete", !0),
+ t._prom && t._prom()));
+ } else t._zTime || (t._zTime = e);
+ })(this, t, e, n);
+ return this;
+ }),
+ (n.targets = function () {
+ return this._targets;
+ }),
+ (n.invalidate = function (e) {
+ return (
+ (!e || !this.vars.runBackwards) && (this._startAt = 0),
+ (this._pt =
+ this._op =
+ this._onUpdate =
+ this._lazy =
+ this.ratio =
+ 0),
+ (this._ptLookup = []),
+ this.timeline && this.timeline.invalidate(e),
+ t.prototype.invalidate.call(this, e)
+ );
+ }),
+ (n.resetTo = function (t, e, n, i) {
+ _ || De.wake(), this._ts || this.play();
+ var r = Math.min(
+ this._dur,
+ (this._dp._time - this._start) * this._ts
+ );
+ return (
+ this._initted || qe(this, r),
+ (function (t, e, n, i, r, o, s) {
+ var a,
+ l,
+ u,
+ c,
+ h = ((t._pt && t._ptCache) || (t._ptCache = {}))[e];
+ if (!h)
+ for (
+ h = t._ptCache[e] = [],
+ u = t._ptLookup,
+ c = t._targets.length;
+ c--;
+
+ ) {
+ if ((a = u[c][e]) && a.d && a.d._pt)
+ for (a = a.d._pt; a && a.p !== e && a.fp !== e; )
+ a = a._next;
+ if (!a)
+ return (He = 1), (t.vars[e] = "+=0"), qe(t, s), (He = 0), 1;
+ h.push(a);
+ }
+ for (c = h.length; c--; )
+ ((a = (l = h[c])._pt || l).s =
+ (!i && 0 !== i) || r ? a.s + (i || 0) + o * a.c : i),
+ (a.c = n - a.s),
+ l.e && (l.e = vt(n) + $t(l.e)),
+ l.b && (l.b = a.s + $t(l.b));
+ })(this, t, e, n, i, this._ease(r / this._dur), r)
+ ? this.resetTo(t, e, n, i)
+ : (Bt(this, 0),
+ this.parent ||
+ Pt(
+ this._dp,
+ this,
+ "_first",
+ "_last",
+ this._dp._sort ? "_start" : 0
+ ),
+ this.render(0))
+ );
+ }),
+ (n.kill = function (t, e) {
+ if ((void 0 === e && (e = "all"), !(t || (e && "all" !== e))))
+ return (this._lazy = this._pt = 0), this.parent ? me(this) : this;
+ if (this.timeline) {
+ var n = this.timeline.totalDuration();
+ return (
+ this.timeline.killTweensOf(t, e, Ve && !0 !== Ve.vars.overwrite)
+ ._first || me(this),
+ this.parent &&
+ n !== this.timeline.totalDuration() &&
+ qt(this, (this._dur * this.timeline._tDur) / n, 0, 1),
+ this
+ );
+ }
+ var i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ u,
+ c = this._targets,
+ h = t ? ie(t) : c,
+ d = this._ptLookup,
+ f = this._pt;
+ if (
+ (!e || "all" === e) &&
+ (function (t, e) {
+ for (
+ var n = t.length, i = n === e.length;
+ i && n-- && t[n] === e[n];
+
+ );
+ return n < 0;
+ })(c, h)
+ )
+ return "all" === e && (this._pt = 0), me(this);
+ for (
+ i = this._op = this._op || [],
+ "all" !== e &&
+ (R(e) &&
+ ((a = {}),
+ gt(e, function (t) {
+ return (a[t] = 1);
+ }),
+ (e = a)),
+ (e = (function (t, e) {
+ var n,
+ i,
+ r,
+ o,
+ s = t[0] ? pt(t[0]).harness : 0,
+ a = s && s.aliases;
+ if (!a) return e;
+ for (i in ((n = Tt({}, e)), a))
+ if ((i in n))
+ for (r = (o = a[i].split(",")).length; r--; )
+ n[o[r]] = n[i];
+ return n;
+ })(c, e))),
+ u = c.length;
+ u--;
+
+ )
+ if (~h.indexOf(c[u]))
+ for (a in ((r = d[u]),
+ "all" === e
+ ? ((i[u] = e), (s = r), (o = {}))
+ : ((o = i[u] = i[u] || {}), (s = e)),
+ s))
+ (l = r && r[a]) &&
+ (("kill" in l.d && !0 !== l.d.kill(a)) || Lt(this, l, "_pt"),
+ delete r[a]),
+ "all" !== o && (o[a] = 1);
+ return this._initted && !this._pt && f && me(this), this;
+ }),
+ (e.to = function (t, n) {
+ return new e(t, n, arguments[2]);
+ }),
+ (e.from = function (t, e) {
+ return Kt(1, arguments);
+ }),
+ (e.delayedCall = function (t, n, i, r) {
+ return new e(n, 0, {
+ immediateRender: !1,
+ lazy: !1,
+ overwrite: !1,
+ delay: t,
+ onComplete: n,
+ onReverseComplete: n,
+ onCompleteParams: i,
+ onReverseCompleteParams: i,
+ callbackScope: r,
+ });
+ }),
+ (e.fromTo = function (t, e, n) {
+ return Kt(2, arguments);
+ }),
+ (e.set = function (t, n) {
+ return (n.duration = 0), n.repeatDelay || (n.repeat = 0), new e(t, n);
+ }),
+ (e.killTweensOf = function (t, e, n) {
+ return h.killTweensOf(t, e, n);
+ }),
+ e
+ );
+ })(Ue);
+ Dt(Je.prototype, {
+ _targets: [],
+ _lazy: 0,
+ _startAt: 0,
+ _op: 0,
+ _onInit: 0,
+ }),
+ gt("staggerTo,staggerFrom,staggerFromTo", function (t) {
+ Je[t] = function () {
+ var e = new Be(),
+ n = te.call(arguments, 0);
+ return (
+ n.splice("staggerFromTo" === t ? 5 : 4, 0, 0), e[t].apply(e, n)
+ );
+ };
+ });
+ var Qe = function (t, e, n) {
+ return (t[e] = n);
+ },
+ $e = function (t, e, n) {
+ return t[e](n);
+ },
+ tn = function (t, e, n, i) {
+ return t[e](i.fp, n);
+ },
+ en = function (t, e, n) {
+ return t.setAttribute(e, n);
+ },
+ nn = function (t, e) {
+ return O(t[e]) ? $e : I(t[e]) && t.setAttribute ? en : Qe;
+ },
+ rn = function (t, e) {
+ return e.set(e.t, e.p, Math.round(1e6 * (e.s + e.c * t)) / 1e6, e);
+ },
+ on = function (t, e) {
+ return e.set(e.t, e.p, !!(e.s + e.c * t), e);
+ },
+ sn = function (t, e) {
+ var n = e._pt,
+ i = "";
+ if (!t && e.b) i = e.b;
+ else if (1 === t && e.e) i = e.e;
+ else {
+ for (; n; )
+ (i =
+ n.p +
+ (n.m
+ ? n.m(n.s + n.c * t)
+ : Math.round(1e4 * (n.s + n.c * t)) / 1e4) +
+ i),
+ (n = n._next);
+ i += e.c;
+ }
+ e.set(e.t, e.p, i, e);
+ },
+ an = function (t, e) {
+ for (var n = e._pt; n; ) n.r(t, n.d), (n = n._next);
+ },
+ ln = function (t, e, n, i) {
+ for (var r, o = this._pt; o; )
+ (r = o._next), o.p === i && o.modifier(t, e, n), (o = r);
+ },
+ un = function (t) {
+ for (var e, n, i = this._pt; i; )
+ (n = i._next),
+ (i.p === t && !i.op) || i.op === t
+ ? Lt(this, i, "_pt")
+ : i.dep || (e = 1),
+ (i = n);
+ return !e;
+ },
+ cn = function (t, e, n, i) {
+ i.mSet(t, e, i.m.call(i.tween, n, i.mt), i);
+ },
+ hn = function (t) {
+ for (var e, n, i, r, o = t._pt; o; ) {
+ for (e = o._next, n = i; n && n.pr > o.pr; ) n = n._next;
+ (o._prev = n ? n._prev : r) ? (o._prev._next = o) : (i = o),
+ (o._next = n) ? (n._prev = o) : (r = o),
+ (o = e);
+ }
+ t._pt = i;
+ },
+ dn = (function () {
+ function t(t, e, n, i, r, o, s, a, l) {
+ (this.t = e),
+ (this.s = i),
+ (this.c = r),
+ (this.p = n),
+ (this.r = o || rn),
+ (this.d = s || this),
+ (this.set = a || Qe),
+ (this.pr = l || 0),
+ (this._next = t),
+ t && (t._prev = this);
+ }
+ return (
+ (t.prototype.modifier = function (t, e, n) {
+ (this.mSet = this.mSet || this.set),
+ (this.set = cn),
+ (this.m = t),
+ (this.mt = n),
+ (this.tween = e);
+ }),
+ t
+ );
+ })();
+ gt(
+ dt +
+ "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",
+ function (t) {
+ return (ot[t] = 1);
+ }
+ ),
+ (Z.TweenMax = Z.TweenLite = Je),
+ (Z.TimelineLite = Z.TimelineMax = Be),
+ (h = new Be({
+ sortChildren: !1,
+ defaults: M,
+ autoRemoveChildren: !0,
+ id: "root",
+ smoothChildTiming: !0,
+ })),
+ (S.stringFilter = Me);
+ var fn = [],
+ pn = {},
+ mn = [],
+ gn = 0,
+ vn = function (t) {
+ return (pn[t] || mn).map(function (t) {
+ return t();
+ });
+ },
+ _n = function () {
+ var t = Date.now(),
+ e = [];
+ t - gn > 2 &&
+ (vn("matchMediaInit"),
+ fn.forEach(function (t) {
+ var n,
+ i,
+ r,
+ o,
+ s = t.queries,
+ a = t.conditions;
+ for (i in s)
+ (n = d.matchMedia(s[i]).matches) && (r = 1),
+ n !== a[i] && ((a[i] = n), (o = 1));
+ o && (t.revert(), r && e.push(t));
+ }),
+ vn("matchMediaRevert"),
+ e.forEach(function (t) {
+ return t.onMatch(t);
+ }),
+ (gn = t),
+ vn("matchMedia"));
+ },
+ xn = (function () {
+ function t(t, e) {
+ (this.selector = e && re(e)),
+ (this.data = []),
+ (this._r = []),
+ (this.isReverted = !1),
+ t && this.add(t);
+ }
+ var e = t.prototype;
+ return (
+ (e.add = function (t, e, n) {
+ O(t) && ((n = e), (e = t), (t = O));
+ var i = this,
+ r = function () {
+ var t,
+ r = c,
+ o = i.selector;
+ return (
+ r && r !== i && r.data.push(i),
+ n && (i.selector = re(n)),
+ (c = i),
+ (t = e.apply(i, arguments)),
+ O(t) && i._r.push(t),
+ (c = r),
+ (i.selector = o),
+ (i.isReverted = !1),
+ t
+ );
+ };
+ return (i.last = r), t === O ? r(i) : t ? (i[t] = r) : r;
+ }),
+ (e.ignore = function (t) {
+ var e = c;
+ (c = null), t(this), (c = e);
+ }),
+ (e.getTweens = function () {
+ var e = [];
+ return (
+ this.data.forEach(function (n) {
+ return n instanceof t
+ ? e.push.apply(e, n.getTweens())
+ : n instanceof Je &&
+ !(n.parent && "nested" === n.parent.data) &&
+ e.push(n);
+ }),
+ e
+ );
+ }),
+ (e.clear = function () {
+ this._r.length = this.data.length = 0;
+ }),
+ (e.kill = function (t, e) {
+ var n = this;
+ if (t) {
+ var i = this.getTweens();
+ this.data.forEach(function (t) {
+ "isFlip" === t.data &&
+ (t.revert(),
+ t.getChildren(!0, !0, !1).forEach(function (t) {
+ return i.splice(i.indexOf(t), 1);
+ }));
+ }),
+ i
+ .map(function (t) {
+ return { g: t.globalTime(0), t: t };
+ })
+ .sort(function (t, e) {
+ return e.g - t.g || -1;
+ })
+ .forEach(function (e) {
+ return e.t.revert(t);
+ }),
+ this.data.forEach(function (e) {
+ return !(e instanceof Ue) && e.revert && e.revert(t);
+ }),
+ this._r.forEach(function (e) {
+ return e(t, n);
+ }),
+ (this.isReverted = !0);
+ } else
+ this.data.forEach(function (t) {
+ return t.kill && t.kill();
+ });
+ if ((this.clear(), e)) {
+ var r = fn.indexOf(this);
+ ~r && fn.splice(r, 1);
+ }
+ }),
+ (e.revert = function (t) {
+ this.kill(t || {});
+ }),
+ t
+ );
+ })(),
+ yn = (function () {
+ function t(t) {
+ (this.contexts = []), (this.scope = t);
+ }
+ var e = t.prototype;
+ return (
+ (e.add = function (t, e, n) {
+ N(t) || (t = { matches: t });
+ var i,
+ r,
+ o,
+ s = new xn(0, n || this.scope),
+ a = (s.conditions = {});
+ for (r in (this.contexts.push(s),
+ (e = s.add("onMatch", e)),
+ (s.queries = t),
+ t))
+ "all" === r
+ ? (o = 1)
+ : (i = d.matchMedia(t[r])) &&
+ (fn.indexOf(s) < 0 && fn.push(s),
+ (a[r] = i.matches) && (o = 1),
+ i.addListener
+ ? i.addListener(_n)
+ : i.addEventListener("change", _n));
+ return o && e(s), this;
+ }),
+ (e.revert = function (t) {
+ this.kill(t || {});
+ }),
+ (e.kill = function (t) {
+ this.contexts.forEach(function (e) {
+ return e.kill(t, !0);
+ });
+ }),
+ t
+ );
+ })(),
+ bn = {
+ registerPlugin: function () {
+ for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
+ e[n] = arguments[n];
+ e.forEach(function (t) {
+ return ge(t);
+ });
+ },
+ timeline: function (t) {
+ return new Be(t);
+ },
+ getTweensOf: function (t, e) {
+ return h.getTweensOf(t, e);
+ },
+ getProperty: function (t, e, n, i) {
+ R(t) && (t = ie(t)[0]);
+ var r = pt(t || {}).get,
+ o = n ? Mt : St;
+ return (
+ "native" === n && (n = ""),
+ t
+ ? e
+ ? o(((lt[e] && lt[e].get) || r)(t, e, n, i))
+ : function (e, n, i) {
+ return o(((lt[e] && lt[e].get) || r)(t, e, n, i));
+ }
+ : t
+ );
+ },
+ quickSetter: function (t, e, n) {
+ if ((t = ie(t)).length > 1) {
+ var i = t.map(function (t) {
+ return Mn.quickSetter(t, e, n);
+ }),
+ r = i.length;
+ return function (t) {
+ for (var e = r; e--; ) i[e](t);
+ };
+ }
+ t = t[0] || {};
+ var o = lt[e],
+ s = pt(t),
+ a = (s.harness && (s.harness.aliases || {})[e]) || e,
+ l = o
+ ? function (e) {
+ var i = new o();
+ (v._pt = 0),
+ i.init(t, n ? e + n : e, v, 0, [t]),
+ i.render(1, i),
+ v._pt && an(1, v);
+ }
+ : s.set(t, a);
+ return o
+ ? l
+ : function (e) {
+ return l(t, a, n ? e + n : e, s, 1);
+ };
+ },
+ quickTo: function (t, e, n) {
+ var i,
+ r = Mn.to(
+ t,
+ Tt((((i = {})[e] = "+=0.1"), (i.paused = !0), i), n || {})
+ ),
+ o = function (t, n, i) {
+ return r.resetTo(e, t, n, i);
+ };
+ return (o.tween = r), o;
+ },
+ isTweening: function (t) {
+ return h.getTweensOf(t, !0).length > 0;
+ },
+ defaults: function (t) {
+ return t && t.ease && (t.ease = Oe(t.ease, M.ease)), Et(M, t || {});
+ },
+ config: function (t) {
+ return Et(S, t || {});
+ },
+ registerEffect: function (t) {
+ var e = t.name,
+ n = t.effect,
+ i = t.plugins,
+ r = t.defaults,
+ o = t.extendTimeline;
+ (i || "").split(",").forEach(function (t) {
+ return (
+ t &&
+ !lt[t] &&
+ !Z[t] &&
+ $(e + " effect requires " + t + " plugin.")
+ );
+ }),
+ (ut[e] = function (t, e, i) {
+ return n(ie(t), Dt(e || {}, r), i);
+ }),
+ o &&
+ (Be.prototype[e] = function (t, n, i) {
+ return this.add(ut[e](t, N(n) ? n : (i = n) && {}, this), i);
+ });
+ },
+ registerEase: function (t, e) {
+ Ee[t] = Oe(e);
+ },
+ parseEase: function (t, e) {
+ return arguments.length ? Oe(t, e) : Ee;
+ },
+ getById: function (t) {
+ return h.getById(t);
+ },
+ exportRoot: function (t, e) {
+ void 0 === t && (t = {});
+ var n,
+ i,
+ r = new Be(t);
+ for (
+ r.smoothChildTiming = z(t.smoothChildTiming),
+ h.remove(r),
+ r._dp = 0,
+ r._time = r._tTime = h._time,
+ n = h._first;
+ n;
+
+ )
+ (i = n._next),
+ (!e &&
+ !n._dur &&
+ n instanceof Je &&
+ n.vars.onComplete === n._targets[0]) ||
+ Ht(r, n, n._start - n._delay),
+ (n = i);
+ return Ht(h, r, 0), r;
+ },
+ context: function (t, e) {
+ return t ? new xn(t, e) : c;
+ },
+ matchMedia: function (t) {
+ return new yn(t);
+ },
+ matchMediaRefresh: function () {
+ return (
+ fn.forEach(function (t) {
+ var e,
+ n,
+ i = t.conditions;
+ for (n in i) i[n] && ((i[n] = !1), (e = 1));
+ e && t.revert();
+ }) || _n()
+ );
+ },
+ addEventListener: function (t, e) {
+ var n = pn[t] || (pn[t] = []);
+ ~n.indexOf(e) || n.push(e);
+ },
+ removeEventListener: function (t, e) {
+ var n = pn[t],
+ i = n && n.indexOf(e);
+ i >= 0 && n.splice(i, 1);
+ },
+ utils: {
+ wrap: function t(e, n, i) {
+ var r = n - e;
+ return V(e)
+ ? ce(e, t(0, e.length), n)
+ : Jt(i, function (t) {
+ return ((r + ((t - e) % r)) % r) + e;
+ });
+ },
+ wrapYoyo: function t(e, n, i) {
+ var r = n - e,
+ o = 2 * r;
+ return V(e)
+ ? ce(e, t(0, e.length - 1), n)
+ : Jt(i, function (t) {
+ return (
+ e + ((t = (o + ((t - e) % o)) % o || 0) > r ? o - t : t)
+ );
+ });
+ },
+ distribute: se,
+ random: ue,
+ snap: le,
+ normalize: function (t, e, n) {
+ return de(t, e, 0, 1, n);
+ },
+ getUnit: $t,
+ clamp: function (t, e, n) {
+ return Jt(n, function (n) {
+ return Qt(t, e, n);
+ });
+ },
+ splitColor: xe,
+ toArray: ie,
+ selector: re,
+ mapRange: de,
+ pipe: function () {
+ for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
+ e[n] = arguments[n];
+ return function (t) {
+ return e.reduce(function (t, e) {
+ return e(t);
+ }, t);
+ };
+ },
+ unitize: function (t, e) {
+ return function (n) {
+ return t(parseFloat(n)) + (e || $t(n));
+ };
+ },
+ interpolate: function t(e, n, i, r) {
+ var o = isNaN(e + n)
+ ? 0
+ : function (t) {
+ return (1 - t) * e + t * n;
+ };
+ if (!o) {
+ var s,
+ a,
+ l,
+ u,
+ c,
+ h = R(e),
+ d = {};
+ if ((!0 === i && (r = 1) && (i = null), h))
+ (e = { p: e }), (n = { p: n });
+ else if (V(e) && !V(n)) {
+ for (l = [], u = e.length, c = u - 2, a = 1; a < u; a++)
+ l.push(t(e[a - 1], e[a]));
+ u--,
+ (o = function (t) {
+ t *= u;
+ var e = Math.min(c, ~~t);
+ return l[e](t - e);
+ }),
+ (i = n);
+ } else r || (e = Tt(V(e) ? [] : {}, e));
+ if (!l) {
+ for (s in n) Ge.call(d, e, s, "get", n[s]);
+ o = function (t) {
+ return an(t, d) || (h ? e.p : e);
+ };
+ }
+ }
+ return Jt(i, o);
+ },
+ shuffle: oe,
+ },
+ install: J,
+ effects: ut,
+ ticker: De,
+ updateRoot: Be.updateRoot,
+ plugins: lt,
+ globalTimeline: h,
+ core: {
+ PropTween: dn,
+ globals: tt,
+ Tween: Je,
+ Timeline: Be,
+ Animation: Ue,
+ getCache: pt,
+ _removeLinkedListItem: Lt,
+ reverting: function () {
+ return u;
+ },
+ context: function (t) {
+ return t && c && (c.data.push(t), (t._ctx = c)), c;
+ },
+ suppressOverwrites: function (t) {
+ return (l = t);
+ },
+ },
+ };
+ gt("to,from,fromTo,delayedCall,set,killTweensOf", function (t) {
+ return (bn[t] = Je[t]);
+ }),
+ De.add(Be.updateRoot),
+ (v = bn.to({}, { duration: 0 }));
+ var wn = function (t, e) {
+ for (var n = t._pt; n && n.p !== e && n.op !== e && n.fp !== e; )
+ n = n._next;
+ return n;
+ },
+ Sn = function (t, e) {
+ return {
+ name: t,
+ rawVars: 1,
+ init: function (t, n, i) {
+ i._onInit = function (t) {
+ var i, r;
+ if (
+ (R(n) &&
+ ((i = {}),
+ gt(n, function (t) {
+ return (i[t] = 1);
+ }),
+ (n = i)),
+ e)
+ ) {
+ for (r in ((i = {}), n)) i[r] = e(n[r]);
+ n = i;
+ }
+ !(function (t, e) {
+ var n,
+ i,
+ r,
+ o = t._targets;
+ for (n in e)
+ for (i = o.length; i--; )
+ (r = t._ptLookup[i][n]) &&
+ (r = r.d) &&
+ (r._pt && (r = wn(r, n)),
+ r && r.modifier && r.modifier(e[n], t, o[i], n));
+ })(t, n);
+ };
+ },
+ };
+ },
+ Mn =
+ bn.registerPlugin(
+ {
+ name: "attr",
+ init: function (t, e, n, i, r) {
+ var o, s, a;
+ for (o in ((this.tween = n), e))
+ (a = t.getAttribute(o) || ""),
+ ((s = this.add(
+ t,
+ "setAttribute",
+ (a || 0) + "",
+ e[o],
+ i,
+ r,
+ 0,
+ 0,
+ o
+ )).op = o),
+ (s.b = a),
+ this._props.push(o);
+ },
+ render: function (t, e) {
+ for (var n = e._pt; n; )
+ u ? n.set(n.t, n.p, n.b, n) : n.r(t, n.d), (n = n._next);
+ },
+ },
+ {
+ name: "endArray",
+ init: function (t, e) {
+ for (var n = e.length; n--; )
+ this.add(t, n, t[n] || 0, e[n], 0, 0, 0, 0, 0, 1);
+ },
+ },
+ Sn("roundProps", ae),
+ Sn("modifiers"),
+ Sn("snap", le)
+ ) || bn;
+ (Je.version = Be.version = Mn.version = "3.11.4"), (m = 1), k() && Te();
+ Ee.Power0,
+ Ee.Power1,
+ Ee.Power2,
+ Ee.Power3,
+ Ee.Power4,
+ Ee.Linear,
+ Ee.Quad,
+ Ee.Cubic,
+ Ee.Quart,
+ Ee.Quint,
+ Ee.Strong,
+ Ee.Elastic,
+ Ee.Back,
+ Ee.SteppedEase,
+ Ee.Bounce,
+ Ee.Sine,
+ Ee.Expo,
+ Ee.Circ;
+ /*!
+ * CSSPlugin 3.11.4
+ * https://greensock.com
+ *
+ * Copyright 2008-2022, GreenSock. All rights reserved.
+ * Subject to the terms at https://greensock.com/standard-license or for
+ * Club GreenSock members, the agreement issued with that membership.
+ * @author: Jack Doyle, jack@greensock.com
+ */ var Dn,
+ Tn,
+ En,
+ Cn,
+ An,
+ Pn,
+ Ln,
+ Rn,
+ On = {},
+ Fn = 180 / Math.PI,
+ In = Math.PI / 180,
+ Nn = Math.atan2,
+ zn = /([A-Z])/g,
+ kn = /(left|right|width|margin|padding|x)/i,
+ Un = /[\s,\(]\S/,
+ Bn = {
+ autoAlpha: "opacity,visibility",
+ scale: "scaleX,scaleY",
+ alpha: "opacity",
+ },
+ Vn = function (t, e) {
+ return e.set(
+ e.t,
+ e.p,
+ Math.round(1e4 * (e.s + e.c * t)) / 1e4 + e.u,
+ e
+ );
+ },
+ Hn = function (t, e) {
+ return e.set(
+ e.t,
+ e.p,
+ 1 === t ? e.e : Math.round(1e4 * (e.s + e.c * t)) / 1e4 + e.u,
+ e
+ );
+ },
+ Wn = function (t, e) {
+ return e.set(
+ e.t,
+ e.p,
+ t ? Math.round(1e4 * (e.s + e.c * t)) / 1e4 + e.u : e.b,
+ e
+ );
+ },
+ Gn = function (t, e) {
+ var n = e.s + e.c * t;
+ e.set(e.t, e.p, ~~(n + (n < 0 ? -0.5 : 0.5)) + e.u, e);
+ },
+ jn = function (t, e) {
+ return e.set(e.t, e.p, t ? e.e : e.b, e);
+ },
+ qn = function (t, e) {
+ return e.set(e.t, e.p, 1 !== t ? e.b : e.e, e);
+ },
+ Xn = function (t, e, n) {
+ return (t.style[e] = n);
+ },
+ Yn = function (t, e, n) {
+ return t.style.setProperty(e, n);
+ },
+ Zn = function (t, e, n) {
+ return (t._gsap[e] = n);
+ },
+ Kn = function (t, e, n) {
+ return (t._gsap.scaleX = t._gsap.scaleY = n);
+ },
+ Jn = function (t, e, n, i, r) {
+ var o = t._gsap;
+ (o.scaleX = o.scaleY = n), o.renderTransform(r, o);
+ },
+ Qn = function (t, e, n, i, r) {
+ var o = t._gsap;
+ (o[e] = n), o.renderTransform(r, o);
+ },
+ $n = "transform",
+ ti = $n + "Origin",
+ ei = function (t, e) {
+ var n = this,
+ i = this.target,
+ r = i.style;
+ if (t in On) {
+ if (
+ ((this.tfm = this.tfm || {}),
+ "transform" !== t &&
+ (~(t = Bn[t] || t).indexOf(",")
+ ? t.split(",").forEach(function (t) {
+ return (n.tfm[t] = xi(i, t));
+ })
+ : (this.tfm[t] = i._gsap.x ? i._gsap[t] : xi(i, t))),
+ this.props.indexOf($n) >= 0)
+ )
+ return;
+ i._gsap.svg &&
+ ((this.svgo = i.getAttribute("data-svg-origin")),
+ this.props.push(ti, e, "")),
+ (t = $n);
+ }
+ (r || e) && this.props.push(t, e, r[t]);
+ },
+ ni = function (t) {
+ t.translate &&
+ (t.removeProperty("translate"),
+ t.removeProperty("scale"),
+ t.removeProperty("rotate"));
+ },
+ ii = function () {
+ var t,
+ e,
+ n = this.props,
+ i = this.target,
+ r = i.style,
+ o = i._gsap;
+ for (t = 0; t < n.length; t += 3)
+ n[t + 1]
+ ? (i[n[t]] = n[t + 2])
+ : n[t + 2]
+ ? (r[n[t]] = n[t + 2])
+ : r.removeProperty(n[t].replace(zn, "-$1").toLowerCase());
+ if (this.tfm) {
+ for (e in this.tfm) o[e] = this.tfm[e];
+ o.svg &&
+ (o.renderTransform(),
+ i.setAttribute("data-svg-origin", this.svgo || "")),
+ !(t = Ln()) || t.isStart || r[$n] || (ni(r), (o.uncache = 1));
+ }
+ },
+ ri = function (t, e) {
+ var n = { target: t, props: [], revert: ii, save: ei };
+ return (
+ e &&
+ e.split(",").forEach(function (t) {
+ return n.save(t);
+ }),
+ n
+ );
+ },
+ oi = function (t, e) {
+ var n = Tn.createElementNS
+ ? Tn.createElementNS(
+ (e || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"),
+ t
+ )
+ : Tn.createElement(t);
+ return n.style ? n : Tn.createElement(t);
+ },
+ si = function t(e, n, i) {
+ var r = getComputedStyle(e);
+ return (
+ r[n] ||
+ r.getPropertyValue(n.replace(zn, "-$1").toLowerCase()) ||
+ r.getPropertyValue(n) ||
+ (!i && t(e, li(n) || n, 1)) ||
+ ""
+ );
+ },
+ ai = "O,Moz,ms,Ms,Webkit".split(","),
+ li = function (t, e, n) {
+ var i = (e || An).style,
+ r = 5;
+ if (t in i && !n) return t;
+ for (
+ t = t.charAt(0).toUpperCase() + t.substr(1);
+ r-- && !(ai[r] + t in i);
+
+ );
+ return r < 0 ? null : (3 === r ? "ms" : r >= 0 ? ai[r] : "") + t;
+ },
+ ui = function () {
+ "undefined" != typeof window &&
+ window.document &&
+ ((Dn = window),
+ (Tn = Dn.document),
+ (En = Tn.documentElement),
+ (An = oi("div") || { style: {} }),
+ oi("div"),
+ ($n = li($n)),
+ (ti = $n + "Origin"),
+ (An.style.cssText =
+ "border-width:0;line-height:0;position:absolute;padding:0"),
+ (Rn = !!li("perspective")),
+ (Ln = Mn.core.reverting),
+ (Cn = 1));
+ },
+ ci = function t(e) {
+ var n,
+ i = oi(
+ "svg",
+ (this.ownerSVGElement &&
+ this.ownerSVGElement.getAttribute("xmlns")) ||
+ "http://www.w3.org/2000/svg"
+ ),
+ r = this.parentNode,
+ o = this.nextSibling,
+ s = this.style.cssText;
+ if (
+ (En.appendChild(i),
+ i.appendChild(this),
+ (this.style.display = "block"),
+ e)
+ )
+ try {
+ (n = this.getBBox()),
+ (this._gsapBBox = this.getBBox),
+ (this.getBBox = t);
+ } catch (t) {}
+ else this._gsapBBox && (n = this._gsapBBox());
+ return (
+ r && (o ? r.insertBefore(this, o) : r.appendChild(this)),
+ En.removeChild(i),
+ (this.style.cssText = s),
+ n
+ );
+ },
+ hi = function (t, e) {
+ for (var n = e.length; n--; )
+ if (t.hasAttribute(e[n])) return t.getAttribute(e[n]);
+ },
+ di = function (t) {
+ var e;
+ try {
+ e = t.getBBox();
+ } catch (n) {
+ e = ci.call(t, !0);
+ }
+ return (
+ (e && (e.width || e.height)) ||
+ t.getBBox === ci ||
+ (e = ci.call(t, !0)),
+ !e || e.width || e.x || e.y
+ ? e
+ : {
+ x: +hi(t, ["x", "cx", "x1"]) || 0,
+ y: +hi(t, ["y", "cy", "y1"]) || 0,
+ width: 0,
+ height: 0,
+ }
+ );
+ },
+ fi = function (t) {
+ return !(!t.getCTM || (t.parentNode && !t.ownerSVGElement) || !di(t));
+ },
+ pi = function (t, e) {
+ if (e) {
+ var n = t.style;
+ e in On && e !== ti && (e = $n),
+ n.removeProperty
+ ? (("ms" !== e.substr(0, 2) && "webkit" !== e.substr(0, 6)) ||
+ (e = "-" + e),
+ n.removeProperty(e.replace(zn, "-$1").toLowerCase()))
+ : n.removeAttribute(e);
+ }
+ },
+ mi = function (t, e, n, i, r, o) {
+ var s = new dn(t._pt, e, n, 0, 1, o ? qn : jn);
+ return (t._pt = s), (s.b = i), (s.e = r), t._props.push(n), s;
+ },
+ gi = { deg: 1, rad: 1, turn: 1 },
+ vi = { grid: 1, flex: 1 },
+ _i = function t(e, n, i, r) {
+ var o,
+ s,
+ a,
+ l,
+ u = parseFloat(i) || 0,
+ c = (i + "").trim().substr((u + "").length) || "px",
+ h = An.style,
+ d = kn.test(n),
+ f = "svg" === e.tagName.toLowerCase(),
+ p = (f ? "client" : "offset") + (d ? "Width" : "Height"),
+ m = "px" === r,
+ g = "%" === r;
+ return r === c || !u || gi[r] || gi[c]
+ ? u
+ : ("px" !== c && !m && (u = t(e, n, i, "px")),
+ (l = e.getCTM && fi(e)),
+ (!g && "%" !== c) || (!On[n] && !~n.indexOf("adius"))
+ ? ((h[d ? "width" : "height"] = 100 + (m ? c : r)),
+ (s =
+ ~n.indexOf("adius") || ("em" === r && e.appendChild && !f)
+ ? e
+ : e.parentNode),
+ l && (s = (e.ownerSVGElement || {}).parentNode),
+ (s && s !== Tn && s.appendChild) || (s = Tn.body),
+ (a = s._gsap) &&
+ g &&
+ a.width &&
+ d &&
+ a.time === De.time &&
+ !a.uncache
+ ? vt((u / a.width) * 100)
+ : ((g || "%" === c) &&
+ !vi[si(s, "display")] &&
+ (h.position = si(e, "position")),
+ s === e && (h.position = "static"),
+ s.appendChild(An),
+ (o = An[p]),
+ s.removeChild(An),
+ (h.position = "absolute"),
+ d && g && (((a = pt(s)).time = De.time), (a.width = s[p])),
+ vt(m ? (o * u) / 100 : o && u ? (100 / o) * u : 0)))
+ : ((o = l ? e.getBBox()[d ? "width" : "height"] : e[p]),
+ vt(g ? (u / o) * 100 : (u / 100) * o)));
+ },
+ xi = function (t, e, n, i) {
+ var r;
+ return (
+ Cn || ui(),
+ e in Bn &&
+ "transform" !== e &&
+ ~(e = Bn[e]).indexOf(",") &&
+ (e = e.split(",")[0]),
+ On[e] && "transform" !== e
+ ? ((r = Pi(t, i)),
+ (r =
+ "transformOrigin" !== e
+ ? r[e]
+ : r.svg
+ ? r.origin
+ : Li(si(t, ti)) + " " + r.zOrigin + "px"))
+ : (!(r = t.style[e]) ||
+ "auto" === r ||
+ i ||
+ ~(r + "").indexOf("calc(")) &&
+ (r =
+ (Si[e] && Si[e](t, e, n)) ||
+ si(t, e) ||
+ mt(t, e) ||
+ ("opacity" === e ? 1 : 0)),
+ n && !~(r + "").trim().indexOf(" ") ? _i(t, e, r, n) + n : r
+ );
+ },
+ yi = function (t, e, n, i) {
+ if (!n || "none" === n) {
+ var r = li(e, t, 1),
+ o = r && si(t, r, 1);
+ o && o !== n
+ ? ((e = r), (n = o))
+ : "borderColor" === e && (n = si(t, "borderTopColor"));
+ }
+ var s,
+ a,
+ l,
+ u,
+ c,
+ h,
+ d,
+ f,
+ p,
+ m,
+ g,
+ v = new dn(this._pt, t.style, e, 0, 1, sn),
+ _ = 0,
+ x = 0;
+ if (
+ ((v.b = n),
+ (v.e = i),
+ (n += ""),
+ "auto" === (i += "") &&
+ ((t.style[e] = i), (i = si(t, e) || i), (t.style[e] = n)),
+ Me((s = [n, i])),
+ (i = s[1]),
+ (l = (n = s[0]).match(G) || []),
+ (i.match(G) || []).length)
+ ) {
+ for (; (a = G.exec(i)); )
+ (d = a[0]),
+ (p = i.substring(_, a.index)),
+ c
+ ? (c = (c + 1) % 5)
+ : ("rgba(" !== p.substr(-5) && "hsla(" !== p.substr(-5)) ||
+ (c = 1),
+ d !== (h = l[x++] || "") &&
+ ((u = parseFloat(h) || 0),
+ (g = h.substr((u + "").length)),
+ "=" === d.charAt(1) && (d = xt(u, d) + g),
+ (f = parseFloat(d)),
+ (m = d.substr((f + "").length)),
+ (_ = G.lastIndex - m.length),
+ m ||
+ ((m = m || S.units[e] || g),
+ _ === i.length && ((i += m), (v.e += m))),
+ g !== m && (u = _i(t, e, h, m) || 0),
+ (v._pt = {
+ _next: v._pt,
+ p: p || 1 === x ? p : ",",
+ s: u,
+ c: f - u,
+ m: (c && c < 4) || "zIndex" === e ? Math.round : 0,
+ }));
+ v.c = _ < i.length ? i.substring(_, i.length) : "";
+ } else v.r = "display" === e && "none" === i ? qn : jn;
+ return q.test(i) && (v.e = 0), (this._pt = v), v;
+ },
+ bi = {
+ top: "0%",
+ bottom: "100%",
+ left: "0%",
+ right: "100%",
+ center: "50%",
+ },
+ wi = function (t, e) {
+ if (e.tween && e.tween._time === e.tween._dur) {
+ var n,
+ i,
+ r,
+ o = e.t,
+ s = o.style,
+ a = e.u,
+ l = o._gsap;
+ if ("all" === a || !0 === a) (s.cssText = ""), (i = 1);
+ else
+ for (r = (a = a.split(",")).length; --r > -1; )
+ (n = a[r]),
+ On[n] && ((i = 1), (n = "transformOrigin" === n ? ti : $n)),
+ pi(o, n);
+ i &&
+ (pi(o, $n),
+ l &&
+ (l.svg && o.removeAttribute("transform"),
+ Pi(o, 1),
+ (l.uncache = 1),
+ ni(s)));
+ }
+ },
+ Si = {
+ clearProps: function (t, e, n, i, r) {
+ if ("isFromStart" !== r.data) {
+ var o = (t._pt = new dn(t._pt, e, n, 0, 0, wi));
+ return (o.u = i), (o.pr = -10), (o.tween = r), t._props.push(n), 1;
+ }
+ },
+ },
+ Mi = [1, 0, 0, 1, 0, 0],
+ Di = {},
+ Ti = function (t) {
+ return "matrix(1, 0, 0, 1, 0, 0)" === t || "none" === t || !t;
+ },
+ Ei = function (t) {
+ var e = si(t, $n);
+ return Ti(e) ? Mi : e.substr(7).match(W).map(vt);
+ },
+ Ci = function (t, e) {
+ var n,
+ i,
+ r,
+ o,
+ s = t._gsap || pt(t),
+ a = t.style,
+ l = Ei(t);
+ return s.svg && t.getAttribute("transform")
+ ? "1,0,0,1,0,0" ===
+ (l = [
+ (r = t.transform.baseVal.consolidate().matrix).a,
+ r.b,
+ r.c,
+ r.d,
+ r.e,
+ r.f,
+ ]).join(",")
+ ? Mi
+ : l
+ : (l !== Mi ||
+ t.offsetParent ||
+ t === En ||
+ s.svg ||
+ ((r = a.display),
+ (a.display = "block"),
+ ((n = t.parentNode) && t.offsetParent) ||
+ ((o = 1), (i = t.nextElementSibling), En.appendChild(t)),
+ (l = Ei(t)),
+ r ? (a.display = r) : pi(t, "display"),
+ o &&
+ (i
+ ? n.insertBefore(t, i)
+ : n
+ ? n.appendChild(t)
+ : En.removeChild(t))),
+ e && l.length > 6 ? [l[0], l[1], l[4], l[5], l[12], l[13]] : l);
+ },
+ Ai = function (t, e, n, i, r, o) {
+ var s,
+ a,
+ l,
+ u = t._gsap,
+ c = r || Ci(t, !0),
+ h = u.xOrigin || 0,
+ d = u.yOrigin || 0,
+ f = u.xOffset || 0,
+ p = u.yOffset || 0,
+ m = c[0],
+ g = c[1],
+ v = c[2],
+ _ = c[3],
+ x = c[4],
+ y = c[5],
+ b = e.split(" "),
+ w = parseFloat(b[0]) || 0,
+ S = parseFloat(b[1]) || 0;
+ n
+ ? c !== Mi &&
+ (a = m * _ - g * v) &&
+ ((l = w * (-g / a) + S * (m / a) - (m * y - g * x) / a),
+ (w = w * (_ / a) + S * (-v / a) + (v * y - _ * x) / a),
+ (S = l))
+ : ((w =
+ (s = di(t)).x + (~b[0].indexOf("%") ? (w / 100) * s.width : w)),
+ (S =
+ s.y + (~(b[1] || b[0]).indexOf("%") ? (S / 100) * s.height : S))),
+ i || (!1 !== i && u.smooth)
+ ? ((x = w - h),
+ (y = S - d),
+ (u.xOffset = f + (x * m + y * v) - x),
+ (u.yOffset = p + (x * g + y * _) - y))
+ : (u.xOffset = u.yOffset = 0),
+ (u.xOrigin = w),
+ (u.yOrigin = S),
+ (u.smooth = !!i),
+ (u.origin = e),
+ (u.originIsAbsolute = !!n),
+ (t.style[ti] = "0px 0px"),
+ o &&
+ (mi(o, u, "xOrigin", h, w),
+ mi(o, u, "yOrigin", d, S),
+ mi(o, u, "xOffset", f, u.xOffset),
+ mi(o, u, "yOffset", p, u.yOffset)),
+ t.setAttribute("data-svg-origin", w + " " + S);
+ },
+ Pi = function (t, e) {
+ var n = t._gsap || new ke(t);
+ if ("x" in n && !e && !n.uncache) return n;
+ var i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ u,
+ c,
+ h,
+ d,
+ f,
+ p,
+ m,
+ g,
+ v,
+ _,
+ x,
+ y,
+ b,
+ w,
+ M,
+ D,
+ T,
+ E,
+ C,
+ A,
+ P,
+ L,
+ R,
+ O,
+ F,
+ I,
+ N = t.style,
+ z = n.scaleX < 0,
+ k = getComputedStyle(t),
+ U = si(t, ti) || "0";
+ return (
+ (i = r = o = l = u = c = h = d = f = 0),
+ (s = a = 1),
+ (n.svg = !(!t.getCTM || !fi(t))),
+ k.translate &&
+ (("none" === k.translate &&
+ "none" === k.scale &&
+ "none" === k.rotate) ||
+ (N[$n] =
+ ("none" !== k.translate
+ ? "translate3d(" +
+ (k.translate + " 0 0").split(" ").slice(0, 3).join(", ") +
+ ") "
+ : "") +
+ ("none" !== k.rotate ? "rotate(" + k.rotate + ") " : "") +
+ ("none" !== k.scale
+ ? "scale(" + k.scale.split(" ").join(",") + ") "
+ : "") +
+ ("none" !== k[$n] ? k[$n] : "")),
+ (N.scale = N.rotate = N.translate = "none")),
+ (g = Ci(t, n.svg)),
+ n.svg &&
+ (n.uncache
+ ? ((C = t.getBBox()),
+ (U = n.xOrigin - C.x + "px " + (n.yOrigin - C.y) + "px"),
+ (E = ""))
+ : (E = !e && t.getAttribute("data-svg-origin")),
+ Ai(t, E || U, !!E || n.originIsAbsolute, !1 !== n.smooth, g)),
+ (p = n.xOrigin || 0),
+ (m = n.yOrigin || 0),
+ g !== Mi &&
+ ((y = g[0]),
+ (b = g[1]),
+ (w = g[2]),
+ (M = g[3]),
+ (i = D = g[4]),
+ (r = T = g[5]),
+ 6 === g.length
+ ? ((s = Math.sqrt(y * y + b * b)),
+ (a = Math.sqrt(M * M + w * w)),
+ (l = y || b ? Nn(b, y) * Fn : 0),
+ (h = w || M ? Nn(w, M) * Fn + l : 0) &&
+ (a *= Math.abs(Math.cos(h * In))),
+ n.svg &&
+ ((i -= p - (p * y + m * w)), (r -= m - (p * b + m * M))))
+ : ((I = g[6]),
+ (O = g[7]),
+ (P = g[8]),
+ (L = g[9]),
+ (R = g[10]),
+ (F = g[11]),
+ (i = g[12]),
+ (r = g[13]),
+ (o = g[14]),
+ (u = (v = Nn(I, R)) * Fn),
+ v &&
+ ((E = D * (_ = Math.cos(-v)) + P * (x = Math.sin(-v))),
+ (C = T * _ + L * x),
+ (A = I * _ + R * x),
+ (P = D * -x + P * _),
+ (L = T * -x + L * _),
+ (R = I * -x + R * _),
+ (F = O * -x + F * _),
+ (D = E),
+ (T = C),
+ (I = A)),
+ (c = (v = Nn(-w, R)) * Fn),
+ v &&
+ ((_ = Math.cos(-v)),
+ (F = M * (x = Math.sin(-v)) + F * _),
+ (y = E = y * _ - P * x),
+ (b = C = b * _ - L * x),
+ (w = A = w * _ - R * x)),
+ (l = (v = Nn(b, y)) * Fn),
+ v &&
+ ((E = y * (_ = Math.cos(v)) + b * (x = Math.sin(v))),
+ (C = D * _ + T * x),
+ (b = b * _ - y * x),
+ (T = T * _ - D * x),
+ (y = E),
+ (D = C)),
+ u &&
+ Math.abs(u) + Math.abs(l) > 359.9 &&
+ ((u = l = 0), (c = 180 - c)),
+ (s = vt(Math.sqrt(y * y + b * b + w * w))),
+ (a = vt(Math.sqrt(T * T + I * I))),
+ (v = Nn(D, T)),
+ (h = Math.abs(v) > 2e-4 ? v * Fn : 0),
+ (f = F ? 1 / (F < 0 ? -F : F) : 0)),
+ n.svg &&
+ ((E = t.getAttribute("transform")),
+ (n.forceCSS = t.setAttribute("transform", "") || !Ti(si(t, $n))),
+ E && t.setAttribute("transform", E))),
+ Math.abs(h) > 90 &&
+ Math.abs(h) < 270 &&
+ (z
+ ? ((s *= -1),
+ (h += l <= 0 ? 180 : -180),
+ (l += l <= 0 ? 180 : -180))
+ : ((a *= -1), (h += h <= 0 ? 180 : -180))),
+ (e = e || n.uncache),
+ (n.x =
+ i -
+ ((n.xPercent =
+ i &&
+ ((!e && n.xPercent) ||
+ (Math.round(t.offsetWidth / 2) === Math.round(-i) ? -50 : 0)))
+ ? (t.offsetWidth * n.xPercent) / 100
+ : 0) +
+ "px"),
+ (n.y =
+ r -
+ ((n.yPercent =
+ r &&
+ ((!e && n.yPercent) ||
+ (Math.round(t.offsetHeight / 2) === Math.round(-r) ? -50 : 0)))
+ ? (t.offsetHeight * n.yPercent) / 100
+ : 0) +
+ "px"),
+ (n.z = o + "px"),
+ (n.scaleX = vt(s)),
+ (n.scaleY = vt(a)),
+ (n.rotation = vt(l) + "deg"),
+ (n.rotationX = vt(u) + "deg"),
+ (n.rotationY = vt(c) + "deg"),
+ (n.skewX = h + "deg"),
+ (n.skewY = d + "deg"),
+ (n.transformPerspective = f + "px"),
+ (n.zOrigin = parseFloat(U.split(" ")[2]) || 0) && (N[ti] = Li(U)),
+ (n.xOffset = n.yOffset = 0),
+ (n.force3D = S.force3D),
+ (n.renderTransform = n.svg ? Ii : Rn ? Fi : Oi),
+ (n.uncache = 0),
+ n
+ );
+ },
+ Li = function (t) {
+ return (t = t.split(" "))[0] + " " + t[1];
+ },
+ Ri = function (t, e, n) {
+ var i = $t(e);
+ return vt(parseFloat(e) + parseFloat(_i(t, "x", n + "px", i))) + i;
+ },
+ Oi = function (t, e) {
+ (e.z = "0px"),
+ (e.rotationY = e.rotationX = "0deg"),
+ (e.force3D = 0),
+ Fi(t, e);
+ },
+ Fi = function (t, e) {
+ var n = e || this,
+ i = n.xPercent,
+ r = n.yPercent,
+ o = n.x,
+ s = n.y,
+ a = n.z,
+ l = n.rotation,
+ u = n.rotationY,
+ c = n.rotationX,
+ h = n.skewX,
+ d = n.skewY,
+ f = n.scaleX,
+ p = n.scaleY,
+ m = n.transformPerspective,
+ g = n.force3D,
+ v = n.target,
+ _ = n.zOrigin,
+ x = "",
+ y = ("auto" === g && t && 1 !== t) || !0 === g;
+ if (_ && ("0deg" !== c || "0deg" !== u)) {
+ var b,
+ w = parseFloat(u) * In,
+ S = Math.sin(w),
+ M = Math.cos(w);
+ (w = parseFloat(c) * In),
+ (b = Math.cos(w)),
+ (o = Ri(v, o, S * b * -_)),
+ (s = Ri(v, s, -Math.sin(w) * -_)),
+ (a = Ri(v, a, M * b * -_ + _));
+ }
+ "0px" !== m && (x += "perspective(" + m + ") "),
+ (i || r) && (x += "translate(" + i + "%, " + r + "%) "),
+ (y || "0px" !== o || "0px" !== s || "0px" !== a) &&
+ (x +=
+ "0px" !== a || y
+ ? "translate3d(" + o + ", " + s + ", " + a + ") "
+ : "translate(" + o + ", " + s + ") "),
+ "0deg" !== l && (x += "rotate(" + l + ") "),
+ "0deg" !== u && (x += "rotateY(" + u + ") "),
+ "0deg" !== c && (x += "rotateX(" + c + ") "),
+ ("0deg" === h && "0deg" === d) ||
+ (x += "skew(" + h + ", " + d + ") "),
+ (1 === f && 1 === p) || (x += "scale(" + f + ", " + p + ") "),
+ (v.style[$n] = x || "translate(0, 0)");
+ },
+ Ii = function (t, e) {
+ var n,
+ i,
+ r,
+ o,
+ s,
+ a = e || this,
+ l = a.xPercent,
+ u = a.yPercent,
+ c = a.x,
+ h = a.y,
+ d = a.rotation,
+ f = a.skewX,
+ p = a.skewY,
+ m = a.scaleX,
+ g = a.scaleY,
+ v = a.target,
+ _ = a.xOrigin,
+ x = a.yOrigin,
+ y = a.xOffset,
+ b = a.yOffset,
+ w = a.forceCSS,
+ S = parseFloat(c),
+ M = parseFloat(h);
+ (d = parseFloat(d)),
+ (f = parseFloat(f)),
+ (p = parseFloat(p)) && ((f += p = parseFloat(p)), (d += p)),
+ d || f
+ ? ((d *= In),
+ (f *= In),
+ (n = Math.cos(d) * m),
+ (i = Math.sin(d) * m),
+ (r = Math.sin(d - f) * -g),
+ (o = Math.cos(d - f) * g),
+ f &&
+ ((p *= In),
+ (s = Math.tan(f - p)),
+ (r *= s = Math.sqrt(1 + s * s)),
+ (o *= s),
+ p &&
+ ((s = Math.tan(p)),
+ (n *= s = Math.sqrt(1 + s * s)),
+ (i *= s))),
+ (n = vt(n)),
+ (i = vt(i)),
+ (r = vt(r)),
+ (o = vt(o)))
+ : ((n = m), (o = g), (i = r = 0)),
+ ((S && !~(c + "").indexOf("px")) ||
+ (M && !~(h + "").indexOf("px"))) &&
+ ((S = _i(v, "x", c, "px")), (M = _i(v, "y", h, "px"))),
+ (_ || x || y || b) &&
+ ((S = vt(S + _ - (_ * n + x * r) + y)),
+ (M = vt(M + x - (_ * i + x * o) + b))),
+ (l || u) &&
+ ((s = v.getBBox()),
+ (S = vt(S + (l / 100) * s.width)),
+ (M = vt(M + (u / 100) * s.height))),
+ (s =
+ "matrix(" +
+ n +
+ "," +
+ i +
+ "," +
+ r +
+ "," +
+ o +
+ "," +
+ S +
+ "," +
+ M +
+ ")"),
+ v.setAttribute("transform", s),
+ w && (v.style[$n] = s);
+ },
+ Ni = function (t, e, n, i, r) {
+ var o,
+ s,
+ a = R(r),
+ l = parseFloat(r) * (a && ~r.indexOf("rad") ? Fn : 1) - i,
+ u = i + l + "deg";
+ return (
+ a &&
+ ("short" === (o = r.split("_")[1]) &&
+ (l %= 360) !== l % 180 &&
+ (l += l < 0 ? 360 : -360),
+ "cw" === o && l < 0
+ ? (l = ((l + 36e9) % 360) - 360 * ~~(l / 360))
+ : "ccw" === o &&
+ l > 0 &&
+ (l = ((l - 36e9) % 360) - 360 * ~~(l / 360))),
+ (t._pt = s = new dn(t._pt, e, n, i, l, Hn)),
+ (s.e = u),
+ (s.u = "deg"),
+ t._props.push(n),
+ s
+ );
+ },
+ zi = function (t, e) {
+ for (var n in e) t[n] = e[n];
+ return t;
+ },
+ ki = function (t, e, n) {
+ var i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ u,
+ c = zi({}, n._gsap),
+ h = n.style;
+ for (r in (c.svg
+ ? ((o = n.getAttribute("transform")),
+ n.setAttribute("transform", ""),
+ (h[$n] = e),
+ (i = Pi(n, 1)),
+ pi(n, $n),
+ n.setAttribute("transform", o))
+ : ((o = getComputedStyle(n)[$n]),
+ (h[$n] = e),
+ (i = Pi(n, 1)),
+ (h[$n] = o)),
+ On))
+ (o = c[r]) !== (s = i[r]) &&
+ "perspective,force3D,transformOrigin,svgOrigin".indexOf(r) < 0 &&
+ ((a = $t(o) !== (u = $t(s)) ? _i(n, r, o, u) : parseFloat(o)),
+ (l = parseFloat(s)),
+ (t._pt = new dn(t._pt, i, r, a, l - a, Vn)),
+ (t._pt.u = u || 0),
+ t._props.push(r));
+ zi(i, c);
+ };
+ gt("padding,margin,Width,Radius", function (t, e) {
+ var n = "Top",
+ i = "Right",
+ r = "Bottom",
+ o = "Left",
+ s = (e < 3 ? [n, i, r, o] : [n + o, n + i, r + i, r + o]).map(function (
+ n
+ ) {
+ return e < 2 ? t + n : "border" + n + t;
+ });
+ Si[e > 1 ? "border" + t : t] = function (t, e, n, i, r) {
+ var o, a;
+ if (arguments.length < 4)
+ return (
+ (o = s.map(function (e) {
+ return xi(t, e, n);
+ })),
+ 5 === (a = o.join(" ")).split(o[0]).length ? o[0] : a
+ );
+ (o = (i + "").split(" ")),
+ (a = {}),
+ s.forEach(function (t, e) {
+ return (a[t] = o[e] = o[e] || o[((e - 1) / 2) | 0]);
+ }),
+ t.init(e, a, r);
+ };
+ });
+ var Ui,
+ Bi,
+ Vi = {
+ name: "css",
+ register: ui,
+ targetTest: function (t) {
+ return t.style && t.nodeType;
+ },
+ init: function (t, e, n, i, r) {
+ var o,
+ s,
+ a,
+ l,
+ u,
+ c,
+ h,
+ d,
+ f,
+ p,
+ m,
+ g,
+ v,
+ _,
+ x,
+ y,
+ b,
+ w,
+ M,
+ D,
+ T = this._props,
+ E = t.style,
+ C = n.vars.startAt;
+ for (h in (Cn || ui(),
+ (this.styles = this.styles || ri(t)),
+ (y = this.styles.props),
+ (this.tween = n),
+ e))
+ if (
+ "autoRound" !== h &&
+ ((s = e[h]), !lt[h] || !je(h, e, n, i, t, r))
+ )
+ if (
+ ((u = typeof s),
+ (c = Si[h]),
+ "function" === u && (u = typeof (s = s.call(n, i, t, r))),
+ "string" === u && ~s.indexOf("random(") && (s = he(s)),
+ c)
+ )
+ c(this, t, h, s, n) && (x = 1);
+ else if ("--" === h.substr(0, 2))
+ (o = (getComputedStyle(t).getPropertyValue(h) + "").trim()),
+ (s += ""),
+ (we.lastIndex = 0),
+ we.test(o) || ((d = $t(o)), (f = $t(s))),
+ f ? d !== f && (o = _i(t, h, o, f) + f) : d && (s += d),
+ this.add(E, "setProperty", o, s, i, r, 0, 0, h),
+ T.push(h),
+ y.push(h, 0, E[h]);
+ else if ("undefined" !== u) {
+ if (
+ (C && h in C
+ ? ((o =
+ "function" == typeof C[h]
+ ? C[h].call(n, i, t, r)
+ : C[h]),
+ R(o) && ~o.indexOf("random(") && (o = he(o)),
+ $t(o + "") || (o += S.units[h] || $t(xi(t, h)) || ""),
+ "=" === (o + "").charAt(1) && (o = xi(t, h)))
+ : (o = xi(t, h)),
+ (l = parseFloat(o)),
+ (p =
+ "string" === u && "=" === s.charAt(1) && s.substr(0, 2)) &&
+ (s = s.substr(2)),
+ (a = parseFloat(s)),
+ h in Bn &&
+ ("autoAlpha" === h &&
+ (1 === l &&
+ "hidden" === xi(t, "visibility") &&
+ a &&
+ (l = 0),
+ y.push("visibility", 0, E.visibility),
+ mi(
+ this,
+ E,
+ "visibility",
+ l ? "inherit" : "hidden",
+ a ? "inherit" : "hidden",
+ !a
+ )),
+ "scale" !== h &&
+ "transform" !== h &&
+ ~(h = Bn[h]).indexOf(",") &&
+ (h = h.split(",")[0])),
+ (m = h in On))
+ )
+ if (
+ (this.styles.save(h),
+ g ||
+ (((v = t._gsap).renderTransform && !e.parseTransform) ||
+ Pi(t, e.parseTransform),
+ (_ = !1 !== e.smoothOrigin && v.smooth),
+ ((g = this._pt =
+ new dn(
+ this._pt,
+ E,
+ $n,
+ 0,
+ 1,
+ v.renderTransform,
+ v,
+ 0,
+ -1
+ )).dep = 1)),
+ "scale" === h)
+ )
+ (this._pt = new dn(
+ this._pt,
+ v,
+ "scaleY",
+ v.scaleY,
+ (p ? xt(v.scaleY, p + a) : a) - v.scaleY || 0,
+ Vn
+ )),
+ (this._pt.u = 0),
+ T.push("scaleY", h),
+ (h += "X");
+ else {
+ if ("transformOrigin" === h) {
+ y.push(ti, 0, E[ti]),
+ (w = void 0),
+ (M = void 0),
+ (D = void 0),
+ (w = (b = s).split(" ")),
+ (M = w[0]),
+ (D = w[1] || "50%"),
+ ("top" !== M &&
+ "bottom" !== M &&
+ "left" !== D &&
+ "right" !== D) ||
+ ((b = M), (M = D), (D = b)),
+ (w[0] = bi[M] || M),
+ (w[1] = bi[D] || D),
+ (s = w.join(" ")),
+ v.svg
+ ? Ai(t, s, 0, _, 0, this)
+ : ((f = parseFloat(s.split(" ")[2]) || 0) !==
+ v.zOrigin && mi(this, v, "zOrigin", v.zOrigin, f),
+ mi(this, E, h, Li(o), Li(s)));
+ continue;
+ }
+ if ("svgOrigin" === h) {
+ Ai(t, s, 1, _, 0, this);
+ continue;
+ }
+ if (h in Di) {
+ Ni(this, v, h, l, p ? xt(l, p + s) : s);
+ continue;
+ }
+ if ("smoothOrigin" === h) {
+ mi(this, v, "smooth", v.smooth, s);
+ continue;
+ }
+ if ("force3D" === h) {
+ v[h] = s;
+ continue;
+ }
+ if ("transform" === h) {
+ ki(this, s, t);
+ continue;
+ }
+ }
+ else h in E || (h = li(h) || h);
+ if (
+ m ||
+ ((a || 0 === a) && (l || 0 === l) && !Un.test(s) && h in E)
+ )
+ a || (a = 0),
+ (d = (o + "").substr((l + "").length)) !==
+ (f = $t(s) || (h in S.units ? S.units[h] : d)) &&
+ (l = _i(t, h, o, f)),
+ (this._pt = new dn(
+ this._pt,
+ m ? v : E,
+ h,
+ l,
+ (p ? xt(l, p + a) : a) - l,
+ m || ("px" !== f && "zIndex" !== h) || !1 === e.autoRound
+ ? Vn
+ : Gn
+ )),
+ (this._pt.u = f || 0),
+ d !== f &&
+ "%" !== f &&
+ ((this._pt.b = o), (this._pt.r = Wn));
+ else if (h in E) yi.call(this, t, h, o, p ? p + s : s);
+ else if (h in t) this.add(t, h, o || t[h], p ? p + s : s, i, r);
+ else if ("parseTransform" !== h) {
+ Q(h, s);
+ continue;
+ }
+ m || (h in E ? y.push(h, 0, E[h]) : y.push(h, 1, o || t[h])),
+ T.push(h);
+ }
+ x && hn(this);
+ },
+ render: function (t, e) {
+ if (e.tween._time || !Ln())
+ for (var n = e._pt; n; ) n.r(t, n.d), (n = n._next);
+ else e.styles.revert();
+ },
+ get: xi,
+ aliases: Bn,
+ getSetter: function (t, e, n) {
+ var i = Bn[e];
+ return (
+ i && i.indexOf(",") < 0 && (e = i),
+ e in On && e !== ti && (t._gsap.x || xi(t, "x"))
+ ? n && Pn === n
+ ? "scale" === e
+ ? Kn
+ : Zn
+ : (Pn = n || {}) && ("scale" === e ? Jn : Qn)
+ : t.style && !I(t.style[e])
+ ? Xn
+ : ~e.indexOf("-")
+ ? Yn
+ : nn(t, e)
+ );
+ },
+ core: { _removeProperty: pi, _getMatrix: Ci },
+ };
+ (Mn.utils.checkPrefix = li),
+ (Mn.core.getStyleSaver = ri),
+ (Bi = gt(
+ "x,y,z,scale,scaleX,scaleY,xPercent,yPercent," +
+ (Ui = "rotation,rotationX,rotationY,skewX,skewY") +
+ ",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",
+ function (t) {
+ On[t] = 1;
+ }
+ )),
+ gt(Ui, function (t) {
+ (S.units[t] = "deg"), (Di[t] = 1);
+ }),
+ (Bn[Bi[13]] = "x,y,z,scale,scaleX,scaleY,xPercent,yPercent," + Ui),
+ gt(
+ "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",
+ function (t) {
+ var e = t.split(":");
+ Bn[e[1]] = Bi[e[0]];
+ }
+ ),
+ gt(
+ "x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",
+ function (t) {
+ S.units[t] = "px";
+ }
+ ),
+ Mn.registerPlugin(Vi);
+ var Hi = Mn.registerPlugin(Vi) || Mn;
+ Hi.core.Tween;
+ function Wi(t, e) {
+ for (var n = 0; n < e.length; n++) {
+ var i = e[n];
+ (i.enumerable = i.enumerable || !1),
+ (i.configurable = !0),
+ "value" in i && (i.writable = !0),
+ Object.defineProperty(t, i.key, i);
+ }
+ }
+ /*!
+ * Observer 3.11.4
+ * https://greensock.com
+ *
+ * @license Copyright 2008-2022, GreenSock. All rights reserved.
+ * Subject to the terms at https://greensock.com/standard-license or for
+ * Club GreenSock members, the agreement issued with that membership.
+ * @author: Jack Doyle, jack@greensock.com
+ */
+ var Gi,
+ ji,
+ qi,
+ Xi,
+ Yi,
+ Zi,
+ Ki,
+ Ji,
+ Qi,
+ $i,
+ tr,
+ er,
+ nr,
+ ir = function () {
+ return (
+ Gi ||
+ ("undefined" != typeof window &&
+ (Gi = window.gsap) &&
+ Gi.registerPlugin &&
+ Gi)
+ );
+ },
+ rr = 1,
+ or = [],
+ sr = [],
+ ar = [],
+ lr = Date.now,
+ ur = function (t, e) {
+ return e;
+ },
+ cr = function (t, e) {
+ return ~ar.indexOf(t) && ar[ar.indexOf(t) + 1][e];
+ },
+ hr = function (t) {
+ return !!~$i.indexOf(t);
+ },
+ dr = function (t, e, n, i, r) {
+ return t.addEventListener(e, n, { passive: !i, capture: !!r });
+ },
+ fr = function (t, e, n, i) {
+ return t.removeEventListener(e, n, !!i);
+ },
+ pr = function () {
+ return (tr && tr.isPressed) || sr.cache++;
+ },
+ mr = function (t, e) {
+ var n = function n(i) {
+ if (i || 0 === i) {
+ rr && (qi.history.scrollRestoration = "manual");
+ var r = tr && tr.isPressed;
+ (i = n.v = Math.round(i) || (tr && tr.iOS ? 1 : 0)),
+ t(i),
+ (n.cacheID = sr.cache),
+ r && ur("ss", i);
+ } else
+ (e || sr.cache !== n.cacheID || ur("ref")) &&
+ ((n.cacheID = sr.cache), (n.v = t()));
+ return n.v + n.offset;
+ };
+ return (n.offset = 0), t && n;
+ },
+ gr = {
+ s: "scrollLeft",
+ p: "left",
+ p2: "Left",
+ os: "right",
+ os2: "Right",
+ d: "width",
+ d2: "Width",
+ a: "x",
+ sc: mr(function (t) {
+ return arguments.length
+ ? qi.scrollTo(t, vr.sc())
+ : qi.pageXOffset ||
+ Xi.scrollLeft ||
+ Yi.scrollLeft ||
+ Zi.scrollLeft ||
+ 0;
+ }),
+ },
+ vr = {
+ s: "scrollTop",
+ p: "top",
+ p2: "Top",
+ os: "bottom",
+ os2: "Bottom",
+ d: "height",
+ d2: "Height",
+ a: "y",
+ op: gr,
+ sc: mr(function (t) {
+ return arguments.length
+ ? qi.scrollTo(gr.sc(), t)
+ : qi.pageYOffset ||
+ Xi.scrollTop ||
+ Yi.scrollTop ||
+ Zi.scrollTop ||
+ 0;
+ }),
+ },
+ _r = function (t) {
+ return (
+ Gi.utils.toArray(t)[0] ||
+ ("string" == typeof t && !1 !== Gi.config().nullTargetWarn
+ ? console.warn("Element not found:", t)
+ : null)
+ );
+ },
+ xr = function (t, e) {
+ var n = e.s,
+ i = e.sc;
+ hr(t) && (t = Xi.scrollingElement || Yi);
+ var r = sr.indexOf(t),
+ o = i === vr.sc ? 1 : 2;
+ !~r && (r = sr.push(t) - 1),
+ sr[r + o] || t.addEventListener("scroll", pr);
+ var s = sr[r + o],
+ a =
+ s ||
+ (sr[r + o] =
+ mr(cr(t, n), !0) ||
+ (hr(t)
+ ? i
+ : mr(function (e) {
+ return arguments.length ? (t[n] = e) : t[n];
+ })));
+ return (
+ (a.target = t),
+ s || (a.smooth = "smooth" === Gi.getProperty(t, "scrollBehavior")),
+ a
+ );
+ },
+ yr = function (t, e, n) {
+ var i = t,
+ r = t,
+ o = lr(),
+ s = o,
+ a = e || 50,
+ l = Math.max(500, 3 * a),
+ u = function (t, e) {
+ var l = lr();
+ e || l - o > a
+ ? ((r = i), (i = t), (s = o), (o = l))
+ : n
+ ? (i += t)
+ : (i = r + ((t - r) / (l - s)) * (o - s));
+ };
+ return {
+ update: u,
+ reset: function () {
+ (r = i = n ? 0 : i), (s = o = 0);
+ },
+ getVelocity: function (t) {
+ var e = s,
+ a = r,
+ c = lr();
+ return (
+ (t || 0 === t) && t !== i && u(t),
+ o === s || c - s > l
+ ? 0
+ : ((i + (n ? a : -a)) / ((n ? c : o) - e)) * 1e3
+ );
+ },
+ };
+ },
+ br = function (t, e) {
+ return (
+ e && !t._gsapAllow && t.preventDefault(),
+ t.changedTouches ? t.changedTouches[0] : t
+ );
+ },
+ wr = function (t) {
+ var e = Math.max.apply(Math, t),
+ n = Math.min.apply(Math, t);
+ return Math.abs(e) >= Math.abs(n) ? e : n;
+ },
+ Sr = function () {
+ var t, e, n, i;
+ (Qi = Gi.core.globals().ScrollTrigger) &&
+ Qi.core &&
+ ((t = Qi.core),
+ (e = t.bridge || {}),
+ (n = t._scrollers),
+ (i = t._proxies),
+ n.push.apply(n, sr),
+ i.push.apply(i, ar),
+ (sr = n),
+ (ar = i),
+ (ur = function (t, n) {
+ return e[t](n);
+ }));
+ },
+ Mr = function (t) {
+ return (
+ (Gi = t || ir()) &&
+ "undefined" != typeof document &&
+ document.body &&
+ ((qi = window),
+ (Xi = document),
+ (Yi = Xi.documentElement),
+ (Zi = Xi.body),
+ ($i = [qi, Xi, Yi, Zi]),
+ Gi.utils.clamp,
+ (nr = Gi.core.context || function () {}),
+ (Ji = "onpointerenter" in Zi ? "pointer" : "mouse"),
+ (Ki = Dr.isTouch =
+ qi.matchMedia &&
+ qi.matchMedia("(hover: none), (pointer: coarse)").matches
+ ? 1
+ : "ontouchstart" in qi ||
+ navigator.maxTouchPoints > 0 ||
+ navigator.msMaxTouchPoints > 0
+ ? 2
+ : 0),
+ (er = Dr.eventTypes =
+ (
+ "ontouchstart" in Yi
+ ? "touchstart,touchmove,touchcancel,touchend"
+ : "onpointerdown" in Yi
+ ? "pointerdown,pointermove,pointercancel,pointerup"
+ : "mousedown,mousemove,mouseup,mouseup"
+ ).split(",")),
+ setTimeout(function () {
+ return (rr = 0);
+ }, 500),
+ Sr(),
+ (ji = 1)),
+ ji
+ );
+ };
+ (gr.op = vr), (sr.cache = 0);
+ var Dr = (function () {
+ function t(t) {
+ this.init(t);
+ }
+ var e, n, i;
+ return (
+ (t.prototype.init = function (t) {
+ ji || Mr(Gi) || console.warn("Please gsap.registerPlugin(Observer)"),
+ Qi || Sr();
+ var e = t.tolerance,
+ n = t.dragMinimum,
+ i = t.type,
+ r = t.target,
+ o = t.lineHeight,
+ s = t.debounce,
+ a = t.preventDefault,
+ l = t.onStop,
+ u = t.onStopDelay,
+ c = t.ignore,
+ h = t.wheelSpeed,
+ d = t.event,
+ f = t.onDragStart,
+ p = t.onDragEnd,
+ m = t.onDrag,
+ g = t.onPress,
+ v = t.onRelease,
+ _ = t.onRight,
+ x = t.onLeft,
+ y = t.onUp,
+ b = t.onDown,
+ w = t.onChangeX,
+ S = t.onChangeY,
+ M = t.onChange,
+ D = t.onToggleX,
+ T = t.onToggleY,
+ E = t.onHover,
+ C = t.onHoverEnd,
+ A = t.onMove,
+ P = t.ignoreCheck,
+ L = t.isNormalizer,
+ R = t.onGestureStart,
+ O = t.onGestureEnd,
+ F = t.onWheel,
+ I = t.onEnable,
+ N = t.onDisable,
+ z = t.onClick,
+ k = t.scrollSpeed,
+ U = t.capture,
+ B = t.allowClicks,
+ V = t.lockAxis,
+ H = t.onLockAxis;
+ (this.target = r = _r(r) || Yi),
+ (this.vars = t),
+ c && (c = Gi.utils.toArray(c)),
+ (e = e || 1e-9),
+ (n = n || 0),
+ (h = h || 1),
+ (k = k || 1),
+ (i = i || "wheel,touch,pointer"),
+ (s = !1 !== s),
+ o || (o = parseFloat(qi.getComputedStyle(Zi).lineHeight) || 22);
+ var W,
+ G,
+ j,
+ q,
+ X,
+ Y,
+ Z,
+ K = this,
+ J = 0,
+ Q = 0,
+ $ = xr(r, gr),
+ tt = xr(r, vr),
+ et = $(),
+ nt = tt(),
+ it =
+ ~i.indexOf("touch") &&
+ !~i.indexOf("pointer") &&
+ "pointerdown" === er[0],
+ rt = hr(r),
+ ot = r.ownerDocument || Xi,
+ st = [0, 0, 0],
+ at = [0, 0, 0],
+ lt = 0,
+ ut = function () {
+ return (lt = lr());
+ },
+ ct = function (t, e) {
+ return (
+ ((K.event = t) && c && ~c.indexOf(t.target)) ||
+ (e && it && "touch" !== t.pointerType) ||
+ (P && P(t, e))
+ );
+ },
+ ht = function () {
+ var t = (K.deltaX = wr(st)),
+ n = (K.deltaY = wr(at)),
+ i = Math.abs(t) >= e,
+ r = Math.abs(n) >= e;
+ M && (i || r) && M(K, t, n, st, at),
+ i &&
+ (_ && K.deltaX > 0 && _(K),
+ x && K.deltaX < 0 && x(K),
+ w && w(K),
+ D && K.deltaX < 0 != J < 0 && D(K),
+ (J = K.deltaX),
+ (st[0] = st[1] = st[2] = 0)),
+ r &&
+ (b && K.deltaY > 0 && b(K),
+ y && K.deltaY < 0 && y(K),
+ S && S(K),
+ T && K.deltaY < 0 != Q < 0 && T(K),
+ (Q = K.deltaY),
+ (at[0] = at[1] = at[2] = 0)),
+ (q || j) && (A && A(K), j && (m(K), (j = !1)), (q = !1)),
+ Y && !(Y = !1) && H && H(K),
+ X && (F(K), (X = !1)),
+ (W = 0);
+ },
+ dt = function (t, e, n) {
+ (st[n] += t),
+ (at[n] += e),
+ K._vx.update(t),
+ K._vy.update(e),
+ s ? W || (W = requestAnimationFrame(ht)) : ht();
+ },
+ ft = function (t, e) {
+ V &&
+ !Z &&
+ ((K.axis = Z = Math.abs(t) > Math.abs(e) ? "x" : "y"),
+ (Y = !0)),
+ "y" !== Z && ((st[2] += t), K._vx.update(t, !0)),
+ "x" !== Z && ((at[2] += e), K._vy.update(e, !0)),
+ s ? W || (W = requestAnimationFrame(ht)) : ht();
+ },
+ pt = function (t) {
+ if (!ct(t, 1)) {
+ var e = (t = br(t, a)).clientX,
+ i = t.clientY,
+ r = e - K.x,
+ o = i - K.y,
+ s = K.isDragging;
+ (K.x = e),
+ (K.y = i),
+ (s ||
+ Math.abs(K.startX - e) >= n ||
+ Math.abs(K.startY - i) >= n) &&
+ (m && (j = !0),
+ s || (K.isDragging = !0),
+ ft(r, o),
+ s || (f && f(K)));
+ }
+ },
+ mt = (K.onPress = function (t) {
+ ct(t, 1) ||
+ ((K.axis = Z = null),
+ G.pause(),
+ (K.isPressed = !0),
+ (t = br(t)),
+ (J = Q = 0),
+ (K.startX = K.x = t.clientX),
+ (K.startY = K.y = t.clientY),
+ K._vx.reset(),
+ K._vy.reset(),
+ dr(L ? r : ot, er[1], pt, a, !0),
+ (K.deltaX = K.deltaY = 0),
+ g && g(K));
+ }),
+ gt = function (t) {
+ if (!ct(t, 1)) {
+ fr(L ? r : ot, er[1], pt, !0);
+ var e = !isNaN(K.y - K.startY),
+ n =
+ K.isDragging &&
+ (Math.abs(K.x - K.startX) > 3 ||
+ Math.abs(K.y - K.startY) > 3),
+ i = br(t);
+ !n &&
+ e &&
+ (K._vx.reset(),
+ K._vy.reset(),
+ a &&
+ B &&
+ Gi.delayedCall(0.08, function () {
+ if (lr() - lt > 300 && !t.defaultPrevented)
+ if (t.target.click) t.target.click();
+ else if (ot.createEvent) {
+ var e = ot.createEvent("MouseEvents");
+ e.initMouseEvent(
+ "click",
+ !0,
+ !0,
+ qi,
+ 1,
+ i.screenX,
+ i.screenY,
+ i.clientX,
+ i.clientY,
+ !1,
+ !1,
+ !1,
+ !1,
+ 0,
+ null
+ ),
+ t.target.dispatchEvent(e);
+ }
+ })),
+ (K.isDragging = K.isGesturing = K.isPressed = !1),
+ l && !L && G.restart(!0),
+ p && n && p(K),
+ v && v(K, n);
+ }
+ },
+ vt = function (t) {
+ return (
+ t.touches &&
+ t.touches.length > 1 &&
+ (K.isGesturing = !0) &&
+ R(t, K.isDragging)
+ );
+ },
+ _t = function () {
+ return (K.isGesturing = !1) || O(K);
+ },
+ xt = function (t) {
+ if (!ct(t)) {
+ var e = $(),
+ n = tt();
+ dt((e - et) * k, (n - nt) * k, 1),
+ (et = e),
+ (nt = n),
+ l && G.restart(!0);
+ }
+ },
+ yt = function (t) {
+ if (!ct(t)) {
+ (t = br(t, a)), F && (X = !0);
+ var e =
+ (1 === t.deltaMode
+ ? o
+ : 2 === t.deltaMode
+ ? qi.innerHeight
+ : 1) * h;
+ dt(t.deltaX * e, t.deltaY * e, 0), l && !L && G.restart(!0);
+ }
+ },
+ bt = function (t) {
+ if (!ct(t)) {
+ var e = t.clientX,
+ n = t.clientY,
+ i = e - K.x,
+ r = n - K.y;
+ (K.x = e), (K.y = n), (q = !0), (i || r) && ft(i, r);
+ }
+ },
+ wt = function (t) {
+ (K.event = t), E(K);
+ },
+ St = function (t) {
+ (K.event = t), C(K);
+ },
+ Mt = function (t) {
+ return ct(t) || (br(t, a) && z(K));
+ };
+ (G = K._dc =
+ Gi.delayedCall(u || 0.25, function () {
+ K._vx.reset(), K._vy.reset(), G.pause(), l && l(K);
+ }).pause()),
+ (K.deltaX = K.deltaY = 0),
+ (K._vx = yr(0, 50, !0)),
+ (K._vy = yr(0, 50, !0)),
+ (K.scrollX = $),
+ (K.scrollY = tt),
+ (K.isDragging = K.isGesturing = K.isPressed = !1),
+ nr(this),
+ (K.enable = function (t) {
+ return (
+ K.isEnabled ||
+ (dr(rt ? ot : r, "scroll", pr),
+ i.indexOf("scroll") >= 0 &&
+ dr(rt ? ot : r, "scroll", xt, a, U),
+ i.indexOf("wheel") >= 0 && dr(r, "wheel", yt, a, U),
+ ((i.indexOf("touch") >= 0 && Ki) ||
+ i.indexOf("pointer") >= 0) &&
+ (dr(r, er[0], mt, a, U),
+ dr(ot, er[2], gt),
+ dr(ot, er[3], gt),
+ B && dr(r, "click", ut, !1, !0),
+ z && dr(r, "click", Mt),
+ R && dr(ot, "gesturestart", vt),
+ O && dr(ot, "gestureend", _t),
+ E && dr(r, Ji + "enter", wt),
+ C && dr(r, Ji + "leave", St),
+ A && dr(r, Ji + "move", bt)),
+ (K.isEnabled = !0),
+ t && t.type && mt(t),
+ I && I(K)),
+ K
+ );
+ }),
+ (K.disable = function () {
+ K.isEnabled &&
+ (or.filter(function (t) {
+ return t !== K && hr(t.target);
+ }).length || fr(rt ? ot : r, "scroll", pr),
+ K.isPressed &&
+ (K._vx.reset(), K._vy.reset(), fr(L ? r : ot, er[1], pt, !0)),
+ fr(rt ? ot : r, "scroll", xt, U),
+ fr(r, "wheel", yt, U),
+ fr(r, er[0], mt, U),
+ fr(ot, er[2], gt),
+ fr(ot, er[3], gt),
+ fr(r, "click", ut, !0),
+ fr(r, "click", Mt),
+ fr(ot, "gesturestart", vt),
+ fr(ot, "gestureend", _t),
+ fr(r, Ji + "enter", wt),
+ fr(r, Ji + "leave", St),
+ fr(r, Ji + "move", bt),
+ (K.isEnabled = K.isPressed = K.isDragging = !1),
+ N && N(K));
+ }),
+ (K.kill = K.revert =
+ function () {
+ K.disable();
+ var t = or.indexOf(K);
+ t >= 0 && or.splice(t, 1), tr === K && (tr = 0);
+ }),
+ or.push(K),
+ L && hr(r) && (tr = K),
+ K.enable(d);
+ }),
+ (e = t),
+ (n = [
+ {
+ key: "velocityX",
+ get: function () {
+ return this._vx.getVelocity();
+ },
+ },
+ {
+ key: "velocityY",
+ get: function () {
+ return this._vy.getVelocity();
+ },
+ },
+ ]) && Wi(e.prototype, n),
+ i && Wi(e, i),
+ t
+ );
+ })();
+ (Dr.version = "3.11.4"),
+ (Dr.create = function (t) {
+ return new Dr(t);
+ }),
+ (Dr.register = Mr),
+ (Dr.getAll = function () {
+ return or.slice();
+ }),
+ (Dr.getById = function (t) {
+ return or.filter(function (e) {
+ return e.vars.id === t;
+ })[0];
+ }),
+ ir() && Gi.registerPlugin(Dr);
+ /*!
+ * ScrollTrigger 3.11.4
+ * https://greensock.com
+ *
+ * @license Copyright 2008-2022, GreenSock. All rights reserved.
+ * Subject to the terms at https://greensock.com/standard-license or for
+ * Club GreenSock members, the agreement issued with that membership.
+ * @author: Jack Doyle, jack@greensock.com
+ */
+ var Tr,
+ Er,
+ Cr,
+ Ar,
+ Pr,
+ Lr,
+ Rr,
+ Or,
+ Fr,
+ Ir,
+ Nr,
+ zr,
+ kr,
+ Ur,
+ Br,
+ Vr,
+ Hr,
+ Wr,
+ Gr,
+ jr,
+ qr,
+ Xr,
+ Yr,
+ Zr,
+ Kr,
+ Jr,
+ Qr,
+ $r,
+ to,
+ eo,
+ no,
+ io,
+ ro,
+ oo,
+ so = 1,
+ ao = Date.now,
+ lo = ao(),
+ uo = 0,
+ co = 0,
+ ho = function () {
+ return (Ur = 1);
+ },
+ fo = function () {
+ return (Ur = 0);
+ },
+ po = function (t) {
+ return t;
+ },
+ mo = function (t) {
+ return Math.round(1e5 * t) / 1e5 || 0;
+ },
+ go = function () {
+ return "undefined" != typeof window;
+ },
+ vo = function () {
+ return Tr || (go() && (Tr = window.gsap) && Tr.registerPlugin && Tr);
+ },
+ _o = function (t) {
+ return !!~Rr.indexOf(t);
+ },
+ xo = function (t) {
+ return (
+ cr(t, "getBoundingClientRect") ||
+ (_o(t)
+ ? function () {
+ return (
+ (_s.width = Cr.innerWidth), (_s.height = Cr.innerHeight), _s
+ );
+ }
+ : function () {
+ return Oo(t);
+ })
+ );
+ },
+ yo = function (t, e) {
+ var n = e.s,
+ i = e.d2,
+ r = e.d,
+ o = e.a;
+ return (n = "scroll" + i) && (o = cr(t, n))
+ ? o() - xo(t)()[r]
+ : _o(t)
+ ? (Pr[n] || Lr[n]) -
+ (Cr["inner" + i] || Pr["client" + i] || Lr["client" + i])
+ : t[n] - t["offset" + i];
+ },
+ bo = function (t, e) {
+ for (var n = 0; n < Gr.length; n += 3)
+ (!e || ~e.indexOf(Gr[n + 1])) && t(Gr[n], Gr[n + 1], Gr[n + 2]);
+ },
+ wo = function (t) {
+ return "string" == typeof t;
+ },
+ So = function (t) {
+ return "function" == typeof t;
+ },
+ Mo = function (t) {
+ return "number" == typeof t;
+ },
+ Do = function (t) {
+ return "object" == typeof t;
+ },
+ To = function (t, e, n) {
+ return t && t.progress(e ? 0 : 1) && n && t.pause();
+ },
+ Eo = function (t, e) {
+ if (t.enabled) {
+ var n = e(t);
+ n && n.totalTime && (t.callbackAnimation = n);
+ }
+ },
+ Co = Math.abs,
+ Ao = "padding",
+ Po = "px",
+ Lo = function (t) {
+ return Cr.getComputedStyle(t);
+ },
+ Ro = function (t, e) {
+ for (var n in e) n in t || (t[n] = e[n]);
+ return t;
+ },
+ Oo = function (t, e) {
+ var n =
+ e &&
+ "matrix(1, 0, 0, 1, 0, 0)" !== Lo(t)[Br] &&
+ Tr.to(t, {
+ x: 0,
+ y: 0,
+ xPercent: 0,
+ yPercent: 0,
+ rotation: 0,
+ rotationX: 0,
+ rotationY: 0,
+ scale: 1,
+ skewX: 0,
+ skewY: 0,
+ }).progress(1),
+ i = t.getBoundingClientRect();
+ return n && n.progress(0).kill(), i;
+ },
+ Fo = function (t, e) {
+ var n = e.d2;
+ return t["offset" + n] || t["client" + n] || 0;
+ },
+ Io = function (t) {
+ var e,
+ n = [],
+ i = t.labels,
+ r = t.duration();
+ for (e in i) n.push(i[e] / r);
+ return n;
+ },
+ No = function (t) {
+ var e = Tr.utils.snap(t),
+ n =
+ Array.isArray(t) &&
+ t.slice(0).sort(function (t, e) {
+ return t - e;
+ });
+ return n
+ ? function (t, i, r) {
+ var o;
+ if ((void 0 === r && (r = 0.001), !i)) return e(t);
+ if (i > 0) {
+ for (t -= r, o = 0; o < n.length; o++)
+ if (n[o] >= t) return n[o];
+ return n[o - 1];
+ }
+ for (o = n.length, t += r; o--; ) if (n[o] <= t) return n[o];
+ return n[0];
+ }
+ : function (n, i, r) {
+ void 0 === r && (r = 0.001);
+ var o = e(n);
+ return !i || Math.abs(o - n) < r || o - n < 0 == i < 0
+ ? o
+ : e(i < 0 ? n - t : n + t);
+ };
+ },
+ zo = function (t, e, n, i) {
+ return n.split(",").forEach(function (n) {
+ return t(e, n, i);
+ });
+ },
+ ko = function (t, e, n, i, r) {
+ return t.addEventListener(e, n, { passive: !i, capture: !!r });
+ },
+ Uo = function (t, e, n, i) {
+ return t.removeEventListener(e, n, !!i);
+ },
+ Bo = function (t, e, n) {
+ return n && n.wheelHandler && t(e, "wheel", n);
+ },
+ Vo = {
+ startColor: "green",
+ endColor: "red",
+ indent: 0,
+ fontSize: "16px",
+ fontWeight: "normal",
+ },
+ Ho = { toggleActions: "play", anticipatePin: 0 },
+ Wo = { top: 0, left: 0, center: 0.5, bottom: 1, right: 1 },
+ Go = function (t, e) {
+ if (wo(t)) {
+ var n = t.indexOf("="),
+ i = ~n ? +(t.charAt(n - 1) + 1) * parseFloat(t.substr(n + 1)) : 0;
+ ~n &&
+ (t.indexOf("%") > n && (i *= e / 100), (t = t.substr(0, n - 1))),
+ (t =
+ i +
+ (t in Wo
+ ? Wo[t] * e
+ : ~t.indexOf("%")
+ ? (parseFloat(t) * e) / 100
+ : parseFloat(t) || 0));
+ }
+ return t;
+ },
+ jo = function (t, e, n, i, r, o, s, a) {
+ var l = r.startColor,
+ u = r.endColor,
+ c = r.fontSize,
+ h = r.indent,
+ d = r.fontWeight,
+ f = Ar.createElement("div"),
+ p = _o(n) || "fixed" === cr(n, "pinType"),
+ m = -1 !== t.indexOf("scroller"),
+ g = p ? Lr : n,
+ v = -1 !== t.indexOf("start"),
+ _ = v ? l : u,
+ x =
+ "border-color:" +
+ _ +
+ ";font-size:" +
+ c +
+ ";color:" +
+ _ +
+ ";font-weight:" +
+ d +
+ ";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";
+ return (
+ (x += "position:" + ((m || a) && p ? "fixed;" : "absolute;")),
+ (m || a || !p) &&
+ (x +=
+ (i === vr ? "right" : "bottom") +
+ ":" +
+ (o + parseFloat(h)) +
+ "px;"),
+ s &&
+ (x +=
+ "box-sizing:border-box;text-align:left;width:" +
+ s.offsetWidth +
+ "px;"),
+ (f._isStart = v),
+ f.setAttribute(
+ "class",
+ "gsap-marker-" + t + (e ? " marker-" + e : "")
+ ),
+ (f.style.cssText = x),
+ (f.innerText = e || 0 === e ? t + "-" + e : t),
+ g.children[0] ? g.insertBefore(f, g.children[0]) : g.appendChild(f),
+ (f._offset = f["offset" + i.op.d2]),
+ qo(f, 0, i, v),
+ f
+ );
+ },
+ qo = function (t, e, n, i) {
+ var r = { display: "block" },
+ o = n[i ? "os2" : "p2"],
+ s = n[i ? "p2" : "os2"];
+ (t._isFlipped = i),
+ (r[n.a + "Percent"] = i ? -100 : 0),
+ (r[n.a] = i ? "1px" : 0),
+ (r["border" + o + "Width"] = 1),
+ (r["border" + s + "Width"] = 0),
+ (r[n.p] = e + "px"),
+ Tr.set(t, r);
+ },
+ Xo = [],
+ Yo = {},
+ Zo = function () {
+ return ao() - uo > 34 && (no || (no = requestAnimationFrame(hs)));
+ },
+ Ko = function () {
+ (!Yr || !Yr.isPressed || Yr.startX > Lr.clientWidth) &&
+ (sr.cache++,
+ Yr ? no || (no = requestAnimationFrame(hs)) : hs(),
+ uo || ns("scrollStart"),
+ (uo = ao()));
+ },
+ Jo = function () {
+ (Jr = Cr.innerWidth), (Kr = Cr.innerHeight);
+ },
+ Qo = function () {
+ sr.cache++,
+ !kr &&
+ !Xr &&
+ !Ar.fullscreenElement &&
+ !Ar.webkitFullscreenElement &&
+ (!Zr ||
+ Jr !== Cr.innerWidth ||
+ Math.abs(Cr.innerHeight - Kr) > 0.25 * Cr.innerHeight) &&
+ Or.restart(!0);
+ },
+ $o = {},
+ ts = [],
+ es = function t() {
+ return Uo(Ss, "scrollEnd", t) || ls(!0);
+ },
+ ns = function (t) {
+ return (
+ ($o[t] &&
+ $o[t].map(function (t) {
+ return t();
+ })) ||
+ ts
+ );
+ },
+ is = [],
+ rs = function (t) {
+ for (var e = 0; e < is.length; e += 5)
+ (!t || (is[e + 4] && is[e + 4].query === t)) &&
+ ((is[e].style.cssText = is[e + 1]),
+ is[e].getBBox && is[e].setAttribute("transform", is[e + 2] || ""),
+ (is[e + 3].uncache = 1));
+ },
+ os = function (t, e) {
+ var n;
+ for (Vr = 0; Vr < Xo.length; Vr++)
+ !(n = Xo[Vr]) ||
+ (e && n._ctx !== e) ||
+ (t ? n.kill(1) : n.revert(!0, !0));
+ e && rs(e), e || ns("revert");
+ },
+ ss = function (t, e) {
+ sr.cache++,
+ (e || !io) &&
+ sr.forEach(function (t) {
+ return So(t) && t.cacheID++ && (t.rec = 0);
+ }),
+ wo(t) && (Cr.history.scrollRestoration = to = t);
+ },
+ as = 0,
+ ls = function (t, e) {
+ if (!uo || t) {
+ (io = Ss.isRefreshing = !0),
+ sr.forEach(function (t) {
+ return So(t) && t.cacheID++ && (t.rec = t());
+ });
+ var n = ns("refreshInit");
+ jr && Ss.sort(),
+ e || os(),
+ sr.forEach(function (t) {
+ So(t) &&
+ (t.smooth && (t.target.style.scrollBehavior = "auto"), t(0));
+ }),
+ Xo.slice(0).forEach(function (t) {
+ return t.refresh();
+ }),
+ Xo.forEach(function (t, e) {
+ if (t._subPinOffset && t.pin) {
+ var n = t.vars.horizontal ? "offsetWidth" : "offsetHeight",
+ i = t.pin[n];
+ t.revert(!0, 1),
+ t.adjustPinSpacing(t.pin[n] - i),
+ t.revert(!1, 1);
+ }
+ }),
+ Xo.forEach(function (t) {
+ return (
+ "max" === t.vars.end &&
+ t.setPositions(
+ t.start,
+ Math.max(t.start + 1, yo(t.scroller, t._dir))
+ )
+ );
+ }),
+ n.forEach(function (t) {
+ return t && t.render && t.render(-1);
+ }),
+ sr.forEach(function (t) {
+ So(t) &&
+ (t.smooth &&
+ requestAnimationFrame(function () {
+ return (t.target.style.scrollBehavior = "smooth");
+ }),
+ t.rec && t(t.rec));
+ }),
+ ss(to, 1),
+ Or.pause(),
+ as++,
+ hs(2),
+ Xo.forEach(function (t) {
+ return So(t.vars.onRefresh) && t.vars.onRefresh(t);
+ }),
+ (io = Ss.isRefreshing = !1),
+ ns("refresh");
+ } else ko(Ss, "scrollEnd", es);
+ },
+ us = 0,
+ cs = 1,
+ hs = function (t) {
+ if (!io || 2 === t) {
+ (Ss.isUpdating = !0), oo && oo.update(0);
+ var e = Xo.length,
+ n = ao(),
+ i = n - lo >= 50,
+ r = e && Xo[0].scroll();
+ if (
+ ((cs = us > r ? -1 : 1),
+ (us = r),
+ i &&
+ (uo && !Ur && n - uo > 200 && ((uo = 0), ns("scrollEnd")),
+ (Nr = lo),
+ (lo = n)),
+ cs < 0)
+ ) {
+ for (Vr = e; Vr-- > 0; ) Xo[Vr] && Xo[Vr].update(0, i);
+ cs = 1;
+ } else for (Vr = 0; Vr < e; Vr++) Xo[Vr] && Xo[Vr].update(0, i);
+ Ss.isUpdating = !1;
+ }
+ no = 0;
+ },
+ ds = [
+ "left",
+ "top",
+ "bottom",
+ "right",
+ "marginBottom",
+ "marginRight",
+ "marginTop",
+ "marginLeft",
+ "display",
+ "flexShrink",
+ "float",
+ "zIndex",
+ "gridColumnStart",
+ "gridColumnEnd",
+ "gridRowStart",
+ "gridRowEnd",
+ "gridArea",
+ "justifySelf",
+ "alignSelf",
+ "placeSelf",
+ "order",
+ ],
+ fs = ds.concat([
+ "width",
+ "height",
+ "boxSizing",
+ "maxWidth",
+ "maxHeight",
+ "position",
+ "margin",
+ Ao,
+ Ao + "Top",
+ Ao + "Right",
+ Ao + "Bottom",
+ Ao + "Left",
+ ]),
+ ps = function (t, e, n, i) {
+ if (!t._gsap.swappedIn) {
+ for (var r, o = ds.length, s = e.style, a = t.style; o--; )
+ s[(r = ds[o])] = n[r];
+ (s.position = "absolute" === n.position ? "absolute" : "relative"),
+ "inline" === n.display && (s.display = "inline-block"),
+ (a.bottom = a.right = "auto"),
+ (s.flexBasis = n.flexBasis || "auto"),
+ (s.overflow = "visible"),
+ (s.boxSizing = "border-box"),
+ (s.width = Fo(t, gr) + Po),
+ (s.height = Fo(t, vr) + Po),
+ (s[Ao] = a.margin = a.top = a.left = "0"),
+ gs(i),
+ (a.width = a.maxWidth = n.width),
+ (a.height = a.maxHeight = n.height),
+ (a[Ao] = n[Ao]),
+ t.parentNode !== e &&
+ (t.parentNode.insertBefore(e, t), e.appendChild(t)),
+ (t._gsap.swappedIn = !0);
+ }
+ },
+ ms = /([A-Z])/g,
+ gs = function (t) {
+ if (t) {
+ var e,
+ n,
+ i = t.t.style,
+ r = t.length,
+ o = 0;
+ for ((t.t._gsap || Tr.core.getCache(t.t)).uncache = 1; o < r; o += 2)
+ (n = t[o + 1]),
+ (e = t[o]),
+ n
+ ? (i[e] = n)
+ : i[e] && i.removeProperty(e.replace(ms, "-$1").toLowerCase());
+ }
+ },
+ vs = function (t) {
+ for (var e = fs.length, n = t.style, i = [], r = 0; r < e; r++)
+ i.push(fs[r], n[fs[r]]);
+ return (i.t = t), i;
+ },
+ _s = { left: 0, top: 0 },
+ xs = function (t, e, n, i, r, o, s, a, l, u, c, h, d) {
+ So(t) && (t = t(a)),
+ wo(t) &&
+ "max" === t.substr(0, 3) &&
+ (t = h + ("=" === t.charAt(4) ? Go("0" + t.substr(3), n) : 0));
+ var f,
+ p,
+ m,
+ g = d ? d.time() : 0;
+ if ((d && d.seek(0), Mo(t))) s && qo(s, n, i, !0);
+ else {
+ So(e) && (e = e(a));
+ var v,
+ _,
+ x,
+ y,
+ b = (t || "0").split(" ");
+ (m = _r(e) || Lr),
+ ((v = Oo(m) || {}) && (v.left || v.top)) ||
+ "none" !== Lo(m).display ||
+ ((y = m.style.display),
+ (m.style.display = "block"),
+ (v = Oo(m)),
+ y ? (m.style.display = y) : m.style.removeProperty("display")),
+ (_ = Go(b[0], v[i.d])),
+ (x = Go(b[1] || "0", n)),
+ (t = v[i.p] - l[i.p] - u + _ + r - x),
+ s && qo(s, x, i, n - x < 20 || (s._isStart && x > 20)),
+ (n -= n - x);
+ }
+ if (o) {
+ var w = t + n,
+ S = o._isStart;
+ (f = "scroll" + i.d2),
+ qo(
+ o,
+ w,
+ i,
+ (S && w > 20) ||
+ (!S && (c ? Math.max(Lr[f], Pr[f]) : o.parentNode[f]) <= w + 1)
+ ),
+ c &&
+ ((l = Oo(s)),
+ c && (o.style[i.op.p] = l[i.op.p] - i.op.m - o._offset + Po));
+ }
+ return (
+ d &&
+ m &&
+ ((f = Oo(m)),
+ d.seek(h),
+ (p = Oo(m)),
+ (d._caScrollDist = f[i.p] - p[i.p]),
+ (t = (t / d._caScrollDist) * h)),
+ d && d.seek(g),
+ d ? t : Math.round(t)
+ );
+ },
+ ys = /(webkit|moz|length|cssText|inset)/i,
+ bs = function (t, e, n, i) {
+ if (t.parentNode !== e) {
+ var r,
+ o,
+ s = t.style;
+ if (e === Lr) {
+ for (r in ((t._stOrig = s.cssText), (o = Lo(t))))
+ +r ||
+ ys.test(r) ||
+ !o[r] ||
+ "string" != typeof s[r] ||
+ "0" === r ||
+ (s[r] = o[r]);
+ (s.top = n), (s.left = i);
+ } else s.cssText = t._stOrig;
+ (Tr.core.getCache(t).uncache = 1), e.appendChild(t);
+ }
+ },
+ ws = function (t, e) {
+ var n,
+ i,
+ r = xr(t, e),
+ o = "_scroll" + e.p2,
+ s = function e(s, a, l, u, c) {
+ var h = e.tween,
+ d = a.onComplete,
+ f = {};
+ return (
+ (l = l || r()),
+ (c = (u && c) || 0),
+ (u = u || s - l),
+ h && h.kill(),
+ (n = Math.round(l)),
+ (a[o] = s),
+ (a.modifiers = f),
+ (f[o] = function (t) {
+ return (
+ (t = Math.round(r())) !== n &&
+ t !== i &&
+ Math.abs(t - n) > 3 &&
+ Math.abs(t - i) > 3
+ ? (h.kill(), (e.tween = 0))
+ : (t = l + u * h.ratio + c * h.ratio * h.ratio),
+ (i = n),
+ (n = Math.round(t))
+ );
+ }),
+ (a.onUpdate = function () {
+ sr.cache++, hs();
+ }),
+ (a.onComplete = function () {
+ (e.tween = 0), d && d.call(h);
+ }),
+ (h = e.tween = Tr.to(t, a))
+ );
+ };
+ return (
+ (t[o] = r),
+ (r.wheelHandler = function () {
+ return s.tween && s.tween.kill() && (s.tween = 0);
+ }),
+ ko(t, "wheel", r.wheelHandler),
+ s
+ );
+ },
+ Ss = (function () {
+ function t(e, n) {
+ Er ||
+ t.register(Tr) ||
+ console.warn("Please gsap.registerPlugin(ScrollTrigger)"),
+ this.init(e, n);
+ }
+ return (
+ (t.prototype.init = function (e, n) {
+ if (
+ ((this.progress = this.start = 0),
+ this.vars && this.kill(!0, !0),
+ co)
+ ) {
+ var i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ u,
+ c,
+ h,
+ d,
+ f,
+ p,
+ m,
+ g,
+ v,
+ _,
+ x,
+ y,
+ b,
+ w,
+ S,
+ M,
+ D,
+ T,
+ E,
+ C,
+ A,
+ P,
+ L,
+ R,
+ O,
+ F,
+ I,
+ N,
+ z,
+ k,
+ U,
+ B,
+ V,
+ H,
+ W,
+ G,
+ j = (e = Ro(
+ wo(e) || Mo(e) || e.nodeType ? { trigger: e } : e,
+ Ho
+ )),
+ q = j.onUpdate,
+ X = j.toggleClass,
+ Y = j.id,
+ Z = j.onToggle,
+ K = j.onRefresh,
+ J = j.scrub,
+ Q = j.trigger,
+ $ = j.pin,
+ tt = j.pinSpacing,
+ et = j.invalidateOnRefresh,
+ nt = j.anticipatePin,
+ it = j.onScrubComplete,
+ rt = j.onSnapComplete,
+ ot = j.once,
+ st = j.snap,
+ at = j.pinReparent,
+ lt = j.pinSpacer,
+ ut = j.containerAnimation,
+ ct = j.fastScrollEnd,
+ ht = j.preventOverlaps,
+ dt =
+ e.horizontal || (e.containerAnimation && !1 !== e.horizontal)
+ ? gr
+ : vr,
+ ft = !J && 0 !== J,
+ pt = _r(e.scroller || Cr),
+ mt = Tr.core.getCache(pt),
+ gt = _o(pt),
+ vt =
+ "fixed" ===
+ ("pinType" in e
+ ? e.pinType
+ : cr(pt, "pinType") || (gt && "fixed")),
+ _t = [e.onEnter, e.onLeave, e.onEnterBack, e.onLeaveBack],
+ xt = ft && e.toggleActions.split(" "),
+ yt = "markers" in e ? e.markers : Ho.markers,
+ bt = gt
+ ? 0
+ : parseFloat(Lo(pt)["border" + dt.p2 + "Width"]) || 0,
+ wt = this,
+ St =
+ e.onRefreshInit &&
+ function () {
+ return e.onRefreshInit(wt);
+ },
+ Mt = (function (t, e, n) {
+ var i = n.d,
+ r = n.d2,
+ o = n.a;
+ return (o = cr(t, "getBoundingClientRect"))
+ ? function () {
+ return o()[i];
+ }
+ : function () {
+ return (e ? Cr["inner" + r] : t["client" + r]) || 0;
+ };
+ })(pt, gt, dt),
+ Dt = (function (t, e) {
+ return !e || ~ar.indexOf(t)
+ ? xo(t)
+ : function () {
+ return _s;
+ };
+ })(pt, gt),
+ Tt = 0,
+ Et = 0,
+ Ct = xr(pt, dt);
+ if (
+ ($r(wt),
+ (wt._dir = dt),
+ (nt *= 45),
+ (wt.scroller = pt),
+ (wt.scroll = ut ? ut.time.bind(ut) : Ct),
+ (s = Ct()),
+ (wt.vars = e),
+ (n = n || e.animation),
+ "refreshPriority" in e &&
+ ((jr = 1), -9999 === e.refreshPriority && (oo = wt)),
+ (mt.tweenScroll = mt.tweenScroll || {
+ top: ws(pt, vr),
+ left: ws(pt, gr),
+ }),
+ (wt.tweenTo = i = mt.tweenScroll[dt.p]),
+ (wt.scrubDuration = function (t) {
+ (F = Mo(t) && t)
+ ? O
+ ? O.duration(t)
+ : (O = Tr.to(n, {
+ ease: "expo",
+ totalProgress: "+=0.001",
+ duration: F,
+ paused: !0,
+ onComplete: function () {
+ return it && it(wt);
+ },
+ }))
+ : (O && O.progress(1).kill(), (O = 0));
+ }),
+ n &&
+ ((n.vars.lazy = !1),
+ n._initted ||
+ (!1 !== n.vars.immediateRender &&
+ !1 !== e.immediateRender &&
+ n.duration() &&
+ n.render(0, !0, !0)),
+ (wt.animation = n.pause()),
+ (n.scrollTrigger = wt),
+ wt.scrubDuration(J),
+ (L = 0),
+ Y || (Y = n.vars.id)),
+ Xo.push(wt),
+ st &&
+ ((Do(st) && !st.push) || (st = { snapTo: st }),
+ "scrollBehavior" in Lr.style &&
+ Tr.set(gt ? [Lr, Pr] : pt, { scrollBehavior: "auto" }),
+ sr.forEach(function (t) {
+ return (
+ So(t) &&
+ t.target === (gt ? Ar.scrollingElement || Pr : pt) &&
+ (t.smooth = !1)
+ );
+ }),
+ (o = So(st.snapTo)
+ ? st.snapTo
+ : "labels" === st.snapTo
+ ? (function (t) {
+ return function (e) {
+ return Tr.utils.snap(Io(t), e);
+ };
+ })(n)
+ : "labelsDirectional" === st.snapTo
+ ? ((H = n),
+ function (t, e) {
+ return No(Io(H))(t, e.direction);
+ })
+ : !1 !== st.directional
+ ? function (t, e) {
+ return No(st.snapTo)(
+ t,
+ ao() - Et < 500 ? 0 : e.direction
+ );
+ }
+ : Tr.utils.snap(st.snapTo)),
+ (I = st.duration || { min: 0.1, max: 2 }),
+ (I = Do(I) ? Ir(I.min, I.max) : Ir(I, I)),
+ (N = Tr.delayedCall(st.delay || F / 2 || 0.1, function () {
+ var t = Ct(),
+ e = ao() - Et < 500,
+ r = i.tween;
+ if (
+ !(e || Math.abs(wt.getVelocity()) < 10) ||
+ r ||
+ Ur ||
+ Tt === t
+ )
+ wt.isActive && Tt !== t && N.restart(!0);
+ else {
+ var s = (t - l) / m,
+ a = n && !ft ? n.totalProgress() : s,
+ c = e ? 0 : ((a - R) / (ao() - Nr)) * 1e3 || 0,
+ h = Tr.utils.clamp(-s, 1 - s, (Co(c / 2) * c) / 0.185),
+ d = s + (!1 === st.inertia ? 0 : h),
+ f = Ir(0, 1, o(d, wt)),
+ p = Math.round(l + f * m),
+ g = st,
+ v = g.onStart,
+ _ = g.onInterrupt,
+ x = g.onComplete;
+ if (t <= u && t >= l && p !== t) {
+ if (r && !r._initted && r.data <= Co(p - t)) return;
+ !1 === st.inertia && (h = f - s),
+ i(
+ p,
+ {
+ duration: I(
+ Co(
+ (0.185 * Math.max(Co(d - a), Co(f - a))) /
+ c /
+ 0.05 || 0
+ )
+ ),
+ ease: st.ease || "power3",
+ data: Co(p - t),
+ onInterrupt: function () {
+ return N.restart(!0) && _ && _(wt);
+ },
+ onComplete: function () {
+ wt.update(),
+ (Tt = Ct()),
+ (L = R =
+ n && !ft ? n.totalProgress() : wt.progress),
+ rt && rt(wt),
+ x && x(wt);
+ },
+ },
+ t,
+ h * m,
+ p - t - h * m
+ ),
+ v && v(wt, i.tween);
+ }
+ }
+ }).pause())),
+ Y && (Yo[Y] = wt),
+ (V =
+ (Q = wt.trigger = _r(Q || $)) &&
+ Q._gsap &&
+ Q._gsap.stRevert) && (V = V(wt)),
+ ($ = !0 === $ ? Q : _r($)),
+ wo(X) && (X = { targets: Q, className: X }),
+ $ &&
+ (!1 === tt ||
+ "margin" === tt ||
+ (tt =
+ !(
+ !tt &&
+ $.parentNode &&
+ $.parentNode.style &&
+ "flex" === Lo($.parentNode).display
+ ) && Ao),
+ (wt.pin = $),
+ (r = Tr.core.getCache($)).spacer
+ ? (g = r.pinState)
+ : (lt &&
+ ((lt = _r(lt)) &&
+ !lt.nodeType &&
+ (lt = lt.current || lt.nativeElement),
+ (r.spacerIsNative = !!lt),
+ lt && (r.spacerState = vs(lt))),
+ (r.spacer = x = lt || Ar.createElement("div")),
+ x.classList.add("pin-spacer"),
+ Y && x.classList.add("pin-spacer-" + Y),
+ (r.pinState = g = vs($))),
+ !1 !== e.force3D && Tr.set($, { force3D: !0 }),
+ (wt.spacer = x = r.spacer),
+ (P = Lo($)),
+ (D = P[tt + dt.os2]),
+ (b = Tr.getProperty($)),
+ (w = Tr.quickSetter($, dt.a, Po)),
+ ps($, x, P),
+ (_ = vs($))),
+ yt)
+ ) {
+ (p = Do(yt) ? Ro(yt, Vo) : Vo),
+ (d = jo("scroller-start", Y, pt, dt, p, 0)),
+ (f = jo("scroller-end", Y, pt, dt, p, 0, d)),
+ (y = d["offset" + dt.op.d2]);
+ var At = _r(cr(pt, "content") || pt);
+ (c = this.markerStart = jo("start", Y, At, dt, p, y, 0, ut)),
+ (h = this.markerEnd = jo("end", Y, At, dt, p, y, 0, ut)),
+ ut && (B = Tr.quickSetter([c, h], dt.a, Po)),
+ vt ||
+ (ar.length && !0 === cr(pt, "fixedMarkers")) ||
+ ((G = Lo((W = gt ? Lr : pt)).position),
+ (W.style.position =
+ "absolute" === G || "fixed" === G ? G : "relative"),
+ Tr.set([d, f], { force3D: !0 }),
+ (E = Tr.quickSetter(d, dt.a, Po)),
+ (A = Tr.quickSetter(f, dt.a, Po)));
+ }
+ if (ut) {
+ var Pt = ut.vars.onUpdate,
+ Lt = ut.vars.onUpdateParams;
+ ut.eventCallback("onUpdate", function () {
+ wt.update(0, 0, 1), Pt && Pt.apply(Lt || []);
+ });
+ }
+ (wt.previous = function () {
+ return Xo[Xo.indexOf(wt) - 1];
+ }),
+ (wt.next = function () {
+ return Xo[Xo.indexOf(wt) + 1];
+ }),
+ (wt.revert = function (t, e) {
+ if (!e) return wt.kill(!0);
+ var i = !1 !== t || !wt.enabled,
+ r = kr;
+ i !== wt.isReverted &&
+ (i &&
+ ((k = Math.max(Ct(), wt.scroll.rec || 0)),
+ (z = wt.progress),
+ (U = n && n.progress())),
+ c &&
+ [c, h, d, f].forEach(function (t) {
+ return (t.style.display = i ? "none" : "block");
+ }),
+ i && ((kr = 1), wt.update(i)),
+ !$ ||
+ (at && wt.isActive) ||
+ (i
+ ? (function (t, e, n) {
+ gs(n);
+ var i = t._gsap;
+ if (i.spacerIsNative) gs(i.spacerState);
+ else if (t._gsap.swappedIn) {
+ var r = e.parentNode;
+ r && (r.insertBefore(t, e), r.removeChild(e));
+ }
+ t._gsap.swappedIn = !1;
+ })($, x, g)
+ : ps($, x, Lo($), T)),
+ i || wt.update(i),
+ (kr = r),
+ (wt.isReverted = i));
+ }),
+ (wt.refresh = function (r, o) {
+ if ((!kr && wt.enabled) || o)
+ if ($ && r && uo) ko(t, "scrollEnd", es);
+ else {
+ !io && St && St(wt),
+ (kr = 1),
+ (Et = ao()),
+ i.tween && (i.tween.kill(), (i.tween = 0)),
+ O && O.pause(),
+ et && n && n.revert({ kill: !1 }).invalidate(),
+ wt.isReverted || wt.revert(!0, !0),
+ (wt._subPinOffset = !1);
+ for (
+ var p,
+ y,
+ w,
+ D,
+ E,
+ A,
+ P,
+ L,
+ R,
+ F,
+ I,
+ B = Mt(),
+ V = Dt(),
+ H = ut ? ut.duration() : yo(pt, dt),
+ W = 0,
+ G = 0,
+ j = e.end,
+ q = e.endTrigger || Q,
+ X =
+ e.start ||
+ (0 !== e.start && Q ? ($ ? "0 0" : "0 100%") : 0),
+ Y = (wt.pinnedContainer =
+ e.pinnedContainer && _r(e.pinnedContainer)),
+ Z = (Q && Math.max(0, Xo.indexOf(wt))) || 0,
+ J = Z;
+ J--;
+
+ )
+ (A = Xo[J]).end || A.refresh(0, 1) || (kr = 1),
+ !(P = A.pin) ||
+ (P !== Q && P !== $) ||
+ A.isReverted ||
+ (F || (F = []), F.unshift(A), A.revert(!0, !0)),
+ A !== Xo[J] && (Z--, J--);
+ for (
+ So(X) && (X = X(wt)),
+ l =
+ xs(X, Q, B, dt, Ct(), c, d, wt, V, bt, vt, H, ut) ||
+ ($ ? -0.001 : 0),
+ So(j) && (j = j(wt)),
+ wo(j) &&
+ !j.indexOf("+=") &&
+ (~j.indexOf(" ")
+ ? (j = (wo(X) ? X.split(" ")[0] : "") + j)
+ : ((W = Go(j.substr(2), B)),
+ (j = wo(X) ? X : l + W),
+ (q = Q))),
+ u =
+ Math.max(
+ l,
+ xs(
+ j || (q ? "100% 0" : H),
+ q,
+ B,
+ dt,
+ Ct() + W,
+ h,
+ f,
+ wt,
+ V,
+ bt,
+ vt,
+ H,
+ ut
+ )
+ ) || -0.001,
+ m = u - l || ((l -= 0.01) && 0.001),
+ W = 0,
+ J = Z;
+ J--;
+
+ )
+ (P = (A = Xo[J]).pin) &&
+ A.start - A._pinPush <= l &&
+ !ut &&
+ A.end > 0 &&
+ ((p = A.end - A.start),
+ ((P === Q && A.start - A._pinPush < l) || P === Y) &&
+ !Mo(X) &&
+ (W += p * (1 - A.progress)),
+ P === $ && (G += p));
+ if (
+ ((l += W),
+ (u += W),
+ (wt._pinPush = G),
+ c &&
+ W &&
+ (((p = {})[dt.a] = "+=" + W),
+ Y && (p[dt.p] = "-=" + Ct()),
+ Tr.set([c, h], p)),
+ $)
+ )
+ (p = Lo($)),
+ (D = dt === vr),
+ (w = Ct()),
+ (S = parseFloat(b(dt.a)) + G),
+ !H &&
+ u > 1 &&
+ ((I = {
+ style: (I = (gt ? Ar.scrollingElement || Pr : pt)
+ .style),
+ value: I["overflow" + dt.a.toUpperCase()],
+ })["overflow" + dt.a.toUpperCase()] = "scroll"),
+ ps($, x, p),
+ (_ = vs($)),
+ (y = Oo($, !0)),
+ (L = vt && xr(pt, D ? gr : vr)()),
+ tt &&
+ (((T = [tt + dt.os2, m + G + Po]).t = x),
+ (J = tt === Ao ? Fo($, dt) + m + G : 0) &&
+ T.push(dt.d, J + Po),
+ gs(T),
+ Y &&
+ Xo.forEach(function (t) {
+ t.pin === Y &&
+ !1 !== t.vars.pinSpacing &&
+ (t._subPinOffset = !0);
+ }),
+ vt && Ct(k)),
+ vt &&
+ (((E = {
+ top: y.top + (D ? w - l : L) + Po,
+ left: y.left + (D ? L : w - l) + Po,
+ boxSizing: "border-box",
+ position: "fixed",
+ }).width = E.maxWidth =
+ Math.ceil(y.width) + Po),
+ (E.height = E.maxHeight = Math.ceil(y.height) + Po),
+ (E.margin =
+ E.marginTop =
+ E.marginRight =
+ E.marginBottom =
+ E.marginLeft =
+ "0"),
+ (E[Ao] = p[Ao]),
+ (E[Ao + "Top"] = p[Ao + "Top"]),
+ (E[Ao + "Right"] = p[Ao + "Right"]),
+ (E[Ao + "Bottom"] = p[Ao + "Bottom"]),
+ (E[Ao + "Left"] = p[Ao + "Left"]),
+ (v = (function (t, e, n) {
+ for (
+ var i, r = [], o = t.length, s = n ? 8 : 0;
+ s < o;
+ s += 2
+ )
+ (i = t[s]), r.push(i, i in e ? e[i] : t[s + 1]);
+ return (r.t = t.t), r;
+ })(g, E, at)),
+ io && Ct(0)),
+ n
+ ? ((R = n._initted),
+ qr(1),
+ n.render(n.duration(), !0, !0),
+ (M = b(dt.a) - S + m + G),
+ (C = Math.abs(m - M) > 1),
+ vt && C && v.splice(v.length - 2, 2),
+ n.render(0, !0, !0),
+ R || n.invalidate(!0),
+ n.parent || n.totalTime(n.totalTime()),
+ qr(0))
+ : (M = m),
+ I &&
+ (I.value
+ ? (I.style["overflow" + dt.a.toUpperCase()] =
+ I.value)
+ : I.style.removeProperty("overflow-" + dt.a));
+ else if (Q && Ct() && !ut)
+ for (y = Q.parentNode; y && y !== Lr; )
+ y._pinOffset &&
+ ((l -= y._pinOffset), (u -= y._pinOffset)),
+ (y = y.parentNode);
+ F &&
+ F.forEach(function (t) {
+ return t.revert(!1, !0);
+ }),
+ (wt.start = l),
+ (wt.end = u),
+ (s = a = io ? k : Ct()),
+ ut || io || (s < k && Ct(k), (wt.scroll.rec = 0)),
+ wt.revert(!1, !0),
+ N &&
+ ((Tt = -1),
+ wt.isActive && Ct(l + m * z),
+ N.restart(!0)),
+ (kr = 0),
+ n &&
+ ft &&
+ (n._initted || U) &&
+ n.progress() !== U &&
+ n.progress(U, !0).render(n.time(), !0, !0),
+ (z !== wt.progress || ut) &&
+ (n && !ft && n.totalProgress(z, !0),
+ (wt.progress = (s - l) / m === z ? 0 : z)),
+ $ && tt && (x._pinOffset = Math.round(wt.progress * M)),
+ K && !io && K(wt);
+ }
+ }),
+ (wt.getVelocity = function () {
+ return ((Ct() - a) / (ao() - Nr)) * 1e3 || 0;
+ }),
+ (wt.endAnimation = function () {
+ To(wt.callbackAnimation),
+ n &&
+ (O
+ ? O.progress(1)
+ : n.paused()
+ ? ft || To(n, wt.direction < 0, 1)
+ : To(n, n.reversed()));
+ }),
+ (wt.labelToScroll = function (t) {
+ return (
+ (n &&
+ n.labels &&
+ (l || wt.refresh() || l) +
+ (n.labels[t] / n.duration()) * m) ||
+ 0
+ );
+ }),
+ (wt.getTrailing = function (t) {
+ var e = Xo.indexOf(wt),
+ n =
+ wt.direction > 0
+ ? Xo.slice(0, e).reverse()
+ : Xo.slice(e + 1);
+ return (
+ wo(t)
+ ? n.filter(function (e) {
+ return e.vars.preventOverlaps === t;
+ })
+ : n
+ ).filter(function (t) {
+ return wt.direction > 0 ? t.end <= l : t.start >= u;
+ });
+ }),
+ (wt.update = function (t, e, r) {
+ if (!ut || r || t) {
+ var o,
+ c,
+ h,
+ f,
+ p,
+ g,
+ y,
+ b = io ? k : wt.scroll(),
+ T = t ? 0 : (b - l) / m,
+ P = T < 0 ? 0 : T > 1 ? 1 : T || 0,
+ F = wt.progress;
+ if (
+ (e &&
+ ((a = s),
+ (s = ut ? Ct() : b),
+ st &&
+ ((R = L), (L = n && !ft ? n.totalProgress() : P))),
+ nt &&
+ !P &&
+ $ &&
+ !kr &&
+ !so &&
+ uo &&
+ l < b + ((b - a) / (ao() - Nr)) * nt &&
+ (P = 1e-4),
+ P !== F && wt.enabled)
+ ) {
+ if (
+ ((f =
+ (p =
+ (o = wt.isActive = !!P && P < 1) !==
+ (!!F && F < 1)) || !!P != !!F),
+ (wt.direction = P > F ? 1 : -1),
+ (wt.progress = P),
+ f &&
+ !kr &&
+ ((c = P && !F ? 0 : 1 === P ? 1 : 1 === F ? 2 : 3),
+ ft &&
+ ((h =
+ (!p && "none" !== xt[c + 1] && xt[c + 1]) ||
+ xt[c]),
+ (y =
+ n &&
+ ("complete" === h || "reset" === h || h in n)))),
+ ht &&
+ (p || y) &&
+ (y || J || !n) &&
+ (So(ht)
+ ? ht(wt)
+ : wt.getTrailing(ht).forEach(function (t) {
+ return t.endAnimation();
+ })),
+ ft ||
+ (!O || kr || so
+ ? n && n.totalProgress(P, !!kr)
+ : (O._dp._time - O._start !== O._time &&
+ O.render(O._dp._time - O._start),
+ O.resetTo
+ ? O.resetTo(
+ "totalProgress",
+ P,
+ n._tTime / n._tDur
+ )
+ : ((O.vars.totalProgress = P),
+ O.invalidate().restart()))),
+ $)
+ )
+ if ((t && tt && (x.style[tt + dt.os2] = D), vt)) {
+ if (f) {
+ if (
+ ((g =
+ !t &&
+ P > F &&
+ u + 1 > b &&
+ b + 1 >= yo(pt, dt)),
+ at)
+ )
+ if (t || (!o && !g)) bs($, x);
+ else {
+ var I = Oo($, !0),
+ z = b - l;
+ bs(
+ $,
+ Lr,
+ I.top + (dt === vr ? z : 0) + Po,
+ I.left + (dt === vr ? 0 : z) + Po
+ );
+ }
+ gs(o || g ? v : _),
+ (C && P < 1 && o) ||
+ w(S + (1 !== P || g ? 0 : M));
+ }
+ } else w(mo(S + M * P));
+ st && !i.tween && !kr && !so && N.restart(!0),
+ X &&
+ (p || (ot && P && (P < 1 || !eo))) &&
+ Fr(X.targets).forEach(function (t) {
+ return t.classList[o || ot ? "add" : "remove"](
+ X.className
+ );
+ }),
+ q && !ft && !t && q(wt),
+ f && !kr
+ ? (ft &&
+ (y &&
+ ("complete" === h
+ ? n.pause().totalProgress(1)
+ : "reset" === h
+ ? n.restart(!0).pause()
+ : "restart" === h
+ ? n.restart(!0)
+ : n[h]()),
+ q && q(wt)),
+ (!p && eo) ||
+ (Z && p && Eo(wt, Z),
+ _t[c] && Eo(wt, _t[c]),
+ ot && (1 === P ? wt.kill(!1, 1) : (_t[c] = 0)),
+ p ||
+ (_t[(c = 1 === P ? 1 : 3)] && Eo(wt, _t[c]))),
+ ct &&
+ !o &&
+ Math.abs(wt.getVelocity()) >
+ (Mo(ct) ? ct : 2500) &&
+ (To(wt.callbackAnimation),
+ O
+ ? O.progress(1)
+ : To(n, "reverse" === h ? 1 : !P, 1)))
+ : ft && q && !kr && q(wt);
+ }
+ if (A) {
+ var U = ut
+ ? (b / ut.duration()) * (ut._caScrollDist || 0)
+ : b;
+ E(U + (d._isFlipped ? 1 : 0)), A(U);
+ }
+ B && B((-b / ut.duration()) * (ut._caScrollDist || 0));
+ }
+ }),
+ (wt.enable = function (e, n) {
+ wt.enabled ||
+ ((wt.enabled = !0),
+ ko(pt, "resize", Qo),
+ ko(gt ? Ar : pt, "scroll", Ko),
+ St && ko(t, "refreshInit", St),
+ !1 !== e && ((wt.progress = z = 0), (s = a = Tt = Ct())),
+ !1 !== n && wt.refresh());
+ }),
+ (wt.getTween = function (t) {
+ return t && i ? i.tween : O;
+ }),
+ (wt.setPositions = function (t, e) {
+ $ &&
+ ((S += t - l),
+ (M += e - t - m),
+ tt === Ao && wt.adjustPinSpacing(e - t - m)),
+ (wt.start = l = t),
+ (wt.end = u = e),
+ (m = e - t),
+ wt.update();
+ }),
+ (wt.adjustPinSpacing = function (t) {
+ if (T) {
+ var e = T.indexOf(dt.d) + 1;
+ (T[e] = parseFloat(T[e]) + t + Po),
+ (T[1] = parseFloat(T[1]) + t + Po),
+ gs(T);
+ }
+ }),
+ (wt.disable = function (e, n) {
+ if (
+ wt.enabled &&
+ (!1 !== e && wt.revert(!0, !0),
+ (wt.enabled = wt.isActive = !1),
+ n || (O && O.pause()),
+ (k = 0),
+ r && (r.uncache = 1),
+ St && Uo(t, "refreshInit", St),
+ N &&
+ (N.pause(), i.tween && i.tween.kill() && (i.tween = 0)),
+ !gt)
+ ) {
+ for (var o = Xo.length; o--; )
+ if (Xo[o].scroller === pt && Xo[o] !== wt) return;
+ Uo(pt, "resize", Qo), Uo(pt, "scroll", Ko);
+ }
+ }),
+ (wt.kill = function (t, i) {
+ wt.disable(t, i), O && !i && O.kill(), Y && delete Yo[Y];
+ var o = Xo.indexOf(wt);
+ o >= 0 && Xo.splice(o, 1),
+ o === Vr && cs > 0 && Vr--,
+ (o = 0),
+ Xo.forEach(function (t) {
+ return t.scroller === wt.scroller && (o = 1);
+ }),
+ o || io || (wt.scroll.rec = 0),
+ n &&
+ ((n.scrollTrigger = null),
+ t && n.revert({ kill: !1 }),
+ i || n.kill()),
+ c &&
+ [c, h, d, f].forEach(function (t) {
+ return t.parentNode && t.parentNode.removeChild(t);
+ }),
+ oo === wt && (oo = 0),
+ $ &&
+ (r && (r.uncache = 1),
+ (o = 0),
+ Xo.forEach(function (t) {
+ return t.pin === $ && o++;
+ }),
+ o || (r.spacer = 0)),
+ e.onKill && e.onKill(wt);
+ }),
+ wt.enable(!1, !1),
+ V && V(wt),
+ n && n.add && !m
+ ? Tr.delayedCall(0.01, function () {
+ return l || u || wt.refresh();
+ }) &&
+ (m = 0.01) &&
+ (l = u = 0)
+ : wt.refresh(),
+ $ &&
+ (function () {
+ if (ro !== as) {
+ var t = (ro = as);
+ requestAnimationFrame(function () {
+ return t === as && ls(!0);
+ });
+ }
+ })();
+ } else this.update = this.refresh = this.kill = po;
+ }),
+ (t.register = function (e) {
+ return (
+ Er ||
+ ((Tr = e || vo()),
+ go() && window.document && t.enable(),
+ (Er = co)),
+ Er
+ );
+ }),
+ (t.defaults = function (t) {
+ if (t) for (var e in t) Ho[e] = t[e];
+ return Ho;
+ }),
+ (t.disable = function (t, e) {
+ (co = 0),
+ Xo.forEach(function (n) {
+ return n[e ? "kill" : "disable"](t);
+ }),
+ Uo(Cr, "wheel", Ko),
+ Uo(Ar, "scroll", Ko),
+ clearInterval(zr),
+ Uo(Ar, "touchcancel", po),
+ Uo(Lr, "touchstart", po),
+ zo(Uo, Ar, "pointerdown,touchstart,mousedown", ho),
+ zo(Uo, Ar, "pointerup,touchend,mouseup", fo),
+ Or.kill(),
+ bo(Uo);
+ for (var n = 0; n < sr.length; n += 3)
+ Bo(Uo, sr[n], sr[n + 1]), Bo(Uo, sr[n], sr[n + 2]);
+ }),
+ (t.enable = function () {
+ if (
+ ((Cr = window),
+ (Ar = document),
+ (Pr = Ar.documentElement),
+ (Lr = Ar.body),
+ Tr &&
+ ((Fr = Tr.utils.toArray),
+ (Ir = Tr.utils.clamp),
+ ($r = Tr.core.context || po),
+ (qr = Tr.core.suppressOverwrites || po),
+ (to = Cr.history.scrollRestoration || "auto"),
+ Tr.core.globals("ScrollTrigger", t),
+ Lr))
+ ) {
+ (co = 1),
+ Dr.register(Tr),
+ (t.isTouch = Dr.isTouch),
+ (Qr =
+ Dr.isTouch &&
+ /(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent)),
+ ko(Cr, "wheel", Ko),
+ (Rr = [Cr, Ar, Pr, Lr]),
+ Tr.matchMedia
+ ? ((t.matchMedia = function (t) {
+ var e,
+ n = Tr.matchMedia();
+ for (e in t) n.add(e, t[e]);
+ return n;
+ }),
+ Tr.addEventListener("matchMediaInit", function () {
+ return os();
+ }),
+ Tr.addEventListener("matchMediaRevert", function () {
+ return rs();
+ }),
+ Tr.addEventListener("matchMedia", function () {
+ ls(0, 1), ns("matchMedia");
+ }),
+ Tr.matchMedia("(orientation: portrait)", function () {
+ return Jo(), Jo;
+ }))
+ : console.warn("Requires GSAP 3.11.0 or later"),
+ Jo(),
+ ko(Ar, "scroll", Ko);
+ var e,
+ n,
+ i = Lr.style,
+ r = i.borderTopStyle,
+ o = Tr.core.Animation.prototype;
+ for (
+ o.revert ||
+ Object.defineProperty(o, "revert", {
+ value: function () {
+ return this.time(-0.01, !0);
+ },
+ }),
+ i.borderTopStyle = "solid",
+ e = Oo(Lr),
+ vr.m = Math.round(e.top + vr.sc()) || 0,
+ gr.m = Math.round(e.left + gr.sc()) || 0,
+ r
+ ? (i.borderTopStyle = r)
+ : i.removeProperty("border-top-style"),
+ zr = setInterval(Zo, 250),
+ Tr.delayedCall(0.5, function () {
+ return (so = 0);
+ }),
+ ko(Ar, "touchcancel", po),
+ ko(Lr, "touchstart", po),
+ zo(ko, Ar, "pointerdown,touchstart,mousedown", ho),
+ zo(ko, Ar, "pointerup,touchend,mouseup", fo),
+ Br = Tr.utils.checkPrefix("transform"),
+ fs.push(Br),
+ Er = ao(),
+ Or = Tr.delayedCall(0.2, ls).pause(),
+ Gr = [
+ Ar,
+ "visibilitychange",
+ function () {
+ var t = Cr.innerWidth,
+ e = Cr.innerHeight;
+ Ar.hidden
+ ? ((Hr = t), (Wr = e))
+ : (Hr === t && Wr === e) || Qo();
+ },
+ Ar,
+ "DOMContentLoaded",
+ ls,
+ Cr,
+ "load",
+ ls,
+ Cr,
+ "resize",
+ Qo,
+ ],
+ bo(ko),
+ Xo.forEach(function (t) {
+ return t.enable(0, 1);
+ }),
+ n = 0;
+ n < sr.length;
+ n += 3
+ )
+ Bo(Uo, sr[n], sr[n + 1]), Bo(Uo, sr[n], sr[n + 2]);
+ }
+ }),
+ (t.config = function (e) {
+ "limitCallbacks" in e && (eo = !!e.limitCallbacks);
+ var n = e.syncInterval;
+ (n && clearInterval(zr)) || ((zr = n) && setInterval(Zo, n)),
+ "ignoreMobileResize" in e &&
+ (Zr = 1 === t.isTouch && e.ignoreMobileResize),
+ "autoRefreshEvents" in e &&
+ (bo(Uo) || bo(ko, e.autoRefreshEvents || "none"),
+ (Xr = -1 === (e.autoRefreshEvents + "").indexOf("resize")));
+ }),
+ (t.scrollerProxy = function (t, e) {
+ var n = _r(t),
+ i = sr.indexOf(n),
+ r = _o(n);
+ ~i && sr.splice(i, r ? 6 : 2),
+ e && (r ? ar.unshift(Cr, e, Lr, e, Pr, e) : ar.unshift(n, e));
+ }),
+ (t.clearMatchMedia = function (t) {
+ Xo.forEach(function (e) {
+ return e._ctx && e._ctx.query === t && e._ctx.kill(!0, !0);
+ });
+ }),
+ (t.isInViewport = function (t, e, n) {
+ var i = (wo(t) ? _r(t) : t).getBoundingClientRect(),
+ r = i[n ? "width" : "height"] * e || 0;
+ return n
+ ? i.right - r > 0 && i.left + r < Cr.innerWidth
+ : i.bottom - r > 0 && i.top + r < Cr.innerHeight;
+ }),
+ (t.positionInViewport = function (t, e, n) {
+ wo(t) && (t = _r(t));
+ var i = t.getBoundingClientRect(),
+ r = i[n ? "width" : "height"],
+ o =
+ null == e
+ ? r / 2
+ : e in Wo
+ ? Wo[e] * r
+ : ~e.indexOf("%")
+ ? (parseFloat(e) * r) / 100
+ : parseFloat(e) || 0;
+ return n
+ ? (i.left + o) / Cr.innerWidth
+ : (i.top + o) / Cr.innerHeight;
+ }),
+ (t.killAll = function (t) {
+ if (
+ (Xo.slice(0).forEach(function (t) {
+ return "ScrollSmoother" !== t.vars.id && t.kill();
+ }),
+ !0 !== t)
+ ) {
+ var e = $o.killAll || [];
+ ($o = {}),
+ e.forEach(function (t) {
+ return t();
+ });
+ }
+ }),
+ t
+ );
+ })();
+ (Ss.version = "3.11.4"),
+ (Ss.saveStyles = function (t) {
+ return t
+ ? Fr(t).forEach(function (t) {
+ if (t && t.style) {
+ var e = is.indexOf(t);
+ e >= 0 && is.splice(e, 5),
+ is.push(
+ t,
+ t.style.cssText,
+ t.getBBox && t.getAttribute("transform"),
+ Tr.core.getCache(t),
+ $r()
+ );
+ }
+ })
+ : is;
+ }),
+ (Ss.revert = function (t, e) {
+ return os(!t, e);
+ }),
+ (Ss.create = function (t, e) {
+ return new Ss(t, e);
+ }),
+ (Ss.refresh = function (t) {
+ return t ? Qo() : (Er || Ss.register()) && ls(!0);
+ }),
+ (Ss.update = function (t) {
+ return ++sr.cache && hs(!0 === t ? 2 : 0);
+ }),
+ (Ss.clearScrollMemory = ss),
+ (Ss.maxScroll = function (t, e) {
+ return yo(t, e ? gr : vr);
+ }),
+ (Ss.getScrollFunc = function (t, e) {
+ return xr(_r(t), e ? gr : vr);
+ }),
+ (Ss.getById = function (t) {
+ return Yo[t];
+ }),
+ (Ss.getAll = function () {
+ return Xo.filter(function (t) {
+ return "ScrollSmoother" !== t.vars.id;
+ });
+ }),
+ (Ss.isScrolling = function () {
+ return !!uo;
+ }),
+ (Ss.snapDirectional = No),
+ (Ss.addEventListener = function (t, e) {
+ var n = $o[t] || ($o[t] = []);
+ ~n.indexOf(e) || n.push(e);
+ }),
+ (Ss.removeEventListener = function (t, e) {
+ var n = $o[t],
+ i = n && n.indexOf(e);
+ i >= 0 && n.splice(i, 1);
+ }),
+ (Ss.batch = function (t, e) {
+ var n,
+ i = [],
+ r = {},
+ o = e.interval || 0.016,
+ s = e.batchMax || 1e9,
+ a = function (t, e) {
+ var n = [],
+ i = [],
+ r = Tr.delayedCall(o, function () {
+ e(n, i), (n = []), (i = []);
+ }).pause();
+ return function (t) {
+ n.length || r.restart(!0),
+ n.push(t.trigger),
+ i.push(t),
+ s <= n.length && r.progress(1);
+ };
+ };
+ for (n in e)
+ r[n] =
+ "on" === n.substr(0, 2) && So(e[n]) && "onRefreshInit" !== n
+ ? a(0, e[n])
+ : e[n];
+ return (
+ So(s) &&
+ ((s = s()),
+ ko(Ss, "refresh", function () {
+ return (s = e.batchMax());
+ })),
+ Fr(t).forEach(function (t) {
+ var e = {};
+ for (n in r) e[n] = r[n];
+ (e.trigger = t), i.push(Ss.create(e));
+ }),
+ i
+ );
+ });
+ var Ms,
+ Ds = function (t, e, n, i) {
+ return (
+ e > i ? t(i) : e < 0 && t(0),
+ n > i ? (i - e) / (n - e) : n < 0 ? e / (e - n) : 1
+ );
+ },
+ Ts = function t(e, n) {
+ !0 === n
+ ? e.style.removeProperty("touch-action")
+ : (e.style.touchAction =
+ !0 === n
+ ? "auto"
+ : n
+ ? "pan-" + n + (Dr.isTouch ? " pinch-zoom" : "")
+ : "none"),
+ e === Pr && t(Lr, n);
+ },
+ Es = { auto: 1, scroll: 1 },
+ Cs = function (t) {
+ var e,
+ n = t.event,
+ i = t.target,
+ r = t.axis,
+ o = (n.changedTouches ? n.changedTouches[0] : n).target,
+ s = o._gsap || Tr.core.getCache(o),
+ a = ao();
+ if (!s._isScrollT || a - s._isScrollT > 2e3) {
+ for (
+ ;
+ o &&
+ o !== Lr &&
+ ((o.scrollHeight <= o.clientHeight &&
+ o.scrollWidth <= o.clientWidth) ||
+ (!Es[(e = Lo(o)).overflowY] && !Es[e.overflowX]));
+
+ )
+ o = o.parentNode;
+ (s._isScroll =
+ o &&
+ o !== i &&
+ !_o(o) &&
+ (Es[(e = Lo(o)).overflowY] || Es[e.overflowX])),
+ (s._isScrollT = a);
+ }
+ (s._isScroll || "x" === r) &&
+ (n.stopPropagation(), (n._gsapAllow = !0));
+ },
+ As = function (t, e, n, i) {
+ return Dr.create({
+ target: t,
+ capture: !0,
+ debounce: !1,
+ lockAxis: !0,
+ type: e,
+ onWheel: (i = i && Cs),
+ onPress: i,
+ onDrag: i,
+ onScroll: i,
+ onEnable: function () {
+ return n && ko(Ar, Dr.eventTypes[0], Ls, !1, !0);
+ },
+ onDisable: function () {
+ return Uo(Ar, Dr.eventTypes[0], Ls, !0);
+ },
+ });
+ },
+ Ps = /(input|label|select|textarea)/i,
+ Ls = function (t) {
+ var e = Ps.test(t.target.tagName);
+ (e || Ms) && ((t._gsapAllow = !0), (Ms = e));
+ },
+ Rs = function (t) {
+ Do(t) || (t = {}),
+ (t.preventDefault = t.isNormalizer = t.allowClicks = !0),
+ t.type || (t.type = "wheel,touch"),
+ (t.debounce = !!t.debounce),
+ (t.id = t.id || "normalizer");
+ var e,
+ n,
+ i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ u = t,
+ c = u.normalizeScrollX,
+ h = u.momentum,
+ d = u.allowNestedScroll,
+ f = _r(t.target) || Pr,
+ p = Tr.core.globals().ScrollSmoother,
+ m = p && p.get(),
+ g =
+ Qr &&
+ ((t.content && _r(t.content)) ||
+ (m && !1 !== t.content && !m.smooth() && m.content())),
+ v = xr(f, vr),
+ _ = xr(f, gr),
+ x = 1,
+ y =
+ (Dr.isTouch && Cr.visualViewport
+ ? Cr.visualViewport.scale * Cr.visualViewport.width
+ : Cr.outerWidth) / Cr.innerWidth,
+ b = 0,
+ w = So(h)
+ ? function () {
+ return h(e);
+ }
+ : function () {
+ return h || 2.8;
+ },
+ S = As(f, t.type, !0, d),
+ M = function () {
+ return (r = !1);
+ },
+ D = po,
+ T = po,
+ E = function () {
+ (n = yo(f, vr)),
+ (T = Ir(Qr ? 1 : 0, n)),
+ c && (D = Ir(0, yo(f, gr))),
+ (i = as);
+ },
+ C = function () {
+ (g._gsap.y = mo(parseFloat(g._gsap.y) + v.offset) + "px"),
+ (g.style.transform =
+ "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, " +
+ parseFloat(g._gsap.y) +
+ ", 0, 1)"),
+ (v.offset = v.cacheID = 0);
+ },
+ A = function () {
+ E(),
+ o.isActive() &&
+ o.vars.scrollY > n &&
+ (v() > n ? o.progress(1) && v(n) : o.resetTo("scrollY", n));
+ };
+ return (
+ g && Tr.set(g, { y: "+=0" }),
+ (t.ignoreCheck = function (t) {
+ return (
+ (Qr &&
+ "touchmove" === t.type &&
+ (function () {
+ if (r) {
+ requestAnimationFrame(M);
+ var t = mo(e.deltaY / 2),
+ n = T(v.v - t);
+ if (g && n !== v.v + v.offset) {
+ v.offset = n - v.v;
+ var i = mo((parseFloat(g && g._gsap.y) || 0) - v.offset);
+ (g.style.transform =
+ "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, " +
+ i +
+ ", 0, 1)"),
+ (g._gsap.y = i + "px"),
+ (v.cacheID = sr.cache),
+ hs();
+ }
+ return !0;
+ }
+ v.offset && C(), (r = !0);
+ })()) ||
+ (x > 1.05 && "touchstart" !== t.type) ||
+ e.isGesturing ||
+ (t.touches && t.touches.length > 1)
+ );
+ }),
+ (t.onPress = function () {
+ var t = x;
+ (x = mo(((Cr.visualViewport && Cr.visualViewport.scale) || 1) / y)),
+ o.pause(),
+ t !== x && Ts(f, x > 1.01 || (!c && "x")),
+ (s = _()),
+ (a = v()),
+ E(),
+ (i = as);
+ }),
+ (t.onRelease = t.onGestureStart =
+ function (t, e) {
+ if ((v.offset && C(), e)) {
+ sr.cache++;
+ var i,
+ r,
+ s = w();
+ c &&
+ ((r = (i = _()) + (0.05 * s * -t.velocityX) / 0.227),
+ (s *= Ds(_, i, r, yo(f, gr))),
+ (o.vars.scrollX = D(r))),
+ (r = (i = v()) + (0.05 * s * -t.velocityY) / 0.227),
+ (s *= Ds(v, i, r, yo(f, vr))),
+ (o.vars.scrollY = T(r)),
+ o.invalidate().duration(s).play(0.01),
+ ((Qr && o.vars.scrollY >= n) || i >= n - 1) &&
+ Tr.to({}, { onUpdate: A, duration: s });
+ } else l.restart(!0);
+ }),
+ (t.onWheel = function () {
+ o._ts && o.pause(), ao() - b > 1e3 && ((i = 0), (b = ao()));
+ }),
+ (t.onChange = function (t, e, n, r, o) {
+ if (
+ (as !== i && E(),
+ e &&
+ c &&
+ _(D(r[2] === e ? s + (t.startX - t.x) : _() + e - r[1])),
+ n)
+ ) {
+ v.offset && C();
+ var l = o[2] === n,
+ u = l ? a + t.startY - t.y : v() + n - o[1],
+ h = T(u);
+ l && u !== h && (a += h - u), v(h);
+ }
+ (n || e) && hs();
+ }),
+ (t.onEnable = function () {
+ Ts(f, !c && "x"),
+ Ss.addEventListener("refresh", A),
+ ko(Cr, "resize", A),
+ v.smooth &&
+ ((v.target.style.scrollBehavior = "auto"),
+ (v.smooth = _.smooth = !1)),
+ S.enable();
+ }),
+ (t.onDisable = function () {
+ Ts(f, !0),
+ Uo(Cr, "resize", A),
+ Ss.removeEventListener("refresh", A),
+ S.kill();
+ }),
+ (t.lockAxis = !1 !== t.lockAxis),
+ ((e = new Dr(t)).iOS = Qr),
+ Qr && !v() && v(1),
+ Qr && Tr.ticker.add(po),
+ (l = e._dc),
+ (o = Tr.to(e, {
+ ease: "power4",
+ paused: !0,
+ scrollX: c ? "+=0.1" : "+=0",
+ scrollY: "+=0.1",
+ onComplete: l.vars.onComplete,
+ })),
+ e
+ );
+ };
+ (Ss.sort = function (t) {
+ return Xo.sort(
+ t ||
+ function (t, e) {
+ return (
+ -1e6 * (t.vars.refreshPriority || 0) +
+ t.start -
+ (e.start + -1e6 * (e.vars.refreshPriority || 0))
+ );
+ }
+ );
+ }),
+ (Ss.observe = function (t) {
+ return new Dr(t);
+ }),
+ (Ss.normalizeScroll = function (t) {
+ if (void 0 === t) return Yr;
+ if (!0 === t && Yr) return Yr.enable();
+ if (!1 === t) return Yr && Yr.kill();
+ var e = t instanceof Dr ? t : Rs(t);
+ return (
+ Yr && Yr.target === e.target && Yr.kill(), _o(e.target) && (Yr = e), e
+ );
+ }),
+ (Ss.core = {
+ _getVelocityProp: yr,
+ _inputObserver: As,
+ _scrollers: sr,
+ _proxies: ar,
+ bridge: {
+ ss: function () {
+ uo || ns("scrollStart"), (uo = ao());
+ },
+ ref: function () {
+ return kr;
+ },
+ },
+ }),
+ vo() && Tr.registerPlugin(Ss);
+ /*!
+ * ScrollToPlugin 3.11.4
+ * https://greensock.com
+ *
+ * @license Copyright 2008-2022, GreenSock. All rights reserved.
+ * Subject to the terms at https://greensock.com/standard-license or for
+ * Club GreenSock members, the agreement issued with that membership.
+ * @author: Jack Doyle, jack@greensock.com
+ */
+ var Os,
+ Fs,
+ Is,
+ Ns,
+ zs,
+ ks,
+ Us,
+ Bs,
+ Vs = function () {
+ return "undefined" != typeof window;
+ },
+ Hs = function () {
+ return Os || (Vs() && (Os = window.gsap) && Os.registerPlugin && Os);
+ },
+ Ws = function (t) {
+ return "string" == typeof t;
+ },
+ Gs = function (t) {
+ return "function" == typeof t;
+ },
+ js = function (t, e) {
+ var n = "x" === e ? "Width" : "Height",
+ i = "scroll" + n,
+ r = "client" + n;
+ return t === Is || t === Ns || t === zs
+ ? Math.max(Ns[i], zs[i]) - (Is["inner" + n] || Ns[r] || zs[r])
+ : t[i] - t["offset" + n];
+ },
+ qs = function (t, e) {
+ var n = "scroll" + ("x" === e ? "Left" : "Top");
+ return (
+ t === Is &&
+ (null != t.pageXOffset
+ ? (n = "page" + e.toUpperCase() + "Offset")
+ : (t = null != Ns[n] ? Ns : zs)),
+ function () {
+ return t[n];
+ }
+ );
+ },
+ Xs = function (t, e) {
+ if (!(t = ks(t)[0]) || !t.getBoundingClientRect)
+ return (
+ console.warn("scrollTo target doesn't exist. Using 0") || {
+ x: 0,
+ y: 0,
+ }
+ );
+ var n = t.getBoundingClientRect(),
+ i = !e || e === Is || e === zs,
+ r = i
+ ? {
+ top:
+ Ns.clientTop -
+ (Is.pageYOffset || Ns.scrollTop || zs.scrollTop || 0),
+ left:
+ Ns.clientLeft -
+ (Is.pageXOffset || Ns.scrollLeft || zs.scrollLeft || 0),
+ }
+ : e.getBoundingClientRect(),
+ o = { x: n.left - r.left, y: n.top - r.top };
+ return !i && e && ((o.x += qs(e, "x")()), (o.y += qs(e, "y")())), o;
+ },
+ Ys = function (t, e, n, i, r) {
+ return isNaN(t) || "object" == typeof t
+ ? Ws(t) && "=" === t.charAt(1)
+ ? parseFloat(t.substr(2)) * ("-" === t.charAt(0) ? -1 : 1) + i - r
+ : "max" === t
+ ? js(e, n) - r
+ : Math.min(js(e, n), Xs(t, e)[n] - r)
+ : parseFloat(t) - r;
+ },
+ Zs = function () {
+ (Os = Hs()),
+ Vs() &&
+ Os &&
+ "undefined" != typeof document &&
+ document.body &&
+ ((Is = window),
+ (zs = document.body),
+ (Ns = document.documentElement),
+ (ks = Os.utils.toArray),
+ Os.config({ autoKillThreshold: 7 }),
+ (Us = Os.config()),
+ (Fs = 1));
+ },
+ Ks = {
+ version: "3.11.4",
+ name: "scrollTo",
+ rawVars: 1,
+ register: function (t) {
+ (Os = t), Zs();
+ },
+ init: function (t, e, n, i, r) {
+ Fs || Zs();
+ var o = Os.getProperty(t, "scrollSnapType");
+ (this.isWin = t === Is),
+ (this.target = t),
+ (this.tween = n),
+ (e = (function (t, e, n, i) {
+ if ((Gs(t) && (t = t(e, n, i)), "object" != typeof t))
+ return Ws(t) && "max" !== t && "=" !== t.charAt(1)
+ ? { x: t, y: t }
+ : { y: t };
+ if (t.nodeType) return { y: t, x: t };
+ var r,
+ o = {};
+ for (r in t)
+ o[r] = "onAutoKill" !== r && Gs(t[r]) ? t[r](e, n, i) : t[r];
+ return o;
+ })(e, i, t, r)),
+ (this.vars = e),
+ (this.autoKill = !!e.autoKill),
+ (this.getX = qs(t, "x")),
+ (this.getY = qs(t, "y")),
+ (this.x = this.xPrev = this.getX()),
+ (this.y = this.yPrev = this.getY()),
+ Bs || (Bs = Os.core.globals().ScrollTrigger),
+ "smooth" === Os.getProperty(t, "scrollBehavior") &&
+ Os.set(t, { scrollBehavior: "auto" }),
+ o &&
+ "none" !== o &&
+ ((this.snap = 1),
+ (this.snapInline = t.style.scrollSnapType),
+ (t.style.scrollSnapType = "none")),
+ null != e.x
+ ? (this.add(
+ this,
+ "x",
+ this.x,
+ Ys(e.x, t, "x", this.x, e.offsetX || 0),
+ i,
+ r
+ ),
+ this._props.push("scrollTo_x"))
+ : (this.skipX = 1),
+ null != e.y
+ ? (this.add(
+ this,
+ "y",
+ this.y,
+ Ys(e.y, t, "y", this.y, e.offsetY || 0),
+ i,
+ r
+ ),
+ this._props.push("scrollTo_y"))
+ : (this.skipY = 1);
+ },
+ render: function (t, e) {
+ for (
+ var n,
+ i,
+ r,
+ o,
+ s,
+ a = e._pt,
+ l = e.target,
+ u = e.tween,
+ c = e.autoKill,
+ h = e.xPrev,
+ d = e.yPrev,
+ f = e.isWin,
+ p = e.snap,
+ m = e.snapInline;
+ a;
+
+ )
+ a.r(t, a.d), (a = a._next);
+ (n = f || !e.skipX ? e.getX() : h),
+ (r = (i = f || !e.skipY ? e.getY() : d) - d),
+ (o = n - h),
+ (s = Us.autoKillThreshold),
+ e.x < 0 && (e.x = 0),
+ e.y < 0 && (e.y = 0),
+ c &&
+ (!e.skipX && (o > s || o < -s) && n < js(l, "x") && (e.skipX = 1),
+ !e.skipY && (r > s || r < -s) && i < js(l, "y") && (e.skipY = 1),
+ e.skipX &&
+ e.skipY &&
+ (u.kill(),
+ e.vars.onAutoKill &&
+ e.vars.onAutoKill.apply(u, e.vars.onAutoKillParams || []))),
+ f
+ ? Is.scrollTo(e.skipX ? n : e.x, e.skipY ? i : e.y)
+ : (e.skipY || (l.scrollTop = e.y),
+ e.skipX || (l.scrollLeft = e.x)),
+ !p ||
+ (1 !== t && 0 !== t) ||
+ ((i = l.scrollTop),
+ (n = l.scrollLeft),
+ m
+ ? (l.style.scrollSnapType = m)
+ : l.style.removeProperty("scroll-snap-type"),
+ (l.scrollTop = i + 1),
+ (l.scrollLeft = n + 1),
+ (l.scrollTop = i),
+ (l.scrollLeft = n)),
+ (e.xPrev = e.x),
+ (e.yPrev = e.y),
+ Bs && Bs.update();
+ },
+ kill: function (t) {
+ var e = "scrollTo" === t;
+ (e || "scrollTo_x" === t) && (this.skipX = 1),
+ (e || "scrollTo_y" === t) && (this.skipY = 1);
+ },
+ };
+ (Ks.max = js),
+ (Ks.getOffset = Xs),
+ (Ks.buildGetter = qs),
+ Hs() && Os.registerPlugin(Ks);
+ /*! *****************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */
+ var Js = function (t, e) {
+ return (Js =
+ Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array &&
+ function (t, e) {
+ t.__proto__ = e;
+ }) ||
+ function (t, e) {
+ for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
+ })(t, e);
+ };
+ var Qs = function () {
+ return (Qs =
+ Object.assign ||
+ function (t) {
+ for (var e, n = 1, i = arguments.length; n < i; n++)
+ for (var r in (e = arguments[n]))
+ Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
+ return t;
+ }).apply(this, arguments);
+ };
+ function $s(t, e, n, i) {
+ var r,
+ o = arguments.length,
+ s =
+ o < 3
+ ? e
+ : null === i
+ ? (i = Object.getOwnPropertyDescriptor(e, n))
+ : i;
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate)
+ s = Reflect.decorate(t, e, n, i);
+ else
+ for (var a = t.length - 1; a >= 0; a--)
+ (r = t[a]) &&
+ (s = (o < 3 ? r(s) : o > 3 ? r(e, n, s) : r(e, n)) || s);
+ return o > 3 && s && Object.defineProperty(e, n, s), s;
+ }
+ function ta() {
+ for (var t = 0, e = 0, n = arguments.length; e < n; e++)
+ t += arguments[e].length;
+ var i = Array(t),
+ r = 0;
+ for (e = 0; e < n; e++)
+ for (var o = arguments[e], s = 0, a = o.length; s < a; s++, r++)
+ i[r] = o[s];
+ return i;
+ }
+ n(91), n(119), n(122), n(130), n(134);
+ var ea = n(1),
+ na = n.n(ea);
+ function ia(t, e) {
+ return (
+ void 0 === t && (t = -1 / 0),
+ void 0 === e && (e = 1 / 0),
+ function (n, i) {
+ var r = "_" + i;
+ Object.defineProperty(n, i, {
+ get: function () {
+ return this[r];
+ },
+ set: function (n) {
+ Object.defineProperty(this, r, {
+ value: na()(n, t, e),
+ enumerable: !1,
+ writable: !0,
+ configurable: !0,
+ });
+ },
+ enumerable: !0,
+ configurable: !0,
+ });
+ }
+ );
+ }
+ function ra(t, e) {
+ var n = "_" + e;
+ Object.defineProperty(t, e, {
+ get: function () {
+ return this[n];
+ },
+ set: function (t) {
+ Object.defineProperty(this, n, {
+ value: !!t,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0,
+ });
+ },
+ enumerable: !0,
+ configurable: !0,
+ });
+ }
+ var oa = n(30),
+ sa = n.n(oa);
+ function aa() {
+ for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
+ return function (e, n, i) {
+ var r = i.value;
+ return {
+ get: function () {
+ return (
+ this.hasOwnProperty(n) ||
+ Object.defineProperty(this, n, {
+ value: sa.a.apply(void 0, ta([r], t)),
+ }),
+ this[n]
+ );
+ },
+ };
+ };
+ }
+ var la,
+ ua = (function () {
+ function t(t) {
+ var e = this;
+ void 0 === t && (t = {}),
+ (this.damping = 0.1),
+ (this.thumbMinSize = 20),
+ (this.renderByPixels = !0),
+ (this.alwaysShowTracks = !1),
+ (this.continuousScrolling = !0),
+ (this.delegateTo = null),
+ (this.plugins = {}),
+ Object.keys(t).forEach(function (n) {
+ e[n] = t[n];
+ });
+ }
+ return (
+ Object.defineProperty(t.prototype, "wheelEventTarget", {
+ get: function () {
+ return this.delegateTo;
+ },
+ set: function (t) {
+ console.warn(
+ "[smooth-scrollbar]: `options.wheelEventTarget` is deprecated and will be removed in the future, use `options.delegateTo` instead."
+ ),
+ (this.delegateTo = t);
+ },
+ enumerable: !0,
+ configurable: !0,
+ }),
+ $s([ia(0, 1)], t.prototype, "damping", void 0),
+ $s([ia(0, 1 / 0)], t.prototype, "thumbMinSize", void 0),
+ $s([ra], t.prototype, "renderByPixels", void 0),
+ $s([ra], t.prototype, "alwaysShowTracks", void 0),
+ $s([ra], t.prototype, "continuousScrolling", void 0),
+ t
+ );
+ })(),
+ ca = new WeakMap();
+ function ha() {
+ if (void 0 !== la) return la;
+ var t = !1;
+ try {
+ var e = function () {},
+ n = Object.defineProperty({}, "passive", {
+ get: function () {
+ t = !0;
+ },
+ });
+ window.addEventListener("testPassive", e, n),
+ window.removeEventListener("testPassive", e, n);
+ } catch (t) {}
+ return (la = !!t && { passive: !1 });
+ }
+ function da(t) {
+ var e = ca.get(t) || [];
+ return (
+ ca.set(t, e),
+ function (t, n, i) {
+ function r(t) {
+ t.defaultPrevented || i(t);
+ }
+ n.split(/\s+/g).forEach(function (n) {
+ e.push({ elem: t, eventName: n, handler: r }),
+ t.addEventListener(n, r, ha());
+ });
+ }
+ );
+ }
+ function fa(t) {
+ var e = (function (t) {
+ return t.touches ? t.touches[t.touches.length - 1] : t;
+ })(t);
+ return { x: e.clientX, y: e.clientY };
+ }
+ function pa(t, e) {
+ return (
+ void 0 === e && (e = []),
+ e.some(function (e) {
+ return t === e;
+ })
+ );
+ }
+ var ma = ["webkit", "moz", "ms", "o"],
+ ga = new RegExp("^-(?!(?:" + ma.join("|") + ")-)");
+ function va(t, e) {
+ (e = (function (t) {
+ var e = {};
+ return (
+ Object.keys(t).forEach(function (n) {
+ if (ga.test(n)) {
+ var i = t[n];
+ (n = n.replace(/^-/, "")),
+ (e[n] = i),
+ ma.forEach(function (t) {
+ e["-" + t + "-" + n] = i;
+ });
+ } else e[n] = t[n];
+ }),
+ e
+ );
+ })(e)),
+ Object.keys(e).forEach(function (n) {
+ var i = n.replace(/^-/, "").replace(/-([a-z])/g, function (t, e) {
+ return e.toUpperCase();
+ });
+ t.style[i] = e[n];
+ });
+ }
+ var _a,
+ xa = (function () {
+ function t(t) {
+ (this.velocityMultiplier = window.devicePixelRatio),
+ (this.updateTime = Date.now()),
+ (this.delta = { x: 0, y: 0 }),
+ (this.velocity = { x: 0, y: 0 }),
+ (this.lastPosition = { x: 0, y: 0 }),
+ (this.lastPosition = fa(t));
+ }
+ return (
+ (t.prototype.update = function (t) {
+ var e = this.velocity,
+ n = this.updateTime,
+ i = this.lastPosition,
+ r = Date.now(),
+ o = fa(t),
+ s = { x: -(o.x - i.x), y: -(o.y - i.y) },
+ a = r - n || 16.7,
+ l = (s.x / a) * 16.7,
+ u = (s.y / a) * 16.7;
+ (e.x = l * this.velocityMultiplier),
+ (e.y = u * this.velocityMultiplier),
+ (this.delta = s),
+ (this.updateTime = r),
+ (this.lastPosition = o);
+ }),
+ t
+ );
+ })(),
+ ya = (function () {
+ function t() {
+ this._touchList = {};
+ }
+ return (
+ Object.defineProperty(t.prototype, "_primitiveValue", {
+ get: function () {
+ return { x: 0, y: 0 };
+ },
+ enumerable: !0,
+ configurable: !0,
+ }),
+ (t.prototype.isActive = function () {
+ return void 0 !== this._activeTouchID;
+ }),
+ (t.prototype.getDelta = function () {
+ var t = this._getActiveTracker();
+ return t ? Qs({}, t.delta) : this._primitiveValue;
+ }),
+ (t.prototype.getVelocity = function () {
+ var t = this._getActiveTracker();
+ return t ? Qs({}, t.velocity) : this._primitiveValue;
+ }),
+ (t.prototype.getEasingDistance = function (t) {
+ var e = 1 - t,
+ n = { x: 0, y: 0 },
+ i = this.getVelocity();
+ return (
+ Object.keys(i).forEach(function (t) {
+ for (var r = Math.abs(i[t]) <= 10 ? 0 : i[t]; 0 !== r; )
+ (n[t] += r), (r = (r * e) | 0);
+ }),
+ n
+ );
+ }),
+ (t.prototype.track = function (t) {
+ var e = this,
+ n = t.targetTouches;
+ return (
+ Array.from(n).forEach(function (t) {
+ e._add(t);
+ }),
+ this._touchList
+ );
+ }),
+ (t.prototype.update = function (t) {
+ var e = this,
+ n = t.touches,
+ i = t.changedTouches;
+ return (
+ Array.from(n).forEach(function (t) {
+ e._renew(t);
+ }),
+ this._setActiveID(i),
+ this._touchList
+ );
+ }),
+ (t.prototype.release = function (t) {
+ var e = this;
+ delete this._activeTouchID,
+ Array.from(t.changedTouches).forEach(function (t) {
+ e._delete(t);
+ });
+ }),
+ (t.prototype._add = function (t) {
+ this._has(t) && this._delete(t);
+ var e = new xa(t);
+ this._touchList[t.identifier] = e;
+ }),
+ (t.prototype._renew = function (t) {
+ this._has(t) && this._touchList[t.identifier].update(t);
+ }),
+ (t.prototype._delete = function (t) {
+ delete this._touchList[t.identifier];
+ }),
+ (t.prototype._has = function (t) {
+ return this._touchList.hasOwnProperty(t.identifier);
+ }),
+ (t.prototype._setActiveID = function (t) {
+ this._activeTouchID = t[t.length - 1].identifier;
+ }),
+ (t.prototype._getActiveTracker = function () {
+ return this._touchList[this._activeTouchID];
+ }),
+ t
+ );
+ })();
+ !(function (t) {
+ (t.X = "x"), (t.Y = "y");
+ })(_a || (_a = {}));
+ var ba = (function () {
+ function t(t, e) {
+ void 0 === e && (e = 0),
+ (this._direction = t),
+ (this._minSize = e),
+ (this.element = document.createElement("div")),
+ (this.displaySize = 0),
+ (this.realSize = 0),
+ (this.offset = 0),
+ (this.element.className = "scrollbar-thumb scrollbar-thumb-" + t);
+ }
+ return (
+ (t.prototype.attachTo = function (t) {
+ t.appendChild(this.element);
+ }),
+ (t.prototype.update = function (t, e, n) {
+ (this.realSize = Math.min(e / n, 1) * e),
+ (this.displaySize = Math.max(this.realSize, this._minSize)),
+ (this.offset =
+ (t / n) * (e + (this.realSize - this.displaySize))),
+ va(this.element, this._getStyle());
+ }),
+ (t.prototype._getStyle = function () {
+ switch (this._direction) {
+ case _a.X:
+ return {
+ width: this.displaySize + "px",
+ "-transform": "translate3d(" + this.offset + "px, 0, 0)",
+ };
+ case _a.Y:
+ return {
+ height: this.displaySize + "px",
+ "-transform": "translate3d(0, " + this.offset + "px, 0)",
+ };
+ default:
+ return null;
+ }
+ }),
+ t
+ );
+ })(),
+ wa = (function () {
+ function t(t, e) {
+ void 0 === e && (e = 0),
+ (this.element = document.createElement("div")),
+ (this._isShown = !1),
+ (this.element.className = "scrollbar-track scrollbar-track-" + t),
+ (this.thumb = new ba(t, e)),
+ this.thumb.attachTo(this.element);
+ }
+ return (
+ (t.prototype.attachTo = function (t) {
+ t.appendChild(this.element);
+ }),
+ (t.prototype.show = function () {
+ this._isShown ||
+ ((this._isShown = !0), this.element.classList.add("show"));
+ }),
+ (t.prototype.hide = function () {
+ this._isShown &&
+ ((this._isShown = !1), this.element.classList.remove("show"));
+ }),
+ (t.prototype.update = function (t, e, n) {
+ va(this.element, { display: n <= e ? "none" : "block" }),
+ this.thumb.update(t, e, n);
+ }),
+ t
+ );
+ })(),
+ Sa = (function () {
+ function t(t) {
+ this._scrollbar = t;
+ var e = t.options.thumbMinSize;
+ (this.xAxis = new wa(_a.X, e)),
+ (this.yAxis = new wa(_a.Y, e)),
+ this.xAxis.attachTo(t.containerEl),
+ this.yAxis.attachTo(t.containerEl),
+ t.options.alwaysShowTracks &&
+ (this.xAxis.show(), this.yAxis.show());
+ }
+ return (
+ (t.prototype.update = function () {
+ var t = this._scrollbar,
+ e = t.size,
+ n = t.offset;
+ this.xAxis.update(n.x, e.container.width, e.content.width),
+ this.yAxis.update(n.y, e.container.height, e.content.height);
+ }),
+ (t.prototype.autoHideOnIdle = function () {
+ this._scrollbar.options.alwaysShowTracks ||
+ (this.xAxis.hide(), this.yAxis.hide());
+ }),
+ $s([aa(300)], t.prototype, "autoHideOnIdle", null),
+ t
+ );
+ })();
+ var Ma = new WeakMap();
+ function Da(t) {
+ return Math.pow(t - 1, 3) + 1;
+ }
+ var Ta,
+ Ea,
+ Ca,
+ Aa = (function () {
+ function t(t, e) {
+ var n = this.constructor;
+ (this.scrollbar = t),
+ (this.name = n.pluginName),
+ (this.options = Qs(Qs({}, n.defaultOptions), e));
+ }
+ return (
+ (t.prototype.onInit = function () {}),
+ (t.prototype.onDestroy = function () {}),
+ (t.prototype.onUpdate = function () {}),
+ (t.prototype.onRender = function (t) {}),
+ (t.prototype.transformDelta = function (t, e) {
+ return Qs({}, t);
+ }),
+ (t.pluginName = ""),
+ (t.defaultOptions = {}),
+ t
+ );
+ })(),
+ Pa = { order: new Set(), constructors: {} };
+ function La() {
+ for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
+ t.forEach(function (t) {
+ var e = t.pluginName;
+ if (!e) throw new TypeError("plugin name is required");
+ Pa.order.add(e), (Pa.constructors[e] = t);
+ });
+ }
+ function Ra(t) {
+ var e = da(t),
+ n = t.containerEl;
+ e(n, "keydown", function (e) {
+ var i = document.activeElement;
+ if (
+ (i === n || n.contains(i)) &&
+ !(function (t) {
+ if (
+ "INPUT" === t.tagName ||
+ "SELECT" === t.tagName ||
+ "TEXTAREA" === t.tagName ||
+ t.isContentEditable
+ )
+ return !t.disabled;
+ return !1;
+ })(i)
+ ) {
+ var r = (function (t, e) {
+ var n = t.size,
+ i = t.limit,
+ r = t.offset;
+ switch (e) {
+ case Ta.TAB:
+ return (function (t) {
+ requestAnimationFrame(function () {
+ t.scrollIntoView(document.activeElement, {
+ offsetTop: t.size.container.height / 2,
+ offsetLeft: t.size.container.width / 2,
+ onlyScrollIfNeeded: !0,
+ });
+ });
+ })(t);
+ case Ta.SPACE:
+ return [0, 200];
+ case Ta.PAGE_UP:
+ return [0, 40 - n.container.height];
+ case Ta.PAGE_DOWN:
+ return [0, n.container.height - 40];
+ case Ta.END:
+ return [0, i.y - r.y];
+ case Ta.HOME:
+ return [0, -r.y];
+ case Ta.LEFT:
+ return [-40, 0];
+ case Ta.UP:
+ return [0, -40];
+ case Ta.RIGHT:
+ return [40, 0];
+ case Ta.DOWN:
+ return [0, 40];
+ default:
+ return null;
+ }
+ })(t, e.keyCode || e.which);
+ if (r) {
+ var o = r[0],
+ s = r[1];
+ t.addTransformableMomentum(o, s, e, function (n) {
+ n
+ ? e.preventDefault()
+ : (t.containerEl.blur(),
+ t.parent && t.parent.containerEl.focus());
+ });
+ }
+ }
+ });
+ }
+ function Oa(t) {
+ var e,
+ n,
+ i,
+ r,
+ o,
+ s = da(t),
+ a = t.containerEl,
+ l = t.track,
+ u = l.xAxis,
+ c = l.yAxis;
+ function h(e, n) {
+ var i = t.size,
+ r = t.limit,
+ o = t.offset;
+ if (e === Ea.X) {
+ var s = i.container.width + (u.thumb.realSize - u.thumb.displaySize);
+ return na()((n / s) * i.content.width, 0, r.x) - o.x;
+ }
+ if (e === Ea.Y) {
+ var a = i.container.height + (c.thumb.realSize - c.thumb.displaySize);
+ return na()((n / a) * i.content.height, 0, r.y) - o.y;
+ }
+ return 0;
+ }
+ function d(t) {
+ return pa(t, [u.element, u.thumb.element])
+ ? Ea.X
+ : pa(t, [c.element, c.thumb.element])
+ ? Ea.Y
+ : void 0;
+ }
+ s(a, "click", function (e) {
+ if (!n && pa(e.target, [u.element, c.element])) {
+ var i = e.target,
+ r = d(i),
+ o = i.getBoundingClientRect(),
+ s = fa(e);
+ if (r === Ea.X) {
+ var a = s.x - o.left - u.thumb.displaySize / 2;
+ t.setMomentum(h(r, a), 0);
+ }
+ if (r === Ea.Y) {
+ a = s.y - o.top - c.thumb.displaySize / 2;
+ t.setMomentum(0, h(r, a));
+ }
+ }
+ }),
+ s(a, "mousedown", function (n) {
+ if (pa(n.target, [u.thumb.element, c.thumb.element])) {
+ e = !0;
+ var s = n.target,
+ l = fa(n),
+ h = s.getBoundingClientRect();
+ (r = d(s)),
+ (i = { x: l.x - h.left, y: l.y - h.top }),
+ (o = a.getBoundingClientRect()),
+ va(t.containerEl, { "-user-select": "none" });
+ }
+ }),
+ s(window, "mousemove", function (s) {
+ if (e) {
+ n = !0;
+ var a = fa(s);
+ if (r === Ea.X) {
+ var l = a.x - i.x - o.left;
+ t.setMomentum(h(r, l), 0);
+ }
+ if (r === Ea.Y) {
+ l = a.y - i.y - o.top;
+ t.setMomentum(0, h(r, l));
+ }
+ }
+ }),
+ s(window, "mouseup blur", function () {
+ (e = n = !1), va(t.containerEl, { "-user-select": "" });
+ });
+ }
+ function Fa(t) {
+ da(t)(window, "resize", sa()(t.update.bind(t), 300));
+ }
+ function Ia(t) {
+ var e,
+ n = da(t),
+ i = t.containerEl,
+ r = t.contentEl,
+ o = !1,
+ s = !1;
+ n(window, "mousemove", function (n) {
+ o &&
+ (cancelAnimationFrame(e),
+ (function n(i) {
+ var r = i.x,
+ o = i.y;
+ if (r || o) {
+ var s = t.offset,
+ a = t.limit;
+ t.setMomentum(
+ na()(s.x + r, 0, a.x) - s.x,
+ na()(s.y + o, 0, a.y) - s.y
+ ),
+ (e = requestAnimationFrame(function () {
+ n({ x: r, y: o });
+ }));
+ }
+ })(
+ (function (t, e) {
+ var n = t.bounding,
+ i = n.top,
+ r = n.right,
+ o = n.bottom,
+ s = n.left,
+ a = fa(e),
+ l = a.x,
+ u = a.y,
+ c = { x: 0, y: 0 };
+ if (0 === l && 0 === u) return c;
+ l > r - 20
+ ? (c.x = l - r + 20)
+ : l < s + 20 && (c.x = l - s - 20);
+ u > o - 20
+ ? (c.y = u - o + 20)
+ : u < i + 20 && (c.y = u - i - 20);
+ return (c.x *= 2), (c.y *= 2), c;
+ })(t, n)
+ ));
+ }),
+ n(r, "contextmenu", function () {
+ (s = !0), cancelAnimationFrame(e), (o = !1);
+ }),
+ n(r, "mousedown", function () {
+ s = !1;
+ }),
+ n(r, "selectstart", function () {
+ s || (cancelAnimationFrame(e), (o = !0));
+ }),
+ n(window, "mouseup blur", function () {
+ cancelAnimationFrame(e), (o = !1), (s = !1);
+ }),
+ n(i, "scroll", function (t) {
+ t.preventDefault(), (i.scrollTop = i.scrollLeft = 0);
+ });
+ }
+ function Na(t) {
+ var e,
+ n = t.options.delegateTo || t.containerEl,
+ i = new ya(),
+ r = da(t),
+ o = 0;
+ r(n, "touchstart", function (n) {
+ i.track(n),
+ t.setMomentum(0, 0),
+ 0 === o &&
+ ((e = t.options.damping), (t.options.damping = Math.max(e, 0.5))),
+ o++;
+ }),
+ r(n, "touchmove", function (e) {
+ if (!Ca || Ca === t) {
+ i.update(e);
+ var n = i.getDelta(),
+ r = n.x,
+ o = n.y;
+ t.addTransformableMomentum(r, o, e, function (n) {
+ n && e.cancelable && (e.preventDefault(), (Ca = t));
+ });
+ }
+ }),
+ r(n, "touchcancel touchend", function (n) {
+ var r = i.getEasingDistance(e);
+ t.addTransformableMomentum(r.x, r.y, n),
+ 0 === --o && (t.options.damping = e),
+ i.release(n),
+ (Ca = null);
+ });
+ }
+ function za(t) {
+ da(t)(
+ t.options.delegateTo || t.containerEl,
+ "onwheel" in window ||
+ document.implementation.hasFeature("Events.wheel", "3.0")
+ ? "wheel"
+ : "mousewheel",
+ function (e) {
+ var n = (function (t) {
+ if ("deltaX" in t) {
+ var e = (function (t) {
+ return Ba[t] || Ba[0];
+ })(t.deltaMode);
+ return { x: (t.deltaX / ka) * e, y: (t.deltaY / ka) * e };
+ }
+ if ("wheelDeltaX" in t)
+ return { x: t.wheelDeltaX / Ua, y: t.wheelDeltaY / Ua };
+ return { x: 0, y: t.wheelDelta / Ua };
+ })(e),
+ i = n.x,
+ r = n.y;
+ t.addTransformableMomentum(i, r, e, function (t) {
+ t && e.preventDefault();
+ });
+ }
+ );
+ }
+ !(function (t) {
+ (t[(t.TAB = 9)] = "TAB"),
+ (t[(t.SPACE = 32)] = "SPACE"),
+ (t[(t.PAGE_UP = 33)] = "PAGE_UP"),
+ (t[(t.PAGE_DOWN = 34)] = "PAGE_DOWN"),
+ (t[(t.END = 35)] = "END"),
+ (t[(t.HOME = 36)] = "HOME"),
+ (t[(t.LEFT = 37)] = "LEFT"),
+ (t[(t.UP = 38)] = "UP"),
+ (t[(t.RIGHT = 39)] = "RIGHT"),
+ (t[(t.DOWN = 40)] = "DOWN");
+ })(Ta || (Ta = {})),
+ (function (t) {
+ (t[(t.X = 0)] = "X"), (t[(t.Y = 1)] = "Y");
+ })(Ea || (Ea = {}));
+ var ka = 1,
+ Ua = -3,
+ Ba = [1, 28, 500];
+ var Va = new Map(),
+ Ha = (function () {
+ function t(t, e) {
+ var n = this;
+ (this.offset = { x: 0, y: 0 }),
+ (this.limit = { x: 1 / 0, y: 1 / 0 }),
+ (this.bounding = { top: 0, right: 0, bottom: 0, left: 0 }),
+ (this._plugins = []),
+ (this._momentum = { x: 0, y: 0 }),
+ (this._listeners = new Set()),
+ (this.containerEl = t);
+ var i = (this.contentEl = document.createElement("div"));
+ (this.options = new ua(e)),
+ t.setAttribute("data-scrollbar", "true"),
+ t.setAttribute("tabindex", "-1"),
+ va(t, { overflow: "hidden", outline: "none" }),
+ window.navigator.msPointerEnabled &&
+ (t.style.msTouchAction = "none"),
+ (i.className = "scroll-content"),
+ Array.from(t.childNodes).forEach(function (t) {
+ i.appendChild(t);
+ }),
+ t.appendChild(i),
+ (this.track = new Sa(this)),
+ (this.size = this.getSize()),
+ (this._plugins = (function (t, e) {
+ return Array.from(Pa.order)
+ .filter(function (t) {
+ return !1 !== e[t];
+ })
+ .map(function (n) {
+ var i = new (0, Pa.constructors[n])(t, e[n]);
+ return (e[n] = i.options), i;
+ });
+ })(this, this.options.plugins));
+ var r = t.scrollLeft,
+ o = t.scrollTop;
+ (t.scrollLeft = t.scrollTop = 0),
+ this.setPosition(r, o, { withoutCallbacks: !0 });
+ var s = window.ResizeObserver;
+ "function" == typeof s &&
+ ((this._observer = new s(function () {
+ n.update();
+ })),
+ this._observer.observe(i)),
+ Va.set(t, this),
+ requestAnimationFrame(function () {
+ n._init();
+ });
+ }
+ return (
+ Object.defineProperty(t.prototype, "parent", {
+ get: function () {
+ for (var t = this.containerEl.parentElement; t; ) {
+ var e = Va.get(t);
+ if (e) return e;
+ t = t.parentElement;
+ }
+ return null;
+ },
+ enumerable: !0,
+ configurable: !0,
+ }),
+ Object.defineProperty(t.prototype, "scrollTop", {
+ get: function () {
+ return this.offset.y;
+ },
+ set: function (t) {
+ this.setPosition(this.scrollLeft, t);
+ },
+ enumerable: !0,
+ configurable: !0,
+ }),
+ Object.defineProperty(t.prototype, "scrollLeft", {
+ get: function () {
+ return this.offset.x;
+ },
+ set: function (t) {
+ this.setPosition(t, this.scrollTop);
+ },
+ enumerable: !0,
+ configurable: !0,
+ }),
+ (t.prototype.getSize = function () {
+ return (
+ (e = (t = this).containerEl),
+ (n = t.contentEl),
+ (i = getComputedStyle(e)),
+ (r = [
+ "paddingTop",
+ "paddingBottom",
+ "paddingLeft",
+ "paddingRight",
+ ].map(function (t) {
+ return i[t] ? parseFloat(i[t]) : 0;
+ })),
+ (o = r[0] + r[1]),
+ (s = r[2] + r[3]),
+ {
+ container: { width: e.clientWidth, height: e.clientHeight },
+ content: {
+ width: n.offsetWidth - n.clientWidth + n.scrollWidth + s,
+ height: n.offsetHeight - n.clientHeight + n.scrollHeight + o,
+ },
+ }
+ );
+ var t, e, n, i, r, o, s;
+ }),
+ (t.prototype.update = function () {
+ var t, e, n, i, r;
+ (e = (t = this).getSize()),
+ (n = {
+ x: Math.max(e.content.width - e.container.width, 0),
+ y: Math.max(e.content.height - e.container.height, 0),
+ }),
+ (i = t.containerEl.getBoundingClientRect()),
+ (r = {
+ top: Math.max(i.top, 0),
+ right: Math.min(i.right, window.innerWidth),
+ bottom: Math.min(i.bottom, window.innerHeight),
+ left: Math.max(i.left, 0),
+ }),
+ (t.size = e),
+ (t.limit = n),
+ (t.bounding = r),
+ t.track.update(),
+ t.setPosition(),
+ this._plugins.forEach(function (t) {
+ t.onUpdate();
+ });
+ }),
+ (t.prototype.isVisible = function (t) {
+ return (function (t, e) {
+ var n = t.bounding,
+ i = e.getBoundingClientRect(),
+ r = Math.max(n.top, i.top),
+ o = Math.max(n.left, i.left),
+ s = Math.min(n.right, i.right);
+ return r < Math.min(n.bottom, i.bottom) && o < s;
+ })(this, t);
+ }),
+ (t.prototype.setPosition = function (t, e, n) {
+ var i = this;
+ void 0 === t && (t = this.offset.x),
+ void 0 === e && (e = this.offset.y),
+ void 0 === n && (n = {});
+ var r = (function (t, e, n) {
+ var i = t.options,
+ r = t.offset,
+ o = t.limit,
+ s = t.track,
+ a = t.contentEl;
+ return (
+ i.renderByPixels && ((e = Math.round(e)), (n = Math.round(n))),
+ (e = na()(e, 0, o.x)),
+ (n = na()(n, 0, o.y)),
+ e !== r.x && s.xAxis.show(),
+ n !== r.y && s.yAxis.show(),
+ i.alwaysShowTracks || s.autoHideOnIdle(),
+ e === r.x && n === r.y
+ ? null
+ : ((r.x = e),
+ (r.y = n),
+ va(a, {
+ "-transform":
+ "translate3d(" + -e + "px, " + -n + "px, 0)",
+ }),
+ s.update(),
+ { offset: Qs({}, r), limit: Qs({}, o) })
+ );
+ })(this, t, e);
+ r &&
+ !n.withoutCallbacks &&
+ this._listeners.forEach(function (t) {
+ t.call(i, r);
+ });
+ }),
+ (t.prototype.scrollTo = function (t, e, n, i) {
+ void 0 === t && (t = this.offset.x),
+ void 0 === e && (e = this.offset.y),
+ void 0 === n && (n = 0),
+ void 0 === i && (i = {}),
+ (function (t, e, n, i, r) {
+ void 0 === i && (i = 0);
+ var o = void 0 === r ? {} : r,
+ s = o.easing,
+ a = void 0 === s ? Da : s,
+ l = o.callback,
+ u = t.options,
+ c = t.offset,
+ h = t.limit;
+ u.renderByPixels && ((e = Math.round(e)), (n = Math.round(n)));
+ var d = c.x,
+ f = c.y,
+ p = na()(e, 0, h.x) - d,
+ m = na()(n, 0, h.y) - f,
+ g = Date.now();
+ cancelAnimationFrame(Ma.get(t)),
+ (function e() {
+ var n = Date.now() - g,
+ r = i ? a(Math.min(n / i, 1)) : 1;
+ if ((t.setPosition(d + p * r, f + m * r), n >= i))
+ "function" == typeof l && l.call(t);
+ else {
+ var o = requestAnimationFrame(e);
+ Ma.set(t, o);
+ }
+ })();
+ })(this, t, e, n, i);
+ }),
+ (t.prototype.scrollIntoView = function (t, e) {
+ void 0 === e && (e = {}),
+ (function (t, e, n) {
+ var i = void 0 === n ? {} : n,
+ r = i.alignToTop,
+ o = void 0 === r || r,
+ s = i.onlyScrollIfNeeded,
+ a = void 0 !== s && s,
+ l = i.offsetTop,
+ u = void 0 === l ? 0 : l,
+ c = i.offsetLeft,
+ h = void 0 === c ? 0 : c,
+ d = i.offsetBottom,
+ f = void 0 === d ? 0 : d,
+ p = t.containerEl,
+ m = t.bounding,
+ g = t.offset,
+ v = t.limit;
+ if (e && p.contains(e)) {
+ var _ = e.getBoundingClientRect();
+ if (!a || !t.isVisible(e)) {
+ var x = o ? _.top - m.top - u : _.bottom - m.bottom + f;
+ t.setMomentum(
+ _.left - m.left - h,
+ na()(x, -g.y, v.y - g.y)
+ );
+ }
+ }
+ })(this, t, e);
+ }),
+ (t.prototype.addListener = function (t) {
+ if ("function" != typeof t)
+ throw new TypeError(
+ "[smooth-scrollbar] scrolling listener should be a function"
+ );
+ this._listeners.add(t);
+ }),
+ (t.prototype.removeListener = function (t) {
+ this._listeners.delete(t);
+ }),
+ (t.prototype.addTransformableMomentum = function (t, e, n, i) {
+ this._updateDebounced();
+ var r = this._plugins.reduce(
+ function (t, e) {
+ return e.transformDelta(t, n) || t;
+ },
+ { x: t, y: e }
+ ),
+ o = !this._shouldPropagateMomentum(r.x, r.y);
+ o && this.addMomentum(r.x, r.y), i && i.call(this, o);
+ }),
+ (t.prototype.addMomentum = function (t, e) {
+ this.setMomentum(this._momentum.x + t, this._momentum.y + e);
+ }),
+ (t.prototype.setMomentum = function (t, e) {
+ 0 === this.limit.x && (t = 0),
+ 0 === this.limit.y && (e = 0),
+ this.options.renderByPixels &&
+ ((t = Math.round(t)), (e = Math.round(e))),
+ (this._momentum.x = t),
+ (this._momentum.y = e);
+ }),
+ (t.prototype.updatePluginOptions = function (t, e) {
+ this._plugins.forEach(function (n) {
+ n.name === t && Object.assign(n.options, e);
+ });
+ }),
+ (t.prototype.destroy = function () {
+ var t,
+ e,
+ n = this.containerEl,
+ i = this.contentEl;
+ (t = this),
+ (e = ca.get(t)) &&
+ (e.forEach(function (t) {
+ var e = t.elem,
+ n = t.eventName,
+ i = t.handler;
+ e.removeEventListener(n, i, ha());
+ }),
+ ca.delete(t)),
+ this._listeners.clear(),
+ this.setMomentum(0, 0),
+ cancelAnimationFrame(this._renderID),
+ this._observer && this._observer.disconnect(),
+ Va.delete(this.containerEl);
+ for (var r = Array.from(i.childNodes); n.firstChild; )
+ n.removeChild(n.firstChild);
+ r.forEach(function (t) {
+ n.appendChild(t);
+ }),
+ va(n, { overflow: "" }),
+ (n.scrollTop = this.scrollTop),
+ (n.scrollLeft = this.scrollLeft),
+ this._plugins.forEach(function (t) {
+ t.onDestroy();
+ }),
+ (this._plugins.length = 0);
+ }),
+ (t.prototype._init = function () {
+ var t = this;
+ this.update(),
+ Object.keys(i).forEach(function (e) {
+ i[e](t);
+ }),
+ this._plugins.forEach(function (t) {
+ t.onInit();
+ }),
+ this._render();
+ }),
+ (t.prototype._updateDebounced = function () {
+ this.update();
+ }),
+ (t.prototype._shouldPropagateMomentum = function (t, e) {
+ void 0 === t && (t = 0), void 0 === e && (e = 0);
+ var n = this.options,
+ i = this.offset,
+ r = this.limit;
+ if (!n.continuousScrolling) return !1;
+ 0 === r.x && 0 === r.y && this._updateDebounced();
+ var o = na()(t + i.x, 0, r.x),
+ s = na()(e + i.y, 0, r.y),
+ a = !0;
+ return (a =
+ (a = (a = a && o === i.x) && s === i.y) &&
+ (i.x === r.x || 0 === i.x || i.y === r.y || 0 === i.y));
+ }),
+ (t.prototype._render = function () {
+ var t = this._momentum;
+ if (t.x || t.y) {
+ var e = this._nextTick("x"),
+ n = this._nextTick("y");
+ (t.x = e.momentum),
+ (t.y = n.momentum),
+ this.setPosition(e.position, n.position);
+ }
+ var i = Qs({}, this._momentum);
+ this._plugins.forEach(function (t) {
+ t.onRender(i);
+ }),
+ (this._renderID = requestAnimationFrame(this._render.bind(this)));
+ }),
+ (t.prototype._nextTick = function (t) {
+ var e = this.options,
+ n = this.offset,
+ i = this._momentum,
+ r = n[t],
+ o = i[t];
+ if (Math.abs(o) <= 0.1) return { momentum: 0, position: r + o };
+ var s = o * (1 - e.damping);
+ return (
+ e.renderByPixels && (s |= 0), { momentum: s, position: r + o - s }
+ );
+ }),
+ $s([aa(100, { leading: !0 })], t.prototype, "_updateDebounced", null),
+ t
+ );
+ })(),
+ Wa = !1;
+ function Ga() {
+ if (!Wa && "undefined" != typeof window) {
+ var t = document.createElement("style");
+ (t.id = "smooth-scrollbar-style"),
+ (t.textContent =
+ "\n[data-scrollbar] {\n display: block;\n position: relative;\n}\n\n.scroll-content {\n display: flow-root;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n}\n\n.scrollbar-track {\n position: absolute;\n opacity: 0;\n z-index: 1;\n background: rgba(222, 222, 222, .75);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-transition: opacity 0.5s 0.5s ease-out;\n transition: opacity 0.5s 0.5s ease-out;\n}\n.scrollbar-track.show,\n.scrollbar-track:hover {\n opacity: 1;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n}\n\n.scrollbar-track-x {\n bottom: 0;\n left: 0;\n width: 100%;\n height: 8px;\n}\n.scrollbar-track-y {\n top: 0;\n right: 0;\n width: 8px;\n height: 100%;\n}\n.scrollbar-thumb {\n position: absolute;\n top: 0;\n left: 0;\n width: 8px;\n height: 8px;\n background: rgba(0, 0, 0, .5);\n border-radius: 4px;\n}\n"),
+ document.head && document.head.appendChild(t),
+ (Wa = !0);
+ }
+ }
+ var ja = (function (t) {
+ function e() {
+ return (null !== t && t.apply(this, arguments)) || this;
+ }
+ return (
+ (function (t, e) {
+ function n() {
+ this.constructor = t;
+ }
+ Js(t, e),
+ (t.prototype =
+ null === e
+ ? Object.create(e)
+ : ((n.prototype = e.prototype), new n()));
+ })(e, t),
+ (e.init = function (t, e) {
+ if (!t || 1 !== t.nodeType)
+ throw new TypeError(
+ "expect element to be DOM Element, but got " + t
+ );
+ return Ga(), Va.has(t) ? Va.get(t) : new Ha(t, e);
+ }),
+ (e.initAll = function (t) {
+ return Array.from(
+ document.querySelectorAll("[data-scrollbar]"),
+ function (n) {
+ return e.init(n, t);
+ }
+ );
+ }),
+ (e.has = function (t) {
+ return Va.has(t);
+ }),
+ (e.get = function (t) {
+ return Va.get(t);
+ }),
+ (e.getAll = function () {
+ return Array.from(Va.values());
+ }),
+ (e.destroy = function (t) {
+ var e = Va.get(t);
+ e && e.destroy();
+ }),
+ (e.destroyAll = function () {
+ Va.forEach(function (t) {
+ t.destroy();
+ });
+ }),
+ (e.use = function () {
+ for (var t = [], e = 0; e < arguments.length; e++)
+ t[e] = arguments[e];
+ return La.apply(void 0, t);
+ }),
+ (e.attachStyle = function () {
+ return Ga();
+ }),
+ (e.detachStyle = function () {
+ return (function () {
+ if (Wa && "undefined" != typeof window) {
+ var t = document.getElementById("smooth-scrollbar-style");
+ t && t.parentNode && (t.parentNode.removeChild(t), (Wa = !1));
+ }
+ })();
+ }),
+ (e.version = "8.8.1"),
+ (e.ScrollbarPlugin = Aa),
+ e
+ );
+ })(Ha);
+ function qa(t, e) {
+ return (qa = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ /*!
+ * SmoothScrollbar Disable Plugin
+ *
+ * @version 1.0.1
+ * @author Artem Dordzhiev (Draft)
+ */ var Xa = (function (t) {
+ var e, n;
+ function i() {
+ return t.apply(this, arguments) || this;
+ }
+ return (
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ qa(e, n),
+ (i.prototype.transformDelta = function (t, e) {
+ return this.options.disable ? { x: 0, y: 0 } : t;
+ }),
+ i
+ );
+ })(ja.ScrollbarPlugin);
+ (Xa.pluginName = "Disable"), (Xa.defaultOptions = { disable: !1 });
+ var Ya = Xa;
+ function Za(t, e) {
+ return (Za = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ /*!
+ * SmoothScrollbar SoftScroll Plugin
+ *
+ * @version 1.0.2
+ * @author Artem Dordzhiev (Draft)
+ */ var Ka = (function (t) {
+ var e, n;
+ function i() {
+ return t.apply(this, arguments) || this;
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Za(e, n);
+ var r = i.prototype;
+ return (
+ (r.transformDelta = function (t, e) {
+ var n = t.x > 0 ? 1 : -1,
+ i = t.y > 0 ? 1 : -1;
+ return n === this.lockX || i === this.lockY
+ ? { x: 0, y: 0 }
+ : ((this.lockX = null), (this.lockY = null), t);
+ }),
+ (r.onRender = function (t) {
+ var e = t.x,
+ n = t.y;
+ n < 0 &&
+ !this.lockY &&
+ Math.abs(n) >= this.scrollbar.scrollTop &&
+ (this.scrollbar.setMomentum(0, -this.scrollbar.scrollTop),
+ (this.lockY = -1)),
+ e < 0 &&
+ !this.lockX &&
+ Math.abs(e) >= this.scrollbar.scrollLeft &&
+ (this.scrollbar.setMomentum(-this.scrollbar.scrollLeft, 0),
+ (this.lockX = -1)),
+ e > 0 &&
+ !this.lockX &&
+ Math.abs(e) >=
+ this.scrollbar.limit.x - this.scrollbar.scrollLeft &&
+ (this.scrollbar.setMomentum(
+ this.scrollbar.limit.x - this.scrollbar.scrollLeft,
+ 0
+ ),
+ (this.lockX = 1)),
+ n > 0 &&
+ !this.lockY &&
+ Math.abs(n) >=
+ this.scrollbar.limit.y - this.scrollbar.scrollTop &&
+ (this.scrollbar.setMomentum(
+ 0,
+ this.scrollbar.limit.y - this.scrollbar.scrollTop
+ ),
+ (this.lockY = 1)),
+ 0 === n && (this.lockY = null),
+ 0 === e && (this.lockX = null);
+ }),
+ i
+ );
+ })(ja.ScrollbarPlugin);
+ Ka.pluginName = "SoftScroll";
+ var Ja = Ka;
+ function Qa(t, e) {
+ return (Qa = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ /*!
+ * SmoothScrollbar GSAP ScrollTrigger Plugin
+ *
+ * @version 1.0.5
+ * @author Artem Dordzhiev (Draft)
+ */ Hi.registerPlugin(Ss);
+ var $a = {
+ el: document.body,
+ vars: {
+ scrollTop: function (t) {
+ return (
+ arguments.length && ($a.scrollbar.scrollTop = t),
+ $a.scrollbar.scrollTop
+ );
+ },
+ scrollLeft: function (t) {
+ return (
+ arguments.length && ($a.scrollbar.scrollLeft = t),
+ $a.scrollbar.scrollLeft
+ );
+ },
+ getBoundingClientRect: function () {
+ return {
+ top: 0,
+ left: 0,
+ width: window.innerWidth,
+ height: window.innerHeight,
+ };
+ },
+ pinType: "transform",
+ },
+ },
+ tl = (function (t) {
+ var e, n;
+ function i(e, n) {
+ var i;
+ return (
+ (i = t.call(this, e, n) || this),
+ ($a.scrollbar = e),
+ Ss.scrollerProxy($a.el, $a.vars),
+ Ss.defaults({ pinType: "transform" }),
+ e.addListener(Ss.update),
+ i
+ );
+ }
+ return (
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Qa(e, n),
+ i
+ );
+ })(ja.ScrollbarPlugin);
+ tl.pluginName = "ScrollTrigger";
+ var el = tl;
+ function nl(t, e) {
+ return (nl = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ Hi.registerPlugin(Ks), ja.use(Ya, Ja, el);
+ var il = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ (e = t.apply(this, arguments) || this).bindNativeScrolling(),
+ e.initSmoothScrolling(),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ nl(e, n);
+ var r = i.prototype;
+ return (
+ (r.bindNativeScrolling = function () {
+ var t = this;
+ (this.nativeScrollEvent = function () {
+ return t.app.trigger(
+ "scrolling",
+ window.pageYOffset,
+ window.pageXOffset
+ );
+ }),
+ window.addEventListener("scroll", this.nativeScrollEvent);
+ }),
+ (r.initSmoothScrolling = function () {
+ var t = this;
+ window.matchMedia("(pointer:fine)").matches &&
+ ((this.ssb = ja.init(this.el, {
+ continuousScrolling: !1,
+ renderByPixels: !0,
+ damping: 0.08,
+ })),
+ this.ssb.addListener(function (e) {
+ return t.app.trigger("scrolling", e.offset.y, e.offset.x);
+ }),
+ document.documentElement.classList.add("smooth"));
+ }),
+ (r.destroySmoothScrolling = function () {
+ this.ssb.destroy(),
+ (this.ssb = null),
+ document.documentElement.classList.remove("smooth");
+ }),
+ (r.scrollEnable = function () {
+ document.documentElement.classList.remove("no-scroll"),
+ this.ssb &&
+ this.ssb.updatePluginOptions("Disable", { disable: !1 });
+ }),
+ (r.scrollDisable = function () {
+ document.documentElement.classList.add("no-scroll"),
+ this.ssb &&
+ this.ssb.updatePluginOptions("Disable", { disable: !0 });
+ }),
+ (r.scrollTop = function () {
+ return this.ssb ? this.ssb.scrollTop : window.pageYOffset;
+ }),
+ (r.scrollLeft = function () {
+ return this.ssb ? this.ssb.scrollLeft : window.pageXOffset;
+ }),
+ (r.scrollHeight = function () {
+ return this.ssb
+ ? this.ssb.limit.y
+ : document.documentElement.scrollHeight;
+ }),
+ (r.scrollWidth = function () {
+ return this.ssb
+ ? this.ssb.limit.x
+ : document.documentElement.scrollWidth;
+ }),
+ (r.scrollTo = function (t, e, n) {
+ void 0 === e && (e = 0),
+ void 0 === n && (n = {}),
+ (t += (n = Object.assign(
+ {},
+ {
+ offsetY: 0,
+ offsetX: 0,
+ duration: 0.3,
+ callback: null,
+ ease: null,
+ },
+ n
+ )).offsetY),
+ (e += n.offsetX),
+ this.ssb
+ ? this.ssb.scrollTo(e, t, 1e3 * n.duration, {
+ callback: n.callback,
+ easing: n.ease,
+ })
+ : Ks
+ ? Hi.to(window, {
+ scrollTo: { y: t, x: e, autoKill: !1 },
+ ease: n.ease,
+ duration: n.duration,
+ onComplete: n.callback,
+ })
+ : window.scrollTo({
+ top: t,
+ left: e,
+ behavior: n.duration ? "smooth" : "instant",
+ });
+ }),
+ (r.scrollToTarget = function (t, e) {
+ var n = this.app.query(t);
+ if (n) {
+ var i = n.getBoundingClientRect(),
+ r = i.top + this.scrollTop(),
+ o = i.left + this.scrollLeft();
+ this.scrollTo(r, o, e);
+ }
+ }),
+ (r.scrollToHash = function () {
+ window.location.hash &&
+ (this.ssb && this.ssb.update(),
+ this.scrollToTarget(
+ "#section-" + window.location.hash.substr(1),
+ { duration: 0 }
+ ));
+ }),
+ (r.loadLazyImages = function () {
+ this.el.querySelectorAll("img[loading=lazy]").forEach(function (t) {
+ t.setAttribute("loading", "eager");
+ });
+ }),
+ (r.onEnter = function () {
+ try {
+ return this.scrollToHash(), Promise.resolve();
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.onComplete = function () {
+ try {
+ var t = this;
+ return (
+ setTimeout(function () {
+ return t.loadLazyImages();
+ }, 3e3),
+ Promise.resolve()
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.onLeave = function () {
+ try {
+ return (
+ this.scrollEnable(),
+ Ss && (Ss.killAll(), Ss.clearScrollMemory()),
+ Promise.resolve()
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.onDestroy = function () {
+ try {
+ return (
+ this.ssb && this.destroySmoothScrolling(),
+ window.removeEventListener("scroll", this.nativeScrollEvent),
+ Promise.resolve()
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ i
+ );
+ })(o),
+ rl = (function () {
+ function t(e) {
+ void 0 === e && (e = {}),
+ (this.options = Object.assign(
+ {},
+ {
+ el: null,
+ container: document.body,
+ className: "mf-cursor",
+ innerClassName: "mf-cursor-inner",
+ textClassName: "mf-cursor-text",
+ mediaClassName: "mf-cursor-media",
+ mediaBoxClassName: "mf-cursor-media-box",
+ iconSvgClassName: "mf-svgsprite",
+ iconSvgNamePrefix: "-",
+ iconSvgSrc: "",
+ dataAttr: "cursor",
+ hiddenState: "-hidden",
+ textState: "-text",
+ iconState: "-icon",
+ activeState: "-active",
+ mediaState: "-media",
+ stateDetection: { "-pointer": "a,button" },
+ visible: !0,
+ visibleOnState: !1,
+ speed: 0.55,
+ ease: "expo.out",
+ overwrite: !0,
+ skewing: 0,
+ skewingText: 2,
+ skewingIcon: 2,
+ skewingMedia: 2,
+ skewingDelta: 0.001,
+ skewingDeltaMax: 0.15,
+ stickDelta: 0.15,
+ showTimeout: 0,
+ hideOnLeave: !0,
+ hideTimeout: 300,
+ hideMediaTimeout: 300,
+ initialPos: [-window.innerWidth, -window.innerHeight],
+ },
+ e
+ )),
+ this.options.visible &&
+ null == e.stateDetection &&
+ (this.options.stateDetection["-hidden"] = "iframe"),
+ (this.gsap = t.gsap || window.gsap),
+ (this.el =
+ "string" == typeof this.options.el
+ ? document.querySelector(this.options.el)
+ : this.options.el),
+ (this.container =
+ "string" == typeof this.options.container
+ ? document.querySelector(this.options.container)
+ : this.options.container),
+ (this.skewing = this.options.skewing),
+ (this.pos = {
+ x: this.options.initialPos[0],
+ y: this.options.initialPos[1],
+ }),
+ (this.vel = { x: 0, y: 0 }),
+ (this.event = {}),
+ (this.events = []),
+ this.init();
+ }
+ t.registerGSAP = function (e) {
+ t.gsap = e;
+ };
+ var e = t.prototype;
+ return (
+ (e.init = function () {
+ this.el || this.create(),
+ this.createSetter(),
+ this.bind(),
+ this.render(!0),
+ (this.ticker = this.render.bind(this, !1)),
+ this.gsap.ticker.add(this.ticker);
+ }),
+ (e.create = function () {
+ (this.el = document.createElement("div")),
+ (this.el.className = this.options.className),
+ this.el.classList.add(this.options.hiddenState),
+ (this.inner = document.createElement("div")),
+ (this.inner.className = this.options.innerClassName),
+ (this.text = document.createElement("div")),
+ (this.text.className = this.options.textClassName),
+ (this.media = document.createElement("div")),
+ (this.media.className = this.options.mediaClassName),
+ (this.mediaBox = document.createElement("div")),
+ (this.mediaBox.className = this.options.mediaBoxClassName),
+ this.media.appendChild(this.mediaBox),
+ this.inner.appendChild(this.media),
+ this.inner.appendChild(this.text),
+ this.el.appendChild(this.inner),
+ this.container.appendChild(this.el);
+ }),
+ (e.createSetter = function () {
+ this.setter = {
+ x: this.gsap.quickSetter(this.el, "x", "px"),
+ y: this.gsap.quickSetter(this.el, "y", "px"),
+ rotation: this.gsap.quickSetter(this.el, "rotation", "deg"),
+ scaleX: this.gsap.quickSetter(this.el, "scaleX"),
+ scaleY: this.gsap.quickSetter(this.el, "scaleY"),
+ wc: this.gsap.quickSetter(this.el, "willChange"),
+ inner: {
+ rotation: this.gsap.quickSetter(this.inner, "rotation", "deg"),
+ },
+ };
+ }),
+ (e.bind = function () {
+ var t = this;
+ (this.event.mouseleave = function () {
+ return t.hide();
+ }),
+ (this.event.mouseenter = function () {
+ return t.show();
+ }),
+ (this.event.mousedown = function () {
+ return t.addState(t.options.activeState);
+ }),
+ (this.event.mouseup = function () {
+ return t.removeState(t.options.activeState);
+ }),
+ (this.event.mousemoveOnce = function () {
+ return t.show();
+ }),
+ (this.event.mousemove = function (e) {
+ t.gsap.to(t.pos, {
+ x: t.stick
+ ? t.stick.x - (t.stick.x - e.clientX) * t.options.stickDelta
+ : e.clientX,
+ y: t.stick
+ ? t.stick.y - (t.stick.y - e.clientY) * t.options.stickDelta
+ : e.clientY,
+ overwrite: t.options.overwrite,
+ ease: t.options.ease,
+ duration: t.visible ? t.options.speed : 0,
+ onUpdate: function () {
+ return (t.vel = {
+ x: e.clientX - t.pos.x,
+ y: e.clientY - t.pos.y,
+ });
+ },
+ });
+ }),
+ (this.event.mouseover = function (e) {
+ for (
+ var n = e.target;
+ n &&
+ n !== t.container &&
+ (!e.relatedTarget || !n.contains(e.relatedTarget));
+ n = n.parentNode
+ ) {
+ for (var i in t.options.stateDetection)
+ n.matches(t.options.stateDetection[i]) && t.addState(i);
+ if (t.options.dataAttr) {
+ var r = t.getFromDataset(n);
+ r.state && t.addState(r.state),
+ r.text && t.setText(r.text),
+ r.icon && t.setIcon(r.icon),
+ r.img && t.setImg(r.img),
+ r.video && t.setVideo(r.video),
+ void 0 !== r.show && t.show(),
+ void 0 !== r.stick && t.setStick(r.stick || n);
+ }
+ }
+ }),
+ (this.event.mouseout = function (e) {
+ for (
+ var n = e.target;
+ n &&
+ n !== t.container &&
+ (!e.relatedTarget || !n.contains(e.relatedTarget));
+ n = n.parentNode
+ ) {
+ for (var i in t.options.stateDetection)
+ n.matches(t.options.stateDetection[i]) && t.removeState(i);
+ if (t.options.dataAttr) {
+ var r = t.getFromDataset(n);
+ r.state && t.removeState(r.state),
+ r.text && t.removeText(),
+ r.icon && t.removeIcon(),
+ r.img && t.removeImg(),
+ r.video && t.removeVideo(),
+ void 0 !== r.show && t.hide(),
+ void 0 !== r.stick && t.removeStick();
+ }
+ }
+ }),
+ this.options.hideOnLeave &&
+ this.container.addEventListener(
+ "mouseleave",
+ this.event.mouseleave,
+ { passive: !0 }
+ ),
+ this.options.visible &&
+ this.container.addEventListener(
+ "mouseenter",
+ this.event.mouseenter,
+ { passive: !0 }
+ ),
+ this.options.activeState &&
+ (this.container.addEventListener(
+ "mousedown",
+ this.event.mousedown,
+ { passive: !0 }
+ ),
+ this.container.addEventListener("mouseup", this.event.mouseup, {
+ passive: !0,
+ })),
+ this.container.addEventListener(
+ "mousemove",
+ this.event.mousemove,
+ { passive: !0 }
+ ),
+ this.options.visible &&
+ this.container.addEventListener(
+ "mousemove",
+ this.event.mousemoveOnce,
+ { passive: !0, once: !0 }
+ ),
+ (this.options.stateDetection || this.options.dataAttr) &&
+ (this.container.addEventListener(
+ "mouseover",
+ this.event.mouseover,
+ { passive: !0 }
+ ),
+ this.container.addEventListener(
+ "mouseout",
+ this.event.mouseout,
+ { passive: !0 }
+ ));
+ }),
+ (e.render = function (t) {
+ if (!0 === t || (0 !== this.vel.y && 0 !== this.vel.x)) {
+ if (
+ (this.trigger("render"),
+ this.setter.wc("transform"),
+ this.setter.x(this.pos.x),
+ this.setter.y(this.pos.y),
+ this.skewing)
+ ) {
+ var e = Math.sqrt(
+ Math.pow(this.vel.x, 2) + Math.pow(this.vel.y, 2)
+ ),
+ n =
+ Math.min(
+ e * this.options.skewingDelta,
+ this.options.skewingDeltaMax
+ ) * this.skewing,
+ i = (180 * Math.atan2(this.vel.y, this.vel.x)) / Math.PI;
+ this.setter.rotation(i),
+ this.setter.scaleX(1 + n),
+ this.setter.scaleY(1 - n),
+ this.setter.inner.rotation(-i);
+ }
+ } else this.setter.wc("auto");
+ }),
+ (e.show = function () {
+ var t = this;
+ this.trigger("show"),
+ clearInterval(this.visibleInt),
+ (this.visibleInt = setTimeout(function () {
+ t.el.classList.remove(t.options.hiddenState),
+ (t.visible = !0),
+ t.render(!0);
+ }, this.options.showTimeout));
+ }),
+ (e.hide = function () {
+ var t = this;
+ this.trigger("hide"),
+ clearInterval(this.visibleInt),
+ this.el.classList.add(this.options.hiddenState),
+ (this.visibleInt = setTimeout(function () {
+ return (t.visible = !1);
+ }, this.options.hideTimeout));
+ }),
+ (e.toggle = function (t) {
+ !0 === t || (!1 !== t && !this.visible) ? this.show() : this.hide();
+ }),
+ (e.addState = function (t) {
+ var e;
+ if ((this.trigger("addState", t), t === this.options.hiddenState))
+ return this.hide();
+ (e = this.el.classList).add.apply(e, t.split(" ")),
+ this.options.visibleOnState && this.show();
+ }),
+ (e.removeState = function (t) {
+ var e;
+ if (
+ (this.trigger("removeState", t), t === this.options.hiddenState)
+ )
+ return this.show();
+ (e = this.el.classList).remove.apply(e, t.split(" ")),
+ this.options.visibleOnState &&
+ this.el.className === this.options.className &&
+ this.hide();
+ }),
+ (e.toggleState = function (t, e) {
+ !0 === e || (!1 !== e && !this.el.classList.contains(t))
+ ? this.addState(t)
+ : this.removeState(t);
+ }),
+ (e.setSkewing = function (t) {
+ this.gsap.to(this, { skewing: t });
+ }),
+ (e.removeSkewing = function () {
+ this.gsap.to(this, { skewing: this.options.skewing });
+ }),
+ (e.setStick = function (t) {
+ var e = (
+ "string" == typeof t ? document.querySelector(t) : t
+ ).getBoundingClientRect();
+ this.stick = { y: e.top + e.height / 2, x: e.left + e.width / 2 };
+ }),
+ (e.removeStick = function () {
+ this.stick = !1;
+ }),
+ (e.setText = function (t) {
+ (this.text.innerHTML = t),
+ this.addState(this.options.textState),
+ this.setSkewing(this.options.skewingText);
+ }),
+ (e.removeText = function () {
+ this.removeState(this.options.textState), this.removeSkewing();
+ }),
+ (e.setIcon = function (t, e) {
+ void 0 === e && (e = ""),
+ (this.text.innerHTML =
+ ""),
+ this.addState(this.options.iconState),
+ this.setSkewing(this.options.skewingIcon);
+ }),
+ (e.removeIcon = function () {
+ this.removeState(this.options.iconState), this.removeSkewing();
+ }),
+ (e.setMedia = function (t) {
+ var e = this;
+ clearTimeout(this.mediaInt),
+ t &&
+ ((this.mediaBox.innerHTML = ""), this.mediaBox.appendChild(t)),
+ (this.mediaInt = setTimeout(function () {
+ return e.addState(e.options.mediaState);
+ }, 20)),
+ this.setSkewing(this.options.skewingMedia);
+ }),
+ (e.removeMedia = function () {
+ var t = this;
+ clearTimeout(this.mediaInt),
+ this.removeState(this.options.mediaState),
+ (this.mediaInt = setTimeout(function () {
+ return (t.mediaBox.innerHTML = "");
+ }, this.options.hideMediaTimeout)),
+ this.removeSkewing();
+ }),
+ (e.setImg = function (t) {
+ this.mediaImg || (this.mediaImg = new Image()),
+ this.mediaImg.src !== t && (this.mediaImg.src = t),
+ this.setMedia(this.mediaImg);
+ }),
+ (e.removeImg = function () {
+ this.removeMedia();
+ }),
+ (e.setVideo = function (t) {
+ this.mediaVideo ||
+ ((this.mediaVideo = document.createElement("video")),
+ (this.mediaVideo.muted = !0),
+ (this.mediaVideo.loop = !0),
+ (this.mediaVideo.autoplay = !0)),
+ this.mediaVideo.src !== t &&
+ ((this.mediaVideo.src = t), this.mediaVideo.load()),
+ this.mediaVideo.play(),
+ this.setMedia(this.mediaVideo);
+ }),
+ (e.removeVideo = function () {
+ this.mediaVideo &&
+ this.mediaVideo.readyState > 2 &&
+ this.mediaVideo.pause(),
+ this.removeMedia();
+ }),
+ (e.on = function (t, e) {
+ this.events[t] instanceof Array || this.off(t),
+ this.events[t].push(e);
+ }),
+ (e.off = function (t, e) {
+ this.events[t] = e
+ ? this.events[t].filter(function (t) {
+ return t !== e;
+ })
+ : [];
+ }),
+ (e.trigger = function (t) {
+ var e = arguments,
+ n = this;
+ this.events[t] &&
+ this.events[t].forEach(function (t) {
+ return t.call.apply(t, [n, n].concat([].slice.call(e, 1)));
+ });
+ }),
+ (e.getFromDataset = function (t) {
+ var e = t.dataset;
+ return {
+ state: e[this.options.dataAttr],
+ show: e[this.options.dataAttr + "Show"],
+ text: e[this.options.dataAttr + "Text"],
+ icon: e[this.options.dataAttr + "Icon"],
+ img: e[this.options.dataAttr + "Img"],
+ video: e[this.options.dataAttr + "Video"],
+ stick: e[this.options.dataAttr + "Stick"],
+ };
+ }),
+ (e.destroy = function () {
+ this.trigger("destroy"),
+ this.gsap.ticker.remove(this.ticker),
+ this.container.removeEventListener(
+ "mouseleave",
+ this.event.mouseleave
+ ),
+ this.container.removeEventListener(
+ "mouseenter",
+ this.event.mouseenter
+ ),
+ this.container.removeEventListener(
+ "mousedown",
+ this.event.mousedown
+ ),
+ this.container.removeEventListener("mouseup", this.event.mouseup),
+ this.container.removeEventListener(
+ "mousemove",
+ this.event.mousemove
+ ),
+ this.container.removeEventListener(
+ "mousemove",
+ this.event.mousemoveOnce
+ ),
+ this.container.removeEventListener(
+ "mouseover",
+ this.event.mouseover
+ ),
+ this.container.removeEventListener(
+ "mouseout",
+ this.event.mouseout
+ ),
+ this.el &&
+ (this.container.removeChild(this.el),
+ (this.el = null),
+ (this.mediaImg = null),
+ (this.mediaVideo = null));
+ }),
+ t
+ );
+ })();
+ /*!
+ * Cuberto Mouse Follower
+ * https://cuberto.com/
+ *
+ * @version 1.1.2
+ * @author Cuberto, Artem Dordzhiev (Draft)
+ */ function ol(t, e) {
+ return (ol = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ rl.registerGSAP(Hi);
+ var sl = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (e = t.apply(this, arguments) || this).initFollower(), e;
+ }
+ return (
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ ol(e, n),
+ (i.prototype.initFollower = function () {
+ window.matchMedia("(pointer:fine)").matches &&
+ (this.follower = new rl({
+ className: "cb-cursor",
+ innerClassName: "cb-cursor-inner",
+ textClassName: "cb-cursor-text",
+ mediaClassName: "cb-cursor-media",
+ mediaBoxClassName: "cb-cursor-media-box",
+ iconSvgClassName: "cb-svgsprite",
+ iconSvgSrc: "/assets/img/sprites/svgsprites.svg",
+ skewing: 1.5,
+ skewingMedia: 1.5,
+ }));
+ }),
+ i
+ );
+ })(o);
+ function al(t, e) {
+ return (al = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var ll = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).fill = e.el.querySelectorAll(
+ ".cb-loader_overlay-fill"
+ )),
+ (e.word = e.el.querySelectorAll(".cb-loader_overlay-word")),
+ (e.wordSpan = e.el.querySelectorAll(".cb-loader_overlay-word span")),
+ (e.percent = e.el.querySelector(".cb-loader_overlay-percent")),
+ (e.percentSpan = e.el.querySelector(
+ ".cb-loader_overlay-percent span"
+ )),
+ (e.loaded = !1),
+ (e.hideTl = e.tlHide()),
+ (e.showTl = e.tlShow()),
+ (e.movementTl = e.tlMovement()),
+ e.reset(),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ al(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ var t = this;
+ return Promise.resolve(document.fonts.ready).then(function () {
+ return Promise.resolve(t.show()).then(function () {});
+ });
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.onEnter = function () {
+ try {
+ var t = this;
+ return (
+ (t.loaded = !0),
+ Promise.resolve(
+ new Promise(function (e) {
+ return (t.enterResolver = e);
+ })
+ ).then(function () {})
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.onLeave = function () {
+ try {
+ return this.show(), Promise.resolve();
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.show = function () {
+ try {
+ return (
+ document.documentElement.classList.add("loader"),
+ Promise.resolve(this.showTl.play(0)).then(function () {})
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.hide = function () {
+ try {
+ return (
+ document.documentElement.classList.remove("loader"),
+ this.showTl.pause(),
+ this.movementTl.pause(),
+ Promise.resolve(this.hideTl.play(0)).then(function () {})
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.add = function (t) {
+ void 0 === t && (t = 1), (this.count.total = this.count.total + t);
+ }),
+ (r.tick = function () {
+ this.count.current++,
+ (this.count.progress = this.count.current / this.count.total),
+ (this.count.percent = 100 * this.count.progress),
+ this.count.percent > this.count.percentLast &&
+ this.val(this.count.percent);
+ }),
+ (r.reset = function () {
+ (this.count = {
+ total: 0,
+ current: 0,
+ progress: 0,
+ percent: 0,
+ percentLast: 0,
+ }),
+ this.val(0);
+ }),
+ (r.val = function (t) {
+ this.percentSpan.innerHTML = Math.floor(t) + "%";
+ }),
+ (r.hideIfLoaded = function () {
+ this.loaded && this.hide();
+ }),
+ (r.tlShow = function () {
+ var t = this,
+ e = new Hi.timeline({ paused: !0 });
+ return (
+ e.fromTo(
+ [this.wordSpan, this.percentSpan],
+ { y: "105%" },
+ { y: "0%", duration: 1.8, stagger: 0.15, ease: "expo.out" }
+ ),
+ e.add(function () {
+ t.loaded
+ ? e.add(function () {
+ return t.hide();
+ }, "-=0.7")
+ : t.movementTl.play();
+ }, "-=1"),
+ e
+ );
+ }),
+ (r.tlHide = function () {
+ var t = this,
+ e = new Hi.timeline({ paused: !0 });
+ return (
+ e.fromTo(
+ [this.wordSpan, this.percentSpan],
+ { y: "0%" },
+ { y: "-105%", duration: 1.8, stagger: 0.07, ease: "expo.inOut" }
+ ),
+ e.to(this.fill, { opacity: 0 }, 0.7),
+ e.add(function () {
+ return t.enterResolver();
+ }, 1.1),
+ e.set(this.el, { pointerEvents: "none" }, 1),
+ e.set(this.el, { display: "none" }),
+ e
+ );
+ }),
+ (r.tlMovement = function () {
+ var t = this,
+ e = new Hi.timeline({ repeat: -1, paused: !0 });
+ // Check if the body has the class "rtl-div"
+ var isRtl = document.body.classList.contains("rtl-div");
+
+ // Set x values based on the presence of "rtl-div" class
+ // var xValue1 = isRtl ? "-25%" : "0%";
+ // var xValue2 = isRtl ? "48%" : "25%";
+ // var xValue3 = isRtl ? "20%" : "0%";
+ // var xValue4 = isRtl ? "56.7%" : "0%";
+ return (
+ e.to(this.word[0], { x: isRtl ? "0%" : "0%", duration: 1.8, ease: "expo.out" }, 0),
+ e.to(
+ this.word[1],
+ { x: isRtl ? "-25%" : "25%", duration: 2, ease: "expo.out" },
+ "-=1.8"
+ ),
+ e.add(function () {
+ return t.hideIfLoaded();
+ }, "-=0.8"),
+ e.to(
+ this.word[0],
+ { y: "100%", duration: 1.8, ease: "expo.out" },
+ "-=0.8"
+ ),
+ e.add(function () {
+ return t.hideIfLoaded();
+ }, "-=0.9"),
+ e.to(
+ this.word[0],
+ { x: isRtl ? "-25%" : "25%", duration: 1.8, ease: "expo.out" },
+ "-=0.7"
+ ),
+ e.to(
+ this.word[1],
+ { x: isRtl ? "-48%" : "48%", duration: 1.8, ease: "expo.out" },
+ "-=2"
+ ),
+ e.to(
+ this.word[2],
+ { x: isRtl ? "0%" : "0%", duration: 1.8, ease: "expo.out" },
+ "-=1.8"
+ ),
+ e.to(
+ this.word[3],
+ { x: isRtl ? "-8%" : "8%", duration: 1.8, ease: "expo.out" },
+ "-=1.4"
+ ),
+ e.add(function () {
+ return t.hideIfLoaded();
+ }, "-=0.8"),
+ e.to(
+ this.word[0],
+ { x: isRtl ? "0%" : "0%", duration: 1.8, ease: "expo.out" },
+ "-=0.7"
+ ),
+ e.to(
+ this.word[1],
+ { x: isRtl ? "-25%" : "25%", duration: 1.8, ease: "expo.out" },
+ "-=1.6"
+ ),
+ e.to(
+ this.word[2],
+ { x: isRtl ? "-20%" : "20%", duration: 1.8, ease: "expo.out" },
+ "-=1.8"
+ ),
+ e.to(
+ this.word[3],
+ { x: isRtl ? "0%" : "0%", duration: 1.8, ease: "expo.out" },
+ "-=1.8"
+ ),
+ e.add(function () {
+ return t.hideIfLoaded();
+ }, "-=0.8"),
+ e.to(
+ this.word[0],
+ { y: "0%", duration: 1.8, ease: "expo.out" },
+ "-=0.8"
+ ),
+ e.to(
+ this.word[0],
+ { x: isRtl ? "-17%" : "17%", duration: 1.8, ease: "expo.out" },
+ "-=0.7"
+ ),
+ e.to(
+ this.word[1],
+ { x: isRtl ? "-5%" : "5%", duration: 1.8, ease: "expo.out" },
+ "-=1.8"
+ ),
+ e.to(
+ this.word[2],
+ { x: isRtl ? "-56.7%" : "56.7%", duration: 1.8, ease: "expo.out" },
+ "-=2"
+ ),
+ e.to(
+ this.word[3],
+ { x: isRtl ? "0%" : "0%", duration: 1.8, ease: "expo.out" },
+ "-=1.8"
+ ),
+ e.add(function () {
+ return t.hideIfLoaded();
+ }, "-=0.8"),
+ e
+ );
+ }),
+ i
+ );
+ })(o);
+ var ul = function (t) {
+ var e = typeof t;
+ return null != t && ("object" == e || "function" == e);
+ },
+ cl = n(90),
+ hl = "object" == typeof self && self && self.Object === Object && self,
+ dl = cl.a || hl || Function("return this")(),
+ fl = function () {
+ return dl.Date.now();
+ },
+ pl = /\s/;
+ var ml = function (t) {
+ for (var e = t.length; e-- && pl.test(t.charAt(e)); );
+ return e;
+ },
+ gl = /^\s+/;
+ var vl = function (t) {
+ return t ? t.slice(0, ml(t) + 1).replace(gl, "") : t;
+ },
+ _l = dl.Symbol,
+ xl = Object.prototype,
+ yl = xl.hasOwnProperty,
+ bl = xl.toString,
+ wl = _l ? _l.toStringTag : void 0;
+ var Sl = function (t) {
+ var e = yl.call(t, wl),
+ n = t[wl];
+ try {
+ t[wl] = void 0;
+ var i = !0;
+ } catch (t) {}
+ var r = bl.call(t);
+ return i && (e ? (t[wl] = n) : delete t[wl]), r;
+ },
+ Ml = Object.prototype.toString;
+ var Dl = function (t) {
+ return Ml.call(t);
+ },
+ Tl = _l ? _l.toStringTag : void 0;
+ var El = function (t) {
+ return null == t
+ ? void 0 === t
+ ? "[object Undefined]"
+ : "[object Null]"
+ : Tl && Tl in Object(t)
+ ? Sl(t)
+ : Dl(t);
+ };
+ var Cl = function (t) {
+ return null != t && "object" == typeof t;
+ };
+ var Al = function (t) {
+ return "symbol" == typeof t || (Cl(t) && "[object Symbol]" == El(t));
+ },
+ Pl = /^[-+]0x[0-9a-f]+$/i,
+ Ll = /^0b[01]+$/i,
+ Rl = /^0o[0-7]+$/i,
+ Ol = parseInt;
+ var Fl = function (t) {
+ if ("number" == typeof t) return t;
+ if (Al(t)) return NaN;
+ if (ul(t)) {
+ var e = "function" == typeof t.valueOf ? t.valueOf() : t;
+ t = ul(e) ? e + "" : e;
+ }
+ if ("string" != typeof t) return 0 === t ? t : +t;
+ t = vl(t);
+ var n = Ll.test(t);
+ return n || Rl.test(t)
+ ? Ol(t.slice(2), n ? 2 : 8)
+ : Pl.test(t)
+ ? NaN
+ : +t;
+ },
+ Il = Math.max,
+ Nl = Math.min;
+ var zl = function (t, e, n) {
+ var i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ u = 0,
+ c = !1,
+ h = !1,
+ d = !0;
+ if ("function" != typeof t) throw new TypeError("Expected a function");
+ function f(e) {
+ var n = i,
+ o = r;
+ return (i = r = void 0), (u = e), (s = t.apply(o, n));
+ }
+ function p(t) {
+ return (u = t), (a = setTimeout(g, e)), c ? f(t) : s;
+ }
+ function m(t) {
+ var n = t - l;
+ return void 0 === l || n >= e || n < 0 || (h && t - u >= o);
+ }
+ function g() {
+ var t = fl();
+ if (m(t)) return v(t);
+ a = setTimeout(
+ g,
+ (function (t) {
+ var n = e - (t - l);
+ return h ? Nl(n, o - (t - u)) : n;
+ })(t)
+ );
+ }
+ function v(t) {
+ return (a = void 0), d && i ? f(t) : ((i = r = void 0), s);
+ }
+ function _() {
+ var t = fl(),
+ n = m(t);
+ if (((i = arguments), (r = this), (l = t), n)) {
+ if (void 0 === a) return p(l);
+ if (h) return clearTimeout(a), (a = setTimeout(g, e)), f(l);
+ }
+ return void 0 === a && (a = setTimeout(g, e)), s;
+ }
+ return (
+ (e = Fl(e) || 0),
+ ul(n) &&
+ ((c = !!n.leading),
+ (o = (h = "maxWait" in n) ? Il(Fl(n.maxWait) || 0, e) : o),
+ (d = "trailing" in n ? !!n.trailing : d)),
+ (_.cancel = function () {
+ void 0 !== a && clearTimeout(a), (u = 0), (i = l = r = a = void 0);
+ }),
+ (_.flush = function () {
+ return void 0 === a ? s : v(fl());
+ }),
+ _
+ );
+ };
+ function kl(t, e) {
+ return (kl = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Ul = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ (e = t.apply(this, arguments) || this).injectSvg(),
+ e.bindMouseMove(),
+ e.bindResizeObserver(),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ kl(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ var t = this;
+ return Promise.resolve(t.app.wait("loader")).then(function () {
+ t.magicShow();
+ });
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.magicShow = function () {
+ Ss.create({ trigger: this.el, animation: this.tlShow() });
+ }),
+ (r.tlShow = function () {
+ var t = new Hi.timeline();
+ return (
+ t.set(this.svg, { transformOrigin: "left center" }),
+ t.from(this.svg, { scaleX: 0, duration: 3, ease: "expo.out" }),
+ t
+ );
+ }),
+ (r.getPathD = function (t, e, n) {
+ return (
+ t || (t = this.el.offsetWidth / 2),
+ e || (e = 100),
+ void 0 === n && (n = this.el.offsetWidth),
+ "M0,100 Q" + t + "," + e + " " + n + ",100"
+ );
+ }),
+ (r.injectSvg = function () {
+ (this.el.innerHTML =
+ ""),
+ (this.svg = this.el.querySelector("svg")),
+ (this.path = this.el.querySelector("path"));
+ }),
+ (r.update = function () {
+ Hi.killTweensOf(this.path),
+ this.path.setAttribute("d", this.getPathD());
+ }),
+ (r.bindMouseMove = function () {
+ var t = this;
+ if (!Ss.isTouch) {
+ var e = 0;
+ this.el.addEventListener("mousemove", function (n) {
+ var i = t.svg.getBoundingClientRect(),
+ r = n.pageX - i.left,
+ o = n.pageY - i.top;
+ e || (e = o < 100 ? 50 : -50);
+ var s = r,
+ a = 2 * o - 100 + e;
+ Hi.to(t.path, {
+ attr: { d: t.getPathD(s, a) },
+ duration: 0.2,
+ overwrite: !0,
+ });
+ }),
+ this.el.addEventListener("mouseleave", function () {
+ (e = 0),
+ Hi.to(t.path, {
+ attr: { d: t.getPathD() },
+ duration: 2,
+ ease: "elastic.out(1, 0.2)",
+ });
+ });
+ }
+ }),
+ (r.bindResizeObserver = function () {
+ var t = this;
+ (this.updateDebounced = zl(this.update.bind(this), 30)),
+ (this.resizeObserver = new ResizeObserver(function () {
+ return t.updateDebounced();
+ })),
+ this.resizeObserver.observe(this.el);
+ }),
+ i
+ );
+ })(o);
+ function Bl(t, e) {
+ return (Bl = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Vl = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).layout = e.app.get("layout")),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Bl(e, n);
+ var r = i.prototype;
+ return (
+ (r.bindModalOpen = function () {
+ var t = this;
+ this.el.dataset.modalOpen &&
+ this.el.addEventListener("click", function (e) {
+ var n = t.app.find(t.el.dataset.modalOpen, "modal");
+ n && (e.preventDefault(), e.stopPropagation(), n.open());
+ });
+ }),
+ (r.bindScrollTo = function () {
+ var t = this;
+ this.el.dataset.scrollTo ||
+ this.el.addEventListener("click", function (e) {
+ e.preventDefault(),
+ e.stopPropagation(),
+ t.layout.scrollToTarget(t.el.dataset.scrollTo);
+ });
+ }),
+ i
+ );
+ })(o);
+ function Hl(t, e) {
+ return (Hl = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Wl = (function (t) {
+ var e, n;
+ function i() {
+ return t.apply(this, arguments) || this;
+ }
+ return (
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Hl(e, n),
+ i
+ );
+ })(o),
+ Gl =
+ /([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;
+ /*!
+ * strings: 3.11.1
+ * https://greensock.com
+ *
+ * Copyright 2008-2022, GreenSock. All rights reserved.
+ * Subject to the terms at https://greensock.com/standard-license or for
+ * Club GreenSock members, the agreement issued with that membership.
+ * @author: Jack Doyle, jack@greensock.com
+ */
+ /*!
+ * SplitText: 3.11.1
+ * https://greensock.com
+ *
+ * @license Copyright 2008-2022, GreenSock. All rights reserved.
+ * Subject to the terms at https://greensock.com/standard-license or for
+ * Club GreenSock members, the agreement issued with that membership.
+ * @author: Jack Doyle, jack@greensock.com
+ */ var jl,
+ ql,
+ Xl,
+ Yl = /(?:\r|\n|\t\t)/g,
+ Zl = /(?:\s\s+)/g,
+ Kl = function (t) {
+ return ql.getComputedStyle(t);
+ },
+ Jl = Array.isArray,
+ Ql = [].slice,
+ $l = function (t, e) {
+ var n;
+ return Jl(t)
+ ? t
+ : "string" == (n = typeof t) && !e && t
+ ? Ql.call(jl.querySelectorAll(t), 0)
+ : t && "object" === n && "length" in t
+ ? Ql.call(t, 0)
+ : t
+ ? [t]
+ : [];
+ },
+ tu = function (t) {
+ return "absolute" === t.position || !0 === t.absolute;
+ },
+ eu = function (t, e) {
+ for (var n, i = e.length; --i > -1; )
+ if (((n = e[i]), t.substr(0, n.length) === n)) return n.length;
+ },
+ nu = function (t, e) {
+ void 0 === t && (t = "");
+ var n = ~t.indexOf("++"),
+ i = 1;
+ return (
+ n && (t = t.split("++").join("")),
+ function () {
+ return (
+ "<" +
+ e +
+ " style='position:relative;display:inline-block;'" +
+ (t ? " class='" + t + (n ? i++ : "") + "'>" : ">")
+ );
+ }
+ );
+ },
+ iu = function t(e, n, i) {
+ var r = e.nodeType;
+ if (1 === r || 9 === r || 11 === r)
+ for (e = e.firstChild; e; e = e.nextSibling) t(e, n, i);
+ else
+ (3 !== r && 4 !== r) || (e.nodeValue = e.nodeValue.split(n).join(i));
+ },
+ ru = function (t, e) {
+ for (var n = e.length; --n > -1; ) t.push(e[n]);
+ },
+ ou = function (t, e, n) {
+ for (var i; t && t !== e; ) {
+ if ((i = t._next || t.nextSibling))
+ return i.textContent.charAt(0) === n;
+ t = t.parentNode || t._parent;
+ }
+ },
+ su = function t(e) {
+ var n,
+ i,
+ r = $l(e.childNodes),
+ o = r.length;
+ for (n = 0; n < o; n++)
+ (i = r[n])._isSplit
+ ? t(i)
+ : n && i.previousSibling && 3 === i.previousSibling.nodeType
+ ? ((i.previousSibling.nodeValue +=
+ 3 === i.nodeType ? i.nodeValue : i.firstChild.nodeValue),
+ e.removeChild(i))
+ : 3 !== i.nodeType &&
+ (e.insertBefore(i.firstChild, i), e.removeChild(i));
+ },
+ au = function (t, e) {
+ return parseFloat(e[t]) || 0;
+ },
+ lu = function (t, e, n, i, r, o, s) {
+ var a,
+ l,
+ u,
+ c,
+ h,
+ d,
+ f,
+ p,
+ m,
+ g,
+ v,
+ _,
+ x = Kl(t),
+ y = au("paddingLeft", x),
+ b = -999,
+ w = au("borderBottomWidth", x) + au("borderTopWidth", x),
+ S = au("borderLeftWidth", x) + au("borderRightWidth", x),
+ M = au("paddingTop", x) + au("paddingBottom", x),
+ D = au("paddingLeft", x) + au("paddingRight", x),
+ T = au("fontSize", x) * (e.lineThreshold || 0.2),
+ E = x.textAlign,
+ C = [],
+ A = [],
+ P = [],
+ L = e.wordDelimiter || " ",
+ R = e.tag ? e.tag : e.span ? "span" : "div",
+ O = e.type || e.split || "chars,words,lines",
+ F = r && ~O.indexOf("lines") ? [] : null,
+ I = ~O.indexOf("words"),
+ N = ~O.indexOf("chars"),
+ z = tu(e),
+ k = e.linesClass,
+ U = ~(k || "").indexOf("++"),
+ B = [],
+ V = "flex" === x.display,
+ H = t.style.display;
+ for (
+ U && (k = k.split("++").join("")),
+ V && (t.style.display = "block"),
+ u = (l = t.getElementsByTagName("*")).length,
+ h = [],
+ a = 0;
+ a < u;
+ a++
+ )
+ h[a] = l[a];
+ if (F || z)
+ for (a = 0; a < u; a++)
+ ((d = (c = h[a]).parentNode === t) || z || (N && !I)) &&
+ ((_ = c.offsetTop),
+ F &&
+ d &&
+ Math.abs(_ - b) > T &&
+ ("BR" !== c.nodeName || 0 === a) &&
+ ((f = []), F.push(f), (b = _)),
+ z &&
+ ((c._x = c.offsetLeft),
+ (c._y = _),
+ (c._w = c.offsetWidth),
+ (c._h = c.offsetHeight)),
+ F &&
+ (((c._isSplit && d) ||
+ (!N && d) ||
+ (I && d) ||
+ (!I &&
+ c.parentNode.parentNode === t &&
+ !c.parentNode._isSplit)) &&
+ (f.push(c), (c._x -= y), ou(c, t, L) && (c._wordEnd = !0)),
+ "BR" === c.nodeName &&
+ ((c.nextSibling && "BR" === c.nextSibling.nodeName) ||
+ 0 === a) &&
+ F.push([])));
+ for (a = 0; a < u; a++)
+ if (((d = (c = h[a]).parentNode === t), "BR" !== c.nodeName))
+ if (
+ (z &&
+ ((m = c.style),
+ I ||
+ d ||
+ ((c._x += c.parentNode._x), (c._y += c.parentNode._y)),
+ (m.left = c._x + "px"),
+ (m.top = c._y + "px"),
+ (m.position = "absolute"),
+ (m.display = "block"),
+ (m.width = c._w + 1 + "px"),
+ (m.height = c._h + "px")),
+ !I && N)
+ )
+ if (c._isSplit)
+ for (
+ c._next = l = c.nextSibling, c.parentNode.appendChild(c);
+ l && 3 === l.nodeType && " " === l.textContent;
+
+ )
+ (c._next = l.nextSibling),
+ c.parentNode.appendChild(l),
+ (l = l.nextSibling);
+ else
+ c.parentNode._isSplit
+ ? ((c._parent = c.parentNode),
+ !c.previousSibling &&
+ c.firstChild &&
+ (c.firstChild._isFirst = !0),
+ c.nextSibling &&
+ " " === c.nextSibling.textContent &&
+ !c.nextSibling.nextSibling &&
+ B.push(c.nextSibling),
+ (c._next =
+ c.nextSibling && c.nextSibling._isFirst
+ ? null
+ : c.nextSibling),
+ c.parentNode.removeChild(c),
+ h.splice(a--, 1),
+ u--)
+ : d ||
+ ((_ = !c.nextSibling && ou(c.parentNode, t, L)),
+ c.parentNode._parent && c.parentNode._parent.appendChild(c),
+ _ && c.parentNode.appendChild(jl.createTextNode(" ")),
+ "span" === R && (c.style.display = "inline"),
+ C.push(c));
+ else
+ c.parentNode._isSplit && !c._isSplit && "" !== c.innerHTML
+ ? A.push(c)
+ : N &&
+ !c._isSplit &&
+ ("span" === R && (c.style.display = "inline"), C.push(c));
+ else
+ F || z
+ ? (c.parentNode && c.parentNode.removeChild(c),
+ h.splice(a--, 1),
+ u--)
+ : I || t.appendChild(c);
+ for (a = B.length; --a > -1; ) B[a].parentNode.removeChild(B[a]);
+ if (F) {
+ for (
+ z &&
+ ((g = jl.createElement(R)),
+ t.appendChild(g),
+ (v = g.offsetWidth + "px"),
+ (_ = g.offsetParent === t ? 0 : t.offsetLeft),
+ t.removeChild(g)),
+ m = t.style.cssText,
+ t.style.cssText = "display:none;";
+ t.firstChild;
+
+ )
+ t.removeChild(t.firstChild);
+ for (p = " " === L && (!z || (!I && !N)), a = 0; a < F.length; a++) {
+ for (
+ f = F[a],
+ (g = jl.createElement(R)).style.cssText =
+ "display:block;text-align:" +
+ E +
+ ";position:" +
+ (z ? "absolute;" : "relative;"),
+ k && (g.className = k + (U ? a + 1 : "")),
+ P.push(g),
+ u = f.length,
+ l = 0;
+ l < u;
+ l++
+ )
+ "BR" !== f[l].nodeName &&
+ ((c = f[l]),
+ g.appendChild(c),
+ p && c._wordEnd && g.appendChild(jl.createTextNode(" ")),
+ z &&
+ (0 === l &&
+ ((g.style.top = c._y + "px"),
+ (g.style.left = y + _ + "px")),
+ (c.style.top = "0px"),
+ _ && (c.style.left = c._x - _ + "px")));
+ 0 === u
+ ? (g.innerHTML = " ")
+ : I || N || (su(g), iu(g, String.fromCharCode(160), " ")),
+ z && ((g.style.width = v), (g.style.height = c._h + "px")),
+ t.appendChild(g);
+ }
+ t.style.cssText = m;
+ }
+ z &&
+ (s > t.clientHeight &&
+ ((t.style.height = s - M + "px"),
+ t.clientHeight < s && (t.style.height = s + w + "px")),
+ o > t.clientWidth &&
+ ((t.style.width = o - D + "px"),
+ t.clientWidth < o && (t.style.width = o + S + "px"))),
+ V && (H ? (t.style.display = H) : t.style.removeProperty("display")),
+ ru(n, C),
+ I && ru(i, A),
+ ru(r, P);
+ },
+ uu = function (t, e, n, i) {
+ var r,
+ o,
+ s,
+ a,
+ l,
+ u,
+ c,
+ h,
+ d = e.tag ? e.tag : e.span ? "span" : "div",
+ f = ~(e.type || e.split || "chars,words,lines").indexOf("chars"),
+ p = tu(e),
+ m = e.wordDelimiter || " ",
+ g = " " !== m ? "" : p ? " " : " ",
+ v = "" + d + ">",
+ _ = 1,
+ x = e.specialChars
+ ? "function" == typeof e.specialChars
+ ? e.specialChars
+ : eu
+ : null,
+ y = jl.createElement("div"),
+ b = t.parentNode;
+ for (
+ b.insertBefore(y, t),
+ y.textContent = t.nodeValue,
+ b.removeChild(t),
+ c =
+ -1 !==
+ (r = (function t(e) {
+ var n = e.nodeType,
+ i = "";
+ if (1 === n || 9 === n || 11 === n) {
+ if ("string" == typeof e.textContent) return e.textContent;
+ for (e = e.firstChild; e; e = e.nextSibling) i += t(e);
+ } else if (3 === n || 4 === n) return e.nodeValue;
+ return i;
+ })((t = y))).indexOf("<"),
+ !1 !== e.reduceWhiteSpace &&
+ (r = r.replace(Zl, " ").replace(Yl, "")),
+ c && (r = r.split("<").join("{{LT}}")),
+ l = r.length,
+ o = (" " === r.charAt(0) ? g : "") + n(),
+ s = 0;
+ s < l;
+ s++
+ )
+ if (((u = r.charAt(s)), x && (h = x(r.substr(s), e.specialChars))))
+ (u = r.substr(s, h || 1)),
+ (o += f && " " !== u ? i() + u + "" + d + ">" : u),
+ (s += h - 1);
+ else if (u === m && r.charAt(s - 1) !== m && s) {
+ for (o += _ ? v : "", _ = 0; r.charAt(s + 1) === m; ) (o += g), s++;
+ s === l - 1
+ ? (o += g)
+ : ")" !== r.charAt(s + 1) && ((o += g + n()), (_ = 1));
+ } else
+ "{" === u && "{{LT}}" === r.substr(s, 6)
+ ? ((o += f ? i() + "{{LT}}" + d + ">" : "{{LT}}"), (s += 5))
+ : (u.charCodeAt(0) >= 55296 && u.charCodeAt(0) <= 56319) ||
+ (r.charCodeAt(s + 1) >= 65024 && r.charCodeAt(s + 1) <= 65039)
+ ? ((a = ((r.substr(s, 12).split(Gl) || [])[1] || "").length || 2),
+ (o +=
+ f && " " !== u
+ ? i() + r.substr(s, a) + "" + d + ">"
+ : r.substr(s, a)),
+ (s += a - 1))
+ : (o += f && " " !== u ? i() + u + "" + d + ">" : u);
+ (t.outerHTML = o + (_ ? v : "")), c && iu(b, "{{LT}}", "<");
+ },
+ cu = function t(e, n, i, r) {
+ var o,
+ s,
+ a = $l(e.childNodes),
+ l = a.length,
+ u = tu(n);
+ if (3 !== e.nodeType || l > 1) {
+ for (n.absolute = !1, o = 0; o < l; o++)
+ ((s = a[o])._next = s._isFirst = s._parent = s._wordEnd = null),
+ (3 !== s.nodeType || /\S+/.test(s.nodeValue)) &&
+ (u &&
+ 3 !== s.nodeType &&
+ "inline" === Kl(s).display &&
+ ((s.style.display = "inline-block"),
+ (s.style.position = "relative")),
+ (s._isSplit = !0),
+ t(s, n, i, r));
+ return (n.absolute = u), void (e._isSplit = !0);
+ }
+ uu(e, n, i, r);
+ },
+ hu = (function () {
+ function t(t, e) {
+ Xl || ((jl = document), (ql = window), (Xl = 1)),
+ (this.elements = $l(t)),
+ (this.chars = []),
+ (this.words = []),
+ (this.lines = []),
+ (this._originals = []),
+ (this.vars = e || {}),
+ this.split(e);
+ }
+ var e = t.prototype;
+ return (
+ (e.split = function (t) {
+ this.isSplit && this.revert(),
+ (this.vars = t = t || this.vars),
+ (this._originals.length =
+ this.chars.length =
+ this.words.length =
+ this.lines.length =
+ 0);
+ for (
+ var e,
+ n,
+ i,
+ r = this.elements.length,
+ o = t.tag ? t.tag : t.span ? "span" : "div",
+ s = nu(t.wordsClass, o),
+ a = nu(t.charsClass, o);
+ --r > -1;
+
+ )
+ (i = this.elements[r]),
+ (this._originals[r] = i.innerHTML),
+ (e = i.clientHeight),
+ (n = i.clientWidth),
+ cu(i, t, s, a),
+ lu(i, t, this.chars, this.words, this.lines, n, e);
+ return (
+ this.chars.reverse(),
+ this.words.reverse(),
+ this.lines.reverse(),
+ (this.isSplit = !0),
+ this
+ );
+ }),
+ (e.revert = function () {
+ var t = this._originals;
+ if (!t) throw "revert() call wasn't scoped properly.";
+ return (
+ this.elements.forEach(function (e, n) {
+ return (e.innerHTML = t[n]);
+ }),
+ (this.chars = []),
+ (this.words = []),
+ (this.lines = []),
+ (this.isSplit = !1),
+ this
+ );
+ }),
+ (t.create = function (e, n) {
+ return new t(e, n);
+ }),
+ t
+ );
+ })();
+ function du() {
+ return (du = Object.assign
+ ? Object.assign.bind()
+ : function (t) {
+ for (var e = 1; e < arguments.length; e++) {
+ var n = arguments[e];
+ for (var i in n)
+ Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
+ }
+ return t;
+ }).apply(this, arguments);
+ }
+ hu.version = "3.11.1";
+ var fu = function (t, e) {
+ var n,
+ i = du(
+ {
+ box: t,
+ xDelta: 0.1,
+ yDelta: 0.1,
+ moveSpeed: 0.3,
+ leaveSpeed: 0.3,
+ moveEase: "power1.out",
+ leaveEase: "power1.out",
+ overwrite: !0,
+ },
+ e
+ ),
+ r = function (e, n, r) {
+ Hi.to(
+ t,
+ du(
+ {
+ x: e,
+ y: n,
+ overwrite: i.overwrite,
+ onStart: function () {
+ return Hi.set(t, { willChange: "transform" });
+ },
+ onComplete: function () {
+ return Hi.set(t, { willChange: "auto" });
+ },
+ },
+ r
+ )
+ );
+ };
+ i.box.addEventListener("mouseenter", function () {
+ n = t.getBoundingClientRect();
+ }),
+ i.box.addEventListener("mousemove", function (t) {
+ var e = (t.clientY - n.top - n.height / 2) * i.yDelta,
+ o = (t.clientX - n.left - n.width / 2) * i.xDelta;
+ r(o, e, { duration: i.moveSpeed, ease: i.moveEase });
+ }),
+ i.box.addEventListener("mouseleave", function () {
+ r(0, 0, { duration: i.leaveSpeed, ease: i.leaveEase });
+ });
+ },
+ pu = function (t, e) {
+ void 0 === e && (e = {});
+ var n = du(
+ {
+ type: "words",
+ duration: 1.7,
+ stagger: { amount: 0.6 },
+ ease: "expo.out",
+ },
+ e
+ ),
+ i = new Hi.timeline(),
+ r = t.querySelectorAll(".cb-coin, video"),
+ o = new hu(t, { type: n.type }),
+ s = new hu(o[n.type], { type: n.type });
+ return (
+ Hi.set(o[n.type], {
+ overflow: "hidden",
+ verticalAlign: "top",
+ padding: "0.10em 0",
+ margin: "-0.10em 0",
+ }),
+ Hi.set(s[n.type], { y: "110%" }),
+ i.set(s[n.type], { willChange: "transform" }, 0),
+ i.fromTo(
+ s[n.type],
+ { y: "110%" },
+ { y: "0%", duration: n.duration, stagger: n.stagger, ease: n.ease },
+ 0
+ ),
+ r.length &&
+ (Hi.set(r, { scale: 0 }),
+ i.fromTo(
+ r,
+ { scale: 0 },
+ {
+ scale: 1,
+ duration: n.duration,
+ stagger: n.stagger,
+ ease: n.ease,
+ },
+ 0.2
+ )),
+ i.set(s[n.type], { willChange: "auto" }),
+ i
+ );
+ },
+ mu = function (t, e) {
+ return (
+ void 0 === e && (e = {}),
+ Ss.create({ trigger: t, animation: pu(t, e), once: !0 })
+ );
+ },
+ gu = function (t, e) {
+ void 0 === e && (e = {});
+ var n = du(
+ { from: 0, to: 1, duration: 2, stagger: 0.1, ease: "expo.out" },
+ e
+ );
+ return (
+ Hi.set(t, { scale: n.from }),
+ Hi.fromTo(
+ t,
+ { scale: n.from },
+ {
+ scale: n.to,
+ duration: n.duration,
+ stagger: n.stagger,
+ ease: n.ease,
+ }
+ )
+ );
+ },
+ vu = function (t, e) {
+ return (
+ void 0 === e && (e = {}),
+ Ss.create({ trigger: t, animation: gu(t, e), once: !0 })
+ );
+ },
+ _u = function (t, e, n) {
+ void 0 === n && (n = {});
+ var i = du(
+ {
+ from: 0.5,
+ innerFrom: 2,
+ to: 1,
+ innerTo: 1,
+ duration: 3,
+ innerDuration: 3,
+ opacityDuration: 0.5,
+ ease: "expo.out",
+ },
+ n
+ ),
+ r = new Hi.timeline();
+ return (
+ Hi.set(t, { opacity: 0, scale: i.from }),
+ Hi.set(e, { scale: i.innerFrom }),
+ r.fromTo(
+ t,
+ { opacity: 0 },
+ { opacity: 1, duration: i.opacityDuration },
+ 0
+ ),
+ r.fromTo(
+ t,
+ { scale: i.from },
+ { scale: i.to, duration: i.duration, ease: i.ease },
+ 0
+ ),
+ r.fromTo(
+ e,
+ { scale: i.innerFrom },
+ { scale: i.innerTo, duration: i.innerDuration, ease: i.ease },
+ 0
+ ),
+ r
+ );
+ },
+ xu = function (t, e, n) {
+ return (
+ void 0 === n && (n = {}),
+ Ss.create({ trigger: t, animation: _u(t, e, n), once: !0 })
+ );
+ },
+ yu = function (t, e) {
+ void 0 === e && (e = {});
+ var n = du(
+ {
+ from: 40,
+ to: 0,
+ duration: 2,
+ opacityDuration: 0.15,
+ stagger: 0.1,
+ ease: "expo.out",
+ },
+ e
+ ),
+ i = new Hi.timeline();
+ return (
+ Hi.set(t, { opacity: 0 }),
+ i.set(t, { willChange: "transform" }),
+ i.fromTo(
+ t,
+ { opacity: 0 },
+ { opacity: 1, duration: n.opacityDuration, stagger: n.stagger },
+ 0
+ ),
+ i.fromTo(
+ t,
+ { y: n.from, opacity: 0 },
+ {
+ y: n.to,
+ opacity: 1,
+ duration: n.duration,
+ stagger: n.stagger,
+ ease: n.ease,
+ },
+ 0
+ ),
+ i.set(t, { willChange: "auto" }),
+ i
+ );
+ },
+ bu = function (t, e) {
+ void 0 === e && (e = {});
+ var n = du(
+ { from: 0, to: 1, duration: 2, stagger: 0.1, ease: "expo.out" },
+ e
+ ),
+ i = new Hi.timeline();
+ return (
+ Hi.set(t, { opacity: 0 }),
+ i.fromTo(
+ t,
+ { opacity: n.from },
+ { opacity: n.to, duration: n.duration, stagger: n.stagger },
+ 0
+ ),
+ i
+ );
+ },
+ wu = function (t, e) {
+ void 0 === e && (e = {});
+ du({ from: 0, to: 1, duration: 2, stagger: 0.1, ease: "expo.out" }, e);
+ var n = new Hi.timeline(),
+ i = t.querySelector(".cb-btn_cta-border"),
+ r = t.querySelector(".cb-btn_cta-title");
+ return (
+ Hi.set(t, { pointerEvents: "none" }),
+ n.set([i, r], { willChange: "transform" }),
+ n.fromTo(
+ i,
+ { scaleY: 0.5, scaleX: 0 },
+ { scaleY: 1, scaleX: 1, duration: 1.5, ease: "expo.out" },
+ 0
+ ),
+ n.fromTo(
+ r,
+ { scaleY: 0.5, scaleX: 0.5 },
+ { scaleY: 1, scaleX: 1, duration: 1.5, ease: "expo.out" },
+ 0
+ ),
+ n.from(r, { y: "110%", duration: 1.2, ease: "expo.out" }, 0.1),
+ n.fromTo(i, { opacity: 0 }, { opacity: 1, duration: 0.4 }, 0.2),
+ n.set(t, { pointerEvents: "auto" }, 0.6),
+ n.set([i, r], { willChange: "auto" }),
+ n
+ );
+ };
+ function Su(t, e) {
+ return (Su = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Mu = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).opened = !1),
+ (e.toggleBtn = e.el.querySelector(".cb-menu-toggle button")),
+ (e.box = e.el.querySelector(".cb-menu-box")),
+ (e.backdrop = e.el.querySelector(".cb-menu-backdrop")),
+ (e.fill = e.el.querySelector(".cb-menu-fill")),
+ (e.content = e.el.querySelector(".cb-menu-content")),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Su(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ return (
+ (this.tlClose = this.tlHide()),
+ (this.tlOpen = this.tlShow()),
+ this.bindToggle(),
+ this.handleInversionObserver(),
+ Promise.resolve()
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.onLeave = function () {
+ try {
+ return this.opened && this.hide(), Promise.resolve();
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.bindToggle = function () {
+ var t = this;
+ this.toggleBtn.addEventListener("click", function () {
+ return t.toggle();
+ }),
+ this.backdrop.addEventListener("click", function () {
+ return t.hide();
+ }),
+ this.tlClose.eventCallback("onComplete", function () {
+ t.box.classList.remove("-visible");
+ }),
+ this.el.addEventListener("mouseenter", function () {
+ var e;
+ t.el.classList.contains("-inverse") &&
+ (null == (e = t.app.get("cursor").follower) ||
+ e.addState("-inverse"));
+ }),
+ Ss.isTouch ||
+ fu(this.toggleBtn, {
+ leaveSpeed: 2,
+ leaveEase: "elastic.out(1,0.25)",
+ });
+ }),
+ (r.handleInversionObserver = function () {
+ var t = this;
+ document
+ .querySelectorAll("[data-menu-inverse]")
+ .forEach(function (e) {
+ Ss.create({
+ trigger: e,
+ start: "top top+=50px",
+ end: "bottom top+=70px",
+ toggleClass: { targets: t.el, className: "-inverse" },
+ });
+ });
+ }),
+ (r.toggle = function () {
+ this.opened ? this.hide() : this.show();
+ }),
+ (r.show = function () {
+ var t;
+ ((this.opened = !0),
+ this.el.classList.add("-open"),
+ document.documentElement.classList.add("menu-open"),
+ this.tlClose.pause(),
+ this.tlOpen.play(0),
+ this.el.classList.contains("-inverse")) &&
+ (null == (t = this.app.get("cursor").follower) ||
+ t.removeState("-inverse"));
+ }),
+ (r.hide = function () {
+ var t;
+ ((this.opened = !1),
+ this.el.classList.remove("-open"),
+ document.documentElement.classList.remove("menu-open"),
+ this.tlOpen.pause(),
+ this.tlClose.play(0),
+ this.el.classList.contains("-inverse")) &&
+ (null == (t = this.app.get("cursor").follower) ||
+ t.addState("-inverse"));
+ }),
+ (r.tlShow = function () {
+ var t = new Hi.timeline({ paused: !0 });
+ return (
+ t.set(this.box, { display: "block" }, 0),
+ t.fromTo(
+ this.backdrop,
+ { opacity: 0 },
+ { opacity: 1, duration: 0.5 },
+ 0
+ ),
+ t.fromTo(
+ this.fill,
+ { scaleX: 0 },
+ { scaleX: 1, ease: "expo.out", duration: 1 },
+ 0
+ ),
+ t.fromTo(
+ this.content,
+ { xPercent: 50 },
+ { xPercent: 0, ease: "expo.out", duration: 1 },
+ 0
+ ),
+ t.fromTo(
+ this.content,
+ { opacity: 0 },
+ { opacity: 1, duration: 0.5 },
+ 0.15
+ ),
+ t
+ );
+ }),
+ (r.tlHide = function () {
+ var t = new Hi.timeline({ paused: !0 });
+ return (
+ t.fromTo(
+ this.backdrop,
+ { opacity: 1 },
+ { opacity: 0, duration: 0.4 },
+ 0
+ ),
+ t.fromTo(this.fill, { scaleX: 1 }, { scaleX: 0, duration: 0.4 }, 0),
+ t.fromTo(
+ this.content,
+ { xPercent: 0 },
+ { xPercent: 20, duration: 0.4 },
+ 0
+ ),
+ t.fromTo(
+ this.content,
+ { opacity: 1 },
+ { opacity: 0, duration: 0.1 },
+ 0
+ ),
+ t.set(this.box, { display: "none" }),
+ t
+ );
+ }),
+ i
+ );
+ })(o);
+ function Du(t, e) {
+ return (Du = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Tu = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).video = e.el),
+ (e.loader = e.app.get("loader")),
+ (e.source = e.el.querySelectorAll("source")),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Du(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ var t = this;
+ return Promise.resolve(t.app.waitInstance(t.loader)).then(
+ function () {
+ return (
+ t.loader.add(),
+ Promise.resolve(t.startLoad()).then(function () {
+ t.loader.tick(), t.startObserver();
+ })
+ );
+ }
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.startLoad = function () {
+ try {
+ var t = this;
+ return t.el.dataset.src || t.source.length
+ ? Promise.resolve(
+ new Promise(function (e) {
+ var n = setTimeout(function () {
+ return e();
+ }, 15e3);
+ t.el.addEventListener(
+ "suspend",
+ function () {
+ clearInterval(n), e();
+ },
+ { once: !0 }
+ ),
+ t.el.dataset.src && (t.el.src = t.el.dataset.src),
+ t.source.length > 0 &&
+ t.source.forEach(function (t) {
+ t.src = t.dataset.src;
+ }),
+ t.el.load();
+ })
+ ).then(function () {})
+ : Promise.resolve();
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.startObserver = function () {
+ (this.observer = new IntersectionObserver(function (t) {
+ t.forEach(function (t) {
+ t.isIntersecting ? t.target.play() : t.target.pause();
+ });
+ })),
+ this.observer.observe(this.el);
+ }),
+ i
+ );
+ })(o);
+ function Eu(t, e) {
+ return (Eu = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Cu = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).video =
+ e.el.querySelector(".cb-intouch-video")),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Eu(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ return this.handleEnter(), this.initMagnetic(), Promise.resolve();
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.onEnter = function () {
+ try {
+ var t = this;
+ return t.enterTl
+ ? Promise.resolve(t.app.wait("loader", "enter")).then(
+ function () {
+ return Promise.resolve(t.enterTl.play()).then(
+ function () {}
+ );
+ }
+ )
+ : Promise.resolve();
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.handleEnter = function () {
+ this.el.offsetWidth && (this.enterTl = this.tlEnter());
+ }),
+ (r.tlEnter = function () {
+ var t = new Hi.timeline({ paused: !0 });
+ return (
+ t.from(this.el, { scale: 0, duration: 2, ease: "expo.out" }), t
+ );
+ }),
+ (r.initMagnetic = function () {
+ Ss.isTouch ||
+ fu(this.video, {
+ box: this.el,
+ xDelta: 0.08,
+ yDelta: 0.08,
+ leaveSpeed: 2,
+ leaveEase: "elastic.out(1,0.25)",
+ });
+ }),
+ i
+ );
+ })(o);
+ function Au(t, e) {
+ return (Au = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Pu = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).header =
+ e.el.querySelector(".cb-intro-header")),
+ (e.details = e.el.querySelector(".cb-intro-details")),
+ (e.detail = e.el.querySelectorAll(".cb-intro-detail")),
+ (e.figure = e.el.querySelector(".cb-intro-figure")),
+ (e.figureMedia = e.el.querySelector(".cb-intro-figure-media")),
+ (e.bottom = e.el.querySelector(".cb-intro-bottom")),
+ e.magicScroll(),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Au(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ return (this.enterTl = this.tlEnter()), Promise.resolve();
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.onEnter = function () {
+ try {
+ var t = this;
+ return Promise.resolve(t.app.wait("loader", "enter")).then(
+ function () {
+ t.enterTl.play();
+ }
+ );
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.tlEnter = function () {
+ var t = new Hi.timeline({ paused: !0 }),
+ e = this.header.querySelectorAll(".-word"),
+ n = this.header.querySelector(".cb-btn_cta");
+ return (
+ Hi.set(e, { y: "110%" }),
+ t.set([e, this.detail, this.figureMedia], {
+ willChange: "transform",
+ }),
+ t.to(
+ e,
+ {
+ y: 0,
+ duration: 2,
+ stagger: 0.3,
+ ease: "expo.out",
+ force3D: !0,
+ },
+ 0
+ ),
+ t.add(wu(n), 0.2),
+ t.from(this.figureMedia, { opacity: 0, duration: 0.3 }, 0.8),
+ t.from(
+ this.figureMedia,
+ { y: "40%", duration: 2, ease: "expo.out", force3D: !0 },
+ 0.8
+ ),
+ t.from(
+ this.detail,
+ { y: 30, duration: 2, stagger: 0.2, ease: "expo.out" },
+ 0.8
+ ),
+ t.from(this.detail, { opacity: 0, duration: 0.3, stagger: 0.2 }, 1),
+ t.set([e, this.detail, this.figureMedia], { willChange: "auto" }),
+ t
+ );
+ }),
+ (r.magicScroll = function () {
+ var t = this,
+ e = Hi.matchMedia();
+ e.add("(max-width:767px), (orientation:portrait)", function () {
+ Ss.create({
+ trigger: t.el,
+ animation: t.tlParallax(),
+ start: "top top",
+ end: "bottom top",
+ scrub: !0,
+ });
+ }),
+ e.add("(min-width:768px), (orientation:landscape)", function () {
+ Ss.create({
+ trigger: t.el,
+ animation: t.tlScroll(),
+ start: "top top",
+ end: "50%",
+ scrub: !0,
+ });
+ });
+ }),
+ (r.tlScroll = function () {
+ var t = new Hi.timeline();
+ return (
+ t.set(this.figure, { willChange: "transform,max-width" }),
+ t.fromTo(
+ this.figure,
+ { y: "0%" },
+ { y: "40%", maxWidth: "100%", duration: 1, ease: "power1.out" },
+ 0
+ ),
+ t.to(this.details, { opacity: 0, duration: 0.15, ease: "none" }, 0),
+ t.set(this.figure, { willChange: "auto" }),
+ t
+ );
+ }),
+ (r.tlParallax = function () {
+ var t = new Hi.timeline();
+ return (
+ t.set(this.figure, { willChange: "transform" }),
+ t.to(this.figure, { y: "10%", duration: 1, ease: "none" }, 0),
+ t.set(this.figure, { willChange: "auto" }),
+ t
+ );
+ }),
+ i
+ );
+ })(o);
+ function Lu(t, e) {
+ return (Lu = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Ru = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).text =
+ e.el.querySelector(".cb-focused-text")),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Lu(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ var t = this;
+ return Promise.resolve(document.fonts.ready).then(function () {
+ return Promise.resolve(t.app.wait("loader")).then(function () {
+ t.magicShow();
+ });
+ });
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.magicShow = function () {
+ this.text && mu(this.text);
+ }),
+ i
+ );
+ })(o);
+ function Ou() {
+ return (Ou =
+ Object.assign ||
+ function (t) {
+ for (var e = 1; e < arguments.length; e++) {
+ var n = arguments[e];
+ for (var i in n)
+ Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
+ }
+ return t;
+ }).apply(this, arguments);
+ }
+ function Fu(t, e) {
+ (t.prototype = Object.create(e.prototype)),
+ (t.prototype.constructor = t),
+ Iu(t, e);
+ }
+ function Iu(t, e) {
+ return (Iu =
+ Object.setPrototypeOf ||
+ function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Nu = (function () {
+ function t() {
+ this.events = {};
+ }
+ var e = t.prototype;
+ return (
+ (e.on = function (t, e) {
+ this.events[t] instanceof Array || (this.events[t] = []),
+ this.events[t].push(e);
+ }),
+ (e.off = function (t, e) {
+ this.events[t] = e
+ ? this.events[t].filter(function (t) {
+ return t !== e;
+ })
+ : [];
+ }),
+ (e.trigger = function (t) {
+ var e = arguments,
+ n = this;
+ this.events[t] &&
+ this.events[t].forEach(function (t) {
+ return t.call.apply(t, [n, n].concat([].slice.call(e, 1)));
+ });
+ }),
+ t
+ );
+ })(),
+ zu = (function (t) {
+ function e(n) {
+ var i;
+ return (
+ ((i = t.call(this) || this).options = Ou({}, e.defaultOptions, n)),
+ (i.container =
+ "string" == typeof i.options.container
+ ? document.querySelector(i.options.container)
+ : i.options.container),
+ (i.wrapper =
+ "string" == typeof i.options.wrapper
+ ? i.container.querySelector(i.options.wrapper)
+ : i.options.wrapper || i.options.container),
+ (i.item = []),
+ i.refresh(!1),
+ i.options.autoUpdate ? i.bindResizeObserver() : i.update(),
+ i
+ );
+ }
+ Fu(e, t);
+ var n = e.prototype;
+ return (
+ (n.bindResizeObserver = function () {
+ var t = this;
+ (this.resizeObserver = new ResizeObserver(function () {
+ t.update();
+ })),
+ this.resizeObserver.observe(this.container);
+ }),
+ (n.addClones = function (t, e) {
+ var n;
+ void 0 === e && (e = 0);
+ for (var i = [], r = 0; r < t; r++) {
+ var o = this.item[(e + r) % this.item.length].cloneNode(!0);
+ o.classList.add(this.options.cloneClassName), i.push(o);
+ }
+ (n = this.wrapper).append.apply(n, i);
+ }),
+ (n.removeClones = function (t) {
+ void 0 === t && (t = 0),
+ Array.from(
+ this.wrapper.getElementsByClassName(this.options.cloneClassName)
+ )
+ .slice(-t)
+ .forEach(function (t) {
+ return t.remove();
+ });
+ }),
+ (n.setClonesCount = function (t) {
+ this.clonesCount !== t &&
+ (this.clonesCount < t &&
+ this.addClones(t - this.clonesCount, this.clonesCount),
+ this.clonesCount > t && this.removeClones(this.clonesCount - t),
+ (this.clonesCount = t));
+ }),
+ (n.getCalcData = function () {
+ var t = {
+ clonesCount: 0,
+ clonesWidth: 0,
+ containerWidth: this.container.offsetWidth,
+ fullWidth: 0,
+ itemWidth: [],
+ itemsWidth: 0,
+ lastIndex: 0,
+ };
+ this.item.map(function (e) {
+ var n = e.getBoundingClientRect(),
+ i = window.getComputedStyle(e),
+ r = n.width + parseInt(i.marginLeft) + parseInt(i.marginRight);
+ t.itemWidth.push(r), (t.itemsWidth += r);
+ });
+ for (
+ var e = t.itemWidth.length,
+ n = this.options.clonesOverflow
+ ? t.containerWidth
+ : t.containerWidth - t.itemsWidth;
+ n > t.clonesWidth ||
+ t.clonesCount < this.options.clonesMin ||
+ (this.options.clonesFinish && t.clonesCount % e > 0);
+
+ )
+ (t.lastIndex = t.clonesCount % e),
+ (t.clonesWidth += t.itemWidth[t.lastIndex]),
+ t.clonesCount++;
+ return (t.fullWidth = t.clonesWidth + t.itemsWidth), t;
+ }),
+ (n.update = function () {
+ (this.calcData = this.getCalcData()),
+ this.setClonesCount(this.calcData.clonesCount),
+ this.trigger("update", this.calcData);
+ }),
+ (n.refresh = function (t) {
+ void 0 === t && (t = !0),
+ this.removeClones(),
+ (this.item = Array.from(
+ this.container.querySelectorAll(this.options.itemSelector)
+ )),
+ (this.calcData = {}),
+ (this.clonesCount = 0),
+ this.trigger("refresh"),
+ t && this.update();
+ }),
+ (n.destroy = function (t) {
+ void 0 === t && (t = !1),
+ t && this.removeClones(),
+ this.resizeObserver && this.resizeObserver.disconnect(),
+ this.trigger("destroy");
+ }),
+ e
+ );
+ })(Nu);
+ zu.defaultOptions = {
+ container: null,
+ wrapper: null,
+ itemSelector: null,
+ cloneClassName: "-clone",
+ autoUpdate: !0,
+ clonesOverflow: !1,
+ clonesFinish: !1,
+ clonesMin: 0,
+ };
+ var ku = (function (t) {
+ function e(n) {
+ var i;
+ return (
+ ((i = t.call(this) || this).options = Ou({}, e.defaultOptions, n)),
+ (i.gsap = e.gsap || window.gsap),
+ (i.paused = i.options.paused),
+ i.createFiller(),
+ i.createTimeline(),
+ i.options.autoStop && i.bindIntersectionObserver(),
+ i.options.plugins && i.initPlugins(),
+ i
+ );
+ }
+ Fu(e, t),
+ (e.registerGSAP = function (t) {
+ e.gsap = t;
+ }),
+ (e.use = function () {
+ [].slice.call(arguments).forEach(function (t) {
+ var n = t.pluginName;
+ if ("string" != typeof n)
+ throw new TypeError("Invalid plugin. Name is required.");
+ e.plugins[n] = t;
+ });
+ });
+ var n = e.prototype;
+ return (
+ (n.createFiller = function () {
+ var t = this;
+ (this.filler = new zu(this.options)),
+ this.filler.on("update", function (e, n) {
+ t.invalidate(), t.trigger("update", n);
+ }),
+ this.filler.on("refresh", function () {
+ t.trigger("refresh");
+ });
+ }),
+ (n.createTimeline = function () {
+ var t = this;
+ return (
+ (this.tl = new this.gsap.timeline({
+ paused: this.options.paused,
+ repeat: -1,
+ yoyo: !this.options.loop,
+ onReverseComplete: function () {
+ this.progress(1);
+ },
+ })),
+ this.gsap.set(this.filler.container, { overflow: "hidden" }),
+ this.tl.fromTo(
+ this.filler.wrapper,
+ {
+ x: function () {
+ return t.options.clonesOverflow
+ ? -t.filler.calcData.itemsWidth
+ : -(
+ t.filler.calcData.fullWidth -
+ t.filler.calcData.containerWidth
+ );
+ },
+ },
+ { x: 0, duration: this.options.speed, ease: this.options.ease }
+ ),
+ this.tl.seek(this.options.seek),
+ this.tl
+ );
+ }),
+ (n.bindIntersectionObserver = function () {
+ var t = this;
+ (this.intersectionObserver = new IntersectionObserver(function (e) {
+ e[0].isIntersecting ? t.resume() : t.pause();
+ })),
+ this.intersectionObserver.observe(this.filler.container);
+ }),
+ (n.initPlugins = function () {
+ this.plugin = {};
+ for (
+ var t = 0, n = Object.entries(this.options.plugins);
+ t < n.length;
+ t++
+ ) {
+ var i = n[t],
+ r = i[0],
+ o = i[1],
+ s = e.plugins[r];
+ s
+ ? (this.plugin[r] = new s(this, o))
+ : console.error(
+ "Plugin " +
+ r +
+ " not found. Make sure you register it with Reeller.use()"
+ );
+ }
+ }),
+ (n.destroyPlugins = function () {
+ for (var t = 0, e = Object.values(this.plugin); t < e.length; t++) {
+ var n = e[t];
+ n.destroy && n.destroy();
+ }
+ }),
+ (n.resume = function () {
+ this.gsap.set(this.filler.container, { z: "0" }),
+ this.gsap.set(this.filler.wrapper, { willChange: "transform" }),
+ (this.paused = !1),
+ this.tl.resume(),
+ this.trigger("resume");
+ }),
+ (n.reverse = function () {
+ (this.paused = !1), this.tl.reverse(), this.trigger("reverse");
+ }),
+ (n.pause = function () {
+ this.gsap.set(this.filler.container, { clearProps: "z" }),
+ this.gsap.set(this.filler.wrapper, { willChange: "auto" }),
+ (this.paused = !0),
+ this.tl.pause(),
+ this.trigger("pause");
+ }),
+ (n.invalidate = function () {
+ this.tl.invalidate(), this.trigger("invalidate");
+ }),
+ (n.update = function () {
+ this.filler.update();
+ }),
+ (n.refresh = function (t) {
+ void 0 === t && (t = !0), this.filler.refresh(t);
+ }),
+ (n.destroy = function (t, e) {
+ void 0 === t && (t = !1),
+ void 0 === e && (e = !1),
+ this.intersectionObserver && this.intersectionObserver.disconnect(),
+ this.options.plugins && this.destroyPlugins(),
+ this.tl.kill(),
+ this.filler.destroy(t),
+ e &&
+ (this.gsap.set(this.filler.container, { clearProps: "overflow" }),
+ this.gsap.set(this.filler.wrapper, {
+ clearProps: "x,willChange",
+ })),
+ this.trigger("destroy");
+ }),
+ e
+ );
+ })(Nu);
+ (ku.defaultOptions = {
+ container: null,
+ wrapper: null,
+ itemSelector: null,
+ cloneClassName: "-clone",
+ speed: 10,
+ ease: "none",
+ initialSeek: 10,
+ loop: !0,
+ paused: !0,
+ reversed: !1,
+ autoStop: !0,
+ autoUpdate: !0,
+ clonesOverflow: !0,
+ clonesFinish: !1,
+ clonesMin: 0,
+ plugins: null,
+ }),
+ (ku.plugins = {});
+ var Uu = (function () {
+ function t(e, n) {
+ (this.options = Ou({}, t.defaultOptions, n)),
+ (this.reeller = e),
+ (this.gsap = this.reeller.gsap),
+ (this.tl = this.reeller.tl),
+ this.init();
+ }
+ var e = t.prototype;
+ return (
+ (e.getScrollPos = function () {
+ return this.options.scrollProxy
+ ? this.options.scrollProxy()
+ : window.pageYOffset;
+ }),
+ (e.init = function () {
+ var t = this,
+ e = this.getScrollPos(),
+ n = 1,
+ i = !0;
+ (this.tickerFn = function () {
+ var r = t.getScrollPos(),
+ o = r - e;
+ if (
+ (t.options.bothDirection || (o = Math.abs(o)),
+ t.options.reversed && (o *= -1),
+ t.reeller.paused)
+ )
+ return (
+ (n = Math.sign(o)),
+ (e = r),
+ i || (t.gsap.killTweensOf(t.tl), (i = !0)),
+ void t.tl.timeScale(n * t.options.threshold)
+ );
+ if (o) {
+ var s = o * t.options.multiplier,
+ a =
+ s > 0
+ ? Math.max(t.options.threshold, s)
+ : Math.min(-t.options.threshold, s);
+ (t.tween = t.gsap.to(t.tl, {
+ timeScale: a,
+ duration: t.options.speed,
+ ease: t.options.ease,
+ overwrite: t.options.overwrite,
+ })),
+ (i = !1);
+ } else if (!i) {
+ var l = t.options.stopOnEnd ? 0 : n * t.options.threshold;
+ t.gsap.killTweensOf(t.tl),
+ (t.tween = t.gsap.to(t.tl, {
+ timeScale: l,
+ duration: t.options.speed,
+ overwrite: t.options.overwrite,
+ ease: t.options.ease,
+ })),
+ (i = !0);
+ }
+ (n = Math.sign(o)), (e = r);
+ }),
+ this.gsap.ticker.add(this.tickerFn);
+ }),
+ (e.destroy = function () {
+ this.tickerFn &&
+ (this.gsap.ticker.remove(this.tickerFn), (this.tickerFn = null)),
+ this.tween && this.tween.kill();
+ }),
+ t
+ );
+ })();
+ function Bu(t, e) {
+ return (Bu = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ (Uu.pluginName = "scroller"),
+ (Uu.defaultOptions = {
+ speed: 1,
+ multiplier: 0.5,
+ threshold: 1,
+ ease: "expo.out",
+ overwrite: !0,
+ bothDirection: !0,
+ reversed: !1,
+ stopOnEnd: !1,
+ scrollProxy: null,
+ }),
+ ku.registerGSAP(Hi),
+ ku.use(Uu);
+ var Vu = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).bg =
+ e.el.querySelector(".cb-overview-bg")),
+ (e.content = e.el.querySelector(".cb-overview-content")),
+ (e.header = e.el.querySelector(".cb-overview-header")),
+ (e.caption = e.el.querySelectorAll(".cb-overview-caption")),
+ (e.icon = e.el.querySelector(".cb-overview-icon")),
+ (e.text = e.el.querySelector(".cb-overview-text")),
+ (e.tag = e.el.querySelectorAll(".cb-overview-tag")),
+ (e.reel = e.el.querySelector(".cb-overview-reel")),
+ (e.offset = e.el.querySelector(".cb-overview-offset")),
+ (e.figure = e.el.querySelector(".cb-overview-figure")),
+ (e.figureBg = e.el.querySelector(".cb-overview-figure-bg")),
+ (e.figureMedia = e.el.querySelector(".cb-overview-figure-media")),
+ (e.cursor = e.app.get("cursor")),
+ (e.layout = e.app.get("layout")),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Bu(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ var t = this;
+ return Promise.resolve(document.fonts.ready).then(function () {
+ return Promise.resolve(t.app.wait("loader")).then(function () {
+ t.initReeller(),
+ t.bindOffsetMouse(),
+ t.magicOffset(),
+ t.magicParallax(),
+ t.magicShow();
+ });
+ });
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.initReeller = function () {
+ var t = this;
+ this.reel &&
+ (this.reeller = new ku({
+ container: this.reel,
+ wrapper: ".cb-overview-reel-wrap",
+ itemSelector: ".cb-overview-reel-item",
+ speed: 10,
+ plugins: {
+ scroller: {
+ multiplier: 0.3,
+ speed: 1,
+ threshold: 1,
+ reversed: !0,
+ scrollProxy: function () {
+ return t.layout.scrollTop();
+ },
+ },
+ },
+ }));
+ }),
+ (r.magicShow = function () {
+ var t,
+ e,
+ n = this;
+ if (
+ (this.header &&
+ mu(this.header.firstElementChild, {
+ type: "lines",
+ stagger: 0.3,
+ }),
+ this.icon && vu(this.icon),
+ this.caption.length &&
+ this.caption.forEach(function (t) {
+ mu(t, { stagger: 0.1 });
+ }),
+ this.text && mu(this.text),
+ this.tag.length &&
+ ((t = this.tag),
+ void 0 === e && (e = {}),
+ Ss.create({ trigger: t, animation: yu(t, e), once: !0 })),
+ this.figure)
+ ) {
+ var i = Hi.matchMedia();
+ i.add("(max-width:767px), (orientation:portrait)", function () {
+ xu(n.figure, n.figureMedia.querySelector("video"), {
+ innerFrom: 1.2,
+ });
+ }),
+ i.add("(min-width:768px), (orientation:landscape)", function () {
+ n.figureBg &&
+ Ss.create({
+ trigger: n.figure,
+ animation: n.tlStretchFigure(),
+ invalidateOnRefresh: !0,
+ once: !0,
+ });
+ });
+ }
+ }),
+ (r.tlStretchFigure = function () {
+ var t = this;
+ return Hi.fromTo(
+ this.figureBg,
+ {
+ width: function () {
+ return t.figure.offsetHeight;
+ },
+ },
+ {
+ width: function () {
+ return t.figure.offsetWidth;
+ },
+ duration: 3,
+ ease: "expo.out",
+ clearProps: "width",
+ }
+ );
+ }),
+ (r.magicParallax = function () {
+ Ss.create({
+ trigger: this.el,
+ animation: this.tlParallax(),
+ start: "top bottom",
+ end: "bottom top",
+ scrub: !0,
+ });
+ }),
+ (r.tlParallax = function () {
+ var t = new Hi.timeline();
+ return (
+ this.bg &&
+ t.fromTo(
+ this.bg,
+ { yPercent: -30 },
+ { yPercent: 30, ease: "none" },
+ 0
+ ),
+ t
+ );
+ }),
+ (r.bindOffsetMouse = function () {
+ var t = this;
+ Ss.isTouch ||
+ window.addEventListener("mousemove", function (e) {
+ if (t.offseted && !t.offsetStopped) {
+ var n = t.offset.getBoundingClientRect(),
+ i = t.figure.getBoundingClientRect(),
+ r = parseInt(window.getComputedStyle(t.figure).marginLeft),
+ o = e.clientY - n.top - i.height / 2,
+ s = e.clientX - n.left - i.width / 2 - r;
+ Hi.to(t.figure, {
+ y: o,
+ x: s,
+ duration: 1.2,
+ ease: "expo.out",
+ overwrite: !0,
+ });
+ }
+ });
+ }),
+ (r.magicOffset = function () {
+ var t = this;
+ this.offset &&
+ this.figure &&
+ (Ss.saveStyles([this.figure]),
+ Ss.matchMedia({
+ "(min-width:1024px)": function () {
+ Ss.create({
+ trigger: t.offset,
+ start: "top top",
+ endTrigger: t.el,
+ end: "bottom top",
+ pin: !0,
+ pinSpacing: !1,
+ onEnter: function () {
+ return t.startOffset();
+ },
+ onLeaveBack: function () {
+ return t.revertOffset();
+ },
+ onToggle: function (e) {
+ e.progress, e.direction;
+ var n = e.isActive;
+ t.toggleOffset(!n);
+ },
+ });
+ },
+ }));
+ }),
+ (r.startOffset = function () {
+ var t, e;
+ (this.offseted = !0), this.figure.classList.add("-offsetted");
+ var n =
+ null == (t = this.cursor) || null == (e = t.follower)
+ ? void 0
+ : e.pos;
+ if (
+ (Hi.set(this.figure, { willChange: "transform" }),
+ (null == n ? void 0 : n.y) > 0 && (null == n ? void 0 : n.x) > 0)
+ ) {
+ var i = this.offset.getBoundingClientRect(),
+ r = this.figure.getBoundingClientRect(),
+ o = parseInt(window.getComputedStyle(this.figure).marginLeft),
+ s = n.y - i.top - r.height / 2,
+ a = n.x - i.left - r.width / 2 - o;
+ Hi.to(this.figure, {
+ y: s,
+ x: a,
+ duration: 1.2,
+ ease: "expo.out",
+ overwrite: !0,
+ });
+ }
+ }),
+ (r.revertOffset = function () {
+ (this.offseted = !1),
+ this.figure.classList.remove("-offsetted"),
+ Hi.set(this.figure, { willChange: "auto" }),
+ Hi.to(this.figure, {
+ y: 0,
+ x: 0,
+ duration: 2,
+ ease: "expo.out",
+ overwrite: !0,
+ });
+ }),
+ (r.toggleOffset = function (t) {
+ (this.offsetStopped = t),
+ !this.offsetStopped && this.offseted && this.startOffset();
+ }),
+ i
+ );
+ })(o);
+ function Hu(t, e) {
+ return (Hu = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Wu = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).bg =
+ e.el.querySelector(".cb-greeting-bg")),
+ (e.bgMedia = e.bg.querySelector(".cb-greeting-bg-media")),
+ (e.header = e.el.querySelector(".cb-greeting-header")),
+ (e.text = e.el.querySelector(".cb-greeting-text")),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Hu(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ var t = this;
+ return Promise.resolve(t.app.wait("loader")).then(function () {
+ t.magicParallax(), t.magicShow();
+ });
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.magicShow = function () {
+ this.header &&
+ mu(this.header.firstElementChild, { type: "lines", stagger: 0.2 }),
+ this.text && mu(this.text);
+ }),
+ (r.magicParallax = function () {
+ Ss.create({
+ trigger: this.el,
+ animation: this.tlParallax(),
+ start: "top bottom",
+ end: "bottom top",
+ scrub: 2,
+ });
+ }),
+ (r.tlParallax = function () {
+ var t = new Hi.timeline();
+ return (
+ t.set(this.bgMedia, { willChange: "transform" }),
+ t.to(this.bgMedia, { xPercent: -50, ease: "none" }),
+ t.set(this.bgMedia, { willChange: "auto" }),
+ t
+ );
+ }),
+ i
+ );
+ })(o);
+ function Gu(t, e) {
+ return (Gu = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var ju = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).layout = e.app.get("layout")),
+ (e.header = e.el.querySelector(".cb-showcase-header")),
+ (e.item = e.el.querySelectorAll(".cb-showcase-item")),
+ e.initItems(),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Gu(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ var t = this;
+ return Promise.resolve(t.app.wait("loader")).then(function () {
+ t.magicShow();
+ });
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.initItems = function () {
+ var t = this;
+ (this.reellers = []),
+ this.item.forEach(function (e, n) {
+ var i = e.querySelector(".cb-showcase-item-reel"),
+ r = new ku({
+ container: i,
+ wrapper: ".cb-showcase-item-reel-wrap",
+ itemSelector: ".cb-showcase-item-reel-item",
+ speed: 10,
+ plugins: {
+ scroller: {
+ multiplier: 0.3,
+ speed: 1,
+ threshold: 1,
+ reversed: !!(n % 2),
+ scrollProxy: function () {
+ return t.layout.scrollTop();
+ },
+ },
+ },
+ });
+ t.reellers.push(r), t.magicParallax(e);
+ });
+ }),
+ (r.magicShow = function () {
+ this.header &&
+ mu(this.header.firstElementChild, { type: "lines", stagger: 0.3 });
+ }),
+ (r.magicParallax = function (t) {
+ Ss.create({
+ trigger: t,
+ animation: this.tlParallax(t),
+ start: "top bottom",
+ end: "bottom top",
+ scrub: !0,
+ });
+ }),
+ (r.tlParallax = function (t) {
+ var e = new Hi.timeline(),
+ n = t.querySelector(".cb-showcase-item-bg");
+ return (
+ e.set(n, { scale: 1.05, willChange: "transform" }),
+ e.fromTo(n, { yPercent: -20 }, { yPercent: 20, ease: "none" }),
+ e.set(n, { willChange: "auto" }),
+ e
+ );
+ }),
+ i
+ );
+ })(o);
+ function qu(t, e) {
+ return (qu = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Xu = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).layout = e.app.get("layout")),
+ (e.figure = e.el.querySelector(".cb-brandreel-figure")),
+ (e.text = e.el.querySelector(".cb-brandreel-text")),
+ (e.reel = e.el.querySelectorAll(".cb-brandreel-reel")),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ qu(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ return this.initReellers(), this.magicShow(), Promise.resolve();
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.initReellers = function () {
+ var t = this;
+ (this.reellers = []),
+ this.reel.forEach(function (e, n) {
+ var i = new ku({
+ container: e,
+ wrapper: ".cb-brandreel-reel-wrap",
+ itemSelector: ".cb-brandreel-reel-item",
+ speed: 20,
+ plugins: {
+ scroller: {
+ multiplier: 0.1,
+ speed: 1.5,
+ threshold: 1,
+ reversed: !!(n % 2),
+ scrollProxy: function () {
+ return t.layout.scrollTop();
+ },
+ },
+ },
+ });
+ t.reellers.push(i);
+ });
+ }),
+ (r.magicShow = function () {
+ this.figure && vu(this.figure, { duration: 3 }),
+ this.text && mu(this.text);
+ }),
+ i
+ );
+ })(o);
+ function Yu(t, e) {
+ return (Yu = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Zu = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).item =
+ e.el.querySelectorAll(".cb-postcard-item")),
+ e.bindOpen(),
+ e
+ );
+ }
+ return (
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Yu(e, n),
+ (i.prototype.bindOpen = function () {
+ var t = Ss.isTouch;
+ this.item.forEach(function (e) {
+ var n;
+ t
+ ? e.addEventListener("click", function () {
+ e.classList.toggle("-open");
+ })
+ : (e.addEventListener("mouseenter", function () {
+ clearInterval(n), e.classList.add("-open");
+ }),
+ e.addEventListener("mouseleave", function () {
+ clearInterval(n),
+ (n = setTimeout(function () {
+ return e.classList.remove("-open");
+ }, 1e3));
+ }));
+ });
+ }),
+ i
+ );
+ })(o);
+ function Ku(t, e) {
+ return (Ku = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var Ju = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).text = e.el.querySelector(
+ ".cb-achievement-text"
+ )),
+ (e.items = e.el.querySelector(".cb-achievement-items")),
+ (e.item = e.el.querySelectorAll(".cb-achievement-item")),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Ku(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ var t = this;
+ return Promise.resolve(document.fonts.ready).then(function () {
+ t.magicShow(), t.magicShowItems();
+ });
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.magicShow = function () {
+ this.text && mu(this.text);
+ }),
+ (r.magicShowItems = function () {
+ var t = this,
+ e = Hi.matchMedia();
+ e.add("(max-width:767px)", function () {
+ t.item.forEach(function (t) {
+ var e = t.querySelector(".cb-achievement-item-bg"),
+ n = t.querySelector(".cb-achievement-item-figure"),
+ i = t.querySelector(".cb-achievement-item-title"),
+ r = t.querySelector(".cb-achievement-item-text");
+ xu(e, n), mu(i), mu(r);
+ });
+ }),
+ e.add("(min-width:768px)", function () {
+ t.item.forEach(function (e) {
+ Ss.create({
+ trigger: e,
+ animation: t.tlStretchItem(e),
+ invalidateOnRefresh: !0,
+ once: !0,
+ });
+ });
+ });
+ }),
+ (r.tlStretchItem = function (t) {
+ var e = this,
+ n = new Hi.timeline(),
+ i = t.querySelector(".cb-achievement-item-bg"),
+ r = t.querySelector(".cb-achievement-item-figure"),
+ o = t.querySelector(".cb-achievement-item-title"),
+ s = t.querySelector(".cb-achievement-item-text");
+ return (
+ n.fromTo(
+ r,
+ {
+ x: function () {
+ return e.items.offsetWidth / 2 - r.offsetWidth / 2;
+ },
+ },
+ { x: 0, duration: 3, ease: "expo.out" },
+ 0
+ ),
+ n.fromTo(
+ i,
+ {
+ width: function () {
+ return t.offsetHeight;
+ },
+ },
+ {
+ width: function () {
+ return e.items.offsetWidth;
+ },
+ duration: 3,
+ ease: "expo.out",
+ clearProps: "width",
+ },
+ 0
+ ),
+ n.add(pu(o), 0.6),
+ n.add(pu(s), 0.8),
+ n
+ );
+ }),
+ i
+ );
+ })(o);
+ function Qu(t, e) {
+ return (Qu = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (t, e) {
+ return (t.__proto__ = e), t;
+ })(t, e);
+ }
+ var $u = (function (t) {
+ var e, n;
+ function i() {
+ var e;
+ return (
+ ((e = t.apply(this, arguments) || this).header =
+ e.el.querySelector(".cb-outro-header")),
+ (e.caption = e.el.querySelector(".cb-outro-caption")),
+ (e.social = e.el.querySelectorAll(".cb-outro-social")),
+ (e.location = e.el.querySelectorAll(".cb-outro-location")),
+ e.initReeller(),
+ e
+ );
+ }
+ (n = t),
+ ((e = i).prototype = Object.create(n.prototype)),
+ (e.prototype.constructor = e),
+ Qu(e, n);
+ var r = i.prototype;
+ return (
+ (r.onInit = function () {
+ try {
+ var t = this;
+ return Promise.resolve(t.app.wait("loader")).then(function () {
+ t.magicShow();
+ });
+ } catch (t) {
+ return Promise.reject(t);
+ }
+ }),
+ (r.initReeller = function () {
+ Ss.isTouch ||
+ this.social.forEach(function (t) {
+ var e = t.querySelector(".cb-outro-social-reel"),
+ n = new ku({
+ container: e,
+ wrapper: ".cb-outro-social-reel-wrap",
+ itemSelector: ".cb-outro-social-reel-item",
+ autoStop: !1,
+ speed: 3,
+ });
+ t.addEventListener("mouseenter", function () {
+ return n.reverse();
+ }),
+ t.addEventListener("mouseleave", function () {
+ return n.pause();
+ });
+ });
+ }),
+ (r.magicShow = function () {
+ var t = this;
+ this.header &&
+ mu(this.header.firstElementChild, { type: "lines", stagger: 0.3 }),
+ this.caption && mu(this.caption, { stagger: 0.1 }),
+ this.social.length &&
+ this.social.forEach(function (e) {
+ Ss.create({
+ trigger: e,
+ start: "center bottom",
+ animation: t.tlShowSocialItem(e),
+ once: !0,
+ });
+ }),
+ this.location.length &&
+ this.location.forEach(function (e) {
+ Ss.create({
+ trigger: e,
+ start: "center bottom",
+ animation: t.tlShowLocationItem(e),
+ once: !0,
+ });
+ });
+ }),
+ (r.tlShowSocialItem = function (t) {
+ var e = new Hi.timeline(),
+ n = t.querySelector(".cb-outro-social-title"),
+ i = t.querySelector(".cb-outro-social-divider"),
+ r = t.querySelector(".cb-outro-social-arr");
+ return (
+ Hi.set(i, { scaleX: 0, transformOrigin: "left center" }),
+ e.to(
+ i,
+ { scaleX: 1, duration: 3, stagger: 0.3, ease: "expo.out" },
+ 0
+ ),
+ e.add(pu(n, { duration: 2.5 }), 0),
+ e.add(gu(r), 0.5),
+ e
+ );
+ }),
+ (r.tlShowLocationItem = function (t) {
+ var e = new Hi.timeline(),
+ n = t.querySelector(".cb-outro-location-caption"),
+ i = t.querySelector(".cb-outro-location-address"),
+ r = t.querySelector(".cb-outro-location-action");
+ return e.add(bu(n), 0), e.add(pu(i), 0.2), e.add(yu(r), 0.4), e;
+ }),
+ i
+ );
+ })(o);
+ /**
+ * @license
+ * Copyright 2010-2022 Three.js Authors
+ * SPDX-License-Identifier: MIT
+ */ class tc {
+ addEventListener(t, e) {
+ void 0 === this._listeners && (this._listeners = {});
+ const n = this._listeners;
+ void 0 === n[t] && (n[t] = []), -1 === n[t].indexOf(e) && n[t].push(e);
+ }
+ hasEventListener(t, e) {
+ if (void 0 === this._listeners) return !1;
+ const n = this._listeners;
+ return void 0 !== n[t] && -1 !== n[t].indexOf(e);
+ }
+ removeEventListener(t, e) {
+ if (void 0 === this._listeners) return;
+ const n = this._listeners[t];
+ if (void 0 !== n) {
+ const t = n.indexOf(e);
+ -1 !== t && n.splice(t, 1);
+ }
+ }
+ dispatchEvent(t) {
+ if (void 0 === this._listeners) return;
+ const e = this._listeners[t.type];
+ if (void 0 !== e) {
+ t.target = this;
+ const n = e.slice(0);
+ for (let e = 0, i = n.length; e < i; e++) n[e].call(this, t);
+ t.target = null;
+ }
+ }
+ }
+ const ec = [
+ "00",
+ "01",
+ "02",
+ "03",
+ "04",
+ "05",
+ "06",
+ "07",
+ "08",
+ "09",
+ "0a",
+ "0b",
+ "0c",
+ "0d",
+ "0e",
+ "0f",
+ "10",
+ "11",
+ "12",
+ "13",
+ "14",
+ "15",
+ "16",
+ "17",
+ "18",
+ "19",
+ "1a",
+ "1b",
+ "1c",
+ "1d",
+ "1e",
+ "1f",
+ "20",
+ "21",
+ "22",
+ "23",
+ "24",
+ "25",
+ "26",
+ "27",
+ "28",
+ "29",
+ "2a",
+ "2b",
+ "2c",
+ "2d",
+ "2e",
+ "2f",
+ "30",
+ "31",
+ "32",
+ "33",
+ "34",
+ "35",
+ "36",
+ "37",
+ "38",
+ "39",
+ "3a",
+ "3b",
+ "3c",
+ "3d",
+ "3e",
+ "3f",
+ "40",
+ "41",
+ "42",
+ "43",
+ "44",
+ "45",
+ "46",
+ "47",
+ "48",
+ "49",
+ "4a",
+ "4b",
+ "4c",
+ "4d",
+ "4e",
+ "4f",
+ "50",
+ "51",
+ "52",
+ "53",
+ "54",
+ "55",
+ "56",
+ "57",
+ "58",
+ "59",
+ "5a",
+ "5b",
+ "5c",
+ "5d",
+ "5e",
+ "5f",
+ "60",
+ "61",
+ "62",
+ "63",
+ "64",
+ "65",
+ "66",
+ "67",
+ "68",
+ "69",
+ "6a",
+ "6b",
+ "6c",
+ "6d",
+ "6e",
+ "6f",
+ "70",
+ "71",
+ "72",
+ "73",
+ "74",
+ "75",
+ "76",
+ "77",
+ "78",
+ "79",
+ "7a",
+ "7b",
+ "7c",
+ "7d",
+ "7e",
+ "7f",
+ "80",
+ "81",
+ "82",
+ "83",
+ "84",
+ "85",
+ "86",
+ "87",
+ "88",
+ "89",
+ "8a",
+ "8b",
+ "8c",
+ "8d",
+ "8e",
+ "8f",
+ "90",
+ "91",
+ "92",
+ "93",
+ "94",
+ "95",
+ "96",
+ "97",
+ "98",
+ "99",
+ "9a",
+ "9b",
+ "9c",
+ "9d",
+ "9e",
+ "9f",
+ "a0",
+ "a1",
+ "a2",
+ "a3",
+ "a4",
+ "a5",
+ "a6",
+ "a7",
+ "a8",
+ "a9",
+ "aa",
+ "ab",
+ "ac",
+ "ad",
+ "ae",
+ "af",
+ "b0",
+ "b1",
+ "b2",
+ "b3",
+ "b4",
+ "b5",
+ "b6",
+ "b7",
+ "b8",
+ "b9",
+ "ba",
+ "bb",
+ "bc",
+ "bd",
+ "be",
+ "bf",
+ "c0",
+ "c1",
+ "c2",
+ "c3",
+ "c4",
+ "c5",
+ "c6",
+ "c7",
+ "c8",
+ "c9",
+ "ca",
+ "cb",
+ "cc",
+ "cd",
+ "ce",
+ "cf",
+ "d0",
+ "d1",
+ "d2",
+ "d3",
+ "d4",
+ "d5",
+ "d6",
+ "d7",
+ "d8",
+ "d9",
+ "da",
+ "db",
+ "dc",
+ "dd",
+ "de",
+ "df",
+ "e0",
+ "e1",
+ "e2",
+ "e3",
+ "e4",
+ "e5",
+ "e6",
+ "e7",
+ "e8",
+ "e9",
+ "ea",
+ "eb",
+ "ec",
+ "ed",
+ "ee",
+ "ef",
+ "f0",
+ "f1",
+ "f2",
+ "f3",
+ "f4",
+ "f5",
+ "f6",
+ "f7",
+ "f8",
+ "f9",
+ "fa",
+ "fb",
+ "fc",
+ "fd",
+ "fe",
+ "ff",
+ ];
+ const nc = Math.PI / 180,
+ ic = 180 / Math.PI;
+ function rc() {
+ const t = (4294967295 * Math.random()) | 0,
+ e = (4294967295 * Math.random()) | 0,
+ n = (4294967295 * Math.random()) | 0,
+ i = (4294967295 * Math.random()) | 0;
+ return (
+ ec[255 & t] +
+ ec[(t >> 8) & 255] +
+ ec[(t >> 16) & 255] +
+ ec[(t >> 24) & 255] +
+ "-" +
+ ec[255 & e] +
+ ec[(e >> 8) & 255] +
+ "-" +
+ ec[((e >> 16) & 15) | 64] +
+ ec[(e >> 24) & 255] +
+ "-" +
+ ec[(63 & n) | 128] +
+ ec[(n >> 8) & 255] +
+ "-" +
+ ec[(n >> 16) & 255] +
+ ec[(n >> 24) & 255] +
+ ec[255 & i] +
+ ec[(i >> 8) & 255] +
+ ec[(i >> 16) & 255] +
+ ec[(i >> 24) & 255]
+ ).toLowerCase();
+ }
+ function oc(t, e, n) {
+ return Math.max(e, Math.min(n, t));
+ }
+ function sc(t, e) {
+ return ((t % e) + e) % e;
+ }
+ function ac(t, e, n) {
+ return (1 - n) * t + n * e;
+ }
+ function lc(t) {
+ return 0 == (t & (t - 1)) && 0 !== t;
+ }
+ function uc(t) {
+ return Math.pow(2, Math.floor(Math.log(t) / Math.LN2));
+ }
+ function cc(t, e) {
+ switch (e.constructor) {
+ case Float32Array:
+ return t;
+ case Uint16Array:
+ return t / 65535;
+ case Uint8Array:
+ return t / 255;
+ case Int16Array:
+ return Math.max(t / 32767, -1);
+ case Int8Array:
+ return Math.max(t / 127, -1);
+ default:
+ throw new Error("Invalid component type.");
+ }
+ }
+ function hc(t, e) {
+ switch (e.constructor) {
+ case Float32Array:
+ return t;
+ case Uint16Array:
+ return Math.round(65535 * t);
+ case Uint8Array:
+ return Math.round(255 * t);
+ case Int16Array:
+ return Math.round(32767 * t);
+ case Int8Array:
+ return Math.round(127 * t);
+ default:
+ throw new Error("Invalid component type.");
+ }
+ }
+ class dc {
+ constructor(t = 0, e = 0) {
+ (dc.prototype.isVector2 = !0), (this.x = t), (this.y = e);
+ }
+ get width() {
+ return this.x;
+ }
+ set width(t) {
+ this.x = t;
+ }
+ get height() {
+ return this.y;
+ }
+ set height(t) {
+ this.y = t;
+ }
+ set(t, e) {
+ return (this.x = t), (this.y = e), this;
+ }
+ setScalar(t) {
+ return (this.x = t), (this.y = t), this;
+ }
+ setX(t) {
+ return (this.x = t), this;
+ }
+ setY(t) {
+ return (this.y = t), this;
+ }
+ setComponent(t, e) {
+ switch (t) {
+ case 0:
+ this.x = e;
+ break;
+ case 1:
+ this.y = e;
+ break;
+ default:
+ throw new Error("index is out of range: " + t);
+ }
+ return this;
+ }
+ getComponent(t) {
+ switch (t) {
+ case 0:
+ return this.x;
+ case 1:
+ return this.y;
+ default:
+ throw new Error("index is out of range: " + t);
+ }
+ }
+ clone() {
+ return new this.constructor(this.x, this.y);
+ }
+ copy(t) {
+ return (this.x = t.x), (this.y = t.y), this;
+ }
+ add(t) {
+ return (this.x += t.x), (this.y += t.y), this;
+ }
+ addScalar(t) {
+ return (this.x += t), (this.y += t), this;
+ }
+ addVectors(t, e) {
+ return (this.x = t.x + e.x), (this.y = t.y + e.y), this;
+ }
+ addScaledVector(t, e) {
+ return (this.x += t.x * e), (this.y += t.y * e), this;
+ }
+ sub(t) {
+ return (this.x -= t.x), (this.y -= t.y), this;
+ }
+ subScalar(t) {
+ return (this.x -= t), (this.y -= t), this;
+ }
+ subVectors(t, e) {
+ return (this.x = t.x - e.x), (this.y = t.y - e.y), this;
+ }
+ multiply(t) {
+ return (this.x *= t.x), (this.y *= t.y), this;
+ }
+ multiplyScalar(t) {
+ return (this.x *= t), (this.y *= t), this;
+ }
+ divide(t) {
+ return (this.x /= t.x), (this.y /= t.y), this;
+ }
+ divideScalar(t) {
+ return this.multiplyScalar(1 / t);
+ }
+ applyMatrix3(t) {
+ const e = this.x,
+ n = this.y,
+ i = t.elements;
+ return (
+ (this.x = i[0] * e + i[3] * n + i[6]),
+ (this.y = i[1] * e + i[4] * n + i[7]),
+ this
+ );
+ }
+ min(t) {
+ return (
+ (this.x = Math.min(this.x, t.x)),
+ (this.y = Math.min(this.y, t.y)),
+ this
+ );
+ }
+ max(t) {
+ return (
+ (this.x = Math.max(this.x, t.x)),
+ (this.y = Math.max(this.y, t.y)),
+ this
+ );
+ }
+ clamp(t, e) {
+ return (
+ (this.x = Math.max(t.x, Math.min(e.x, this.x))),
+ (this.y = Math.max(t.y, Math.min(e.y, this.y))),
+ this
+ );
+ }
+ clampScalar(t, e) {
+ return (
+ (this.x = Math.max(t, Math.min(e, this.x))),
+ (this.y = Math.max(t, Math.min(e, this.y))),
+ this
+ );
+ }
+ clampLength(t, e) {
+ const n = this.length();
+ return this.divideScalar(n || 1).multiplyScalar(
+ Math.max(t, Math.min(e, n))
+ );
+ }
+ floor() {
+ return (
+ (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), this
+ );
+ }
+ ceil() {
+ return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), this;
+ }
+ round() {
+ return (
+ (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), this
+ );
+ }
+ roundToZero() {
+ 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() {
+ return (this.x = -this.x), (this.y = -this.y), this;
+ }
+ dot(t) {
+ return this.x * t.x + this.y * t.y;
+ }
+ cross(t) {
+ return this.x * t.y - this.y * t.x;
+ }
+ lengthSq() {
+ return this.x * this.x + this.y * this.y;
+ }
+ length() {
+ return Math.sqrt(this.x * this.x + this.y * this.y);
+ }
+ manhattanLength() {
+ return Math.abs(this.x) + Math.abs(this.y);
+ }
+ normalize() {
+ return this.divideScalar(this.length() || 1);
+ }
+ angle() {
+ return Math.atan2(-this.y, -this.x) + Math.PI;
+ }
+ distanceTo(t) {
+ return Math.sqrt(this.distanceToSquared(t));
+ }
+ distanceToSquared(t) {
+ const e = this.x - t.x,
+ n = this.y - t.y;
+ return e * e + n * n;
+ }
+ manhattanDistanceTo(t) {
+ return Math.abs(this.x - t.x) + Math.abs(this.y - t.y);
+ }
+ setLength(t) {
+ return this.normalize().multiplyScalar(t);
+ }
+ lerp(t, e) {
+ return (
+ (this.x += (t.x - this.x) * e), (this.y += (t.y - this.y) * e), this
+ );
+ }
+ lerpVectors(t, e, n) {
+ return (
+ (this.x = t.x + (e.x - t.x) * n),
+ (this.y = t.y + (e.y - t.y) * n),
+ this
+ );
+ }
+ equals(t) {
+ return t.x === this.x && t.y === this.y;
+ }
+ fromArray(t, e = 0) {
+ return (this.x = t[e]), (this.y = t[e + 1]), this;
+ }
+ toArray(t = [], e = 0) {
+ return (t[e] = this.x), (t[e + 1] = this.y), t;
+ }
+ fromBufferAttribute(t, e) {
+ return (this.x = t.getX(e)), (this.y = t.getY(e)), this;
+ }
+ rotateAround(t, e) {
+ const n = Math.cos(e),
+ i = Math.sin(e),
+ r = this.x - t.x,
+ o = this.y - t.y;
+ return (
+ (this.x = r * n - o * i + t.x), (this.y = r * i + o * n + t.y), this
+ );
+ }
+ random() {
+ return (this.x = Math.random()), (this.y = Math.random()), this;
+ }
+ *[Symbol.iterator]() {
+ yield this.x, yield this.y;
+ }
+ }
+ class fc {
+ constructor() {
+ (fc.prototype.isMatrix3 = !0),
+ (this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1]);
+ }
+ set(t, e, n, i, r, o, s, a, l) {
+ const u = this.elements;
+ return (
+ (u[0] = t),
+ (u[1] = i),
+ (u[2] = s),
+ (u[3] = e),
+ (u[4] = r),
+ (u[5] = a),
+ (u[6] = n),
+ (u[7] = o),
+ (u[8] = l),
+ this
+ );
+ }
+ identity() {
+ return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this;
+ }
+ copy(t) {
+ const e = this.elements,
+ n = t.elements;
+ return (
+ (e[0] = n[0]),
+ (e[1] = n[1]),
+ (e[2] = n[2]),
+ (e[3] = n[3]),
+ (e[4] = n[4]),
+ (e[5] = n[5]),
+ (e[6] = n[6]),
+ (e[7] = n[7]),
+ (e[8] = n[8]),
+ this
+ );
+ }
+ extractBasis(t, e, n) {
+ return (
+ t.setFromMatrix3Column(this, 0),
+ e.setFromMatrix3Column(this, 1),
+ n.setFromMatrix3Column(this, 2),
+ this
+ );
+ }
+ setFromMatrix4(t) {
+ const e = t.elements;
+ return (
+ this.set(e[0], e[4], e[8], e[1], e[5], e[9], e[2], e[6], e[10]), this
+ );
+ }
+ multiply(t) {
+ return this.multiplyMatrices(this, t);
+ }
+ premultiply(t) {
+ return this.multiplyMatrices(t, this);
+ }
+ multiplyMatrices(t, e) {
+ const n = t.elements,
+ i = e.elements,
+ r = this.elements,
+ o = n[0],
+ s = n[3],
+ a = n[6],
+ l = n[1],
+ u = n[4],
+ c = n[7],
+ h = n[2],
+ d = n[5],
+ f = n[8],
+ p = i[0],
+ m = i[3],
+ g = i[6],
+ v = i[1],
+ _ = i[4],
+ x = i[7],
+ y = i[2],
+ b = i[5],
+ w = i[8];
+ return (
+ (r[0] = o * p + s * v + a * y),
+ (r[3] = o * m + s * _ + a * b),
+ (r[6] = o * g + s * x + a * w),
+ (r[1] = l * p + u * v + c * y),
+ (r[4] = l * m + u * _ + c * b),
+ (r[7] = l * g + u * x + c * w),
+ (r[2] = h * p + d * v + f * y),
+ (r[5] = h * m + d * _ + f * b),
+ (r[8] = h * g + d * x + f * w),
+ this
+ );
+ }
+ multiplyScalar(t) {
+ const e = this.elements;
+ return (
+ (e[0] *= t),
+ (e[3] *= t),
+ (e[6] *= t),
+ (e[1] *= t),
+ (e[4] *= t),
+ (e[7] *= t),
+ (e[2] *= t),
+ (e[5] *= t),
+ (e[8] *= t),
+ this
+ );
+ }
+ determinant() {
+ const t = this.elements,
+ e = t[0],
+ n = t[1],
+ i = t[2],
+ r = t[3],
+ o = t[4],
+ s = t[5],
+ a = t[6],
+ l = t[7],
+ u = t[8];
+ return (
+ e * o * u - e * s * l - n * r * u + n * s * a + i * r * l - i * o * a
+ );
+ }
+ invert() {
+ const t = this.elements,
+ e = t[0],
+ n = t[1],
+ i = t[2],
+ r = t[3],
+ o = t[4],
+ s = t[5],
+ a = t[6],
+ l = t[7],
+ u = t[8],
+ c = u * o - s * l,
+ h = s * a - u * r,
+ d = l * r - o * a,
+ f = e * c + n * h + i * d;
+ if (0 === f) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
+ const p = 1 / f;
+ return (
+ (t[0] = c * p),
+ (t[1] = (i * l - u * n) * p),
+ (t[2] = (s * n - i * o) * p),
+ (t[3] = h * p),
+ (t[4] = (u * e - i * a) * p),
+ (t[5] = (i * r - s * e) * p),
+ (t[6] = d * p),
+ (t[7] = (n * a - l * e) * p),
+ (t[8] = (o * e - n * r) * p),
+ this
+ );
+ }
+ transpose() {
+ let t;
+ const e = this.elements;
+ return (
+ (t = e[1]),
+ (e[1] = e[3]),
+ (e[3] = t),
+ (t = e[2]),
+ (e[2] = e[6]),
+ (e[6] = t),
+ (t = e[5]),
+ (e[5] = e[7]),
+ (e[7] = t),
+ this
+ );
+ }
+ getNormalMatrix(t) {
+ return this.setFromMatrix4(t).invert().transpose();
+ }
+ transposeIntoArray(t) {
+ const e = this.elements;
+ return (
+ (t[0] = e[0]),
+ (t[1] = e[3]),
+ (t[2] = e[6]),
+ (t[3] = e[1]),
+ (t[4] = e[4]),
+ (t[5] = e[7]),
+ (t[6] = e[2]),
+ (t[7] = e[5]),
+ (t[8] = e[8]),
+ this
+ );
+ }
+ setUvTransform(t, e, n, i, r, o, s) {
+ const a = Math.cos(r),
+ l = Math.sin(r);
+ return (
+ this.set(
+ n * a,
+ n * l,
+ -n * (a * o + l * s) + o + t,
+ -i * l,
+ i * a,
+ -i * (-l * o + a * s) + s + e,
+ 0,
+ 0,
+ 1
+ ),
+ this
+ );
+ }
+ scale(t, e) {
+ return this.premultiply(pc.makeScale(t, e)), this;
+ }
+ rotate(t) {
+ return this.premultiply(pc.makeRotation(-t)), this;
+ }
+ translate(t, e) {
+ return this.premultiply(pc.makeTranslation(t, e)), this;
+ }
+ makeTranslation(t, e) {
+ return this.set(1, 0, t, 0, 1, e, 0, 0, 1), this;
+ }
+ makeRotation(t) {
+ const e = Math.cos(t),
+ n = Math.sin(t);
+ return this.set(e, -n, 0, n, e, 0, 0, 0, 1), this;
+ }
+ makeScale(t, e) {
+ return this.set(t, 0, 0, 0, e, 0, 0, 0, 1), this;
+ }
+ equals(t) {
+ const e = this.elements,
+ n = t.elements;
+ for (let t = 0; t < 9; t++) if (e[t] !== n[t]) return !1;
+ return !0;
+ }
+ fromArray(t, e = 0) {
+ for (let n = 0; n < 9; n++) this.elements[n] = t[n + e];
+ return this;
+ }
+ toArray(t = [], e = 0) {
+ const n = this.elements;
+ return (
+ (t[e] = n[0]),
+ (t[e + 1] = n[1]),
+ (t[e + 2] = n[2]),
+ (t[e + 3] = n[3]),
+ (t[e + 4] = n[4]),
+ (t[e + 5] = n[5]),
+ (t[e + 6] = n[6]),
+ (t[e + 7] = n[7]),
+ (t[e + 8] = n[8]),
+ t
+ );
+ }
+ clone() {
+ return new this.constructor().fromArray(this.elements);
+ }
+ }
+ const pc = new fc();
+ function mc(t) {
+ for (let e = t.length - 1; e >= 0; --e) if (t[e] >= 65535) return !0;
+ return !1;
+ }
+ Int8Array,
+ Uint8Array,
+ Uint8ClampedArray,
+ Int16Array,
+ Uint16Array,
+ Int32Array,
+ Uint32Array,
+ Float32Array,
+ Float64Array;
+ function gc(t) {
+ return document.createElementNS("http://www.w3.org/1999/xhtml", t);
+ }
+ function vc(t) {
+ return t < 0.04045
+ ? 0.0773993808 * t
+ : Math.pow(0.9478672986 * t + 0.0521327014, 2.4);
+ }
+ function _c(t) {
+ return t < 0.0031308 ? 12.92 * t : 1.055 * Math.pow(t, 0.41666) - 0.055;
+ }
+ const xc = { srgb: { "srgb-linear": vc }, "srgb-linear": { srgb: _c } },
+ yc = {
+ legacyMode: !0,
+ get workingColorSpace() {
+ return "srgb-linear";
+ },
+ set workingColorSpace(t) {
+ console.warn(
+ "THREE.ColorManagement: .workingColorSpace is readonly."
+ );
+ },
+ convert: function (t, e, n) {
+ if (this.legacyMode || e === n || !e || !n) return t;
+ if (xc[e] && void 0 !== xc[e][n]) {
+ const i = xc[e][n];
+ return (t.r = i(t.r)), (t.g = i(t.g)), (t.b = i(t.b)), t;
+ }
+ throw new Error("Unsupported color space conversion.");
+ },
+ fromWorkingColorSpace: function (t, e) {
+ return this.convert(t, this.workingColorSpace, e);
+ },
+ toWorkingColorSpace: function (t, e) {
+ return this.convert(t, e, this.workingColorSpace);
+ },
+ },
+ bc = {
+ 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,
+ rebeccapurple: 6697881,
+ 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,
+ },
+ wc = { r: 0, g: 0, b: 0 },
+ Sc = { h: 0, s: 0, l: 0 },
+ Mc = { h: 0, s: 0, l: 0 };
+ function Dc(t, e, n) {
+ return (
+ n < 0 && (n += 1),
+ n > 1 && (n -= 1),
+ n < 1 / 6
+ ? t + 6 * (e - t) * n
+ : n < 0.5
+ ? e
+ : n < 2 / 3
+ ? t + 6 * (e - t) * (2 / 3 - n)
+ : t
+ );
+ }
+ function Tc(t, e) {
+ return (e.r = t.r), (e.g = t.g), (e.b = t.b), e;
+ }
+ class Ec {
+ constructor(t, e, n) {
+ return (
+ (this.isColor = !0),
+ (this.r = 1),
+ (this.g = 1),
+ (this.b = 1),
+ void 0 === e && void 0 === n ? this.set(t) : this.setRGB(t, e, n)
+ );
+ }
+ set(t) {
+ return (
+ t && t.isColor
+ ? this.copy(t)
+ : "number" == typeof t
+ ? this.setHex(t)
+ : "string" == typeof t && this.setStyle(t),
+ this
+ );
+ }
+ setScalar(t) {
+ return (this.r = t), (this.g = t), (this.b = t), this;
+ }
+ setHex(t, e = "srgb") {
+ return (
+ (t = Math.floor(t)),
+ (this.r = ((t >> 16) & 255) / 255),
+ (this.g = ((t >> 8) & 255) / 255),
+ (this.b = (255 & t) / 255),
+ yc.toWorkingColorSpace(this, e),
+ this
+ );
+ }
+ setRGB(t, e, n, i = yc.workingColorSpace) {
+ return (
+ (this.r = t),
+ (this.g = e),
+ (this.b = n),
+ yc.toWorkingColorSpace(this, i),
+ this
+ );
+ }
+ setHSL(t, e, n, i = yc.workingColorSpace) {
+ if (((t = sc(t, 1)), (e = oc(e, 0, 1)), (n = oc(n, 0, 1)), 0 === e))
+ this.r = this.g = this.b = n;
+ else {
+ const i = n <= 0.5 ? n * (1 + e) : n + e - n * e,
+ r = 2 * n - i;
+ (this.r = Dc(r, i, t + 1 / 3)),
+ (this.g = Dc(r, i, t)),
+ (this.b = Dc(r, i, t - 1 / 3));
+ }
+ return yc.toWorkingColorSpace(this, i), this;
+ }
+ setStyle(t, e = "srgb") {
+ function n(e) {
+ void 0 !== e &&
+ parseFloat(e) < 1 &&
+ console.warn(
+ "THREE.Color: Alpha component of " + t + " will be ignored."
+ );
+ }
+ let i;
+ if ((i = /^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t))) {
+ let t;
+ const r = i[1],
+ o = i[2];
+ switch (r) {
+ case "rgb":
+ case "rgba":
+ if (
+ (t =
+ /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(
+ o
+ ))
+ )
+ return (
+ (this.r = Math.min(255, parseInt(t[1], 10)) / 255),
+ (this.g = Math.min(255, parseInt(t[2], 10)) / 255),
+ (this.b = Math.min(255, parseInt(t[3], 10)) / 255),
+ yc.toWorkingColorSpace(this, e),
+ n(t[4]),
+ this
+ );
+ if (
+ (t =
+ /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(
+ o
+ ))
+ )
+ return (
+ (this.r = Math.min(100, parseInt(t[1], 10)) / 100),
+ (this.g = Math.min(100, parseInt(t[2], 10)) / 100),
+ (this.b = Math.min(100, parseInt(t[3], 10)) / 100),
+ yc.toWorkingColorSpace(this, e),
+ n(t[4]),
+ this
+ );
+ break;
+ case "hsl":
+ case "hsla":
+ if (
+ (t =
+ /^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(
+ o
+ ))
+ ) {
+ const i = parseFloat(t[1]) / 360,
+ r = parseFloat(t[2]) / 100,
+ o = parseFloat(t[3]) / 100;
+ return n(t[4]), this.setHSL(i, r, o, e);
+ }
+ }
+ } else if ((i = /^\#([A-Fa-f\d]+)$/.exec(t))) {
+ const t = i[1],
+ n = t.length;
+ if (3 === n)
+ return (
+ (this.r = parseInt(t.charAt(0) + t.charAt(0), 16) / 255),
+ (this.g = parseInt(t.charAt(1) + t.charAt(1), 16) / 255),
+ (this.b = parseInt(t.charAt(2) + t.charAt(2), 16) / 255),
+ yc.toWorkingColorSpace(this, e),
+ this
+ );
+ if (6 === n)
+ return (
+ (this.r = parseInt(t.charAt(0) + t.charAt(1), 16) / 255),
+ (this.g = parseInt(t.charAt(2) + t.charAt(3), 16) / 255),
+ (this.b = parseInt(t.charAt(4) + t.charAt(5), 16) / 255),
+ yc.toWorkingColorSpace(this, e),
+ this
+ );
+ }
+ return t && t.length > 0 ? this.setColorName(t, e) : this;
+ }
+ setColorName(t, e = "srgb") {
+ const n = bc[t.toLowerCase()];
+ return (
+ void 0 !== n
+ ? this.setHex(n, e)
+ : console.warn("THREE.Color: Unknown color " + t),
+ this
+ );
+ }
+ clone() {
+ return new this.constructor(this.r, this.g, this.b);
+ }
+ copy(t) {
+ return (this.r = t.r), (this.g = t.g), (this.b = t.b), this;
+ }
+ copySRGBToLinear(t) {
+ return (this.r = vc(t.r)), (this.g = vc(t.g)), (this.b = vc(t.b)), this;
+ }
+ copyLinearToSRGB(t) {
+ return (this.r = _c(t.r)), (this.g = _c(t.g)), (this.b = _c(t.b)), this;
+ }
+ convertSRGBToLinear() {
+ return this.copySRGBToLinear(this), this;
+ }
+ convertLinearToSRGB() {
+ return this.copyLinearToSRGB(this), this;
+ }
+ getHex(t = "srgb") {
+ return (
+ yc.fromWorkingColorSpace(Tc(this, wc), t),
+ (oc(255 * wc.r, 0, 255) << 16) ^
+ (oc(255 * wc.g, 0, 255) << 8) ^
+ (oc(255 * wc.b, 0, 255) << 0)
+ );
+ }
+ getHexString(t = "srgb") {
+ return ("000000" + this.getHex(t).toString(16)).slice(-6);
+ }
+ getHSL(t, e = yc.workingColorSpace) {
+ yc.fromWorkingColorSpace(Tc(this, wc), e);
+ const n = wc.r,
+ i = wc.g,
+ r = wc.b,
+ o = Math.max(n, i, r),
+ s = Math.min(n, i, r);
+ let a, l;
+ const u = (s + o) / 2;
+ if (s === o) (a = 0), (l = 0);
+ else {
+ const t = o - s;
+ switch (((l = u <= 0.5 ? t / (o + s) : t / (2 - o - s)), o)) {
+ case n:
+ a = (i - r) / t + (i < r ? 6 : 0);
+ break;
+ case i:
+ a = (r - n) / t + 2;
+ break;
+ case r:
+ a = (n - i) / t + 4;
+ }
+ a /= 6;
+ }
+ return (t.h = a), (t.s = l), (t.l = u), t;
+ }
+ getRGB(t, e = yc.workingColorSpace) {
+ return (
+ yc.fromWorkingColorSpace(Tc(this, wc), e),
+ (t.r = wc.r),
+ (t.g = wc.g),
+ (t.b = wc.b),
+ t
+ );
+ }
+ getStyle(t = "srgb") {
+ return (
+ yc.fromWorkingColorSpace(Tc(this, wc), t),
+ "srgb" !== t
+ ? `color(${t} ${wc.r} ${wc.g} ${wc.b})`
+ : `rgb(${(255 * wc.r) | 0},${(255 * wc.g) | 0},${(255 * wc.b) | 0})`
+ );
+ }
+ offsetHSL(t, e, n) {
+ return (
+ this.getHSL(Sc),
+ (Sc.h += t),
+ (Sc.s += e),
+ (Sc.l += n),
+ this.setHSL(Sc.h, Sc.s, Sc.l),
+ this
+ );
+ }
+ add(t) {
+ return (this.r += t.r), (this.g += t.g), (this.b += t.b), this;
+ }
+ addColors(t, e) {
+ return (
+ (this.r = t.r + e.r), (this.g = t.g + e.g), (this.b = t.b + e.b), this
+ );
+ }
+ addScalar(t) {
+ return (this.r += t), (this.g += t), (this.b += t), this;
+ }
+ sub(t) {
+ return (
+ (this.r = Math.max(0, this.r - t.r)),
+ (this.g = Math.max(0, this.g - t.g)),
+ (this.b = Math.max(0, this.b - t.b)),
+ this
+ );
+ }
+ multiply(t) {
+ return (this.r *= t.r), (this.g *= t.g), (this.b *= t.b), this;
+ }
+ multiplyScalar(t) {
+ return (this.r *= t), (this.g *= t), (this.b *= t), this;
+ }
+ lerp(t, e) {
+ return (
+ (this.r += (t.r - this.r) * e),
+ (this.g += (t.g - this.g) * e),
+ (this.b += (t.b - this.b) * e),
+ this
+ );
+ }
+ lerpColors(t, e, n) {
+ return (
+ (this.r = t.r + (e.r - t.r) * n),
+ (this.g = t.g + (e.g - t.g) * n),
+ (this.b = t.b + (e.b - t.b) * n),
+ this
+ );
+ }
+ lerpHSL(t, e) {
+ this.getHSL(Sc), t.getHSL(Mc);
+ const n = ac(Sc.h, Mc.h, e),
+ i = ac(Sc.s, Mc.s, e),
+ r = ac(Sc.l, Mc.l, e);
+ return this.setHSL(n, i, r), this;
+ }
+ equals(t) {
+ return t.r === this.r && t.g === this.g && t.b === this.b;
+ }
+ fromArray(t, e = 0) {
+ return (this.r = t[e]), (this.g = t[e + 1]), (this.b = t[e + 2]), this;
+ }
+ toArray(t = [], e = 0) {
+ return (t[e] = this.r), (t[e + 1] = this.g), (t[e + 2] = this.b), t;
+ }
+ fromBufferAttribute(t, e) {
+ return (
+ (this.r = t.getX(e)), (this.g = t.getY(e)), (this.b = t.getZ(e)), this
+ );
+ }
+ toJSON() {
+ return this.getHex();
+ }
+ *[Symbol.iterator]() {
+ yield this.r, yield this.g, yield this.b;
+ }
+ }
+ let Cc;
+ Ec.NAMES = bc;
+ class Ac {
+ static getDataURL(t) {
+ if (/^data:/i.test(t.src)) return t.src;
+ if ("undefined" == typeof HTMLCanvasElement) return t.src;
+ let e;
+ if (t instanceof HTMLCanvasElement) e = t;
+ else {
+ void 0 === Cc && (Cc = gc("canvas")),
+ (Cc.width = t.width),
+ (Cc.height = t.height);
+ const n = Cc.getContext("2d");
+ t instanceof ImageData
+ ? n.putImageData(t, 0, 0)
+ : n.drawImage(t, 0, 0, t.width, t.height),
+ (e = Cc);
+ }
+ return e.width > 2048 || e.height > 2048
+ ? (console.warn(
+ "THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",
+ t
+ ),
+ e.toDataURL("image/jpeg", 0.6))
+ : e.toDataURL("image/png");
+ }
+ static sRGBToLinear(t) {
+ if (
+ ("undefined" != typeof HTMLImageElement &&
+ t instanceof HTMLImageElement) ||
+ ("undefined" != typeof HTMLCanvasElement &&
+ t instanceof HTMLCanvasElement) ||
+ ("undefined" != typeof ImageBitmap && t instanceof ImageBitmap)
+ ) {
+ const e = gc("canvas");
+ (e.width = t.width), (e.height = t.height);
+ const n = e.getContext("2d");
+ n.drawImage(t, 0, 0, t.width, t.height);
+ const i = n.getImageData(0, 0, t.width, t.height),
+ r = i.data;
+ for (let t = 0; t < r.length; t++) r[t] = 255 * vc(r[t] / 255);
+ return n.putImageData(i, 0, 0), e;
+ }
+ if (t.data) {
+ const e = t.data.slice(0);
+ for (let t = 0; t < e.length; t++)
+ e instanceof Uint8Array || e instanceof Uint8ClampedArray
+ ? (e[t] = Math.floor(255 * vc(e[t] / 255)))
+ : (e[t] = vc(e[t]));
+ return { data: e, width: t.width, height: t.height };
+ }
+ return (
+ console.warn(
+ "THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."
+ ),
+ t
+ );
+ }
+ }
+ class Pc {
+ constructor(t = null) {
+ (this.isSource = !0),
+ (this.uuid = rc()),
+ (this.data = t),
+ (this.version = 0);
+ }
+ set needsUpdate(t) {
+ !0 === t && this.version++;
+ }
+ toJSON(t) {
+ const e = void 0 === t || "string" == typeof t;
+ if (!e && void 0 !== t.images[this.uuid]) return t.images[this.uuid];
+ const n = { uuid: this.uuid, url: "" },
+ i = this.data;
+ if (null !== i) {
+ let t;
+ if (Array.isArray(i)) {
+ t = [];
+ for (let e = 0, n = i.length; e < n; e++)
+ i[e].isDataTexture ? t.push(Lc(i[e].image)) : t.push(Lc(i[e]));
+ } else t = Lc(i);
+ n.url = t;
+ }
+ return e || (t.images[this.uuid] = n), n;
+ }
+ }
+ function Lc(t) {
+ return ("undefined" != typeof HTMLImageElement &&
+ t instanceof HTMLImageElement) ||
+ ("undefined" != typeof HTMLCanvasElement &&
+ t instanceof HTMLCanvasElement) ||
+ ("undefined" != typeof ImageBitmap && t instanceof ImageBitmap)
+ ? Ac.getDataURL(t)
+ : t.data
+ ? {
+ data: Array.from(t.data),
+ width: t.width,
+ height: t.height,
+ type: t.data.constructor.name,
+ }
+ : (console.warn("THREE.Texture: Unable to serialize Texture."), {});
+ }
+ let Rc = 0;
+ class Oc extends tc {
+ constructor(
+ t = Oc.DEFAULT_IMAGE,
+ e = Oc.DEFAULT_MAPPING,
+ n = 1001,
+ i = 1001,
+ r = 1006,
+ o = 1008,
+ s = 1023,
+ a = 1009,
+ l = Oc.DEFAULT_ANISOTROPY,
+ u = 3e3
+ ) {
+ super(),
+ (this.isTexture = !0),
+ Object.defineProperty(this, "id", { value: Rc++ }),
+ (this.uuid = rc()),
+ (this.name = ""),
+ (this.source = new Pc(t)),
+ (this.mipmaps = []),
+ (this.mapping = e),
+ (this.wrapS = n),
+ (this.wrapT = i),
+ (this.magFilter = r),
+ (this.minFilter = o),
+ (this.anisotropy = l),
+ (this.format = s),
+ (this.internalFormat = null),
+ (this.type = a),
+ (this.offset = new dc(0, 0)),
+ (this.repeat = new dc(1, 1)),
+ (this.center = new dc(0, 0)),
+ (this.rotation = 0),
+ (this.matrixAutoUpdate = !0),
+ (this.matrix = new fc()),
+ (this.generateMipmaps = !0),
+ (this.premultiplyAlpha = !1),
+ (this.flipY = !0),
+ (this.unpackAlignment = 4),
+ (this.encoding = u),
+ (this.userData = {}),
+ (this.version = 0),
+ (this.onUpdate = null),
+ (this.isRenderTargetTexture = !1),
+ (this.needsPMREMUpdate = !1);
+ }
+ get image() {
+ return this.source.data;
+ }
+ set image(t) {
+ this.source.data = t;
+ }
+ updateMatrix() {
+ this.matrix.setUvTransform(
+ this.offset.x,
+ this.offset.y,
+ this.repeat.x,
+ this.repeat.y,
+ this.rotation,
+ this.center.x,
+ this.center.y
+ );
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ copy(t) {
+ return (
+ (this.name = t.name),
+ (this.source = t.source),
+ (this.mipmaps = t.mipmaps.slice(0)),
+ (this.mapping = t.mapping),
+ (this.wrapS = t.wrapS),
+ (this.wrapT = t.wrapT),
+ (this.magFilter = t.magFilter),
+ (this.minFilter = t.minFilter),
+ (this.anisotropy = t.anisotropy),
+ (this.format = t.format),
+ (this.internalFormat = t.internalFormat),
+ (this.type = t.type),
+ this.offset.copy(t.offset),
+ this.repeat.copy(t.repeat),
+ this.center.copy(t.center),
+ (this.rotation = t.rotation),
+ (this.matrixAutoUpdate = t.matrixAutoUpdate),
+ this.matrix.copy(t.matrix),
+ (this.generateMipmaps = t.generateMipmaps),
+ (this.premultiplyAlpha = t.premultiplyAlpha),
+ (this.flipY = t.flipY),
+ (this.unpackAlignment = t.unpackAlignment),
+ (this.encoding = t.encoding),
+ (this.userData = JSON.parse(JSON.stringify(t.userData))),
+ (this.needsUpdate = !0),
+ this
+ );
+ }
+ toJSON(t) {
+ const e = void 0 === t || "string" == typeof t;
+ if (!e && void 0 !== t.textures[this.uuid])
+ return t.textures[this.uuid];
+ const n = {
+ metadata: {
+ version: 4.5,
+ type: "Texture",
+ generator: "Texture.toJSON",
+ },
+ uuid: this.uuid,
+ name: this.name,
+ image: this.source.toJSON(t).uuid,
+ mapping: this.mapping,
+ repeat: [this.repeat.x, this.repeat.y],
+ offset: [this.offset.x, this.offset.y],
+ center: [this.center.x, this.center.y],
+ rotation: this.rotation,
+ wrap: [this.wrapS, this.wrapT],
+ format: this.format,
+ type: this.type,
+ encoding: this.encoding,
+ minFilter: this.minFilter,
+ magFilter: this.magFilter,
+ anisotropy: this.anisotropy,
+ flipY: this.flipY,
+ generateMipmaps: this.generateMipmaps,
+ premultiplyAlpha: this.premultiplyAlpha,
+ unpackAlignment: this.unpackAlignment,
+ };
+ return (
+ Object.keys(this.userData).length > 0 && (n.userData = this.userData),
+ e || (t.textures[this.uuid] = n),
+ n
+ );
+ }
+ dispose() {
+ this.dispatchEvent({ type: "dispose" });
+ }
+ transformUv(t) {
+ if (300 !== this.mapping) return t;
+ if ((t.applyMatrix3(this.matrix), t.x < 0 || t.x > 1))
+ switch (this.wrapS) {
+ case 1e3:
+ t.x = t.x - Math.floor(t.x);
+ break;
+ case 1001:
+ t.x = t.x < 0 ? 0 : 1;
+ break;
+ case 1002:
+ 1 === Math.abs(Math.floor(t.x) % 2)
+ ? (t.x = Math.ceil(t.x) - t.x)
+ : (t.x = t.x - Math.floor(t.x));
+ }
+ if (t.y < 0 || t.y > 1)
+ switch (this.wrapT) {
+ case 1e3:
+ t.y = t.y - Math.floor(t.y);
+ break;
+ case 1001:
+ t.y = t.y < 0 ? 0 : 1;
+ break;
+ case 1002:
+ 1 === Math.abs(Math.floor(t.y) % 2)
+ ? (t.y = Math.ceil(t.y) - t.y)
+ : (t.y = t.y - Math.floor(t.y));
+ }
+ return this.flipY && (t.y = 1 - t.y), t;
+ }
+ set needsUpdate(t) {
+ !0 === t && (this.version++, (this.source.needsUpdate = !0));
+ }
+ }
+ (Oc.DEFAULT_IMAGE = null),
+ (Oc.DEFAULT_MAPPING = 300),
+ (Oc.DEFAULT_ANISOTROPY = 1);
+ class Fc {
+ constructor(t = 0, e = 0, n = 0, i = 1) {
+ (Fc.prototype.isVector4 = !0),
+ (this.x = t),
+ (this.y = e),
+ (this.z = n),
+ (this.w = i);
+ }
+ get width() {
+ return this.z;
+ }
+ set width(t) {
+ this.z = t;
+ }
+ get height() {
+ return this.w;
+ }
+ set height(t) {
+ this.w = t;
+ }
+ set(t, e, n, i) {
+ return (this.x = t), (this.y = e), (this.z = n), (this.w = i), this;
+ }
+ setScalar(t) {
+ return (this.x = t), (this.y = t), (this.z = t), (this.w = t), this;
+ }
+ setX(t) {
+ return (this.x = t), this;
+ }
+ setY(t) {
+ return (this.y = t), this;
+ }
+ setZ(t) {
+ return (this.z = t), this;
+ }
+ setW(t) {
+ return (this.w = t), this;
+ }
+ setComponent(t, e) {
+ switch (t) {
+ case 0:
+ this.x = e;
+ break;
+ case 1:
+ this.y = e;
+ break;
+ case 2:
+ this.z = e;
+ break;
+ case 3:
+ this.w = e;
+ break;
+ default:
+ throw new Error("index is out of range: " + t);
+ }
+ return this;
+ }
+ getComponent(t) {
+ switch (t) {
+ 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: " + t);
+ }
+ }
+ clone() {
+ return new this.constructor(this.x, this.y, this.z, this.w);
+ }
+ copy(t) {
+ return (
+ (this.x = t.x),
+ (this.y = t.y),
+ (this.z = t.z),
+ (this.w = void 0 !== t.w ? t.w : 1),
+ this
+ );
+ }
+ add(t) {
+ return (
+ (this.x += t.x),
+ (this.y += t.y),
+ (this.z += t.z),
+ (this.w += t.w),
+ this
+ );
+ }
+ addScalar(t) {
+ return (this.x += t), (this.y += t), (this.z += t), (this.w += t), this;
+ }
+ addVectors(t, e) {
+ return (
+ (this.x = t.x + e.x),
+ (this.y = t.y + e.y),
+ (this.z = t.z + e.z),
+ (this.w = t.w + e.w),
+ this
+ );
+ }
+ addScaledVector(t, e) {
+ return (
+ (this.x += t.x * e),
+ (this.y += t.y * e),
+ (this.z += t.z * e),
+ (this.w += t.w * e),
+ this
+ );
+ }
+ sub(t) {
+ return (
+ (this.x -= t.x),
+ (this.y -= t.y),
+ (this.z -= t.z),
+ (this.w -= t.w),
+ this
+ );
+ }
+ subScalar(t) {
+ return (this.x -= t), (this.y -= t), (this.z -= t), (this.w -= t), this;
+ }
+ subVectors(t, e) {
+ return (
+ (this.x = t.x - e.x),
+ (this.y = t.y - e.y),
+ (this.z = t.z - e.z),
+ (this.w = t.w - e.w),
+ this
+ );
+ }
+ multiply(t) {
+ return (
+ (this.x *= t.x),
+ (this.y *= t.y),
+ (this.z *= t.z),
+ (this.w *= t.w),
+ this
+ );
+ }
+ multiplyScalar(t) {
+ return (this.x *= t), (this.y *= t), (this.z *= t), (this.w *= t), this;
+ }
+ applyMatrix4(t) {
+ const e = this.x,
+ n = this.y,
+ i = this.z,
+ r = this.w,
+ o = t.elements;
+ return (
+ (this.x = o[0] * e + o[4] * n + o[8] * i + o[12] * r),
+ (this.y = o[1] * e + o[5] * n + o[9] * i + o[13] * r),
+ (this.z = o[2] * e + o[6] * n + o[10] * i + o[14] * r),
+ (this.w = o[3] * e + o[7] * n + o[11] * i + o[15] * r),
+ this
+ );
+ }
+ divideScalar(t) {
+ return this.multiplyScalar(1 / t);
+ }
+ setAxisAngleFromQuaternion(t) {
+ this.w = 2 * Math.acos(t.w);
+ const e = Math.sqrt(1 - t.w * t.w);
+ return (
+ e < 1e-4
+ ? ((this.x = 1), (this.y = 0), (this.z = 0))
+ : ((this.x = t.x / e), (this.y = t.y / e), (this.z = t.z / e)),
+ this
+ );
+ }
+ setAxisAngleFromRotationMatrix(t) {
+ let e, n, i, r;
+ const o = t.elements,
+ s = o[0],
+ a = o[4],
+ l = o[8],
+ u = o[1],
+ c = o[5],
+ h = o[9],
+ d = o[2],
+ f = o[6],
+ p = o[10];
+ if (
+ Math.abs(a - u) < 0.01 &&
+ Math.abs(l - d) < 0.01 &&
+ Math.abs(h - f) < 0.01
+ ) {
+ if (
+ Math.abs(a + u) < 0.1 &&
+ Math.abs(l + d) < 0.1 &&
+ Math.abs(h + f) < 0.1 &&
+ Math.abs(s + c + p - 3) < 0.1
+ )
+ return this.set(1, 0, 0, 0), this;
+ e = Math.PI;
+ const t = (s + 1) / 2,
+ o = (c + 1) / 2,
+ m = (p + 1) / 2,
+ g = (a + u) / 4,
+ v = (l + d) / 4,
+ _ = (h + f) / 4;
+ return (
+ t > o && t > m
+ ? t < 0.01
+ ? ((n = 0), (i = 0.707106781), (r = 0.707106781))
+ : ((n = Math.sqrt(t)), (i = g / n), (r = v / n))
+ : o > m
+ ? o < 0.01
+ ? ((n = 0.707106781), (i = 0), (r = 0.707106781))
+ : ((i = Math.sqrt(o)), (n = g / i), (r = _ / i))
+ : m < 0.01
+ ? ((n = 0.707106781), (i = 0.707106781), (r = 0))
+ : ((r = Math.sqrt(m)), (n = v / r), (i = _ / r)),
+ this.set(n, i, r, e),
+ this
+ );
+ }
+ let m = Math.sqrt(
+ (f - h) * (f - h) + (l - d) * (l - d) + (u - a) * (u - a)
+ );
+ return (
+ Math.abs(m) < 0.001 && (m = 1),
+ (this.x = (f - h) / m),
+ (this.y = (l - d) / m),
+ (this.z = (u - a) / m),
+ (this.w = Math.acos((s + c + p - 1) / 2)),
+ this
+ );
+ }
+ min(t) {
+ return (
+ (this.x = Math.min(this.x, t.x)),
+ (this.y = Math.min(this.y, t.y)),
+ (this.z = Math.min(this.z, t.z)),
+ (this.w = Math.min(this.w, t.w)),
+ this
+ );
+ }
+ max(t) {
+ return (
+ (this.x = Math.max(this.x, t.x)),
+ (this.y = Math.max(this.y, t.y)),
+ (this.z = Math.max(this.z, t.z)),
+ (this.w = Math.max(this.w, t.w)),
+ this
+ );
+ }
+ clamp(t, e) {
+ return (
+ (this.x = Math.max(t.x, Math.min(e.x, this.x))),
+ (this.y = Math.max(t.y, Math.min(e.y, this.y))),
+ (this.z = Math.max(t.z, Math.min(e.z, this.z))),
+ (this.w = Math.max(t.w, Math.min(e.w, this.w))),
+ this
+ );
+ }
+ clampScalar(t, e) {
+ return (
+ (this.x = Math.max(t, Math.min(e, this.x))),
+ (this.y = Math.max(t, Math.min(e, this.y))),
+ (this.z = Math.max(t, Math.min(e, this.z))),
+ (this.w = Math.max(t, Math.min(e, this.w))),
+ this
+ );
+ }
+ clampLength(t, e) {
+ const n = this.length();
+ return this.divideScalar(n || 1).multiplyScalar(
+ Math.max(t, Math.min(e, n))
+ );
+ }
+ floor() {
+ 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() {
+ 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() {
+ 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() {
+ 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() {
+ return (
+ (this.x = -this.x),
+ (this.y = -this.y),
+ (this.z = -this.z),
+ (this.w = -this.w),
+ this
+ );
+ }
+ dot(t) {
+ return this.x * t.x + this.y * t.y + this.z * t.z + this.w * t.w;
+ }
+ lengthSq() {
+ return (
+ this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w
+ );
+ }
+ length() {
+ return Math.sqrt(
+ this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w
+ );
+ }
+ manhattanLength() {
+ return (
+ Math.abs(this.x) +
+ Math.abs(this.y) +
+ Math.abs(this.z) +
+ Math.abs(this.w)
+ );
+ }
+ normalize() {
+ return this.divideScalar(this.length() || 1);
+ }
+ setLength(t) {
+ return this.normalize().multiplyScalar(t);
+ }
+ lerp(t, e) {
+ return (
+ (this.x += (t.x - this.x) * e),
+ (this.y += (t.y - this.y) * e),
+ (this.z += (t.z - this.z) * e),
+ (this.w += (t.w - this.w) * e),
+ this
+ );
+ }
+ lerpVectors(t, e, n) {
+ return (
+ (this.x = t.x + (e.x - t.x) * n),
+ (this.y = t.y + (e.y - t.y) * n),
+ (this.z = t.z + (e.z - t.z) * n),
+ (this.w = t.w + (e.w - t.w) * n),
+ this
+ );
+ }
+ equals(t) {
+ return (
+ t.x === this.x && t.y === this.y && t.z === this.z && t.w === this.w
+ );
+ }
+ fromArray(t, e = 0) {
+ return (
+ (this.x = t[e]),
+ (this.y = t[e + 1]),
+ (this.z = t[e + 2]),
+ (this.w = t[e + 3]),
+ this
+ );
+ }
+ toArray(t = [], e = 0) {
+ return (
+ (t[e] = this.x),
+ (t[e + 1] = this.y),
+ (t[e + 2] = this.z),
+ (t[e + 3] = this.w),
+ t
+ );
+ }
+ fromBufferAttribute(t, e) {
+ return (
+ (this.x = t.getX(e)),
+ (this.y = t.getY(e)),
+ (this.z = t.getZ(e)),
+ (this.w = t.getW(e)),
+ this
+ );
+ }
+ random() {
+ return (
+ (this.x = Math.random()),
+ (this.y = Math.random()),
+ (this.z = Math.random()),
+ (this.w = Math.random()),
+ this
+ );
+ }
+ *[Symbol.iterator]() {
+ yield this.x, yield this.y, yield this.z, yield this.w;
+ }
+ }
+ class Ic extends tc {
+ constructor(t = 1, e = 1, n = {}) {
+ super(),
+ (this.isWebGLRenderTarget = !0),
+ (this.width = t),
+ (this.height = e),
+ (this.depth = 1),
+ (this.scissor = new Fc(0, 0, t, e)),
+ (this.scissorTest = !1),
+ (this.viewport = new Fc(0, 0, t, e));
+ const i = { width: t, height: e, depth: 1 };
+ (this.texture = new Oc(
+ i,
+ n.mapping,
+ n.wrapS,
+ n.wrapT,
+ n.magFilter,
+ n.minFilter,
+ n.format,
+ n.type,
+ n.anisotropy,
+ n.encoding
+ )),
+ (this.texture.isRenderTargetTexture = !0),
+ (this.texture.flipY = !1),
+ (this.texture.generateMipmaps =
+ void 0 !== n.generateMipmaps && n.generateMipmaps),
+ (this.texture.internalFormat =
+ void 0 !== n.internalFormat ? n.internalFormat : null),
+ (this.texture.minFilter =
+ void 0 !== n.minFilter ? n.minFilter : 1006),
+ (this.depthBuffer = void 0 === n.depthBuffer || n.depthBuffer),
+ (this.stencilBuffer = void 0 !== n.stencilBuffer && n.stencilBuffer),
+ (this.depthTexture =
+ void 0 !== n.depthTexture ? n.depthTexture : null),
+ (this.samples = void 0 !== n.samples ? n.samples : 0);
+ }
+ setSize(t, e, n = 1) {
+ (this.width === t && this.height === e && this.depth === n) ||
+ ((this.width = t),
+ (this.height = e),
+ (this.depth = n),
+ (this.texture.image.width = t),
+ (this.texture.image.height = e),
+ (this.texture.image.depth = n),
+ this.dispose()),
+ this.viewport.set(0, 0, t, e),
+ this.scissor.set(0, 0, t, e);
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ copy(t) {
+ (this.width = t.width),
+ (this.height = t.height),
+ (this.depth = t.depth),
+ this.viewport.copy(t.viewport),
+ (this.texture = t.texture.clone()),
+ (this.texture.isRenderTargetTexture = !0);
+ const e = Object.assign({}, t.texture.image);
+ return (
+ (this.texture.source = new Pc(e)),
+ (this.depthBuffer = t.depthBuffer),
+ (this.stencilBuffer = t.stencilBuffer),
+ null !== t.depthTexture &&
+ (this.depthTexture = t.depthTexture.clone()),
+ (this.samples = t.samples),
+ this
+ );
+ }
+ dispose() {
+ this.dispatchEvent({ type: "dispose" });
+ }
+ }
+ class Nc extends Oc {
+ constructor(t = null, e = 1, n = 1, i = 1) {
+ super(null),
+ (this.isDataArrayTexture = !0),
+ (this.image = { data: t, width: e, height: n, depth: i }),
+ (this.magFilter = 1003),
+ (this.minFilter = 1003),
+ (this.wrapR = 1001),
+ (this.generateMipmaps = !1),
+ (this.flipY = !1),
+ (this.unpackAlignment = 1);
+ }
+ }
+ class zc extends Oc {
+ constructor(t = null, e = 1, n = 1, i = 1) {
+ super(null),
+ (this.isData3DTexture = !0),
+ (this.image = { data: t, width: e, height: n, depth: i }),
+ (this.magFilter = 1003),
+ (this.minFilter = 1003),
+ (this.wrapR = 1001),
+ (this.generateMipmaps = !1),
+ (this.flipY = !1),
+ (this.unpackAlignment = 1);
+ }
+ }
+ class kc {
+ constructor(t = 0, e = 0, n = 0, i = 1) {
+ (this.isQuaternion = !0),
+ (this._x = t),
+ (this._y = e),
+ (this._z = n),
+ (this._w = i);
+ }
+ static slerpFlat(t, e, n, i, r, o, s) {
+ let a = n[i + 0],
+ l = n[i + 1],
+ u = n[i + 2],
+ c = n[i + 3];
+ const h = r[o + 0],
+ d = r[o + 1],
+ f = r[o + 2],
+ p = r[o + 3];
+ if (0 === s)
+ return (
+ (t[e + 0] = a), (t[e + 1] = l), (t[e + 2] = u), void (t[e + 3] = c)
+ );
+ if (1 === s)
+ return (
+ (t[e + 0] = h), (t[e + 1] = d), (t[e + 2] = f), void (t[e + 3] = p)
+ );
+ if (c !== p || a !== h || l !== d || u !== f) {
+ let t = 1 - s;
+ const e = a * h + l * d + u * f + c * p,
+ n = e >= 0 ? 1 : -1,
+ i = 1 - e * e;
+ if (i > Number.EPSILON) {
+ const r = Math.sqrt(i),
+ o = Math.atan2(r, e * n);
+ (t = Math.sin(t * o) / r), (s = Math.sin(s * o) / r);
+ }
+ const r = s * n;
+ if (
+ ((a = a * t + h * r),
+ (l = l * t + d * r),
+ (u = u * t + f * r),
+ (c = c * t + p * r),
+ t === 1 - s)
+ ) {
+ const t = 1 / Math.sqrt(a * a + l * l + u * u + c * c);
+ (a *= t), (l *= t), (u *= t), (c *= t);
+ }
+ }
+ (t[e] = a), (t[e + 1] = l), (t[e + 2] = u), (t[e + 3] = c);
+ }
+ static multiplyQuaternionsFlat(t, e, n, i, r, o) {
+ const s = n[i],
+ a = n[i + 1],
+ l = n[i + 2],
+ u = n[i + 3],
+ c = r[o],
+ h = r[o + 1],
+ d = r[o + 2],
+ f = r[o + 3];
+ return (
+ (t[e] = s * f + u * c + a * d - l * h),
+ (t[e + 1] = a * f + u * h + l * c - s * d),
+ (t[e + 2] = l * f + u * d + s * h - a * c),
+ (t[e + 3] = u * f - s * c - a * h - l * d),
+ t
+ );
+ }
+ get x() {
+ return this._x;
+ }
+ set x(t) {
+ (this._x = t), this._onChangeCallback();
+ }
+ get y() {
+ return this._y;
+ }
+ set y(t) {
+ (this._y = t), this._onChangeCallback();
+ }
+ get z() {
+ return this._z;
+ }
+ set z(t) {
+ (this._z = t), this._onChangeCallback();
+ }
+ get w() {
+ return this._w;
+ }
+ set w(t) {
+ (this._w = t), this._onChangeCallback();
+ }
+ set(t, e, n, i) {
+ return (
+ (this._x = t),
+ (this._y = e),
+ (this._z = n),
+ (this._w = i),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ clone() {
+ return new this.constructor(this._x, this._y, this._z, this._w);
+ }
+ copy(t) {
+ return (
+ (this._x = t.x),
+ (this._y = t.y),
+ (this._z = t.z),
+ (this._w = t.w),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ setFromEuler(t, e) {
+ const n = t._x,
+ i = t._y,
+ r = t._z,
+ o = t._order,
+ s = Math.cos,
+ a = Math.sin,
+ l = s(n / 2),
+ u = s(i / 2),
+ c = s(r / 2),
+ h = a(n / 2),
+ d = a(i / 2),
+ f = a(r / 2);
+ switch (o) {
+ case "XYZ":
+ (this._x = h * u * c + l * d * f),
+ (this._y = l * d * c - h * u * f),
+ (this._z = l * u * f + h * d * c),
+ (this._w = l * u * c - h * d * f);
+ break;
+ case "YXZ":
+ (this._x = h * u * c + l * d * f),
+ (this._y = l * d * c - h * u * f),
+ (this._z = l * u * f - h * d * c),
+ (this._w = l * u * c + h * d * f);
+ break;
+ case "ZXY":
+ (this._x = h * u * c - l * d * f),
+ (this._y = l * d * c + h * u * f),
+ (this._z = l * u * f + h * d * c),
+ (this._w = l * u * c - h * d * f);
+ break;
+ case "ZYX":
+ (this._x = h * u * c - l * d * f),
+ (this._y = l * d * c + h * u * f),
+ (this._z = l * u * f - h * d * c),
+ (this._w = l * u * c + h * d * f);
+ break;
+ case "YZX":
+ (this._x = h * u * c + l * d * f),
+ (this._y = l * d * c + h * u * f),
+ (this._z = l * u * f - h * d * c),
+ (this._w = l * u * c - h * d * f);
+ break;
+ case "XZY":
+ (this._x = h * u * c - l * d * f),
+ (this._y = l * d * c - h * u * f),
+ (this._z = l * u * f + h * d * c),
+ (this._w = l * u * c + h * d * f);
+ break;
+ default:
+ console.warn(
+ "THREE.Quaternion: .setFromEuler() encountered an unknown order: " +
+ o
+ );
+ }
+ return !1 !== e && this._onChangeCallback(), this;
+ }
+ setFromAxisAngle(t, e) {
+ const n = e / 2,
+ i = Math.sin(n);
+ return (
+ (this._x = t.x * i),
+ (this._y = t.y * i),
+ (this._z = t.z * i),
+ (this._w = Math.cos(n)),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ setFromRotationMatrix(t) {
+ const e = t.elements,
+ n = e[0],
+ i = e[4],
+ r = e[8],
+ o = e[1],
+ s = e[5],
+ a = e[9],
+ l = e[2],
+ u = e[6],
+ c = e[10],
+ h = n + s + c;
+ if (h > 0) {
+ const t = 0.5 / Math.sqrt(h + 1);
+ (this._w = 0.25 / t),
+ (this._x = (u - a) * t),
+ (this._y = (r - l) * t),
+ (this._z = (o - i) * t);
+ } else if (n > s && n > c) {
+ const t = 2 * Math.sqrt(1 + n - s - c);
+ (this._w = (u - a) / t),
+ (this._x = 0.25 * t),
+ (this._y = (i + o) / t),
+ (this._z = (r + l) / t);
+ } else if (s > c) {
+ const t = 2 * Math.sqrt(1 + s - n - c);
+ (this._w = (r - l) / t),
+ (this._x = (i + o) / t),
+ (this._y = 0.25 * t),
+ (this._z = (a + u) / t);
+ } else {
+ const t = 2 * Math.sqrt(1 + c - n - s);
+ (this._w = (o - i) / t),
+ (this._x = (r + l) / t),
+ (this._y = (a + u) / t),
+ (this._z = 0.25 * t);
+ }
+ return this._onChangeCallback(), this;
+ }
+ setFromUnitVectors(t, e) {
+ let n = t.dot(e) + 1;
+ return (
+ n < Number.EPSILON
+ ? ((n = 0),
+ Math.abs(t.x) > Math.abs(t.z)
+ ? ((this._x = -t.y),
+ (this._y = t.x),
+ (this._z = 0),
+ (this._w = n))
+ : ((this._x = 0),
+ (this._y = -t.z),
+ (this._z = t.y),
+ (this._w = n)))
+ : ((this._x = t.y * e.z - t.z * e.y),
+ (this._y = t.z * e.x - t.x * e.z),
+ (this._z = t.x * e.y - t.y * e.x),
+ (this._w = n)),
+ this.normalize()
+ );
+ }
+ angleTo(t) {
+ return 2 * Math.acos(Math.abs(oc(this.dot(t), -1, 1)));
+ }
+ rotateTowards(t, e) {
+ const n = this.angleTo(t);
+ if (0 === n) return this;
+ const i = Math.min(1, e / n);
+ return this.slerp(t, i), this;
+ }
+ identity() {
+ return this.set(0, 0, 0, 1);
+ }
+ invert() {
+ return this.conjugate();
+ }
+ conjugate() {
+ return (
+ (this._x *= -1),
+ (this._y *= -1),
+ (this._z *= -1),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ dot(t) {
+ return (
+ this._x * t._x + this._y * t._y + this._z * t._z + this._w * t._w
+ );
+ }
+ lengthSq() {
+ return (
+ this._x * this._x +
+ this._y * this._y +
+ this._z * this._z +
+ this._w * this._w
+ );
+ }
+ length() {
+ return Math.sqrt(
+ this._x * this._x +
+ this._y * this._y +
+ this._z * this._z +
+ this._w * this._w
+ );
+ }
+ normalize() {
+ let t = this.length();
+ return (
+ 0 === t
+ ? ((this._x = 0), (this._y = 0), (this._z = 0), (this._w = 1))
+ : ((t = 1 / t),
+ (this._x = this._x * t),
+ (this._y = this._y * t),
+ (this._z = this._z * t),
+ (this._w = this._w * t)),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ multiply(t) {
+ return this.multiplyQuaternions(this, t);
+ }
+ premultiply(t) {
+ return this.multiplyQuaternions(t, this);
+ }
+ multiplyQuaternions(t, e) {
+ const n = t._x,
+ i = t._y,
+ r = t._z,
+ o = t._w,
+ s = e._x,
+ a = e._y,
+ l = e._z,
+ u = e._w;
+ return (
+ (this._x = n * u + o * s + i * l - r * a),
+ (this._y = i * u + o * a + r * s - n * l),
+ (this._z = r * u + o * l + n * a - i * s),
+ (this._w = o * u - n * s - i * a - r * l),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ slerp(t, e) {
+ if (0 === e) return this;
+ if (1 === e) return this.copy(t);
+ const n = this._x,
+ i = this._y,
+ r = this._z,
+ o = this._w;
+ let s = o * t._w + n * t._x + i * t._y + r * t._z;
+ if (
+ (s < 0
+ ? ((this._w = -t._w),
+ (this._x = -t._x),
+ (this._y = -t._y),
+ (this._z = -t._z),
+ (s = -s))
+ : this.copy(t),
+ s >= 1)
+ )
+ return (
+ (this._w = o), (this._x = n), (this._y = i), (this._z = r), this
+ );
+ const a = 1 - s * s;
+ if (a <= Number.EPSILON) {
+ const t = 1 - e;
+ return (
+ (this._w = t * o + e * this._w),
+ (this._x = t * n + e * this._x),
+ (this._y = t * i + e * this._y),
+ (this._z = t * r + e * this._z),
+ this.normalize(),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ const l = Math.sqrt(a),
+ u = Math.atan2(l, s),
+ c = Math.sin((1 - e) * u) / l,
+ h = Math.sin(e * u) / l;
+ return (
+ (this._w = o * c + this._w * h),
+ (this._x = n * c + this._x * h),
+ (this._y = i * c + this._y * h),
+ (this._z = r * c + this._z * h),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ slerpQuaternions(t, e, n) {
+ return this.copy(t).slerp(e, n);
+ }
+ random() {
+ const t = Math.random(),
+ e = Math.sqrt(1 - t),
+ n = Math.sqrt(t),
+ i = 2 * Math.PI * Math.random(),
+ r = 2 * Math.PI * Math.random();
+ return this.set(
+ e * Math.cos(i),
+ n * Math.sin(r),
+ n * Math.cos(r),
+ e * Math.sin(i)
+ );
+ }
+ equals(t) {
+ return (
+ t._x === this._x &&
+ t._y === this._y &&
+ t._z === this._z &&
+ t._w === this._w
+ );
+ }
+ fromArray(t, e = 0) {
+ return (
+ (this._x = t[e]),
+ (this._y = t[e + 1]),
+ (this._z = t[e + 2]),
+ (this._w = t[e + 3]),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ toArray(t = [], e = 0) {
+ return (
+ (t[e] = this._x),
+ (t[e + 1] = this._y),
+ (t[e + 2] = this._z),
+ (t[e + 3] = this._w),
+ t
+ );
+ }
+ fromBufferAttribute(t, e) {
+ return (
+ (this._x = t.getX(e)),
+ (this._y = t.getY(e)),
+ (this._z = t.getZ(e)),
+ (this._w = t.getW(e)),
+ this
+ );
+ }
+ _onChange(t) {
+ return (this._onChangeCallback = t), this;
+ }
+ _onChangeCallback() {}
+ *[Symbol.iterator]() {
+ yield this._x, yield this._y, yield this._z, yield this._w;
+ }
+ }
+ class Uc {
+ constructor(t = 0, e = 0, n = 0) {
+ (Uc.prototype.isVector3 = !0), (this.x = t), (this.y = e), (this.z = n);
+ }
+ set(t, e, n) {
+ return (
+ void 0 === n && (n = this.z),
+ (this.x = t),
+ (this.y = e),
+ (this.z = n),
+ this
+ );
+ }
+ setScalar(t) {
+ return (this.x = t), (this.y = t), (this.z = t), this;
+ }
+ setX(t) {
+ return (this.x = t), this;
+ }
+ setY(t) {
+ return (this.y = t), this;
+ }
+ setZ(t) {
+ return (this.z = t), this;
+ }
+ setComponent(t, e) {
+ switch (t) {
+ case 0:
+ this.x = e;
+ break;
+ case 1:
+ this.y = e;
+ break;
+ case 2:
+ this.z = e;
+ break;
+ default:
+ throw new Error("index is out of range: " + t);
+ }
+ return this;
+ }
+ getComponent(t) {
+ switch (t) {
+ case 0:
+ return this.x;
+ case 1:
+ return this.y;
+ case 2:
+ return this.z;
+ default:
+ throw new Error("index is out of range: " + t);
+ }
+ }
+ clone() {
+ return new this.constructor(this.x, this.y, this.z);
+ }
+ copy(t) {
+ return (this.x = t.x), (this.y = t.y), (this.z = t.z), this;
+ }
+ add(t) {
+ return (this.x += t.x), (this.y += t.y), (this.z += t.z), this;
+ }
+ addScalar(t) {
+ return (this.x += t), (this.y += t), (this.z += t), this;
+ }
+ addVectors(t, e) {
+ return (
+ (this.x = t.x + e.x), (this.y = t.y + e.y), (this.z = t.z + e.z), this
+ );
+ }
+ addScaledVector(t, e) {
+ return (
+ (this.x += t.x * e), (this.y += t.y * e), (this.z += t.z * e), this
+ );
+ }
+ sub(t) {
+ return (this.x -= t.x), (this.y -= t.y), (this.z -= t.z), this;
+ }
+ subScalar(t) {
+ return (this.x -= t), (this.y -= t), (this.z -= t), this;
+ }
+ subVectors(t, e) {
+ return (
+ (this.x = t.x - e.x), (this.y = t.y - e.y), (this.z = t.z - e.z), this
+ );
+ }
+ multiply(t) {
+ return (this.x *= t.x), (this.y *= t.y), (this.z *= t.z), this;
+ }
+ multiplyScalar(t) {
+ return (this.x *= t), (this.y *= t), (this.z *= t), this;
+ }
+ multiplyVectors(t, e) {
+ return (
+ (this.x = t.x * e.x), (this.y = t.y * e.y), (this.z = t.z * e.z), this
+ );
+ }
+ applyEuler(t) {
+ return this.applyQuaternion(Vc.setFromEuler(t));
+ }
+ applyAxisAngle(t, e) {
+ return this.applyQuaternion(Vc.setFromAxisAngle(t, e));
+ }
+ applyMatrix3(t) {
+ const e = this.x,
+ n = this.y,
+ i = this.z,
+ r = t.elements;
+ return (
+ (this.x = r[0] * e + r[3] * n + r[6] * i),
+ (this.y = r[1] * e + r[4] * n + r[7] * i),
+ (this.z = r[2] * e + r[5] * n + r[8] * i),
+ this
+ );
+ }
+ applyNormalMatrix(t) {
+ return this.applyMatrix3(t).normalize();
+ }
+ applyMatrix4(t) {
+ const e = this.x,
+ n = this.y,
+ i = this.z,
+ r = t.elements,
+ o = 1 / (r[3] * e + r[7] * n + r[11] * i + r[15]);
+ return (
+ (this.x = (r[0] * e + r[4] * n + r[8] * i + r[12]) * o),
+ (this.y = (r[1] * e + r[5] * n + r[9] * i + r[13]) * o),
+ (this.z = (r[2] * e + r[6] * n + r[10] * i + r[14]) * o),
+ this
+ );
+ }
+ applyQuaternion(t) {
+ const e = this.x,
+ n = this.y,
+ i = this.z,
+ r = t.x,
+ o = t.y,
+ s = t.z,
+ a = t.w,
+ l = a * e + o * i - s * n,
+ u = a * n + s * e - r * i,
+ c = a * i + r * n - o * e,
+ h = -r * e - o * n - s * i;
+ return (
+ (this.x = l * a + h * -r + u * -s - c * -o),
+ (this.y = u * a + h * -o + c * -r - l * -s),
+ (this.z = c * a + h * -s + l * -o - u * -r),
+ this
+ );
+ }
+ project(t) {
+ return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(
+ t.projectionMatrix
+ );
+ }
+ unproject(t) {
+ return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(
+ t.matrixWorld
+ );
+ }
+ transformDirection(t) {
+ const e = this.x,
+ n = this.y,
+ i = this.z,
+ r = t.elements;
+ return (
+ (this.x = r[0] * e + r[4] * n + r[8] * i),
+ (this.y = r[1] * e + r[5] * n + r[9] * i),
+ (this.z = r[2] * e + r[6] * n + r[10] * i),
+ this.normalize()
+ );
+ }
+ divide(t) {
+ return (this.x /= t.x), (this.y /= t.y), (this.z /= t.z), this;
+ }
+ divideScalar(t) {
+ return this.multiplyScalar(1 / t);
+ }
+ min(t) {
+ return (
+ (this.x = Math.min(this.x, t.x)),
+ (this.y = Math.min(this.y, t.y)),
+ (this.z = Math.min(this.z, t.z)),
+ this
+ );
+ }
+ max(t) {
+ return (
+ (this.x = Math.max(this.x, t.x)),
+ (this.y = Math.max(this.y, t.y)),
+ (this.z = Math.max(this.z, t.z)),
+ this
+ );
+ }
+ clamp(t, e) {
+ return (
+ (this.x = Math.max(t.x, Math.min(e.x, this.x))),
+ (this.y = Math.max(t.y, Math.min(e.y, this.y))),
+ (this.z = Math.max(t.z, Math.min(e.z, this.z))),
+ this
+ );
+ }
+ clampScalar(t, e) {
+ return (
+ (this.x = Math.max(t, Math.min(e, this.x))),
+ (this.y = Math.max(t, Math.min(e, this.y))),
+ (this.z = Math.max(t, Math.min(e, this.z))),
+ this
+ );
+ }
+ clampLength(t, e) {
+ const n = this.length();
+ return this.divideScalar(n || 1).multiplyScalar(
+ Math.max(t, Math.min(e, n))
+ );
+ }
+ floor() {
+ return (
+ (this.x = Math.floor(this.x)),
+ (this.y = Math.floor(this.y)),
+ (this.z = Math.floor(this.z)),
+ this
+ );
+ }
+ ceil() {
+ return (
+ (this.x = Math.ceil(this.x)),
+ (this.y = Math.ceil(this.y)),
+ (this.z = Math.ceil(this.z)),
+ this
+ );
+ }
+ round() {
+ return (
+ (this.x = Math.round(this.x)),
+ (this.y = Math.round(this.y)),
+ (this.z = Math.round(this.z)),
+ this
+ );
+ }
+ roundToZero() {
+ 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() {
+ return (this.x = -this.x), (this.y = -this.y), (this.z = -this.z), this;
+ }
+ dot(t) {
+ return this.x * t.x + this.y * t.y + this.z * t.z;
+ }
+ lengthSq() {
+ return this.x * this.x + this.y * this.y + this.z * this.z;
+ }
+ length() {
+ return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
+ }
+ manhattanLength() {
+ return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);
+ }
+ normalize() {
+ return this.divideScalar(this.length() || 1);
+ }
+ setLength(t) {
+ return this.normalize().multiplyScalar(t);
+ }
+ lerp(t, e) {
+ return (
+ (this.x += (t.x - this.x) * e),
+ (this.y += (t.y - this.y) * e),
+ (this.z += (t.z - this.z) * e),
+ this
+ );
+ }
+ lerpVectors(t, e, n) {
+ return (
+ (this.x = t.x + (e.x - t.x) * n),
+ (this.y = t.y + (e.y - t.y) * n),
+ (this.z = t.z + (e.z - t.z) * n),
+ this
+ );
+ }
+ cross(t) {
+ return this.crossVectors(this, t);
+ }
+ crossVectors(t, e) {
+ const n = t.x,
+ i = t.y,
+ r = t.z,
+ o = e.x,
+ s = e.y,
+ a = e.z;
+ return (
+ (this.x = i * a - r * s),
+ (this.y = r * o - n * a),
+ (this.z = n * s - i * o),
+ this
+ );
+ }
+ projectOnVector(t) {
+ const e = t.lengthSq();
+ if (0 === e) return this.set(0, 0, 0);
+ const n = t.dot(this) / e;
+ return this.copy(t).multiplyScalar(n);
+ }
+ projectOnPlane(t) {
+ return Bc.copy(this).projectOnVector(t), this.sub(Bc);
+ }
+ reflect(t) {
+ return this.sub(Bc.copy(t).multiplyScalar(2 * this.dot(t)));
+ }
+ angleTo(t) {
+ const e = Math.sqrt(this.lengthSq() * t.lengthSq());
+ if (0 === e) return Math.PI / 2;
+ const n = this.dot(t) / e;
+ return Math.acos(oc(n, -1, 1));
+ }
+ distanceTo(t) {
+ return Math.sqrt(this.distanceToSquared(t));
+ }
+ distanceToSquared(t) {
+ const e = this.x - t.x,
+ n = this.y - t.y,
+ i = this.z - t.z;
+ return e * e + n * n + i * i;
+ }
+ manhattanDistanceTo(t) {
+ return (
+ Math.abs(this.x - t.x) +
+ Math.abs(this.y - t.y) +
+ Math.abs(this.z - t.z)
+ );
+ }
+ setFromSpherical(t) {
+ return this.setFromSphericalCoords(t.radius, t.phi, t.theta);
+ }
+ setFromSphericalCoords(t, e, n) {
+ const i = Math.sin(e) * t;
+ return (
+ (this.x = i * Math.sin(n)),
+ (this.y = Math.cos(e) * t),
+ (this.z = i * Math.cos(n)),
+ this
+ );
+ }
+ setFromCylindrical(t) {
+ return this.setFromCylindricalCoords(t.radius, t.theta, t.y);
+ }
+ setFromCylindricalCoords(t, e, n) {
+ return (
+ (this.x = t * Math.sin(e)),
+ (this.y = n),
+ (this.z = t * Math.cos(e)),
+ this
+ );
+ }
+ setFromMatrixPosition(t) {
+ const e = t.elements;
+ return (this.x = e[12]), (this.y = e[13]), (this.z = e[14]), this;
+ }
+ setFromMatrixScale(t) {
+ const e = this.setFromMatrixColumn(t, 0).length(),
+ n = this.setFromMatrixColumn(t, 1).length(),
+ i = this.setFromMatrixColumn(t, 2).length();
+ return (this.x = e), (this.y = n), (this.z = i), this;
+ }
+ setFromMatrixColumn(t, e) {
+ return this.fromArray(t.elements, 4 * e);
+ }
+ setFromMatrix3Column(t, e) {
+ return this.fromArray(t.elements, 3 * e);
+ }
+ setFromEuler(t) {
+ return (this.x = t._x), (this.y = t._y), (this.z = t._z), this;
+ }
+ equals(t) {
+ return t.x === this.x && t.y === this.y && t.z === this.z;
+ }
+ fromArray(t, e = 0) {
+ return (this.x = t[e]), (this.y = t[e + 1]), (this.z = t[e + 2]), this;
+ }
+ toArray(t = [], e = 0) {
+ return (t[e] = this.x), (t[e + 1] = this.y), (t[e + 2] = this.z), t;
+ }
+ fromBufferAttribute(t, e) {
+ return (
+ (this.x = t.getX(e)), (this.y = t.getY(e)), (this.z = t.getZ(e)), this
+ );
+ }
+ random() {
+ return (
+ (this.x = Math.random()),
+ (this.y = Math.random()),
+ (this.z = Math.random()),
+ this
+ );
+ }
+ randomDirection() {
+ const t = 2 * (Math.random() - 0.5),
+ e = Math.random() * Math.PI * 2,
+ n = Math.sqrt(1 - t ** 2);
+ return (
+ (this.x = n * Math.cos(e)),
+ (this.y = n * Math.sin(e)),
+ (this.z = t),
+ this
+ );
+ }
+ *[Symbol.iterator]() {
+ yield this.x, yield this.y, yield this.z;
+ }
+ }
+ const Bc = new Uc(),
+ Vc = new kc();
+ class Hc {
+ constructor(
+ t = new Uc(1 / 0, 1 / 0, 1 / 0),
+ e = new Uc(-1 / 0, -1 / 0, -1 / 0)
+ ) {
+ (this.isBox3 = !0), (this.min = t), (this.max = e);
+ }
+ set(t, e) {
+ return this.min.copy(t), this.max.copy(e), this;
+ }
+ setFromArray(t) {
+ let e = 1 / 0,
+ n = 1 / 0,
+ i = 1 / 0,
+ r = -1 / 0,
+ o = -1 / 0,
+ s = -1 / 0;
+ for (let a = 0, l = t.length; a < l; a += 3) {
+ const l = t[a],
+ u = t[a + 1],
+ c = t[a + 2];
+ l < e && (e = l),
+ u < n && (n = u),
+ c < i && (i = c),
+ l > r && (r = l),
+ u > o && (o = u),
+ c > s && (s = c);
+ }
+ return this.min.set(e, n, i), this.max.set(r, o, s), this;
+ }
+ setFromBufferAttribute(t) {
+ let e = 1 / 0,
+ n = 1 / 0,
+ i = 1 / 0,
+ r = -1 / 0,
+ o = -1 / 0,
+ s = -1 / 0;
+ for (let a = 0, l = t.count; a < l; a++) {
+ const l = t.getX(a),
+ u = t.getY(a),
+ c = t.getZ(a);
+ l < e && (e = l),
+ u < n && (n = u),
+ c < i && (i = c),
+ l > r && (r = l),
+ u > o && (o = u),
+ c > s && (s = c);
+ }
+ return this.min.set(e, n, i), this.max.set(r, o, s), this;
+ }
+ setFromPoints(t) {
+ this.makeEmpty();
+ for (let e = 0, n = t.length; e < n; e++) this.expandByPoint(t[e]);
+ return this;
+ }
+ setFromCenterAndSize(t, e) {
+ const n = Gc.copy(e).multiplyScalar(0.5);
+ return this.min.copy(t).sub(n), this.max.copy(t).add(n), this;
+ }
+ setFromObject(t, e = !1) {
+ return this.makeEmpty(), this.expandByObject(t, e);
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ copy(t) {
+ return this.min.copy(t.min), this.max.copy(t.max), this;
+ }
+ makeEmpty() {
+ 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() {
+ return (
+ this.max.x < this.min.x ||
+ this.max.y < this.min.y ||
+ this.max.z < this.min.z
+ );
+ }
+ getCenter(t) {
+ return this.isEmpty()
+ ? t.set(0, 0, 0)
+ : t.addVectors(this.min, this.max).multiplyScalar(0.5);
+ }
+ getSize(t) {
+ return this.isEmpty()
+ ? t.set(0, 0, 0)
+ : t.subVectors(this.max, this.min);
+ }
+ expandByPoint(t) {
+ return this.min.min(t), this.max.max(t), this;
+ }
+ expandByVector(t) {
+ return this.min.sub(t), this.max.add(t), this;
+ }
+ expandByScalar(t) {
+ return this.min.addScalar(-t), this.max.addScalar(t), this;
+ }
+ expandByObject(t, e = !1) {
+ t.updateWorldMatrix(!1, !1);
+ const n = t.geometry;
+ if (void 0 !== n)
+ if (e && null != n.attributes && void 0 !== n.attributes.position) {
+ const e = n.attributes.position;
+ for (let n = 0, i = e.count; n < i; n++)
+ Gc.fromBufferAttribute(e, n).applyMatrix4(t.matrixWorld),
+ this.expandByPoint(Gc);
+ } else
+ null === n.boundingBox && n.computeBoundingBox(),
+ jc.copy(n.boundingBox),
+ jc.applyMatrix4(t.matrixWorld),
+ this.union(jc);
+ const i = t.children;
+ for (let t = 0, n = i.length; t < n; t++) this.expandByObject(i[t], e);
+ return this;
+ }
+ containsPoint(t) {
+ return !(
+ t.x < this.min.x ||
+ t.x > this.max.x ||
+ t.y < this.min.y ||
+ t.y > this.max.y ||
+ t.z < this.min.z ||
+ t.z > this.max.z
+ );
+ }
+ containsBox(t) {
+ return (
+ this.min.x <= t.min.x &&
+ t.max.x <= this.max.x &&
+ this.min.y <= t.min.y &&
+ t.max.y <= this.max.y &&
+ this.min.z <= t.min.z &&
+ t.max.z <= this.max.z
+ );
+ }
+ getParameter(t, e) {
+ return e.set(
+ (t.x - this.min.x) / (this.max.x - this.min.x),
+ (t.y - this.min.y) / (this.max.y - this.min.y),
+ (t.z - this.min.z) / (this.max.z - this.min.z)
+ );
+ }
+ intersectsBox(t) {
+ return !(
+ t.max.x < this.min.x ||
+ t.min.x > this.max.x ||
+ t.max.y < this.min.y ||
+ t.min.y > this.max.y ||
+ t.max.z < this.min.z ||
+ t.min.z > this.max.z
+ );
+ }
+ intersectsSphere(t) {
+ return (
+ this.clampPoint(t.center, Gc),
+ Gc.distanceToSquared(t.center) <= t.radius * t.radius
+ );
+ }
+ intersectsPlane(t) {
+ let e, n;
+ return (
+ t.normal.x > 0
+ ? ((e = t.normal.x * this.min.x), (n = t.normal.x * this.max.x))
+ : ((e = t.normal.x * this.max.x), (n = t.normal.x * this.min.x)),
+ t.normal.y > 0
+ ? ((e += t.normal.y * this.min.y), (n += t.normal.y * this.max.y))
+ : ((e += t.normal.y * this.max.y), (n += t.normal.y * this.min.y)),
+ t.normal.z > 0
+ ? ((e += t.normal.z * this.min.z), (n += t.normal.z * this.max.z))
+ : ((e += t.normal.z * this.max.z), (n += t.normal.z * this.min.z)),
+ e <= -t.constant && n >= -t.constant
+ );
+ }
+ intersectsTriangle(t) {
+ if (this.isEmpty()) return !1;
+ this.getCenter(Qc),
+ $c.subVectors(this.max, Qc),
+ qc.subVectors(t.a, Qc),
+ Xc.subVectors(t.b, Qc),
+ Yc.subVectors(t.c, Qc),
+ Zc.subVectors(Xc, qc),
+ Kc.subVectors(Yc, Xc),
+ Jc.subVectors(qc, Yc);
+ let e = [
+ 0,
+ -Zc.z,
+ Zc.y,
+ 0,
+ -Kc.z,
+ Kc.y,
+ 0,
+ -Jc.z,
+ Jc.y,
+ Zc.z,
+ 0,
+ -Zc.x,
+ Kc.z,
+ 0,
+ -Kc.x,
+ Jc.z,
+ 0,
+ -Jc.x,
+ -Zc.y,
+ Zc.x,
+ 0,
+ -Kc.y,
+ Kc.x,
+ 0,
+ -Jc.y,
+ Jc.x,
+ 0,
+ ];
+ return (
+ !!nh(e, qc, Xc, Yc, $c) &&
+ ((e = [1, 0, 0, 0, 1, 0, 0, 0, 1]),
+ !!nh(e, qc, Xc, Yc, $c) &&
+ (th.crossVectors(Zc, Kc),
+ (e = [th.x, th.y, th.z]),
+ nh(e, qc, Xc, Yc, $c)))
+ );
+ }
+ clampPoint(t, e) {
+ return e.copy(t).clamp(this.min, this.max);
+ }
+ distanceToPoint(t) {
+ return Gc.copy(t).clamp(this.min, this.max).sub(t).length();
+ }
+ getBoundingSphere(t) {
+ return (
+ this.getCenter(t.center),
+ (t.radius = 0.5 * this.getSize(Gc).length()),
+ t
+ );
+ }
+ intersect(t) {
+ return (
+ this.min.max(t.min),
+ this.max.min(t.max),
+ this.isEmpty() && this.makeEmpty(),
+ this
+ );
+ }
+ union(t) {
+ return this.min.min(t.min), this.max.max(t.max), this;
+ }
+ applyMatrix4(t) {
+ return (
+ this.isEmpty() ||
+ (Wc[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(t),
+ Wc[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(t),
+ Wc[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(t),
+ Wc[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(t),
+ Wc[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(t),
+ Wc[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(t),
+ Wc[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(t),
+ Wc[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(t),
+ this.setFromPoints(Wc)),
+ this
+ );
+ }
+ translate(t) {
+ return this.min.add(t), this.max.add(t), this;
+ }
+ equals(t) {
+ return t.min.equals(this.min) && t.max.equals(this.max);
+ }
+ }
+ const Wc = [
+ new Uc(),
+ new Uc(),
+ new Uc(),
+ new Uc(),
+ new Uc(),
+ new Uc(),
+ new Uc(),
+ new Uc(),
+ ],
+ Gc = new Uc(),
+ jc = new Hc(),
+ qc = new Uc(),
+ Xc = new Uc(),
+ Yc = new Uc(),
+ Zc = new Uc(),
+ Kc = new Uc(),
+ Jc = new Uc(),
+ Qc = new Uc(),
+ $c = new Uc(),
+ th = new Uc(),
+ eh = new Uc();
+ function nh(t, e, n, i, r) {
+ for (let o = 0, s = t.length - 3; o <= s; o += 3) {
+ eh.fromArray(t, o);
+ const s =
+ r.x * Math.abs(eh.x) + r.y * Math.abs(eh.y) + r.z * Math.abs(eh.z),
+ a = e.dot(eh),
+ l = n.dot(eh),
+ u = i.dot(eh);
+ if (Math.max(-Math.max(a, l, u), Math.min(a, l, u)) > s) return !1;
+ }
+ return !0;
+ }
+ const ih = new Hc(),
+ rh = new Uc(),
+ oh = new Uc();
+ class sh {
+ constructor(t = new Uc(), e = -1) {
+ (this.center = t), (this.radius = e);
+ }
+ set(t, e) {
+ return this.center.copy(t), (this.radius = e), this;
+ }
+ setFromPoints(t, e) {
+ const n = this.center;
+ void 0 !== e ? n.copy(e) : ih.setFromPoints(t).getCenter(n);
+ let i = 0;
+ for (let e = 0, r = t.length; e < r; e++)
+ i = Math.max(i, n.distanceToSquared(t[e]));
+ return (this.radius = Math.sqrt(i)), this;
+ }
+ copy(t) {
+ return this.center.copy(t.center), (this.radius = t.radius), this;
+ }
+ isEmpty() {
+ return this.radius < 0;
+ }
+ makeEmpty() {
+ return this.center.set(0, 0, 0), (this.radius = -1), this;
+ }
+ containsPoint(t) {
+ return t.distanceToSquared(this.center) <= this.radius * this.radius;
+ }
+ distanceToPoint(t) {
+ return t.distanceTo(this.center) - this.radius;
+ }
+ intersectsSphere(t) {
+ const e = this.radius + t.radius;
+ return t.center.distanceToSquared(this.center) <= e * e;
+ }
+ intersectsBox(t) {
+ return t.intersectsSphere(this);
+ }
+ intersectsPlane(t) {
+ return Math.abs(t.distanceToPoint(this.center)) <= this.radius;
+ }
+ clampPoint(t, e) {
+ const n = this.center.distanceToSquared(t);
+ return (
+ e.copy(t),
+ n > this.radius * this.radius &&
+ (e.sub(this.center).normalize(),
+ e.multiplyScalar(this.radius).add(this.center)),
+ e
+ );
+ }
+ getBoundingBox(t) {
+ return this.isEmpty()
+ ? (t.makeEmpty(), t)
+ : (t.set(this.center, this.center), t.expandByScalar(this.radius), t);
+ }
+ applyMatrix4(t) {
+ return (
+ this.center.applyMatrix4(t),
+ (this.radius = this.radius * t.getMaxScaleOnAxis()),
+ this
+ );
+ }
+ translate(t) {
+ return this.center.add(t), this;
+ }
+ expandByPoint(t) {
+ if (this.isEmpty()) return this.center.copy(t), (this.radius = 0), this;
+ rh.subVectors(t, this.center);
+ const e = rh.lengthSq();
+ if (e > this.radius * this.radius) {
+ const t = Math.sqrt(e),
+ n = 0.5 * (t - this.radius);
+ this.center.addScaledVector(rh, n / t), (this.radius += n);
+ }
+ return this;
+ }
+ union(t) {
+ return t.isEmpty()
+ ? this
+ : this.isEmpty()
+ ? (this.copy(t), this)
+ : (!0 === this.center.equals(t.center)
+ ? (this.radius = Math.max(this.radius, t.radius))
+ : (oh.subVectors(t.center, this.center).setLength(t.radius),
+ this.expandByPoint(rh.copy(t.center).add(oh)),
+ this.expandByPoint(rh.copy(t.center).sub(oh))),
+ this);
+ }
+ equals(t) {
+ return t.center.equals(this.center) && t.radius === this.radius;
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ }
+ const ah = new Uc(),
+ lh = new Uc(),
+ uh = new Uc(),
+ ch = new Uc(),
+ hh = new Uc(),
+ dh = new Uc(),
+ fh = new Uc();
+ class ph {
+ constructor(t = new Uc(), e = new Uc(0, 0, -1)) {
+ (this.origin = t), (this.direction = e);
+ }
+ set(t, e) {
+ return this.origin.copy(t), this.direction.copy(e), this;
+ }
+ copy(t) {
+ return (
+ this.origin.copy(t.origin), this.direction.copy(t.direction), this
+ );
+ }
+ at(t, e) {
+ return e.copy(this.direction).multiplyScalar(t).add(this.origin);
+ }
+ lookAt(t) {
+ return this.direction.copy(t).sub(this.origin).normalize(), this;
+ }
+ recast(t) {
+ return this.origin.copy(this.at(t, ah)), this;
+ }
+ closestPointToPoint(t, e) {
+ e.subVectors(t, this.origin);
+ const n = e.dot(this.direction);
+ return n < 0
+ ? e.copy(this.origin)
+ : e.copy(this.direction).multiplyScalar(n).add(this.origin);
+ }
+ distanceToPoint(t) {
+ return Math.sqrt(this.distanceSqToPoint(t));
+ }
+ distanceSqToPoint(t) {
+ const e = ah.subVectors(t, this.origin).dot(this.direction);
+ return e < 0
+ ? this.origin.distanceToSquared(t)
+ : (ah.copy(this.direction).multiplyScalar(e).add(this.origin),
+ ah.distanceToSquared(t));
+ }
+ distanceSqToSegment(t, e, n, i) {
+ lh.copy(t).add(e).multiplyScalar(0.5),
+ uh.copy(e).sub(t).normalize(),
+ ch.copy(this.origin).sub(lh);
+ const r = 0.5 * t.distanceTo(e),
+ o = -this.direction.dot(uh),
+ s = ch.dot(this.direction),
+ a = -ch.dot(uh),
+ l = ch.lengthSq(),
+ u = Math.abs(1 - o * o);
+ let c, h, d, f;
+ if (u > 0)
+ if (((c = o * a - s), (h = o * s - a), (f = r * u), c >= 0))
+ if (h >= -f)
+ if (h <= f) {
+ const t = 1 / u;
+ (c *= t),
+ (h *= t),
+ (d = c * (c + o * h + 2 * s) + h * (o * c + h + 2 * a) + l);
+ } else
+ (h = r),
+ (c = Math.max(0, -(o * h + s))),
+ (d = -c * c + h * (h + 2 * a) + l);
+ else
+ (h = -r),
+ (c = Math.max(0, -(o * h + s))),
+ (d = -c * c + h * (h + 2 * a) + l);
+ else
+ h <= -f
+ ? ((c = Math.max(0, -(-o * r + s))),
+ (h = c > 0 ? -r : Math.min(Math.max(-r, -a), r)),
+ (d = -c * c + h * (h + 2 * a) + l))
+ : h <= f
+ ? ((c = 0),
+ (h = Math.min(Math.max(-r, -a), r)),
+ (d = h * (h + 2 * a) + l))
+ : ((c = Math.max(0, -(o * r + s))),
+ (h = c > 0 ? r : Math.min(Math.max(-r, -a), r)),
+ (d = -c * c + h * (h + 2 * a) + l));
+ else
+ (h = o > 0 ? -r : r),
+ (c = Math.max(0, -(o * h + s))),
+ (d = -c * c + h * (h + 2 * a) + l);
+ return (
+ n && n.copy(this.direction).multiplyScalar(c).add(this.origin),
+ i && i.copy(uh).multiplyScalar(h).add(lh),
+ d
+ );
+ }
+ intersectSphere(t, e) {
+ ah.subVectors(t.center, this.origin);
+ const n = ah.dot(this.direction),
+ i = ah.dot(ah) - n * n,
+ r = t.radius * t.radius;
+ if (i > r) return null;
+ const o = Math.sqrt(r - i),
+ s = n - o,
+ a = n + o;
+ return s < 0 && a < 0 ? null : s < 0 ? this.at(a, e) : this.at(s, e);
+ }
+ intersectsSphere(t) {
+ return this.distanceSqToPoint(t.center) <= t.radius * t.radius;
+ }
+ distanceToPlane(t) {
+ const e = t.normal.dot(this.direction);
+ if (0 === e) return 0 === t.distanceToPoint(this.origin) ? 0 : null;
+ const n = -(this.origin.dot(t.normal) + t.constant) / e;
+ return n >= 0 ? n : null;
+ }
+ intersectPlane(t, e) {
+ const n = this.distanceToPlane(t);
+ return null === n ? null : this.at(n, e);
+ }
+ intersectsPlane(t) {
+ const e = t.distanceToPoint(this.origin);
+ if (0 === e) return !0;
+ return t.normal.dot(this.direction) * e < 0;
+ }
+ intersectBox(t, e) {
+ let n, i, r, o, s, a;
+ const l = 1 / this.direction.x,
+ u = 1 / this.direction.y,
+ c = 1 / this.direction.z,
+ h = this.origin;
+ return (
+ l >= 0
+ ? ((n = (t.min.x - h.x) * l), (i = (t.max.x - h.x) * l))
+ : ((n = (t.max.x - h.x) * l), (i = (t.min.x - h.x) * l)),
+ u >= 0
+ ? ((r = (t.min.y - h.y) * u), (o = (t.max.y - h.y) * u))
+ : ((r = (t.max.y - h.y) * u), (o = (t.min.y - h.y) * u)),
+ n > o || r > i
+ ? null
+ : ((r > n || isNaN(n)) && (n = r),
+ (o < i || isNaN(i)) && (i = o),
+ c >= 0
+ ? ((s = (t.min.z - h.z) * c), (a = (t.max.z - h.z) * c))
+ : ((s = (t.max.z - h.z) * c), (a = (t.min.z - h.z) * c)),
+ n > a || s > i
+ ? null
+ : ((s > n || n != n) && (n = s),
+ (a < i || i != i) && (i = a),
+ i < 0 ? null : this.at(n >= 0 ? n : i, e)))
+ );
+ }
+ intersectsBox(t) {
+ return null !== this.intersectBox(t, ah);
+ }
+ intersectTriangle(t, e, n, i, r) {
+ hh.subVectors(e, t), dh.subVectors(n, t), fh.crossVectors(hh, dh);
+ let o,
+ s = this.direction.dot(fh);
+ if (s > 0) {
+ if (i) return null;
+ o = 1;
+ } else {
+ if (!(s < 0)) return null;
+ (o = -1), (s = -s);
+ }
+ ch.subVectors(this.origin, t);
+ const a = o * this.direction.dot(dh.crossVectors(ch, dh));
+ if (a < 0) return null;
+ const l = o * this.direction.dot(hh.cross(ch));
+ if (l < 0) return null;
+ if (a + l > s) return null;
+ const u = -o * ch.dot(fh);
+ return u < 0 ? null : this.at(u / s, r);
+ }
+ applyMatrix4(t) {
+ return (
+ this.origin.applyMatrix4(t),
+ this.direction.transformDirection(t),
+ this
+ );
+ }
+ equals(t) {
+ return (
+ t.origin.equals(this.origin) && t.direction.equals(this.direction)
+ );
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ }
+ class mh {
+ constructor() {
+ (mh.prototype.isMatrix4 = !0),
+ (this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
+ }
+ set(t, e, n, i, r, o, s, a, l, u, c, h, d, f, p, m) {
+ const g = this.elements;
+ return (
+ (g[0] = t),
+ (g[4] = e),
+ (g[8] = n),
+ (g[12] = i),
+ (g[1] = r),
+ (g[5] = o),
+ (g[9] = s),
+ (g[13] = a),
+ (g[2] = l),
+ (g[6] = u),
+ (g[10] = c),
+ (g[14] = h),
+ (g[3] = d),
+ (g[7] = f),
+ (g[11] = p),
+ (g[15] = m),
+ this
+ );
+ }
+ identity() {
+ return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this;
+ }
+ clone() {
+ return new mh().fromArray(this.elements);
+ }
+ copy(t) {
+ const e = this.elements,
+ n = t.elements;
+ return (
+ (e[0] = n[0]),
+ (e[1] = n[1]),
+ (e[2] = n[2]),
+ (e[3] = n[3]),
+ (e[4] = n[4]),
+ (e[5] = n[5]),
+ (e[6] = n[6]),
+ (e[7] = n[7]),
+ (e[8] = n[8]),
+ (e[9] = n[9]),
+ (e[10] = n[10]),
+ (e[11] = n[11]),
+ (e[12] = n[12]),
+ (e[13] = n[13]),
+ (e[14] = n[14]),
+ (e[15] = n[15]),
+ this
+ );
+ }
+ copyPosition(t) {
+ const e = this.elements,
+ n = t.elements;
+ return (e[12] = n[12]), (e[13] = n[13]), (e[14] = n[14]), this;
+ }
+ setFromMatrix3(t) {
+ const e = t.elements;
+ return (
+ this.set(
+ e[0],
+ e[3],
+ e[6],
+ 0,
+ e[1],
+ e[4],
+ e[7],
+ 0,
+ e[2],
+ e[5],
+ e[8],
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ this
+ );
+ }
+ extractBasis(t, e, n) {
+ return (
+ t.setFromMatrixColumn(this, 0),
+ e.setFromMatrixColumn(this, 1),
+ n.setFromMatrixColumn(this, 2),
+ this
+ );
+ }
+ makeBasis(t, e, n) {
+ return (
+ this.set(
+ t.x,
+ e.x,
+ n.x,
+ 0,
+ t.y,
+ e.y,
+ n.y,
+ 0,
+ t.z,
+ e.z,
+ n.z,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ this
+ );
+ }
+ extractRotation(t) {
+ const e = this.elements,
+ n = t.elements,
+ i = 1 / gh.setFromMatrixColumn(t, 0).length(),
+ r = 1 / gh.setFromMatrixColumn(t, 1).length(),
+ o = 1 / gh.setFromMatrixColumn(t, 2).length();
+ return (
+ (e[0] = n[0] * i),
+ (e[1] = n[1] * i),
+ (e[2] = n[2] * i),
+ (e[3] = 0),
+ (e[4] = n[4] * r),
+ (e[5] = n[5] * r),
+ (e[6] = n[6] * r),
+ (e[7] = 0),
+ (e[8] = n[8] * o),
+ (e[9] = n[9] * o),
+ (e[10] = n[10] * o),
+ (e[11] = 0),
+ (e[12] = 0),
+ (e[13] = 0),
+ (e[14] = 0),
+ (e[15] = 1),
+ this
+ );
+ }
+ makeRotationFromEuler(t) {
+ const e = this.elements,
+ n = t.x,
+ i = t.y,
+ r = t.z,
+ o = Math.cos(n),
+ s = Math.sin(n),
+ a = Math.cos(i),
+ l = Math.sin(i),
+ u = Math.cos(r),
+ c = Math.sin(r);
+ if ("XYZ" === t.order) {
+ const t = o * u,
+ n = o * c,
+ i = s * u,
+ r = s * c;
+ (e[0] = a * u),
+ (e[4] = -a * c),
+ (e[8] = l),
+ (e[1] = n + i * l),
+ (e[5] = t - r * l),
+ (e[9] = -s * a),
+ (e[2] = r - t * l),
+ (e[6] = i + n * l),
+ (e[10] = o * a);
+ } else if ("YXZ" === t.order) {
+ const t = a * u,
+ n = a * c,
+ i = l * u,
+ r = l * c;
+ (e[0] = t + r * s),
+ (e[4] = i * s - n),
+ (e[8] = o * l),
+ (e[1] = o * c),
+ (e[5] = o * u),
+ (e[9] = -s),
+ (e[2] = n * s - i),
+ (e[6] = r + t * s),
+ (e[10] = o * a);
+ } else if ("ZXY" === t.order) {
+ const t = a * u,
+ n = a * c,
+ i = l * u,
+ r = l * c;
+ (e[0] = t - r * s),
+ (e[4] = -o * c),
+ (e[8] = i + n * s),
+ (e[1] = n + i * s),
+ (e[5] = o * u),
+ (e[9] = r - t * s),
+ (e[2] = -o * l),
+ (e[6] = s),
+ (e[10] = o * a);
+ } else if ("ZYX" === t.order) {
+ const t = o * u,
+ n = o * c,
+ i = s * u,
+ r = s * c;
+ (e[0] = a * u),
+ (e[4] = i * l - n),
+ (e[8] = t * l + r),
+ (e[1] = a * c),
+ (e[5] = r * l + t),
+ (e[9] = n * l - i),
+ (e[2] = -l),
+ (e[6] = s * a),
+ (e[10] = o * a);
+ } else if ("YZX" === t.order) {
+ const t = o * a,
+ n = o * l,
+ i = s * a,
+ r = s * l;
+ (e[0] = a * u),
+ (e[4] = r - t * c),
+ (e[8] = i * c + n),
+ (e[1] = c),
+ (e[5] = o * u),
+ (e[9] = -s * u),
+ (e[2] = -l * u),
+ (e[6] = n * c + i),
+ (e[10] = t - r * c);
+ } else if ("XZY" === t.order) {
+ const t = o * a,
+ n = o * l,
+ i = s * a,
+ r = s * l;
+ (e[0] = a * u),
+ (e[4] = -c),
+ (e[8] = l * u),
+ (e[1] = t * c + r),
+ (e[5] = o * u),
+ (e[9] = n * c - i),
+ (e[2] = i * c - n),
+ (e[6] = s * u),
+ (e[10] = r * c + t);
+ }
+ return (
+ (e[3] = 0),
+ (e[7] = 0),
+ (e[11] = 0),
+ (e[12] = 0),
+ (e[13] = 0),
+ (e[14] = 0),
+ (e[15] = 1),
+ this
+ );
+ }
+ makeRotationFromQuaternion(t) {
+ return this.compose(_h, t, xh);
+ }
+ lookAt(t, e, n) {
+ const i = this.elements;
+ return (
+ wh.subVectors(t, e),
+ 0 === wh.lengthSq() && (wh.z = 1),
+ wh.normalize(),
+ yh.crossVectors(n, wh),
+ 0 === yh.lengthSq() &&
+ (1 === Math.abs(n.z) ? (wh.x += 1e-4) : (wh.z += 1e-4),
+ wh.normalize(),
+ yh.crossVectors(n, wh)),
+ yh.normalize(),
+ bh.crossVectors(wh, yh),
+ (i[0] = yh.x),
+ (i[4] = bh.x),
+ (i[8] = wh.x),
+ (i[1] = yh.y),
+ (i[5] = bh.y),
+ (i[9] = wh.y),
+ (i[2] = yh.z),
+ (i[6] = bh.z),
+ (i[10] = wh.z),
+ this
+ );
+ }
+ multiply(t) {
+ return this.multiplyMatrices(this, t);
+ }
+ premultiply(t) {
+ return this.multiplyMatrices(t, this);
+ }
+ multiplyMatrices(t, e) {
+ const n = t.elements,
+ i = e.elements,
+ r = this.elements,
+ o = n[0],
+ s = n[4],
+ a = n[8],
+ l = n[12],
+ u = n[1],
+ c = n[5],
+ h = n[9],
+ d = n[13],
+ f = n[2],
+ p = n[6],
+ m = n[10],
+ g = n[14],
+ v = n[3],
+ _ = n[7],
+ x = n[11],
+ y = n[15],
+ b = i[0],
+ w = i[4],
+ S = i[8],
+ M = i[12],
+ D = i[1],
+ T = i[5],
+ E = i[9],
+ C = i[13],
+ A = i[2],
+ P = i[6],
+ L = i[10],
+ R = i[14],
+ O = i[3],
+ F = i[7],
+ I = i[11],
+ N = i[15];
+ return (
+ (r[0] = o * b + s * D + a * A + l * O),
+ (r[4] = o * w + s * T + a * P + l * F),
+ (r[8] = o * S + s * E + a * L + l * I),
+ (r[12] = o * M + s * C + a * R + l * N),
+ (r[1] = u * b + c * D + h * A + d * O),
+ (r[5] = u * w + c * T + h * P + d * F),
+ (r[9] = u * S + c * E + h * L + d * I),
+ (r[13] = u * M + c * C + h * R + d * N),
+ (r[2] = f * b + p * D + m * A + g * O),
+ (r[6] = f * w + p * T + m * P + g * F),
+ (r[10] = f * S + p * E + m * L + g * I),
+ (r[14] = f * M + p * C + m * R + g * N),
+ (r[3] = v * b + _ * D + x * A + y * O),
+ (r[7] = v * w + _ * T + x * P + y * F),
+ (r[11] = v * S + _ * E + x * L + y * I),
+ (r[15] = v * M + _ * C + x * R + y * N),
+ this
+ );
+ }
+ multiplyScalar(t) {
+ const e = this.elements;
+ return (
+ (e[0] *= t),
+ (e[4] *= t),
+ (e[8] *= t),
+ (e[12] *= t),
+ (e[1] *= t),
+ (e[5] *= t),
+ (e[9] *= t),
+ (e[13] *= t),
+ (e[2] *= t),
+ (e[6] *= t),
+ (e[10] *= t),
+ (e[14] *= t),
+ (e[3] *= t),
+ (e[7] *= t),
+ (e[11] *= t),
+ (e[15] *= t),
+ this
+ );
+ }
+ determinant() {
+ const t = this.elements,
+ e = t[0],
+ n = t[4],
+ i = t[8],
+ r = t[12],
+ o = t[1],
+ s = t[5],
+ a = t[9],
+ l = t[13],
+ u = t[2],
+ c = t[6],
+ h = t[10],
+ d = t[14];
+ return (
+ t[3] *
+ (+r * a * c -
+ i * l * c -
+ r * s * h +
+ n * l * h +
+ i * s * d -
+ n * a * d) +
+ t[7] *
+ (+e * a * d -
+ e * l * h +
+ r * o * h -
+ i * o * d +
+ i * l * u -
+ r * a * u) +
+ t[11] *
+ (+e * l * c -
+ e * s * d -
+ r * o * c +
+ n * o * d +
+ r * s * u -
+ n * l * u) +
+ t[15] *
+ (-i * s * u -
+ e * a * c +
+ e * s * h +
+ i * o * c -
+ n * o * h +
+ n * a * u)
+ );
+ }
+ transpose() {
+ const t = this.elements;
+ let e;
+ 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
+ );
+ }
+ setPosition(t, e, n) {
+ const i = this.elements;
+ return (
+ t.isVector3
+ ? ((i[12] = t.x), (i[13] = t.y), (i[14] = t.z))
+ : ((i[12] = t), (i[13] = e), (i[14] = n)),
+ this
+ );
+ }
+ invert() {
+ const t = this.elements,
+ e = t[0],
+ n = t[1],
+ i = t[2],
+ r = t[3],
+ o = t[4],
+ s = t[5],
+ a = t[6],
+ l = t[7],
+ u = t[8],
+ c = t[9],
+ h = t[10],
+ d = t[11],
+ f = t[12],
+ p = t[13],
+ m = t[14],
+ g = t[15],
+ v =
+ c * m * l -
+ p * h * l +
+ p * a * d -
+ s * m * d -
+ c * a * g +
+ s * h * g,
+ _ =
+ f * h * l -
+ u * m * l -
+ f * a * d +
+ o * m * d +
+ u * a * g -
+ o * h * g,
+ x =
+ u * p * l -
+ f * c * l +
+ f * s * d -
+ o * p * d -
+ u * s * g +
+ o * c * g,
+ y =
+ f * c * a -
+ u * p * a -
+ f * s * h +
+ o * p * h +
+ u * s * m -
+ o * c * m,
+ b = e * v + n * _ + i * x + r * y;
+ if (0 === b)
+ return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ const w = 1 / b;
+ return (
+ (t[0] = v * w),
+ (t[1] =
+ (p * h * r -
+ c * m * r -
+ p * i * d +
+ n * m * d +
+ c * i * g -
+ n * h * g) *
+ w),
+ (t[2] =
+ (s * m * r -
+ p * a * r +
+ p * i * l -
+ n * m * l -
+ s * i * g +
+ n * a * g) *
+ w),
+ (t[3] =
+ (c * a * r -
+ s * h * r -
+ c * i * l +
+ n * h * l +
+ s * i * d -
+ n * a * d) *
+ w),
+ (t[4] = _ * w),
+ (t[5] =
+ (u * m * r -
+ f * h * r +
+ f * i * d -
+ e * m * d -
+ u * i * g +
+ e * h * g) *
+ w),
+ (t[6] =
+ (f * a * r -
+ o * m * r -
+ f * i * l +
+ e * m * l +
+ o * i * g -
+ e * a * g) *
+ w),
+ (t[7] =
+ (o * h * r -
+ u * a * r +
+ u * i * l -
+ e * h * l -
+ o * i * d +
+ e * a * d) *
+ w),
+ (t[8] = x * w),
+ (t[9] =
+ (f * c * r -
+ u * p * r -
+ f * n * d +
+ e * p * d +
+ u * n * g -
+ e * c * g) *
+ w),
+ (t[10] =
+ (o * p * r -
+ f * s * r +
+ f * n * l -
+ e * p * l -
+ o * n * g +
+ e * s * g) *
+ w),
+ (t[11] =
+ (u * s * r -
+ o * c * r -
+ u * n * l +
+ e * c * l +
+ o * n * d -
+ e * s * d) *
+ w),
+ (t[12] = y * w),
+ (t[13] =
+ (u * p * i -
+ f * c * i +
+ f * n * h -
+ e * p * h -
+ u * n * m +
+ e * c * m) *
+ w),
+ (t[14] =
+ (f * s * i -
+ o * p * i -
+ f * n * a +
+ e * p * a +
+ o * n * m -
+ e * s * m) *
+ w),
+ (t[15] =
+ (o * c * i -
+ u * s * i +
+ u * n * a -
+ e * c * a -
+ o * n * h +
+ e * s * h) *
+ w),
+ this
+ );
+ }
+ scale(t) {
+ const e = this.elements,
+ n = t.x,
+ i = t.y,
+ r = t.z;
+ return (
+ (e[0] *= n),
+ (e[4] *= i),
+ (e[8] *= r),
+ (e[1] *= n),
+ (e[5] *= i),
+ (e[9] *= r),
+ (e[2] *= n),
+ (e[6] *= i),
+ (e[10] *= r),
+ (e[3] *= n),
+ (e[7] *= i),
+ (e[11] *= r),
+ this
+ );
+ }
+ getMaxScaleOnAxis() {
+ const t = this.elements,
+ e = t[0] * t[0] + t[1] * t[1] + t[2] * t[2],
+ n = t[4] * t[4] + t[5] * t[5] + t[6] * t[6],
+ i = t[8] * t[8] + t[9] * t[9] + t[10] * t[10];
+ return Math.sqrt(Math.max(e, n, i));
+ }
+ makeTranslation(t, e, n) {
+ return this.set(1, 0, 0, t, 0, 1, 0, e, 0, 0, 1, n, 0, 0, 0, 1), this;
+ }
+ makeRotationX(t) {
+ const e = Math.cos(t),
+ n = Math.sin(t);
+ return this.set(1, 0, 0, 0, 0, e, -n, 0, 0, n, e, 0, 0, 0, 0, 1), this;
+ }
+ makeRotationY(t) {
+ const e = Math.cos(t),
+ n = Math.sin(t);
+ return this.set(e, 0, n, 0, 0, 1, 0, 0, -n, 0, e, 0, 0, 0, 0, 1), this;
+ }
+ makeRotationZ(t) {
+ const e = Math.cos(t),
+ n = Math.sin(t);
+ return this.set(e, -n, 0, 0, n, e, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this;
+ }
+ makeRotationAxis(t, e) {
+ const n = Math.cos(e),
+ i = Math.sin(e),
+ r = 1 - n,
+ o = t.x,
+ s = t.y,
+ a = t.z,
+ l = r * o,
+ u = r * s;
+ return (
+ this.set(
+ l * o + n,
+ l * s - i * a,
+ l * a + i * s,
+ 0,
+ l * s + i * a,
+ u * s + n,
+ u * a - i * o,
+ 0,
+ l * a - i * s,
+ u * a + i * o,
+ r * a * a + n,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ this
+ );
+ }
+ makeScale(t, e, n) {
+ return this.set(t, 0, 0, 0, 0, e, 0, 0, 0, 0, n, 0, 0, 0, 0, 1), this;
+ }
+ makeShear(t, e, n, i, r, o) {
+ return this.set(1, n, r, 0, t, 1, o, 0, e, i, 1, 0, 0, 0, 0, 1), this;
+ }
+ compose(t, e, n) {
+ const i = this.elements,
+ r = e._x,
+ o = e._y,
+ s = e._z,
+ a = e._w,
+ l = r + r,
+ u = o + o,
+ c = s + s,
+ h = r * l,
+ d = r * u,
+ f = r * c,
+ p = o * u,
+ m = o * c,
+ g = s * c,
+ v = a * l,
+ _ = a * u,
+ x = a * c,
+ y = n.x,
+ b = n.y,
+ w = n.z;
+ return (
+ (i[0] = (1 - (p + g)) * y),
+ (i[1] = (d + x) * y),
+ (i[2] = (f - _) * y),
+ (i[3] = 0),
+ (i[4] = (d - x) * b),
+ (i[5] = (1 - (h + g)) * b),
+ (i[6] = (m + v) * b),
+ (i[7] = 0),
+ (i[8] = (f + _) * w),
+ (i[9] = (m - v) * w),
+ (i[10] = (1 - (h + p)) * w),
+ (i[11] = 0),
+ (i[12] = t.x),
+ (i[13] = t.y),
+ (i[14] = t.z),
+ (i[15] = 1),
+ this
+ );
+ }
+ decompose(t, e, n) {
+ const i = this.elements;
+ let r = gh.set(i[0], i[1], i[2]).length();
+ const o = gh.set(i[4], i[5], i[6]).length(),
+ s = gh.set(i[8], i[9], i[10]).length();
+ this.determinant() < 0 && (r = -r),
+ (t.x = i[12]),
+ (t.y = i[13]),
+ (t.z = i[14]),
+ vh.copy(this);
+ const a = 1 / r,
+ l = 1 / o,
+ u = 1 / s;
+ return (
+ (vh.elements[0] *= a),
+ (vh.elements[1] *= a),
+ (vh.elements[2] *= a),
+ (vh.elements[4] *= l),
+ (vh.elements[5] *= l),
+ (vh.elements[6] *= l),
+ (vh.elements[8] *= u),
+ (vh.elements[9] *= u),
+ (vh.elements[10] *= u),
+ e.setFromRotationMatrix(vh),
+ (n.x = r),
+ (n.y = o),
+ (n.z = s),
+ this
+ );
+ }
+ makePerspective(t, e, n, i, r, o) {
+ const s = this.elements,
+ a = (2 * r) / (e - t),
+ l = (2 * r) / (n - i),
+ u = (e + t) / (e - t),
+ c = (n + i) / (n - i),
+ h = -(o + r) / (o - r),
+ d = (-2 * o * r) / (o - r);
+ return (
+ (s[0] = a),
+ (s[4] = 0),
+ (s[8] = u),
+ (s[12] = 0),
+ (s[1] = 0),
+ (s[5] = l),
+ (s[9] = c),
+ (s[13] = 0),
+ (s[2] = 0),
+ (s[6] = 0),
+ (s[10] = h),
+ (s[14] = d),
+ (s[3] = 0),
+ (s[7] = 0),
+ (s[11] = -1),
+ (s[15] = 0),
+ this
+ );
+ }
+ makeOrthographic(t, e, n, i, r, o) {
+ const s = this.elements,
+ a = 1 / (e - t),
+ l = 1 / (n - i),
+ u = 1 / (o - r),
+ c = (e + t) * a,
+ h = (n + i) * l,
+ d = (o + r) * u;
+ return (
+ (s[0] = 2 * a),
+ (s[4] = 0),
+ (s[8] = 0),
+ (s[12] = -c),
+ (s[1] = 0),
+ (s[5] = 2 * l),
+ (s[9] = 0),
+ (s[13] = -h),
+ (s[2] = 0),
+ (s[6] = 0),
+ (s[10] = -2 * u),
+ (s[14] = -d),
+ (s[3] = 0),
+ (s[7] = 0),
+ (s[11] = 0),
+ (s[15] = 1),
+ this
+ );
+ }
+ equals(t) {
+ const e = this.elements,
+ n = t.elements;
+ for (let t = 0; t < 16; t++) if (e[t] !== n[t]) return !1;
+ return !0;
+ }
+ fromArray(t, e = 0) {
+ for (let n = 0; n < 16; n++) this.elements[n] = t[n + e];
+ return this;
+ }
+ toArray(t = [], e = 0) {
+ const n = this.elements;
+ return (
+ (t[e] = n[0]),
+ (t[e + 1] = n[1]),
+ (t[e + 2] = n[2]),
+ (t[e + 3] = n[3]),
+ (t[e + 4] = n[4]),
+ (t[e + 5] = n[5]),
+ (t[e + 6] = n[6]),
+ (t[e + 7] = n[7]),
+ (t[e + 8] = n[8]),
+ (t[e + 9] = n[9]),
+ (t[e + 10] = n[10]),
+ (t[e + 11] = n[11]),
+ (t[e + 12] = n[12]),
+ (t[e + 13] = n[13]),
+ (t[e + 14] = n[14]),
+ (t[e + 15] = n[15]),
+ t
+ );
+ }
+ }
+ const gh = new Uc(),
+ vh = new mh(),
+ _h = new Uc(0, 0, 0),
+ xh = new Uc(1, 1, 1),
+ yh = new Uc(),
+ bh = new Uc(),
+ wh = new Uc(),
+ Sh = new mh(),
+ Mh = new kc();
+ class Dh {
+ constructor(t = 0, e = 0, n = 0, i = Dh.DefaultOrder) {
+ (this.isEuler = !0),
+ (this._x = t),
+ (this._y = e),
+ (this._z = n),
+ (this._order = i);
+ }
+ get x() {
+ return this._x;
+ }
+ set x(t) {
+ (this._x = t), this._onChangeCallback();
+ }
+ get y() {
+ return this._y;
+ }
+ set y(t) {
+ (this._y = t), this._onChangeCallback();
+ }
+ get z() {
+ return this._z;
+ }
+ set z(t) {
+ (this._z = t), this._onChangeCallback();
+ }
+ get order() {
+ return this._order;
+ }
+ set order(t) {
+ (this._order = t), this._onChangeCallback();
+ }
+ set(t, e, n, i = this._order) {
+ return (
+ (this._x = t),
+ (this._y = e),
+ (this._z = n),
+ (this._order = i),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ clone() {
+ return new this.constructor(this._x, this._y, this._z, this._order);
+ }
+ copy(t) {
+ return (
+ (this._x = t._x),
+ (this._y = t._y),
+ (this._z = t._z),
+ (this._order = t._order),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ setFromRotationMatrix(t, e = this._order, n = !0) {
+ const i = t.elements,
+ r = i[0],
+ o = i[4],
+ s = i[8],
+ a = i[1],
+ l = i[5],
+ u = i[9],
+ c = i[2],
+ h = i[6],
+ d = i[10];
+ switch (e) {
+ case "XYZ":
+ (this._y = Math.asin(oc(s, -1, 1))),
+ Math.abs(s) < 0.9999999
+ ? ((this._x = Math.atan2(-u, d)), (this._z = Math.atan2(-o, r)))
+ : ((this._x = Math.atan2(h, l)), (this._z = 0));
+ break;
+ case "YXZ":
+ (this._x = Math.asin(-oc(u, -1, 1))),
+ Math.abs(u) < 0.9999999
+ ? ((this._y = Math.atan2(s, d)), (this._z = Math.atan2(a, l)))
+ : ((this._y = Math.atan2(-c, r)), (this._z = 0));
+ break;
+ case "ZXY":
+ (this._x = Math.asin(oc(h, -1, 1))),
+ Math.abs(h) < 0.9999999
+ ? ((this._y = Math.atan2(-c, d)), (this._z = Math.atan2(-o, l)))
+ : ((this._y = 0), (this._z = Math.atan2(a, r)));
+ break;
+ case "ZYX":
+ (this._y = Math.asin(-oc(c, -1, 1))),
+ Math.abs(c) < 0.9999999
+ ? ((this._x = Math.atan2(h, d)), (this._z = Math.atan2(a, r)))
+ : ((this._x = 0), (this._z = Math.atan2(-o, l)));
+ break;
+ case "YZX":
+ (this._z = Math.asin(oc(a, -1, 1))),
+ Math.abs(a) < 0.9999999
+ ? ((this._x = Math.atan2(-u, l)), (this._y = Math.atan2(-c, r)))
+ : ((this._x = 0), (this._y = Math.atan2(s, d)));
+ break;
+ case "XZY":
+ (this._z = Math.asin(-oc(o, -1, 1))),
+ Math.abs(o) < 0.9999999
+ ? ((this._x = Math.atan2(h, l)), (this._y = Math.atan2(s, r)))
+ : ((this._x = Math.atan2(-u, d)), (this._y = 0));
+ break;
+ default:
+ console.warn(
+ "THREE.Euler: .setFromRotationMatrix() encountered an unknown order: " +
+ e
+ );
+ }
+ return (this._order = e), !0 === n && this._onChangeCallback(), this;
+ }
+ setFromQuaternion(t, e, n) {
+ return (
+ Sh.makeRotationFromQuaternion(t), this.setFromRotationMatrix(Sh, e, n)
+ );
+ }
+ setFromVector3(t, e = this._order) {
+ return this.set(t.x, t.y, t.z, e);
+ }
+ reorder(t) {
+ return Mh.setFromEuler(this), this.setFromQuaternion(Mh, t);
+ }
+ equals(t) {
+ return (
+ t._x === this._x &&
+ t._y === this._y &&
+ t._z === this._z &&
+ t._order === this._order
+ );
+ }
+ fromArray(t) {
+ return (
+ (this._x = t[0]),
+ (this._y = t[1]),
+ (this._z = t[2]),
+ void 0 !== t[3] && (this._order = t[3]),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ toArray(t = [], e = 0) {
+ return (
+ (t[e] = this._x),
+ (t[e + 1] = this._y),
+ (t[e + 2] = this._z),
+ (t[e + 3] = this._order),
+ t
+ );
+ }
+ _onChange(t) {
+ return (this._onChangeCallback = t), this;
+ }
+ _onChangeCallback() {}
+ *[Symbol.iterator]() {
+ yield this._x, yield this._y, yield this._z, yield this._order;
+ }
+ toVector3() {
+ console.error(
+ "THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead"
+ );
+ }
+ }
+ (Dh.DefaultOrder = "XYZ"),
+ (Dh.RotationOrders = ["XYZ", "YZX", "ZXY", "XZY", "YXZ", "ZYX"]);
+ class Th {
+ constructor() {
+ this.mask = 1;
+ }
+ set(t) {
+ this.mask = ((1 << t) | 0) >>> 0;
+ }
+ enable(t) {
+ this.mask |= (1 << t) | 0;
+ }
+ enableAll() {
+ this.mask = -1;
+ }
+ toggle(t) {
+ this.mask ^= (1 << t) | 0;
+ }
+ disable(t) {
+ this.mask &= ~((1 << t) | 0);
+ }
+ disableAll() {
+ this.mask = 0;
+ }
+ test(t) {
+ return 0 != (this.mask & t.mask);
+ }
+ isEnabled(t) {
+ return 0 != (this.mask & ((1 << t) | 0));
+ }
+ }
+ let Eh = 0;
+ const Ch = new Uc(),
+ Ah = new kc(),
+ Ph = new mh(),
+ Lh = new Uc(),
+ Rh = new Uc(),
+ Oh = new Uc(),
+ Fh = new kc(),
+ Ih = new Uc(1, 0, 0),
+ Nh = new Uc(0, 1, 0),
+ zh = new Uc(0, 0, 1),
+ kh = { type: "added" },
+ Uh = { type: "removed" };
+ class Bh extends tc {
+ constructor() {
+ super(),
+ (this.isObject3D = !0),
+ Object.defineProperty(this, "id", { value: Eh++ }),
+ (this.uuid = rc()),
+ (this.name = ""),
+ (this.type = "Object3D"),
+ (this.parent = null),
+ (this.children = []),
+ (this.up = Bh.DefaultUp.clone());
+ const t = new Uc(),
+ e = new Dh(),
+ n = new kc(),
+ i = new Uc(1, 1, 1);
+ e._onChange(function () {
+ n.setFromEuler(e, !1);
+ }),
+ n._onChange(function () {
+ e.setFromQuaternion(n, void 0, !1);
+ }),
+ Object.defineProperties(this, {
+ position: { configurable: !0, enumerable: !0, value: t },
+ rotation: { configurable: !0, enumerable: !0, value: e },
+ quaternion: { configurable: !0, enumerable: !0, value: n },
+ scale: { configurable: !0, enumerable: !0, value: i },
+ modelViewMatrix: { value: new mh() },
+ normalMatrix: { value: new fc() },
+ }),
+ (this.matrix = new mh()),
+ (this.matrixWorld = new mh()),
+ (this.matrixAutoUpdate = Bh.DefaultMatrixAutoUpdate),
+ (this.matrixWorldNeedsUpdate = !1),
+ (this.matrixWorldAutoUpdate = Bh.DefaultMatrixWorldAutoUpdate),
+ (this.layers = new Th()),
+ (this.visible = !0),
+ (this.castShadow = !1),
+ (this.receiveShadow = !1),
+ (this.frustumCulled = !0),
+ (this.renderOrder = 0),
+ (this.animations = []),
+ (this.userData = {});
+ }
+ onBeforeRender() {}
+ onAfterRender() {}
+ applyMatrix4(t) {
+ this.matrixAutoUpdate && this.updateMatrix(),
+ this.matrix.premultiply(t),
+ this.matrix.decompose(this.position, this.quaternion, this.scale);
+ }
+ applyQuaternion(t) {
+ return this.quaternion.premultiply(t), this;
+ }
+ setRotationFromAxisAngle(t, e) {
+ this.quaternion.setFromAxisAngle(t, e);
+ }
+ setRotationFromEuler(t) {
+ this.quaternion.setFromEuler(t, !0);
+ }
+ setRotationFromMatrix(t) {
+ this.quaternion.setFromRotationMatrix(t);
+ }
+ setRotationFromQuaternion(t) {
+ this.quaternion.copy(t);
+ }
+ rotateOnAxis(t, e) {
+ return Ah.setFromAxisAngle(t, e), this.quaternion.multiply(Ah), this;
+ }
+ rotateOnWorldAxis(t, e) {
+ return Ah.setFromAxisAngle(t, e), this.quaternion.premultiply(Ah), this;
+ }
+ rotateX(t) {
+ return this.rotateOnAxis(Ih, t);
+ }
+ rotateY(t) {
+ return this.rotateOnAxis(Nh, t);
+ }
+ rotateZ(t) {
+ return this.rotateOnAxis(zh, t);
+ }
+ translateOnAxis(t, e) {
+ return (
+ Ch.copy(t).applyQuaternion(this.quaternion),
+ this.position.add(Ch.multiplyScalar(e)),
+ this
+ );
+ }
+ translateX(t) {
+ return this.translateOnAxis(Ih, t);
+ }
+ translateY(t) {
+ return this.translateOnAxis(Nh, t);
+ }
+ translateZ(t) {
+ return this.translateOnAxis(zh, t);
+ }
+ localToWorld(t) {
+ return this.updateWorldMatrix(!0, !1), t.applyMatrix4(this.matrixWorld);
+ }
+ worldToLocal(t) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ t.applyMatrix4(Ph.copy(this.matrixWorld).invert())
+ );
+ }
+ lookAt(t, e, n) {
+ t.isVector3 ? Lh.copy(t) : Lh.set(t, e, n);
+ const i = this.parent;
+ this.updateWorldMatrix(!0, !1),
+ Rh.setFromMatrixPosition(this.matrixWorld),
+ this.isCamera || this.isLight
+ ? Ph.lookAt(Rh, Lh, this.up)
+ : Ph.lookAt(Lh, Rh, this.up),
+ this.quaternion.setFromRotationMatrix(Ph),
+ i &&
+ (Ph.extractRotation(i.matrixWorld),
+ Ah.setFromRotationMatrix(Ph),
+ this.quaternion.premultiply(Ah.invert()));
+ }
+ add(t) {
+ if (arguments.length > 1) {
+ for (let t = 0; t < arguments.length; t++) this.add(arguments[t]);
+ return this;
+ }
+ return t === this
+ ? (console.error(
+ "THREE.Object3D.add: object can't be added as a child of itself.",
+ t
+ ),
+ this)
+ : (t && t.isObject3D
+ ? (null !== t.parent && t.parent.remove(t),
+ (t.parent = this),
+ this.children.push(t),
+ t.dispatchEvent(kh))
+ : console.error(
+ "THREE.Object3D.add: object not an instance of THREE.Object3D.",
+ t
+ ),
+ this);
+ }
+ remove(t) {
+ if (arguments.length > 1) {
+ for (let t = 0; t < arguments.length; t++) this.remove(arguments[t]);
+ return this;
+ }
+ const e = this.children.indexOf(t);
+ return (
+ -1 !== e &&
+ ((t.parent = null),
+ this.children.splice(e, 1),
+ t.dispatchEvent(Uh)),
+ this
+ );
+ }
+ removeFromParent() {
+ const t = this.parent;
+ return null !== t && t.remove(this), this;
+ }
+ clear() {
+ for (let t = 0; t < this.children.length; t++) {
+ const e = this.children[t];
+ (e.parent = null), e.dispatchEvent(Uh);
+ }
+ return (this.children.length = 0), this;
+ }
+ attach(t) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ Ph.copy(this.matrixWorld).invert(),
+ null !== t.parent &&
+ (t.parent.updateWorldMatrix(!0, !1),
+ Ph.multiply(t.parent.matrixWorld)),
+ t.applyMatrix4(Ph),
+ this.add(t),
+ t.updateWorldMatrix(!1, !0),
+ this
+ );
+ }
+ getObjectById(t) {
+ return this.getObjectByProperty("id", t);
+ }
+ getObjectByName(t) {
+ return this.getObjectByProperty("name", t);
+ }
+ getObjectByProperty(t, e) {
+ if (this[t] === e) return this;
+ for (let n = 0, i = this.children.length; n < i; n++) {
+ const i = this.children[n].getObjectByProperty(t, e);
+ if (void 0 !== i) return i;
+ }
+ }
+ getObjectsByProperty(t, e) {
+ let n = [];
+ this[t] === e && n.push(this);
+ for (let i = 0, r = this.children.length; i < r; i++) {
+ const r = this.children[i].getObjectsByProperty(t, e);
+ r.length > 0 && (n = n.concat(r));
+ }
+ return n;
+ }
+ getWorldPosition(t) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ t.setFromMatrixPosition(this.matrixWorld)
+ );
+ }
+ getWorldQuaternion(t) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ this.matrixWorld.decompose(Rh, t, Oh),
+ t
+ );
+ }
+ getWorldScale(t) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ this.matrixWorld.decompose(Rh, Fh, t),
+ t
+ );
+ }
+ getWorldDirection(t) {
+ this.updateWorldMatrix(!0, !1);
+ const e = this.matrixWorld.elements;
+ return t.set(e[8], e[9], e[10]).normalize();
+ }
+ raycast() {}
+ traverse(t) {
+ t(this);
+ const e = this.children;
+ for (let n = 0, i = e.length; n < i; n++) e[n].traverse(t);
+ }
+ traverseVisible(t) {
+ if (!1 === this.visible) return;
+ t(this);
+ const e = this.children;
+ for (let n = 0, i = e.length; n < i; n++) e[n].traverseVisible(t);
+ }
+ traverseAncestors(t) {
+ const e = this.parent;
+ null !== e && (t(e), e.traverseAncestors(t));
+ }
+ updateMatrix() {
+ this.matrix.compose(this.position, this.quaternion, this.scale),
+ (this.matrixWorldNeedsUpdate = !0);
+ }
+ updateMatrixWorld(t) {
+ this.matrixAutoUpdate && this.updateMatrix(),
+ (this.matrixWorldNeedsUpdate || t) &&
+ (null === this.parent
+ ? this.matrixWorld.copy(this.matrix)
+ : this.matrixWorld.multiplyMatrices(
+ this.parent.matrixWorld,
+ this.matrix
+ ),
+ (this.matrixWorldNeedsUpdate = !1),
+ (t = !0));
+ const e = this.children;
+ for (let n = 0, i = e.length; n < i; n++) {
+ const i = e[n];
+ (!0 !== i.matrixWorldAutoUpdate && !0 !== t) ||
+ i.updateMatrixWorld(t);
+ }
+ }
+ updateWorldMatrix(t, e) {
+ const n = this.parent;
+ if (
+ (!0 === t &&
+ null !== n &&
+ !0 === n.matrixWorldAutoUpdate &&
+ n.updateWorldMatrix(!0, !1),
+ this.matrixAutoUpdate && this.updateMatrix(),
+ null === this.parent
+ ? this.matrixWorld.copy(this.matrix)
+ : this.matrixWorld.multiplyMatrices(
+ this.parent.matrixWorld,
+ this.matrix
+ ),
+ !0 === e)
+ ) {
+ const t = this.children;
+ for (let e = 0, n = t.length; e < n; e++) {
+ const n = t[e];
+ !0 === n.matrixWorldAutoUpdate && n.updateWorldMatrix(!1, !0);
+ }
+ }
+ }
+ toJSON(t) {
+ const e = void 0 === t || "string" == typeof t,
+ n = {};
+ e &&
+ ((t = {
+ geometries: {},
+ materials: {},
+ textures: {},
+ images: {},
+ shapes: {},
+ skeletons: {},
+ animations: {},
+ nodes: {},
+ }),
+ (n.metadata = {
+ version: 4.5,
+ type: "Object",
+ generator: "Object3D.toJSON",
+ }));
+ const i = {};
+ function r(e, n) {
+ return void 0 === e[n.uuid] && (e[n.uuid] = n.toJSON(t)), n.uuid;
+ }
+ if (
+ ((i.uuid = this.uuid),
+ (i.type = this.type),
+ "" !== this.name && (i.name = this.name),
+ !0 === this.castShadow && (i.castShadow = !0),
+ !0 === this.receiveShadow && (i.receiveShadow = !0),
+ !1 === this.visible && (i.visible = !1),
+ !1 === this.frustumCulled && (i.frustumCulled = !1),
+ 0 !== this.renderOrder && (i.renderOrder = this.renderOrder),
+ Object.keys(this.userData).length > 0 && (i.userData = this.userData),
+ (i.layers = this.layers.mask),
+ (i.matrix = this.matrix.toArray()),
+ !1 === this.matrixAutoUpdate && (i.matrixAutoUpdate = !1),
+ this.isInstancedMesh &&
+ ((i.type = "InstancedMesh"),
+ (i.count = this.count),
+ (i.instanceMatrix = this.instanceMatrix.toJSON()),
+ null !== this.instanceColor &&
+ (i.instanceColor = this.instanceColor.toJSON())),
+ this.isScene)
+ )
+ this.background &&
+ (this.background.isColor
+ ? (i.background = this.background.toJSON())
+ : this.background.isTexture &&
+ (i.background = this.background.toJSON(t).uuid)),
+ this.environment &&
+ this.environment.isTexture &&
+ !0 !== this.environment.isRenderTargetTexture &&
+ (i.environment = this.environment.toJSON(t).uuid);
+ else if (this.isMesh || this.isLine || this.isPoints) {
+ i.geometry = r(t.geometries, this.geometry);
+ const e = this.geometry.parameters;
+ if (void 0 !== e && void 0 !== e.shapes) {
+ const n = e.shapes;
+ if (Array.isArray(n))
+ for (let e = 0, i = n.length; e < i; e++) {
+ const i = n[e];
+ r(t.shapes, i);
+ }
+ else r(t.shapes, n);
+ }
+ }
+ if (
+ (this.isSkinnedMesh &&
+ ((i.bindMode = this.bindMode),
+ (i.bindMatrix = this.bindMatrix.toArray()),
+ void 0 !== this.skeleton &&
+ (r(t.skeletons, this.skeleton),
+ (i.skeleton = this.skeleton.uuid))),
+ void 0 !== this.material)
+ )
+ if (Array.isArray(this.material)) {
+ const e = [];
+ for (let n = 0, i = this.material.length; n < i; n++)
+ e.push(r(t.materials, this.material[n]));
+ i.material = e;
+ } else i.material = r(t.materials, this.material);
+ if (this.children.length > 0) {
+ i.children = [];
+ for (let e = 0; e < this.children.length; e++)
+ i.children.push(this.children[e].toJSON(t).object);
+ }
+ if (this.animations.length > 0) {
+ i.animations = [];
+ for (let e = 0; e < this.animations.length; e++) {
+ const n = this.animations[e];
+ i.animations.push(r(t.animations, n));
+ }
+ }
+ if (e) {
+ const e = o(t.geometries),
+ i = o(t.materials),
+ r = o(t.textures),
+ s = o(t.images),
+ a = o(t.shapes),
+ l = o(t.skeletons),
+ u = o(t.animations),
+ c = o(t.nodes);
+ e.length > 0 && (n.geometries = e),
+ i.length > 0 && (n.materials = i),
+ r.length > 0 && (n.textures = r),
+ s.length > 0 && (n.images = s),
+ a.length > 0 && (n.shapes = a),
+ l.length > 0 && (n.skeletons = l),
+ u.length > 0 && (n.animations = u),
+ c.length > 0 && (n.nodes = c);
+ }
+ return (n.object = i), n;
+ function o(t) {
+ const e = [];
+ for (const n in t) {
+ const i = t[n];
+ delete i.metadata, e.push(i);
+ }
+ return e;
+ }
+ }
+ clone(t) {
+ return new this.constructor().copy(this, t);
+ }
+ copy(t, e = !0) {
+ if (
+ ((this.name = t.name),
+ this.up.copy(t.up),
+ this.position.copy(t.position),
+ (this.rotation.order = t.rotation.order),
+ this.quaternion.copy(t.quaternion),
+ this.scale.copy(t.scale),
+ this.matrix.copy(t.matrix),
+ this.matrixWorld.copy(t.matrixWorld),
+ (this.matrixAutoUpdate = t.matrixAutoUpdate),
+ (this.matrixWorldNeedsUpdate = t.matrixWorldNeedsUpdate),
+ (this.matrixWorldAutoUpdate = t.matrixWorldAutoUpdate),
+ (this.layers.mask = t.layers.mask),
+ (this.visible = t.visible),
+ (this.castShadow = t.castShadow),
+ (this.receiveShadow = t.receiveShadow),
+ (this.frustumCulled = t.frustumCulled),
+ (this.renderOrder = t.renderOrder),
+ (this.userData = JSON.parse(JSON.stringify(t.userData))),
+ !0 === e)
+ )
+ for (let e = 0; e < t.children.length; e++) {
+ const n = t.children[e];
+ this.add(n.clone());
+ }
+ return this;
+ }
+ }
+ (Bh.DefaultUp = new Uc(0, 1, 0)),
+ (Bh.DefaultMatrixAutoUpdate = !0),
+ (Bh.DefaultMatrixWorldAutoUpdate = !0);
+ const Vh = new Uc(),
+ Hh = new Uc(),
+ Wh = new Uc(),
+ Gh = new Uc(),
+ jh = new Uc(),
+ qh = new Uc(),
+ Xh = new Uc(),
+ Yh = new Uc(),
+ Zh = new Uc(),
+ Kh = new Uc();
+ class Jh {
+ constructor(t = new Uc(), e = new Uc(), n = new Uc()) {
+ (this.a = t), (this.b = e), (this.c = n);
+ }
+ static getNormal(t, e, n, i) {
+ i.subVectors(n, e), Vh.subVectors(t, e), i.cross(Vh);
+ const r = i.lengthSq();
+ return r > 0 ? i.multiplyScalar(1 / Math.sqrt(r)) : i.set(0, 0, 0);
+ }
+ static getBarycoord(t, e, n, i, r) {
+ Vh.subVectors(i, e), Hh.subVectors(n, e), Wh.subVectors(t, e);
+ const o = Vh.dot(Vh),
+ s = Vh.dot(Hh),
+ a = Vh.dot(Wh),
+ l = Hh.dot(Hh),
+ u = Hh.dot(Wh),
+ c = o * l - s * s;
+ if (0 === c) return r.set(-2, -1, -1);
+ const h = 1 / c,
+ d = (l * a - s * u) * h,
+ f = (o * u - s * a) * h;
+ return r.set(1 - d - f, f, d);
+ }
+ static containsPoint(t, e, n, i) {
+ return (
+ this.getBarycoord(t, e, n, i, Gh),
+ Gh.x >= 0 && Gh.y >= 0 && Gh.x + Gh.y <= 1
+ );
+ }
+ static getUV(t, e, n, i, r, o, s, a) {
+ return (
+ this.getBarycoord(t, e, n, i, Gh),
+ a.set(0, 0),
+ a.addScaledVector(r, Gh.x),
+ a.addScaledVector(o, Gh.y),
+ a.addScaledVector(s, Gh.z),
+ a
+ );
+ }
+ static isFrontFacing(t, e, n, i) {
+ return (
+ Vh.subVectors(n, e), Hh.subVectors(t, e), Vh.cross(Hh).dot(i) < 0
+ );
+ }
+ set(t, e, n) {
+ return this.a.copy(t), this.b.copy(e), this.c.copy(n), this;
+ }
+ setFromPointsAndIndices(t, e, n, i) {
+ return this.a.copy(t[e]), this.b.copy(t[n]), this.c.copy(t[i]), this;
+ }
+ setFromAttributeAndIndices(t, e, n, i) {
+ return (
+ this.a.fromBufferAttribute(t, e),
+ this.b.fromBufferAttribute(t, n),
+ this.c.fromBufferAttribute(t, i),
+ this
+ );
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ copy(t) {
+ return this.a.copy(t.a), this.b.copy(t.b), this.c.copy(t.c), this;
+ }
+ getArea() {
+ return (
+ Vh.subVectors(this.c, this.b),
+ Hh.subVectors(this.a, this.b),
+ 0.5 * Vh.cross(Hh).length()
+ );
+ }
+ getMidpoint(t) {
+ return t
+ .addVectors(this.a, this.b)
+ .add(this.c)
+ .multiplyScalar(1 / 3);
+ }
+ getNormal(t) {
+ return Jh.getNormal(this.a, this.b, this.c, t);
+ }
+ getPlane(t) {
+ return t.setFromCoplanarPoints(this.a, this.b, this.c);
+ }
+ getBarycoord(t, e) {
+ return Jh.getBarycoord(t, this.a, this.b, this.c, e);
+ }
+ getUV(t, e, n, i, r) {
+ return Jh.getUV(t, this.a, this.b, this.c, e, n, i, r);
+ }
+ containsPoint(t) {
+ return Jh.containsPoint(t, this.a, this.b, this.c);
+ }
+ isFrontFacing(t) {
+ return Jh.isFrontFacing(this.a, this.b, this.c, t);
+ }
+ intersectsBox(t) {
+ return t.intersectsTriangle(this);
+ }
+ closestPointToPoint(t, e) {
+ const n = this.a,
+ i = this.b,
+ r = this.c;
+ let o, s;
+ jh.subVectors(i, n), qh.subVectors(r, n), Yh.subVectors(t, n);
+ const a = jh.dot(Yh),
+ l = qh.dot(Yh);
+ if (a <= 0 && l <= 0) return e.copy(n);
+ Zh.subVectors(t, i);
+ const u = jh.dot(Zh),
+ c = qh.dot(Zh);
+ if (u >= 0 && c <= u) return e.copy(i);
+ const h = a * c - u * l;
+ if (h <= 0 && a >= 0 && u <= 0)
+ return (o = a / (a - u)), e.copy(n).addScaledVector(jh, o);
+ Kh.subVectors(t, r);
+ const d = jh.dot(Kh),
+ f = qh.dot(Kh);
+ if (f >= 0 && d <= f) return e.copy(r);
+ const p = d * l - a * f;
+ if (p <= 0 && l >= 0 && f <= 0)
+ return (s = l / (l - f)), e.copy(n).addScaledVector(qh, s);
+ const m = u * f - d * c;
+ if (m <= 0 && c - u >= 0 && d - f >= 0)
+ return (
+ Xh.subVectors(r, i),
+ (s = (c - u) / (c - u + (d - f))),
+ e.copy(i).addScaledVector(Xh, s)
+ );
+ const g = 1 / (m + p + h);
+ return (
+ (o = p * g),
+ (s = h * g),
+ e.copy(n).addScaledVector(jh, o).addScaledVector(qh, s)
+ );
+ }
+ equals(t) {
+ return t.a.equals(this.a) && t.b.equals(this.b) && t.c.equals(this.c);
+ }
+ }
+ let Qh = 0;
+ class $h extends tc {
+ constructor() {
+ super(),
+ (this.isMaterial = !0),
+ Object.defineProperty(this, "id", { value: Qh++ }),
+ (this.uuid = rc()),
+ (this.name = ""),
+ (this.type = "Material"),
+ (this.blending = 1),
+ (this.side = 0),
+ (this.vertexColors = !1),
+ (this.opacity = 1),
+ (this.transparent = !1),
+ (this.blendSrc = 204),
+ (this.blendDst = 205),
+ (this.blendEquation = 100),
+ (this.blendSrcAlpha = null),
+ (this.blendDstAlpha = null),
+ (this.blendEquationAlpha = null),
+ (this.depthFunc = 3),
+ (this.depthTest = !0),
+ (this.depthWrite = !0),
+ (this.stencilWriteMask = 255),
+ (this.stencilFunc = 519),
+ (this.stencilRef = 0),
+ (this.stencilFuncMask = 255),
+ (this.stencilFail = 7680),
+ (this.stencilZFail = 7680),
+ (this.stencilZPass = 7680),
+ (this.stencilWrite = !1),
+ (this.clippingPlanes = null),
+ (this.clipIntersection = !1),
+ (this.clipShadows = !1),
+ (this.shadowSide = null),
+ (this.colorWrite = !0),
+ (this.precision = null),
+ (this.polygonOffset = !1),
+ (this.polygonOffsetFactor = 0),
+ (this.polygonOffsetUnits = 0),
+ (this.dithering = !1),
+ (this.alphaToCoverage = !1),
+ (this.premultipliedAlpha = !1),
+ (this.visible = !0),
+ (this.toneMapped = !0),
+ (this.userData = {}),
+ (this.version = 0),
+ (this._alphaTest = 0);
+ }
+ get alphaTest() {
+ return this._alphaTest;
+ }
+ set alphaTest(t) {
+ this._alphaTest > 0 != t > 0 && this.version++, (this._alphaTest = t);
+ }
+ onBuild() {}
+ onBeforeRender() {}
+ onBeforeCompile() {}
+ customProgramCacheKey() {
+ return this.onBeforeCompile.toString();
+ }
+ setValues(t) {
+ if (void 0 !== t)
+ for (const e in t) {
+ const n = t[e];
+ if (void 0 === n) {
+ console.warn(
+ "THREE.Material: '" + e + "' parameter is undefined."
+ );
+ continue;
+ }
+ const i = this[e];
+ void 0 !== i
+ ? i && i.isColor
+ ? i.set(n)
+ : i && i.isVector3 && n && n.isVector3
+ ? i.copy(n)
+ : (this[e] = n)
+ : console.warn(
+ "THREE." +
+ this.type +
+ ": '" +
+ e +
+ "' is not a property of this material."
+ );
+ }
+ }
+ toJSON(t) {
+ const e = void 0 === t || "string" == typeof t;
+ e && (t = { textures: {}, images: {} });
+ const n = {
+ metadata: {
+ version: 4.5,
+ type: "Material",
+ generator: "Material.toJSON",
+ },
+ };
+ function i(t) {
+ const e = [];
+ for (const n in t) {
+ const i = t[n];
+ delete i.metadata, e.push(i);
+ }
+ return e;
+ }
+ if (
+ ((n.uuid = this.uuid),
+ (n.type = this.type),
+ "" !== this.name && (n.name = this.name),
+ this.color && this.color.isColor && (n.color = this.color.getHex()),
+ void 0 !== this.roughness && (n.roughness = this.roughness),
+ void 0 !== this.metalness && (n.metalness = this.metalness),
+ void 0 !== this.sheen && (n.sheen = this.sheen),
+ this.sheenColor &&
+ this.sheenColor.isColor &&
+ (n.sheenColor = this.sheenColor.getHex()),
+ void 0 !== this.sheenRoughness &&
+ (n.sheenRoughness = this.sheenRoughness),
+ this.emissive &&
+ this.emissive.isColor &&
+ (n.emissive = this.emissive.getHex()),
+ this.emissiveIntensity &&
+ 1 !== this.emissiveIntensity &&
+ (n.emissiveIntensity = this.emissiveIntensity),
+ this.specular &&
+ this.specular.isColor &&
+ (n.specular = this.specular.getHex()),
+ void 0 !== this.specularIntensity &&
+ (n.specularIntensity = this.specularIntensity),
+ this.specularColor &&
+ this.specularColor.isColor &&
+ (n.specularColor = this.specularColor.getHex()),
+ void 0 !== this.shininess && (n.shininess = this.shininess),
+ void 0 !== this.clearcoat && (n.clearcoat = this.clearcoat),
+ void 0 !== this.clearcoatRoughness &&
+ (n.clearcoatRoughness = this.clearcoatRoughness),
+ this.clearcoatMap &&
+ this.clearcoatMap.isTexture &&
+ (n.clearcoatMap = this.clearcoatMap.toJSON(t).uuid),
+ this.clearcoatRoughnessMap &&
+ this.clearcoatRoughnessMap.isTexture &&
+ (n.clearcoatRoughnessMap =
+ this.clearcoatRoughnessMap.toJSON(t).uuid),
+ this.clearcoatNormalMap &&
+ this.clearcoatNormalMap.isTexture &&
+ ((n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(t).uuid),
+ (n.clearcoatNormalScale = this.clearcoatNormalScale.toArray())),
+ void 0 !== this.iridescence && (n.iridescence = this.iridescence),
+ void 0 !== this.iridescenceIOR &&
+ (n.iridescenceIOR = this.iridescenceIOR),
+ void 0 !== this.iridescenceThicknessRange &&
+ (n.iridescenceThicknessRange = this.iridescenceThicknessRange),
+ this.iridescenceMap &&
+ this.iridescenceMap.isTexture &&
+ (n.iridescenceMap = this.iridescenceMap.toJSON(t).uuid),
+ this.iridescenceThicknessMap &&
+ this.iridescenceThicknessMap.isTexture &&
+ (n.iridescenceThicknessMap =
+ this.iridescenceThicknessMap.toJSON(t).uuid),
+ this.map && this.map.isTexture && (n.map = this.map.toJSON(t).uuid),
+ this.matcap &&
+ this.matcap.isTexture &&
+ (n.matcap = this.matcap.toJSON(t).uuid),
+ this.alphaMap &&
+ this.alphaMap.isTexture &&
+ (n.alphaMap = this.alphaMap.toJSON(t).uuid),
+ this.lightMap &&
+ this.lightMap.isTexture &&
+ ((n.lightMap = this.lightMap.toJSON(t).uuid),
+ (n.lightMapIntensity = this.lightMapIntensity)),
+ this.aoMap &&
+ this.aoMap.isTexture &&
+ ((n.aoMap = this.aoMap.toJSON(t).uuid),
+ (n.aoMapIntensity = this.aoMapIntensity)),
+ this.bumpMap &&
+ this.bumpMap.isTexture &&
+ ((n.bumpMap = this.bumpMap.toJSON(t).uuid),
+ (n.bumpScale = this.bumpScale)),
+ this.normalMap &&
+ this.normalMap.isTexture &&
+ ((n.normalMap = this.normalMap.toJSON(t).uuid),
+ (n.normalMapType = this.normalMapType),
+ (n.normalScale = this.normalScale.toArray())),
+ this.displacementMap &&
+ this.displacementMap.isTexture &&
+ ((n.displacementMap = this.displacementMap.toJSON(t).uuid),
+ (n.displacementScale = this.displacementScale),
+ (n.displacementBias = this.displacementBias)),
+ this.roughnessMap &&
+ this.roughnessMap.isTexture &&
+ (n.roughnessMap = this.roughnessMap.toJSON(t).uuid),
+ this.metalnessMap &&
+ this.metalnessMap.isTexture &&
+ (n.metalnessMap = this.metalnessMap.toJSON(t).uuid),
+ this.emissiveMap &&
+ this.emissiveMap.isTexture &&
+ (n.emissiveMap = this.emissiveMap.toJSON(t).uuid),
+ this.specularMap &&
+ this.specularMap.isTexture &&
+ (n.specularMap = this.specularMap.toJSON(t).uuid),
+ this.specularIntensityMap &&
+ this.specularIntensityMap.isTexture &&
+ (n.specularIntensityMap = this.specularIntensityMap.toJSON(t).uuid),
+ this.specularColorMap &&
+ this.specularColorMap.isTexture &&
+ (n.specularColorMap = this.specularColorMap.toJSON(t).uuid),
+ this.envMap &&
+ this.envMap.isTexture &&
+ ((n.envMap = this.envMap.toJSON(t).uuid),
+ void 0 !== this.combine && (n.combine = this.combine)),
+ void 0 !== this.envMapIntensity &&
+ (n.envMapIntensity = this.envMapIntensity),
+ void 0 !== this.reflectivity && (n.reflectivity = this.reflectivity),
+ void 0 !== this.refractionRatio &&
+ (n.refractionRatio = this.refractionRatio),
+ this.gradientMap &&
+ this.gradientMap.isTexture &&
+ (n.gradientMap = this.gradientMap.toJSON(t).uuid),
+ void 0 !== this.transmission && (n.transmission = this.transmission),
+ this.transmissionMap &&
+ this.transmissionMap.isTexture &&
+ (n.transmissionMap = this.transmissionMap.toJSON(t).uuid),
+ void 0 !== this.thickness && (n.thickness = this.thickness),
+ this.thicknessMap &&
+ this.thicknessMap.isTexture &&
+ (n.thicknessMap = this.thicknessMap.toJSON(t).uuid),
+ void 0 !== this.attenuationDistance &&
+ this.attenuationDistance !== 1 / 0 &&
+ (n.attenuationDistance = this.attenuationDistance),
+ void 0 !== this.attenuationColor &&
+ (n.attenuationColor = this.attenuationColor.getHex()),
+ void 0 !== this.size && (n.size = this.size),
+ null !== this.shadowSide && (n.shadowSide = this.shadowSide),
+ void 0 !== this.sizeAttenuation &&
+ (n.sizeAttenuation = this.sizeAttenuation),
+ 1 !== this.blending && (n.blending = this.blending),
+ 0 !== this.side && (n.side = this.side),
+ this.vertexColors && (n.vertexColors = !0),
+ this.opacity < 1 && (n.opacity = this.opacity),
+ !0 === this.transparent && (n.transparent = this.transparent),
+ (n.depthFunc = this.depthFunc),
+ (n.depthTest = this.depthTest),
+ (n.depthWrite = this.depthWrite),
+ (n.colorWrite = this.colorWrite),
+ (n.stencilWrite = this.stencilWrite),
+ (n.stencilWriteMask = this.stencilWriteMask),
+ (n.stencilFunc = this.stencilFunc),
+ (n.stencilRef = this.stencilRef),
+ (n.stencilFuncMask = this.stencilFuncMask),
+ (n.stencilFail = this.stencilFail),
+ (n.stencilZFail = this.stencilZFail),
+ (n.stencilZPass = this.stencilZPass),
+ void 0 !== this.rotation &&
+ 0 !== this.rotation &&
+ (n.rotation = this.rotation),
+ !0 === this.polygonOffset && (n.polygonOffset = !0),
+ 0 !== this.polygonOffsetFactor &&
+ (n.polygonOffsetFactor = this.polygonOffsetFactor),
+ 0 !== this.polygonOffsetUnits &&
+ (n.polygonOffsetUnits = this.polygonOffsetUnits),
+ void 0 !== this.linewidth &&
+ 1 !== this.linewidth &&
+ (n.linewidth = this.linewidth),
+ void 0 !== this.dashSize && (n.dashSize = this.dashSize),
+ void 0 !== this.gapSize && (n.gapSize = this.gapSize),
+ void 0 !== this.scale && (n.scale = this.scale),
+ !0 === this.dithering && (n.dithering = !0),
+ this.alphaTest > 0 && (n.alphaTest = this.alphaTest),
+ !0 === this.alphaToCoverage &&
+ (n.alphaToCoverage = this.alphaToCoverage),
+ !0 === this.premultipliedAlpha &&
+ (n.premultipliedAlpha = this.premultipliedAlpha),
+ !0 === this.wireframe && (n.wireframe = this.wireframe),
+ this.wireframeLinewidth > 1 &&
+ (n.wireframeLinewidth = this.wireframeLinewidth),
+ "round" !== this.wireframeLinecap &&
+ (n.wireframeLinecap = this.wireframeLinecap),
+ "round" !== this.wireframeLinejoin &&
+ (n.wireframeLinejoin = this.wireframeLinejoin),
+ !0 === this.flatShading && (n.flatShading = this.flatShading),
+ !1 === this.visible && (n.visible = !1),
+ !1 === this.toneMapped && (n.toneMapped = !1),
+ !1 === this.fog && (n.fog = !1),
+ Object.keys(this.userData).length > 0 && (n.userData = this.userData),
+ e)
+ ) {
+ const e = i(t.textures),
+ r = i(t.images);
+ e.length > 0 && (n.textures = e), r.length > 0 && (n.images = r);
+ }
+ return n;
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ copy(t) {
+ (this.name = t.name),
+ (this.blending = t.blending),
+ (this.side = t.side),
+ (this.vertexColors = t.vertexColors),
+ (this.opacity = t.opacity),
+ (this.transparent = t.transparent),
+ (this.blendSrc = t.blendSrc),
+ (this.blendDst = t.blendDst),
+ (this.blendEquation = t.blendEquation),
+ (this.blendSrcAlpha = t.blendSrcAlpha),
+ (this.blendDstAlpha = t.blendDstAlpha),
+ (this.blendEquationAlpha = t.blendEquationAlpha),
+ (this.depthFunc = t.depthFunc),
+ (this.depthTest = t.depthTest),
+ (this.depthWrite = t.depthWrite),
+ (this.stencilWriteMask = t.stencilWriteMask),
+ (this.stencilFunc = t.stencilFunc),
+ (this.stencilRef = t.stencilRef),
+ (this.stencilFuncMask = t.stencilFuncMask),
+ (this.stencilFail = t.stencilFail),
+ (this.stencilZFail = t.stencilZFail),
+ (this.stencilZPass = t.stencilZPass),
+ (this.stencilWrite = t.stencilWrite);
+ const e = t.clippingPlanes;
+ let n = null;
+ if (null !== e) {
+ const t = e.length;
+ n = new Array(t);
+ for (let i = 0; i !== t; ++i) n[i] = e[i].clone();
+ }
+ return (
+ (this.clippingPlanes = n),
+ (this.clipIntersection = t.clipIntersection),
+ (this.clipShadows = t.clipShadows),
+ (this.shadowSide = t.shadowSide),
+ (this.colorWrite = t.colorWrite),
+ (this.precision = t.precision),
+ (this.polygonOffset = t.polygonOffset),
+ (this.polygonOffsetFactor = t.polygonOffsetFactor),
+ (this.polygonOffsetUnits = t.polygonOffsetUnits),
+ (this.dithering = t.dithering),
+ (this.alphaTest = t.alphaTest),
+ (this.alphaToCoverage = t.alphaToCoverage),
+ (this.premultipliedAlpha = t.premultipliedAlpha),
+ (this.visible = t.visible),
+ (this.toneMapped = t.toneMapped),
+ (this.userData = JSON.parse(JSON.stringify(t.userData))),
+ this
+ );
+ }
+ dispose() {
+ this.dispatchEvent({ type: "dispose" });
+ }
+ set needsUpdate(t) {
+ !0 === t && this.version++;
+ }
+ }
+ class td extends $h {
+ constructor(t) {
+ super(),
+ (this.isMeshBasicMaterial = !0),
+ (this.type = "MeshBasicMaterial"),
+ (this.color = new Ec(16777215)),
+ (this.map = null),
+ (this.lightMap = null),
+ (this.lightMapIntensity = 1),
+ (this.aoMap = null),
+ (this.aoMapIntensity = 1),
+ (this.specularMap = null),
+ (this.alphaMap = null),
+ (this.envMap = null),
+ (this.combine = 0),
+ (this.reflectivity = 1),
+ (this.refractionRatio = 0.98),
+ (this.wireframe = !1),
+ (this.wireframeLinewidth = 1),
+ (this.wireframeLinecap = "round"),
+ (this.wireframeLinejoin = "round"),
+ (this.fog = !0),
+ this.setValues(t);
+ }
+ copy(t) {
+ return (
+ super.copy(t),
+ this.color.copy(t.color),
+ (this.map = t.map),
+ (this.lightMap = t.lightMap),
+ (this.lightMapIntensity = t.lightMapIntensity),
+ (this.aoMap = t.aoMap),
+ (this.aoMapIntensity = t.aoMapIntensity),
+ (this.specularMap = t.specularMap),
+ (this.alphaMap = t.alphaMap),
+ (this.envMap = t.envMap),
+ (this.combine = t.combine),
+ (this.reflectivity = t.reflectivity),
+ (this.refractionRatio = t.refractionRatio),
+ (this.wireframe = t.wireframe),
+ (this.wireframeLinewidth = t.wireframeLinewidth),
+ (this.wireframeLinecap = t.wireframeLinecap),
+ (this.wireframeLinejoin = t.wireframeLinejoin),
+ (this.fog = t.fog),
+ this
+ );
+ }
+ }
+ const ed = new Uc(),
+ nd = new dc();
+ class id {
+ constructor(t, e, n = !1) {
+ if (Array.isArray(t))
+ throw new TypeError(
+ "THREE.BufferAttribute: array should be a Typed Array."
+ );
+ (this.isBufferAttribute = !0),
+ (this.name = ""),
+ (this.array = t),
+ (this.itemSize = e),
+ (this.count = void 0 !== t ? t.length / e : 0),
+ (this.normalized = n),
+ (this.usage = 35044),
+ (this.updateRange = { offset: 0, count: -1 }),
+ (this.version = 0);
+ }
+ onUploadCallback() {}
+ set needsUpdate(t) {
+ !0 === t && this.version++;
+ }
+ setUsage(t) {
+ return (this.usage = t), this;
+ }
+ copy(t) {
+ return (
+ (this.name = t.name),
+ (this.array = new t.array.constructor(t.array)),
+ (this.itemSize = t.itemSize),
+ (this.count = t.count),
+ (this.normalized = t.normalized),
+ (this.usage = t.usage),
+ this
+ );
+ }
+ copyAt(t, e, n) {
+ (t *= this.itemSize), (n *= e.itemSize);
+ for (let i = 0, r = this.itemSize; i < r; i++)
+ this.array[t + i] = e.array[n + i];
+ return this;
+ }
+ copyArray(t) {
+ return this.array.set(t), this;
+ }
+ applyMatrix3(t) {
+ if (2 === this.itemSize)
+ for (let e = 0, n = this.count; e < n; e++)
+ nd.fromBufferAttribute(this, e),
+ nd.applyMatrix3(t),
+ this.setXY(e, nd.x, nd.y);
+ else if (3 === this.itemSize)
+ for (let e = 0, n = this.count; e < n; e++)
+ ed.fromBufferAttribute(this, e),
+ ed.applyMatrix3(t),
+ this.setXYZ(e, ed.x, ed.y, ed.z);
+ return this;
+ }
+ applyMatrix4(t) {
+ for (let e = 0, n = this.count; e < n; e++)
+ ed.fromBufferAttribute(this, e),
+ ed.applyMatrix4(t),
+ this.setXYZ(e, ed.x, ed.y, ed.z);
+ return this;
+ }
+ applyNormalMatrix(t) {
+ for (let e = 0, n = this.count; e < n; e++)
+ ed.fromBufferAttribute(this, e),
+ ed.applyNormalMatrix(t),
+ this.setXYZ(e, ed.x, ed.y, ed.z);
+ return this;
+ }
+ transformDirection(t) {
+ for (let e = 0, n = this.count; e < n; e++)
+ ed.fromBufferAttribute(this, e),
+ ed.transformDirection(t),
+ this.setXYZ(e, ed.x, ed.y, ed.z);
+ return this;
+ }
+ set(t, e = 0) {
+ return this.array.set(t, e), this;
+ }
+ getX(t) {
+ let e = this.array[t * this.itemSize];
+ return this.normalized && (e = cc(e, this.array)), e;
+ }
+ setX(t, e) {
+ return (
+ this.normalized && (e = hc(e, this.array)),
+ (this.array[t * this.itemSize] = e),
+ this
+ );
+ }
+ getY(t) {
+ let e = this.array[t * this.itemSize + 1];
+ return this.normalized && (e = cc(e, this.array)), e;
+ }
+ setY(t, e) {
+ return (
+ this.normalized && (e = hc(e, this.array)),
+ (this.array[t * this.itemSize + 1] = e),
+ this
+ );
+ }
+ getZ(t) {
+ let e = this.array[t * this.itemSize + 2];
+ return this.normalized && (e = cc(e, this.array)), e;
+ }
+ setZ(t, e) {
+ return (
+ this.normalized && (e = hc(e, this.array)),
+ (this.array[t * this.itemSize + 2] = e),
+ this
+ );
+ }
+ getW(t) {
+ let e = this.array[t * this.itemSize + 3];
+ return this.normalized && (e = cc(e, this.array)), e;
+ }
+ setW(t, e) {
+ return (
+ this.normalized && (e = hc(e, this.array)),
+ (this.array[t * this.itemSize + 3] = e),
+ this
+ );
+ }
+ setXY(t, e, n) {
+ return (
+ (t *= this.itemSize),
+ this.normalized && ((e = hc(e, this.array)), (n = hc(n, this.array))),
+ (this.array[t + 0] = e),
+ (this.array[t + 1] = n),
+ this
+ );
+ }
+ setXYZ(t, e, n, i) {
+ return (
+ (t *= this.itemSize),
+ this.normalized &&
+ ((e = hc(e, this.array)),
+ (n = hc(n, this.array)),
+ (i = hc(i, this.array))),
+ (this.array[t + 0] = e),
+ (this.array[t + 1] = n),
+ (this.array[t + 2] = i),
+ this
+ );
+ }
+ setXYZW(t, e, n, i, r) {
+ return (
+ (t *= this.itemSize),
+ this.normalized &&
+ ((e = hc(e, this.array)),
+ (n = hc(n, this.array)),
+ (i = hc(i, this.array)),
+ (r = hc(r, this.array))),
+ (this.array[t + 0] = e),
+ (this.array[t + 1] = n),
+ (this.array[t + 2] = i),
+ (this.array[t + 3] = r),
+ this
+ );
+ }
+ onUpload(t) {
+ return (this.onUploadCallback = t), this;
+ }
+ clone() {
+ return new this.constructor(this.array, this.itemSize).copy(this);
+ }
+ toJSON() {
+ const t = {
+ itemSize: this.itemSize,
+ type: this.array.constructor.name,
+ array: Array.from(this.array),
+ normalized: this.normalized,
+ };
+ return (
+ "" !== this.name && (t.name = this.name),
+ 35044 !== this.usage && (t.usage = this.usage),
+ (0 === this.updateRange.offset && -1 === this.updateRange.count) ||
+ (t.updateRange = this.updateRange),
+ t
+ );
+ }
+ copyColorsArray() {
+ console.error(
+ "THREE.BufferAttribute: copyColorsArray() was removed in r144."
+ );
+ }
+ copyVector2sArray() {
+ console.error(
+ "THREE.BufferAttribute: copyVector2sArray() was removed in r144."
+ );
+ }
+ copyVector3sArray() {
+ console.error(
+ "THREE.BufferAttribute: copyVector3sArray() was removed in r144."
+ );
+ }
+ copyVector4sArray() {
+ console.error(
+ "THREE.BufferAttribute: copyVector4sArray() was removed in r144."
+ );
+ }
+ }
+ class rd extends id {
+ constructor(t, e, n) {
+ super(new Uint16Array(t), e, n);
+ }
+ }
+ class od extends id {
+ constructor(t, e, n) {
+ super(new Uint32Array(t), e, n);
+ }
+ }
+ class sd extends id {
+ constructor(t, e, n) {
+ super(new Float32Array(t), e, n);
+ }
+ }
+ let ad = 0;
+ const ld = new mh(),
+ ud = new Bh(),
+ cd = new Uc(),
+ hd = new Hc(),
+ dd = new Hc(),
+ fd = new Uc();
+ class pd extends tc {
+ constructor() {
+ super(),
+ (this.isBufferGeometry = !0),
+ Object.defineProperty(this, "id", { value: ad++ }),
+ (this.uuid = rc()),
+ (this.name = ""),
+ (this.type = "BufferGeometry"),
+ (this.index = null),
+ (this.attributes = {}),
+ (this.morphAttributes = {}),
+ (this.morphTargetsRelative = !1),
+ (this.groups = []),
+ (this.boundingBox = null),
+ (this.boundingSphere = null),
+ (this.drawRange = { start: 0, count: 1 / 0 }),
+ (this.userData = {});
+ }
+ getIndex() {
+ return this.index;
+ }
+ setIndex(t) {
+ return (
+ Array.isArray(t)
+ ? (this.index = new (mc(t) ? od : rd)(t, 1))
+ : (this.index = t),
+ this
+ );
+ }
+ getAttribute(t) {
+ return this.attributes[t];
+ }
+ setAttribute(t, e) {
+ return (this.attributes[t] = e), this;
+ }
+ deleteAttribute(t) {
+ return delete this.attributes[t], this;
+ }
+ hasAttribute(t) {
+ return void 0 !== this.attributes[t];
+ }
+ addGroup(t, e, n = 0) {
+ this.groups.push({ start: t, count: e, materialIndex: n });
+ }
+ clearGroups() {
+ this.groups = [];
+ }
+ setDrawRange(t, e) {
+ (this.drawRange.start = t), (this.drawRange.count = e);
+ }
+ applyMatrix4(t) {
+ const e = this.attributes.position;
+ void 0 !== e && (e.applyMatrix4(t), (e.needsUpdate = !0));
+ const n = this.attributes.normal;
+ if (void 0 !== n) {
+ const e = new fc().getNormalMatrix(t);
+ n.applyNormalMatrix(e), (n.needsUpdate = !0);
+ }
+ const i = this.attributes.tangent;
+ return (
+ void 0 !== i && (i.transformDirection(t), (i.needsUpdate = !0)),
+ null !== this.boundingBox && this.computeBoundingBox(),
+ null !== this.boundingSphere && this.computeBoundingSphere(),
+ this
+ );
+ }
+ applyQuaternion(t) {
+ return ld.makeRotationFromQuaternion(t), this.applyMatrix4(ld), this;
+ }
+ rotateX(t) {
+ return ld.makeRotationX(t), this.applyMatrix4(ld), this;
+ }
+ rotateY(t) {
+ return ld.makeRotationY(t), this.applyMatrix4(ld), this;
+ }
+ rotateZ(t) {
+ return ld.makeRotationZ(t), this.applyMatrix4(ld), this;
+ }
+ translate(t, e, n) {
+ return ld.makeTranslation(t, e, n), this.applyMatrix4(ld), this;
+ }
+ scale(t, e, n) {
+ return ld.makeScale(t, e, n), this.applyMatrix4(ld), this;
+ }
+ lookAt(t) {
+ return (
+ ud.lookAt(t), ud.updateMatrix(), this.applyMatrix4(ud.matrix), this
+ );
+ }
+ center() {
+ return (
+ this.computeBoundingBox(),
+ this.boundingBox.getCenter(cd).negate(),
+ this.translate(cd.x, cd.y, cd.z),
+ this
+ );
+ }
+ setFromPoints(t) {
+ const e = [];
+ for (let n = 0, i = t.length; n < i; n++) {
+ const i = t[n];
+ e.push(i.x, i.y, i.z || 0);
+ }
+ return this.setAttribute("position", new sd(e, 3)), this;
+ }
+ computeBoundingBox() {
+ null === this.boundingBox && (this.boundingBox = new Hc());
+ const t = this.attributes.position,
+ e = this.morphAttributes.position;
+ if (t && t.isGLBufferAttribute)
+ return (
+ console.error(
+ 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',
+ this
+ ),
+ void this.boundingBox.set(
+ new Uc(-1 / 0, -1 / 0, -1 / 0),
+ new Uc(1 / 0, 1 / 0, 1 / 0)
+ )
+ );
+ if (void 0 !== t) {
+ if ((this.boundingBox.setFromBufferAttribute(t), e))
+ for (let t = 0, n = e.length; t < n; t++) {
+ const n = e[t];
+ hd.setFromBufferAttribute(n),
+ this.morphTargetsRelative
+ ? (fd.addVectors(this.boundingBox.min, hd.min),
+ this.boundingBox.expandByPoint(fd),
+ fd.addVectors(this.boundingBox.max, hd.max),
+ this.boundingBox.expandByPoint(fd))
+ : (this.boundingBox.expandByPoint(hd.min),
+ this.boundingBox.expandByPoint(hd.max));
+ }
+ } else 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() {
+ null === this.boundingSphere && (this.boundingSphere = new sh());
+ const t = this.attributes.position,
+ e = this.morphAttributes.position;
+ if (t && t.isGLBufferAttribute)
+ return (
+ console.error(
+ 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',
+ this
+ ),
+ void this.boundingSphere.set(new Uc(), 1 / 0)
+ );
+ if (t) {
+ const n = this.boundingSphere.center;
+ if ((hd.setFromBufferAttribute(t), e))
+ for (let t = 0, n = e.length; t < n; t++) {
+ const n = e[t];
+ dd.setFromBufferAttribute(n),
+ this.morphTargetsRelative
+ ? (fd.addVectors(hd.min, dd.min),
+ hd.expandByPoint(fd),
+ fd.addVectors(hd.max, dd.max),
+ hd.expandByPoint(fd))
+ : (hd.expandByPoint(dd.min), hd.expandByPoint(dd.max));
+ }
+ hd.getCenter(n);
+ let i = 0;
+ for (let e = 0, r = t.count; e < r; e++)
+ fd.fromBufferAttribute(t, e),
+ (i = Math.max(i, n.distanceToSquared(fd)));
+ if (e)
+ for (let r = 0, o = e.length; r < o; r++) {
+ const o = e[r],
+ s = this.morphTargetsRelative;
+ for (let e = 0, r = o.count; e < r; e++)
+ fd.fromBufferAttribute(o, e),
+ s && (cd.fromBufferAttribute(t, e), fd.add(cd)),
+ (i = Math.max(i, n.distanceToSquared(fd)));
+ }
+ (this.boundingSphere.radius = Math.sqrt(i)),
+ isNaN(this.boundingSphere.radius) &&
+ console.error(
+ 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',
+ this
+ );
+ }
+ }
+ computeTangents() {
+ const t = this.index,
+ e = this.attributes;
+ if (
+ null === t ||
+ void 0 === e.position ||
+ void 0 === e.normal ||
+ void 0 === e.uv
+ )
+ return void console.error(
+ "THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)"
+ );
+ const n = t.array,
+ i = e.position.array,
+ r = e.normal.array,
+ o = e.uv.array,
+ s = i.length / 3;
+ !1 === this.hasAttribute("tangent") &&
+ this.setAttribute("tangent", new id(new Float32Array(4 * s), 4));
+ const a = this.getAttribute("tangent").array,
+ l = [],
+ u = [];
+ for (let t = 0; t < s; t++) (l[t] = new Uc()), (u[t] = new Uc());
+ const c = new Uc(),
+ h = new Uc(),
+ d = new Uc(),
+ f = new dc(),
+ p = new dc(),
+ m = new dc(),
+ g = new Uc(),
+ v = new Uc();
+ function _(t, e, n) {
+ c.fromArray(i, 3 * t),
+ h.fromArray(i, 3 * e),
+ d.fromArray(i, 3 * n),
+ f.fromArray(o, 2 * t),
+ p.fromArray(o, 2 * e),
+ m.fromArray(o, 2 * n),
+ h.sub(c),
+ d.sub(c),
+ p.sub(f),
+ m.sub(f);
+ const r = 1 / (p.x * m.y - m.x * p.y);
+ isFinite(r) &&
+ (g
+ .copy(h)
+ .multiplyScalar(m.y)
+ .addScaledVector(d, -p.y)
+ .multiplyScalar(r),
+ v
+ .copy(d)
+ .multiplyScalar(p.x)
+ .addScaledVector(h, -m.x)
+ .multiplyScalar(r),
+ l[t].add(g),
+ l[e].add(g),
+ l[n].add(g),
+ u[t].add(v),
+ u[e].add(v),
+ u[n].add(v));
+ }
+ let x = this.groups;
+ 0 === x.length && (x = [{ start: 0, count: n.length }]);
+ for (let t = 0, e = x.length; t < e; ++t) {
+ const e = x[t],
+ i = e.start;
+ for (let t = i, r = i + e.count; t < r; t += 3)
+ _(n[t + 0], n[t + 1], n[t + 2]);
+ }
+ const y = new Uc(),
+ b = new Uc(),
+ w = new Uc(),
+ S = new Uc();
+ function M(t) {
+ w.fromArray(r, 3 * t), S.copy(w);
+ const e = l[t];
+ y.copy(e),
+ y.sub(w.multiplyScalar(w.dot(e))).normalize(),
+ b.crossVectors(S, e);
+ const n = b.dot(u[t]) < 0 ? -1 : 1;
+ (a[4 * t] = y.x),
+ (a[4 * t + 1] = y.y),
+ (a[4 * t + 2] = y.z),
+ (a[4 * t + 3] = n);
+ }
+ for (let t = 0, e = x.length; t < e; ++t) {
+ const e = x[t],
+ i = e.start;
+ for (let t = i, r = i + e.count; t < r; t += 3)
+ M(n[t + 0]), M(n[t + 1]), M(n[t + 2]);
+ }
+ }
+ computeVertexNormals() {
+ const t = this.index,
+ e = this.getAttribute("position");
+ if (void 0 !== e) {
+ let n = this.getAttribute("normal");
+ if (void 0 === n)
+ (n = new id(new Float32Array(3 * e.count), 3)),
+ this.setAttribute("normal", n);
+ else for (let t = 0, e = n.count; t < e; t++) n.setXYZ(t, 0, 0, 0);
+ const i = new Uc(),
+ r = new Uc(),
+ o = new Uc(),
+ s = new Uc(),
+ a = new Uc(),
+ l = new Uc(),
+ u = new Uc(),
+ c = new Uc();
+ if (t)
+ for (let h = 0, d = t.count; h < d; h += 3) {
+ const d = t.getX(h + 0),
+ f = t.getX(h + 1),
+ p = t.getX(h + 2);
+ i.fromBufferAttribute(e, d),
+ r.fromBufferAttribute(e, f),
+ o.fromBufferAttribute(e, p),
+ u.subVectors(o, r),
+ c.subVectors(i, r),
+ u.cross(c),
+ s.fromBufferAttribute(n, d),
+ a.fromBufferAttribute(n, f),
+ l.fromBufferAttribute(n, p),
+ s.add(u),
+ a.add(u),
+ l.add(u),
+ n.setXYZ(d, s.x, s.y, s.z),
+ n.setXYZ(f, a.x, a.y, a.z),
+ n.setXYZ(p, l.x, l.y, l.z);
+ }
+ else
+ for (let t = 0, s = e.count; t < s; t += 3)
+ i.fromBufferAttribute(e, t + 0),
+ r.fromBufferAttribute(e, t + 1),
+ o.fromBufferAttribute(e, t + 2),
+ u.subVectors(o, r),
+ c.subVectors(i, r),
+ u.cross(c),
+ n.setXYZ(t + 0, u.x, u.y, u.z),
+ n.setXYZ(t + 1, u.x, u.y, u.z),
+ n.setXYZ(t + 2, u.x, u.y, u.z);
+ this.normalizeNormals(), (n.needsUpdate = !0);
+ }
+ }
+ merge() {
+ return (
+ console.error(
+ "THREE.BufferGeometry.merge() has been removed. Use THREE.BufferGeometryUtils.mergeBufferGeometries() instead."
+ ),
+ this
+ );
+ }
+ normalizeNormals() {
+ const t = this.attributes.normal;
+ for (let e = 0, n = t.count; e < n; e++)
+ fd.fromBufferAttribute(t, e),
+ fd.normalize(),
+ t.setXYZ(e, fd.x, fd.y, fd.z);
+ }
+ toNonIndexed() {
+ function t(t, e) {
+ const n = t.array,
+ i = t.itemSize,
+ r = t.normalized,
+ o = new n.constructor(e.length * i);
+ let s = 0,
+ a = 0;
+ for (let r = 0, l = e.length; r < l; r++) {
+ s = t.isInterleavedBufferAttribute
+ ? e[r] * t.data.stride + t.offset
+ : e[r] * i;
+ for (let t = 0; t < i; t++) o[a++] = n[s++];
+ }
+ return new id(o, i, r);
+ }
+ if (null === this.index)
+ return (
+ console.warn(
+ "THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."
+ ),
+ this
+ );
+ const e = new pd(),
+ n = this.index.array,
+ i = this.attributes;
+ for (const r in i) {
+ const o = t(i[r], n);
+ e.setAttribute(r, o);
+ }
+ const r = this.morphAttributes;
+ for (const i in r) {
+ const o = [],
+ s = r[i];
+ for (let e = 0, i = s.length; e < i; e++) {
+ const i = t(s[e], n);
+ o.push(i);
+ }
+ e.morphAttributes[i] = o;
+ }
+ e.morphTargetsRelative = this.morphTargetsRelative;
+ const o = this.groups;
+ for (let t = 0, n = o.length; t < n; t++) {
+ const n = o[t];
+ e.addGroup(n.start, n.count, n.materialIndex);
+ }
+ return e;
+ }
+ toJSON() {
+ const t = {
+ metadata: {
+ version: 4.5,
+ type: "BufferGeometry",
+ generator: "BufferGeometry.toJSON",
+ },
+ };
+ if (
+ ((t.uuid = this.uuid),
+ (t.type = this.type),
+ "" !== this.name && (t.name = this.name),
+ Object.keys(this.userData).length > 0 && (t.userData = this.userData),
+ void 0 !== this.parameters)
+ ) {
+ const e = this.parameters;
+ for (const n in e) void 0 !== e[n] && (t[n] = e[n]);
+ return t;
+ }
+ t.data = { attributes: {} };
+ const e = this.index;
+ null !== e &&
+ (t.data.index = {
+ type: e.array.constructor.name,
+ array: Array.prototype.slice.call(e.array),
+ });
+ const n = this.attributes;
+ for (const e in n) {
+ const i = n[e];
+ t.data.attributes[e] = i.toJSON(t.data);
+ }
+ const i = {};
+ let r = !1;
+ for (const e in this.morphAttributes) {
+ const n = this.morphAttributes[e],
+ o = [];
+ for (let e = 0, i = n.length; e < i; e++) {
+ const i = n[e];
+ o.push(i.toJSON(t.data));
+ }
+ o.length > 0 && ((i[e] = o), (r = !0));
+ }
+ r &&
+ ((t.data.morphAttributes = i),
+ (t.data.morphTargetsRelative = this.morphTargetsRelative));
+ const o = this.groups;
+ o.length > 0 && (t.data.groups = JSON.parse(JSON.stringify(o)));
+ const s = this.boundingSphere;
+ return (
+ null !== s &&
+ (t.data.boundingSphere = {
+ center: s.center.toArray(),
+ radius: s.radius,
+ }),
+ t
+ );
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ copy(t) {
+ (this.index = null),
+ (this.attributes = {}),
+ (this.morphAttributes = {}),
+ (this.groups = []),
+ (this.boundingBox = null),
+ (this.boundingSphere = null);
+ const e = {};
+ this.name = t.name;
+ const n = t.index;
+ null !== n && this.setIndex(n.clone(e));
+ const i = t.attributes;
+ for (const t in i) {
+ const n = i[t];
+ this.setAttribute(t, n.clone(e));
+ }
+ const r = t.morphAttributes;
+ for (const t in r) {
+ const n = [],
+ i = r[t];
+ for (let t = 0, r = i.length; t < r; t++) n.push(i[t].clone(e));
+ this.morphAttributes[t] = n;
+ }
+ this.morphTargetsRelative = t.morphTargetsRelative;
+ const o = t.groups;
+ for (let t = 0, e = o.length; t < e; t++) {
+ const e = o[t];
+ this.addGroup(e.start, e.count, e.materialIndex);
+ }
+ const s = t.boundingBox;
+ null !== s && (this.boundingBox = s.clone());
+ const a = t.boundingSphere;
+ return (
+ null !== a && (this.boundingSphere = a.clone()),
+ (this.drawRange.start = t.drawRange.start),
+ (this.drawRange.count = t.drawRange.count),
+ (this.userData = t.userData),
+ void 0 !== t.parameters &&
+ (this.parameters = Object.assign({}, t.parameters)),
+ this
+ );
+ }
+ dispose() {
+ this.dispatchEvent({ type: "dispose" });
+ }
+ }
+ const md = new mh(),
+ gd = new ph(),
+ vd = new sh(),
+ _d = new Uc(),
+ xd = new Uc(),
+ yd = new Uc(),
+ bd = new Uc(),
+ wd = new Uc(),
+ Sd = new dc(),
+ Md = new dc(),
+ Dd = new dc(),
+ Td = new Uc(),
+ Ed = new Uc();
+ class Cd extends Bh {
+ constructor(t = new pd(), e = new td()) {
+ super(),
+ (this.isMesh = !0),
+ (this.type = "Mesh"),
+ (this.geometry = t),
+ (this.material = e),
+ this.updateMorphTargets();
+ }
+ copy(t, e) {
+ return (
+ super.copy(t, e),
+ void 0 !== t.morphTargetInfluences &&
+ (this.morphTargetInfluences = t.morphTargetInfluences.slice()),
+ void 0 !== t.morphTargetDictionary &&
+ (this.morphTargetDictionary = Object.assign(
+ {},
+ t.morphTargetDictionary
+ )),
+ (this.material = t.material),
+ (this.geometry = t.geometry),
+ this
+ );
+ }
+ updateMorphTargets() {
+ const t = this.geometry.morphAttributes,
+ e = Object.keys(t);
+ if (e.length > 0) {
+ const n = t[e[0]];
+ if (void 0 !== n) {
+ (this.morphTargetInfluences = []),
+ (this.morphTargetDictionary = {});
+ for (let t = 0, e = n.length; t < e; t++) {
+ const e = n[t].name || String(t);
+ this.morphTargetInfluences.push(0),
+ (this.morphTargetDictionary[e] = t);
+ }
+ }
+ }
+ }
+ getVertexPosition(t, e) {
+ const n = this.geometry,
+ i = n.attributes.position,
+ r = n.morphAttributes.position,
+ o = n.morphTargetsRelative;
+ e.fromBufferAttribute(i, t);
+ const s = this.morphTargetInfluences;
+ if (r && s) {
+ wd.set(0, 0, 0);
+ for (let n = 0, i = r.length; n < i; n++) {
+ const i = s[n],
+ a = r[n];
+ 0 !== i &&
+ (bd.fromBufferAttribute(a, t),
+ o ? wd.addScaledVector(bd, i) : wd.addScaledVector(bd.sub(e), i));
+ }
+ e.add(wd);
+ }
+ return this.isSkinnedMesh && this.boneTransform(t, e), e;
+ }
+ raycast(t, e) {
+ const n = this.geometry,
+ i = this.material,
+ r = this.matrixWorld;
+ if (void 0 === i) return;
+ if (
+ (null === n.boundingSphere && n.computeBoundingSphere(),
+ vd.copy(n.boundingSphere),
+ vd.applyMatrix4(r),
+ !1 === t.ray.intersectsSphere(vd))
+ )
+ return;
+ if (
+ (md.copy(r).invert(),
+ gd.copy(t.ray).applyMatrix4(md),
+ null !== n.boundingBox && !1 === gd.intersectsBox(n.boundingBox))
+ )
+ return;
+ let o;
+ const s = n.index,
+ a = n.attributes.position,
+ l = n.attributes.uv,
+ u = n.attributes.uv2,
+ c = n.groups,
+ h = n.drawRange;
+ if (null !== s)
+ if (Array.isArray(i))
+ for (let n = 0, r = c.length; n < r; n++) {
+ const r = c[n],
+ a = i[r.materialIndex];
+ for (
+ let n = Math.max(r.start, h.start),
+ i = Math.min(
+ s.count,
+ Math.min(r.start + r.count, h.start + h.count)
+ );
+ n < i;
+ n += 3
+ ) {
+ const i = s.getX(n),
+ c = s.getX(n + 1),
+ h = s.getX(n + 2);
+ (o = Ad(this, a, t, gd, l, u, i, c, h)),
+ o &&
+ ((o.faceIndex = Math.floor(n / 3)),
+ (o.face.materialIndex = r.materialIndex),
+ e.push(o));
+ }
+ }
+ else {
+ for (
+ let n = Math.max(0, h.start),
+ r = Math.min(s.count, h.start + h.count);
+ n < r;
+ n += 3
+ ) {
+ const r = s.getX(n),
+ a = s.getX(n + 1),
+ c = s.getX(n + 2);
+ (o = Ad(this, i, t, gd, l, u, r, a, c)),
+ o && ((o.faceIndex = Math.floor(n / 3)), e.push(o));
+ }
+ }
+ else if (void 0 !== a)
+ if (Array.isArray(i))
+ for (let n = 0, r = c.length; n < r; n++) {
+ const r = c[n],
+ s = i[r.materialIndex];
+ for (
+ let n = Math.max(r.start, h.start),
+ i = Math.min(
+ a.count,
+ Math.min(r.start + r.count, h.start + h.count)
+ );
+ n < i;
+ n += 3
+ ) {
+ (o = Ad(this, s, t, gd, l, u, n, n + 1, n + 2)),
+ o &&
+ ((o.faceIndex = Math.floor(n / 3)),
+ (o.face.materialIndex = r.materialIndex),
+ e.push(o));
+ }
+ }
+ else {
+ for (
+ let n = Math.max(0, h.start),
+ r = Math.min(a.count, h.start + h.count);
+ n < r;
+ n += 3
+ ) {
+ (o = Ad(this, i, t, gd, l, u, n, n + 1, n + 2)),
+ o && ((o.faceIndex = Math.floor(n / 3)), e.push(o));
+ }
+ }
+ }
+ }
+ function Ad(t, e, n, i, r, o, s, a, l) {
+ t.getVertexPosition(s, _d),
+ t.getVertexPosition(a, xd),
+ t.getVertexPosition(l, yd);
+ const u = (function (t, e, n, i, r, o, s, a) {
+ let l;
+ if (
+ ((l =
+ 1 === e.side
+ ? i.intersectTriangle(s, o, r, !0, a)
+ : i.intersectTriangle(r, o, s, 0 === e.side, a)),
+ null === l)
+ )
+ return null;
+ Ed.copy(a), Ed.applyMatrix4(t.matrixWorld);
+ const u = n.ray.origin.distanceTo(Ed);
+ return u < n.near || u > n.far
+ ? null
+ : { distance: u, point: Ed.clone(), object: t };
+ })(t, e, n, i, _d, xd, yd, Td);
+ if (u) {
+ r &&
+ (Sd.fromBufferAttribute(r, s),
+ Md.fromBufferAttribute(r, a),
+ Dd.fromBufferAttribute(r, l),
+ (u.uv = Jh.getUV(Td, _d, xd, yd, Sd, Md, Dd, new dc()))),
+ o &&
+ (Sd.fromBufferAttribute(o, s),
+ Md.fromBufferAttribute(o, a),
+ Dd.fromBufferAttribute(o, l),
+ (u.uv2 = Jh.getUV(Td, _d, xd, yd, Sd, Md, Dd, new dc())));
+ const t = { a: s, b: a, c: l, normal: new Uc(), materialIndex: 0 };
+ Jh.getNormal(_d, xd, yd, t.normal), (u.face = t);
+ }
+ return u;
+ }
+ class Pd extends pd {
+ constructor(t = 1, e = 1, n = 1, i = 1, r = 1, o = 1) {
+ super(),
+ (this.type = "BoxGeometry"),
+ (this.parameters = {
+ width: t,
+ height: e,
+ depth: n,
+ widthSegments: i,
+ heightSegments: r,
+ depthSegments: o,
+ });
+ const s = this;
+ (i = Math.floor(i)), (r = Math.floor(r)), (o = Math.floor(o));
+ const a = [],
+ l = [],
+ u = [],
+ c = [];
+ let h = 0,
+ d = 0;
+ function f(t, e, n, i, r, o, f, p, m, g, v) {
+ const _ = o / m,
+ x = f / g,
+ y = o / 2,
+ b = f / 2,
+ w = p / 2,
+ S = m + 1,
+ M = g + 1;
+ let D = 0,
+ T = 0;
+ const E = new Uc();
+ for (let o = 0; o < M; o++) {
+ const s = o * x - b;
+ for (let a = 0; a < S; a++) {
+ const h = a * _ - y;
+ (E[t] = h * i),
+ (E[e] = s * r),
+ (E[n] = w),
+ l.push(E.x, E.y, E.z),
+ (E[t] = 0),
+ (E[e] = 0),
+ (E[n] = p > 0 ? 1 : -1),
+ u.push(E.x, E.y, E.z),
+ c.push(a / m),
+ c.push(1 - o / g),
+ (D += 1);
+ }
+ }
+ for (let t = 0; t < g; t++)
+ for (let e = 0; e < m; e++) {
+ const n = h + e + S * t,
+ i = h + e + S * (t + 1),
+ r = h + (e + 1) + S * (t + 1),
+ o = h + (e + 1) + S * t;
+ a.push(n, i, o), a.push(i, r, o), (T += 6);
+ }
+ s.addGroup(d, T, v), (d += T), (h += D);
+ }
+ f("z", "y", "x", -1, -1, n, e, t, o, r, 0),
+ f("z", "y", "x", 1, -1, n, e, -t, o, r, 1),
+ f("x", "z", "y", 1, 1, t, n, e, i, o, 2),
+ f("x", "z", "y", 1, -1, t, n, -e, i, o, 3),
+ f("x", "y", "z", 1, -1, t, e, n, i, r, 4),
+ f("x", "y", "z", -1, -1, t, e, -n, i, r, 5),
+ this.setIndex(a),
+ this.setAttribute("position", new sd(l, 3)),
+ this.setAttribute("normal", new sd(u, 3)),
+ this.setAttribute("uv", new sd(c, 2));
+ }
+ static fromJSON(t) {
+ return new Pd(
+ t.width,
+ t.height,
+ t.depth,
+ t.widthSegments,
+ t.heightSegments,
+ t.depthSegments
+ );
+ }
+ }
+ function Ld(t) {
+ const e = {};
+ for (const n in t) {
+ e[n] = {};
+ for (const i in t[n]) {
+ const r = t[n][i];
+ r &&
+ (r.isColor ||
+ r.isMatrix3 ||
+ r.isMatrix4 ||
+ r.isVector2 ||
+ r.isVector3 ||
+ r.isVector4 ||
+ r.isTexture ||
+ r.isQuaternion)
+ ? (e[n][i] = r.clone())
+ : Array.isArray(r)
+ ? (e[n][i] = r.slice())
+ : (e[n][i] = r);
+ }
+ }
+ return e;
+ }
+ function Rd(t) {
+ const e = {};
+ for (let n = 0; n < t.length; n++) {
+ const i = Ld(t[n]);
+ for (const t in i) e[t] = i[t];
+ }
+ return e;
+ }
+ function Od(t) {
+ return null === t.getRenderTarget() && 3001 === t.outputEncoding
+ ? "srgb"
+ : "srgb-linear";
+ }
+ const Fd = { clone: Ld, merge: Rd };
+ class Id extends $h {
+ constructor(t) {
+ super(),
+ (this.isShaderMaterial = !0),
+ (this.type = "ShaderMaterial"),
+ (this.defines = {}),
+ (this.uniforms = {}),
+ (this.uniformsGroups = []),
+ (this.vertexShader =
+ "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"),
+ (this.fragmentShader =
+ "void main() {\n\tgl_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.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),
+ (this.uniformsNeedUpdate = !1),
+ (this.glslVersion = null),
+ void 0 !== t && this.setValues(t);
+ }
+ copy(t) {
+ return (
+ super.copy(t),
+ (this.fragmentShader = t.fragmentShader),
+ (this.vertexShader = t.vertexShader),
+ (this.uniforms = Ld(t.uniforms)),
+ (this.uniformsGroups = (function (t) {
+ const e = [];
+ for (let n = 0; n < t.length; n++) e.push(t[n].clone());
+ return e;
+ })(t.uniformsGroups)),
+ (this.defines = Object.assign({}, t.defines)),
+ (this.wireframe = t.wireframe),
+ (this.wireframeLinewidth = t.wireframeLinewidth),
+ (this.fog = t.fog),
+ (this.lights = t.lights),
+ (this.clipping = t.clipping),
+ (this.extensions = Object.assign({}, t.extensions)),
+ (this.glslVersion = t.glslVersion),
+ this
+ );
+ }
+ toJSON(t) {
+ const e = super.toJSON(t);
+ (e.glslVersion = this.glslVersion), (e.uniforms = {});
+ for (const n in this.uniforms) {
+ const i = this.uniforms[n].value;
+ i && i.isTexture
+ ? (e.uniforms[n] = { type: "t", value: i.toJSON(t).uuid })
+ : i && i.isColor
+ ? (e.uniforms[n] = { type: "c", value: i.getHex() })
+ : i && i.isVector2
+ ? (e.uniforms[n] = { type: "v2", value: i.toArray() })
+ : i && i.isVector3
+ ? (e.uniforms[n] = { type: "v3", value: i.toArray() })
+ : i && i.isVector4
+ ? (e.uniforms[n] = { type: "v4", value: i.toArray() })
+ : i && i.isMatrix3
+ ? (e.uniforms[n] = { type: "m3", value: i.toArray() })
+ : i && i.isMatrix4
+ ? (e.uniforms[n] = { type: "m4", value: i.toArray() })
+ : (e.uniforms[n] = { value: i });
+ }
+ Object.keys(this.defines).length > 0 && (e.defines = this.defines),
+ (e.vertexShader = this.vertexShader),
+ (e.fragmentShader = this.fragmentShader);
+ const n = {};
+ for (const t in this.extensions)
+ !0 === this.extensions[t] && (n[t] = !0);
+ return Object.keys(n).length > 0 && (e.extensions = n), e;
+ }
+ }
+ class Nd extends Bh {
+ constructor() {
+ super(),
+ (this.isCamera = !0),
+ (this.type = "Camera"),
+ (this.matrixWorldInverse = new mh()),
+ (this.projectionMatrix = new mh()),
+ (this.projectionMatrixInverse = new mh());
+ }
+ copy(t, e) {
+ return (
+ super.copy(t, e),
+ this.matrixWorldInverse.copy(t.matrixWorldInverse),
+ this.projectionMatrix.copy(t.projectionMatrix),
+ this.projectionMatrixInverse.copy(t.projectionMatrixInverse),
+ this
+ );
+ }
+ getWorldDirection(t) {
+ this.updateWorldMatrix(!0, !1);
+ const e = this.matrixWorld.elements;
+ return t.set(-e[8], -e[9], -e[10]).normalize();
+ }
+ updateMatrixWorld(t) {
+ super.updateMatrixWorld(t),
+ this.matrixWorldInverse.copy(this.matrixWorld).invert();
+ }
+ updateWorldMatrix(t, e) {
+ super.updateWorldMatrix(t, e),
+ this.matrixWorldInverse.copy(this.matrixWorld).invert();
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ }
+ class zd extends Nd {
+ constructor(t = 50, e = 1, n = 0.1, i = 2e3) {
+ super(),
+ (this.isPerspectiveCamera = !0),
+ (this.type = "PerspectiveCamera"),
+ (this.fov = t),
+ (this.zoom = 1),
+ (this.near = n),
+ (this.far = i),
+ (this.focus = 10),
+ (this.aspect = e),
+ (this.view = null),
+ (this.filmGauge = 35),
+ (this.filmOffset = 0),
+ this.updateProjectionMatrix();
+ }
+ copy(t, e) {
+ return (
+ super.copy(t, e),
+ (this.fov = t.fov),
+ (this.zoom = t.zoom),
+ (this.near = t.near),
+ (this.far = t.far),
+ (this.focus = t.focus),
+ (this.aspect = t.aspect),
+ (this.view = null === t.view ? null : Object.assign({}, t.view)),
+ (this.filmGauge = t.filmGauge),
+ (this.filmOffset = t.filmOffset),
+ this
+ );
+ }
+ setFocalLength(t) {
+ const e = (0.5 * this.getFilmHeight()) / t;
+ (this.fov = 2 * ic * Math.atan(e)), this.updateProjectionMatrix();
+ }
+ getFocalLength() {
+ const t = Math.tan(0.5 * nc * this.fov);
+ return (0.5 * this.getFilmHeight()) / t;
+ }
+ getEffectiveFOV() {
+ return 2 * ic * Math.atan(Math.tan(0.5 * nc * this.fov) / this.zoom);
+ }
+ getFilmWidth() {
+ return this.filmGauge * Math.min(this.aspect, 1);
+ }
+ getFilmHeight() {
+ return this.filmGauge / Math.max(this.aspect, 1);
+ }
+ setViewOffset(t, e, n, i, r, o) {
+ (this.aspect = t / e),
+ null === this.view &&
+ (this.view = {
+ enabled: !0,
+ fullWidth: 1,
+ fullHeight: 1,
+ offsetX: 0,
+ offsetY: 0,
+ width: 1,
+ height: 1,
+ }),
+ (this.view.enabled = !0),
+ (this.view.fullWidth = t),
+ (this.view.fullHeight = e),
+ (this.view.offsetX = n),
+ (this.view.offsetY = i),
+ (this.view.width = r),
+ (this.view.height = o),
+ this.updateProjectionMatrix();
+ }
+ clearViewOffset() {
+ null !== this.view && (this.view.enabled = !1),
+ this.updateProjectionMatrix();
+ }
+ updateProjectionMatrix() {
+ const t = this.near;
+ let e = (t * Math.tan(0.5 * nc * this.fov)) / this.zoom,
+ n = 2 * e,
+ i = this.aspect * n,
+ r = -0.5 * i;
+ const o = this.view;
+ if (null !== this.view && this.view.enabled) {
+ const t = o.fullWidth,
+ s = o.fullHeight;
+ (r += (o.offsetX * i) / t),
+ (e -= (o.offsetY * n) / s),
+ (i *= o.width / t),
+ (n *= o.height / s);
+ }
+ const s = this.filmOffset;
+ 0 !== s && (r += (t * s) / this.getFilmWidth()),
+ this.projectionMatrix.makePerspective(
+ r,
+ r + i,
+ e,
+ e - n,
+ t,
+ this.far
+ ),
+ this.projectionMatrixInverse.copy(this.projectionMatrix).invert();
+ }
+ toJSON(t) {
+ const e = super.toJSON(t);
+ return (
+ (e.object.fov = this.fov),
+ (e.object.zoom = this.zoom),
+ (e.object.near = this.near),
+ (e.object.far = this.far),
+ (e.object.focus = this.focus),
+ (e.object.aspect = this.aspect),
+ null !== this.view && (e.object.view = Object.assign({}, this.view)),
+ (e.object.filmGauge = this.filmGauge),
+ (e.object.filmOffset = this.filmOffset),
+ e
+ );
+ }
+ }
+ class kd extends Bh {
+ constructor(t, e, n) {
+ super(), (this.type = "CubeCamera"), (this.renderTarget = n);
+ const i = new zd(-90, 1, t, e);
+ (i.layers = this.layers),
+ i.up.set(0, 1, 0),
+ i.lookAt(1, 0, 0),
+ this.add(i);
+ const r = new zd(-90, 1, t, e);
+ (r.layers = this.layers),
+ r.up.set(0, 1, 0),
+ r.lookAt(-1, 0, 0),
+ this.add(r);
+ const o = new zd(-90, 1, t, e);
+ (o.layers = this.layers),
+ o.up.set(0, 0, -1),
+ o.lookAt(0, 1, 0),
+ this.add(o);
+ const s = new zd(-90, 1, t, e);
+ (s.layers = this.layers),
+ s.up.set(0, 0, 1),
+ s.lookAt(0, -1, 0),
+ this.add(s);
+ const a = new zd(-90, 1, t, e);
+ (a.layers = this.layers),
+ a.up.set(0, 1, 0),
+ a.lookAt(0, 0, 1),
+ this.add(a);
+ const l = new zd(-90, 1, t, e);
+ (l.layers = this.layers),
+ l.up.set(0, 1, 0),
+ l.lookAt(0, 0, -1),
+ this.add(l);
+ }
+ update(t, e) {
+ null === this.parent && this.updateMatrixWorld();
+ const n = this.renderTarget,
+ [i, r, o, s, a, l] = this.children,
+ u = t.getRenderTarget(),
+ c = t.toneMapping,
+ h = t.xr.enabled;
+ (t.toneMapping = 0), (t.xr.enabled = !1);
+ const d = n.texture.generateMipmaps;
+ (n.texture.generateMipmaps = !1),
+ t.setRenderTarget(n, 0),
+ t.render(e, i),
+ t.setRenderTarget(n, 1),
+ t.render(e, r),
+ t.setRenderTarget(n, 2),
+ t.render(e, o),
+ t.setRenderTarget(n, 3),
+ t.render(e, s),
+ t.setRenderTarget(n, 4),
+ t.render(e, a),
+ (n.texture.generateMipmaps = d),
+ t.setRenderTarget(n, 5),
+ t.render(e, l),
+ t.setRenderTarget(u),
+ (t.toneMapping = c),
+ (t.xr.enabled = h),
+ (n.texture.needsPMREMUpdate = !0);
+ }
+ }
+ class Ud extends Oc {
+ constructor(t, e, n, i, r, o, s, a, l, u) {
+ super(
+ (t = void 0 !== t ? t : []),
+ (e = void 0 !== e ? e : 301),
+ n,
+ i,
+ r,
+ o,
+ s,
+ a,
+ l,
+ u
+ ),
+ (this.isCubeTexture = !0),
+ (this.flipY = !1);
+ }
+ get images() {
+ return this.image;
+ }
+ set images(t) {
+ this.image = t;
+ }
+ }
+ class Bd extends Ic {
+ constructor(t = 1, e = {}) {
+ super(t, t, e), (this.isWebGLCubeRenderTarget = !0);
+ const n = { width: t, height: t, depth: 1 },
+ i = [n, n, n, n, n, n];
+ (this.texture = new Ud(
+ i,
+ e.mapping,
+ e.wrapS,
+ e.wrapT,
+ e.magFilter,
+ e.minFilter,
+ e.format,
+ e.type,
+ e.anisotropy,
+ e.encoding
+ )),
+ (this.texture.isRenderTargetTexture = !0),
+ (this.texture.generateMipmaps =
+ void 0 !== e.generateMipmaps && e.generateMipmaps),
+ (this.texture.minFilter =
+ void 0 !== e.minFilter ? e.minFilter : 1006);
+ }
+ fromEquirectangularTexture(t, e) {
+ (this.texture.type = e.type),
+ (this.texture.encoding = e.encoding),
+ (this.texture.generateMipmaps = e.generateMipmaps),
+ (this.texture.minFilter = e.minFilter),
+ (this.texture.magFilter = e.magFilter);
+ const n = {
+ uniforms: { tEquirect: { value: null } },
+ vertexShader:
+ "\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",
+ fragmentShader:
+ "\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",
+ },
+ i = new Pd(5, 5, 5),
+ r = new Id({
+ name: "CubemapFromEquirect",
+ uniforms: Ld(n.uniforms),
+ vertexShader: n.vertexShader,
+ fragmentShader: n.fragmentShader,
+ side: 1,
+ blending: 0,
+ });
+ r.uniforms.tEquirect.value = e;
+ const o = new Cd(i, r),
+ s = e.minFilter;
+ 1008 === e.minFilter && (e.minFilter = 1006);
+ return (
+ new kd(1, 10, this).update(t, o),
+ (e.minFilter = s),
+ o.geometry.dispose(),
+ o.material.dispose(),
+ this
+ );
+ }
+ clear(t, e, n, i) {
+ const r = t.getRenderTarget();
+ for (let r = 0; r < 6; r++)
+ t.setRenderTarget(this, r), t.clear(e, n, i);
+ t.setRenderTarget(r);
+ }
+ }
+ const Vd = new Uc(),
+ Hd = new Uc(),
+ Wd = new fc();
+ class Gd {
+ constructor(t = new Uc(1, 0, 0), e = 0) {
+ (this.isPlane = !0), (this.normal = t), (this.constant = e);
+ }
+ set(t, e) {
+ return this.normal.copy(t), (this.constant = e), this;
+ }
+ setComponents(t, e, n, i) {
+ return this.normal.set(t, e, n), (this.constant = i), this;
+ }
+ setFromNormalAndCoplanarPoint(t, e) {
+ return this.normal.copy(t), (this.constant = -e.dot(this.normal)), this;
+ }
+ setFromCoplanarPoints(t, e, n) {
+ const i = Vd.subVectors(n, e).cross(Hd.subVectors(t, e)).normalize();
+ return this.setFromNormalAndCoplanarPoint(i, t), this;
+ }
+ copy(t) {
+ return this.normal.copy(t.normal), (this.constant = t.constant), this;
+ }
+ normalize() {
+ const t = 1 / this.normal.length();
+ return this.normal.multiplyScalar(t), (this.constant *= t), this;
+ }
+ negate() {
+ return (this.constant *= -1), this.normal.negate(), this;
+ }
+ distanceToPoint(t) {
+ return this.normal.dot(t) + this.constant;
+ }
+ distanceToSphere(t) {
+ return this.distanceToPoint(t.center) - t.radius;
+ }
+ projectPoint(t, e) {
+ return e
+ .copy(this.normal)
+ .multiplyScalar(-this.distanceToPoint(t))
+ .add(t);
+ }
+ intersectLine(t, e) {
+ const n = t.delta(Vd),
+ i = this.normal.dot(n);
+ if (0 === i)
+ return 0 === this.distanceToPoint(t.start) ? e.copy(t.start) : null;
+ const r = -(t.start.dot(this.normal) + this.constant) / i;
+ return r < 0 || r > 1 ? null : e.copy(n).multiplyScalar(r).add(t.start);
+ }
+ intersectsLine(t) {
+ const e = this.distanceToPoint(t.start),
+ n = this.distanceToPoint(t.end);
+ return (e < 0 && n > 0) || (n < 0 && e > 0);
+ }
+ intersectsBox(t) {
+ return t.intersectsPlane(this);
+ }
+ intersectsSphere(t) {
+ return t.intersectsPlane(this);
+ }
+ coplanarPoint(t) {
+ return t.copy(this.normal).multiplyScalar(-this.constant);
+ }
+ applyMatrix4(t, e) {
+ const n = e || Wd.getNormalMatrix(t),
+ i = this.coplanarPoint(Vd).applyMatrix4(t),
+ r = this.normal.applyMatrix3(n).normalize();
+ return (this.constant = -i.dot(r)), this;
+ }
+ translate(t) {
+ return (this.constant -= t.dot(this.normal)), this;
+ }
+ equals(t) {
+ return t.normal.equals(this.normal) && t.constant === this.constant;
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ }
+ const jd = new sh(),
+ qd = new Uc();
+ class Xd {
+ constructor(
+ t = new Gd(),
+ e = new Gd(),
+ n = new Gd(),
+ i = new Gd(),
+ r = new Gd(),
+ o = new Gd()
+ ) {
+ this.planes = [t, e, n, i, r, o];
+ }
+ set(t, e, n, i, r, o) {
+ const s = this.planes;
+ return (
+ s[0].copy(t),
+ s[1].copy(e),
+ s[2].copy(n),
+ s[3].copy(i),
+ s[4].copy(r),
+ s[5].copy(o),
+ this
+ );
+ }
+ copy(t) {
+ const e = this.planes;
+ for (let n = 0; n < 6; n++) e[n].copy(t.planes[n]);
+ return this;
+ }
+ setFromProjectionMatrix(t) {
+ const e = this.planes,
+ n = t.elements,
+ i = n[0],
+ r = n[1],
+ o = n[2],
+ s = n[3],
+ a = n[4],
+ l = n[5],
+ u = n[6],
+ c = n[7],
+ h = n[8],
+ d = n[9],
+ f = n[10],
+ p = n[11],
+ m = n[12],
+ g = n[13],
+ v = n[14],
+ _ = n[15];
+ return (
+ e[0].setComponents(s - i, c - a, p - h, _ - m).normalize(),
+ e[1].setComponents(s + i, c + a, p + h, _ + m).normalize(),
+ e[2].setComponents(s + r, c + l, p + d, _ + g).normalize(),
+ e[3].setComponents(s - r, c - l, p - d, _ - g).normalize(),
+ e[4].setComponents(s - o, c - u, p - f, _ - v).normalize(),
+ e[5].setComponents(s + o, c + u, p + f, _ + v).normalize(),
+ this
+ );
+ }
+ intersectsObject(t) {
+ const e = t.geometry;
+ return (
+ null === e.boundingSphere && e.computeBoundingSphere(),
+ jd.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),
+ this.intersectsSphere(jd)
+ );
+ }
+ intersectsSprite(t) {
+ return (
+ jd.center.set(0, 0, 0),
+ (jd.radius = 0.7071067811865476),
+ jd.applyMatrix4(t.matrixWorld),
+ this.intersectsSphere(jd)
+ );
+ }
+ intersectsSphere(t) {
+ const e = this.planes,
+ n = t.center,
+ i = -t.radius;
+ for (let t = 0; t < 6; t++) {
+ if (e[t].distanceToPoint(n) < i) return !1;
+ }
+ return !0;
+ }
+ intersectsBox(t) {
+ const e = this.planes;
+ for (let n = 0; n < 6; n++) {
+ const i = e[n];
+ if (
+ ((qd.x = i.normal.x > 0 ? t.max.x : t.min.x),
+ (qd.y = i.normal.y > 0 ? t.max.y : t.min.y),
+ (qd.z = i.normal.z > 0 ? t.max.z : t.min.z),
+ i.distanceToPoint(qd) < 0)
+ )
+ return !1;
+ }
+ return !0;
+ }
+ containsPoint(t) {
+ const e = this.planes;
+ for (let n = 0; n < 6; n++) if (e[n].distanceToPoint(t) < 0) return !1;
+ return !0;
+ }
+ clone() {
+ return new this.constructor().copy(this);
+ }
+ }
+ function Yd() {
+ let t = null,
+ e = !1,
+ n = null,
+ i = null;
+ function r(e, o) {
+ n(e, o), (i = t.requestAnimationFrame(r));
+ }
+ return {
+ start: function () {
+ !0 !== e &&
+ null !== n &&
+ ((i = t.requestAnimationFrame(r)), (e = !0));
+ },
+ stop: function () {
+ t.cancelAnimationFrame(i), (e = !1);
+ },
+ setAnimationLoop: function (t) {
+ n = t;
+ },
+ setContext: function (e) {
+ t = e;
+ },
+ };
+ }
+ function Zd(t, e) {
+ const n = e.isWebGL2,
+ i = new WeakMap();
+ return {
+ get: function (t) {
+ return t.isInterleavedBufferAttribute && (t = t.data), i.get(t);
+ },
+ remove: function (e) {
+ e.isInterleavedBufferAttribute && (e = e.data);
+ const n = i.get(e);
+ n && (t.deleteBuffer(n.buffer), i.delete(e));
+ },
+ update: function (e, r) {
+ if (e.isGLBufferAttribute) {
+ const t = i.get(e);
+ return void (
+ (!t || t.version < e.version) &&
+ i.set(e, {
+ buffer: e.buffer,
+ type: e.type,
+ bytesPerElement: e.elementSize,
+ version: e.version,
+ })
+ );
+ }
+ e.isInterleavedBufferAttribute && (e = e.data);
+ const o = i.get(e);
+ void 0 === o
+ ? i.set(
+ e,
+ (function (e, i) {
+ const r = e.array,
+ o = e.usage,
+ s = t.createBuffer();
+ let a;
+ if (
+ (t.bindBuffer(i, s),
+ t.bufferData(i, r, o),
+ e.onUploadCallback(),
+ r instanceof Float32Array)
+ )
+ a = 5126;
+ else if (r instanceof Uint16Array)
+ if (e.isFloat16BufferAttribute) {
+ if (!n)
+ throw new Error(
+ "THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."
+ );
+ a = 5131;
+ } else a = 5123;
+ else if (r instanceof Int16Array) a = 5122;
+ else if (r instanceof Uint32Array) a = 5125;
+ else if (r instanceof Int32Array) a = 5124;
+ else if (r instanceof Int8Array) a = 5120;
+ else if (r instanceof Uint8Array) a = 5121;
+ else {
+ if (!(r instanceof Uint8ClampedArray))
+ throw new Error(
+ "THREE.WebGLAttributes: Unsupported buffer data format: " +
+ r
+ );
+ a = 5121;
+ }
+ return {
+ buffer: s,
+ type: a,
+ bytesPerElement: r.BYTES_PER_ELEMENT,
+ version: e.version,
+ };
+ })(e, r)
+ )
+ : o.version < e.version &&
+ (!(function (e, i, r) {
+ const o = i.array,
+ s = i.updateRange;
+ t.bindBuffer(r, e),
+ -1 === s.count
+ ? t.bufferSubData(r, 0, o)
+ : (n
+ ? t.bufferSubData(
+ r,
+ s.offset * o.BYTES_PER_ELEMENT,
+ o,
+ s.offset,
+ s.count
+ )
+ : t.bufferSubData(
+ r,
+ s.offset * o.BYTES_PER_ELEMENT,
+ o.subarray(s.offset, s.offset + s.count)
+ ),
+ (s.count = -1)),
+ i.onUploadCallback();
+ })(o.buffer, e, r),
+ (o.version = e.version));
+ },
+ };
+ }
+ class Kd extends pd {
+ constructor(t = 1, e = 1, n = 1, i = 1) {
+ super(),
+ (this.type = "PlaneGeometry"),
+ (this.parameters = {
+ width: t,
+ height: e,
+ widthSegments: n,
+ heightSegments: i,
+ });
+ const r = t / 2,
+ o = e / 2,
+ s = Math.floor(n),
+ a = Math.floor(i),
+ l = s + 1,
+ u = a + 1,
+ c = t / s,
+ h = e / a,
+ d = [],
+ f = [],
+ p = [],
+ m = [];
+ for (let t = 0; t < u; t++) {
+ const e = t * h - o;
+ for (let n = 0; n < l; n++) {
+ const i = n * c - r;
+ f.push(i, -e, 0), p.push(0, 0, 1), m.push(n / s), m.push(1 - t / a);
+ }
+ }
+ for (let t = 0; t < a; t++)
+ for (let e = 0; e < s; e++) {
+ const n = e + l * t,
+ i = e + l * (t + 1),
+ r = e + 1 + l * (t + 1),
+ o = e + 1 + l * t;
+ d.push(n, i, o), d.push(i, r, o);
+ }
+ this.setIndex(d),
+ this.setAttribute("position", new sd(f, 3)),
+ this.setAttribute("normal", new sd(p, 3)),
+ this.setAttribute("uv", new sd(m, 2));
+ }
+ static fromJSON(t) {
+ return new Kd(t.width, t.height, t.widthSegments, t.heightSegments);
+ }
+ }
+ const Jd = {
+ alphamap_fragment:
+ "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",
+ alphamap_pars_fragment:
+ "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",
+ alphatest_fragment:
+ "#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",
+ alphatest_pars_fragment:
+ "#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",
+ aomap_fragment:
+ "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",
+ aomap_pars_fragment:
+ "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",
+ begin_vertex: "vec3 transformed = vec3( position );",
+ beginnormal_vertex:
+ "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",
+ bsdfs:
+ "vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\n#ifdef USE_IRIDESCENCE\n\tvec3 BRDF_GGX_Iridescence( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float iridescence, const in vec3 iridescenceFresnel, const in float roughness ) {\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = mix( F_Schlick( f0, f90, dotVH ), iridescenceFresnel, iridescence );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",
+ iridescence_fragment:
+ "#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\t return vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat R21 = R12;\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",
+ bumpmap_pars_fragment:
+ "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",
+ clipping_planes_fragment:
+ "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",
+ clipping_planes_pars_fragment:
+ "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",
+ clipping_planes_pars_vertex:
+ "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",
+ clipping_planes_vertex:
+ "#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",
+ color_fragment:
+ "#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",
+ color_pars_fragment:
+ "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",
+ color_pars_vertex:
+ "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",
+ color_vertex:
+ "#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",
+ common:
+ "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 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 max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",
+ cube_uv_reflection_fragment:
+ "#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",
+ defaultnormal_vertex:
+ "vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",
+ displacementmap_pars_vertex:
+ "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",
+ displacementmap_vertex:
+ "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",
+ emissivemap_fragment:
+ "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",
+ emissivemap_pars_fragment:
+ "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",
+ encodings_fragment:
+ "gl_FragColor = linearToOutputTexel( gl_FragColor );",
+ encodings_pars_fragment:
+ "vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn 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.a );\n}",
+ envmap_fragment:
+ "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",
+ envmap_common_pars_fragment:
+ "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",
+ envmap_pars_fragment:
+ "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",
+ envmap_pars_vertex:
+ "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",
+ envmap_physical_pars_fragment:
+ "#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",
+ envmap_vertex:
+ "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",
+ fog_vertex: "#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",
+ fog_pars_vertex: "#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",
+ fog_fragment:
+ "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",
+ fog_pars_fragment:
+ "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",
+ gradientmap_pars_fragment:
+ "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",
+ lightmap_fragment:
+ "#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",
+ lightmap_pars_fragment:
+ "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",
+ lights_lambert_fragment:
+ "LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",
+ lights_lambert_pars_fragment:
+ "varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",
+ lights_pars_begin:
+ "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",
+ lights_toon_fragment:
+ "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",
+ lights_toon_pars_fragment:
+ "varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",
+ lights_phong_fragment:
+ "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",
+ lights_phong_pars_fragment:
+ "varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, 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\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",
+ lights_physical_fragment:
+ "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",
+ lights_physical_pars_fragment:
+ "struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness );\n\t#else\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",
+ lights_fragment_begin:
+ "\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",
+ lights_fragment_maps:
+ "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",
+ lights_fragment_end:
+ "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",
+ logdepthbuf_fragment:
+ "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",
+ logdepthbuf_pars_fragment:
+ "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",
+ logdepthbuf_pars_vertex:
+ "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",
+ logdepthbuf_vertex:
+ "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",
+ map_fragment:
+ "#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",
+ map_pars_fragment: "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",
+ map_particle_fragment:
+ "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",
+ map_particle_pars_fragment:
+ "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",
+ metalnessmap_fragment:
+ "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",
+ metalnessmap_pars_fragment:
+ "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",
+ morphcolor_vertex:
+ "#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",
+ morphnormal_vertex:
+ "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",
+ morphtarget_pars_vertex:
+ "#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",
+ morphtarget_vertex:
+ "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",
+ normal_fragment_begin:
+ "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",
+ normal_fragment_maps:
+ "#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",
+ normal_pars_fragment:
+ "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",
+ normal_pars_vertex:
+ "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",
+ normal_vertex:
+ "#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",
+ normalmap_pars_fragment:
+ "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",
+ clearcoat_normal_fragment_begin:
+ "#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",
+ clearcoat_normal_fragment_maps:
+ "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",
+ clearcoat_pars_fragment:
+ "#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",
+ iridescence_pars_fragment:
+ "#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",
+ output_fragment:
+ "#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",
+ packing:
+ "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\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\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",
+ premultiplied_alpha_fragment:
+ "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",
+ project_vertex:
+ "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",
+ dithering_fragment:
+ "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",
+ dithering_pars_fragment:
+ "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",
+ roughnessmap_fragment:
+ "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",
+ roughnessmap_pars_fragment:
+ "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",
+ shadowmap_pars_fragment:
+ "#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",
+ shadowmap_pars_vertex:
+ "#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",
+ shadowmap_vertex:
+ "#if defined( USE_SHADOWMAP ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_COORDS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",
+ shadowmask_pars_fragment:
+ "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",
+ skinbase_vertex:
+ "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",
+ skinning_pars_vertex:
+ "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",
+ skinning_vertex:
+ "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",
+ skinnormal_vertex:
+ "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",
+ specularmap_fragment:
+ "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",
+ specularmap_pars_fragment:
+ "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",
+ tonemapping_fragment:
+ "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",
+ tonemapping_pars_fragment:
+ "#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",
+ transmission_fragment:
+ "#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif",
+ transmission_pars_fragment:
+ "#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",
+ uv_pars_fragment:
+ "#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",
+ uv_pars_vertex:
+ "#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",
+ uv_vertex:
+ "#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",
+ uv2_pars_fragment:
+ "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",
+ uv2_pars_vertex:
+ "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",
+ uv2_vertex:
+ "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",
+ worldpos_vertex:
+ "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",
+ background_vert:
+ "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",
+ background_frag:
+ "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",
+ backgroundCube_vert:
+ "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",
+ backgroundCube_frag:
+ "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",
+ cube_vert:
+ "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",
+ cube_frag:
+ "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",
+ depth_vert:
+ "#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",
+ depth_frag:
+ "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",
+ distanceRGBA_vert:
+ "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",
+ distanceRGBA_frag:
+ "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",
+ equirect_vert:
+ "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",
+ equirect_frag:
+ "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",
+ linedashed_vert:
+ "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",
+ 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\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",
+ meshbasic_vert:
+ "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",
+ meshbasic_frag:
+ "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\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\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",
+ meshlambert_vert:
+ "#define LAMBERT\nvarying vec3 vViewPosition;\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\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",
+ meshlambert_frag:
+ "#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\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 \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",
+ meshmatcap_vert:
+ "#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include